From 72ef9e97225c494296cf9bf7716ffff5860f4e93 Mon Sep 17 00:00:00 2001 From: Nguyen Quang Huy <31732865+huynguyen03dev@users.noreply.github.com> Date: Sat, 6 Dec 2025 10:26:04 +0700 Subject: [PATCH 1/2] fix: use backticks for quoted phrase in code-review description (#1025) Replace 'looks good' with `looks good` to avoid nested single quote issues when IDEs generate command files from workflow YAML. Co-authored-by: Brian --- .../bmm/workflows/4-implementation/code-review/workflow.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/bmm/workflows/4-implementation/code-review/workflow.yaml b/src/modules/bmm/workflows/4-implementation/code-review/workflow.yaml index bea3b9dc..c055db20 100644 --- a/src/modules/bmm/workflows/4-implementation/code-review/workflow.yaml +++ b/src/modules/bmm/workflows/4-implementation/code-review/workflow.yaml @@ -1,6 +1,6 @@ # Review Story Workflow name: code-review -description: "Perform an ADVERSARIAL Senior Developer code review that finds 3-10 specific problems in every story. Challenges everything: code quality, test coverage, architecture compliance, security, performance. NEVER accepts 'looks good' - must find minimum issues and can auto-fix with user approval." +description: "Perform an ADVERSARIAL Senior Developer code review that finds 3-10 specific problems in every story. Challenges everything: code quality, test coverage, architecture compliance, security, performance. NEVER accepts `looks good` - must find minimum issues and can auto-fix with user approval." author: "BMad" # Critical variables from config From c95b65f462f93ef3c4443975ff2bcbf71b83cfc3 Mon Sep 17 00:00:00 2001 From: Alex Verkhovsky Date: Fri, 5 Dec 2025 19:27:11 -0800 Subject: [PATCH 2/2] fix(bmm): correct code-review workflow status logic and checklist (#1015) (#1028) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix checklist to only accept 'review' status (not 'ready-for-review') - Include MEDIUM issues in done/in-progress status determination - Initialize and track fixed_count/action_count variables for summary - Add sprint-status.yaml sync when story status changes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude --- .../code-review/checklist.md | 3 +- .../code-review/instructions.xml | 54 +++++++++++++++++-- 2 files changed, 53 insertions(+), 4 deletions(-) rename src/modules/{bmgd/workflows/4-production => bmm/workflows/4-implementation}/code-review/checklist.md (90%) diff --git a/src/modules/bmgd/workflows/4-production/code-review/checklist.md b/src/modules/bmm/workflows/4-implementation/code-review/checklist.md similarity index 90% rename from src/modules/bmgd/workflows/4-production/code-review/checklist.md rename to src/modules/bmm/workflows/4-implementation/code-review/checklist.md index ce903701..f213a6b9 100644 --- a/src/modules/bmgd/workflows/4-production/code-review/checklist.md +++ b/src/modules/bmm/workflows/4-implementation/code-review/checklist.md @@ -1,7 +1,7 @@ # Senior Developer Review - Validation Checklist - [ ] Story file loaded from `{{story_path}}` -- [ ] Story Status verified as one of: {{allow_status_values}} +- [ ] Story Status verified as reviewable (review) - [ ] Epic and Story IDs resolved ({{epic_num}}.{{story_num}}) - [ ] Story Context located or warning recorded - [ ] Epic Tech Spec located or warning recorded @@ -17,6 +17,7 @@ - [ ] Review notes appended under "Senior Developer Review (AI)" - [ ] Change Log updated with review entry - [ ] Status updated according to settings (if enabled) +- [ ] Sprint status synced (if sprint tracking enabled) - [ ] Story saved successfully _Reviewer: {{user_name}} on {{date}}_ diff --git a/src/modules/bmm/workflows/4-implementation/code-review/instructions.xml b/src/modules/bmm/workflows/4-implementation/code-review/instructions.xml index 6e896a97..bf8b7d69 100644 --- a/src/modules/bmm/workflows/4-implementation/code-review/instructions.xml +++ b/src/modules/bmm/workflows/4-implementation/code-review/instructions.xml @@ -16,6 +16,7 @@ Use provided {{story_path}} or ask user which story file to review Read COMPLETE story file + Set {{story_key}} = extracted key from filename (e.g., "1-2-user-authentication.md" → "1-2-user-authentication") or story metadata Parse sections: Story, Acceptance Criteria, Tasks/Subtasks, Dev Agent Record → File List, Change Log @@ -106,6 +107,8 @@ Categorize findings: HIGH (must fix), MEDIUM (should fix), LOW (nice to fix) + Set {{fixed_count}} = 0 + Set {{action_count}} = 0 **đŸ”Ĩ CODE REVIEW FINDINGS, {user_name}!** @@ -145,11 +148,15 @@ Add/update tests as needed Update File List in story if files changed Update story Dev Agent Record with fixes applied + Set {{fixed_count}} = number of HIGH and MEDIUM issues fixed + Set {{action_count}} = 0 Add "Review Follow-ups (AI)" subsection to Tasks/Subtasks For each issue: `- [ ] [AI-Review][Severity] Description [file:line]` + Set {{action_count}} = number of action items created + Set {{fixed_count}} = 0 @@ -158,11 +165,52 @@ - - If all HIGH issues fixed and ACs implemented → Update story Status to "done" - If issues remain → Update story Status to "in-progress" + + + + Set {{new_status}} = "done" + Update story Status field to "done" + + + Set {{new_status}} = "in-progress" + Update story Status field to "in-progress" + Save story file + + + Set {{current_sprint_status}} = "enabled" + + + Set {{current_sprint_status}} = "no-sprint-tracking" + + + + + Load the FULL file: {sprint_status} + Find development_status key matching {{story_key}} + + + Update development_status[{{story_key}}] = "done" + Save file, preserving ALL comments and structure + ✅ Sprint status synced: {{story_key}} → done + + + + Update development_status[{{story_key}}] = "in-progress" + Save file, preserving ALL comments and structure + 🔄 Sprint status synced: {{story_key}} → in-progress + + + + âš ī¸ Story file updated, but sprint-status sync failed: {{story_key}} not found in sprint-status.yaml + + + + + â„šī¸ Story status updated (no sprint tracking configured) + + **✅ Review Complete!** **Story Status:** {{new_status}}