@devo-bmad-custom/agent-orchestration 1.0.4 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/package.json +1 -1
  2. package/src/.agents/skills/tmux-commands/SKILL.md +353 -0
  3. package/src/bmm/data/project-context-template.md +26 -26
  4. package/src/bmm/teams/default-party.csv +20 -20
  5. package/src/bmm/workflows/2-plan-workflows/create-prd/data/domain-complexity.csv +14 -14
  6. package/src/bmm/workflows/2-plan-workflows/create-prd/data/prd-purpose.md +197 -197
  7. package/src/bmm/workflows/2-plan-workflows/create-prd/data/project-types.csv +10 -10
  8. package/src/bmm/workflows/2-plan-workflows/create-prd/templates/prd-template.md +10 -10
  9. package/src/bmm/workflows/3-solutioning/create-architecture/data/domain-complexity.csv +12 -12
  10. package/src/bmm/workflows/4-implementation/code-review/instructions.xml +226 -226
  11. package/src/bmm/workflows/4-implementation/correct-course/checklist.md +288 -288
  12. package/src/bmm/workflows/4-implementation/correct-course/instructions.md +207 -207
  13. package/src/bmm/workflows/4-implementation/retrospective/instructions.md +1444 -1444
  14. package/src/bmm/workflows/4-implementation/sprint-planning/sprint-status-template.yaml +55 -55
  15. package/src/bmm/workflows/4-implementation/sprint-status/instructions.md +230 -230
  16. package/src/bmm/workflows/bmad-quick-flow/quick-spec/tech-spec-template.md +74 -74
  17. package/src/bmm/workflows/document-project/instructions.md +130 -130
  18. package/src/bmm/workflows/document-project/templates/project-scan-report-schema.json +160 -160
  19. package/src/bmm/workflows/document-project/workflows/deep-dive-instructions.md +298 -298
  20. package/src/bmm/workflows/document-project/workflows/deep-dive.yaml +31 -31
  21. package/src/bmm/workflows/document-project/workflows/full-scan-instructions.md +1106 -1106
  22. package/src/bmm/workflows/document-project/workflows/full-scan.yaml +31 -31
  23. package/src/bmm/workflows/qa-generate-e2e-tests/checklist.md +33 -33
  24. package/src/bmm/workflows/qa-generate-e2e-tests/instructions.md +110 -110
  25. package/src/core/agents/bmad-master.md +56 -56
  26. package/src/core/workflows/party-mode/steps/step-02-discussion-orchestration.md +187 -187
  27. package/src/core/workflows/party-mode/steps/step-03-graceful-exit.md +168 -168
  28. package/src/.agents/skills/ui-ux-pro-custom/data/swift-ios-skills/vision-framework/SKILL.md +0 -475
  29. package/src/.agents/skills/ui-ux-pro-custom/data/swift-ios-skills/vision-framework/references/vision-requests.md +0 -736
  30. package/src/.agents/skills/ui-ux-pro-custom/data/swift-ios-skills/vision-framework/references/visionkit-scanner.md +0 -738
  31. package/src/.agents/skills/ui-ux-pro-custom/data/swift-ios-skills/weatherkit/SKILL.md +0 -410
  32. package/src/.agents/skills/ui-ux-pro-custom/data/swift-ios-skills/weatherkit/references/weatherkit-patterns.md +0 -567
  33. package/src/.agents/skills/ui-ux-pro-custom/data/swift-ios-skills/widgetkit/SKILL.md +0 -497
  34. package/src/.agents/skills/ui-ux-pro-custom/data/swift-ios-skills/widgetkit/references/widgetkit-advanced.md +0 -871
  35. package/src/.agents/skills/ui-ux-pro-custom/data/typography.csv +0 -58
  36. package/src/.agents/skills/ui-ux-pro-custom/data/ui-reasoning.csv +0 -101
  37. package/src/.agents/skills/ui-ux-pro-custom/data/ux-guidelines.csv +0 -100
  38. package/src/.agents/skills/ui-ux-pro-custom/data/web-interface.csv +0 -31
  39. package/src/.agents/skills/ui-ux-pro-custom/scripts/core.py +0 -253
  40. package/src/.agents/skills/ui-ux-pro-custom/scripts/design_system.py +0 -1067
  41. package/src/.agents/skills/ui-ux-pro-custom/scripts/search.py +0 -114
  42. package/src/.agents/skills/ux-audit/SKILL.md +0 -151
  43. package/src/.agents/skills/websocket-engineer/SKILL.md +0 -168
  44. package/src/.agents/skills/websocket-engineer/references/alternatives.md +0 -391
  45. package/src/.agents/skills/websocket-engineer/references/patterns.md +0 -400
  46. package/src/.agents/skills/websocket-engineer/references/protocol.md +0 -195
  47. package/src/.agents/skills/websocket-engineer/references/scaling.md +0 -333
  48. package/src/.agents/skills/websocket-engineer/references/security.md +0 -474
  49. package/src/.agents/skills/writing-skills/SKILL.md +0 -655
  50. package/src/.agents/skills/writing-skills/anthropic-best-practices.md +0 -1150
  51. package/src/.agents/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +0 -189
  52. package/src/.agents/skills/writing-skills/graphviz-conventions.dot +0 -172
  53. package/src/.agents/skills/writing-skills/persuasion-principles.md +0 -187
  54. package/src/.agents/skills/writing-skills/render-graphs.js +0 -168
  55. package/src/.agents/skills/writing-skills/testing-skills-with-subagents.md +0 -384
  56. package/src/.claude/commands/bmad-track-compact.md +0 -19
  57. package/src/.claude/commands/bmad-track-extended.md +0 -19
  58. package/src/.claude/commands/bmad-track-large.md +0 -19
  59. package/src/.claude/commands/bmad-track-medium.md +0 -19
  60. package/src/.claude/commands/bmad-track-nano.md +0 -19
  61. package/src/.claude/commands/bmad-track-rv.md +0 -18
  62. package/src/.claude/commands/bmad-track-small.md +0 -19
  63. package/src/.claude/commands/master-orchestrator.md +0 -15
  64. package/src/_memory/master-orchestrator-sidecar/docs-index.md +0 -3
  65. package/src/_memory/master-orchestrator-sidecar/instructions.md +0 -2616
  66. package/src/_memory/master-orchestrator-sidecar/memories.md +0 -8
  67. package/src/_memory/master-orchestrator-sidecar/session-state.md +0 -15
  68. package/src/_memory/master-orchestrator-sidecar/triage-history.md +0 -3
  69. package/src/_memory/master-orchestrator-sidecar/workflows-overview.html +0 -1230
  70. package/src/core/agents/master-orchestrator.md +0 -54
  71. package/src/docs/dev/tmux/actions_popup.py +0 -291
  72. package/src/docs/dev/tmux/actions_popup.sh +0 -110
  73. package/src/docs/dev/tmux/claude_usage.sh +0 -15
  74. package/src/docs/dev/tmux/colors.conf +0 -26
  75. package/src/docs/dev/tmux/cpu_usage.sh +0 -7
  76. package/src/docs/dev/tmux/dispatch.sh +0 -10
  77. package/src/docs/dev/tmux/float_init.sh +0 -13
  78. package/src/docs/dev/tmux/float_term.sh +0 -23
  79. package/src/docs/dev/tmux/open_clip.sh +0 -14
  80. package/src/docs/dev/tmux/paste_clipboard.sh +0 -13
  81. package/src/docs/dev/tmux/paste_image_wrapper.sh +0 -94
  82. package/src/docs/dev/tmux/ram_usage.sh +0 -3
  83. package/src/docs/dev/tmux/title_sync.sh +0 -54
  84. package/src/docs/dev/tmux/tmux-setup.md +0 -867
  85. package/src/docs/dev/tmux/tmux.conf +0 -127
  86. package/src/docs/dev/tmux/xclip +0 -18
