feat(01KW5W08): BMad adapter derives per-AC verification markers at scan time so the reviewer stops stalling on manual-check-required (#447)#451
Merged
jackmcintyre merged 1 commit intoJun 29, 2026
Conversation
…can time so the reviewer stops stalling on manual-check-required (#447) BMad source-story ACs carry no inline vitest:/artifact: markers, so every BMad AC classified manual-check-required and the verdict deterministically stalled /flow:run on a marker-only gap (recurred 5x across Epic 1). This adds a shared deriveBmadAcVerification helper that mines a verification target from each AC own signals — a test-file path cited in the AC prose (vitest, either kind), the implementation-artifact path convention for integration ACs (artifact), or a test referenced in the story implementation notes for unit ACs (vitest) — and emits a marker ONLY when that target resolves on the tree being checked, falling back to manual otherwise so no non-existent path is ever fabricated (the #422-mirror risk). parseBmadStory gains an optional repoRoot to derive+resolve at scan time (persisted into the manifest via the BMad adapter), and runReviewerSession re-derives against the PR-branch worktree when an AC has no inline marker, upgrading manual-check-required to runnable-vitest/runnable-artifact only when the target genuinely exists there. Native stories are untouched (derivation is gated to the BMad adapter and the manual branch, which native ACs never reach).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
BMad adapter derives per-AC verification markers at scan time so the reviewer stops stalling on manual-check-required (#447)
This change delivers the following acceptance criteria:
Why
As an operator, I want BMad source-story acceptance criteria to become mechanically verifiable at review without me hand-adding vitest:/artifact: markers to gitignored source files, so that a /flow:run over a BMad repo does not stall on needs-human-decision for a marker-only gap (this recurred 5x across Epic 1 - stories 1.3/1.4/1.6/1.7/1.8).
How to check it yourself
Unit (AC1/AC2): pnpm exec vitest run src/adapters/bmad/tests/parse-bmad-story-ac-headings.test.ts — covers deriving a vitest marker from a test path cited in AC prose and in dev notes, the integration artifact-convention marker, the integration-vs-unit notes split, and the manual fallback when a candidate target does not resolve on disk or no repoRoot is supplied. Integration (AC3): pnpm exec vitest run src/tools/tests/run-reviewer-session.test.ts — the new BMad case scans a real BMad workspace (asserts the to-do manifest carries the derived artifact + vitest markers), then runs runReviewerSession against a worktree containing those targets and asserts AC1 classifies runnable-artifact-check, AC2 runnable-vitest, and a signal-less AC3 still falls back to manual-check-required.
Risk and blast radius
Risk tier: medium
The change is scoped to the files in the diff below. Review the diff to judge its actual blast radius — including any effect on shared state, data schemas, or authentication paths — before approving.
What is explicitly not covered: reviewer verification of this summary's accuracy is handled by a separate companion story.
Evidence
The pre-pull-request build-and-test gate passed before this pull request was opened. No pull request can be opened by the automated flow unless both
pnpm buildandpnpm testexit 0 in the developer's working directory.Per-criterion covering checks:
plugins/flow/mcp-server/src/adapters/bmad/__tests__/parse-bmad-story-ac-headings.test.ts(automated test)plugins/flow/mcp-server/src/adapters/bmad/__tests__/parse-bmad-story-ac-headings.test.ts(automated test)plugins/flow/mcp-server/src/tools/__tests__/run-reviewer-session.test.ts(automated test)Story: native:01KW5W081X3TJPQBCYF3WAK9RZ
Spec: .flow/native-stories/01KW5W081X3TJPQBCYF3WAK9RZ.md
ACs:
Derive per-AC verification markers for BMad stories at scan + review so the reviewer stops stalling on manual-check-required
Closes #447