Skip to content

[3499 by Claude Opus 5.5] Extract acceptance criteria from the issue and report evidence per criterion - #3506

Merged
integry merged 12 commits into
3498-epic-trust-the-arvfrom
3499/claude-opus-5-5-extract-acceptance-criter-20261112-1853-mye
Nov 13, 2026
Merged

integry merged 12 commits into
3498-epic-trust-the-arvfrom
3499/claude-opus-5-5-extract-acceptance-criter-20261112-1853-mye

Conversation

@propr-dev

@propr-dev propr-dev Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #3499

Branch: 3499/claude-opus-5-5-extract-acceptance-criter-20261112-1853-mye
Commits: ✅ Changes committed (8489438)


AI Processing Completed

Execution Details:

Summary:
I've implemented the acceptance-criteria checklist for #3499. The 89 affected test files pass through run-test-suite.mjs; typecheck is clean for root, packages/core, packages/shared and packages/api; root src/ and core src/ pass eslint --max-warnings 0. I haven't seen it work on a real agent run: the digest depends on the agent actually ending its summary with the - AC1: met — … lines, and that is only covered by tests here.

Parser (packages/shared/src/acceptanceCriteria.ts)

  • extractAcceptanceCriteria reads the list items under the first "Acceptance criteria" heading. Any heading level and any letter case work, and a trailing colon or emphasis is fine. The list ends at the next heading of the same or higher level, so items under a sub-heading like ### Backend still count.
  • Each top-level item is one criterion with an id by position (AC1, AC2, …). Nested items are folded into their parent, checkboxes and HTML comments are dropped, and list items inside code fences are ignored.
  • It keeps at most 20 criteria of up to 300 characters each. With no heading it returns nothing, and nothing else changes.
  • Only a real heading counts. A bold line like **Acceptance criteria:**, which many hand-written issues use, is not picked up, because the issue asked for a heading. Planner Studio issues use ## Acceptance Criteria, so they work.
  • evaluateAcceptanceCriteria pairs each criterion with the agent's last statement about it. It accepts lines like - **AC1:** met — file, AC2 - not met: reason or a table row. A criterion with no statement is marked not_addressed.

Implementation prompt (promptGenerator.ts): when the issue has criteria, the prompt lists them with their ids. It asks the agent to end its summary with one line per criterion: met, not met or not applicable, plus the file or test that shows it.

Review digest and timeline

  • buildReviewDigest now takes the criteria and the agent's summary. The digest shows an "Acceptance criteria" block first, e.g. "(1 of 3 met, as stated by the agent)", with each criterion as met, not met, not applicable or not addressed.
  • The criteria text and the agent's evidence are redacted and shown as code.
  • Issue runs pass the issue body through createPullRequest, so the criteria with their status are saved in the review.digest task_history event. The timeline line also says how many were met.
  • Follow-up and /fix comments don't get the checklist, because their prompts don't list the criteria.

/review

  • fetchLinkedIssueContext parses the criteria from the first linked issue's full body. The copy of the issue used as the review objective is cut at 1,000 characters, so criteria lower down would otherwise be lost.
  • The criteria go to every reviewer prompt, and budget trimming never removes them. The reviewer is asked to state each id in the Overall Evaluation, and to report every unmet criterion as a requirement blocker whose title and violatedRequirement start with the id.

Tests and docs

  • New tests cover the parser (heading variants, nested lists, checkboxes, fences, limits, slow-input safety and statement parsing), the prompt section and the digest rendering.
  • I extended the existing tests for the PR description, the timeline event, linked-issue parsing and the review prompt.
  • The PR template and PR command docs now describe the checklist.

Two small refactors: to stay under the 400-line lint limit, I collapsed one comments-fetch statement in prCommentJobHelpers.ts and joined two lines in issueJobHelpers.ts. I also split the parser into small functions to stay under the complexity limit; packages/shared has no lint config of its own, so I checked it with the core config.

I didn't create a visual preview: the change is generated Markdown text, not app UI.

Detailed Logs:

  • Conversation: 213 messages
  • Session: b3922fbe-fe85-48d2-b540-715b7c63b18b

Log files stored at:

  • conversation: /usr/src/app/logs/executions/issue-3499-2026-11-12T19-12-13-801Z-conversation.json
  • output: /usr/src/app/logs/executions/issue-3499-2026-11-12T19-12-13-801Z-output.txt
Latest Conversation Messages
ASSISTANT: [content unavailable]

ASSISTANT: I've implemented the acceptance-criteria checklist for #3499. The 89 affected test files pass through `run-test-suite.mjs`; typecheck is clean for root, `packages/core`, `packages/shared` and `package...


This PR was created automatically by ProPR after processing issue #3499.


💡 Need changes?

Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!

…affected test files pass through `run-test-suite.mjs`; typecheck is clean for root, `packages/core`, `packages/shared` and `packages/api`; root `src/` and core `src/` pass `eslint --max-warnings 0`. I haven't seen it work on a real agent run: the digest depends on the agent actually ending its summary with the `- AC1: met — …` lines, and that is only covered by tests here.

Parser (`packages/shared/src/acceptanceCriteria.ts`)
- `extractAcceptanceCriteria` reads the list items under the first "Acceptance criteria" heading. Any heading level and any letter case work, and a trailing colon or emphasis is fine. The list ends at the next heading of the same or higher level, so items under a sub-heading like `### Backend` still count.
- Each top-level item is one criterion with an id by position (AC1, AC2, …). Nested items are folded into their parent, checkboxes and HTML comments are dropped, and list items inside code fences are ignored.
- It keeps at most 20 criteria of up to 300 characters each. With no heading it returns nothing, and nothing else changes.
- Only a real heading counts. A bold line like `Acceptance criteria:`, which many hand-written issues use, is not picked up, because the issue asked for a heading. Planner Studio issues use `## Acceptance Criteria`, so they work.
- `evaluateAcceptanceCriteria` pairs each criterion with the agent's last statement about it. It accepts lines like `- AC1: met — file`, `AC2 - not met: reason` or a table row. A criterion with no statement is marked `not_addressed`.

Implementation prompt (`promptGenerator.ts`): when the issue has criteria, the prompt lists them with their ids. It asks the agent to end its summary with one line per criterion: met, not met or not applicable, plus the file or test that shows it.

Review digest and timeline
- `buildReviewDigest` now takes the criteria and the agent's summary. The digest shows an "Acceptance criteria" block first, e.g. "(1 of 3 met, as stated by the agent)", with each criterion as met, not met, not applicable or not addressed.
- The criteria text and the agent's evidence are redacted and shown as code.
- Issue runs pass the issue body through `createPullRequest`, so the criteria with their status are saved in the `review.digest` `task_history` event. The timeline line also says how many were met.
- Follow-up and `/fix` comments don't get the checklist, because their prompts don't list the criteria.

`/review`
- `fetchLinkedIssueContext` parses the criteria from the first linked issue's full body. The copy of the issue used as the review objective is cut at 1,000 characters, so criteria lower down would otherwise be lost.
- The criteria go to every reviewer prompt, and budget trimming never removes them. The reviewer is asked to state each id in the Overall Evaluation, and to report every unmet criterion as a `requirement` blocker whose title and `violatedRequirement` start with the id.

Tests and docs
- New tests cover the parser (heading variants, nested lists, checkboxes, fences, limits, slow-input safety and statement parsing), the prompt section and the digest rendering.
- I extended the existing tests for the PR description, the timeline event, linked-issue parsing and the review prompt.
- The PR template and PR command docs now describe the checklist.

Two small refactors: to stay under the 400-line lint limit, I collapsed one comments-fetch statement in `prCommentJobHelpers.ts` and joined two lines in `issueJobHelpers.ts`. I also split the parser into small functions to stay under the complexity limit; `packages/shared` has no lint config of its own, so I checked it with the core config.

I didn't create a visual preview: the change is generated Markdown text, not app UI.
@propr-dev

propr-dev Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

/ultrafix goal=8 max=10
Triggered automatically by the requested execution settings.

@propr-dev propr-dev Bot added the ultrafix label Nov 12, 2026
@propr-dev

propr-dev Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

🔄 Ultrafix loop started (goal: 8/10, max cycles: 10)

First action: /review

💡 Tip: Remove the ultrafix label from this PR to stop further ultrafix cycles.

@propr-dev

propr-dev Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR connects acceptance criteria to implementation prompts, review prompts, published digests, and timeline metadata. The integration is coherent, but two parsing defects can produce incorrect checklist requirements or statuses. Localized corrections are needed before merging.

✅ Complete data flow — Issue publication passes criteria and the agent summary into the digest, whose structured results are retained in timeline metadata.

✅ Preserved review context — Reviewers receive criteria extracted from the full linked issue body, avoiding the existing objective truncation.

✅ Clear attribution — Digest counts explicitly identify statuses as agent statements, and criterion text and evidence are redacted and rendered as code.

This assessment is based on static inspection only; no commands were run. The supplied current-head status reports zero failures and five pending checks.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F1: 🔴 Hidden comments become enforced criteria

  • Required behavior: Only actual acceptance-criteria headings and list items should become checklist requirements; HTML comments must be ignored.

  • Evidence: packages/shared/src/acceptanceCriteria.ts, criteriaSection, listItems, and cleanItemText.

    1. An issue contains a commented-out template section: <!--\n## Acceptance criteria\n- Obsolete requirement\n-->\n\n## Acceptance criteria\n- Actual requirement.
    2. criteriaSection processes the comment contents as ordinary Markdown, selecting the hidden heading as the first acceptance-criteria heading.
    3. It stops when it reaches the real heading at the same level, excluding the actual requirement.
    4. listItems collects the hidden item. Comment removal occurs only afterward, on individual item text, where the opening comment delimiter is no longer present.

    The implementation prompt, digest, and review prompt consequently use the obsolete requirement and omit the actual one. The reviewer is explicitly instructed to enforce these extracted criteria as blockers. The existing inline-comment test does not exercise comments spanning headings or list items. Verification provenance: static trace through extraction and its changed prompt/publication callers.

  • Minimum fix: Exclude HTML comment contents before interpreting headings and list items, preserving appropriate line boundaries and code-fence behavior. Add a regression covering a hidden criteria section preceding the real section.

F2: 🔴 Example statements overwrite actual results

  • Required behavior: Checklist statuses must reflect the agent’s criterion statements, without treating fenced examples as actual completion claims.

  • Evidence: packages/shared/src/acceptanceCriteria.ts, evaluateAcceptanceCriteria and parseStatementLine.

    1. An agent summary reports - AC1: not met — implementation missing.
    2. Later in the summary, it illustrates the desired report format with a fenced code block containing - AC1: met — src/feature.ts.
    3. evaluateAcceptanceCriteria scans every line without tracking code fences. The example matches parseStatementLine and overwrites the earlier statement in the map.
    4. The published digest now displays AC1 as met, and timeline metadata persists that incorrect status.

    Known-ID filtering and length limits do not distinguish examples from statements. Asking the agent to end with a checklist does not validate the summary actually received. Verification provenance: static trace; this scenario was not executed.

  • Minimum fix: Ignore fenced code content when collecting criterion statements, while retaining last-statement precedence for actual report text. Add a regression where a fenced example follows an explicit unmet result.