@@ -1,227 +1,227 @@
1
- <workflow>
2
- <critical>The workflow execution engine is governed by: {project-root}/_bmad/core/tasks/workflow.xml</critical>
3
- <critical>You MUST have already loaded and processed: {installed_path}/workflow.yaml</critical>
4
- <critical>Communicate all responses in {communication_language} and language MUST be tailored to {user_skill_level}</critical>
5
- <critical>Generate all documents in {document_output_language}</critical>
6
-
7
- <critical>🔥 YOU ARE AN ADVERSARIAL CODE REVIEWER - Find what's wrong or missing! 🔥</critical>
8
- <critical>Your purpose: Validate story file claims against actual implementation</critical>
9
- <critical>Challenge everything: Are tasks marked [x] actually done? Are ACs really implemented?</critical>
10
- <critical>Find 3-10 specific issues in every review minimum - no lazy "looks good" reviews - YOU are so much better than the dev agent
11
- that wrote this slop</critical>
12
- <critical>Read EVERY file in the File List - verify implementation against story requirements</critical>
13
- <critical>Tasks marked complete but not done = CRITICAL finding</critical>
14
- <critical>Acceptance Criteria not implemented = HIGH severity finding</critical>
15
- <critical>Do not review files that are not part of the application's source code. Always exclude the _bmad/ and _bmad-output/ folders from the review. Always exclude IDE and CLI configuration folders like .cursor/ and .windsurf/ and .claude/</critical>
16
-
17
-
18
- <step n="1" goal="Load story and discover changes">
19
- <action>Use provided {{story_path}} or ask user which story file to review</action>
20
- <action>Read COMPLETE story file</action>
21
- <action>Set {{story_key}} = extracted key from filename (e.g., "1-2-user-authentication.md" → "1-2-user-authentication") or story
22
- metadata</action>
23
- <action>Parse sections: Story, Acceptance Criteria, Tasks/Subtasks, Dev Agent Record → File List, Change Log</action>
24
-
25
- <!-- Discover actual changes via git -->
26
- <action>Check if git repository detected in current directory</action>
27
- <check if="git repository exists">
28
- <action>Run `git status --porcelain` to find uncommitted changes</action>
29
- <action>Run `git diff --name-only` to see modified files</action>
30
- <action>Run `git diff --cached --name-only` to see staged files</action>
31
- <action>Compile list of actually changed files from git output</action>
32
- </check>
33
-
34
- <!-- Cross-reference story File List vs git reality -->
35
- <action>Compare story's Dev Agent Record → File List with actual git changes</action>
36
- <action>Note discrepancies:
37
- - Files in git but not in story File List
38
- - Files in story File List but no git changes
39
- - Missing documentation of what was actually changed
40
- </action>
41
-
42
- <invoke-protocol name="discover_inputs" />
43
- <action>Load {project_context} for coding standards (if exists)</action>
44
- </step>
45
-
46
- <step n="2" goal="Build review attack plan">
47
- <action>Extract ALL Acceptance Criteria from story</action>
48
- <action>Extract ALL Tasks/Subtasks with completion status ([x] vs [ ])</action>
49
- <action>From Dev Agent Record → File List, compile list of claimed changes</action>
50
-
51
- <action>Create review plan:
52
- 1. **AC Validation**: Verify each AC is actually implemented
53
- 2. **Task Audit**: Verify each [x] task is really done
54
- 3. **Code Quality**: Security, performance, maintainability
55
- 4. **Test Quality**: Real tests vs placeholder bullshit
56
- </action>
57
- </step>
58
-
59
- <step n="3" goal="Execute adversarial review">
60
- <critical>VALIDATE EVERY CLAIM - Check git reality vs story claims</critical>
61
-
62
- <!-- Git vs Story Discrepancies -->
63
- <action>Review git vs story File List discrepancies:
64
- 1. **Files changed but not in story File List** → MEDIUM finding (incomplete documentation)
65
- 2. **Story lists files but no git changes** → HIGH finding (false claims)
66
- 3. **Uncommitted changes not documented** → MEDIUM finding (transparency issue)
67
- </action>
68
-
69
- <!-- Use combined file list: story File List + git discovered files -->
70
- <action>Create comprehensive review file list from story File List and git changes</action>
71
-
72
- <!-- AC Validation -->
73
- <action>For EACH Acceptance Criterion:
74
- 1. Read the AC requirement
75
- 2. Search implementation files for evidence
76
- 3. Determine: IMPLEMENTED, PARTIAL, or MISSING
77
- 4. If MISSING/PARTIAL → HIGH SEVERITY finding
78
- </action>
79
-
80
- <!-- Task Completion Audit -->
81
- <action>For EACH task marked [x]:
82
- 1. Read the task description
83
- 2. Search files for evidence it was actually done
84
- 3. **CRITICAL**: If marked [x] but NOT DONE → CRITICAL finding
85
- 4. Record specific proof (file:line)
86
- </action>
87
-
88
- <!-- Code Quality Deep Dive -->
89
- <action>For EACH file in comprehensive review list:
90
- 1. **Security**: Look for injection risks, missing validation, auth issues
91
- 2. **Performance**: N+1 queries, inefficient loops, missing caching
92
- 3. **Error Handling**: Missing try/catch, poor error messages
93
- 4. **Code Quality**: Complex functions, magic numbers, poor naming
94
- 5. **Test Quality**: Are tests real assertions or placeholders?
95
- </action>
96
-
97
- <check if="total_issues_found lt 3">
98
- <critical>NOT LOOKING HARD ENOUGH - Find more problems!</critical>
99
- <action>Re-examine code for:
100
- - Edge cases and null handling
101
- - Architecture violations
102
- - Documentation gaps
103
- - Integration issues
104
- - Dependency problems
105
- - Git commit message quality (if applicable)
106
- </action>
107
- <action>Find at least 3 more specific, actionable issues</action>
108
- </check>
109
- </step>
110
-
111
- <step n="4" goal="Present findings and fix them">
112
- <action>Categorize findings: HIGH (must fix), MEDIUM (should fix), LOW (nice to fix)</action>
113
- <action>Set {{fixed_count}} = 0</action>
114
- <action>Set {{action_count}} = 0</action>
115
-
116
- <output>**🔥 CODE REVIEW FINDINGS, {user_name}!**
117
-
118
- **Story:** {{story_file}}
119
- **Git vs Story Discrepancies:** {{git_discrepancy_count}} found
120
- **Issues Found:** {{high_count}} High, {{medium_count}} Medium, {{low_count}} Low
121
-
122
- ## 🔴 CRITICAL ISSUES
123
- - Tasks marked [x] but not actually implemented
124
- - Acceptance Criteria not implemented
125
- - Story claims files changed but no git evidence
126
- - Security vulnerabilities
127
-
128
- ## 🟡 MEDIUM ISSUES
129
- - Files changed but not documented in story File List
130
- - Uncommitted changes not tracked
131
- - Performance problems
132
- - Poor test coverage/quality
133
- - Code maintainability issues
134
-
135
- ## 🟢 LOW ISSUES
136
- - Code style improvements
137
- - Documentation gaps
138
- - Git commit message quality
139
- </output>
140
-
141
- <ask>What should I do with these issues?
142
-
143
- 1. **Fix them automatically** - I'll update the code and tests
144
- 2. **Create action items** - Add to story Tasks/Subtasks for later
145
- 3. **Show me details** - Deep dive into specific issues
146
-
147
- Choose [1], [2], or specify which issue to examine:</ask>
148
-
149
- <check if="user chooses 1">
150
- <action>Fix all HIGH and MEDIUM issues in the code</action>
151
- <action>Add/update tests as needed</action>
152
- <action>Update File List in story if files changed</action>
153
- <action>Update story Dev Agent Record with fixes applied</action>
154
- <action>Set {{fixed_count}} = number of HIGH and MEDIUM issues fixed</action>
155
- <action>Set {{action_count}} = 0</action>
156
- </check>
157
-
158
- <check if="user chooses 2">
159
- <action>Add "Review Follow-ups (AI)" subsection to Tasks/Subtasks</action>
160
- <action>For each issue: `- [ ] [AI-Review][Severity] Description [file:line]`</action>
161
- <action>Set {{action_count}} = number of action items created</action>
162
- <action>Set {{fixed_count}} = 0</action>
163
- </check>
164
-
165
- <check if="user chooses 3">
166
- <action>Show detailed explanation with code examples</action>
167
- <action>Return to fix decision</action>
168
- </check>
169
- </step>
170
-
171
- <step n="5" goal="Update story status and sync sprint tracking">
172
- <!-- Determine new status based on review outcome -->
173
- <check if="all HIGH and MEDIUM issues fixed AND all ACs implemented">
174
- <action>Set {{new_status}} = "done"</action>
175
- <action>Update story Status field to "done"</action>
176
- </check>
177
- <check if="HIGH or MEDIUM issues remain OR ACs not fully implemented">
178
- <action>Set {{new_status}} = "in-progress"</action>
179
- <action>Update story Status field to "in-progress"</action>
180
- </check>
181
- <action>Save story file</action>
182
-
183
- <!-- Determine sprint tracking status -->
184
- <check if="{sprint_status} file exists">
185
- <action>Set {{current_sprint_status}} = "enabled"</action>
186
- </check>
187
- <check if="{sprint_status} file does NOT exist">
188
- <action>Set {{current_sprint_status}} = "no-sprint-tracking"</action>
189
- </check>
190
-
191
- <!-- Sync sprint-status.yaml when story status changes (only if sprint tracking enabled) -->
192
- <check if="{{current_sprint_status}} != 'no-sprint-tracking'">
193
- <action>Load the FULL file: {sprint_status}</action>
194
- <action>Find development_status key matching {{story_key}}</action>
195
-
196
- <check if="{{new_status}} == 'done'">
197
- <action>Update development_status[{{story_key}}] = "done"</action>
198
- <action>Save file, preserving ALL comments and structure</action>
199
- <output>✅ Sprint status synced: {{story_key}} → done</output>
200
- </check>
201
-
202
- <check if="{{new_status}} == 'in-progress'">
203
- <action>Update development_status[{{story_key}}] = "in-progress"</action>
204
- <action>Save file, preserving ALL comments and structure</action>
205
- <output>🔄 Sprint status synced: {{story_key}} → in-progress</output>
206
- </check>
207
-
208
- <check if="story key not found in sprint status">
209
- <output>⚠️ Story file updated, but sprint-status sync failed: {{story_key}} not found in sprint-status.yaml</output>
210
- </check>
211
- </check>
212
-
213
- <check if="{{current_sprint_status}} == 'no-sprint-tracking'">
214
- <output>ℹ️ Story status updated (no sprint tracking configured)</output>
215
- </check>
216
-
217
- <output>**✅ Review Complete!**
218
-
219
- **Story Status:** {{new_status}}
220
- **Issues Fixed:** {{fixed_count}}
221
- **Action Items Created:** {{action_count}}
222
-
223
- {{#if new_status == "done"}}Code review complete!{{else}}Address the action items and continue development.{{/if}}
224
- </output>
225
- </step>
226
-
1
+ <workflow>
2
+ <critical>The workflow execution engine is governed by: {project-root}/_bmad/core/tasks/workflow.xml</critical>
3
+ <critical>You MUST have already loaded and processed: {installed_path}/workflow.yaml</critical>
4
+ <critical>Communicate all responses in {communication_language} and language MUST be tailored to {user_skill_level}</critical>
5
+ <critical>Generate all documents in {document_output_language}</critical>
6
+
7
+ <critical>🔥 YOU ARE AN ADVERSARIAL CODE REVIEWER - Find what's wrong or missing! 🔥</critical>
8
+ <critical>Your purpose: Validate story file claims against actual implementation</critical>
9
+ <critical>Challenge everything: Are tasks marked [x] actually done? Are ACs really implemented?</critical>
10
+ <critical>Find 3-10 specific issues in every review minimum - no lazy "looks good" reviews - YOU are so much better than the dev agent
11
+ that wrote this slop</critical>
12
+ <critical>Read EVERY file in the File List - verify implementation against story requirements</critical>
13
+ <critical>Tasks marked complete but not done = CRITICAL finding</critical>
14
+ <critical>Acceptance Criteria not implemented = HIGH severity finding</critical>
15
+ <critical>Do not review files that are not part of the application's source code. Always exclude the _bmad/ and _bmad-output/ folders from the review. Always exclude IDE and CLI configuration folders like .cursor/ and .windsurf/ and .claude/</critical>
16
+
17
+
18
+ <step n="1" goal="Load story and discover changes">
19
+ <action>Use provided {{story_path}} or ask user which story file to review</action>
20
+ <action>Read COMPLETE story file</action>
21
+ <action>Set {{story_key}} = extracted key from filename (e.g., "1-2-user-authentication.md" → "1-2-user-authentication") or story
22
+ metadata</action>
23
+ <action>Parse sections: Story, Acceptance Criteria, Tasks/Subtasks, Dev Agent Record → File List, Change Log</action>
24
+
25
+ <!-- Discover actual changes via git -->
26
+ <action>Check if git repository detected in current directory</action>
27
+ <check if="git repository exists">
28
+ <action>Run `git status --porcelain` to find uncommitted changes</action>
29
+ <action>Run `git diff --name-only` to see modified files</action>
30
+ <action>Run `git diff --cached --name-only` to see staged files</action>
31
+ <action>Compile list of actually changed files from git output</action>
32
+ </check>
33
+
34
+ <!-- Cross-reference story File List vs git reality -->
35
+ <action>Compare story's Dev Agent Record → File List with actual git changes</action>
36
+ <action>Note discrepancies:
37
+ - Files in git but not in story File List
38
+ - Files in story File List but no git changes
39
+ - Missing documentation of what was actually changed
40
+ </action>
41
+
42
+ <invoke-protocol name="discover_inputs" />
43
+ <action>Load {project_context} for coding standards (if exists)</action>
44
+ </step>
45
+
46
+ <step n="2" goal="Build review attack plan">
47
+ <action>Extract ALL Acceptance Criteria from story</action>
48
+ <action>Extract ALL Tasks/Subtasks with completion status ([x] vs [ ])</action>
49
+ <action>From Dev Agent Record → File List, compile list of claimed changes</action>
50
+
51
+ <action>Create review plan:
52
+ 1. **AC Validation**: Verify each AC is actually implemented
53
+ 2. **Task Audit**: Verify each [x] task is really done
54
+ 3. **Code Quality**: Security, performance, maintainability
55
+ 4. **Test Quality**: Real tests vs placeholder bullshit
56
+ </action>
57
+ </step>
58
+
59
+ <step n="3" goal="Execute adversarial review">
60
+ <critical>VALIDATE EVERY CLAIM - Check git reality vs story claims</critical>
61
+
62
+ <!-- Git vs Story Discrepancies -->
63
+ <action>Review git vs story File List discrepancies:
64
+ 1. **Files changed but not in story File List** → MEDIUM finding (incomplete documentation)
65
+ 2. **Story lists files but no git changes** → HIGH finding (false claims)
66
+ 3. **Uncommitted changes not documented** → MEDIUM finding (transparency issue)
67
+ </action>
68
+
69
+ <!-- Use combined file list: story File List + git discovered files -->
70
+ <action>Create comprehensive review file list from story File List and git changes</action>
71
+
72
+ <!-- AC Validation -->
73
+ <action>For EACH Acceptance Criterion:
74
+ 1. Read the AC requirement
75
+ 2. Search implementation files for evidence
76
+ 3. Determine: IMPLEMENTED, PARTIAL, or MISSING
77
+ 4. If MISSING/PARTIAL → HIGH SEVERITY finding
78
+ </action>
79
+
80
+ <!-- Task Completion Audit -->
81
+ <action>For EACH task marked [x]:
82
+ 1. Read the task description
83
+ 2. Search files for evidence it was actually done
84
+ 3. **CRITICAL**: If marked [x] but NOT DONE → CRITICAL finding
85
+ 4. Record specific proof (file:line)
86
+ </action>
87
+
88
+ <!-- Code Quality Deep Dive -->
89
+ <action>For EACH file in comprehensive review list:
90
+ 1. **Security**: Look for injection risks, missing validation, auth issues
91
+ 2. **Performance**: N+1 queries, inefficient loops, missing caching
92
+ 3. **Error Handling**: Missing try/catch, poor error messages
93
+ 4. **Code Quality**: Complex functions, magic numbers, poor naming
94
+ 5. **Test Quality**: Are tests real assertions or placeholders?
95
+ </action>
96
+
97
+ <check if="total_issues_found lt 3">
98
+ <critical>NOT LOOKING HARD ENOUGH - Find more problems!</critical>
99
+ <action>Re-examine code for:
100
+ - Edge cases and null handling
101
+ - Architecture violations
102
+ - Documentation gaps
103
+ - Integration issues
104
+ - Dependency problems
105
+ - Git commit message quality (if applicable)
106
+ </action>
107
+ <action>Find at least 3 more specific, actionable issues</action>
108
+ </check>
109
+ </step>
110
+
111
+ <step n="4" goal="Present findings and fix them">
112
+ <action>Categorize findings: HIGH (must fix), MEDIUM (should fix), LOW (nice to fix)</action>
113
+ <action>Set {{fixed_count}} = 0</action>
114
+ <action>Set {{action_count}} = 0</action>
115
+
116
+ <output>**🔥 CODE REVIEW FINDINGS, {user_name}!**
117
+
118
+ **Story:** {{story_file}}
119
+ **Git vs Story Discrepancies:** {{git_discrepancy_count}} found
120
+ **Issues Found:** {{high_count}} High, {{medium_count}} Medium, {{low_count}} Low
121
+
122
+ ## 🔴 CRITICAL ISSUES
123
+ - Tasks marked [x] but not actually implemented
124
+ - Acceptance Criteria not implemented
125
+ - Story claims files changed but no git evidence
126
+ - Security vulnerabilities
127
+
128
+ ## 🟡 MEDIUM ISSUES
129
+ - Files changed but not documented in story File List
130
+ - Uncommitted changes not tracked
131
+ - Performance problems
132
+ - Poor test coverage/quality
133
+ - Code maintainability issues
134
+
135
+ ## 🟢 LOW ISSUES
136
+ - Code style improvements
137
+ - Documentation gaps
138
+ - Git commit message quality
139
+ </output>
140
+
141
+ <ask>What should I do with these issues?
142
+
143
+ 1. **Fix them automatically** - I'll update the code and tests
144
+ 2. **Create action items** - Add to story Tasks/Subtasks for later
145
+ 3. **Show me details** - Deep dive into specific issues
146
+
147
+ Choose [1], [2], or specify which issue to examine:</ask>
148
+
149
+ <check if="user chooses 1">
150
+ <action>Fix all HIGH and MEDIUM issues in the code</action>
151
+ <action>Add/update tests as needed</action>
152
+ <action>Update File List in story if files changed</action>
153
+ <action>Update story Dev Agent Record with fixes applied</action>
154
+ <action>Set {{fixed_count}} = number of HIGH and MEDIUM issues fixed</action>
155
+ <action>Set {{action_count}} = 0</action>
156
+ </check>
157
+
158
+ <check if="user chooses 2">
159
+ <action>Add "Review Follow-ups (AI)" subsection to Tasks/Subtasks</action>
160
+ <action>For each issue: `- [ ] [AI-Review][Severity] Description [file:line]`</action>
161
+ <action>Set {{action_count}} = number of action items created</action>
162
+ <action>Set {{fixed_count}} = 0</action>
163
+ </check>
164
+
165
+ <check if="user chooses 3">
166
+ <action>Show detailed explanation with code examples</action>
167
+ <action>Return to fix decision</action>
168
+ </check>
169
+ </step>
170
+
171
+ <step n="5" goal="Update story status and sync sprint tracking">
172
+ <!-- Determine new status based on review outcome -->
173
+ <check if="all HIGH and MEDIUM issues fixed AND all ACs implemented">
174
+ <action>Set {{new_status}} = "done"</action>
175
+ <action>Update story Status field to "done"</action>
176
+ </check>
177
+ <check if="HIGH or MEDIUM issues remain OR ACs not fully implemented">
178
+ <action>Set {{new_status}} = "in-progress"</action>
179
+ <action>Update story Status field to "in-progress"</action>
180
+ </check>
181
+ <action>Save story file</action>
182
+
183
+ <!-- Determine sprint tracking status -->
184
+ <check if="{sprint_status} file exists">
185
+ <action>Set {{current_sprint_status}} = "enabled"</action>
186
+ </check>
187
+ <check if="{sprint_status} file does NOT exist">
188
+ <action>Set {{current_sprint_status}} = "no-sprint-tracking"</action>
189
+ </check>
190
+
191
+ <!-- Sync sprint-status.yaml when story status changes (only if sprint tracking enabled) -->
192
+ <check if="{{current_sprint_status}} != 'no-sprint-tracking'">
193
+ <action>Load the FULL file: {sprint_status}</action>
194
+ <action>Find development_status key matching {{story_key}}</action>
195
+
196
+ <check if="{{new_status}} == 'done'">
197
+ <action>Update development_status[{{story_key}}] = "done"</action>
198
+ <action>Save file, preserving ALL comments and structure</action>
199
+ <output>✅ Sprint status synced: {{story_key}} → done</output>
200
+ </check>
201
+
202
+ <check if="{{new_status}} == 'in-progress'">
203
+ <action>Update development_status[{{story_key}}] = "in-progress"</action>
204
+ <action>Save file, preserving ALL comments and structure</action>
205
+ <output>🔄 Sprint status synced: {{story_key}} → in-progress</output>
206
+ </check>
207
+
208
+ <check if="story key not found in sprint status">
209
+ <output>⚠️ Story file updated, but sprint-status sync failed: {{story_key}} not found in sprint-status.yaml</output>
210
+ </check>
211
+ </check>
212
+
213
+ <check if="{{current_sprint_status}} == 'no-sprint-tracking'">
214
+ <output>ℹ️ Story status updated (no sprint tracking configured)</output>
215
+ </check>
216
+
217
+ <output>**✅ Review Complete!**
218
+
219
+ **Story Status:** {{new_status}}
220
+ **Issues Fixed:** {{fixed_count}}
221
+ **Action Items Created:** {{action_count}}
222
+
223
+ {{#if new_status == "done"}}Code review complete!{{else}}Address the action items and continue development.{{/if}}
224
+ </output>
225
+ </step>
226
+
227
227
  </workflow>