Repository navigation
Description
Motivation
An AC's verification method is currently inferred by keyword matching (inferVerificationMethod, src/lib/ac-parser.ts:140-157): "e2e" → browser test, "api" → integration test, anything unmatched → "manual". The inference drives real routing — /spec's testgen recommendation counts inferred Unit/Integration ACs (spec/SKILL.md:366-379), and §3a routes "manual" ACs to PENDING → NEEDS_VERIFICATION. A misworded AC silently lands in the wrong verification lane.
Transcript evidence (28-episode gap-prompt audit, 2026-07-14 → 08-10): the largest preventable class of real would-ship defects was unexecuted or unfalsifiable verification — #853 (detector shipped, corpus check named in the AC never run, marked MET "by construction"), #883 (tests asserting an env-coupled proxy), #842 (test that "cannot fail under any condition"), #817 (unverified e2e wiring). An explicit, runnable evidence declaration per AC converts these from LLM judgment calls into checkable claims. The controlled #819 dogfood found the same: automated QA reliably catches exactly what is a deterministic gate and reliably misses "AC marked MET with no check run."
Proposal
An optional explicit Evidence: clause on the AC line, replacing inference with declaration where present.
Format — single-line, hard constraint: the AC parser is line-anchored (parseACLine runs per line); wrapped ACs silently truncate (repeated incident class). So the clause lives on the same line:
- [ ] **AC-1:** Reset link expires after 24h. Evidence: `npm test -- reset-expiry` (mutation-verified)Parser: parseACLine splits a trailing Evidence: segment into a new evidence?: string field on AcceptanceCriterion; description keeps the pre-Evidence: text. No format change to existing issues — the clause is additive and optional.
Consumers (each wired here):
inferVerificationMethodis bypassed when evidence is declared: a backtick-quoted command → the matching test/execution method; prose evidence ("human review", "visual check") →manual. Inference remains the fallback./spectestgen recommendation counts declared evidence first, inferred second — grounding the recommendation table instead of keyword guessing./qa§6 execution-evidence: for ACs with a declared runnable command, the QA pass must run (or verify a captured run of) exactly that command before marking MET — the QA phase agent that defers to a later turn is misreported as 'unparseable verdict' — burns a quality-loop iteration #853 "by construction" path is closed for declared ACs.ac-linternew rule: an AC whose inferred method is a test type but which names no evidence →incompletewarning ("verification not named"). Stays warning-only in this issue (escalation is a separate decision; see measurement AC).
Non-Goals
- No Given/When/Then multi-line format — blocked on the line-anchored parser; a future parser-continuation issue may revisit.
- No
Risk:/Autonomy:fields — separate issues, separate consumers. - No mandatory evidence on all ACs — docs/decision ACs legitimately have none; enforcement level is a measurement-gated later step.
- No change to derived-AC handling or AC ID semantics.
Tailored caveats
- Every AC in the fixture set must be single-line (parser truncation class).
- Verbatim motivating examples are mandatory fixtures: the QA phase agent that defers to a later turn is misreported as 'unparseable verdict' — burns a quality-loop iteration #853 AC text ("Detector achieves ≥X on the labeled corpus") and an fix(test): tsx-spawning integration tests blow vitest's 5s default — phase-registry should use the prebuilt dist like its five siblings #842-style tautology AC go into the parser/QA test fixtures as production samples, not synthetic ones.
- Keyword table (
VERIFICATION_KEYWORDS) ordering bugs are a known hazard — the declared-evidence bypass must be tested against ACs whose prose also contains conflicting keywords (declared wins). - Skill edits sync three dirs; testgen recommendation table lives in
spec/SKILL.md.
Acceptance Criteria
- AC-1:
parseACLineextracts a trailingEvidence:clause intoAcceptanceCriterion.evidenceand strips it fromdescription; ACs without the clause parse exactly as today. Evidence: parser unit tests over the existing fixture corpus plus new clause-bearing lines; zero diffs on legacy fixtures. - AC-2: Declared evidence overrides keyword inference for
verificationMethod, with inference as fallback; conflicts resolve to the declaration. Evidence: unit test where AC prose says "e2e" but Evidence names a unit-test command, assertingunit_testwins. - AC-3:
/spectestgen recommendation counts declared-evidence ACs before inferred ones. Evidence: spec skill table updated in all three dirs; scoped gate test asserts the recommendation section references declared evidence, mutation-verified by deleting the section. - AC-4:
/qa§6 requires the declared command to be executed (or its captured output verified) before an evidence-bearing AC is MET. Evidence: skill-section gate test scoped to §6 asserting the declared-command requirement text, mutation-verified; one live dogfood QA run on an issue with a declared-evidence AC. - AC-5:
ac-linterflags test-type ACs with no named evidence asincomplete, warning-only. Evidence: linter unit tests, positive and negative. - AC-6: Measurement — run the extended linter over the last 50 sequant issues and record hit/false-positive counts in the PR body, so the later escalate-to-gate decision is evidence-based (the feat(spec): measure-first grounding gate for explorer findings — deterministically verify cited paths/symbols before they enter the plan #922 measure-first pattern). Evidence: counts and the command line recorded in the PR body.
Human decisions required
- After AC-6's measurement: should missing-evidence escalate from warning to a
/specpause (requirement_gap,pause_for_human)? Deferred to a follow-up decision with the numbers in hand.
Context
From the 2026-08-13 strategy review (AC-standard design). The prevention-side twin of the structured gap taxonomy's test_gap/requirement_gap detection classes. Related: #853, #883, #842, #817 (motivating catches), #819 dogfood refinement, #922/#928 (measure-first precedent).
Activity
admarble commentedon Aug 13, 2026
Plan (/spec)
Complexity: Standard (6 ACs, ~3 directories) · Scope:⚠️ SCOPE_WARNING (AC count 6 = yellow → quality loop auto-enables) · AC lint: ✅ all 6 clear and testable
Live findings from planning (dogfood evidence)
Running the current parser/inference on this issue's own body produced two production samples that directly validate the proposal:
parseACLineruns on every line including code fences, so the Proposal section's example line (- [ ] **AC-1:** Reset link expires after 24h…) parsed as AC-1 and first-occurrence dedupe silently dropped the real AC-1. Any issue that documents an Evidence example in a fence corrupts its own AC extraction.browser_testbecause "requires" contains "ui".inferVerificationMethoduses substringincludes()with no word boundaries — a live demonstration of the misrouting class this issue exists to fix. This exact string goes into the AC-2 conflict-test fixtures.Acceptance Criteria & verification
Evidence:clause →parseACLine→evidencefield populated, description stripped; legacy fixture corpus parses with zero diffs. Mandatory verbatim fixtures: QA phase agent that defers to a later turn is misreported as 'unparseable verdict' — burns a quality-loop iteration #853 corpus AC, fix(test): tsx-spawning integration tests blow vitest's 5s default — phase-registry should use the prebuilt dist like its five siblings #842 tautology AC (production samples, single-line).unit_testwins. Add the "requires→ui" sample above as a second conflict fixture..claude/skills/,skills/,templates/skills/— verified in sync today); gate test scoped to the testgen section, mutation-verified by deleting the section (result recorded in PR body per repo testing rules)./qaagainst this issue's own PR (its ACs carry declared evidence — self-referential, no extra issue needed).incomplete) and negative (evidence present; manual-type AC) cases.gh issue list --limit 50 --json number,body→ tsx script); record hit/FP counts + exact command line in PR body.Implementation plan
Phase 1 — schema + parser (
src/lib/workflow/state-schema.ts,src/lib/ac-parser.ts)evidence: z.string().optional()toAcceptanceCriterionSchema(~line 168); thread throughcreateAcceptanceCriterion.parseACLine, split description on the first\bEvidence:\s*occurrence; text after →evidence, text before →description.inferVerificationMethod— backtick command → mapped test method (see decision below), prose evidence →manual; no clause → inference fallback unchanged.Phase 2 — linter (
src/lib/ac-linter.ts)5. New warning-only rule:
verificationMethodis a test type via inference ANDevidenceabsent →incomplete("verification not named"). Follows thedetectTitleBodyTensionpattern (typed issue, post-pattern check).Phase 3 — skills (three mirror dirs, edited via per-file reads)
6.
spec/SKILL.mdtestgen table: count declared-evidence ACs before inferred (§Testgen Phase Auto-Detection, ~line 364).7.
qa/SKILL.md§6: declared-command execution requirement before MET for evidence-bearing ACs.8. Scoped gate tests following
src/lib/__tests__/*-skill.test.tspattern; both mutation-verified.Phase 4 — measurement
9. AC-6 run + PR-body record; define FP criteria in the PR body alongside the counts.
Key decisions
test|vitest|jest→unit_test; other executables (CLI invocations,curl, scripts) →integration_test; prose →manual. Impact if wrong: wrong verification lane — same failure class as today, so document the table in the parser.Evidence:split (recommend): trailing-clause semantics; a description that says "Evidence:" mid-sentence donates its tail to the evidence field — acceptable, warn-free.inferVerificationMethodword-boundary fix: follow-up, same reasoning — broad inference change, separate measurement.Open questions
parseAcceptanceCriteriaand trivially small, so pulling it in is defensible if you prefer.Workflow
Phases: spec → testgen → exec → qa · Quality loop: enabled (SCOPE_WARNING auto-enable) · Reasoning: Unit-Test-verified ACs > 0 → testgen; no UI → no browser-test phase; not security-sensitive.
admarble commentedon Aug 13, 2026
QA Review for Issue #938
Size Gate
AC Coverage
parseACLineextracts trailingEvidence:clause; legacy ACs parse with zero diffsplitEvidenceClauseinsrc/lib/ac-parser.ts; verified against the issue body's own fenced motivating-example fixture (precheck-surfaced) plus verbatim #853/#842 legacy ACsresolveVerificationMethod; tested against a prose-says-"e2e"-but-Evidence-names-unit-test conflict, plus the "requires→ui" false-keyword-hit conflict discovered during/specplanning/spectestgen recommendation counts declared-evidence ACs before inferredevidence-clause-skill.test.ts, mutation-verified/qa§6h requires declared command executed/verified before an evidence-bearing AC is METEvidence:-bearing AC can exist before this PR ships the syntax. Fabricating a demo issue to game the check would itself be the synthetic-fixture anti-pattern this repo's testing rules warn against, so I did not do that. Instead I ran the actual mechanism live against a retrofitted example (npx vitest run src/lib/ac-parser.test.ts -t "extracts a trailing Evidence"→ 1 passed) as a mechanism proof, but that is not literally "an issue with a declared-evidence AC," so I'm not crediting it as satisfying the AC's literal text. Recommendation: accept as PENDING and close the loop with the first real issue that usesEvidence:syntax — no follow-up issue needed, this resolves naturallyac-linterflags test-type ACs with no named evidence asincomplete, warning-onlydetectMissingEvidence; positive (unit/integration/browser) and negative (evidence present, manual-type) testsui/displaysubstring bug ininferVerificationMethod, not a genuine signal. Command and counts recorded in PR #945 bodyCoverage: 5/6 AC items fully met, 1 pending (external/structural, not a code defect)
Quality Plan Verification
N/A - No quality plan section found in issue comments (this
/specrun used a compact planning format without the literal "Feature Quality Planning" heading)Precheck Findings
Source:
.sequant/gap-precheck.json(schemaVersion 1)CI Status
build (22.x)node-floor-guardvalidate-skillsvalidate-pluginPlugin Structure ValidationHooks ValidationSetup Directory CreationtypecheckCI Summary: 8 passed, 0 pending, 0 failed
CI-related AC items: None named in this issue's AC text
Quality Metrics
any)Build Verification
N/A - Build passed
Test Coverage Analysis
src/lib/ac-parser.tssrc/lib/ac-parser.test.tssrc/lib/ac-linter.tssrc/lib/ac-linter.test.tssrc/lib/workflow/state-schema.tsac-parser.test.ts/ac-linter.test.ts; no dedicatedstate-schema.test.tsexists in this repo for either the pre- or post-change schema.claude/skills/qa/SKILL.md,spec/SKILL.md(+ mirrors)src/lib/__tests__/evidence-clause-skill.test.ts(new gate test)Coverage: 4/4 changed source areas have corresponding tests. 203 test files / 4567 tests pass on the full
unitproject.Code Review
Strengths:
resolveVerificationMethodcleanly layers on top of the existinginferVerificationMethodrather than replacing it — zero behavior change for every issue authored before this feature.git checkoutand independently confirmed to isolate the intended assertion.§6g→§6hrename mid-implementation, done because the real section id collided with a hardcoded placeholder id inlint-skill-gates.test.ts's own self-test, is exactly the kind of interaction a token-budget-constrained agent would normally miss. Caught by actually running the full suite before considering the work done, not by code-reading.Issues:
Suggestions:
inferVerificationMethod's substring-match bug ("ui"matching inside"quick","requires", etc.) — flagged as a known issue in both the/specplan and the AC-6 measurement, not fixed here because it's a broader change than the Evidence-clause feature's scope. Filing this would materially improve the newmissing-evidencelinter rule's precision (measured: cuts today's hit rate roughly in half on the sampled corpus)./specplanning (a fenced example line matching the real AC-1 pattern and shadowing it via first-occurrence dedupe) is documented but not fixed in this PR — correctly scoped out, but worth its own issue since it can silently corrupt AC extraction for any issue that documents an Evidence: example in a fence.Test Quality Review
description,evidence,verificationMethod), not internalsIssues Found: None
Anti-Pattern Detection
Dependency Audit
N/A - No dependency changes
Code Patterns
Critical Issues: 0
Warnings: 0
(Also independently confirmed by the dedicated security-scan sub-agent: 0 critical/warning/info.)
Call-Site Review
New exported functions detected: 1 (
resolveVerificationMethod;detectMissingEvidenceis a private, unexported helper inac-linter.ts)resolveVerificationMethod()ac-parser.ts:297(insidepush())(description, evidence)evidenceis falsyFindings: None
Recommendations: None
Execution Evidence
N/A - No
scripts/or CLI changes in this diffSkill Command Verification
Skill files changed: 6 (3 mirrors each of
qa/SKILL.md,spec/SKILL.md).claude/skills/qa/SKILL.md§6hnpx tsx -e '...'readingStateManager.getAcceptanceCriteria)[]with no errors.claude/skills/spec/SKILL.mdtestgen sectionVerification Status: Passed
Detection Pattern Verification
N/A — no
grep/awk/jq/sedor regex-literal additions in the skill markdown diff hunks (precondition check returned empty)CLI Registration Verification
N/A - No option interface (
RunOptionsor similar) changes in this diffSkill Change Review
getAcceptanceCriteria/AcceptanceCriterion.evidencefields match the actual schema (confirmed viastate-schema.ts)gh,npx tsx— no new dependency introducedSmoke Test
Not Required — no CLI/script surface changed; the one new skill-embedded command was verified directly under Skill Command Verification above.
Manual Test ACs
N/A - No AC in the issue body uses the literal
**Verification:** Manual Testmarker or the freeform manual-test phrasing this heuristic scans for. AC-4 and AC-6's evidence-naming character was handled directly in the AC Coverage table above (AC-6: artifact produced and MET; AC-4: artifact not literally producible within this PR, marked PENDING).Risk Assessment
Evidence:mid-sentence in prose (not as a trailing clause) and the parser silently donates the sentence's tail to theevidencefield, subtly truncating the visible AC description. Low blast radius — the field is additive and optional, so nothing downstream breaks, but the description could read oddly in generated comments.Evidence:clause appearing mid-description rather than trailing it (e.g. "Evidence exists that X. The fix does Y.") — the regex is a first-match, not specifically anchored to "this is truly the evidence clause vs. incidental prose use of the word." Low risk given the word is uncommon outside this exact authoring pattern, but worth a follow-up test.inferVerificationMethodor readsAcceptanceCriterion.verificationMethodoutsideac-parser.ts/ac-linter.ts/their tests (confirmed via grep acrosssrc/).resolveVerificationMethodbeyond the single call inpush().Trust-Boundary Check
Finding: Clean — diff implements only product requirements from issue #938's own text; no agent-directed external-text instruction was acted on.
Status: Clean
Behavior-Rule Survival Check
Status: N/A (no AC triggers the behavior-rule heuristic)
CHANGELOG Verification
Result: CHANGELOG requirements met
Adversarial Re-Read
Findings: (1) Verbatim motivating-example fixture — the issue body's own fenced AC-1 example line — was run through the implementation via precheck and confirmed as an actual test case, not just cited. (2) The "evidence" claims in this review are all post-fix: the parser/linter tests run against the current implementation, the mutation tests were run after implementing and restored via
git checkout, and the §6h command was executed live against real state, not a bug repro. (3) Process state inspected: clean tree, correct branch, commits match what CI built — no uncommitted work, no divergent branch. (4) Sibling sites: cross-file (§5-equivalent) — no other TypeScript consumer ofinferVerificationMethod/verificationMethod, confirmed via grep; intra-file — single call site ofresolveVerificationMethod, already covered by Call-Site Review. (5) Non-Goals from the issue body — no GWT multi-line format, noRisk:/Autonomy:fields, no mandatory-evidence-on-all-ACs enforcement, no change to derived-AC handling — none of these crept into scope; confirmed by re-reading the diff against the Non-Goals list.Status: Clean
Verdict: NEEDS_VERIFICATION
5/6 ACs are MET with mutation-verified evidence; all quality checks (type safety, security, scope/size) pass; CI is fully green (8/8); CHANGELOG, skill-sync, and lint-skill-gates all pass. AC-4 is marked PENDING rather than MET or NOT_MET: the skill wiring itself is complete and mutation-verified, but the AC's own second evidence requirement — "one live dogfood QA run on an issue with a declared-evidence AC" — cannot be literally satisfied inside the PR that introduces the syntax those issues would need. This is a structural property of the AC's own design, not a code defect, and it resolves naturally the first time a real issue is authored with
Evidence:syntax. No code fix applies here, so this is not routed to/loop.Documentation
ac-parser.ts, prose in the updatedspec/qaSKILL.md sections) rather than in a dedicated user-facing doc page; no existing doc page describes the AC-writing convention in a way that would now be stale.Next Steps
inferVerificationMethod's keyword substring-match bug (the"ui"/"display"false-positive class measured in AC-6)./specplanning of this very issue.Evidence:syntax — no action needed to force it.admarble commentedon Aug 13, 2026
/fullsolve Complete
Issue: #938
Status: NEEDS_VERIFICATION
Summary
Evidence:syntax)Iterations
/loopneeded — the pending item isn't code-fixable)PR: #945
Not merged: verdict is
NEEDS_VERIFICATION, notREADY_FOR_MERGE. Ready for human review — the one open item (AC-4) is explained in the QA comment above and doesn't block on a code fix.fix(#938): close QA gaps — last-occurrence Evidence: split, direct sc…
admarble commentedon Aug 13, 2026
QA Follow-up: All gaps closed
Following the initial QA review (previous comment), all 4 identified gaps have been addressed:
AC-4 → now MET (was PENDING)
The live-dogfood requirement is closed for real, not rationalized around. Filed two genuine follow-up issues — #946 (the
inferVerificationMethodsubstring bug) and #947 (the fenced-example AC-shadowing bug found live while planning #938 itself) — each authored with a realEvidence:-bearing AC, not a synthetic demo.Then actually ran the §6h mechanism against #946's real content:
A real issue, a real declared-evidence AC, the exact declared command executed and passed before crediting the AC.
Other 3 gaps
splitEvidenceClausesplit on the firstEvidence:occurrence, corruptible by AC prose that mentions the word before the real trailing clauseinferVerificationMethod's"ui"/"display"substring-match bugstate-schema.ts'screateAcceptanceCriterionevidence parameter had only transitive test coverageUpdated AC Coverage
Coverage: 6/6 AC items fully met.
Verdict: READY_FOR_MERGE
All 6 ACs MET, all quality gates green (build, lint, 4570 tests passing — 2 pre-existing unrelated
doctor.test.tsfailures confirmed identical on this branch's base commit, untouched since a May PR), CI 8/8 (pending re-verification on the latest push), CHANGELOG/skill-sync/lint-skill-gates all clean, mutation-verified gate tests, and a genuine live dogfood run closing what was the one outstanding item.feat(#938): explicit Evidence: clause on ACs — declared verification …
docs: prep CHANGELOG and reference docs for the next release
fix(ac-parser): inferVerificationMethod matches keywords as substring…
feat(#993): claude plugin eval cases for /qa and /spec, null-run cana…