|
10 | 10 | <input name="architecture" required="true">Architecture document</input> |
11 | 11 | <input name="ux_design_spec" required="false">UX design specification</input> |
12 | 12 | <input name="story_template" required="true">Story file template</input> |
| 13 | + <input name="story_checklist" required="true">Story validation checklist</input> |
13 | 14 | </inputs> |
14 | 15 |
|
15 | | - <critical>Communicate all responses in {communication_language} and generate all documents in {document_output_language}</critical> |
| 16 | + <source_documents> |
| 17 | +## Epics |
| 18 | + |
| 19 | +{epics} |
| 20 | + |
| 21 | +## PRD |
| 22 | + |
| 23 | +{prd} |
| 24 | + |
| 25 | +## Architecture |
| 26 | + |
| 27 | +{architecture} |
| 28 | + |
| 29 | +## UX Design Specification |
| 30 | + |
| 31 | +{!ux_design_spec} |
| 32 | + |
| 33 | +## Story Template |
| 34 | + |
| 35 | +{story_template} |
| 36 | + |
| 37 | +## Story Checklist |
| 38 | + |
| 39 | +{story_checklist} |
| 40 | + </source_documents> |
16 | 41 |
|
17 | 42 | <critical>🔥 CRITICAL MISSION: You are creating the ULTIMATE story context engine that prevents LLM developer mistakes, omissions or |
18 | 43 | disasters! 🔥</critical> |
|
26 | 51 | analyze different artifacts simultaneously and thoroughly</critical> |
27 | 52 | <critical>❓ SAVE QUESTIONS: If you think of questions or clarifications during analysis, save them for the end after the complete story is |
28 | 53 | written</critical> |
29 | | - <critical>🎯 ZERO USER INTERVENTION: Process should be fully automated except for initial epic/story selection or missing documents</critical> |
30 | | - |
31 | | - <step n="1" goal="Determine target story"> |
32 | | - <check if="{{story_path}} is provided by user or user provided the epic and story number such as 2-4 or 1.6 or epic 1 story 5"> |
33 | | - <action>Parse user-provided story path: extract epic_num, story_num, story_title from format like "1-2-user-auth"</action> |
34 | | - <action>Set {{epic_num}}, {{story_num}}, {{story_key}} from user input</action> |
35 | | - <action>GOTO step 2a</action> |
36 | | - </check> |
37 | | - |
38 | | - <action>Check if .codemachine/artifacts/sprint-status.yaml file exists for auto discover</action> |
39 | | - <check if="sprint status file does NOT exist"> |
40 | | - <output>🚫 No sprint status file found and no story specified</output> |
41 | | - <output> |
42 | | - **Required Options:** |
43 | | - 1. Run `sprint-planning` to initialize sprint tracking (recommended) |
44 | | - 2. Provide specific epic-story number to create (e.g., "1-2-user-auth") |
45 | | - 3. Provide path to story documents if sprint status doesn't exist yet |
46 | | - </output> |
47 | | - <ask>Choose option [1], provide epic-story number, path to story docs, or [q] to quit:</ask> |
48 | | - |
49 | | - <check if="user chooses 'q'"> |
50 | | - <action>HALT - No work needed</action> |
51 | | - </check> |
52 | | - |
53 | | - <check if="user chooses '1'"> |
54 | | - <output>Run sprint-planning workflow first to create sprint-status.yaml</output> |
55 | | - <action>HALT - User needs to run sprint-planning</action> |
56 | | - </check> |
57 | | - |
58 | | - <check if="user provides epic-story number"> |
59 | | - <action>Parse user input: extract epic_num, story_num, story_title</action> |
60 | | - <action>Set {{epic_num}}, {{story_num}}, {{story_key}} from user input</action> |
61 | | - <action>GOTO step 2a</action> |
62 | | - </check> |
63 | | - |
64 | | - <check if="user provides story docs path"> |
65 | | - <action>Use user-provided path for story documents</action> |
66 | | - <action>GOTO step 2a</action> |
67 | | - </check> |
68 | | - </check> |
69 | | - |
70 | | - <!-- Auto-discover from sprint status only if no user input --> |
71 | | - <check if="no user input provided"> |
72 | | - <critical>MUST read COMPLETE .codemachine/artifacts/sprint-status.yaml file from start to end to preserve order</critical> |
73 | | - <action>Load the FULL file: .codemachine/artifacts/sprint-status.yaml</action> |
74 | | - <action>Read ALL lines from beginning to end - do not skip any content</action> |
75 | | - <action>Parse the development_status section completely</action> |
76 | | - |
77 | | - <action>Find the FIRST story (by reading in order from top to bottom) where: |
78 | | - - Key matches pattern: number-number-name (e.g., "1-2-user-auth") |
79 | | - - NOT an epic key (epic-X) or retrospective (epic-X-retrospective) |
80 | | - - Status value equals "backlog" |
81 | | - </action> |
82 | | - |
83 | | - <check if="no backlog story found"> |
84 | | - <output>📋 No backlog stories found in sprint-status.yaml |
85 | | - |
86 | | - All stories are either already created, in progress, or done. |
87 | | - |
88 | | - **Options:** |
89 | | - 1. Run sprint-planning to refresh story tracking |
90 | | - 2. Load PM agent and run correct-course to add more stories |
91 | | - 3. Check if current sprint is complete and run retrospective |
92 | | - </output> |
93 | | - <action>HALT</action> |
94 | | - </check> |
95 | | - |
96 | | - <action>Extract from found story key (e.g., "1-2-user-authentication"): |
97 | | - - epic_num: first number before dash (e.g., "1") |
98 | | - - story_num: second number after first dash (e.g., "2") |
99 | | - - story_title: remainder after second dash (e.g., "user-authentication") |
100 | | - </action> |
101 | | - <action>Set {{story_id}} = "{{epic_num}}.{{story_num}}"</action> |
102 | | - <action>Store story_key for later use (e.g., "1-2-user-authentication")</action> |
103 | | - |
104 | | - <!-- Mark epic as in-progress if this is first story --> |
105 | | - <action>Check if this is the first story in epic {{epic_num}} by looking for {{epic_num}}-1-* pattern</action> |
106 | | - <check if="this is first story in epic {{epic_num}}"> |
107 | | - <action>Load .codemachine/artifacts/sprint-status.yaml and check epic-{{epic_num}} status</action> |
108 | | - <action>If epic status is "backlog" → update to "in-progress"</action> |
109 | | - <action>If epic status is "contexted" (legacy status) → update to "in-progress" (backward compatibility)</action> |
110 | | - <action>If epic status is "in-progress" → no change needed</action> |
111 | | - <check if="epic status is 'done'"> |
112 | | - <output>🚫 ERROR: Cannot create story in completed epic</output> |
113 | | - <output>Epic {{epic_num}} is marked as 'done'. All stories are complete.</output> |
114 | | - <output>If you need to add more work, either:</output> |
115 | | - <output>1. Manually change epic status back to 'in-progress' in sprint-status.yaml</output> |
116 | | - <output>2. Create a new epic for additional work</output> |
117 | | - <action>HALT - Cannot proceed</action> |
118 | | - </check> |
119 | | - <check if="epic status is not one of: backlog, contexted, in-progress, done"> |
120 | | - <output>🚫 ERROR: Invalid epic status '{{epic_status}}'</output> |
121 | | - <output>Epic {{epic_num}} has invalid status. Expected: backlog, in-progress, or done</output> |
122 | | - <output>Please fix sprint-status.yaml manually or run sprint-planning to regenerate</output> |
123 | | - <action>HALT - Cannot proceed</action> |
124 | | - </check> |
125 | | - <output>📊 Epic {{epic_num}} status updated to in-progress</output> |
126 | | - </check> |
| 54 | + <critical>🎯 ZERO USER INTERVENTION: Process is fully automated - all data is pre-injected</critical> |
127 | 55 |
|
128 | | - <action>GOTO step 2a</action> |
129 | | - </check> |
130 | | - <action>Load the FULL file: .codemachine/artifacts/sprint-status.yaml</action> |
131 | | - <action>Read ALL lines from beginning to end - do not skip any content</action> |
132 | | - <action>Parse the development_status section completely</action> |
133 | | - |
134 | | - <action>Find the FIRST story (by reading in order from top to bottom) where: |
| 56 | + <step n="1" goal="Determine target story from sprint status"> |
| 57 | + <action>From {sprint_status}, find the FIRST story (in order) where: |
135 | 58 | - Key matches pattern: number-number-name (e.g., "1-2-user-auth") |
136 | 59 | - NOT an epic key (epic-X) or retrospective (epic-X-retrospective) |
137 | 60 | - Status value equals "backlog" |
138 | 61 | </action> |
139 | 62 |
|
140 | 63 | <check if="no backlog story found"> |
141 | | - <output>📋 No backlog stories found in sprint-status.yaml |
142 | | - |
143 | | - All stories are either already created, in progress, or done. |
144 | | - |
145 | | - **Options:** |
146 | | - 1. Run sprint-planning to refresh story tracking |
147 | | - 2. Load PM agent and run correct-course to add more stories |
148 | | - 3. Check if current sprint is complete and run retrospective |
149 | | - </output> |
| 64 | + <output>📋 No backlog stories found - All stories are either already created, in progress, or done.</output> |
150 | 65 | <action>HALT</action> |
151 | 66 | </check> |
152 | 67 |
|
|
159 | 74 | <action>Store story_key for later use (e.g., "1-2-user-authentication")</action> |
160 | 75 |
|
161 | 76 | <!-- Mark epic as in-progress if this is first story --> |
162 | | - <action>Check if this is the first story in epic {{epic_num}} by looking for {{epic_num}}-1-* pattern</action> |
163 | | - <check if="this is first story in epic {{epic_num}}"> |
164 | | - <action>Load .codemachine/artifacts/sprint-status.yaml and check epic-{{epic_num}} status</action> |
165 | | - <action>If epic status is "backlog" → update to "in-progress"</action> |
166 | | - <action>If epic status is "contexted" (legacy status) → update to "in-progress" (backward compatibility)</action> |
167 | | - <action>If epic status is "in-progress" → no change needed</action> |
| 77 | + <check if="this is first story in epic ({{epic_num}}-1-*)"> |
| 78 | + <action>If epic-{{epic_num}} status is "backlog" or "contexted" → update to "in-progress"</action> |
168 | 79 | <check if="epic status is 'done'"> |
169 | | - <output>🚫 ERROR: Cannot create story in completed epic</output> |
170 | | - <output>Epic {{epic_num}} is marked as 'done'. All stories are complete.</output> |
171 | | - <output>If you need to add more work, either:</output> |
172 | | - <output>1. Manually change epic status back to 'in-progress' in sprint-status.yaml</output> |
173 | | - <output>2. Create a new epic for additional work</output> |
174 | | - <action>HALT - Cannot proceed</action> |
175 | | - </check> |
176 | | - <check if="epic status is not one of: backlog, contexted, in-progress, done"> |
177 | | - <output>🚫 ERROR: Invalid epic status '{{epic_status}}'</output> |
178 | | - <output>Epic {{epic_num}} has invalid status. Expected: backlog, in-progress, or done</output> |
179 | | - <output>Please fix sprint-status.yaml manually or run sprint-planning to regenerate</output> |
180 | | - <action>HALT - Cannot proceed</action> |
| 80 | + <output>🚫 ERROR: Cannot create story in completed epic - Epic {{epic_num}} is marked as 'done'</output> |
| 81 | + <action>HALT</action> |
181 | 82 | </check> |
182 | 83 | <output>📊 Epic {{epic_num}} status updated to in-progress</output> |
183 | 84 | </check> |
184 | | - |
185 | | - <action>GOTO step 2a</action> |
186 | 85 | </step> |
187 | 86 |
|
188 | 87 | <step n="2" goal="Load and analyze core artifacts"> |
|
320 | 219 | </step> |
321 | 220 |
|
322 | 221 | <step n="6" goal="Update sprint status and finalize"> |
323 | | - <invoke-task>Validate against checklist at {installed_path}/checklist.md using _bmad/core/tasks/validate-workflow.xml</invoke-task> |
| 222 | + <action>Validate story against the Story Checklist criteria in source documents above</action> |
324 | 223 | <action>Save story document unconditionally</action> |
325 | 224 |
|
326 | 225 | <!-- Update sprint status --> |
327 | | - <check if="sprint status file exists"> |
328 | | - <action>Update .codemachine/artifacts/sprint-status.yaml</action> |
329 | | - <action>Load the FULL file and read all development_status entries</action> |
330 | | - <action>Find development_status key matching {{story_key}}</action> |
331 | | - <action>Verify current status is "backlog" (expected previous state)</action> |
332 | | - <action>Update development_status[{{story_key}}] = "ready-for-dev"</action> |
333 | | - <action>Save file, preserving ALL comments and structure including STATUS DEFINITIONS</action> |
334 | | - </check> |
| 226 | + <action>In .codemachine/artifacts/sprint-status.yaml, update development_status[{{story_key}}] from "backlog" to "ready-for-dev"</action> |
| 227 | + <action>Save .codemachine/artifacts/sprint-status.yaml preserving all comments and structure</action> |
335 | 228 |
|
336 | 229 | <action>Report completion</action> |
337 | 230 | <output>**🎯 ULTIMATE BMad Method STORY CONTEXT CREATED, {user_name}!** |
|
0 commit comments