From 13fa25575049c69aff62961cd991dd8ca6111876 Mon Sep 17 00:00:00 2001 From: Oneby Wang <891734032@qq.com> Date: Tue, 2 Jun 2026 19:45:52 +0800 Subject: [PATCH] Fix dev-story and code-review bug --- .../bmad-code-review/steps/step-04-present.md | 6 +- .../4-implementation/bmad-dev-story/SKILL.md | 57 +++++++++---------- .../bmad-dev-story/checklist.md | 4 +- 3 files changed, 31 insertions(+), 36 deletions(-) diff --git a/src/bmm-skills/4-implementation/bmad-code-review/steps/step-04-present.md b/src/bmm-skills/4-implementation/bmad-code-review/steps/step-04-present.md index 1697c769c..455b4bbce 100644 --- a/src/bmm-skills/4-implementation/bmad-code-review/steps/step-04-present.md +++ b/src/bmm-skills/4-implementation/bmad-code-review/steps/step-04-present.md @@ -42,7 +42,7 @@ Otherwise add: `Findings are listed above. No story file was provided, so nothin ### 4. Resolve decision-needed findings -If `decision_needed` findings exist, present each one with its detail and the options available. The user must decide — the correct fix is ambiguous without their input. Walk through each finding (or batch related ones) and get the user's call. Once resolved, each becomes a `patch`, `defer`, or is dismissed. +If `decision-needed` findings exist, present each one with its detail and the options available. The user must decide — the correct fix is ambiguous without their input. Walk through each finding (or batch related ones) and get the user's call. Once resolved, each becomes a `patch`, `defer`, or is dismissed. If the user chooses to defer, ask: Quick one-line reason for deferring this item? (helps future reviews): — then append that reason to both the story file bullet and the `{deferred_work_file}` entry. @@ -87,7 +87,7 @@ Skip this section if `{spec_file}` is not set. #### Determine new status based on review outcome - If all `decision-needed` and `patch` findings were resolved (fixed or dismissed) AND no unresolved HIGH/MEDIUM issues remain: set `{new_status}` = `done`. Update the story file Status section to `done`. -- If `patch` findings were left as action items, or unresolved issues remain: set `{new_status}` = `in-progress`. Update the story file Status section to `in-progress`. +- If `patch` findings were left as action items, or unresolved issues remain: set `{new_status}` = `ready-for-dev`. Update the story file Status section to `ready-for-dev`. Save the story file. @@ -119,7 +119,7 @@ If `{sprint_status}` file does not exist, note that story status was updated in Present the user with follow-up options: > **What would you like to do next?** -> 1. **Start the next story** — run `dev-story` to pick up the next `ready-for-dev` story +> 1. **Continue development** — run `dev-story` to pick up the reviewed story or the next `ready-for-dev` story > 2. **Re-run code review** — address findings and review again > 3. **Done** — end the workflow diff --git a/src/bmm-skills/4-implementation/bmad-dev-story/SKILL.md b/src/bmm-skills/4-implementation/bmad-dev-story/SKILL.md index a55bc2f92..91d6169b8 100644 --- a/src/bmm-skills/4-implementation/bmad-dev-story/SKILL.md +++ b/src/bmm-skills/4-implementation/bmad-dev-story/SKILL.md @@ -10,7 +10,7 @@ description: 'Execute story implementation following a context filled story spec **Your Role:** Developer implementing the story. - Communicate all responses in {communication_language} and language MUST be tailored to {user_skill_level} - Generate all documents in {document_output_language} -- Only modify the story file in these areas: YAML frontmatter `baseline_commit`, Tasks/Subtasks checkboxes, Dev Agent Record (Debug Log, Completion Notes), File List, Change Log, and Status +- Only modify the story file in these areas: YAML frontmatter `baseline_commit`, Tasks/Subtasks checkboxes, Review Findings checkboxes, Dev Agent Record (Debug Log, Completion Notes), File List, Change Log, and Status - Execute ALL steps in exact order; do NOT skip steps - Absolutely DO NOT stop because of "milestones", "significant progress", or "session boundaries". Continue in a single execution until the story is COMPLETE (all ACs satisfied and all tasks/subtasks checked) UNLESS a HALT condition is triggered or the USER gives other instruction. - Do NOT schedule a "next session" or request review pauses unless a HALT condition applies. Only Step 9 decides completion. @@ -76,7 +76,7 @@ Activation is complete. If `activation_steps_prepend` or `activation_steps_appen Communicate all responses in {communication_language} and language MUST be tailored to {user_skill_level} Generate all documents in {document_output_language} - Only modify the story file in these areas: YAML frontmatter `baseline_commit`, Tasks/Subtasks checkboxes, Dev Agent Record (Debug Log, Completion Notes), File List, + Only modify the story file in these areas: YAML frontmatter `baseline_commit`, Tasks/Subtasks checkboxes, Review Findings checkboxes, Dev Agent Record (Debug Log, Completion Notes), File List, Change Log, and Status Execute ALL steps in exact order; do NOT skip steps Absolutely DO NOT stop because of "milestones", "significant progress", or "session boundaries". Continue in a single execution @@ -223,31 +223,33 @@ Activation is complete. If `activation_steps_prepend` or `activation_steps_appen Determine if this is a fresh start or continuation after code review - Check if "Senior Developer Review (AI)" section exists in the story file - Check if "Review Follow-ups (AI)" subsection exists under Tasks/Subtasks + Check if a "Review Findings" subsection exists under Tasks/Subtasks + Count unchecked [ ] items marked "[Review][Decision]" in "Review Findings" + Count unchecked [ ] items marked "[Review][Patch]" in "Review Findings" - + + ⚠️ **Review Decision Required** + + This story still has unresolved `[Review][Decision]` findings. These require user/code-review workflow decisions before development can continue. + + Return to `code-review` or resolve the decision items into patch, defer, or dismiss outcomes before running `dev-story` again. + + HALT - unresolved review decisions must be resolved before development + + + Set review_continuation = true - Extract from "Senior Developer Review (AI)" section: - - Review outcome (Approve/Changes Requested/Blocked) - - Review date - - Total action items with checkboxes (count checked vs unchecked) - - Severity breakdown (High/Med/Low counts) - - Count unchecked [ ] review follow-up tasks in "Review Follow-ups (AI)" subsection - Store list of unchecked review items as {{pending_review_items}} + Store list of unchecked [Review][Patch] items as {{pending_review_items}} - ⏯️ **Resuming Story After Code Review** ({{review_date}}) + ⏯️ **Resuming Story After Code Review** - **Review Outcome:** {{review_outcome}} - **Action Items:** {{unchecked_review_count}} remaining to address - **Priorities:** {{high_count}} High, {{med_count}} Medium, {{low_count}} Low + **Review Findings:** {{unchecked_review_count}} remaining to address - **Strategy:** Will prioritize review follow-up tasks (marked [AI-Review]) before continuing with regular tasks. + **Strategy:** Will prioritize Review Findings tasks marked `[Review][Patch]` before continuing with regular tasks. - + Set review_continuation = false Set {{pending_review_items}} = empty @@ -366,24 +368,17 @@ Activation is complete. If `activation_steps_prepend` or `activation_steps_appen Validate that ALL acceptance criteria related to this task are satisfied Run full test suite to ensure NO regressions introduced - - - Extract review item details (severity, description, related AC/file) + + + Extract review item details (description and related file/line if present) Add to resolution tracking list: {{resolved_review_items}} - - - Mark task checkbox [x] in "Tasks/Subtasks → Review Follow-ups (AI)" section - - - Find matching action item in "Senior Developer Review (AI) → Action Items" section by matching description - Mark that action item checkbox [x] as resolved - - Add to Dev Agent Record → Completion Notes: "✅ Resolved review finding [{{severity}}]: {{description}}" + Prepare review finding completion note: "✅ Resolved review finding: {{description}}" ONLY THEN mark the task (and subtasks) checkbox with [x] + If this is a review finding task, this marks the item in "Tasks/Subtasks → Review Findings" and records the prepared review finding completion note Update File List section with ALL new, modified, or deleted files (paths relative to repo root) Add completion notes to Dev Agent Record summarizing what was ACTUALLY implemented and tested diff --git a/src/bmm-skills/4-implementation/bmad-dev-story/checklist.md b/src/bmm-skills/4-implementation/bmad-dev-story/checklist.md index 86d6e9be5..401348956 100644 --- a/src/bmm-skills/4-implementation/bmad-dev-story/checklist.md +++ b/src/bmm-skills/4-implementation/bmad-dev-story/checklist.md @@ -12,7 +12,7 @@ optional-inputs: - 'CI logs' - 'Linting reports' validation-rules: - - 'Only permitted story sections modified: Tasks/Subtasks checkboxes, Dev Agent Record, File List, Change Log, Status' + - 'Only permitted story sections modified: Tasks/Subtasks checkboxes, Review Findings checkboxes, Dev Agent Record, File List, Change Log, Status' - 'All implementation requirements from story Dev Notes must be satisfied' - 'Definition of Done checklist must pass completely' - 'Enhanced story context must contain sufficient technical guidance' @@ -52,7 +52,7 @@ validation-rules: - [ ] **File List Complete:** File List includes EVERY new, modified, or deleted file (paths relative to repo root) - [ ] **Dev Agent Record Updated:** Contains relevant Implementation Notes and/or Debug Log for this work - [ ] **Change Log Updated:** Change Log includes clear summary of what changed and why -- [ ] **Review Follow-ups:** All review follow-up tasks (marked [AI-Review]) completed and corresponding review items marked resolved (if applicable) +- [ ] **Review Findings:** All review findings tasks (marked [Review][Patch]) completed and corresponding review items marked resolved (if applicable) - [ ] **Story Structure Compliance:** Only permitted sections of story file were modified ## 🔚 Final Status Verification