Suggestions

These are optional follow-ups and are not sent to /fix.

No suggestions.

Score

The integration and focused tests provide a strong foundation, but the parser can invent requirements and falsely report completion. Both defects warrant correction before merge; current checks have no reported failures but remain incomplete.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 1s
  • Tokens: 63,616 (61,914 in / 1,702 out)
  • Cost: $0.59

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F1 F2

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit ea9b690

Addressed 1 AI review comment (IDs: 6833541133)

Addressed findings F1, F2

Summary of Changes

I fixed both findings in packages/shared/src/acceptanceCriteria.ts. Hidden comments no longer become criteria, and fenced examples no longer change a criterion's status.

F1: hidden comments became criteria. A new visibleLines step runs on the whole body before any heading or list item is read. It removes <!-- … --> comments, including ones that span several lines. Every line stays in place, and a line that held only a comment counts as blank. Inside fenced code, <!-- and --> are plain text and hide nothing. An unclosed comment still hides everything after it. The old per-item comment removal in cleanItemText is gone because nothing reaches it any more.

F2: fenced examples overwrote real results. evaluateAcceptanceCriteria now runs the agent's summary through the same visibleLines step and skips fenced lines. A later real statement still wins, as before. I also made it ignore statements inside HTML comments in the summary. That is the same flaw as F1 in the other function that reads statements: a multi-line comment holding - AC1: met would otherwise count.

