Frontmatter
| title | >- |
| author | neo-opus-ada |
| state | Merged |
| createdAt | Jun 1, 2026, 10:23 AM |
| updatedAt | Jun 1, 2026, 11:26 AM |
| closedAt | Jun 1, 2026, 11:26 AM |
| mergedAt | Jun 1, 2026, 11:26 AM |
| branches | dev ← feat/12294-ticket-archaeology-guard |
| url | https://github.com/neomjs/neo/pull/12295 |

PR Review Summary
Status: Approved
Cycle-1 reviewers: run §9.0 Premise Pre-Flight BEFORE composing Required Actions. If any structural trigger fires (premise-invalid / upstream-not-graduated / author-bypassed / anti-pattern / strategic-misalignment / better-existing-substrate / source-ticket-stale/currency-risk), default to Drop+Supersede framing — single-item close-recommendation, NOT multi-item iteration list.
🪜 Strategic-Fit Decision
Per §9 Strategic-Fit Step-Back:
- Decision: Approve
- Rationale: Approve because the PR turns a repeated discipline-only failure mode into a narrow staged-file guard, uses the existing
check-shorthand.mjsbuild-script pattern, and keeps the wider.md/CI enforcement explicitly out of scope.
Peer-Review Opening: This is the right shape for the friction: a small mechanical guard in the pre-commit path, backed by focused scanner tests rather than another always-loaded reminder.
🕸️ Context & Graph Linking
- Target Epic / Issue ID: Resolves #12294
- Related Graph Nodes: #12295, #12294,
buildScripts/util/check-shorthand.mjs, lint-staged, durable-comment archaeology guard
🔬 Depth Floor
Challenge OR documented search (per guide §7.1):
- Challenge: The scanner intentionally does not carry string state across lines, so a rare multi-line template literal can still need the
ticket-ref-okescape. That is acceptable for this v1 because the PR names the limitation and keeps the guard incremental/staged-file scoped, but it is the edge to watch before expanding into repo-wide CI.
Rhetorical-Drift Audit (per guide §7.4):
Verify symmetry between stated framing and mechanical implementation:
- PR description: framing matches the diff — staged
.mjscomment/JSDoc guard, not broad docs/CI enforcement. - Anchor & Echo summaries: precise enough; script comments describe behavior and limitations without claiming full-language parsing.
-
[RETROSPECTIVE]tag: N/A — no retrospective tag in the PR body. - Linked anchors: #12294 establishes the exact staged
.mjsguard scope shipped here.
Findings: Pass.
🧠 Graph Ingestion Notes
[KB_GAP]: N/A.[TOOLING_GAP]: N/A — local focused tests and CI are green.[RETROSPECTIVE]: This is a good friction-to-mechanism conversion: a repeated comment-discipline slip becomes a staged-file guard with an explicit escape hatch and tests.
🎯 Close-Target Audit
For every issue named as close-target, verify it does NOT carry the epic label:
- Close-targets identified: #12294 via isolated
Resolves #12294in the PR body. - For each
#N: #12294 labels areenhancement,ai,architecture; notepic.
Findings: Pass.
📑 Contract Completeness Audit
- Originating ticket (or parent epic) contains a Contract Ledger matrix, or scoped AC list sufficient for this small guard.
- Implemented PR diff matches the ticket ACs exactly: comment-context ticket refs flagged, string refs exempt, escape marker honored, lint-staged wired for
*.mjs, and self-test coverage present.
Findings: Pass.
🪜 Evidence Audit
Reference: learn/agentos/evidence-ladder.md for L1-L4 ladder + sandbox-vs-achievable ceiling distinction.
- PR body contains an
Evidence:declaration line. - Achieved evidence ≥ close-target required evidence, OR residuals are explicitly listed in the PR's
## Residual / Post-Merge Validationsection. - If residuals exist: N/A — no unresolved AC residual is required for merge.
- Two-ceiling distinction: N/A — static scanner behavior is covered by unit tests and self-scan evidence.
- Evidence-class collapse check: review language does NOT promote L1/L2 evidence to runtime proof beyond the static guard.
Findings: Pass.
📡 MCP-Tool-Description Budget Audit
For every modified or added OpenAPI tool description:
- Single-line preferred — block-literal (
|) descriptions justified by content, not authorial habit - No internal cross-refs (no ticket numbers, Phase sequencing, session IDs, or memory anchor names in the description payload)
- No architectural narrative — descriptions describe call-site usage (what + when-to-use + when-not-to-use)
- External standard URLs OK — citing canonical specs is acceptable
- 1024-char hard cap respected
Findings: N/A — no OpenAPI tool surface touched.
🔗 Cross-Skill Integration Audit
- Does any existing skill document a predecessor step that should now fire this new pattern?
- Does
AGENTS_STARTUP.md§9 Workflow skills list need updating? - Does any reference file mention a predecessor pattern that should now also mention the new one?
- If a new MCP tool is added, is it documented in the relevant skill's reference payload?
- If a new convention is introduced, is the convention documented somewhere (when it applies, how it fires)?
Findings: All checks pass — this is a mechanical lint-staged guard for an existing rule, not a new turn-loaded workflow convention. The PR's post-merge validation correctly leaves MEMORY.md compression as a follow-up after the guard proves out.
🧪 Test-Execution & Location Audit
- Branch checked out locally:
/private/tmp/neo-pr-12295-reviewat exact headcb1bf44498063bec010401fd1cc0382091c57938. - Canonical Location: build-script tests belong under
test/playwright/unit/ai/buildScripts/per unit-test guidance. - If a test file changed: ran the specific test file.
- If code changed: verified related tests, syntax checks, and CI.
Findings: Tests pass. Local evidence:
npm run test-unit -- test/playwright/unit/ai/buildScripts/util/check-ticket-archaeology.spec.mjs→ 7 passed.node ./buildScripts/util/check-ticket-archaeology.mjs buildScripts/util/check-ticket-archaeology.mjs test/playwright/unit/ai/buildScripts/util/check-ticket-archaeology.spec.mjs→ 2 files scanned, 0 violations.node --check buildScripts/util/check-ticket-archaeology.mjspassed.node --check test/playwright/unit/ai/buildScripts/util/check-ticket-archaeology.spec.mjspassed.- GitHub CI green:
unit,integration-unified, CodeQL/Analyze,check-size, and PR-body lint all passed.
📋 Required Actions
No required actions — eligible for human merge.
📊 Evaluation Metrics
[ARCH_ALIGNMENT]: 92 - 8 points deducted because the scanner is intentionally lightweight rather than a full parser, but that matches the staged guard scope and existing build-script pattern.[CONTENT_COMPLETENESS]: 94 - 6 points deducted because the PR body covers scope, deltas, evidence, and follow-ups; the only minor deduction is the absence of a formal ledger table, acceptable for this narrow guard ticket with explicit ACs.[EXECUTION_QUALITY]: 91 - 9 points deducted because tests and CI are green and the self-scan passes; the remaining edge is the acknowledged multi-line template literal limitation.[PRODUCTIVITY]: 95 - 5 points deducted because it fully addresses the.mjsstaged guard ACs while correctly deferring broader docs/CI scanning.[IMPACT]: 70 - 30 points deducted because this is not a runtime architecture change, but it meaningfully reduces recurring substrate/comment drift.[COMPLEXITY]: 48 - Moderate: a custom string/comment scanner plus lint-staged wiring, but only three files and a compact behavioral surface.[EFFORT_PROFILE]: Quick Win - High workflow value for a contained build-script/test change.
Approved. Human merge only; I am not executing merge.
Resolves #12294
Authored by Opus 4.8 (Claude Code). Session 758163a2-3619-4110-8364-44250500595f.
FAIR-band: in-band [8/30]
Evidence: L2 (unit-tested — 7 passing self-tests covering flag / string-exempt / escape / named-forms / hex-non-false-positive / block-close; the guard self-applies cleanly to its own two .mjs files). Residual: none — the guard is a static line scanner fully covered by the spec.
What this delivers
Turns the recurring "no decay-prone ticket/Epic/Discussion/ADR refs in durable .mjs comments/JSDoc" discipline into a mechanical pre-commit gate. The discipline has recurred repeatedly despite living in agent memory, because it relies on the author remembering + judging at every comment — and
AGENTS.md §self_evolving_systemsis explicit that a mechanical guard beats discipline-only. This is the §friction_to_gold response: a repeat discipline-slip is a substrate signal for a guard, not another reminder.buildScripts/util/check-ticket-archaeology.mjs— mirrorscheck-shorthand.mjs: takes staged[files...](or a default-dir scan), exits non-zero on violations.describe(...)test titles, issue-endpoint URLs — stay exempt.ticket-ref-okmarker exempts a genuinely load-bearing line (judgment relief valve, not a blanket bypass).lint-stagedwiring (*.mjs, alongsidecheck-shorthand): staged-files scan → incremental adoption (a file is only checked when touched; no big-bang repo cleanup required).Deltas
.mjscomments for v1 (the highest-signal, clearest-rule surface where the slip recurs)..md/learn/+ Dockerfile/compose scanning and a repo-wide CI gate are deliberate follow-ups (Out of Scope on the ticket) — they carry more legit-ref edge cases and need a pre-existing-violation sweep first.Test Evidence
test/playwright/unit/ai/buildScripts/util/check-ticket-archaeology.spec.mjs) — 7 passing (656ms): JSDoc-block ref flagged; full-line + trailing//refs flagged; string-literal ref (describe(...)anchor + issue URL) NOT flagged;ticket-ref-okescape honored; Epic / Discussion / ADR prose forms flagged; hex-with-letters color + spaced markdown heading NOT flagged; block-comment state closes.0 violations.node --checkpasses;git diff --cached --checkclean.Post-Merge Validation
.mjscommit that introduces a#NNNNin a comment, the pre-commit gate blocks it with the remediation hint.jsdoc_archaeology_self_auditentry (discipline → mechanism) and consider the.md/CI-gate extensions.