Repository navigation
Conversation
Every AC_PATTERNS entry required an ID prefix, so ordinary human-written issues (bare `- [ ]` items, no ID) parsed to zero ACs, silently blinding every TS-side AC consumer including the ready gate's Non-Goal classifier. parseAcceptanceCriteria is now section-aware (mirroring parseNonGoals): existing ID patterns run unchanged on every line, plus a bare-checkbox fallback that fires only under a case-insensitive `## Acceptance Criteria` heading, synthesizing stable AC-N IDs that skip explicit-marker collisions. Real matcha-maps issue bodies committed as hermetic fixtures: #686 (4), #703 (2, lowercase heading), #745 (6, existing ID path), #750 (0, negative guard resolving the AC-2 vs AC-3 contradiction the spec surfaced). Entire-Checkpoint: 87d4ea18cbb9
This was referenced Jul 29, 2026
…cannot drop an author's AC A bare checkbox listed before an explicit **AC-1:** under the same heading synthesized AC-1 first, and the explicit AC-1 was then silently dropped by the first-occurrence dedupe. Synthesis now skips IDs owned by explicit markers anywhere in the body, not just those seen so far. Mutation-verified: reverting the explicitIds guard fails exactly the new test 'skips IDs taken by explicit markers that appear after the bare item' (36 passed, 1 failed); restored, all 37 pass.
…-requires-an-id-prefix-so-human-written-i # Conflicts: # CHANGELOG.md
…-requires-an-id-prefix-so-human-written-i # Conflicts: # CHANGELOG.md
admarble
deleted the
feature/850-ac-parser-requires-an-id-prefix-so-human-written-i
branch
July 30, 2026 03:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AC_PATTERNSentry requiring an ID prefix (AC-1:,B2:,**AC-1**) meant ordinary hand-authored issues parsed to zero ACs — silently blinding every TS-side AC consumer (scope analyzer, AC linter,/testgen, and the ready gate's Non-Goal classifier, which goes dead the momentparseNonGoalssees an empty AC list).parseAcceptanceCriteriais now section-aware (mirroringparseNonGoalsinready-gate.ts): the existing ID patterns still run unchanged on every line, and a bare-checkbox fallback is layered on top that fires only under an explicit## Acceptance Criteriaheading (case-insensitive), synthesizing stableAC-NIDs that skip any ID already taken by an explicit marker.src/lib/__fixtures__/ac-parser/.Pre-PR AC Verification
## Acceptance Criteriaparse with synthesized stable IDsac-parser.tsbare fallback +bareCountsynthesizer; tests "parses bare checkboxes…", "synthesizes IDs deterministically…", "matches the heading case-insensitively", "skips IDs already taken…"inAcSectiontoggles onAC_HEADING_RE, closes at next heading; tests "ignores bare checkboxes when there is no AC heading", "stops honoring… at the next heading",#750negative fixture/specQ2)#750 has no
## Acceptance Criteriaheading — only## Open questions …bare checkboxes. AC-3 lists it as a non-zero fixture, but AC-2 requires exactly those unrelated checkboxes to parse to 0. The two cannot both hold. AC-2 is the actual requirement of this issue (bare boxes only under the heading); a non-zero result for #750 would re-open the "any checklist is an AC" ambiguity the parser exists to guard against. #750 is therefore committed as the AC-2 negative fixture (asserts 0) — the strongest real-world proof of the guard. Flagging for maintainer confirmation.Note on #745 (spec Q1): its live body was already rewritten to
**AC-N:**IDs as a workaround (see its own<sub>note citing #850), so it parses via the existing patterns and doubles as an AC-4 regression fixture. The new bare-checkbox path is genuinely exercised by the two real bare-checkbox issues, #686 and #703.Mutation verification (per CLAUDE.md gate-test rule)
AC_HEADING_RE→ never matches (kills bare path)AC_HEADING_RE→ matches any heading (breaks AC-2 scoping)## Acceptance Criteriaheading from #686 fixtureTest plan
npm run build— clean (tsc)npm run lint— clean (eslint, 0 warnings)ac-parser.test.ts— 36 passed (26 existing + 10 new)Closes #850