Regressions (added to packages/shared/test/acceptanceCriteria.test.ts):

  • A hidden criteria section placed before the real one now gives only the real requirement. The test also covers comments that span list items and a heading, an unclosed comment, and comment markers inside fences.
  • A summary with - AC1: not met — implementation missing, followed by a fenced example (both ``` and ~~~ fences) and a commented-out `met` line, keeps AC1 as not met. A real `met` line added after them still wins.

Checks: I ran the new test file against the original parser, and both new tests fail there. With the fix, 11 of 11 pass. The six downstream test files also pass: the prompt section, review digest publication, linked-issue parsing, the review prompt, and the review budget. All tests went through run-test-suite.mjs, with packages/shared rebuilt first. packages/shared typechecks, and the parser file passes eslint --max-warnings 0 under the core config.

I made no preview, because this changes text parsing, not anything a user sees.


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-ultrafix
  • Time: 4m 29s
  • Tokens: 489,077 (482,380 in / 6,697 out)
  • Cost: $0.45

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

…teria.ts`. Hidden comments no longer become criteria, and fenced examples no longer change a criterion's status.

I fixed both findings in `packages/shared/src/acceptanceCriteria.ts`. Hidden comments no longer become criteria, and fenced examples no longer change a criterion's status.

**F1: hidden comments became criteria.** A new `visibleLines` step runs on the whole body before any heading or list item is read. It removes `<!-- … -->` comments, including ones that span several lines. Every line stays in place, and a line that held only a comment counts as blank. Inside fenced code, `<!--` and `-->` are plain text and hide nothing. An unclosed comment still hides everything after it. The old per-item comment removal in `cleanItemText` is gone because nothing reaches it any more.

**F2: fenced examples overwrote real results.** `evaluateAcceptanceCriteria` now runs the agent's summary through the same `visibleLines` step and skips fenced lines. A later real statement still wins, as before. I also made it ignore statements inside HTML comments in the summary. That is the same flaw as F1 in the other function that reads statements: a multi-line comment holding `- AC1: met` would otherwise count.

**Regressions** (added to `packages/shared/test/acceptanceCriteria.test.ts`):
- A hidden criteria section placed before the real one now gives only the real requirement. The test also covers comments that span list items and a heading, an unclosed comment, and comment markers inside fences.
- A summary with `- AC1: not met — implementation missing`, followed by a fenced example (both ``` and `~~~` fences) and a commented-out `met` line, keeps AC1 as not met. A real `met` line added after them still wins.

**Checks:** I ran the new test file against the original parser, and both new tests fail there. With the fix, 11 of 11 pass. The six downstream test files also pass: the prompt section, review digest publication, linked-issue parsing, the review prompt, and the review budget. All tests went through `run-test-suite.mjs`, with `packages/shared` rebuilt first. `packages/shared` typechecks, and the parser file passes `eslint --max-warnings 0` under the core config.

I made no preview, because this changes text parsing, not anything a user sees.

PR: #3506
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR connects acceptance criteria to implementation prompts, review digests, timeline records, and reviewer prompts. It needs a localized parser correction before merging.

✅ Complete data flow — Issue criteria and agent statements reach the digest and persisted timeline metadata through the supplied callers.

✅ Review context preservation — Criteria come from the full linked issue body and remain present during prompt budget trimming.

✅ Clear status attribution — Digest text explicitly identifies completion statuses as agent statements and distinguishes unaddressed criteria.

The supplied current-head checks show 24 passed, no failures, and no pending checks. This review used static analysis only; no commands were run.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F3: 🔴 Exclude fences inside nested list items

  • Required behavior: Fenced examples must not become acceptance requirements. The parser promises to ignore list items inside code fences while folding genuine nested requirements into their parent.

  • Evidence: packages/shared/src/acceptanceCriteria.ts, FENCE, nextFence, and listItems.

    1. An issue contains a valid nested list with a fenced example:
      ## Acceptance criteria
      - Validate input:
        - Reject malformed input, including this example:
          ```text
          - Accept malformed input.
          ```
      - Document usage.
      
    2. The example fence has four leading spaces because it belongs to the nested list item. FENCE accepts at most three, so neither visibleLines nor criteriaSection recognizes it.
    3. listItems appends the opening and closing delimiters as continuation text and folds Accept malformed input. into AC1 as another requirement.
    4. The resulting AC1 includes the contradictory example instruction. That corrupted criterion is supplied to the implementation agent, published in the digest, and passed to reviewers instructed to enforce every criterion.

    static trace: Both extraction passes use the same indentation-limited fence matcher. The supplied tests cover nested lists and standalone fences separately, so they do not prevent this combination. The input is valid fenced code within a nested list; its indentation is relative to the list container.

  • Minimum fix: Recognize fenced blocks relative to their containing list indentation and exclude their contents from criterion text. Add a regression covering the nested example above, asserting that AC1 excludes the delimiters and example instruction while AC2 remains present.

Suggestions

These are optional follow-ups and are not sent to /fix.

S1: 🟢 Exercise a real agent report

A representative issue run would help verify that the generated summary actually retains the requested criterion statements across the agent adapter and publication path. The supplied tests demonstrate the plumbing with constructed summaries, so this is additional integration confidence rather than a separate merge requirement.

Score

The integration is well covered and current checks pass, but nested fenced examples can corrupt the requirements enforced by both implementation and review. The correction is localized.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 12s
  • Tokens: 63,232 (61,697 in / 1,535 out)
  • Cost: $0.58

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F3 S1

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit a380520

Addressed 1 AI review comment (IDs: 6834940939)

Addressed finding F3

Summary of Changes

I fixed F3: a fenced example inside a nested list item no longer becomes part of a criterion. In the issue from the finding, AC1 is now Validate input: Reject malformed input, including this example: and AC2 Document usage. stays separate. The fence delimiters and the - Accept malformed input. line are left out.

The fix (packages/shared/src/acceptanceCriteria.ts): the old check only treated a line as a fence if it had at most three leading spaces. A new FenceTracker keeps track of which list items are open and where each one's text starts. A fence now counts if it is indented up to three columns past that point. A fence closes when a matching closing line appears, or when a line indented less than its list item ends that item. A fence at the start of a line also ends the list. Outside a list, a line with four spaces of indentation is still not a fence.

Same problem in the other caller: both parsing passes and evaluateAcceptanceCriteria had the same indentation limit. That function reads the agent's - AC1: met — … lines, so a sample statement inside a fence in a nested list in the agent's summary would have counted as a real one. All three now take fenced lines from the same tracker, which fixes that path too. Callers of extractAcceptanceCriteria in promptGenerator.ts, issueJobHelpers.ts and prCommentJobHelpers.ts get the fix without changes.

Regressions (packages/shared/test/acceptanceCriteria.test.ts):

  • The nested example from the finding, checking AC1 and AC2 exactly.
  • A fence inside a top-level numbered item.
  • A fence that ends because a less-indented list item follows it.
  • A four-space-indented fence outside a list, which must still not count.
  • A sample statement fenced inside a nested list in the agent's summary, which must not count.

Run against the previous version of the parser, the two new tests fail (the nested-list fence test and the agent-summary statement test); with the fix they pass.

Checks:

  • The parser test file passes: 12 of 12 tests.
  • The 5 test files that use acceptance criteria pass through run-test-suite.mjs: the review digest, review budget, linked-issue and review prompt tests, plus the core prompt test.
  • tsc --noEmit is clean for packages/shared.
  • eslint --max-warnings 0 passes with the core config. packages/shared has no lint config of its own, so I linted a temporary copy of the file inside packages/core/src.

There's no visual preview because this changes parsing, not anything on screen.


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-ultrafix
  • Time: 4m 55s
  • Tokens: 886,864 (876,251 in / 10,613 out)
  • Cost: $0.64

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

…onger becomes part of a criterion. In the issue from the finding, AC1 is now `Validate input: Reject malformed input, including this example:` and AC2 `Document usage.` stays separate. The fence delimiters and the `- Accept malformed input.` line are left out.

I fixed F3: a fenced example inside a nested list item no longer becomes part of a criterion. In the issue from the finding, AC1 is now `Validate input: Reject malformed input, including this example:` and AC2 `Document usage.` stays separate. The fence delimiters and the `- Accept malformed input.` line are left out.

**The fix** (`packages/shared/src/acceptanceCriteria.ts`): the old check only treated a line as a fence if it had at most three leading spaces. A new `FenceTracker` keeps track of which list items are open and where each one's text starts. A fence now counts if it is indented up to three columns past that point. A fence closes when a matching closing line appears, or when a line indented less than its list item ends that item. A fence at the start of a line also ends the list. Outside a list, a line with four spaces of indentation is still not a fence.

**Same problem in the other caller:** both parsing passes and `evaluateAcceptanceCriteria` had the same indentation limit. That function reads the agent's `- AC1: met — …` lines, so a sample statement inside a fence in a nested list in the agent's summary would have counted as a real one. All three now take fenced lines from the same tracker, which fixes that path too. Callers of `extractAcceptanceCriteria` in `promptGenerator.ts`, `issueJobHelpers.ts` and `prCommentJobHelpers.ts` get the fix without changes.

**Regressions** (`packages/shared/test/acceptanceCriteria.test.ts`):
- The nested example from the finding, checking AC1 and AC2 exactly.
- A fence inside a top-level numbered item.
- A fence that ends because a less-indented list item follows it.
- A four-space-indented fence outside a list, which must still not count.
- A sample statement fenced inside a nested list in the agent's summary, which must not count.

Run against the previous version of the parser, the two new tests fail (the nested-list fence test and the agent-summary statement test); with the fix they pass.

**Checks:**
- The parser test file passes: 12 of 12 tests.
- The 5 test files that use acceptance criteria pass through `run-test-suite.mjs`: the review digest, review budget, linked-issue and review prompt tests, plus the core prompt test.
- `tsc --noEmit` is clean for `packages/shared`.
- `eslint --max-warnings 0` passes with the core config. `packages/shared` has no lint config of its own, so I linted a temporary copy of the file inside `packages/core/src`.

There's no visual preview because this changes parsing, not anything on screen.

PR: #3506
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR connects acceptance criteria to implementation prompts, review prompts, published digests, and timeline metadata. It needs a localized parser correction before merge.

✅ Consistent integration — Issue publication passes criteria and the agent summary into the digest, and timeline recording preserves the resulting statuses.

✅ Review budget protection — Criteria are passed separately from the truncated issue objective, with tests covering their retention during prompt trimming.

The review below is based on static tracing of the supplied code; no commands were run. Current checks report 23 passed, none failed, and one pending.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F4: 🔴 Preserve criterion content after fenced examples

  • Required behavior: Nested items and continuation text must remain part of their parent criterion when an intervening fenced example is ignored.

  • Evidence: packages/shared/src/acceptanceCriteria.ts, criteriaSection and listItems

    1. An issue contains an acceptance criterion - Validate input:, followed by an indented fenced example, then - Reject malformed input, and finally another top-level criterion.
    2. criteriaSection converts each fenced line into null.
    3. listItems handles the first null by setting current = null.
    4. The subsequent nested requirement reaches current?.push(...) with no current parent, so Reject malformed input is discarded. The next top-level criterion is parsed normally.

    The implementation prompt, published checklist, and reviewer criteria therefore omit an actual requirement, even though it is outside the code fence. A report marking the shortened parent criterion met can produce a checklist that never accounts for the omitted requirement. Existing nested-fence tests place the relevant nested prose before the fence and resume with a top-level item; they do not cover this sequence.

    static trace: followed the supplied extraction pipeline through fence marking, section construction, and item grouping. proposed regression: assert that a nested requirement and an indented continuation after a fenced example remain in their parent criterion.

  • Minimum fix: Distinguish skipped fenced content from boundaries that terminate a criterion. Preserve the active parent across a fence within its list item, and add regression coverage for nested items and continuation text following that fence.

Suggestions

These are optional follow-ups and are not sent to /fix.

No suggestions.

Score

The integration and tests cover the principal paths, but the parser can silently omit requirements from the checklist and review prompt. The demonstrated failure requires a focused correction.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 44s
  • Tokens: 64,332 (63,434 in / 898 out)
  • Cost: $0.57

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F4

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 8263d07

Addressed 1 AI review comment (IDs: 6835542310)

Addressed finding F4

Summary of Changes

I fixed F4. A nested requirement or indented text that comes after a fenced example now stays in its parent criterion. Before, the fence closed the criterion and the requirement after it was dropped.

Cause: the parser treated every fenced line as a break that closes the current criterion, even when the fence sat inside that criterion's list item. A nested item after the fence then had no parent and was thrown away.

Fix (packages/shared/src/acceptanceCriteria.ts):

  • The fence tracker now records whether a fence sits inside a list item or at the top level.
  • A fence inside a list item now reads like blank lines, so the criterion carries on after it. Nested items and indented text after the fence are kept. An unindented paragraph after it still ends the criterion, as Markdown does.
  • A top-level fence and a sub-heading still end the criterion. Statement parsing in evaluateAcceptanceCriteria is unchanged.

Other places with the same problem: besides fences, only sub-headings close a criterion this way, and they really do end a list item, so they stay as they are. Lines that are only an HTML comment already read as blank, so they don't close a criterion.

New tests (in packages/shared/test/acceptanceCriteria.test.ts):

  • The finding's case: a fence at the top-level item's indent, followed by a nested - Reject malformed input, more indented text and an indented line at the item's level. It now gives Validate input: Reject malformed input with a clear error. Log each rejection. and AC2 stays Document usage.
  • A fence inside a nested item, followed by more text for that item and a sibling nested item. Both are kept.
  • Two cases that must still end the criterion: a top-level fence, and an unindented paragraph after a fence inside an item.

Checks:

  • The updated test file fails on the previous parser and passes on the new one.
  • The six test files that use the parser all pass through run-test-suite.mjs (digest publication, linked-issue parsing, review budget, review prompt, the core prompt section, and the parser itself).
  • packages/shared typechecks and builds.
  • The parser passes eslint --max-warnings 0 under the core lint config.

There's no visual preview, because the change only affects parsed text.


🤖 Implementation Details

  • Model: Claude Opus 5.5 (high)
  • Requested By: @propr-ultrafix
  • Time: 4m 40s
  • Tokens: 665,677 (658,073 in / 7,604 out)
  • Cost: $0.51

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

…s after a fenced example now stays in its parent criterion. Before, the fence closed the criterion and the requirement after it was dropped.

I fixed F4. A nested requirement or indented text that comes after a fenced example now stays in its parent criterion. Before, the fence closed the criterion and the requirement after it was dropped.

**Cause:** the parser treated every fenced line as a break that closes the current criterion, even when the fence sat inside that criterion's list item. A nested item after the fence then had no parent and was thrown away.

**Fix** (`packages/shared/src/acceptanceCriteria.ts`):
- The fence tracker now records whether a fence sits inside a list item or at the top level.
- A fence inside a list item now reads like blank lines, so the criterion carries on after it. Nested items and indented text after the fence are kept. An unindented paragraph after it still ends the criterion, as Markdown does.
- A top-level fence and a sub-heading still end the criterion. Statement parsing in `evaluateAcceptanceCriteria` is unchanged.

**Other places with the same problem:** besides fences, only sub-headings close a criterion this way, and they really do end a list item, so they stay as they are. Lines that are only an HTML comment already read as blank, so they don't close a criterion.

**New tests** (in `packages/shared/test/acceptanceCriteria.test.ts`):
- **The finding's case:** a fence at the top-level item's indent, followed by a nested `- Reject malformed input`, more indented text and an indented line at the item's level. It now gives `Validate input: Reject malformed input with a clear error. Log each rejection.` and AC2 stays `Document usage.`
- A fence inside a nested item, followed by more text for that item and a sibling nested item. Both are kept.
- Two cases that must still end the criterion: a top-level fence, and an unindented paragraph after a fence inside an item.

**Checks:**
- The updated test file fails on the previous parser and passes on the new one.
- The six test files that use the parser all pass through `run-test-suite.mjs` (digest publication, linked-issue parsing, review budget, review prompt, the core prompt section, and the parser itself).
- `packages/shared` typechecks and builds.
- The parser passes `eslint --max-warnings 0` under the core lint config.

There's no visual preview, because the change only affects parsed text.

PR: #3506
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR connects acceptance criteria to implementation prompts, review prompts, published digests, and timeline metadata. It needs minor changes before merging: two parser defects can silently omit requirements or report example text as an agent’s actual assessment.

✅ Complete data flow — Criteria reach every reviewer through RunReviewsContext, and digest results are persisted through the existing timeline event.

✅ Clear evidence attribution — The digest explicitly labels statuses as agent statements and renders criterion text and evidence as code spans.

✅ Useful integration coverage — Tests cover publication, timeline persistence, extraction beyond the truncated objective, and preservation during review-budget trimming.

This review used static analysis only, as requested. The supplied checks show 23 passed, none failed, and one pending.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F5: 🔴 Recognize fences starting on list-item lines

  • Required behavior: Statements and list items inside fenced examples must not become acceptance criteria or reported completion evidence.

  • Evidence: packages/shared/src/acceptanceCriteria.ts, FenceTracker.openFence, visibleLines, and evaluateAcceptanceCriteria.

    1. An agent summary contains a real statement, - AC1: not met — missing implementation, followed by a fenced example expressed as the valid Markdown list item - ```md, then - AC1: met — example, then ```.
    2. openFence recognizes the opening line as a list item but explicitly skips delimiter detection when content >= 0. Consequently, it never opens that example’s fence.
    3. The example statement reaches parseStatementLine, which accepts its whitespace and list marker prefix. The last-statement rule replaces the real not_met result with met.
    4. The digest and persisted timeline metadata now report the example as completion evidence. The example’s closing delimiter instead opens a fence, potentially hiding subsequent real statements.

    static trace: The same tracker serves extractAcceptanceCriteria, where this syntax also allows fenced example items to be folded into criterion text. Existing tests start nested fences on separate lines; they do not exercise fences beginning immediately after a list marker. Redaction and code-span rendering cannot correct an already misclassified status.

  • Minimum fix: Detect fence delimiters in list-item content on the opening item line and track the corresponding content column. Add regressions for both criterion extraction and status evaluation using this form.

F6: 🔴 Reset list indentation between subsections

  • Required behavior: Each top-level item under the acceptance heading, including items beneath deeper headings, must produce its own criterion.

  • Evidence: packages/shared/src/acceptanceCriteria.ts, criteriaSection and listItems.

    1. An issue contains ## Acceptance criteria, then - Backend works, then ### Documentation, then - Usage is documented.
    2. The first item sets topIndent to zero. The deeper heading produces a null section boundary, which clears current but leaves topIndent unchanged.
    3. The documentation item is a valid independently indented top-level list item beneath that heading. Its two-space indentation nevertheless makes listItems treat it as nested.
    4. Because current is null, optional chaining discards the item. Only the backend criterion reaches the implementation checklist, digest, and dedicated review criteria section.

    static trace: This follows directly from the persistent topIndent and current?.push branches. Existing subsection coverage uses equally indented lists, so it does not catch the omission. The original issue prose may remain available, but it does not restore the missing checklist entry or its status.

  • Minimum fix: Reset the list indentation baseline at explicit section boundaries, then establish it from the next list item. Add a regression with differently indented lists under sibling subsections.

Suggestions

These are optional follow-ups and are not sent to /fix.

No suggestions.

Score

The integration and coverage are strong, but the parser can omit requirements and publish incorrect completion statuses. These localized correctness defects should be fixed before merge; the pending check alone does not lower the score.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 57s
  • Tokens: 65,228 (63,959 in / 1,269 out)
  • Cost: $0.59

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F5 F6

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 5409981

Addressed 1 AI review comment (IDs: 6836127583)

Addressed findings F5, F6

Summary of Changes

I fixed both findings in packages/shared/src/acceptanceCriteria.ts. The shared parser tests (14) pass, and the 7 consumer suites pass through run-test-suite.mjs: digest, review prompt, linked issue, PR template and prompt. The shared typecheck is clean, and the file passes eslint --max-warnings 0 under the core config. Run against the HEAD parser, the new tests fail, so they do catch the bugs.

F5: fences that start on a list-item line

  • A line like - ```md now opens a fence. Its column is the item's content column, so the example lines below it are fenced and its closing delimiter closes it rather than opening a new fence. This also works when one line opens several items, like - 1. ~~~.
  • The item itself still starts on that line; only its content is fenced. So text after the fence stays in that item instead of being added to the previous criterion.
  • In your example the real AC1: not met — missing implementation is now kept, and the met line in the example is ignored. A real statement after the example is still read.
  • Regressions cover both the criteria list and the status check.

F6: list indentation after a sub-heading

  • The indentation baseline now resets at a sub-heading, so the next list's first item is top-level again. With your example, Usage is documented becomes AC2, and items nested under it fold in as usual.
  • The regression uses lists with different indentation under sibling ### subsections.

Same defect in nearby code, also fixed

  • Top-level fence or paragraph: these end a list too, but the old indentation stayed. So in - Backend works / Operations: / 1. Alert added, the item was silently dropped. The baseline now resets there as well.
  • Fence tracking after a heading: the code that tracks fences didn't treat a heading as ending a list. So a top-level fence after a sub-heading could close early, and list items in the example became criteria. Headings now end the list for fences too.

Behaviour changes to know about

  • One existing test now expects different output. It used - First / a top-level fence / - Orphan / - Second and expected Orphan to be dropped. In Markdown the fence ends the list, so that line shows as its own top-level bullet. It is now its own criterion: First, After the fence (renamed in the test), Second. It still doesn't merge into First.
  • Inline code in an item isn't a fence. Because list-item lines can now open fences, a criterion like - ```npm test``` passes could have hidden everything below it. A backtick fence whose text contains another backtick is now treated as inline code, as in CommonMark, both on list-item lines and elsewhere.
  • One line opens at most 8 items. Without this cap, a long run like - - - … was slow to parse. The adversarial-input test now includes such a line.

Found but not changed: a closing fence that has text after it (for example ``` foo) still closes the fence. In CommonMark it doesn't. This was already the case before this PR and is outside F5/F6.

No visual preview: this is a text parser with no UI change.


🤖 Implementation Details

  • Model: Claude Opus 5.5 (high)
  • Requested By: @propr-ultrafix
  • Time: 7m 4s
  • Tokens: 1,345,661 (1,325,573 in / 20,088 out)
  • Cost: $1.00

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

…teria.ts`. The shared parser tests (14) pass, and the 7 consumer suites pass through `run-test-suite.mjs`: digest, review prompt, linked issue, PR template and prompt. The shared typecheck is clean, and the file passes `eslint --max-warnings 0` under the core config. Run against the HEAD parser, the new tests fail, so they do catch the bugs.

I fixed both findings in `packages/shared/src/acceptanceCriteria.ts`. The shared parser tests (14) pass, and the 7 consumer suites pass through `run-test-suite.mjs`: digest, review prompt, linked issue, PR template and prompt. The shared typecheck is clean, and the file passes `eslint --max-warnings 0` under the core config. Run against the HEAD parser, the new tests fail, so they do catch the bugs.

**F5: fences that start on a list-item line**
- A line like ``- ```md`` now opens a fence. Its column is the item's content column, so the example lines below it are fenced and its closing delimiter closes it rather than opening a new fence. This also works when one line opens several items, like ``- 1. ~~~``.
- The item itself still starts on that line; only its content is fenced. So text after the fence stays in that item instead of being added to the previous criterion.
- In your example the real `AC1: not met — missing implementation` is now kept, and the `met` line in the example is ignored. A real statement after the example is still read.
- Regressions cover both the criteria list and the status check.

**F6: list indentation after a sub-heading**
- The indentation baseline now resets at a sub-heading, so the next list's first item is top-level again. With your example, `Usage is documented` becomes AC2, and items nested under it fold in as usual.
- The regression uses lists with different indentation under sibling `###` subsections.

**Same defect in nearby code, also fixed**
- **Top-level fence or paragraph:** these end a list too, but the old indentation stayed. So in ``- Backend works`` / `Operations:` / `   1. Alert added`, the item was silently dropped. The baseline now resets there as well.
- **Fence tracking after a heading:** the code that tracks fences didn't treat a heading as ending a list. So a top-level fence after a sub-heading could close early, and list items in the example became criteria. Headings now end the list for fences too.

**Behaviour changes to know about**
- **One existing test now expects different output.** It used ``- First`` / a top-level fence / ``  - Orphan`` / ``- Second`` and expected `Orphan` to be dropped. In Markdown the fence ends the list, so that line shows as its own top-level bullet. It is now its own criterion: `First`, `After the fence` (renamed in the test), `Second`. It still doesn't merge into `First`.
- **Inline code in an item isn't a fence.** Because list-item lines can now open fences, a criterion like ``- ```npm test``` passes`` could have hidden everything below it. A backtick fence whose text contains another backtick is now treated as inline code, as in CommonMark, both on list-item lines and elsewhere.
- **One line opens at most 8 items.** Without this cap, a long run like `- - - …` was slow to parse. The adversarial-input test now includes such a line.

**Found but not changed:** a closing fence that has text after it (for example ```` ``` foo ````) still closes the fence. In CommonMark it doesn't. This was already the case before this PR and is outside F5/F6.

No visual preview: this is a text parser with no UI change.

PR: #3506
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR connects acceptance criteria across implementation prompts, review prompts, published digests, and timeline metadata. It needs a localized parser correction before merge.

✅ Complete data flow — Issue bodies reach digest construction, and /review extracts criteria before the linked issue’s objective text is truncated.

✅ Clear reporting provenance — Digest headings explicitly attribute statuses to the agent, while missing statements become not_addressed.

✅ Focused coverage — Added tests cover publication, timeline persistence, prompt budgeting, and numerous Markdown variants.

This assessment uses static analysis of the supplied code; no commands were run. Current checks report no failures, with Validate Changes still pending.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F7: 🔴 Fence contents can become checklist claims

  • Required behavior: Fenced examples must not contribute acceptance criteria or override the agent’s actual per-criterion statements.

  • Evidence: packages/shared/src/acceptanceCriteria.ts, FenceTracker.continueFence, delimiterAt, and fenceRun.

    1. An agent reports - AC1: not met — implementation missing, then includes a fenced example beginning with ~~~text.
    2. Inside that example, a line reads ~~~ example, followed by - AC1: met — example only. The opening fence remains open in Markdown: a closing delimiter cannot have trailing non-whitespace text.
    3. continueFence calls delimiterAt, which uses the opening-fence recognizer fenceRun. It accepts ~~~ example, and the matching character and length cause the tracker to close the fence prematurely.
    4. evaluateAcceptanceCriteria consequently treats the example’s statement as real and overwrites not_met with met. The digest publishes and persists an incorrect success status. The same tracker in extractAcceptanceCriteria also promotes list items following such a false closing delimiter into requirements.

    static trace: Both exported parsers consume visibleLines, and neither validates closing-fence suffixes separately. Existing tests cover ordinary closing delimiters and nested fences, but not delimiters with trailing text. The last-statement rule amplifies this failure by replacing the genuine report with the example.

  • Minimum fix: Recognize closing fences separately from opening fences: require the matching character, sufficient run length, permitted indentation, and only whitespace after the run. Add regressions for both extraction and evaluation, including backtick and tilde delimiters with trailing text.

Suggestions

These are optional follow-ups and are not sent to /fix.

S2: 🟢 Validate a real agent report

A representative end-to-end run would complement the synthetic summary tests and confirm that the requested final checklist survives the actual agent response pipeline. This is optional integration evidence; the supplied adapter and publication paths already establish the intended wiring statically.

Score

The implementation has substantial focused coverage and coherent integration, but the fence parser can turn example text into a persisted success claim. That correctness defect requires correction before merge.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 50s
  • Tokens: 67,297 (66,162 in / 1,135 out)
  • Cost: $0.59

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F7 S2

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 18994c9

Addressed 1 AI review comment (IDs: 6836751723)

Addressed finding F7

Summary of Changes

I fixed F7: a fence line with text after it, such as ~~~ example or ``` example, no longer closes a fence. In both your examples, AC1 now stays not met — implementation missing, and the - Fenced item is no longer read as a criterion.

Cause. The code that closes a fence was using the same check as the one that opens one, and that check allows text after the run.

Fix (in packages/shared/src/acceptanceCriteria.ts):

  • A new closingFenceRun accepts a closing fence only when the run is followed by nothing but spaces or tabs.
  • continueFence now uses it.
  • The other rules are unchanged: same character, a run at least as long as the opening one, and at most three columns of indentation past the list item's content.
  • Both exported parsers go through this one tracker, so extraction and evaluation are both fixed. Opening a fence still uses the old check, which is correct there.

Same bug, further down. Once the fake delimiter had closed the fence, the real closing fence opened a new one that never closed. That hid everything after it: a genuine - AC2: met statement came out as not addressed, and - Second was dropped from extraction. The same change fixes this.

Other places checked. The tracker is the only fence detection the PR adds; nothing else in the PR's changes parses fences. I found nothing unrelated to report.

New tests (in packages/shared/test/acceptanceCriteria.test.ts), each run with ~~~ and with ```:

  • Extraction: a top-level fence and a fence inside a list item (with a longer run plus text). After each fence, - Second and a nested item are still kept.
  • Evaluation: a top-level fence and a fence inside a list item. The example's met does not replace the real not met, and a real statement after the closing fence still counts.
  • Trailing whitespace: a closing fence followed by spaces and a tab still closes, so the check isn't too strict.

Verification

  • Run against the HEAD parser, both new tests fail. Each case gives the wrong result there except the trailing-whitespace one, which is a guard and passes either way.
  • With the fix, the parser tests (16) and the 7 consumer suites pass through run-test-suite.mjs: digest publication, review digest, review prompt, linked issue, PR template (two suites) and the criteria prompt. I rebuilt the shared package first so suites that read its built output test the new code.
  • The shared typecheck is clean, and the file passes eslint --max-warnings 0 under the core config. I linted a temporary copy inside packages/core/src and deleted it afterwards.

There is no visual preview: the change only affects how Markdown text is parsed.


🤖 Implementation Details

  • Model: Claude Opus 5.5 (xhigh)
  • Requested By: @propr-ultrafix
  • Time: 6m 14s
  • Tokens: 1,457,870 (1,445,815 in / 12,055 out)
  • Cost: $0.85

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

…xample` or ```` ``` example ````, no longer closes a fence. In both your examples, `AC1` now stays `not met — implementation missing`, and the `- Fenced` item is no longer read as a criterion.

I fixed F7: a fence line with text after it, such as `~~~ example` or ```` ``` example ````, no longer closes a fence. In both your examples, `AC1` now stays `not met — implementation missing`, and the `- Fenced` item is no longer read as a criterion.

**Cause.** The code that closes a fence was using the same check as the one that opens one, and that check allows text after the run.

**Fix** (in `packages/shared/src/acceptanceCriteria.ts`):
- A new `closingFenceRun` accepts a closing fence only when the run is followed by nothing but spaces or tabs.
- `continueFence` now uses it.
- The other rules are unchanged: same character, a run at least as long as the opening one, and at most three columns of indentation past the list item's content.
- Both exported parsers go through this one tracker, so extraction and evaluation are both fixed. Opening a fence still uses the old check, which is correct there.

**Same bug, further down.** Once the fake delimiter had closed the fence, the real closing fence opened a new one that never closed. That hid everything after it: a genuine `- AC2: met` statement came out as `not addressed`, and `- Second` was dropped from extraction. The same change fixes this.

**Other places checked.** The tracker is the only fence detection the PR adds; nothing else in the PR's changes parses fences. I found nothing unrelated to report.

**New tests** (in `packages/shared/test/acceptanceCriteria.test.ts`), each run with `~~~` and with ```` ``` ````:
- **Extraction:** a top-level fence and a fence inside a list item (with a longer run plus text). After each fence, `- Second` and a nested item are still kept.
- **Evaluation:** a top-level fence and a fence inside a list item. The example's `met` does not replace the real `not met`, and a real statement after the closing fence still counts.
- **Trailing whitespace:** a closing fence followed by spaces and a tab still closes, so the check isn't too strict.

**Verification**
- Run against the HEAD parser, both new tests fail. Each case gives the wrong result there except the trailing-whitespace one, which is a guard and passes either way.
- With the fix, the parser tests (16) and the 7 consumer suites pass through `run-test-suite.mjs`: digest publication, review digest, review prompt, linked issue, PR template (two suites) and the criteria prompt. I rebuilt the shared package first so suites that read its built output test the new code.
- The shared typecheck is clean, and the file passes `eslint --max-warnings 0` under the core config. I linted a temporary copy inside `packages/core/src` and deleted it afterwards.

There is no visual preview: the change only affects how Markdown text is parsed.

PR: #3506
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR connects acceptance criteria to implementation prompts, review prompts, published digests, and timeline records. It needs localized parser corrections before merging.

✅ Complete data flow — Criteria are extracted from the full linked-issue body and passed through to each reviewer, avoiding the truncated objective copy.

✅ Clear reporting provenance — Digest counts explicitly identify statuses as agent statements, and missing statements remain not_addressed.

✅ Focused coverage — Tests cover publication, timeline persistence, budget preservation, and numerous parser boundaries. The supplied checks show 23 passed, none failed, and one pending.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F8: 🔴 Quoted fenced examples overwrite reported statuses

  • Required behavior: Fenced examples must not be interpreted as the agent’s acceptance-criteria statements.

  • Evidence: packages/shared/src/acceptanceCriteria.ts, FenceTracker.fenceLine and parseStatementLine.

    1. An agent reports - AC1: not met — implementation missing.
    2. Later, its summary includes a Markdown blockquote containing a fenced format example: lines consisting of > ```md, > - AC1: met — example, and `> ````.
    3. Fence detection does not remove the blockquote prefix, so neither delimiter opens a tracked fence.
    4. Statement parsing explicitly permits > before the ID, accepts the example, and replaces the earlier not_met statement with met.

    The digest consequently displays a green criterion and persists an incorrect met count. Existing fenced-example tests cover ordinary and list-contained fences, but not blockquote-contained fences. Verification provenance — static trace: the fence expressions accept only leading whitespace, while the statement-prefix expression accepts >, and the last matching statement wins.

  • Minimum fix: Track fences within blockquote containers before parsing statements, or exclude quoted statements consistently. Add a regression proving that a quoted fenced example cannot override a real status.

F9: 🔴 Nested headings discard remaining criteria

  • Required behavior: Nested content must remain associated with its parent criterion, and subsequent top-level criteria must not disappear because a list item contains a heading.

  • Evidence: packages/shared/src/acceptanceCriteria.ts, criteriaSection and atxHeading.

    1. An issue contains ## Acceptance criteria, followed by - Document usage:, then an indented ## Examples and - Include a working example., followed by - Add automated tests..
    2. The indented heading belongs to the first list item, but atxHeading accepts its two leading spaces without considering the list container.
    3. criteriaSection treats that heading as a level-two section boundary and stops scanning.
    4. Extraction returns only “Document usage:”; both the nested requirement and the separate automated-tests criterion disappear from the checklist and reviewer criteria section.

    Fence tracking maintains list-container information, but heading detection does not use it. The existing subheading tests exercise document-level headings rather than headings inside items. Verification provenance — static trace: the unconditional same-or-higher-level break runs before listItems can fold nested content.

  • Minimum fix: Distinguish document-level headings from list-contained headings when determining section boundaries. Preserve nested heading content with its parent, and add a regression retaining the subsequent top-level criterion.

Suggestions

These are optional follow-ups and are not sent to /fix.

No suggestions.

Score

The integration and tests are strong, but two reachable Markdown cases can omit requirements or publish incorrect completion statuses. Both require localized corrections; the pending validation check alone does not lower the score.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 22s
  • Tokens: 68,050 (66,310 in / 1,740 out)
  • Cost: $0.64

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F8 F9

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 15bcb38

Addressed 1 AI review comment (IDs: 6837316543)

Addressed findings F8, F9

Summary of Changes

I fixed F8 and F9 in packages/shared/src/acceptanceCriteria.ts. The 19 parser tests pass, and so do the 10 parser and consumer suites I ran through run-test-suite.mjs. The three new tests fail against the HEAD parser, so they do catch the bugs.

F8: quoted fenced examples. The fence tracker now reads block quotes: it removes the > markers and tracks fences inside the quote. In your example, AC1 stays not met — implementation missing. The same handling covers:

  • nested quotes (> > ~~~).
  • a list inside a quote (> - ```md).
  • a quote inside a list item.
  • a quote that opens on an item's own line (- > ```md).

A blank or unquoted line ends the quote and closes any fence in it, so a statement after it counts again. A quoted statement outside a fence (> - AC1: met — x) still counts, as before.

F9: headings inside list items. A heading inside a list item is now part of that item and no longer ends the section. Your issue now gives AC1: Document usage: Examples; Include a working example. and AC2: Add automated tests.. A heading outside the list still ends the section as before.

Related cases fixed by the same changes, with tests:

  • A lower-level (###) or underlined heading inside an item didn't drop anything, but it split the nested requirement into its own criterion and shifted the later ids. It now stays in the parent.
  • In an issue body, a quoted fenced example was folded into the criterion's text (`Validate input: > ```text > - Accept malformed input. > ````). It's now dropped like any other fenced example.

Other behaviour to know about:

  • Nesting limit: quotes nested more than 8 deep are treated as fenced code, which keeps parsing fast on hostile input. A statement that deep shows as "not addressed", never a false "met".
  • Section heading inside a list item: a heading in that same item still ends the section. Code fences in that item now end the current criterion. The usual case, a top-level heading, is unchanged.

Not changed:

  • A heading indented 4 or more spaces inside a nested item isn't recognised as a heading. Its text stays in the criterion with the ### (for example First ### Examples), but nothing is lost.
  • A quoted line right after an item is still added to that item's text (- a then > note gives a > note).

Typecheck for packages/shared is clean. The parser has 0 warnings under the core lint config. The first lint run silently skipped the file because it sits outside packages/core, so I linted a temporary copy inside packages/core/src and then deleted it. There's no visual preview, because the change only affects parsed text.


🤖 Implementation Details

  • Model: Claude Opus 5.5 (xhigh)
  • Requested By: @propr-ultrafix
  • Time: 14m 48s
  • Tokens: 3,301,243 (3,228,449 in / 72,794 out)
  • Cost: $2.78

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

…a.ts`. The 19 parser tests pass, and so do the 10 parser and consumer suites I ran through `run-test-suite.mjs`. The three new tests fail against the HEAD parser, so they do catch the bugs.

I fixed F8 and F9 in `packages/shared/src/acceptanceCriteria.ts`. The 19 parser tests pass, and so do the 10 parser and consumer suites I ran through `run-test-suite.mjs`. The three new tests fail against the HEAD parser, so they do catch the bugs.

**F8: quoted fenced examples.** The fence tracker now reads block quotes: it removes the `>` markers and tracks fences inside the quote. In your example, `AC1` stays `not met — implementation missing`. The same handling covers:
- nested quotes (`> > ~~~`).
- a list inside a quote (`> - ```md`).
- a quote inside a list item.
- a quote that opens on an item's own line (`- > ```md`).

A blank or unquoted line ends the quote and closes any fence in it, so a statement after it counts again. A quoted statement outside a fence (`> - AC1: met — x`) still counts, as before.

**F9: headings inside list items.** A heading inside a list item is now part of that item and no longer ends the section. Your issue now gives `AC1: Document usage: Examples; Include a working example.` and `AC2: Add automated tests.`. A heading outside the list still ends the section as before.

**Related cases fixed by the same changes, with tests:**
- A lower-level (`###`) or underlined heading inside an item didn't drop anything, but it split the nested requirement into its own criterion and shifted the later ids. It now stays in the parent.
- In an issue body, a quoted fenced example was folded into the criterion's text (`Validate input: > ```text > - Accept malformed input. > ````). It's now dropped like any other fenced example.

**Other behaviour to know about:**
- **Nesting limit:** quotes nested more than 8 deep are treated as fenced code, which keeps parsing fast on hostile input. A statement that deep shows as "not addressed", never a false "met".
- **Section heading inside a list item:** a heading in that same item still ends the section. Code fences in that item now end the current criterion. The usual case, a top-level heading, is unchanged.

**Not changed:**
- A heading indented 4 or more spaces inside a nested item isn't recognised as a heading. Its text stays in the criterion with the `###` (for example `First ### Examples`), but nothing is lost.
- A quoted line right after an item is still added to that item's text (`- a` then `> note` gives `a > note`).

Typecheck for `packages/shared` is clean. The parser has 0 warnings under the core lint config. The first lint run silently skipped the file because it sits outside `packages/core`, so I linted a temporary copy inside `packages/core/src` and then deleted it. There's no visual preview, because the change only affects parsed text.

PR: #3506
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR connects acceptance criteria to implementation prompts, review prompts, published digests, and timeline metadata. It needs a localized parser correction before merge.

✅ Complete data flow — Issue bodies reach digest generation, and linked-issue criteria are extracted before objective truncation.

✅ Honest status reporting — Missing agent statements become not_addressed; digest wording explicitly attributes reported results to the agent.

Review was limited to static analysis as requested. Current checks report 23 passed, none failed, and one pending.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F10: 🔴 Preserve top-level items with varying indentation

  • Required behavior: Each top-level list item must become a separate acceptance criterion with its own ID and status.

  • Evidence: packages/shared/src/acceptanceCriteria.ts, listItems and criteriaSection.

    static trace:

    1. An issue contains ## Acceptance criteria, followed by - Backend works and then - Documents usage (one leading space).
    2. Both bullets are top-level Markdown items: the second marker is less indented than the first item's content column, which is two. FenceTracker correctly records the second line's containing column as zero.
    3. criteriaSection discards that container information when it passes ordinary lines to listItems.
    4. listItems compares marker indentation against topIndent instead. Because one is greater than zero, it folds the second item into the first, producing only AC1: Backend works; Documents usage.

    The implementation prompt, digest, and reviewer consequently receive one combined criterion instead of two independently reportable requirements. The existing indentation test uses uniformly indented siblings, so it does not exercise this failure. The count and length bounds do not prevent it.

  • Minimum fix: Preserve list-container information through section extraction and distinguish siblings from children using the parent's content boundary. Add a regression covering sibling markers with differing indentation that remains outside the preceding item's content column.

Suggestions

These are optional follow-ups and are not sent to /fix.

S3: 🟢 Verify one real agent report

The publication tests inject summaries containing the expected status lines. A smoke run through an actual agent would help verify that its final summary preserves those lines through the result adapter and publication path. This is optional integration confidence: the supplied code establishes the plumbing, and missing statements already have an explicit fallback.

Score

The integration and test coverage are strong, but a valid Markdown list can lose independently tracked criteria. Correct that parser behavior and complete the pending validation before merging.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 29s
  • Tokens: 70,125 (68,239 in / 1,886 out)
  • Cost: $0.65

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F10 S3

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 5eed9fb

Addressed 1 AI review comment (IDs: 6838039146)

Addressed finding F10

Summary of Changes

I fixed F10 in packages/shared/src/acceptanceCriteria.ts. Sibling top-level items with differing indentation, such as - Backend works followed by - Documents usage, are now two criteria, AC1 and AC2, instead of one combined criterion.

What was wrong. criteriaSection already knew from the fence tracker which list item held each line, but it passed ordinary lines on as plain strings. listItems then compared each marker's indentation with the first item's indentation, so any marker indented more than the first item was folded into the previous criterion even when Markdown makes it a sibling.

The correction

  • Section lines now carry an inItem flag: whether a list item that opened inside the section holds the line. That is the tracker's container column compared with the heading's column, which criteriaSection already computed for fenced lines and headings.
  • listItems starts a new criterion for any list item not held by another item, and folds held items in. The first-item indent bookkeeping is gone. Nesting follows the list structure: a marker left of the previous item's content column is a sibling, a marker at or right of it is a child.
  • Fenced lines inside an item keep their blank placeholder, now in the new shape.

Sibling check. listItems was the only consumer of the section lines and the only place that used marker indentation to decide nesting. The statement parser in evaluateAcceptanceCriteria has no list structure to get wrong. Nothing else needed changing.

Regression test. A new test in the shared suite covers the finding's exact input, a four-item mix of indents in bullet and ordered lists, and a sibling that follows the first item's children. Against the HEAD parser it fails with Backend works; Documents usage, so it catches the bug. The existing test for uniformly indented siblings still passes.

Verification

  • The shared parser suite passes, 20 tests, 0 failures.
  • The parser and six consumer suites pass through run-test-suite.mjs: PR template, core prompt section, digest publication, linked-issue repository, reviewer budget and review prompt builder.
  • Shared typecheck is clean. The parser file passes eslint --max-warnings 0 under the core config, checked through a temporary copy inside packages/core/src since the shared package has no lint config.

No visual preview: the change is Markdown parsing with no UI surface.


🤖 Implementation Details

  • Model: Claude Fable 5.1 (medium)
  • Requested By: @propr-ultrafix
  • Time: 5m 46s
  • Tokens: 1,362,183 (1,349,961 in / 12,222 out)
  • Cost: $1.79

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

… Sibling top-level items with differing indentation, such as `- Backend works` followed by ` - Documents usage`, are now two criteria, AC1 and AC2, instead of one combined criterion.

I fixed F10 in `packages/shared/src/acceptanceCriteria.ts`. Sibling top-level items with differing indentation, such as `- Backend works` followed by ` - Documents usage`, are now two criteria, AC1 and AC2, instead of one combined criterion.

**What was wrong.** `criteriaSection` already knew from the fence tracker which list item held each line, but it passed ordinary lines on as plain strings. `listItems` then compared each marker's indentation with the first item's indentation, so any marker indented more than the first item was folded into the previous criterion even when Markdown makes it a sibling.

**The correction**
- Section lines now carry an `inItem` flag: whether a list item that opened inside the section holds the line. That is the tracker's container column compared with the heading's column, which `criteriaSection` already computed for fenced lines and headings.
- `listItems` starts a new criterion for any list item not held by another item, and folds held items in. The first-item indent bookkeeping is gone. Nesting follows the list structure: a marker left of the previous item's content column is a sibling, a marker at or right of it is a child.
- Fenced lines inside an item keep their blank placeholder, now in the new shape.

**Sibling check.** `listItems` was the only consumer of the section lines and the only place that used marker indentation to decide nesting. The statement parser in `evaluateAcceptanceCriteria` has no list structure to get wrong. Nothing else needed changing.

**Regression test.** A new test in the shared suite covers the finding's exact input, a four-item mix of indents in bullet and ordered lists, and a sibling that follows the first item's children. Against the HEAD parser it fails with `Backend works; Documents usage`, so it catches the bug. The existing test for uniformly indented siblings still passes.

**Verification**
- The shared parser suite passes, 20 tests, 0 failures.
- The parser and six consumer suites pass through `run-test-suite.mjs`: PR template, core prompt section, digest publication, linked-issue repository, reviewer budget and review prompt builder.
- Shared typecheck is clean. The parser file passes `eslint --max-warnings 0` under the core config, checked through a temporary copy inside `packages/core/src` since the shared package has no lint config.

No visual preview: the change is Markdown parsing with no UI surface.

PR: #3506
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Fable 5.1
@propr-dev

propr-dev Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

integry commented Nov 12, 2026

Copy link
Copy Markdown
Owner

Seven reviews in a row have each found another Markdown edge case in the hand-written parsing in packages/shared/src/acceptanceCriteria.ts (fences inside list items, fences on list-item lines, quoted fences, nested headings, varying indentation, hidden comments). Please stop patching cases one at a time and replace the hand-written line scanning with a real CommonMark/GFM parser.

  • Parse the issue body (and the agent's criteria report) into a syntax tree with the mdast family (mdast-util-from-markdown with the GFM extension, or unified + remark-parse + remark-gfm, matching the remark major version the UI already uses). Add it as a dependency of @propr/shared and keep the module usable in both Node and the browser bundle.
  • Find the acceptance-criteria section by walking heading nodes: the section runs from the matching heading to the next heading of the same or higher level. Criteria are the top-level list items of the lists in that section; nested list items belong to their parent criterion and are not separate criteria. Use the task-list checked field for checklist state.
  • Code nodes (fenced or indented), HTML nodes (including comments) and blockquotes are never a source of criteria or of reported statuses. Because the tree already separates them, no fence or indentation tracking of your own should remain.
  • Take each criterion's text from the node's source positions (slice the original string) so the wording shown to the agent and in the PR is exactly what the issue author wrote.
  • Keep the public functions and their return shapes unchanged so callers and existing tests do not change. Keep every existing test, including the regression tests added for the earlier findings; they should pass through the new implementation. Delete the helper code that the parser makes unnecessary rather than leaving it unused.
  • Keep the existing limits (maximum number of criteria, maximum length) and keep behaviour for issues with no acceptance-criteria section as it is.

Verify with the standard commands (typecheck, lint at zero warnings for the changed packages, the shared, core and root tests that cover acceptance criteria and review digest, and the UI build since @propr/shared is bundled there).

@propr-dev

propr-dev Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit d186160

Summary of Changes

I've replaced the hand-written line scanning in packages/shared/src/acceptanceCriteria.ts with an mdast/GFM syntax tree. All the checks you listed pass. To get there I changed the expected result in four existing test cases, and I added input-size limits because micromark is slow on some inputs. Both are explained below.

What the module does now

  • It parses both the issue body and the agent's report with mdast-util-from-markdown, using the GFM extension. These come from the same remark 4 family the UI already uses, at the versions already in the lockfile. They are now dependencies of @propr/shared, with @types/mdast as a dev dependency, and the lockfile entry is updated to match.
  • Finding the section: it finds the first "Acceptance criteria" heading, either at top level or inside a list item. The section runs to the next sibling heading of the same or higher level.
  • Criteria: they are the top-level items of the lists in that section. Nested items, and headings inside an item, are folded into their parent criterion.
  • Wording: the text is sliced from the original string, so links, emphasis and code appear as the author wrote them. Only HTML nodes are cut out.
  • What never counts: code (fenced or indented), HTML and block quotes are never a source of criteria or statements.
  • Statements in the report: they are read from paragraphs, headings and real GFM table rows.
  • All the fence, indentation, quote and comment tracking is deleted; the file is 264 lines, down from 496. The public functions, return shapes and the criteria count and length limits are unchanged, and an issue with no heading still returns nothing.

Test expectations I changed. In each case the old test expected something CommonMark doesn't do:

  1. In 3. Third followed by 4. Child of third, the 4. line is not a nested item. A list starting at 4 can't interrupt a paragraph, so GitHub shows it as part of the text. The test now uses 1. for the nested case, and I added a separate assertion for the 4. reading.
  2. An inline <!-- with no --> in the same paragraph isn't a comment, so GitHub shows it and the lines after it. I changed that case to a real comment block spanning several lines, which is still hidden. A new assertion pins down what happens with the unclosed one.
  3. Two cases expected a statement written inside a block quote to count. Under your rule they don't, so they now expect not_addressed.
  4. The parser reads a bare - [ ] with nothing after it as the text [ ], while GitHub shows an empty checkbox. This is the one place I kept a small text check, so such items are still dropped as the existing test expects.

Input limits (needs your call). micromark has quadratic cases. Some timings I measured:

  • 8,000 lazy continuation lines: 3.5s
  • 8,000 table rows: 9s
  • items nested on one line (- > - > …) overflow the stack at about 2,000 levels

So only the text before the first line past one of these limits is parsed:

  • 65,536 characters (GitHub's issue-body limit; the old limit was 200,000)
  • 2,000 lines
  • nine or more nested markers on one line (a - - - - thematic break is exempt)

This is a behaviour change for very long issues: criteria past those limits are lost. It's the same for very long agent reports, where the statements at the end would show as "not addressed". One worst case is still slow: about 3s for a single 64 KB paragraph of [a]( or [^a.

New tests cover: wording kept as written, a quoted heading, indented code, a thematic break, a real table in the report, and the limits on long and deeply nested input.

Verification

  • Tests: 8 files through run-test-suite.mjs all pass: the shared parser (22 tests), core prompt, PR template and review digest, and root linked-issue, review prompt, budget and digest publication.
  • Typecheck: root, packages/core, packages/shared and packages/api are clean.
  • Build: the shared and core builds pass, and the propr-ui build succeeds.
  • Lint: the new source passes eslint --max-warnings 0 under the core config, since shared has none of its own. The test file isn't covered by any lint config, so it wasn't linted. Root src/ is unchanged.

There's no preview, since nothing in the UI changed.


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @integry
  • Time: 23m 41s
  • Tokens: 3,301,695 (3,260,234 in / 41,461 out)
  • Cost: $2.00
  • Subscription usage: Weekly +1%, Fable +1%

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 6838228689✓

…hared/src/acceptanceCriteria.ts` with an mdast/GFM syntax tree. All the checks you listed pass. To get there I changed the expected result in four existing test cases, and I added input-size limits because micromark is slow on some inputs. Both are explained below.

I've replaced the hand-written line scanning in `packages/shared/src/acceptanceCriteria.ts` with an mdast/GFM syntax tree. All the checks you listed pass. To get there I changed the expected result in four existing test cases, and I added input-size limits because micromark is slow on some inputs. Both are explained below.

**What the module does now**
- It parses both the issue body and the agent's report with `mdast-util-from-markdown`, using the GFM extension. These come from the same remark 4 family the UI already uses, at the versions already in the lockfile. They are now dependencies of `@propr/shared`, with `@types/mdast` as a dev dependency, and the lockfile entry is updated to match.
- **Finding the section:** it finds the first "Acceptance criteria" heading, either at top level or inside a list item. The section runs to the next sibling heading of the same or higher level.
- **Criteria:** they are the top-level items of the lists in that section. Nested items, and headings inside an item, are folded into their parent criterion.
- **Wording:** the text is sliced from the original string, so links, emphasis and code appear as the author wrote them. Only HTML nodes are cut out.
- **What never counts:** code (fenced or indented), HTML and block quotes are never a source of criteria or statements.
- **Statements in the report:** they are read from paragraphs, headings and real GFM table rows.
- All the fence, indentation, quote and comment tracking is deleted; the file is 264 lines, down from 496. The public functions, return shapes and the criteria count and length limits are unchanged, and an issue with no heading still returns nothing.

**Test expectations I changed.** In each case the old test expected something CommonMark doesn't do:
1. In `   3. Third` followed by `      4. Child of third`, the `4.` line is not a nested item. A list starting at 4 can't interrupt a paragraph, so GitHub shows it as part of the text. The test now uses `1.` for the nested case, and I added a separate assertion for the `4.` reading.
2. An inline `<!--` with no `-->` in the same paragraph isn't a comment, so GitHub shows it and the lines after it. I changed that case to a real comment block spanning several lines, which is still hidden. A new assertion pins down what happens with the unclosed one.
3. Two cases expected a statement written inside a block quote to count. Under your rule they don't, so they now expect `not_addressed`.
4. The parser reads a bare `- [ ]` with nothing after it as the text `[ ]`, while GitHub shows an empty checkbox. This is the one place I kept a small text check, so such items are still dropped as the existing test expects.

**Input limits (needs your call).** micromark has quadratic cases. Some timings I measured:
- 8,000 lazy continuation lines: 3.5s
- 8,000 table rows: 9s
- items nested on one line (`- > - > …`) overflow the stack at about 2,000 levels

So only the text before the first line past one of these limits is parsed:
- 65,536 characters (GitHub's issue-body limit; the old limit was 200,000)
- 2,000 lines
- nine or more nested markers on one line (a `- - - -` thematic break is exempt)

This is a behaviour change for very long issues: criteria past those limits are lost. It's the same for very long agent reports, where the statements at the end would show as "not addressed". One worst case is still slow: about 3s for a single 64 KB paragraph of `[a](` or `[^a`.

**New tests** cover: wording kept as written, a quoted heading, indented code, a thematic break, a real table in the report, and the limits on long and deeply nested input.

**Verification**
- **Tests:** 8 files through `run-test-suite.mjs` all pass: the shared parser (22 tests), core prompt, PR template and review digest, and root linked-issue, review prompt, budget and digest publication.
- **Typecheck:** root, `packages/core`, `packages/shared` and `packages/api` are clean.
- **Build:** the shared and core builds pass, and the `propr-ui` build succeeds.
- **Lint:** the new source passes `eslint --max-warnings 0` under the core config, since shared has none of its own. The test file isn't covered by any lint config, so it wasn't linted. Root `src/` is unchanged.

There's no preview, since nothing in the UI changed.

PR: #3506
Comment by: @integry (ID: 6838228689)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR connects acceptance criteria to implementation prompts, review digests, timeline records, and reviewer prompts. The CommonMark/GFM migration is substantial, but two parser behaviors still need correction before merge.

✅ End-to-end integration — Criteria reach publication through issueBody, and structured results are retained in the review digest metadata.

✅ Structural Markdown parsing — Criteria and reports use an mdast tree, with regression coverage for nested lists, fences, blockquotes, and headings.

✅ Review budget preservation — The changed budget tests verify that criteria remain in every reviewer’s prompt.

This review is based on static inspection only; no commands were run. The supplied current-head status reports zero failures and three pending checks.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F11: 🔴 Preserve whitespace within criterion literals

  • Required behavior: The authorized follow-up requires criterion wording to be preserved from the original source. Whitespace inside code literals can be part of the requirement.

  • Evidence: packages/shared/src/acceptanceCriteria.ts, joinParts

    1. An issue contains ## Acceptance criteria followed by - Preserve the exact string `a b`..
    2. inlineSource correctly slices the original wording, including the two spaces.
    3. joinParts applies part.replace(/\s+/g, ' ') to the entire source slice, changing the literal to `a b`.
    4. formatAcceptanceCriteriaList supplies this altered requirement to the implementation and review prompts, and the digest records the altered wording.

    static trace: The unconditional whitespace replacement demonstrably changes the literal before any caller receives it. Source-position extraction does not protect against this subsequent transformation. Existing source-preservation tests cover Markdown formatting but not significant whitespace within literals.

  • Minimum fix: Preserve whitespace within source-backed inline literals when normalizing continuation lines and combining nested items. Add a regression asserting that a criterion containing a literal with consecutive spaces retains those spaces.

F12: 🔴 Do not discard criteria after harmless code examples

  • Required behavior: Code nodes must not supply criteria, but code examples must not prevent subsequent valid acceptance criteria from being extracted.

  • Evidence: packages/shared/src/acceptanceCriteria.ts, parsedSource and TOO_DEEP

    1. An issue begins with a fenced text example whose content includes > > > > > > > > > example.
    2. After the closing fence, the issue contains ## Acceptance criteria and - Works.
    3. Before Markdown parsing occurs, parsedSource matches the example’s content against TOO_DEEP and returns only the prefix preceding that line.
    4. The parser receives an unfinished code fence without the acceptance heading. Extraction returns [], so implementation prompts, review prompts, and publication digests all omit the valid checklist.

    static trace: This short input reaches the depth cutoff despite containing no deeply nested Markdown containers: the markers are literal fenced-code content. The AST exclusions cannot help because truncation happens before the tree exists. Existing tests explicitly cover truncation for actual nesting, but do not distinguish this harmless code-example case.

  • Minimum fix: Make the parser resource protection distinguish actual expensive structure from literal code content without silently discarding subsequent valid criteria. Add a regression with the fenced example above followed by a valid checklist.

Suggestions

These are optional follow-ups and are not sent to /fix.

No suggestions.

Score

The integration and regression coverage are strong, but source wording can change and valid checklists can disappear. Both defects require correction; pending checks alone do not lower the score.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 15s
  • Tokens: 69,535 (68,017 in / 1,518 out)
  • Cost: $0.65

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F11 F12

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 7f300a7

Addressed 1 AI review comment (IDs: 6839146910)

Addressed findings F11, F12

Summary of Changes

That notification is the depth-measurement probe I started earlier. It was stopped at its background time limit while timing the largest nesting depths. I already had the numbers I needed from its earlier output, the probe file has been removed from the workspace, and nothing in the delivered change depends on it. No further action is needed.


🤖 Implementation Details

  • Model: Claude Fable 5.1 (medium)
  • Requested By: @propr-ultrafix
  • Time: 16m 2s
  • Tokens: 1,546,997 (1,546,133 in / 864 out)
  • Cost: $1.46
  • Subscription usage: Weekly +1%, Fable +1%

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

…earlier. It was stopped at its background time limit while timing the largest nesting depths. I already had the numbers I needed from its earlier output, the probe file has been removed from the workspace, and nothing in the delivered change depends on it. No further action is needed.

That notification is the depth-measurement probe I started earlier. It was stopped at its background time limit while timing the largest nesting depths. I already had the numbers I needed from its earlier output, the probe file has been removed from the workspace, and nothing in the delivered change depends on it. No further action is needed.

PR: #3506
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Fable 5.1
@propr-dev

propr-dev Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: Full Test Suite Shard 2/4

Please investigate and fix this CI failure.

  • Check: Full Test Suite Shard 2/4
  • Result: failure
  • Commit: 7f300a738af0 (7f300a738af0e0c21d84ead252d4dc35ffe49b5a)
  • Details: View CI failure

Failure evidence

.github:11
Process completed with exit code 1.

.github:34540
Process completed with exit code 1.

.github:2
Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@11d5960. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/

@propr-dev

propr-dev Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 35d7386

Summary of Changes

I fixed the failing Shard 2/4 test, and it now passes when I run it locally.

What failed: one test failed: test/notificationPublicEntrypoint.test.ts, with Cannot find package 'mdast-util-from-markdown' imported from …/node_modules/@propr/shared/dist/acceptanceCriteria.js. That test builds @propr/shared into a temporary node_modules folder to mimic an installed copy of the package. It only linked zod there, because zod used to be the only runtime package the built code imported. The switch to the mdast parser added four more (mdast-util-from-markdown, mdast-util-gfm, mdast-util-to-string, micromark-extension-gfm), so the test's import of the built package failed.

Fix: the test now reads packages/shared/package.json and links every listed dependency that is installed in the workspace node_modules, instead of linking zod alone. If the shared package gains another dependency later, this test won't need editing again. The parser and its dependency list are unchanged.

Checked: no other test builds the package this way. I only ran this one test file, not the whole shard.

There's no visual preview because this is a test-only change.


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-dev[bot]
  • Time: 5m 14s
  • Tokens: 540,223 (537,323 in / 2,900 out)
  • Cost: $0.39

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 6839691949✓

…I run it locally.

I fixed the failing Shard 2/4 test, and it now passes when I run it locally.

**What failed:** one test failed: `test/notificationPublicEntrypoint.test.ts`, with `Cannot find package 'mdast-util-from-markdown' imported from …/node_modules/@propr/shared/dist/acceptanceCriteria.js`. That test builds `@propr/shared` into a temporary `node_modules` folder to mimic an installed copy of the package. It only linked `zod` there, because `zod` used to be the only runtime package the built code imported. The switch to the mdast parser added four more (`mdast-util-from-markdown`, `mdast-util-gfm`, `mdast-util-to-string`, `micromark-extension-gfm`), so the test's import of the built package failed.

**Fix:** the test now reads `packages/shared/package.json` and links every listed dependency that is installed in the workspace `node_modules`, instead of linking `zod` alone. If the shared package gains another dependency later, this test won't need editing again. The parser and its dependency list are unchanged.

**Checked:** no other test builds the package this way. I only ran this one test file, not the whole shard.

There's no visual preview because this is a test-only change.

PR: #3506
Comment by: @propr-dev[bot] (ID: 6839691949)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR connects acceptance criteria to implementation prompts, review prompts, digests, and timeline records, with substantial regression coverage. It needs a localized correction before merging: preprocessing can turn quoted example text into a reported success.

✅ End-to-end integration — Criteria reach the implementation prompt, publication digest, persisted timeline metadata, and each reviewer.

✅ Syntax-tree parsing — The new mdast dependencies and traversal distinguish ordinary lists from fenced code, HTML blocks, and blockquotes.

The supplied checks show 23 passed, none failed, and one pending. This review used static analysis only; no commands were run.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F13: 🔴 Blanking deep containers exposes quoted statuses

  • Required behavior: The authorized follow-up requires blockquotes never to supply reported statuses. The digest must not attribute quoted examples to the agent.

  • Evidence: packages/shared/src/acceptanceCriteria.ts, parsedSource and statementLines

    1. An agent report contains - AC1: not met — implementation missing, followed by a blank line, then > > > > > > > > > Example:, then an unprefixed AC1: met — illustrative example.
    2. In CommonMark, the final line is a lazy continuation of the paragraph inside the nested blockquotes, so it should be excluded.
    3. TOO_DEEP matches the quote-opening line, and parsedSource replaces it with an empty line before constructing the syntax tree.
    4. The parser consequently sees the final line as an ordinary top-level paragraph. statementLines accepts it, and evaluateAcceptanceCriteria overwrites the real not_met statement with met.
    5. The digest then displays and persists a successful criterion based solely on quoted example text.

    static trace: This follows directly from the preprocessing, paragraph traversal, and last-statement-wins map in the supplied diff. The blockquote exclusion cannot protect text whose enclosing quote was removed before parsing. Existing deep-quote tests place the entire statement on the discarded line; they do not cover its lazy continuation.

  • Minimum fix: Make the depth safeguard conservative: do not remove a container-opening line and then interpret its continuation as ordinary Markdown. Preserve exclusion semantics or stop parsing at the unsupported construct. Add a regression asserting that the quoted continuation cannot overwrite the real not_met statement.

Suggestions

These are optional follow-ups and are not sent to /fix.

S4: 🟢 Document input parsing limits

The documentation describes the 20-criterion and 300-character limits, but parsedSource also stops after 2,000 lines or 65,536 characters. Documenting those limits would explain why criteria or final statements beyond them are absent. This is an optional documentation improvement.

Score

The integration and regression coverage are strong, but the depth safeguard still permits a false successful status in the published and persisted checklist. A localized parser-boundary correction is required.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 54s
  • Tokens: 69,810 (68,642 in / 1,168 out)
  • Cost: $0.61

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F13 S4

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 90e5976

Addressed 1 AI review comment (IDs: 6840091892)

Addressed finding F13

Summary of Changes

The fix for F13 is complete and verified. No visual preview applies, since the change is in Markdown parsing with no UI.

What was wrong. The depth safeguard in packages/shared/src/acceptanceCriteria.ts replaced any line opening nine or more containers with a blank line before parsing. A blank line ends the block it sits in. So a report like the one in the finding, with > > > > > > > > > Example: followed by an unprefixed AC1: met — illustrative example, lost its quote, and the lazy continuation became a top-level paragraph that overwrote the real not_met. I reproduced that, and also the sibling case the same assumption breaks: a deep line inside an HTML block, where blanking ended the block early and exposed the lines after it.

The correction. A too-deep line is no longer blanked. Its containers are capped at eight instead: the first seven markers are kept as written, the eighth is kept too unless any dropped marker was a block quote, in which case it becomes a quote. The text after the markers becomes that container's content. The consequences:

  • A quoted paragraph stays quoted, so its lazy continuations stay quoted and are excluded.
  • An HTML block is no longer cut short by a synthetic blank line.
  • The leading markers and indentation are preserved, so a deep line that is literal fenced-code content inside a quote or list item stays code, and still hides nothing after it.
  • A blank line or a list item after the deep line still ends the quote, as in CommonMark, so a real statement there still counts.

Cost. The HEAD parser already accepted eight-deep lines uncapped. I timed the capped worst cases, including 2,000 capped lines and an incremental nesting of depth 712, against the HEAD parser on equivalent eight-deep input. They are within the same range, so no new cost envelope opened. The existing two-second bound test still passes.

Regressions added in packages/shared/test/acceptanceCriteria.test.ts: the exact finding scenario, a repeated quoted statement, mixed list and quote chains, a quote only beyond the cap, the HTML-block variant, a deep line inside a quoted fence, the cases where a blank line or list item legitimately ends the quote, and an extraction case showing a capped list line reads as nested content. The new test fails against the HEAD parser and passes now.

Verification. All 25 parser tests pass, and the six parser and consumer suites pass through the suite runner after rebuilding the shared package output. The shared package typechecks. The parser source passes the core ESLint config with zero warnings.

Independent observation, not changed. The core ESLint config does not cover test files in the shared package, so that test file has no lint gate at all, which was also true before this change.


🤖 Implementation Details

  • Model: Claude Fable 5.1 (high)
  • Requested By: @propr-ultrafix
  • Time: 13m 32s
  • Tokens: 1,628,835 (1,587,085 in / 41,750 out)
  • Cost: $3.62

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

… applies, since the change is in Markdown parsing with no UI.

The fix for F13 is complete and verified. No visual preview applies, since the change is in Markdown parsing with no UI.

**What was wrong.** The depth safeguard in `packages/shared/src/acceptanceCriteria.ts` replaced any line opening nine or more containers with a blank line before parsing. A blank line ends the block it sits in. So a report like the one in the finding, with `> > > > > > > > > Example:` followed by an unprefixed `AC1: met — illustrative example`, lost its quote, and the lazy continuation became a top-level paragraph that overwrote the real `not_met`. I reproduced that, and also the sibling case the same assumption breaks: a deep line inside an HTML block, where blanking ended the block early and exposed the lines after it.

**The correction.** A too-deep line is no longer blanked. Its containers are capped at eight instead: the first seven markers are kept as written, the eighth is kept too unless any dropped marker was a block quote, in which case it becomes a quote. The text after the markers becomes that container's content. The consequences:

- A quoted paragraph stays quoted, so its lazy continuations stay quoted and are excluded.
- An HTML block is no longer cut short by a synthetic blank line.
- The leading markers and indentation are preserved, so a deep line that is literal fenced-code content inside a quote or list item stays code, and still hides nothing after it.
- A blank line or a list item after the deep line still ends the quote, as in CommonMark, so a real statement there still counts.

**Cost.** The HEAD parser already accepted eight-deep lines uncapped. I timed the capped worst cases, including 2,000 capped lines and an incremental nesting of depth 712, against the HEAD parser on equivalent eight-deep input. They are within the same range, so no new cost envelope opened. The existing two-second bound test still passes.

**Regressions added** in `packages/shared/test/acceptanceCriteria.test.ts`: the exact finding scenario, a repeated quoted statement, mixed list and quote chains, a quote only beyond the cap, the HTML-block variant, a deep line inside a quoted fence, the cases where a blank line or list item legitimately ends the quote, and an extraction case showing a capped list line reads as nested content. The new test fails against the HEAD parser and passes now.

**Verification.** All 25 parser tests pass, and the six parser and consumer suites pass through the suite runner after rebuilding the shared package output. The shared package typechecks. The parser source passes the core ESLint config with zero warnings.

**Independent observation, not changed.** The core ESLint config does not cover test files in the shared package, so that test file has no lint gate at all, which was also true before this change.

PR: #3506
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Fable 5.1
@propr-dev

propr-dev Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR is ready to merge within the reviewed scope. It adds acceptance-criteria extraction, implementation and review prompts, and persisted digest results, using a CommonMark/GFM syntax tree as requested.

✅ Syntax-aware extraction — The shared parser excludes fenced and indented code, blockquotes, and HTML nodes, with regression coverage for nested lists and Markdown boundaries.

✅ Complete integration — Criteria flow from the issue body into implementation prompts, PR digests, timeline metadata, and reviewer prompts; budget tests verify their retention.

✅ Clear reporting provenance — Digest wording identifies statuses as agent statements and distinguishes missing statements from unmet criteria.

This was a static review of the supplied diff and context; no commands were run. Current-head checks report 24 passed, none failed or pending, and 17 neutral/skipped.

Merge blockers

No merge blockers.

Suggestions

These are optional follow-ups and are not sent to /fix.

No suggestions.

Score

The implementation satisfies the effective objective with extensive regression and integration coverage. The supplied checks support merge readiness; live agent behavior was not independently verified during this review.

Score: 9/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 19s
  • Tokens: 71,696 (70,669 in / 1,027 out)
  • Cost: $0.65

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

🤖 Review by ProPR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant