bmad-method 6.0.0-alpha.17 → 6.0.0-alpha.18
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.
- package/CHANGELOG.md +97 -0
- package/package.json +1 -1
- package/src/modules/bmgd/_module-installer/installer.js +160 -0
- package/src/modules/bmgd/_module-installer/platform-specifics/claude-code.js +23 -0
- package/src/modules/bmgd/_module-installer/platform-specifics/windsurf.js +18 -0
- package/src/modules/bmgd/agents/game-architect.agent.yaml +23 -8
- package/src/modules/bmgd/agents/game-designer.agent.yaml +38 -18
- package/src/modules/bmgd/agents/game-dev.agent.yaml +30 -14
- package/src/modules/bmgd/agents/game-qa.agent.yaml +64 -0
- package/src/modules/bmgd/agents/game-scrum-master.agent.yaml +27 -39
- package/src/modules/bmgd/agents/game-solo-dev.agent.yaml +56 -0
- package/src/modules/bmgd/docs/README.md +180 -0
- package/src/modules/bmgd/docs/agents-guide.md +407 -0
- package/src/modules/bmgd/docs/game-types-guide.md +503 -0
- package/src/modules/bmgd/docs/glossary.md +294 -0
- package/src/modules/bmgd/docs/quick-flow-guide.md +288 -0
- package/src/modules/bmgd/docs/quick-start.md +250 -0
- package/src/modules/bmgd/docs/troubleshooting.md +259 -0
- package/src/modules/bmgd/docs/workflow-overview.jpg +0 -0
- package/src/modules/bmgd/docs/workflows-guide.md +463 -0
- package/src/modules/bmgd/gametest/knowledge/balance-testing.md +220 -0
- package/src/modules/bmgd/gametest/knowledge/certification-testing.md +319 -0
- package/src/modules/bmgd/gametest/knowledge/compatibility-testing.md +228 -0
- package/src/modules/bmgd/gametest/knowledge/godot-testing.md +376 -0
- package/src/modules/bmgd/gametest/knowledge/input-testing.md +315 -0
- package/src/modules/bmgd/gametest/knowledge/localization-testing.md +304 -0
- package/src/modules/bmgd/gametest/knowledge/multiplayer-testing.md +322 -0
- package/src/modules/bmgd/gametest/knowledge/performance-testing.md +204 -0
- package/src/modules/bmgd/gametest/knowledge/playtesting.md +384 -0
- package/src/modules/bmgd/gametest/knowledge/qa-automation.md +190 -0
- package/src/modules/bmgd/gametest/knowledge/regression-testing.md +280 -0
- package/src/modules/bmgd/gametest/knowledge/save-testing.md +280 -0
- package/src/modules/bmgd/gametest/knowledge/smoke-testing.md +404 -0
- package/src/modules/bmgd/gametest/knowledge/test-priorities.md +271 -0
- package/src/modules/bmgd/gametest/knowledge/unity-testing.md +383 -0
- package/src/modules/bmgd/gametest/knowledge/unreal-testing.md +388 -0
- package/src/modules/bmgd/gametest/qa-index.csv +17 -0
- package/src/modules/bmgd/module.yaml +25 -9
- package/src/modules/bmgd/teams/default-party.csv +2 -0
- package/src/modules/bmgd/teams/team-gamedev.yaml +12 -1
- package/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/steps/step-01-init.md +164 -0
- package/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/steps/step-02-context.md +210 -0
- package/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/steps/step-03-ideation.md +289 -0
- package/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/steps/step-04-complete.md +275 -0
- package/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/workflow.md +49 -0
- package/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/workflow.yaml +29 -8
- package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-01-init.md +223 -0
- package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-01b-continue.md +151 -0
- package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-02-vision.md +218 -0
- package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-03-market.md +218 -0
- package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-04-fundamentals.md +231 -0
- package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-05-scope.md +242 -0
- package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-06-references.md +224 -0
- package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-07-content.md +282 -0
- package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-08-complete.md +296 -0
- package/src/modules/bmgd/workflows/1-preproduction/game-brief/workflow.md +62 -0
- package/src/modules/bmgd/workflows/1-preproduction/game-brief/workflow.yaml +40 -9
- package/src/modules/bmgd/workflows/2-design/gdd/steps/step-01-init.md +248 -0
- package/src/modules/bmgd/workflows/2-design/gdd/steps/step-01b-continue.md +173 -0
- package/src/modules/bmgd/workflows/2-design/gdd/steps/step-02-context.md +332 -0
- package/src/modules/bmgd/workflows/2-design/gdd/steps/step-03-platforms.md +245 -0
- package/src/modules/bmgd/workflows/2-design/gdd/steps/step-04-vision.md +229 -0
- package/src/modules/bmgd/workflows/2-design/gdd/steps/step-05-core-gameplay.md +258 -0
- package/src/modules/bmgd/workflows/2-design/gdd/steps/step-06-mechanics.md +249 -0
- package/src/modules/bmgd/workflows/2-design/gdd/steps/step-07-game-type.md +266 -0
- package/src/modules/bmgd/workflows/2-design/gdd/steps/step-08-progression.md +272 -0
- package/src/modules/bmgd/workflows/2-design/gdd/steps/step-09-levels.md +264 -0
- package/src/modules/bmgd/workflows/2-design/gdd/steps/step-10-art-audio.md +255 -0
- package/src/modules/bmgd/workflows/2-design/gdd/steps/step-11-technical.md +275 -0
- package/src/modules/bmgd/workflows/2-design/gdd/steps/step-12-epics.md +284 -0
- package/src/modules/bmgd/workflows/2-design/gdd/steps/step-13-metrics.md +250 -0
- package/src/modules/bmgd/workflows/2-design/gdd/steps/step-14-complete.md +335 -0
- package/src/modules/bmgd/workflows/2-design/gdd/workflow.md +61 -0
- package/src/modules/bmgd/workflows/2-design/gdd/workflow.yaml +27 -7
- package/src/modules/bmgd/workflows/2-design/narrative/steps/step-01-init.md +228 -0
- package/src/modules/bmgd/workflows/2-design/narrative/steps/step-01b-continue.md +163 -0
- package/src/modules/bmgd/workflows/2-design/narrative/steps/step-02-foundation.md +262 -0
- package/src/modules/bmgd/workflows/2-design/narrative/steps/step-03-story.md +238 -0
- package/src/modules/bmgd/workflows/2-design/narrative/steps/step-04-characters.md +297 -0
- package/src/modules/bmgd/workflows/2-design/narrative/steps/step-05-world.md +262 -0
- package/src/modules/bmgd/workflows/2-design/narrative/steps/step-06-dialogue.md +250 -0
- package/src/modules/bmgd/workflows/2-design/narrative/steps/step-07-environmental.md +244 -0
- package/src/modules/bmgd/workflows/2-design/narrative/steps/step-08-delivery.md +264 -0
- package/src/modules/bmgd/workflows/2-design/narrative/steps/step-09-integration.md +254 -0
- package/src/modules/bmgd/workflows/2-design/narrative/steps/step-10-production.md +262 -0
- package/src/modules/bmgd/workflows/2-design/narrative/steps/step-11-complete.md +331 -0
- package/src/modules/bmgd/workflows/2-design/narrative/workflow.md +57 -0
- package/src/modules/bmgd/workflows/2-design/narrative/workflow.yaml +53 -8
- package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-01-init.md +223 -0
- package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-01b-continue.md +153 -0
- package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-02-context.md +262 -0
- package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-03-starter.md +290 -0
- package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-04-decisions.md +300 -0
- package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-05-crosscutting.md +319 -0
- package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-06-structure.md +304 -0
- package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-07-patterns.md +349 -0
- package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-08-validation.md +293 -0
- package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-09-complete.md +302 -0
- package/src/modules/bmgd/workflows/3-technical/game-architecture/workflow.md +55 -0
- package/src/modules/bmgd/workflows/3-technical/game-architecture/workflow.yaml +50 -21
- package/src/modules/bmgd/workflows/4-production/code-review/checklist.md +23 -0
- package/src/modules/bmgd/workflows/4-production/code-review/instructions.xml +225 -0
- package/src/modules/bmgd/workflows/4-production/code-review/workflow.yaml +18 -15
- package/src/modules/bmgd/workflows/4-production/correct-course/checklist.md +1 -1
- package/src/modules/bmgd/workflows/4-production/correct-course/instructions.md +1 -1
- package/src/modules/bmgd/workflows/4-production/correct-course/workflow.yaml +11 -6
- package/src/modules/bmgd/workflows/4-production/create-story/checklist.md +332 -214
- package/src/modules/bmgd/workflows/4-production/create-story/instructions.xml +298 -0
- package/src/modules/bmgd/workflows/4-production/create-story/template.md +3 -5
- package/src/modules/bmgd/workflows/4-production/create-story/workflow.yaml +12 -7
- package/src/modules/bmgd/workflows/4-production/dev-story/checklist.md +65 -23
- package/src/modules/bmgd/workflows/4-production/dev-story/instructions.xml +409 -0
- package/src/modules/bmgd/workflows/4-production/dev-story/workflow.yaml +13 -3
- package/src/modules/bmgd/workflows/4-production/retrospective/instructions.md +4 -4
- package/src/modules/bmgd/workflows/4-production/retrospective/workflow.yaml +12 -7
- package/src/modules/bmgd/workflows/4-production/sprint-planning/instructions.md +32 -41
- package/src/modules/bmgd/workflows/4-production/sprint-planning/sprint-status-template.yaml +13 -13
- package/src/modules/bmgd/workflows/4-production/sprint-planning/workflow.yaml +6 -1
- package/src/modules/bmgd/workflows/4-production/sprint-status/instructions.md +229 -0
- package/src/modules/bmgd/workflows/4-production/sprint-status/workflow.yaml +35 -0
- package/src/modules/bmgd/workflows/bmgd-quick-flow/create-tech-spec/instructions.md +140 -0
- package/src/modules/bmgd/workflows/bmgd-quick-flow/create-tech-spec/workflow.yaml +27 -0
- package/src/modules/bmgd/workflows/bmgd-quick-flow/quick-dev/checklist.md +37 -0
- package/src/modules/bmgd/workflows/bmgd-quick-flow/quick-dev/instructions.md +220 -0
- package/src/modules/bmgd/workflows/bmgd-quick-flow/quick-dev/workflow.yaml +45 -0
- package/src/modules/bmgd/workflows/bmgd-quick-flow/quick-prototype/checklist.md +26 -0
- package/src/modules/bmgd/workflows/bmgd-quick-flow/quick-prototype/instructions.md +156 -0
- package/src/modules/bmgd/workflows/bmgd-quick-flow/quick-prototype/workflow.yaml +36 -0
- package/src/modules/bmgd/workflows/gametest/automate/checklist.md +93 -0
- package/src/modules/bmgd/workflows/gametest/automate/instructions.md +317 -0
- package/src/modules/bmgd/workflows/gametest/automate/workflow.yaml +50 -0
- package/src/modules/bmgd/workflows/gametest/performance/checklist.md +96 -0
- package/src/modules/bmgd/workflows/gametest/performance/instructions.md +323 -0
- package/src/modules/bmgd/workflows/gametest/performance/performance-template.md +256 -0
- package/src/modules/bmgd/workflows/gametest/performance/workflow.yaml +48 -0
- package/src/modules/bmgd/workflows/gametest/playtest-plan/checklist.md +93 -0
- package/src/modules/bmgd/workflows/gametest/playtest-plan/instructions.md +297 -0
- package/src/modules/bmgd/workflows/gametest/playtest-plan/playtest-template.md +208 -0
- package/src/modules/bmgd/workflows/gametest/playtest-plan/workflow.yaml +59 -0
- package/src/modules/bmgd/workflows/gametest/test-design/checklist.md +98 -0
- package/src/modules/bmgd/workflows/gametest/test-design/instructions.md +280 -0
- package/src/modules/bmgd/workflows/gametest/test-design/test-design-template.md +205 -0
- package/src/modules/bmgd/workflows/gametest/test-design/workflow.yaml +47 -0
- package/src/modules/bmgd/workflows/gametest/test-framework/checklist.md +103 -0
- package/src/modules/bmgd/workflows/gametest/test-framework/instructions.md +348 -0
- package/src/modules/bmgd/workflows/gametest/test-framework/workflow.yaml +48 -0
- package/src/modules/bmgd/workflows/gametest/test-review/checklist.md +87 -0
- package/src/modules/bmgd/workflows/gametest/test-review/instructions.md +272 -0
- package/src/modules/bmgd/workflows/gametest/test-review/test-review-template.md +203 -0
- package/src/modules/bmgd/workflows/gametest/test-review/workflow.yaml +48 -0
- package/src/modules/bmgd/workflows/workflow-status/init/instructions.md +299 -0
- package/src/modules/bmgd/workflows/workflow-status/init/workflow.yaml +29 -0
- package/src/modules/bmgd/workflows/workflow-status/instructions.md +395 -0
- package/src/modules/bmgd/workflows/workflow-status/paths/gamedev-brownfield.yaml +65 -0
- package/src/modules/bmgd/workflows/workflow-status/paths/gamedev-greenfield.yaml +71 -0
- package/src/modules/bmgd/workflows/workflow-status/paths/quickflow-brownfield.yaml +29 -0
- package/src/modules/bmgd/workflows/workflow-status/paths/quickflow-greenfield.yaml +39 -0
- package/src/modules/bmgd/workflows/workflow-status/project-levels.yaml +63 -0
- package/src/modules/bmgd/workflows/workflow-status/workflow-status-template.yaml +24 -0
- package/src/modules/bmgd/workflows/workflow-status/workflow.yaml +30 -0
- package/tools/cli/commands/install.js +9 -0
- package/tools/cli/installers/lib/core/installer.js +109 -109
- package/tools/cli/installers/lib/core/installer.js.bak +3204 -0
- package/tools/cli/installers/lib/modules/manager.js +16 -4
- package/tools/cli/lib/agent/compiler.js +99 -0
- package/tools/cli/lib/ui.js +78 -27
- package/src/modules/bmgd/workflows/2-design/gdd/instructions-gdd.md +0 -502
- package/src/modules/bmgd/workflows/4-production/code-review/instructions.md +0 -398
- package/src/modules/bmgd/workflows/4-production/create-story/instructions.md +0 -256
- package/src/modules/bmgd/workflows/4-production/dev-story/instructions.md +0 -267
- package/src/modules/bmgd/workflows/4-production/epic-tech-context/checklist.md +0 -17
- package/src/modules/bmgd/workflows/4-production/epic-tech-context/instructions.md +0 -164
- package/src/modules/bmgd/workflows/4-production/epic-tech-context/template.md +0 -76
- package/src/modules/bmgd/workflows/4-production/epic-tech-context/workflow.yaml +0 -58
- package/src/modules/bmgd/workflows/4-production/story-context/checklist.md +0 -16
- package/src/modules/bmgd/workflows/4-production/story-context/context-template.xml +0 -34
- package/src/modules/bmgd/workflows/4-production/story-context/instructions.md +0 -209
- package/src/modules/bmgd/workflows/4-production/story-context/workflow.yaml +0 -63
- package/src/modules/bmgd/workflows/4-production/story-done/instructions.md +0 -111
- package/src/modules/bmgd/workflows/4-production/story-done/workflow.yaml +0 -28
- package/src/modules/bmgd/workflows/4-production/story-ready/instructions.md +0 -117
- package/src/modules/bmgd/workflows/4-production/story-ready/workflow.yaml +0 -25
- /package/src/modules/bmgd/workflows/1-preproduction/game-brief/{template.md → templates/game-brief-template.md} +0 -0
- /package/src/modules/bmgd/workflows/2-design/gdd/{gdd-template.md → templates/gdd-template.md} +0 -0
- /package/src/modules/bmgd/workflows/2-design/narrative/{narrative-template.md → templates/narrative-template.md} +0 -0
- /package/src/modules/bmgd/workflows/3-technical/game-architecture/{architecture-template.md → templates/architecture-template.md} +0 -0
|
@@ -1,398 +0,0 @@
|
|
|
1
|
-
# Senior Developer Review - Workflow Instructions
|
|
2
|
-
|
|
3
|
-
````xml
|
|
4
|
-
<critical>The workflow execution engine is governed by: {project-root}/_bmad/core/tasks/workflow.xml</critical>
|
|
5
|
-
<critical>You MUST have already loaded and processed: {installed_path}/workflow.yaml</critical>
|
|
6
|
-
<critical>Communicate all responses in {communication_language} and language MUST be tailored to {user_skill_level}</critical>
|
|
7
|
-
<critical>Generate all documents in {document_output_language}</critical>
|
|
8
|
-
<critical>This workflow performs a SYSTEMATIC Senior Developer Review on a story with status "review", validates EVERY acceptance criterion and EVERY completed task, appends structured review notes with evidence, and updates the story status based on outcome.</critical>
|
|
9
|
-
<critical>If story_path is provided, use it. Otherwise, find the first story in sprint-status.yaml with status "review". If none found, offer ad-hoc review option.</critical>
|
|
10
|
-
<critical>Ad-hoc review mode: User can specify any files to review and what to review for (quality, security, requirements, etc.). Creates standalone review report.</critical>
|
|
11
|
-
<critical>SYSTEMATIC VALIDATION REQUIREMENT: For EVERY acceptance criterion, verify implementation with evidence (file:line). For EVERY task marked complete, verify it was actually done. Tasks marked complete but not done = HIGH SEVERITY finding.</critical>
|
|
12
|
-
<critical>⚠️ ZERO TOLERANCE FOR LAZY VALIDATION ⚠️</critical>
|
|
13
|
-
<critical>If you FAIL to catch even ONE task marked complete that was NOT actually implemented, or ONE acceptance criterion marked done that is NOT in the code with evidence, you have FAILED YOUR ONLY PURPOSE. This is an IMMEDIATE DISQUALIFICATION. No shortcuts. No assumptions. No "looks good enough." You WILL read every file. You WILL verify every claim. You WILL provide evidence (file:line) for EVERY validation. Failure to catch false completions = you failed humanity and the project. Your job is to be the uncompromising gatekeeper. DO YOUR JOB COMPLETELY OR YOU WILL BE REPLACED.</critical>
|
|
14
|
-
<critical>Only modify the story file in these areas: Status, Dev Agent Record (Completion Notes), File List (if corrections needed), Change Log, and the appended "Senior Developer Review (AI)" section.</critical>
|
|
15
|
-
<critical>Execute ALL steps in exact order; do NOT skip steps</critical>
|
|
16
|
-
|
|
17
|
-
<critical>DOCUMENT OUTPUT: Technical review reports. Structured findings with severity levels and action items. User skill level ({user_skill_level}) affects conversation style ONLY, not review content.</critical>
|
|
18
|
-
|
|
19
|
-
<workflow>
|
|
20
|
-
|
|
21
|
-
<step n="1" goal="Find story ready for review" tag="sprint-status">
|
|
22
|
-
<check if="{{story_path}} is provided">
|
|
23
|
-
<action>Use {{story_path}} directly</action>
|
|
24
|
-
<action>Read COMPLETE story file and parse sections</action>
|
|
25
|
-
<action>Extract story_key from filename or story metadata</action>
|
|
26
|
-
<action>Verify Status is "review" or "ready-for-review" - if not, HALT with message: "Story status must be 'review' or 'ready-for-review' to proceed"</action>
|
|
27
|
-
</check>
|
|
28
|
-
|
|
29
|
-
<check if="{{story_path}} is NOT provided">
|
|
30
|
-
<critical>MUST read COMPLETE sprint-status.yaml file from start to end to preserve order</critical>
|
|
31
|
-
<action>Load the FULL file: {{output_folder}}/sprint-status.yaml</action>
|
|
32
|
-
<action>Read ALL lines from beginning to end - do not skip any content</action>
|
|
33
|
-
<action>Parse the development_status section completely</action>
|
|
34
|
-
|
|
35
|
-
<action>Find FIRST story (reading in order from top to bottom) where:
|
|
36
|
-
- Key matches pattern: number-number-name (e.g., "1-2-user-auth")
|
|
37
|
-
- NOT an epic key (epic-X) or retrospective (epic-X-retrospective)
|
|
38
|
-
- Status value equals "review" OR "ready-for-review"
|
|
39
|
-
</action>
|
|
40
|
-
|
|
41
|
-
<check if="no story with status 'review' or 'ready-for-review' found">
|
|
42
|
-
<output>📋 No stories with status "review" or "ready-for-review" found
|
|
43
|
-
|
|
44
|
-
**What would you like to do?**
|
|
45
|
-
1. Run `dev-story` to implement and mark a story ready for review
|
|
46
|
-
2. Check sprint-status.yaml for current story states
|
|
47
|
-
3. Tell me what code to review and what to review it for
|
|
48
|
-
</output>
|
|
49
|
-
<ask>Select an option (1/2/3):</ask>
|
|
50
|
-
|
|
51
|
-
<check if="option 3 selected">
|
|
52
|
-
<ask>What code would you like me to review?
|
|
53
|
-
|
|
54
|
-
Provide:
|
|
55
|
-
- File path(s) or directory to review
|
|
56
|
-
- What to review for:
|
|
57
|
-
• General quality and standards
|
|
58
|
-
• Requirements compliance
|
|
59
|
-
• Security concerns
|
|
60
|
-
• Performance issues
|
|
61
|
-
• Architecture alignment
|
|
62
|
-
• Something else (specify)
|
|
63
|
-
|
|
64
|
-
Your input:?
|
|
65
|
-
</ask>
|
|
66
|
-
|
|
67
|
-
<action>Parse user input to extract:
|
|
68
|
-
- {{review_files}}: file paths or directories to review
|
|
69
|
-
- {{review_focus}}: what aspects to focus on
|
|
70
|
-
- {{review_context}}: any additional context provided
|
|
71
|
-
</action>
|
|
72
|
-
|
|
73
|
-
<action>Set ad_hoc_review_mode = true</action>
|
|
74
|
-
<action>Skip to step 4 with custom scope</action>
|
|
75
|
-
</check>
|
|
76
|
-
|
|
77
|
-
<check if="option 1 or 2 or no option 3">
|
|
78
|
-
<action>HALT</action>
|
|
79
|
-
</check>
|
|
80
|
-
</check>
|
|
81
|
-
|
|
82
|
-
<action>Use the first story found with status "review"</action>
|
|
83
|
-
<action>Resolve story file path in {{story_dir}}</action>
|
|
84
|
-
<action>Read the COMPLETE story file</action>
|
|
85
|
-
</check>
|
|
86
|
-
|
|
87
|
-
<action>Extract {{epic_num}} and {{story_num}} from filename (e.g., story-2.3.*.md) and story metadata</action>
|
|
88
|
-
<action>Parse sections: Status, Story, Acceptance Criteria, Tasks/Subtasks (and completion states), Dev Notes, Dev Agent Record (Context Reference, Completion Notes, File List), Change Log</action>
|
|
89
|
-
<action if="story cannot be read">HALT with message: "Unable to read story file"</action>
|
|
90
|
-
</step>
|
|
91
|
-
|
|
92
|
-
<step n="1.5" goal="Discover and load project documents">
|
|
93
|
-
<invoke-protocol name="discover_inputs" />
|
|
94
|
-
<note>After discovery, these content variables are available: {architecture_content}, {ux_design_content}, {epics_content} (loads only epic for this story if sharded), {document_project_content}</note>
|
|
95
|
-
</step>
|
|
96
|
-
|
|
97
|
-
<step n="2" goal="Resolve story context file and specification inputs">
|
|
98
|
-
<action>Locate story context file: Under Dev Agent Record → Context Reference, read referenced path(s). If missing, search {{output_folder}} for files matching pattern "story-{{epic_num}}.{{story_num}}*.context.xml" and use the most recent.</action>
|
|
99
|
-
<action if="no story context file found">Continue but record a WARNING in review notes: "No story context file found"</action>
|
|
100
|
-
|
|
101
|
-
<action>Locate Epic Tech Spec: Search {{tech_spec_search_dir}} with glob {{tech_spec_glob_template}} (resolve {{epic_num}})</action>
|
|
102
|
-
<action if="no tech spec found">Continue but record a WARNING in review notes: "No Tech Spec found for epic {{epic_num}}"</action>
|
|
103
|
-
|
|
104
|
-
<action>Load architecture/standards docs: For each file name in {{arch_docs_file_names}} within {{arch_docs_search_dirs}}, read if exists. Collect testing, coding standards, security, and architectural patterns.</action>
|
|
105
|
-
<note>Architecture and brownfield docs were pre-loaded in Step 1.5 as {architecture_content} and {document_project_content}</note>
|
|
106
|
-
</step>
|
|
107
|
-
|
|
108
|
-
<step n="3" goal="Detect tech stack and establish best-practice reference set">
|
|
109
|
-
<action>Detect primary ecosystem(s) by scanning for manifests (e.g., package.json, pyproject.toml, go.mod, Dockerfile). Record key frameworks (e.g., Node/Express, React/Vue, Python/FastAPI, etc.).</action>
|
|
110
|
-
<action>Synthesize a concise "Best-Practices and References" note capturing any updates or considerations that should influence the review (cite links and versions if available).</action>
|
|
111
|
-
</step>
|
|
112
|
-
|
|
113
|
-
<step n="4" goal="Systematic validation of implementation against acceptance criteria and tasks">
|
|
114
|
-
<check if="ad_hoc_review_mode == true">
|
|
115
|
-
<action>Use {{review_files}} as the file list to review</action>
|
|
116
|
-
<action>Focus review on {{review_focus}} aspects specified by user</action>
|
|
117
|
-
<action>Use {{review_context}} for additional guidance</action>
|
|
118
|
-
<action>Skip acceptance criteria checking (no story context)</action>
|
|
119
|
-
<action>If architecture docs exist, verify alignment with architectural constraints</action>
|
|
120
|
-
</check>
|
|
121
|
-
|
|
122
|
-
<check if="ad_hoc_review_mode != true">
|
|
123
|
-
<critical>SYSTEMATIC VALIDATION - Check EVERY AC and EVERY task marked complete</critical>
|
|
124
|
-
|
|
125
|
-
<action>From the story, read Acceptance Criteria section completely - parse into numbered list</action>
|
|
126
|
-
<action>From the story, read Tasks/Subtasks section completely - parse ALL tasks and subtasks with their completion state ([x] = completed, [ ] = incomplete)</action>
|
|
127
|
-
<action>From Dev Agent Record → File List, compile list of changed/added files. If File List is missing or clearly incomplete, search repo for recent changes relevant to the story scope (heuristics: filenames matching components/services/routes/tests inferred from ACs/tasks).</action>
|
|
128
|
-
|
|
129
|
-
<critical>Step 4A: SYSTEMATIC ACCEPTANCE CRITERIA VALIDATION</critical>
|
|
130
|
-
<action>Create AC validation checklist with one entry per AC</action>
|
|
131
|
-
<action>For EACH acceptance criterion (AC1, AC2, AC3, etc.):
|
|
132
|
-
1. Read the AC requirement completely
|
|
133
|
-
2. Search changed files for evidence of implementation
|
|
134
|
-
3. Determine: IMPLEMENTED, PARTIAL, or MISSING
|
|
135
|
-
4. Record specific evidence (file:line references where AC is satisfied)
|
|
136
|
-
5. Check for corresponding tests (unit/integration/E2E as applicable)
|
|
137
|
-
6. If PARTIAL or MISSING: Flag as finding with severity based on AC criticality
|
|
138
|
-
7. Document in AC validation checklist
|
|
139
|
-
</action>
|
|
140
|
-
<action>Generate AC Coverage Summary: "X of Y acceptance criteria fully implemented"</action>
|
|
141
|
-
|
|
142
|
-
<critical>Step 4B: SYSTEMATIC TASK COMPLETION VALIDATION</critical>
|
|
143
|
-
<action>Create task validation checklist with one entry per task/subtask</action>
|
|
144
|
-
<action>For EACH task/subtask marked as COMPLETED ([x]):
|
|
145
|
-
1. Read the task description completely
|
|
146
|
-
2. Search changed files for evidence the task was actually done
|
|
147
|
-
3. Determine: VERIFIED COMPLETE, QUESTIONABLE, or NOT DONE
|
|
148
|
-
4. Record specific evidence (file:line references proving task completion)
|
|
149
|
-
5. **CRITICAL**: If marked complete but NOT DONE → Flag as HIGH SEVERITY finding with message: "Task marked complete but implementation not found: [task description]"
|
|
150
|
-
6. If QUESTIONABLE → Flag as MEDIUM SEVERITY finding: "Task completion unclear: [task description]"
|
|
151
|
-
7. Document in task validation checklist
|
|
152
|
-
</action>
|
|
153
|
-
<action>For EACH task/subtask marked as INCOMPLETE ([ ]):
|
|
154
|
-
1. Note it was not claimed to be complete
|
|
155
|
-
2. Check if it was actually done anyway (sometimes devs forget to check boxes)
|
|
156
|
-
3. If done but not marked: Note in review (helpful correction, not a finding)
|
|
157
|
-
</action>
|
|
158
|
-
<action>Generate Task Completion Summary: "X of Y completed tasks verified, Z questionable, W falsely marked complete"</action>
|
|
159
|
-
|
|
160
|
-
<critical>Step 4C: CROSS-CHECK EPIC TECH-SPEC REQUIREMENTS</critical>
|
|
161
|
-
<action>Cross-check epic tech-spec requirements and architecture constraints against the implementation intent in files.</action>
|
|
162
|
-
<action if="critical architecture constraints are violated (e.g., layering, dependency rules)">flag as High Severity finding.</action>
|
|
163
|
-
|
|
164
|
-
<critical>Step 4D: COMPILE VALIDATION FINDINGS</critical>
|
|
165
|
-
<action>Compile all validation findings into structured list:
|
|
166
|
-
- Missing AC implementations (severity based on AC importance)
|
|
167
|
-
- Partial AC implementations (MEDIUM severity)
|
|
168
|
-
- Tasks falsely marked complete (HIGH severity - this is critical)
|
|
169
|
-
- Questionable task completions (MEDIUM severity)
|
|
170
|
-
- Missing tests for ACs (severity based on AC criticality)
|
|
171
|
-
- Architecture violations (HIGH severity)
|
|
172
|
-
</action>
|
|
173
|
-
</check>
|
|
174
|
-
</step>
|
|
175
|
-
|
|
176
|
-
<step n="5" goal="Perform code quality and risk review">
|
|
177
|
-
<action>For each changed file, skim for common issues appropriate to the stack: error handling, input validation, logging, dependency injection, thread-safety/async correctness, resource cleanup, performance anti-patterns.</action>
|
|
178
|
-
<action>Perform security review: injection risks, authZ/authN handling, secret management, unsafe defaults, un-validated redirects, CORS misconfigured, dependency vulnerabilities (based on manifests).</action>
|
|
179
|
-
<action>Check tests quality: assertions are meaningful, edge cases covered, deterministic behavior, proper fixtures, no flakiness patterns.</action>
|
|
180
|
-
<action>Capture concrete, actionable suggestions with severity (High/Med/Low) and rationale. When possible, suggest specific code-level changes (filenames + line ranges) without rewriting large sections.</action>
|
|
181
|
-
</step>
|
|
182
|
-
|
|
183
|
-
<step n="6" goal="Decide review outcome and prepare comprehensive notes">
|
|
184
|
-
<action>Determine outcome based on validation results:
|
|
185
|
-
- BLOCKED: Any HIGH severity finding (AC missing, task falsely marked complete, critical architecture violation)
|
|
186
|
-
- CHANGES REQUESTED: Any MEDIUM severity findings or multiple LOW severity issues
|
|
187
|
-
- APPROVE: All ACs implemented, all completed tasks verified, no significant issues
|
|
188
|
-
</action>
|
|
189
|
-
|
|
190
|
-
<action>Prepare a structured review report with sections:
|
|
191
|
-
1. **Summary**: Brief overview of review outcome and key concerns
|
|
192
|
-
2. **Outcome**: Approve | Changes Requested | Blocked (with justification)
|
|
193
|
-
3. **Key Findings** (by severity):
|
|
194
|
-
- HIGH severity issues first (especially falsely marked complete tasks)
|
|
195
|
-
- MEDIUM severity issues
|
|
196
|
-
- LOW severity issues
|
|
197
|
-
4. **Acceptance Criteria Coverage**:
|
|
198
|
-
- Include complete AC validation checklist from Step 4A
|
|
199
|
-
- Show: AC# | Description | Status (IMPLEMENTED/PARTIAL/MISSING) | Evidence (file:line)
|
|
200
|
-
- Summary: "X of Y acceptance criteria fully implemented"
|
|
201
|
-
- List any missing or partial ACs with severity
|
|
202
|
-
5. **Task Completion Validation**:
|
|
203
|
-
- Include complete task validation checklist from Step 4B
|
|
204
|
-
- Show: Task | Marked As | Verified As | Evidence (file:line)
|
|
205
|
-
- **CRITICAL**: Highlight any tasks marked complete but not done in RED/bold
|
|
206
|
-
- Summary: "X of Y completed tasks verified, Z questionable, W falsely marked complete"
|
|
207
|
-
6. **Test Coverage and Gaps**:
|
|
208
|
-
- Which ACs have tests, which don't
|
|
209
|
-
- Test quality issues found
|
|
210
|
-
7. **Architectural Alignment**:
|
|
211
|
-
- Tech-spec compliance
|
|
212
|
-
- Architecture violations if any
|
|
213
|
-
8. **Security Notes**: Security findings if any
|
|
214
|
-
9. **Best-Practices and References**: With links
|
|
215
|
-
10. **Action Items**:
|
|
216
|
-
- CRITICAL: ALL action items requiring code changes MUST have checkboxes for tracking
|
|
217
|
-
- Format for actionable items: `- [ ] [Severity] Description (AC #X) [file: path:line]`
|
|
218
|
-
- Format for informational notes: `- Note: Description (no action required)`
|
|
219
|
-
- Imperative phrasing for action items
|
|
220
|
-
- Map to related ACs or files with specific line references
|
|
221
|
-
- Include suggested owners if clear
|
|
222
|
-
- Example format:
|
|
223
|
-
```
|
|
224
|
-
### Action Items
|
|
225
|
-
|
|
226
|
-
**Code Changes Required:**
|
|
227
|
-
- [ ] [High] Add input validation on login endpoint (AC #1) [file: src/routes/auth.js:23-45]
|
|
228
|
-
- [ ] [Med] Add unit test for invalid email format [file: tests/unit/auth.test.js]
|
|
229
|
-
|
|
230
|
-
**Advisory Notes:**
|
|
231
|
-
- Note: Consider adding rate limiting for production deployment
|
|
232
|
-
- Note: Document the JWT expiration policy in README
|
|
233
|
-
```
|
|
234
|
-
</action>
|
|
235
|
-
|
|
236
|
-
<critical>The AC validation checklist and task validation checklist MUST be included in the review - this is the evidence trail</critical>
|
|
237
|
-
</step>
|
|
238
|
-
|
|
239
|
-
<step n="7" goal="Append review to story and update metadata">
|
|
240
|
-
<check if="ad_hoc_review_mode == true">
|
|
241
|
-
<action>Generate review report as a standalone document</action>
|
|
242
|
-
<action>Save to {{output_folder}}/code-review-{{date}}.md</action>
|
|
243
|
-
<action>Include sections:
|
|
244
|
-
- Review Type: Ad-Hoc Code Review
|
|
245
|
-
- Reviewer: {{user_name}}
|
|
246
|
-
- Date: {{date}}
|
|
247
|
-
- Files Reviewed: {{review_files}}
|
|
248
|
-
- Review Focus: {{review_focus}}
|
|
249
|
-
- Outcome: (Approve | Changes Requested | Blocked)
|
|
250
|
-
- Summary
|
|
251
|
-
- Key Findings
|
|
252
|
-
- Test Coverage and Gaps
|
|
253
|
-
- Architectural Alignment
|
|
254
|
-
- Security Notes
|
|
255
|
-
- Best-Practices and References (with links)
|
|
256
|
-
- Action Items
|
|
257
|
-
</action>
|
|
258
|
-
<output>Review saved to: {{output_folder}}/code-review-{{date}}.md</output>
|
|
259
|
-
</check>
|
|
260
|
-
|
|
261
|
-
<check if="ad_hoc_review_mode != true">
|
|
262
|
-
<action>Open {{story_path}} and append a new section at the end titled exactly: "Senior Developer Review (AI)".</action>
|
|
263
|
-
<action>Insert subsections:
|
|
264
|
-
- Reviewer: {{user_name}}
|
|
265
|
-
- Date: {{date}}
|
|
266
|
-
- Outcome: (Approve | Changes Requested | Blocked) with justification
|
|
267
|
-
- Summary
|
|
268
|
-
- Key Findings (by severity - HIGH/MEDIUM/LOW)
|
|
269
|
-
- **Acceptance Criteria Coverage**:
|
|
270
|
-
* Include complete AC validation checklist with table format
|
|
271
|
-
* AC# | Description | Status | Evidence
|
|
272
|
-
* Summary: X of Y ACs implemented
|
|
273
|
-
- **Task Completion Validation**:
|
|
274
|
-
* Include complete task validation checklist with table format
|
|
275
|
-
* Task | Marked As | Verified As | Evidence
|
|
276
|
-
* **Highlight falsely marked complete tasks prominently**
|
|
277
|
-
* Summary: X of Y tasks verified, Z questionable, W false completions
|
|
278
|
-
- Test Coverage and Gaps
|
|
279
|
-
- Architectural Alignment
|
|
280
|
-
- Security Notes
|
|
281
|
-
- Best-Practices and References (with links)
|
|
282
|
-
- Action Items:
|
|
283
|
-
* CRITICAL: Format with checkboxes for tracking resolution
|
|
284
|
-
* Code changes required: `- [ ] [Severity] Description [file: path:line]`
|
|
285
|
-
* Advisory notes: `- Note: Description (no action required)`
|
|
286
|
-
* Group by type: "Code Changes Required" and "Advisory Notes"
|
|
287
|
-
</action>
|
|
288
|
-
<action>Add a Change Log entry with date, version bump if applicable, and description: "Senior Developer Review notes appended".</action>
|
|
289
|
-
<action>If {{update_status_on_result}} is true: update Status to {{status_on_approve}} when approved; to {{status_on_changes_requested}} when changes requested; otherwise leave unchanged.</action>
|
|
290
|
-
<action>Save the story file.</action>
|
|
291
|
-
|
|
292
|
-
<critical>MUST include the complete validation checklists - this is the evidence that systematic review was performed</critical>
|
|
293
|
-
</check>
|
|
294
|
-
</step>
|
|
295
|
-
|
|
296
|
-
<step n="8" goal="Update sprint status based on review outcome" tag="sprint-status">
|
|
297
|
-
<check if="ad_hoc_review_mode == true">
|
|
298
|
-
<action>Skip sprint status update (no story context)</action>
|
|
299
|
-
<output>📋 Ad-hoc review complete - no sprint status to update</output>
|
|
300
|
-
</check>
|
|
301
|
-
|
|
302
|
-
<check if="ad_hoc_review_mode != true">
|
|
303
|
-
<action>Determine target status based on review outcome:
|
|
304
|
-
- If {{outcome}} == "Approve" → target_status = "done"
|
|
305
|
-
- If {{outcome}} == "Changes Requested" → target_status = "in-progress"
|
|
306
|
-
- If {{outcome}} == "Blocked" → target_status = "review" (stay in review)
|
|
307
|
-
</action>
|
|
308
|
-
|
|
309
|
-
<action>Load the FULL file: {{output_folder}}/sprint-status.yaml</action>
|
|
310
|
-
<action>Read all development_status entries to find {{story_key}}</action>
|
|
311
|
-
<action>Verify current status is "review" (expected previous state)</action>
|
|
312
|
-
<action>Update development_status[{{story_key}}] = {{target_status}}</action>
|
|
313
|
-
<action>Save file, preserving ALL comments and structure including STATUS DEFINITIONS</action>
|
|
314
|
-
|
|
315
|
-
<check if="update successful">
|
|
316
|
-
<output>✅ Sprint status updated: review → {{target_status}}</output>
|
|
317
|
-
</check>
|
|
318
|
-
|
|
319
|
-
<check if="story key not found">
|
|
320
|
-
<output>⚠️ Could not update sprint-status: {{story_key}} not found
|
|
321
|
-
|
|
322
|
-
Review was saved to story file, but sprint-status.yaml may be out of sync.
|
|
323
|
-
</output>
|
|
324
|
-
</check>
|
|
325
|
-
</check>
|
|
326
|
-
</step>
|
|
327
|
-
|
|
328
|
-
<step n="9" goal="Persist action items to tasks/backlog/epic">
|
|
329
|
-
<check if="ad_hoc_review_mode == true">
|
|
330
|
-
<action>All action items are included in the standalone review report</action>
|
|
331
|
-
<ask if="action items exist">Would you like me to create tracking items for these action items? (backlog/tasks)</ask>
|
|
332
|
-
<action if="user confirms">
|
|
333
|
-
If {{backlog_file}} does not exist, copy {installed_path}/backlog-template.md to {{backlog_file}} location.
|
|
334
|
-
Append a row per action item with Date={{date}}, Story="Ad-Hoc Review", Epic="N/A", Type, Severity, Owner (or "TBD"), Status="Open", Notes with file refs and context.
|
|
335
|
-
</action>
|
|
336
|
-
</check>
|
|
337
|
-
|
|
338
|
-
<check if="ad_hoc_review_mode != true">
|
|
339
|
-
<action>Normalize Action Items into a structured list: description, severity (High/Med/Low), type (Bug/TechDebt/Enhancement), suggested owner (if known), related AC/file references.</action>
|
|
340
|
-
<ask if="action items exist and 'story_tasks' in {{persist_targets}}">Add {{action_item_count}} follow-up items to story Tasks/Subtasks?</ask>
|
|
341
|
-
<action if="user confirms or no ask needed">
|
|
342
|
-
Append under the story's "Tasks / Subtasks" a new subsection titled "Review Follow-ups (AI)", adding each item as an unchecked checkbox in imperative form, prefixed with "[AI-Review]" and severity. Example: "- [ ] [AI-Review][High] Add input validation on server route /api/x (AC #2)".
|
|
343
|
-
</action>
|
|
344
|
-
<action>
|
|
345
|
-
If {{backlog_file}} does not exist, copy {installed_path}/backlog-template.md to {{backlog_file}} location.
|
|
346
|
-
Append a row per action item with Date={{date}}, Story={{epic_num}}.{{story_num}}, Epic={{epic_num}}, Type, Severity, Owner (or "TBD"), Status="Open", Notes with short context and file refs.
|
|
347
|
-
</action>
|
|
348
|
-
<action>
|
|
349
|
-
If an epic Tech Spec was found: open it and create (if missing) a section titled "{{epic_followups_section_title}}". Append a bullet list of action items scoped to this epic with references back to Story {{epic_num}}.{{story_num}}.
|
|
350
|
-
</action>
|
|
351
|
-
<action>Save modified files.</action>
|
|
352
|
-
<action>Optionally invoke tests or linters to verify quick fixes if any were applied as part of review (requires user approval for any dependency changes).</action>
|
|
353
|
-
</check>
|
|
354
|
-
</step>
|
|
355
|
-
|
|
356
|
-
<step n="10" goal="Validation and completion">
|
|
357
|
-
<invoke-task>Run validation checklist at {installed_path}/checklist.md using {project-root}/_bmad/core/tasks/validate-workflow.xml</invoke-task>
|
|
358
|
-
<action>Report workflow completion.</action>
|
|
359
|
-
|
|
360
|
-
<check if="ad_hoc_review_mode == true">
|
|
361
|
-
<output>**✅ Ad-Hoc Code Review Complete, {user_name}!**
|
|
362
|
-
|
|
363
|
-
**Review Details:**
|
|
364
|
-
- Files Reviewed: {{review_files}}
|
|
365
|
-
- Review Focus: {{review_focus}}
|
|
366
|
-
- Review Outcome: {{outcome}}
|
|
367
|
-
- Action Items: {{action_item_count}}
|
|
368
|
-
- Review Report: {{output_folder}}/code-review-{{date}}.md
|
|
369
|
-
|
|
370
|
-
**Next Steps:**
|
|
371
|
-
1. Review the detailed findings in the review report
|
|
372
|
-
2. If changes requested: Address action items in the code
|
|
373
|
-
3. If blocked: Resolve blockers before proceeding
|
|
374
|
-
4. Re-run review on updated code if needed
|
|
375
|
-
</output>
|
|
376
|
-
</check>
|
|
377
|
-
|
|
378
|
-
<check if="ad_hoc_review_mode != true">
|
|
379
|
-
<output>**✅ Story Review Complete, {user_name}!**
|
|
380
|
-
|
|
381
|
-
**Story Details:**
|
|
382
|
-
- Story: {{epic_num}}.{{story_num}}
|
|
383
|
-
- Story Key: {{story_key}}
|
|
384
|
-
- Review Outcome: {{outcome}}
|
|
385
|
-
- Sprint Status: {{target_status}}
|
|
386
|
-
- Action Items: {{action_item_count}}
|
|
387
|
-
|
|
388
|
-
**Next Steps:**
|
|
389
|
-
1. Review the Senior Developer Review notes appended to story
|
|
390
|
-
2. If approved: Story is marked done, continue with next story
|
|
391
|
-
3. If changes requested: Address action items and re-run `dev-story`
|
|
392
|
-
4. If blocked: Resolve blockers before proceeding
|
|
393
|
-
</output>
|
|
394
|
-
</check>
|
|
395
|
-
</step>
|
|
396
|
-
|
|
397
|
-
</workflow>
|
|
398
|
-
````
|
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
# Create Story - Workflow Instructions (Spec-compliant, non-interactive by default)
|
|
2
|
-
|
|
3
|
-
````xml
|
|
4
|
-
<critical>The workflow execution engine is governed by: {project_root}/_bmad/core/tasks/workflow.xml</critical>
|
|
5
|
-
<critical>You MUST have already loaded and processed: {installed_path}/workflow.yaml</critical>
|
|
6
|
-
<critical>Generate all documents in {document_output_language}</critical>
|
|
7
|
-
<critical>This workflow creates or updates the next user story from epics/PRD and architecture context, saving to the configured stories directory and optionally invoking Story Context.</critical>
|
|
8
|
-
<critical>DOCUMENT OUTPUT: Concise, technical, actionable story specifications. Use tables/lists for acceptance criteria and tasks.</critical>
|
|
9
|
-
|
|
10
|
-
<workflow>
|
|
11
|
-
|
|
12
|
-
<step n="1" goal="Load config and initialize">
|
|
13
|
-
<action>Resolve variables from config_source: story_dir (sprint_artifacts), output_folder, user_name, communication_language. If story_dir missing → ASK user to provide a stories directory and update variable.</action>
|
|
14
|
-
<action>Create {{story_dir}} if it does not exist</action>
|
|
15
|
-
<action>Resolve installed component paths from workflow.yaml: template, instructions, validation</action>
|
|
16
|
-
<action>Load architecture/standards docs: For each file name in {{arch_docs_file_names}} within {{arch_docs_search_dirs}}, read if exists. Collect testing, coding standards, security, and architectural patterns.</action>
|
|
17
|
-
</step>
|
|
18
|
-
|
|
19
|
-
<step n="1.5" goal="Discover and load project documents">
|
|
20
|
-
<invoke-protocol name="discover_inputs" />
|
|
21
|
-
<note>After discovery, these content variables are available: {prd_content}, {tech_spec_content}, {architecture_content}, {ux_design_content}, {epics_content}, {document_project_content}</note>
|
|
22
|
-
</step>
|
|
23
|
-
|
|
24
|
-
<step n="2" goal="Discover previous story context">
|
|
25
|
-
<critical>PREVIOUS STORY CONTINUITY: Essential for maintaining context and learning from prior development</critical>
|
|
26
|
-
|
|
27
|
-
<action>Find the previous completed story to extract dev agent learnings and review findings:
|
|
28
|
-
1. Load {{output_folder}}/sprint-status.yaml COMPLETELY
|
|
29
|
-
2. Find current {{story_key}} in development_status section
|
|
30
|
-
3. Identify the story entry IMMEDIATELY ABOVE current story (previous row in file order)
|
|
31
|
-
4. If previous story exists:
|
|
32
|
-
- Extract {{previous_story_key}}
|
|
33
|
-
- Check previous story status (done, in-progress, review, etc.)
|
|
34
|
-
- If status is "done", "review", or "in-progress" (has some completion):
|
|
35
|
-
* Construct path: {{story_dir}}/{{previous_story_key}}.md
|
|
36
|
-
* Load the COMPLETE previous story file
|
|
37
|
-
* Parse ALL sections comprehensively:
|
|
38
|
-
|
|
39
|
-
A) Dev Agent Record → Completion Notes List:
|
|
40
|
-
- New patterns/services created (to reuse, not recreate)
|
|
41
|
-
- Architectural deviations or decisions made
|
|
42
|
-
- Technical debt deferred to future stories
|
|
43
|
-
- Warnings or recommendations for next story
|
|
44
|
-
- Interfaces/methods created for reuse
|
|
45
|
-
|
|
46
|
-
B) Dev Agent Record → Debug Log References:
|
|
47
|
-
- Issues encountered and solutions
|
|
48
|
-
- Gotchas or unexpected challenges
|
|
49
|
-
- Workarounds applied
|
|
50
|
-
|
|
51
|
-
C) Dev Agent Record → File List:
|
|
52
|
-
- Files created (NEW) - understand new capabilities
|
|
53
|
-
- Files modified (MODIFIED) - track evolving components
|
|
54
|
-
- Files deleted (DELETED) - removed functionality
|
|
55
|
-
|
|
56
|
-
D) Dev Notes:
|
|
57
|
-
- Any "future story" notes or TODOs
|
|
58
|
-
- Patterns established
|
|
59
|
-
- Constraints discovered
|
|
60
|
-
|
|
61
|
-
E) Senior Developer Review (AI) section (if present):
|
|
62
|
-
- Review outcome (Approve/Changes Requested/Blocked)
|
|
63
|
-
- Unresolved action items (unchecked [ ] items)
|
|
64
|
-
- Key findings that might affect this story
|
|
65
|
-
- Architectural concerns raised
|
|
66
|
-
|
|
67
|
-
F) Senior Developer Review → Action Items (if present):
|
|
68
|
-
- Check for unchecked [ ] items still pending
|
|
69
|
-
- Note any systemic issues that apply to multiple stories
|
|
70
|
-
|
|
71
|
-
G) Review Follow-ups (AI) tasks (if present):
|
|
72
|
-
- Check for unchecked [ ] review tasks still pending
|
|
73
|
-
- Determine if they're epic-wide concerns
|
|
74
|
-
|
|
75
|
-
H) Story Status:
|
|
76
|
-
- If "review" or "in-progress" - incomplete, note what's pending
|
|
77
|
-
- If "done" - confirmed complete
|
|
78
|
-
* Store ALL findings as {{previous_story_learnings}} with structure:
|
|
79
|
-
- new_files: [list]
|
|
80
|
-
- modified_files: [list]
|
|
81
|
-
- new_services: [list with descriptions]
|
|
82
|
-
- architectural_decisions: [list]
|
|
83
|
-
- technical_debt: [list]
|
|
84
|
-
- warnings_for_next: [list]
|
|
85
|
-
- review_findings: [list if review exists]
|
|
86
|
-
- pending_items: [list of unchecked action items]
|
|
87
|
-
- If status is "backlog" or "drafted":
|
|
88
|
-
* Set {{previous_story_learnings}} = "Previous story not yet implemented"
|
|
89
|
-
5. If no previous story exists (first story in epic):
|
|
90
|
-
- Set {{previous_story_learnings}} = "First story in epic - no predecessor context"
|
|
91
|
-
</action>
|
|
92
|
-
|
|
93
|
-
<action>If {{tech_spec_file}} empty: derive from {{tech_spec_glob_template}} with {{epic_num}} and search {{tech_spec_search_dir}} recursively. If multiple, pick most recent by modified time.</action>
|
|
94
|
-
<action>Build a prioritized document set for this epic - search and load from {input_file_patterns} list of potential locations:
|
|
95
|
-
1) tech_spec_file (epic-scoped)
|
|
96
|
-
2) epics_file (acceptance criteria and breakdown) the specific epic the story will be part of
|
|
97
|
-
3) prd_file (business requirements and constraints) whole or sharded
|
|
98
|
-
4) architecture_file (architecture constraints) whole or sharded
|
|
99
|
-
</action>
|
|
100
|
-
<action>READ COMPLETE FILES for all items found in the prioritized set. Store content and paths for citation.</action>
|
|
101
|
-
</step>
|
|
102
|
-
|
|
103
|
-
<step n="3" goal="Find next backlog story to draft" tag="sprint-status">
|
|
104
|
-
<critical>MUST read COMPLETE {sprint_status} file from start to end to preserve order</critical>
|
|
105
|
-
<action>Read ALL lines from beginning to end - do not skip any content</action>
|
|
106
|
-
<action>Parse the development_status section completely to understand story order</action>
|
|
107
|
-
|
|
108
|
-
<action>Find the FIRST story (by reading in order from top to bottom) where:
|
|
109
|
-
- Key matches pattern: number-number-name (e.g., "1-2-user-auth")
|
|
110
|
-
- NOT an epic key (epic-X) or retrospective (epic-X-retrospective)
|
|
111
|
-
- Status value equals "backlog"
|
|
112
|
-
</action>
|
|
113
|
-
|
|
114
|
-
<check if="no backlog story found">
|
|
115
|
-
<output>📋 No backlog stories found in sprint-status.yaml
|
|
116
|
-
|
|
117
|
-
All stories are either already drafted or completed.
|
|
118
|
-
|
|
119
|
-
**Options:**
|
|
120
|
-
1. Run sprint-planning to refresh story tracking
|
|
121
|
-
2. Load PM agent and run correct-course to add more stories
|
|
122
|
-
3. Check if current sprint is complete
|
|
123
|
-
</output>
|
|
124
|
-
<action>HALT</action>
|
|
125
|
-
</check>
|
|
126
|
-
|
|
127
|
-
<action>Extract from found story key (e.g., "1-2-user-authentication"):
|
|
128
|
-
- epic_num: first number before dash (e.g., "1")
|
|
129
|
-
- story_num: second number after first dash (e.g., "2")
|
|
130
|
-
- story_title: remainder after second dash (e.g., "user-authentication")
|
|
131
|
-
</action>
|
|
132
|
-
<action>Set {{story_id}} = "{{epic_num}}.{{story_num}}"</action>
|
|
133
|
-
<action>Store story_key for later use (e.g., "1-2-user-authentication")</action>
|
|
134
|
-
|
|
135
|
-
<action>Verify story is enumerated in {{epics_file}}. If not found, HALT with message:</action>
|
|
136
|
-
<action>"Story {{story_key}} not found in epics.md. Please load PM agent and run correct-course to sync epics, then rerun create-story."</action>
|
|
137
|
-
|
|
138
|
-
<action>Check if story file already exists at expected path in {{story_dir}}</action>
|
|
139
|
-
<check if="story file exists">
|
|
140
|
-
<output>ℹ️ Story file already exists: {{story_file_path}}
|
|
141
|
-
Will update existing story file rather than creating new one.
|
|
142
|
-
</output>
|
|
143
|
-
<action>Set update_mode = true</action>
|
|
144
|
-
</check>
|
|
145
|
-
</step>
|
|
146
|
-
|
|
147
|
-
<step n="4" goal="Extract requirements and derive story statement">
|
|
148
|
-
<action>From tech_spec_file (preferred) or epics_file: extract epic {{epic_num}} title/summary, acceptance criteria for the next story, and any component references. If not present, fall back to PRD sections mapping to this epic/story.</action>
|
|
149
|
-
<action>From architecture and architecture docs: extract constraints, patterns, component boundaries, and testing guidance relevant to the extracted ACs. ONLY capture information that directly informs implementation of this story.</action>
|
|
150
|
-
<action>Derive a clear user story statement (role, action, benefit) grounded strictly in the above sources. If ambiguous and {{non_interactive}} == false → ASK user to clarify. If {{non_interactive}} == true → generate the best grounded statement WITHOUT inventing domain facts.</action>
|
|
151
|
-
<template-output file="{default_output_file}">requirements_context_summary</template-output>
|
|
152
|
-
</step>
|
|
153
|
-
|
|
154
|
-
<step n="5" goal="Project structure alignment and lessons learned">
|
|
155
|
-
<action>Review {{previous_story_learnings}} and extract actionable intelligence:
|
|
156
|
-
- New patterns/services created → Note for reuse (DO NOT recreate)
|
|
157
|
-
- Architectural deviations → Understand and maintain consistency
|
|
158
|
-
- Technical debt items → Assess if this story should address them
|
|
159
|
-
- Files modified → Understand current state of evolving components
|
|
160
|
-
- Warnings/recommendations → Apply to this story's approach
|
|
161
|
-
- Review findings → Learn from issues found in previous story
|
|
162
|
-
- Pending action items → Determine if epic-wide concerns affect this story
|
|
163
|
-
</action>
|
|
164
|
-
|
|
165
|
-
<action>If unified-project-structure.md present: align expected file paths, module names, and component locations; note any potential conflicts.</action>
|
|
166
|
-
|
|
167
|
-
<action>Cross-reference {{previous_story_learnings}}.new_files with project structure to understand where new capabilities are located.</action>
|
|
168
|
-
|
|
169
|
-
<template-output file="{default_output_file}">structure_alignment_summary</template-output>
|
|
170
|
-
</step>
|
|
171
|
-
|
|
172
|
-
<step n="6" goal="Assemble acceptance criteria and tasks">
|
|
173
|
-
<action>Assemble acceptance criteria list from tech_spec or epics. If gaps exist, derive minimal, testable criteria from PRD verbatim phrasing (NO invention).</action>
|
|
174
|
-
<action>Create tasks/subtasks directly mapped to ACs. Include explicit testing subtasks per testing-strategy and existing tests framework. Cite architecture/source documents for any technical mandates.</action>
|
|
175
|
-
<template-output file="{default_output_file}">acceptance_criteria</template-output>
|
|
176
|
-
<template-output file="{default_output_file}">tasks_subtasks</template-output>
|
|
177
|
-
</step>
|
|
178
|
-
|
|
179
|
-
<step n="7" goal="Create or update story document">
|
|
180
|
-
<action>Resolve output path: {default_output_file} using current {{epic_num}} and {{story_num}}. If targeting an existing story for update, use its path.</action>
|
|
181
|
-
<action>Initialize from template.md if creating a new file; otherwise load existing file for edit.</action>
|
|
182
|
-
<action>Compute a concise story_title from epic/story context; if missing, synthesize from PRD feature name and epic number.</action>
|
|
183
|
-
<template-output file="{default_output_file}">story_header</template-output>
|
|
184
|
-
<template-output file="{default_output_file}">story_body</template-output>
|
|
185
|
-
<template-output file="{default_output_file}">dev_notes_with_citations</template-output>
|
|
186
|
-
|
|
187
|
-
<action>If {{previous_story_learnings}} contains actionable items (not "First story" or "not yet implemented"):
|
|
188
|
-
- Add "Learnings from Previous Story" subsection to Dev Notes
|
|
189
|
-
- Include relevant completion notes, new files/patterns, deviations
|
|
190
|
-
- Cite previous story file as reference [Source: stories/{{previous_story_key}}.md]
|
|
191
|
-
- Highlight interfaces/services to REUSE (not recreate)
|
|
192
|
-
- Note any technical debt to address in this story
|
|
193
|
-
- List pending review items that affect this story (if any)
|
|
194
|
-
- Reference specific files created: "Use {{file_path}} for {{purpose}}"
|
|
195
|
-
- Format example:
|
|
196
|
-
```
|
|
197
|
-
### Learnings from Previous Story
|
|
198
|
-
|
|
199
|
-
**From Story {{previous_story_key}} (Status: {{previous_status}})**
|
|
200
|
-
|
|
201
|
-
- **New Service Created**: `AuthService` base class available at `src/services/AuthService.js` - use `AuthService.register()` method
|
|
202
|
-
- **Architectural Change**: Switched from session-based to JWT authentication
|
|
203
|
-
- **Schema Changes**: User model now includes `passwordHash` field, migration applied
|
|
204
|
-
- **Technical Debt**: Email verification skipped, should be included in this or subsequent story
|
|
205
|
-
- **Testing Setup**: Auth test suite initialized at `tests/integration/auth.test.js` - follow patterns established there
|
|
206
|
-
- **Pending Review Items**: Rate limiting mentioned in review - consider for this story
|
|
207
|
-
|
|
208
|
-
[Source: stories/{{previous_story_key}}.md#Dev-Agent-Record]
|
|
209
|
-
```
|
|
210
|
-
</action>
|
|
211
|
-
|
|
212
|
-
<template-output file="{default_output_file}">change_log</template-output>
|
|
213
|
-
</step>
|
|
214
|
-
|
|
215
|
-
<step n="8" goal="Validate, save, and mark story drafted" tag="sprint-status">
|
|
216
|
-
<invoke-task>Validate against checklist at {installed_path}/checklist.md using _bmad/core/tasks/validate-workflow.xml</invoke-task>
|
|
217
|
-
<action>Save document unconditionally (non-interactive default). In interactive mode, allow user confirmation.</action>
|
|
218
|
-
|
|
219
|
-
<!-- Mark story as drafted in sprint status -->
|
|
220
|
-
<action>Update {{output_folder}}/sprint-status.yaml</action>
|
|
221
|
-
<action>Load the FULL file and read all development_status entries</action>
|
|
222
|
-
<action>Find development_status key matching {{story_key}}</action>
|
|
223
|
-
<action>Verify current status is "backlog" (expected previous state)</action>
|
|
224
|
-
<action>Update development_status[{{story_key}}] = "drafted"</action>
|
|
225
|
-
<action>Save file, preserving ALL comments and structure including STATUS DEFINITIONS</action>
|
|
226
|
-
|
|
227
|
-
<check if="story key not found in file">
|
|
228
|
-
<output>⚠️ Could not update story status: {{story_key}} not found in sprint-status.yaml
|
|
229
|
-
|
|
230
|
-
Story file was created successfully, but sprint-status.yaml was not updated.
|
|
231
|
-
You may need to run sprint-planning to refresh tracking, or manually set the story row status to `drafted`.
|
|
232
|
-
</output>
|
|
233
|
-
</check>
|
|
234
|
-
|
|
235
|
-
<action>Report created/updated story path</action>
|
|
236
|
-
<output>**✅ Story Created Successfully, {user_name}!**
|
|
237
|
-
|
|
238
|
-
**Story Details:**
|
|
239
|
-
|
|
240
|
-
- Story ID: {{story_id}}
|
|
241
|
-
- Story Key: {{story_key}}
|
|
242
|
-
- File: {{story_file}}
|
|
243
|
-
- Status: drafted (was backlog)
|
|
244
|
-
|
|
245
|
-
**⚠️ Important:** The following workflows are context-intensive. It's recommended to clear context and restart the SM agent before running the next command.
|
|
246
|
-
|
|
247
|
-
**Next Steps:**
|
|
248
|
-
|
|
249
|
-
1. Review the drafted story in {{story_file}}
|
|
250
|
-
2. **[RECOMMENDED]** Run `story-context` to generate technical context XML and mark story ready for development (combines context + ready in one step)
|
|
251
|
-
3. Or run `story-ready` to manually mark the story ready without generating technical context
|
|
252
|
-
</output>
|
|
253
|
-
</step>
|
|
254
|
-
|
|
255
|
-
</workflow>
|
|
256
|
-
````
|