Files
pad/internal/acceptance
xarmian 3631139de0 feat(acceptance): one Go reading of a body's acceptance criteria (PLAN-3598 slice (a)) (#2091)
* feat(acceptance): one Go reading of a body's acceptance criteria (PLAN-3598 slice (a))

`pad item context` (PLAN-3598) returns a governing spec's acceptance
criteria as data. Until now the only readings were prose: the verify and
decompose playbooks tell the agent to find the section and skip skeleton
lines. internal/acceptance.Parse implements that same rule: the first
"Acceptance criteria" heading at any level, up to the next heading of the
same or higher level; "- AC-N: text" bullets, with indented continuation
lines joined; angle-bracket or bare-ellipsis text reported as a placeholder,
not a criterion; headings and AC lines inside code fences ignored.

The spec template's own skeleton is pinned to read as two placeholders and
no criteria, so a fresh spec never claims real ones.

Claude-Session: https://claude.ai/code/session_01Q9WssCjFuHjSfLABoW4tmS

* fix(acceptance): CommonMark fences, setext headings, and nested AC bullets (PLAN-3598 slice (a))

Codex round 1 at b1091c645 found three P2s. A fence closed on any line
sharing its first three characters, so a four-backtick block ended at a
three-backtick line or an info-string line, and fenced headings could end
the section. A bullet indented under a criterion counted as a criterion of
its own. Setext headings were not recognized at all.

Fences now close only on a run of their own character at least as long as
the opener with nothing after it, and a backtick opener with a backtick in
its info string is not a fence. Setext underlines make headings only under
a paragraph line, never under a list item or an indented continuation,
where the underline is a thematic break. A criterion is a top-level bullet;
an indented AC-shaped bullet joins the text of the criterion above it.

Six of the new cases fail on the previous parser.

Claude-Session: https://claude.ai/code/session_01Q9WssCjFuHjSfLABoW4tmS

* fix(acceptance): nesting follows the parent item's content column (PLAN-3598 slice (a))

Codex round 2 at ad43c92d1: the round-1 fix allowed a criterion at most
one space of indent, so a top-level list indented two or three spaces lost
its criteria. Nesting is now decided the CommonMark way: a bullet indented
to at least the open item's content column is nested in it, and joins the
criterion's text when that item is one. A bullet short of that column,
indented up to three spaces, starts a new top-level item.

Claude-Session: https://claude.ai/code/session_01Q9WssCjFuHjSfLABoW4tmS
2026-10-11 21:19:39 -04:00
..