Repository navigation
fix(#808): parse bold AC markers that have no colon - #809
Merged
admarble merged 1 commit intoJul 25, 2026
Merged
Conversation
All four AC_PATTERNS required a colon attached to the identifier, so `- [ ] **AC-1** Description` — a very common authoring style — matched nothing and extractAcceptanceCriteria() returned an empty set. It failed silently: no warning, no error, just zero ACs in state.json, an empty AC coverage table in /qa, and nothing for the /spec AC linter to lint. A run could complete having verified nothing. Hit on #803, whose five ACs were written exactly this way; caught only because /spec printed the count. Adds a fifth pattern covering the bold-no-colon form. It also handles the no-hyphen identifier (**B2**), checked boxes, and — via a trailing optional colon — `**AC-1**: Description` where the colon sits outside the bold. Scope is deliberately limited to the bold form. A bare `- [ ] AC1 something` is ambiguous against ordinary checklist prose, so matching it would trade a silent miss for silent false positives. The `\d+` on the identifier keeps `**Note**` / `**Verify**` / `**TODO**` out, guarded by its own test. Tests: 6 new cases including #803's body verbatim as a regression fixture. 5 of the 6 fail without the new pattern; the sixth is the over-match guard, which must pass both ways. All 20 pre-existing cases unchanged.
admarble
deleted the
feature/808-fix-ac-parser-ac-1-desc-bold-id-no-colon-silen
branch
July 25, 2026 17:24
5 tasks
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
All four patterns in
src/lib/ac-parser.tsrequired a colon attached to the AC identifier, so- [ ] **AC-1** Description— bold identifier, no colon — matched nothing andextractAcceptanceCriteria()returned an empty set.It failed silently. No warning, no error, no "0 ACs parsed". Downstream: zero acceptance criteria in
.sequant/state.json, an empty AC coverage table in/qa, and nothing for the/specAC linter to lint. A run could complete having verified nothing.Found while running
/fullsolve 803— that issue's five ACs were authored exactly this way and parsed as zero. It was caught only because/spechappens to print the parsed count; the body was normalized by hand to unblock state tracking.Adds a fifth pattern:
/^-\s*\[[x\s]\]\s*\*\*([A-Za-z]+-?\d+)\*\*:?\s*(.+)$/gimAC Verification
- [ ] **AC-1** Descriptionextracts with idAC-1and correct descriptionac-parser.ts:55-71; test "should parse bold AC markers with no colon"**B2**and for checked boxes- [x] **AC-1**[A-Za-z]+-?\d+covers the no-hyphen form without a second patternac-parser.test.tscases pass untouched; the new pattern cannot steal them (it requires**immediately after the digits, which a**AC-1:**line does not have)**Note**,**Verify**,**TODO**. The\d+requirement is what excludes themBonus beyond the ACs: the trailing
:?also absorbs a colon placed outside the bold (- [ ] **AC-1**: Description), which would otherwise land in the description as a leading": ". Covered by its own test.Scope note
Deliberately limited to the bold form. A bare
- [ ] AC1 somethingis genuinely ambiguous against ordinary checklist prose, and matching it would trade a silent miss for silent false positives — a worse failure mode than the one being fixed. Stated in a code comment at the pattern.Sibling-site scan
ac-parser.tsis the only checkbox-based AC extractor in the codebase. The otherAC-\d+matchers were checked and none share this defect:phase-executor.ts:221/^\s*|\s*\*?\*?AC-\d+/qa/SKILL.md:2330awk '/^(#+ AC-[0-9]+|\*\*AC-[0-9]+)/'scripts/qa/precheck.ts:207/AC-\d+/gexec/SKILL.md:355,qa/SKILL.md:635grep -E '|[^|]+|\s*AC-[0-9]+:'/specitself generates with a colon — not user-authored textTest plan
npm run build— passesnpm run lint— passes (0 warnings)npx vitest run src/lib/ac-parser.test.ts— 26 passed (20 pre-existing + 6 new)ac-linter,scope) — 129 passednpm test— 191 files, 4048 passed, 1 expected fail, 2 skipped, 0 failuresCloses #808
🤖 Generated with Claude Code