Skip to content

fix(ac-parser): - [ ] **AC-1** Desc (bold ID, no colon) silently parses as zero ACs #808

Closed

Description

@admarble

Summary

src/lib/ac-parser.ts requires a colon attached to the AC identifier. All four patterns in AC_PATTERNS demand it:

/^-\s*\[[x\s]\]\s*\*\*([A-Za-z]+-?\d+):\*\*\s*(.+)$/gim   // **AC-1:** Desc
/^-\s*\[[x\s]\]\s*\*\*([A-Za-z]\d+):\*\*\s*(.+)$/gim      // **B2:** Desc
/^-\s*\[[x\s]\]\s*\*\*([A-Za-z]+-?\d+):\s*(.+?)\*\*\s*(.*)$/gim  // **AC-1: Desc**
/^-\s*\[[x\s]\]\s*([A-Za-z]+-?\d+):\s*(.+)$/gim           // AC-1: Desc

So a very common authoring style — bold identifier, no colon — matches nothing:

- [ ] **AC-1** After assembling the combined state, reinstall dependencies…
- [ ] **AC-2** With deps reinstalled, a combined state reports test/build passed…

extractAcceptanceCriteria() returns { items: [], summary: { total: 0, … } }.

Why this matters

It fails silently. There is no warning, no error, no "0 ACs parsed — did you mean…". Downstream:

  • .sequant/state.json records zero acceptance criteria for the issue
  • /qa has nothing to verify against and its AC coverage table is empty
  • The /spec AC linter reports nothing, because there is nothing to lint

Real-world evidence

Hit on #803. Its five ACs were authored as - [ ] **AC-1** … and parsed as zero items. Caught only because /spec happened to run the parser and print the count; the issue body was normalized to **AC-1:** by hand to unblock state tracking. Any run that did not eyeball that number would have proceeded with an empty AC set and a /qa pass that verified nothing.

Proposed fix

Add two patterns for the bold-without-colon form:

  • - [ ] **AC-1** Description
  • - [ ] **B2** Description

Scope deliberately limited to the bold variants. A bare - [ ] AC1 something without bold or colon is genuinely ambiguous against ordinary checklist prose, and widening that far risks false positives; bold is a strong enough signal that the token is an identifier.

Acceptance Criteria

  • AC-1: parseAcceptanceCriteria extracts - [ ] **AC-1** Description (bold ID, no colon) with id AC-1 and the correct description.
  • AC-2: The same holds for the no-hyphen form - [ ] **B2** Description and for checked boxes - [x] **AC-1** Description.
  • AC-3: All four existing colon-bearing formats continue to parse unchanged — no regression in the existing ac-parser test suite.
  • AC-4: A bold token that is not an identifier (e.g. - [ ] **Note** something) is still not extracted as an AC.
  • AC-5: Unit tests cover each new format plus the fix(merge-check): combined-branch-test runs npm test/build without reinstalling deps after a lockfile change → false BLOCKED #803 issue body verbatim as a fixture.

Notes

Found while running /fullsolve 803. Not fixed there — different module, and folding it into the merge-check PR would make that change incoherent.

Activity

  1. added a commit that references this issue on Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions