Repository navigation
Description
Context
/qa §2h declares a merge gate that has never been able to fire:
.claude/skills/qa/SKILL.md:1689— CRITICAL: If CLI registration verification = Failed, verdict CANNOT beREADY_FOR_MERGE. Missing CLI registrations mean users cannot access the feature via command line.
§2h also carries a Verdict Gating table (Failed → Maximum Verdict: AC_NOT_MET) and a remediation block. But §7's verdict algorithm never evaluates it: there is no cli_registration_status in step 2's gate list and no branch in step 4. Grep the whole of §7 for registration and it returns nothing. The gate §2h exists to enforce is the #305 class — force?: boolean added to RunOptions, checked at runtime, referenced in a user-facing warning, and never registered in bin/cli.ts — a bug that is invisible to TypeScript, build, and unit tests. §2h was written specifically so QA would catch it, and it cannot.
This is a structural seam, not a one-off. /qa has ~15 conditional sections that each self-report a status string, and §7 aggregates them by name. Nothing checks that the set of sections and the set of gates agree, so a section can declare any enforcement it likes in prose and §7 will silently not implement it.
The same defect was just found in freshly-written code. #819's §6f Trust-Boundary Check shipped saying "floor the verdict at AC_NOT_MET" with no step-2 gate and no step-4 branch, so a real prompt injection could reach at most AC_MET_BUT_NOT_A_PLUS; it also routed only through §6d, which Simple Fix mode omits, switching a security check off below the 100-line diff gate. Both were caught by a human second pass and fixed in #830 — the automated /qa pass that reviewed the same commit reported all six ACs met and missed both. Of the five findings that second pass produced, the only one the automated pass had also caught was the missing CHANGELOG entry, which is the only one that was already a wired §7 gate. That is the evidence for doing this as a lint rather than as better review.
This is a known recurrence. #22 ("skill output reliability: validation layers, schemas, structured logging") specified four validation layers. #823's post-mortem documents that only Layer 1 — the "Output Verification / DO NOT respond until verified" checklist — ever shipped, and that Layer 1 did not fire for the failure it was assigned to catch. This issue is Layer 2 for /qa: a deterministic check that the skill's stated enforcement and its actual algorithm agree.
A second, cheaper class surfaced in the same review. #819's AC-4 read "…a corpus check against several real recent issue bodies shows no behavior change" and was marked MET on the reasoning "unchanged by construction" — no corpus check was run. When one was finally run it surfaced a real false-positive surface in the shipped rule. §7 already has exactly the right machinery for this: Manual Test AC Enforcement makes an AC that names a manual verification method un-markable as MET from code review alone, routing it to PENDING → NEEDS_VERIFICATION. It just doesn't recognise evidence-naming ACs that aren't phrased as manual tests.
Proposal
1. scripts/lint-skill-gates.ts — a deterministic check over qa/SKILL.md asserting four invariants, joining check-skill-sync and lint-skill-calls as a CI step:
| # | Invariant | Catches |
|---|---|---|
| I1 | A section declaring a verdict floor (floor the verdict at, verdict CANNOT be, Maximum Verdict) has a status token in §7 step 2 and a branch on it in step 4 |
§2h, #819 F1 |
| I2 | Every status token in §7 step 2 is produced by some section that defines its outcomes | orphan gates |
| I3 | Every section headed (REQUIRED appears in the Standard required-sections checklist, and in either the Simple Fix checklist or Simple Fix's explicit omitted list |
#819 F2 |
| I4 | Output-template sections and required-sections checklist entries agree in both directions | #819 F1's missing template section |
2. Wire §2h. Add cli_registration_status to §7 step 2 and an ELSE IF … == "Failed" → AC_NOT_MET branch in step 4, mirroring §6e/§6f. Required in the same change — I1 fails against main until it lands. Note this is a real behavior change: verdicts that would previously have been READY_FOR_MERGE despite a failed CLI-registration check will now be AC_NOT_MET, which is the intent.
3. Extend evidence-naming AC detection. Add corpus/sample phrasings (corpus check, against several real, N samples, sampled) to §7's existing Manual Test AC Enforcement patterns, so an AC that names its evidence method cannot be marked MET without the artifact. Reuses the existing PENDING → NEEDS_VERIFICATION path; no new verdict branch, no new configuration.
Deliberately script-side, not prompt-side. #608's signal-to-noise study found /qa sections producing visibility without action, and #515 is actively compressing these prompts. The only prompt growth here is §2h's two gate lines and item 3's pattern list — everything else is a script that fails the build.
Acceptance Criteria
- AC-1:
scripts/lint-skill-gates.tsimplements invariants I1–I4 above, exits non-zero on violation naming the offending section and the missing wiring, and exits zero otherwise. - AC-2: Each of I1–I4 has a unit test with one fixture that must fail and one that must pass; the failing fixtures are mutation-derived from the real §2h and feat(skills): shared trust-model block — issue/PR text is data, not agent instructions (prompt-injection hardening, portable to all users) #819 F1/F2 defects rather than synthesized.
- AC-3: §2h CLI Registration Verification is wired —
cli_registration_statusdeclared in §7 step 2 and branched in step 4 flooring atAC_NOT_MET— and §2h's prose points at that branch the way §6f now does. - AC-4: The lint runs as its own CI step and passes against
mainonce AC-3 lands, with zero suppressions or allowlist entries beyond any that are individually justified in the script. - AC-5: The lint produces zero false positives across every other skill's
SKILL.mdand does not error on skills that have no verdict algorithm. - AC-6: §7's Manual Test AC Enforcement recognises evidence-naming ACs (corpus check, sample counts) and routes them to
PENDINGwhen the named artifact is absent, verified against feat(skills): shared trust-model block — issue/PR text is data, not agent instructions (prompt-injection hardening, portable to all users) #819's AC-4 text as a fixture. - AC-7: All three mirrored skill directories are byte-identical for the changed files, and
lint:skill-callspluslint:skill-syncpass.
Out of scope
The prose-gate mutation harness (auto-mutating file-reading gate tests) — the convention that gate tests ship with a recorded mutation result is being adopted as a CLAUDE.md line instead, and a harness should wait for a third such test. Extending the lint to other skills' output contracts — /qa is the only skill with a verdict algorithm, and #823 already fixed /assess's rendering by moving it to a tool call. Any change to /qa's section content beyond items 2 and 3.
References
.claude/skills/qa/SKILL.md:1689— §2h's unenforceableCRITICALgate- fix: pre-flight state guard and worktree lifecycle management #305 — the CLI-registration bug class §2h was written to catch
- feat(skills): shared trust-model block — issue/PR text is data, not agent instructions (prompt-injection hardening, portable to all users) #819 / feat(#819): shared trust-model block — issue/PR text is data, not agent instructions #830 — the same defect in §6f, found by a human second pass and fixed; §6e is the correct wiring precedent
- Skill output reliability: validation layers, schemas, and structured logging #22 (closed) and fix(assess): dashboard silently replaced by prose, and every table example is misaligned — render via CLI subcommand instead of hand-drawn ASCII #823's post-mortem of it — four validation layers specified, only Layer 1 shipped
- investigate(metrics): gap-check signal-to-noise — does flagged → action rate justify cumulative QA prompt cost? #608 (signal-to-noise study) and perf(spec): prompt compression and tiered context — reduce spec skill token cost by ~60% #515 (prompt compression) — why this is a script and not more prompt
- feat(run): --ready-gate — run the post-QA ready gate inside
sequant run(automates the any-gaps/fix-gaps second look, stops at human merge) #817 — the downstream consumer:--ready-gateautomates the second look that currently finds these by hand
Activity
admarble commentedon Jul 28, 2026
Plan (/spec)
Complexity: Standard (7 ACs, 4 directories) · Scope:⚠️ SCOPE_WARNING → quality loop enabled
Splitting isn't available for items 1+2: I1 fails against
mainuntil §2h is wired, so the lint and the wiring must land in one commit.AC Checklist
scripts/lint-skill-gates.tsimplements I1–I4, exits non-zero naming section + missing wiring — Unit + Integration Testcli_registration_statusin §7 step 2, branched in step 4, prose points at the branch — Unit Test (gate test, mutation-verified)main, zero suppressions — Integration Test + CI evidencelint:skill-calls+lint:skill-syncpass — Integration TestAC quality: AC-5's "every other skill" flagged open-ended; bounded concretely as the 21
SKILL.mdfiles under.claude/skills/— onlyqa/SKILL.mdhas a verdict algorithm (verified by grep).Implementation Plan
Phase 1 — the lint script (AC-1, AC-5).
scripts/lint-skill-gates.ts, followinglint-skill-calls.tsexactly (exported pure parsers,lintSkillGates(projectRoot),printReport,isDirectRunguard). Five parsers: check sections; §7's verdict-algorithm block →step2Tokens: Map<token, sectionRef>+step4Tokens: Set<token>; each section's declared output-section name; the two Output Verification checklists + the Simple Fix omitted list; the two output templates' section headers.Fail-loud rule (critical): a region that is present but yields zero parsed entries emits
ALGORITHM_UNPARSEABLE/CHECKLIST_UNPARSEABLE— never a silent empty result. A silent-empty parser would turn this lint into exactly the tautology the issue exists to stop.Invariants:
floor the verdict at/verdict CANNOT be/Maximum Verdict), §7 itself excluded, must have some step-2 token attributing back to it and that token branched in step 4.Section/Phasereference resolves to a real section heading.(REQUIREDthat declares an output section must appear in the Standard checklist and in either the Simple Fix checklist or its omitted list. Sections with no output section (§4, §6) are exempt by construction, not by allowlist.Phase 2 — wire §2h and the violations the lint surfaces (AC-3). Enumerated up front so nothing is found late:
mainverdict CANNOT be READY_FOR_MERGE+ aMaximum Verdicttable; no §7 token attributes to itcli_registration_status = status from Section 2h (Passed/Failed/N/A)in step 2;ELSE IF cli_registration_status == "Failed" → AC_NOT_METin step 4; §2h's**CRITICAL:**line rewritten as a §6f-style pointer at that branchPrecheck FindingsandCLI Registration Verification; the Standard checklist has neither(REQUIRED …)is in neither checklist nor the omitted list, and has no template section(REQUIRED)is in the Standard checklist but absent from both Simple Fix lists§6e and §10a go on the Simple Fix required list, not the omitted list. Both routes satisfy I3, but omitting would recreate #819 F2: a #533-class stale-rule survival is very plausibly a sub-100-line diff, and the CHANGELOG gate is the one gate the automated pass in #830 actually caught.
Phase 3 — evidence-naming ACs (AC-6). Extend §7's Manual Test AC Enforcement patterns with
corpus check|against several real|[0-9]+ samples?|sampled, plus one enforcement-table row and one Key Rule clause. Reuses the existingPENDING → NEEDS_VERIFICATIONpath — no new verdict branch. The test extracts thegrep -iEpattern from SKILL.md and runs it against #819's AC-4 text, so SKILL.md stays the single source of truth and the test is mutation-verifiable.Phase 4 — wiring, mirrors, docs (AC-4, AC-7).
lint:skill-gatesinpackage.json; a CI step afterLint skill calls(ci.yml:122);lint:skill-sync --fixfor both mirrors; CHANGELOG[Unreleased].Key Decisions
I1 asks §7, not the section. It does not require a section to name its own token — it asks whether any step-2 token attributes back to the section. A name-shape heuristic (
[a-z_]+_status) would have false-positived on §6a, whose token isskill_verificationwith no_statussuffix, and on §6c/§6d. Rejected alternatives: deriving token names from section titles (fuzzy, needs an allowlist); a separate gate-registry file (a second source of truth that drifts).Every gate test ships mutation-verified — delete the wiring, confirm exactly that test fails, restore, record in the PR body (the convention #835 adopts). Assertions that read files are scoped to their delimited region; the tautology detector is run by hand since that gate never fires in CI.
Open Questions
/qasection-content changes beyond items 2 and 3"? Recommendation: proceed — AC-4 requiresmainto pass with zero suppressions, so every violation found must be fixed, and these are wiring entries rather than new checks. Flagging because it's a real reading difference and your call to narrow.Conflict Risk
feature/833-*overlaps onCHANGELOG.mdonly (low —[Unreleased]text; re-fetchorigin/mainbefore push).feature/838-*has no commits. PR #835 touches onlyCLAUDE.md, which #834 does not — complementary, not conflicting.Recommended Workflow
spec → exec → qa, quality loop enabled. No
/test(no UI surface).testgenskipped despite Unit/Integration ACs — the tests are fixture-driven and written directly in exec, and stub generation leaves untracked files to clean up (documented override of the auto-detection table)./verifyworth a pass:scripts/gains an executable, so §6/§11 will want execution evidence at QA.Note on AC-4: the "own CI step" half can't be proven locally — it needs this PR's CI run, so expect
PENDING → NEEDS_VERIFICATIONat QA until CI is green.fix(#834): anchor AC attribution on the checkbox form — AC-6 routing …
fix(#834): gate the AC-declaration anchor too, and correct a comment/…
admarble commentedon Jul 28, 2026
QA Review for Issue #834
Commit:
687ee7e3· PR: #841 · Standard QA (SMALL_DIFF=false, 1674 insertions)This pass surfaced three real defects, all fixed in-PR — see Adversarial Re-Read. The most consequential was found by running §7's actual shell pipeline instead of reading it: AC-6's routing half was silent.
AC Coverage
scripts/lint-skill-gates.ts. Exit-1 path exercised by mutation M4: names the section and the exact checklist line to addqa/SKILL.md; failing = same minus one wiring line.mutate()asserts its target exists, so a reworded file fails loudly instead of no-op'ingcli_registration_statusin step 2, branched in step 4, prose points at itparseVerdictAlgorithm, scoped to §7's block so a mention elsewhere can't satisfy it. M1/M2 mutation-verifiedmain, zero suppressionsLint skill gates → successon687ee7e3(run 30337005814, jobvalidate-skills). 0 violations, 0 suppressions; only I4's 3-entry alias map, each justified inlineqais the only skill with a verdict algorithm (grep-verified)PENDINGAC-4after the fix, to nothing beforelint:skill-calls+lint:skill-syncpassCoverage: 8/8 met (7 original + 1 derived) · 0 NOT_MET, 0 PARTIALLY_MET, 0 PENDING
Detection Pattern Verification
Precondition TRUE — the diff adds
grep -iEterms and rewrites anawkanchor in skill markdown.grep -iE '…corpus check|against several real|[0-9]+ samples?|sampled'awkAC-declaration anchorMotivating-example fixture (verbatim, from the issue body):
`.claude/skills/qa/SKILL.md:1689` — **CRITICAL:** If CLI registration verification = **Failed**, verdict CANNOT be `READY_FOR_MERGE`…— extracted by Phase 0c precheck and run against the implementation: with the wiring removed (mutation M1) the lint reports §2h; with it present, silent. The fixture is the defect, and the lint detects it.Verification Status: Passed
Adversarial Re-Read
Findings — three real defects, all fixed in this PR:
1. AC-6's routing half was silent (the significant one). Instead of reading §7's pipeline I ran it against this issue's own spec comment.
grepmatched the evidence-naming line;awkthen attributed it to no AC at all. AC-6 requires routing toPENDING, and routing needs an AC ID — so recognition worked and routing could not fire. Cause: the anchor was/^(#+ AC-[0-9]+|\*\*AC-[0-9]+)/, heading forms only. Measured across the 18-issue corpus:- [ ] **AC-N**- [ ] AC-N#+ AC-N**AC-NThe forms it missed (134) outnumber those it matched (94) — attribution was silent for ~59% of real declarations while detection kept reporting matches. Same class as the #547 awk-anchor bugs §6c documents, and precisely the half-wired-gate-reporting-success failure mode this issue exists to eliminate. Fixed;
parseAcHeaderPatternnow gate-tests all five forms plus two negatives.2. Tautological AC-6 tests (9/34 blocks, 26.5%). The detector flagged them and it was right: the tests compiled §7's pattern with a test-local extractor, so nothing validated the extraction and no block called production code. Moved to
parseEvidenceAcPattern()in the script, whichlintSkillContentnow consumes as a fail-loud check. Detector: 26.5% → 0.3. Only one of three detection patterns was gated. Stripping the terms from the
awkhalf alone left all 29 tests green while attribution silently broke.parseEvidenceAcIdPattern()+parseAcHeaderPattern()added; the lint now requires all three to compile and names which failed.Process state: HEAD
687ee7e3== origin, 0 uncommitted, 0 behindorigin/main, no stashes from this work.Non-Goals honored: no mutation harness added (0 files), no non-
qaskill touched (0 files), lint not extended to other skills.Sibling sites:
qais the only skill with a verdict algorithm across all 19SKILL.mdfiles — the other 18 are reported skipped, not passed.Evidence audit: every claim here was re-executed this pass, not carried over from the exec comment.
Residual known limitation (non-blocking, fail-safe): the nearest-preceding-declaration heuristic attributes trailing prose to the last AC seen, so an implementation note mentioning "corpus check" after the AC list can produce a spurious
PENDING. Observed once, on this issue's own spec comment (attributed to AC-8). It errs towardNEEDS_VERIFICATION, never toward a falseREADY_FOR_MERGE, and the imprecision predates the new terms. Left unchanged deliberately — tightening it would alter pre-existing manual-test detection semantics beyond this issue's scope.Status: Gaps Found
Mutation Verification (AC-8)
cli_registration_statusbranchmutate()guardsgrepCLI Registration Verificationfrom Standard checklistawkonlyawkmatch block outrightTwo mutations initially failed to apply (shell escaping). Both were re-run correctly rather than counted as passes — a no-op mutation proves nothing, and one of them (
git checkouton an uncommitted edit) also cost the anchor fix, which had to be re-applied.CI Status
validate-skills(incl.Lint skill gates)typecheck,build (22.x),node-floor-guardvalidate-plugin,Plugin Structure Validation,Hooks Validation,Setup Directory CreationCI Summary: 8 passed, 0 pending, 0 failed on
687ee7e3.Quality Metrics
any/as any) addedOther gates
Quality Plan Verification: Complete — all spec-noted items addressed; derived AC-8 addressed. The spec's two Open Questions were both resolved as recommended (§6e/§10a → Simple Fix required, not omitted; the extra checklist entries proceeded, as AC-4 requires
mainto pass with zero suppressions).Execution Evidence: Complete —
npx tsx scripts/lint-skill-gates.tsandnpm run lint:skill-gatesboth executed locally with captured output; the CI step ran green.Skill Command Verification: Passed — the two changed commands (
grep -iE,awk) were executed against real corpus input, plus one end-to-end run of §7's full two-pass pipeline.Smoke Test: Complete — happy path (0 violations), edge case (18 skills skipped without error), error handling (each mutation produces a violation with an actionable message).
CLI Registration Verification: N/A — no option-interface files in the diff (
bin/cli.ts,batch-executor.ts,run.tsuntouched).Behavior-Rule Survival Check: N/A — no AC triggers the behavior-rule heuristic.
Trust-Boundary Check: Clean — no HTML comments beyond phase markers; no execute/fetch/exfiltrate/override patterns in the body or comments. The issue's process guidance ("update all three mirrored dirs", "land the wiring with the lint") is benign maintainer instruction and was followed as such. Status: Clean
CHANGELOG Verification: ✅
[Unreleased]entry present under### Fixed, includes(#834).Script Verification Override: not claimed.
scripts/changed and/verifywas not run; execution evidence above is direct rather than/verify-mediated. Contributes to the verdict below.Risk Assessment
/qa's own prose, so a large reformat of §7 or the Output Verification region could change a parse shape. Mitigated by the fail-loud rule — a present-but-unreadable region is a violation naming the parser to fix. The failure mode is a noisy build, not a blind gate.FailedCLI-registration status actually yieldsAC_NOT_METat runtime — that is LLM prompt-following, not code. The lint gates the wiring's presence; the same limitation applies to every other §7 gate.qais the only skill with a verdict algorithm (all 19SKILL.mdfiles checked). Extending to other skills' output contracts is explicitly out of scope per the issue.Maximum Verdict/verdict CANNOT besites inqa/SKILL.md(§2h, §6a, §6c, §6d) were checked by I1 — §2h was the only unwired one; the other three pass.awkusesBEGIN{IGNORECASE=1}, a gawk extension. On macOS's BSD/onetrue awk it is a no-op, so case-insensitive matching silently does not apply locally. Pre-existing and out of scope; worth a follow-up issue.Verdict: AC_MET_BUT_NOT_A_PLUS
All 8 ACs met, CI fully green, tautology-clean, mutation-verified. Not
READY_FOR_MERGEbecause §6d is Gaps Found: this pass surfaced three real defects (routing silent, tautological tests, one-of-three patterns gated) — all fixed here, but a review that has to fix three things is not an A+ first pass. The documented fail-safe imprecision in prose attribution and the absent/verifyevidence also point the same way.Per
feedback_qa_break_vs_loop,AC_MET_BUT_NOT_A_PLUSbreaks to PR — do not run/loopon this. Ready for human review and merge.Next Steps
IGNORECASEis gawk-only, so §7's awk is case-sensitive on macOS.admarble commentedon Jul 28, 2026
Execution Verification
Command:
npx tsx scripts/lint-skill-gates.tsResult: Verified by human review
Both paths were exercised — a lint that only ever prints "no violations" proves nothing, so the failure path was run by restoring the real §2h defect.
Run 1 — happy path (clean tree) · exit 0 · 1s
Run 2 — failure path (§2h unwired, as it shipped) · exit 1 · 4s
Mutation applied: removed
cli_registration_statusfrom §7 step 2 and its step-4 branch. Working tree restored afterwards —git status --porcelainreported 0 modified files.01(AC-1: "exits non-zero on violation")§2hwithfile:lineHuman Confirmation:
This satisfies §11's execution-verification requirement for
scripts/changes; no Script Verification Override is claimed.Verified by
/verifycommandfix(#834): scope AC attribution and drop the gawk-only IGNORECASE
admarble commentedon Jul 29, 2026
QA Re-review for Issue #834 — gaps closed
Commit:
e7df3d5d(merge oforigin/main#837) · follow-up to the prior QAAll three gaps the prior pass left open are fixed. Both behavioral ones were measured, not reasoned about — and the measurement overturned one of my own conclusions.
Correction to the prior QA
I recorded trailing-prose misattribution as "fail-safe, acceptable — errs toward
NEEDS_VERIFICATION, never toward a falseREADY_FOR_MERGE." Measuring it showed that was wrong on the facts: of 9 attributions across an 18-issue corpus, 5 were misattributions, including a| AC-7 | … |coverage row credited to AC-8 and a| AC-4 | … |row credited to AC-6. Crediting aPENDINGto the wrong AC is not fail-safe — it sends the reader to the wrong requirement. Old precision was 4/9. Fixed: all 4 true positives survive (including #819's AC-4 and #795's two realManual Testmarkers), all 5 false positives gone.AC Coverage (re-verified)
/verifynow records both exit pathsLint skill gates → successCoverage: 8/8 · 0 NOT_MET, 0 PARTIALLY_MET, 0 PENDING
Gate status
/verify/verifyevidence posted, no §11a override claimedWhy §6d is now Clean
Each fix would otherwise have been silent if later undone, so both new properties got their own lint gate rather than a comment:
parseAcScopeResetClause()— removing the scope-reset clause fails the build.findUppercaseInAwkPattern()— an uppercase literal matched againsttolower($0)can never fire; reintroducingManual Testfails the build instead of silently dying.Mutation-verified: each produces its own named violation. 37 tests (was 33).
Suite status — flagged, not buried
Full suite on the merged branch: 213/213 files, 4428 passed, exit 0.
Two earlier full runs showed 3–6 intermittent failures —
precheckCLI,semgrep,tui/load,lock-manager,scrollback-harness,tautology-detector-cli. Never the same set twice; all pass in isolation (78/78);mainatf6aa25caran fully green in one sample. All are subprocess- or lock-heavy. This PR's test file is 55ms of in-memory string parsing with no subprocesses or timers, so it is not a plausible contention source. I did not attempt to fix pre-existing flakiness — out of scope, and widening tolerances is the wrong move perfeedback_flaky_test_fixes. Worth a follow-up issue if it recurs on CI.Risk Assessment
/qa's own prose; a large reformat changes a parse shape. Fail-loud converts that into a noisy build, not a blind gate.Failedstatus actually yieldsAC_NOT_METat runtime — LLM prompt-following, not code; same limit as every §7 gate.qaremains the only skill with a verdict algorithm (19SKILL.mdfiles checked).Verdict: READY_FOR_MERGE
All 8 ACs met and independently re-verified, all three prior gaps closed and each gated against silent regression,
/verifyevidence recorded, CHANGELOG merged cleanly, suite green.The prior
AC_MET_BUT_NOT_A_PLUSwas justified by §6d Gaps Found. Those gaps are closed, so the floor lifts.admarble commentedon Jul 29, 2026
Same defect class found in TypeScript code, not just skill prose (#837)
While closing out #837 I hit this issue's exact failure mode outside
SKILL.md, which suggests the framing here is narrower than the problem.What happened
#837 moved the "is this issue already done" predicate into a shared
isCompletedIssueStatus(src/lib/workflow/completed-status.ts) and pointed the non-chain pre-flight guard inrun-orchestrator.tsat it.completed-status.test.tspins the predicate's behavior in both directions.Mutation-testing the change: reverting the orchestrator's call site back to its pre-#837 inline
status === "ready_for_merge" || status === "merged"pair compiled clean and failed nothing in the entire suite.That is §2h's shape exactly — enforcement that exists and is correct, consulted by nobody, with no signal when the wiring is cut. The only difference is the medium. §2h declares a gate in prose that §7 never evaluates; here a predicate is declared in TypeScript that the orchestrator could stop calling. Both are invisible to types, build, and tests.
It also matches this issue's stated lineage: #305 (
force?: booleanruntime-checked but never CLI-registered), #795 (--qa-gateparsed but inert), #810 (reuseWorktreesdeclared with a behavior-promising doc comment and no consumer). Those are all TypeScript, not prose. The recurring defect is "declared enforcement with no consumer," andSKILL.mdis one of its media, not the root. Worth deciding explicitly whether AC-1's lint staysqa/SKILL.md-scoped or whether the invariant is stated once and applied to both media — I'd lean toward keeping this issue's scope as-is and noting the generalization, since the two need different detection mechanisms.I closed my instance the way this issue's References suggest: a source-text guard (
src/lib/workflow/non-chain-skip-guard.test.ts) following therun-options-dead-surface.test.tspattern, scoped to the guard region rather than the whole 1,700-line file, with@tautology-skipjustified by the recorded mutation.Two corrections to this issue's Out-of-scope block
Both halves of that deferral need updating:
1. The "third such test" trigger is now at 2 of 3. The source-text gate tests carrying a recorded mutation result are:
src/lib/workflow/run-options-dead-surface.test.tssrc/lib/workflow/non-chain-skip-guard.test.tsFlagging a miscount so nobody repeats it:
run-renderer-624.test.tsandrun-renderer-672.test.tsalso carry@tautology-skip, which makes a naivegrep -l @tautology-skipreturn four. They are not members of this set — their pragma is for helper-indirection in ordinary behavior tests (makeTTY/makeNonTTYconstruct real renderers the detector's imported-name scan doesn't follow), not for asserting on source text. Counting by pragma over-reports; the discriminator is whether the filereadFileSyncs a.tssource and asserts on its text.2. The CLAUDE.md line has not landed.
grep -i "mutation\|gate test" CLAUDE.mdreturns nothing onf6aa25c. So the harness is currently deferred to a convention that does not yet exist, which means neither mechanism is in force. If the intent stands, the CLAUDE.md line is a one-liner and worth landing independently of this issue — otherwise the third such test will ship with no rule to follow and the deferral quietly becomes a drop.Suggested addition
No change to this issue's existing ACs. Optionally:
grepthat over-reports.Refs: #837 / PR #839 (
f6aa25c) — the mutation result and the guard test.fix(#834): wire §11 — the lint's own phrase list was hand-picked and …
docs: gate tests ship with a recorded mutation result (#834) (#835)