@sleighmaster/bmad 1.5.4 โ†’ 1.5.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.
@@ -1,439 +1,540 @@
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 generate all documents in {document_output_language}</critical>
5
-
6
- <critical>๐Ÿ”ฅ CRITICAL MISSION: You are creating the ULTIMATE story context engine that prevents LLM developer mistakes, omissions or
7
- disasters! ๐Ÿ”ฅ</critical>
8
- <critical>Your purpose is NOT to copy from epics - it's to create a comprehensive, optimized story file that gives the DEV agent
9
- EVERYTHING needed for flawless implementation</critical>
10
- <critical>COMMON LLM MISTAKES TO PREVENT: reinventing wheels, wrong libraries, wrong file locations, breaking regressions, ignoring UX,
11
- vague implementations, lying about completion, not learning from past work</critical>
12
- <critical>๐Ÿšจ EXHAUSTIVE ANALYSIS REQUIRED: You must thoroughly analyze ALL artifacts to extract critical context - do NOT be lazy or skim!
13
- This is the most important function in the entire development process!</critical>
14
- <critical>๐Ÿ”ฌ UTILIZE SUBPROCESSES AND SUBAGENTS: Use research subagents, subprocesses or parallel processing if available to thoroughly
15
- analyze different artifacts simultaneously and thoroughly</critical>
16
- <critical>โ“ SAVE QUESTIONS: If you think of questions or clarifications during analysis, save them for the end after the complete story is
17
- written</critical>
18
- <critical>๐ŸŽฏ ZERO USER INTERVENTION: Process should be fully automated except for initial epic/story selection or missing documents</critical>
19
-
20
- <step n="1" goal="Determine target story">
21
- <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">
22
- <action>Parse user-provided story path: extract epic_num, story_num, story_title from format like "1-2-user-auth"</action>
23
- <action>Set {{epic_num}}, {{story_num}}, {{story_key}} from user input</action>
24
- <action>GOTO step 2a</action>
25
- </check>
26
-
27
- <action>Check if {{sprint_status}} file exists for auto discover</action>
28
- <check if="sprint status file does NOT exist">
29
- <output>๐Ÿšซ No sprint status file found and no story specified</output>
30
- <output>
31
- **Required Options:**
32
- 1. Run `sprint-planning` to initialize sprint tracking (recommended)
33
- 2. Provide specific epic-story number to create (e.g., "1-2-user-auth")
34
- 3. Provide path to story documents if sprint status doesn't exist yet
35
- </output>
36
- <ask>Choose option [1], provide epic-story number, path to story docs, or [q] to quit:</ask>
37
-
38
- <check if="user chooses 'q'">
39
- <action>HALT - No work needed</action>
40
- </check>
41
-
42
- <check if="user chooses '1'">
43
- <output>Run sprint-planning workflow first to create sprint-status.yaml</output>
44
- <action>HALT - User needs to run sprint-planning</action>
45
- </check>
46
-
47
- <check if="user provides epic-story number">
48
- <action>Parse user input: extract epic_num, story_num, story_title</action>
49
- <action>Set {{epic_num}}, {{story_num}}, {{story_key}} from user input</action>
50
- <action>GOTO step 2a</action>
51
- </check>
52
-
53
- <check if="user provides story docs path">
54
- <action>Use user-provided path for story documents</action>
55
- <action>GOTO step 2a</action>
56
- </check>
57
- </check>
58
-
59
- <!-- Auto-discover from sprint status only if no user input -->
60
- <check if="no user input provided">
61
- <critical>MUST read COMPLETE {sprint_status} file from start to end to preserve order</critical>
62
- <action>Load the FULL file: {{sprint_status}}</action>
63
- <action>Read ALL lines from beginning to end - do not skip any content</action>
64
- <action>Parse the development_status section completely</action>
65
-
66
- <action>Find the FIRST story (by reading in order from top to bottom) where:
67
- - Key matches pattern: number-number-name (e.g., "1-2-user-auth")
68
- - NOT an epic key (epic-X) or retrospective (epic-X-retrospective)
69
- - Status value equals "backlog"
70
- </action>
71
-
72
- <check if="no backlog story found">
73
- <output>๐Ÿ“‹ No backlog stories found in sprint-status.yaml
74
-
75
- All stories are either already created, in progress, or done.
76
-
77
- **Options:**
78
- 1. Run sprint-planning to refresh story tracking
79
- 2. Load PM agent and run correct-course to add more stories
80
- 3. Check if current sprint is complete and run retrospective
81
- </output>
82
- <action>HALT</action>
83
- </check>
84
-
85
- <action>Extract from found story key (e.g., "1-2-user-authentication"):
86
- - epic_num: first number before dash (e.g., "1")
87
- - story_num: second number after first dash (e.g., "2")
88
- - story_title: remainder after second dash (e.g., "user-authentication")
89
- </action>
90
- <action>Set {{story_id}} = "{{epic_num}}.{{story_num}}"</action>
91
- <action>Store story_key for later use (e.g., "1-2-user-authentication")</action>
92
-
93
- <!-- Mark epic as in-progress if this is first story -->
94
- <action>Check if this is the first story in epic {{epic_num}} by looking for {{epic_num}}-1-* pattern</action>
95
- <check if="this is first story in epic {{epic_num}}">
96
- <action>Load {{sprint_status}} and check epic-{{epic_num}} status</action>
97
- <action>If epic status is "backlog" โ†’ update to "in-progress"</action>
98
- <action>If epic status is "contexted" (legacy status) โ†’ update to "in-progress" (backward compatibility)</action>
99
- <action>If epic status is "in-progress" โ†’ no change needed</action>
100
- <check if="epic status is 'done'">
101
- <output>๐Ÿšซ ERROR: Cannot create story in completed epic</output>
102
- <output>Epic {{epic_num}} is marked as 'done'. All stories are complete.</output>
103
- <output>If you need to add more work, either:</output>
104
- <output>1. Manually change epic status back to 'in-progress' in sprint-status.yaml</output>
105
- <output>2. Create a new epic for additional work</output>
106
- <action>HALT - Cannot proceed</action>
107
- </check>
108
- <check if="epic status is not one of: backlog, contexted, in-progress, done">
109
- <output>๐Ÿšซ ERROR: Invalid epic status '{{epic_status}}'</output>
110
- <output>Epic {{epic_num}} has invalid status. Expected: backlog, in-progress, or done</output>
111
- <output>Please fix sprint-status.yaml manually or run sprint-planning to regenerate</output>
112
- <action>HALT - Cannot proceed</action>
113
- </check>
114
- <output>๐Ÿ“Š Epic {{epic_num}} status updated to in-progress</output>
115
- </check>
116
-
117
- <action>GOTO step 2a</action>
118
- </check>
119
- <action>Load the FULL file: {{sprint_status}}</action>
120
- <action>Read ALL lines from beginning to end - do not skip any content</action>
121
- <action>Parse the development_status section completely</action>
122
-
123
- <action>Find the FIRST story (by reading in order from top to bottom) where:
124
- - Key matches pattern: number-number-name (e.g., "1-2-user-auth")
125
- - NOT an epic key (epic-X) or retrospective (epic-X-retrospective)
126
- - Status value equals "backlog"
127
- </action>
128
-
129
- <check if="no backlog story found">
130
- <output>๐Ÿ“‹ No backlog stories found in sprint-status.yaml
131
-
132
- All stories are either already created, in progress, or done.
133
-
134
- **Options:**
135
- 1. Run sprint-planning to refresh story tracking
136
- 2. Load PM agent and run correct-course to add more stories
137
- 3. Check if current sprint is complete and run retrospective
138
- </output>
139
- <action>HALT</action>
140
- </check>
141
-
142
- <action>Extract from found story key (e.g., "1-2-user-authentication"):
143
- - epic_num: first number before dash (e.g., "1")
144
- - story_num: second number after first dash (e.g., "2")
145
- - story_title: remainder after second dash (e.g., "user-authentication")
146
- </action>
147
- <action>Set {{story_id}} = "{{epic_num}}.{{story_num}}"</action>
148
- <action>Store story_key for later use (e.g., "1-2-user-authentication")</action>
149
-
150
- <!-- Mark epic as in-progress if this is first story -->
151
- <action>Check if this is the first story in epic {{epic_num}} by looking for {{epic_num}}-1-* pattern</action>
152
- <check if="this is first story in epic {{epic_num}}">
153
- <action>Load {{sprint_status}} and check epic-{{epic_num}} status</action>
154
- <action>If epic status is "backlog" โ†’ update to "in-progress"</action>
155
- <action>If epic status is "contexted" (legacy status) โ†’ update to "in-progress" (backward compatibility)</action>
156
- <action>If epic status is "in-progress" โ†’ no change needed</action>
157
- <check if="epic status is 'done'">
158
- <output>๐Ÿšซ ERROR: Cannot create story in completed epic</output>
159
- <output>Epic {{epic_num}} is marked as 'done'. All stories are complete.</output>
160
- <output>If you need to add more work, either:</output>
161
- <output>1. Manually change epic status back to 'in-progress' in sprint-status.yaml</output>
162
- <output>2. Create a new epic for additional work</output>
163
- <action>HALT - Cannot proceed</action>
164
- </check>
165
- <check if="epic status is not one of: backlog, contexted, in-progress, done">
166
- <output>๐Ÿšซ ERROR: Invalid epic status '{{epic_status}}'</output>
167
- <output>Epic {{epic_num}} has invalid status. Expected: backlog, in-progress, or done</output>
168
- <output>Please fix sprint-status.yaml manually or run sprint-planning to regenerate</output>
169
- <action>HALT - Cannot proceed</action>
170
- </check>
171
- <output>๐Ÿ“Š Epic {{epic_num}} status updated to in-progress</output>
172
- </check>
173
-
174
- <action>GOTO step 2a</action>
175
- </step>
176
-
177
- <step n="2" goal="Load and analyze core artifacts">
178
- <critical>๐Ÿ”ฌ EXHAUSTIVE ARTIFACT ANALYSIS - This is where you prevent future developer fuckups!</critical>
179
-
180
- <!-- Load all available content through discovery protocol -->
181
- <invoke-protocol
182
- name="discover_inputs" />
183
- <note>Available content: {epics_content}, {prd_content}, {architecture_content}, {ux_content},
184
- {project_context}</note>
185
-
186
- <!-- Analyze epics file for story foundation -->
187
- <action>From {epics_content}, extract Epic {{epic_num}} complete context:</action> **EPIC ANALYSIS:** - Epic
188
- objectives and business value - ALL stories in this epic for cross-story context - Our specific story's requirements, user story
189
- statement, acceptance criteria - Technical requirements and constraints - Dependencies on other stories/epics - Source hints pointing to
190
- original documents <!-- Extract specific story requirements -->
191
- <action>Extract our story ({{epic_num}}-{{story_num}}) details:</action> **STORY FOUNDATION:** - User story statement
192
- (As a, I want, so that) - Detailed acceptance criteria (already BDD formatted) - Technical requirements specific to this story -
193
- Business context and value - Success criteria <!-- Previous story analysis for context continuity -->
194
- <check if="story_num > 1">
195
- <action>Load previous story file: {{story_dir}}/{{epic_num}}-{{previous_story_num}}-*.md</action> **PREVIOUS STORY INTELLIGENCE:** -
196
- Dev notes and learnings from previous story - Review feedback and corrections needed - Files that were created/modified and their
197
- patterns - Testing approaches that worked/didn't work - Problems encountered and solutions found - Code patterns established <action>Extract
198
- all learnings that could impact current story implementation</action>
199
- </check>
200
-
201
- <!-- Retrospective intelligence for learning propagation -->
202
- <action>Check if {retrospectives_folder} exists and contains retrospective documents</action>
203
- <check if="retrospective documents found in {retrospectives_folder}">
204
- <action>Scan {retrospectives_folder} for files matching pattern: epic-*-retro-*.md</action>
205
- <action>Sort by epic number descending, load the most recent retrospective(s) relevant to current epic</action>
206
- <action>If current epic_num > 1, prioritize loading epic-{{prev_epic_num}}-retro-*.md (immediately preceding epic)</action>
207
-
208
- **RETROSPECTIVE INTELLIGENCE:**
209
- <action>Extract from each loaded retrospective:
210
- - **Action Items**: Specific agreed-upon changes and their ownership
211
- - **Team Agreements**: Process or coding conventions the team committed to
212
- - **Recurring Patterns**: Issues that appeared multiple times across stories
213
- - **Code Review Findings**: H/M-level issues that were repeatedly flagged
214
- - **Lessons Learned**: Key insights about what worked and what didn't
215
- - **Anti-Patterns Identified**: Specific mistakes to avoid going forward
216
- </action>
217
- <action>Filter extracted items for relevance to current story's domain and technical area</action>
218
- <action>Flag any unresolved action items that directly apply to this story's implementation</action>
219
- </check>
220
-
221
- <!-- Git intelligence for previous work patterns -->
222
- <check
223
- if="previous story exists AND git repository detected">
224
- <action>Get last 5 commit titles to understand recent work patterns</action>
225
- <action>Analyze 1-5 most recent commits for relevance to current story:
226
- - Files created/modified
227
- - Code patterns and conventions used
228
- - Library dependencies added/changed
229
- - Architecture decisions implemented
230
- - Testing approaches used
231
- </action>
232
- <action>Extract actionable insights for current story implementation</action>
233
- </check>
234
- </step>
235
-
236
- <step n="3" goal="Architecture analysis for developer guardrails">
237
- <critical>๐Ÿ—๏ธ ARCHITECTURE INTELLIGENCE - Extract everything the developer MUST follow!</critical> **ARCHITECTURE DOCUMENT ANALYSIS:** <action>Systematically
238
- analyze architecture content for story-relevant requirements:</action>
239
-
240
- <!-- Load architecture - single file or sharded -->
241
- <check if="architecture file is single file">
242
- <action>Load complete {architecture_content}</action>
243
- </check>
244
- <check if="architecture is sharded to folder">
245
- <action>Load architecture index and scan all architecture files</action>
246
- </check> **CRITICAL ARCHITECTURE EXTRACTION:** <action>For
247
- each architecture section, determine if relevant to this story:</action> - **Technical Stack:** Languages, frameworks, libraries with
248
- versions - **Code Structure:** Folder organization, naming conventions, file patterns - **API Patterns:** Service structure, endpoint
249
- patterns, data contracts - **Database Schemas:** Tables, relationships, constraints relevant to story - **Security Requirements:**
250
- Authentication patterns, authorization rules - **Performance Requirements:** Caching strategies, optimization patterns - **Testing
251
- Standards:** Testing frameworks, coverage expectations, test patterns - **Deployment Patterns:** Environment configurations, build
252
- processes - **Integration Patterns:** External service integrations, data flows <action>Extract any story-specific requirements that the
253
- developer MUST follow</action>
254
- <action>Identify any architectural decisions that override previous patterns</action>
255
- </step>
256
-
257
- <step n="4" goal="Web research for latest technical specifics">
258
- <critical>๐ŸŒ ENSURE LATEST TECH KNOWLEDGE - Prevent outdated implementations!</critical> **WEB INTELLIGENCE:** <action>Identify specific
259
- technical areas that require latest version knowledge:</action>
260
-
261
- <!-- Check for libraries/frameworks mentioned in architecture -->
262
- <action>From architecture analysis, identify specific libraries, APIs, or
263
- frameworks</action>
264
- <action>For each critical technology, research latest stable version and key changes:
265
- - Latest API documentation and breaking changes
266
- - Security vulnerabilities or updates
267
- - Performance improvements or deprecations
268
- - Best practices for current version
269
- </action>
270
- **EXTERNAL CONTEXT INCLUSION:** <action>Include in story any critical latest information the developer needs:
271
- - Specific library versions and why chosen
272
- - API endpoints with parameters and authentication
273
- - Recent security patches or considerations
274
- - Performance optimization techniques
275
- - Migration considerations if upgrading
276
- </action>
277
- </step>
278
-
279
- <step n="5" goal="Create comprehensive story file">
280
- <critical>๐Ÿ“ CREATE ULTIMATE STORY FILE - The developer's master implementation guide!</critical>
281
-
282
- <action>Initialize from template.md:
283
- {default_output_file}</action>
284
- <template-output file="{default_output_file}">story_header</template-output>
285
-
286
- <!-- Story foundation from epics analysis -->
287
- <template-output
288
- file="{default_output_file}">story_requirements</template-output>
289
-
290
- <!-- Developer context section - MOST IMPORTANT PART -->
291
- <template-output file="{default_output_file}">
292
- developer_context_section</template-output> **DEV AGENT GUARDRAILS:** <template-output file="{default_output_file}">
293
- technical_requirements</template-output>
294
- <template-output file="{default_output_file}">architecture_compliance</template-output>
295
- <template-output
296
- file="{default_output_file}">library_framework_requirements</template-output>
297
- <template-output file="{default_output_file}">
298
- file_structure_requirements</template-output>
299
- <template-output file="{default_output_file}">testing_requirements</template-output>
300
-
301
- <!-- Retrospective learnings -->
302
- <check
303
- if="retrospective analysis completed AND relevant items found">
304
- <template-output file="{default_output_file}">retrospective_learnings</template-output>
305
- </check>
306
-
307
- <!-- Previous story intelligence -->
308
- <check
309
- if="previous story learnings available">
310
- <template-output file="{default_output_file}">previous_story_intelligence</template-output>
311
- </check>
312
-
313
- <!-- Git intelligence -->
314
- <check
315
- if="git analysis completed">
316
- <template-output file="{default_output_file}">git_intelligence_summary</template-output>
317
- </check>
318
-
319
- <!-- Latest technical specifics -->
320
- <check if="web research completed">
321
- <template-output file="{default_output_file}">latest_tech_information</template-output>
322
- </check>
323
-
324
- <!-- Project context reference -->
325
- <template-output
326
- file="{default_output_file}">project_context_reference</template-output>
327
-
328
- <!-- Final status update -->
329
- <template-output file="{default_output_file}">
330
- story_completion_status</template-output>
331
-
332
- <!-- CRITICAL: Set status to ready-for-dev -->
333
- <action>Set story Status to: "ready-for-dev"</action>
334
- <action>Add completion note: "Ultimate
335
- context engine analysis completed - comprehensive developer guide created"</action>
336
- </step>
337
-
338
- <step n="5.5" goal="์Šคํ† ๋ฆฌ ํƒ€์ž… ๊ฒฐ์ • ๋ฐ GitHub Issue ์ƒ์„ฑ">
339
- <critical>๐Ÿท๏ธ STORY TYPE DETERMINATION - Consistent labeling for issues and commits!</critical>
340
-
341
- <!-- ์Šคํ† ๋ฆฌ ํƒ€์ž… ๊ฒฐ์ • -->
342
- <action>์Šคํ† ๋ฆฌ ๋‚ด์šฉ ๋ถ„์„ํ•˜์—ฌ story-type ๊ฒฐ์ •:
343
- - ์ƒˆ ๊ธฐ๋Šฅ ๊ตฌํ˜„, ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ ์ถ”๊ฐ€ โ†’ feat
344
- - ๋ฒ„๊ทธ/์˜ค๋ฅ˜ ์ˆ˜์ •, ๋ฌธ์ œ ํ•ด๊ฒฐ โ†’ fix
345
- - ์ฝ”๋“œ ๊ฐœ์„ /๋ฆฌํŒฉํ† ๋ง, ์„ฑ๋Šฅ ๊ฐœ์„  โ†’ refactor
346
- - ๋ฌธ์„œ/์ฃผ์„ ์ž‘์—… โ†’ docs
347
- - ํ…Œ์ŠคํŠธ ์ถ”๊ฐ€/์ˆ˜์ • โ†’ test
348
- - ์„ค์ •/๋นŒ๋“œ/์˜์กด์„ฑ/๊ธฐํƒ€ โ†’ chore
349
- </action>
350
- <action>์Šคํ† ๋ฆฌ ํŒŒ์ผ์˜ Story-Type ํ•„๋“œ์— ๊ฒฐ์ •๋œ ํƒ€์ž… ๊ธฐ๋ก</action>
351
-
352
- <!-- GitHub Issue ์ƒ์„ฑ -->
353
- <check if="git repository detected (run: git rev-parse --git-dir)">
354
- <action>์ด์Šˆ ์ œ๋ชฉ ์ƒ์„ฑ: "[Epic {{epic_num}}] Story {{epic_num}}.{{story_num}}: {{story_title}}"</action>
355
- <action>์ด์Šˆ ๋ณธ๋ฌธ ์ƒ์„ฑ:
356
- ## Story
357
- {{story_statement}}
358
-
359
- ## Acceptance Criteria
360
- {{ac_list}}
361
-
362
- ## Story File
363
- `{{story_file_path}}`
364
- </action>
365
- <action>์ด์Šˆ ์ƒ์„ฑ ๋ช…๋ น ์‹คํ–‰:
366
- gh issue create \
367
- --title "[Epic {{epic_num}}] Story {{epic_num}}.{{story_num}}: {{story_title}}" \
368
- --body "{{issue_body}}" \
369
- --label "{{story_type}},epic-{{epic_num}}"
370
- </action>
371
-
372
- <check if="gh ๋ช…๋ น ์„ฑ๊ณต">
373
- <action>๋ฐ˜ํ™˜๋œ ์ด์Šˆ ๋ฒˆํ˜ธ ์ถ”์ถœ (์ถœ๋ ฅ์—์„œ ํŒŒ์‹ฑ)</action>
374
- <action>์ด์Šˆ URL ์ถ”์ถœ</action>
375
- <action>์Šคํ† ๋ฆฌ ํŒŒ์ผ์˜ GitHub Tracking ์„น์…˜ ์—…๋ฐ์ดํŠธ:
376
- - Issue: #{{issue_number}}
377
- - Issue URL: {{issue_url}}
378
- </action>
379
- <action>๋ธŒ๋žœ์น˜๋ช… ๊ฒฐ์ •: {{story_type}}/{{epic_num}}-{{story_num}}-{{story_title_kebab}}</action>
380
- <action>์Šคํ† ๋ฆฌ ํŒŒ์ผ์˜ GitHub Tracking > Branch ํ•„๋“œ์— ๋ธŒ๋žœ์น˜๋ช… ๊ธฐ๋ก</action>
381
- <output>โœ… GitHub Issue #{{issue_number}} ์ƒ์„ฑ๋จ: {{issue_url}}</output>
382
- </check>
383
-
384
- <check if="gh ๋ช…๋ น ์‹คํŒจ">
385
- <output>โš ๏ธ GitHub ์ด์Šˆ ์ƒ์„ฑ ์‹คํŒจ: {{error_message}}
386
-
387
- **ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•:**
388
- 1. `gh auth login`์œผ๋กœ GitHub CLI ์ธ์ฆ
389
- 2. ์ˆ˜๋™์œผ๋กœ ์ด์Šˆ ์ƒ์„ฑ ํ›„ SM์—๊ฒŒ `*link-issue` ์š”์ฒญ
390
- 3. GitHub Tracking ์„น์…˜์„ ์ˆ˜๋™์œผ๋กœ ์—…๋ฐ์ดํŠธ
391
-
392
- ์Šคํ† ๋ฆฌ ํŒŒ์ผ์€ ์ •์ƒ์ ์œผ๋กœ ์ƒ์„ฑ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. GitHub ์—ฐ๋™์€ ๋‚˜์ค‘์— ์ง„ํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
393
- </output>
394
- </check>
395
- </check>
396
-
397
- <check if="git repository NOT detected">
398
- <output>โ„น๏ธ Git ์ €์žฅ์†Œ๊ฐ€ ๊ฐ์ง€๋˜์ง€ ์•Š์Œ - GitHub ์—ฐ๋™ ๊ฑด๋„ˆ๋œ€
399
- ์Šคํ† ๋ฆฌ ํŒŒ์ผ์€ ์ •์ƒ์ ์œผ๋กœ ์ƒ์„ฑ๋ฉ๋‹ˆ๋‹ค.
400
- </output>
401
- </check>
402
- </step>
403
-
404
- <step n="6" goal="Update sprint status and finalize">
405
- <invoke-task>Validate against checklist at {installed_path}/checklist.md using _bmad/core/tasks/validate-workflow.xml</invoke-task>
406
- <action>Save story document unconditionally</action>
407
-
408
- <!-- Update sprint status -->
409
- <check if="sprint status file exists">
410
- <action>Update {{sprint_status}}</action>
411
- <action>Load the FULL file and read all development_status entries</action>
412
- <action>Find development_status key matching {{story_key}}</action>
413
- <action>Verify current status is "backlog" (expected previous state)</action>
414
- <action>Update development_status[{{story_key}}] = "ready-for-dev"</action>
415
- <action>Save file, preserving ALL comments and structure including STATUS DEFINITIONS</action>
416
- </check>
417
-
418
- <action>Report completion</action>
419
- <output>**๐ŸŽฏ ULTIMATE BMad Method STORY CONTEXT CREATED, {user_name}!**
420
-
421
- **Story Details:**
422
- - Story ID: {{story_id}}
423
- - Story Key: {{story_key}}
424
- - Story Type: {{story_type}}
425
- - File: {{story_file}}
426
- - Status: ready-for-dev
427
-
428
- **GitHub Tracking:**
429
- - Issue: #{{issue_number}} ({{issue_url}})
430
- - Branch: {{branch_name}}
431
-
432
- **The developer now has everything needed for flawless implementation!**
433
- </output>
434
-
435
- <critical>๐Ÿ›‘ PHASE BOUNDARY: create-story ์›Œํฌํ”Œ๋กœ์šฐ๊ฐ€ ์™„๋ฃŒ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. dev-story, code-review ๋“ฑ ๋‹ค๋ฅธ ์›Œํฌํ”Œ๋กœ์šฐ๋ฅผ ์ž๋™์œผ๋กœ ์‹คํ–‰ํ•˜์ง€ ๋งˆ์„ธ์š”. ์‚ฌ์šฉ์ž์˜ ๋‹ค์Œ ์ง€์‹œ๋ฅผ ๊ธฐ๋‹ค๋ฆฌ์„ธ์š”.</critical>
436
- <action>HALT - Workflow complete. Await user's next instruction.</action>
437
- </step>
438
-
439
- </workflow>
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 generate all documents in {document_output_language}</critical>
5
+
6
+ <critical>๐Ÿ”ฅ CRITICAL MISSION: You are creating the ULTIMATE story context engine that prevents LLM developer mistakes, omissions or
7
+ disasters! ๐Ÿ”ฅ</critical>
8
+ <critical>Your purpose is NOT to copy from epics - it's to create a comprehensive, optimized story file that gives the DEV agent
9
+ EVERYTHING needed for flawless implementation</critical>
10
+ <critical>COMMON LLM MISTAKES TO PREVENT: reinventing wheels, wrong libraries, wrong file locations, breaking regressions, ignoring UX,
11
+ vague implementations, lying about completion, not learning from past work</critical>
12
+ <critical>๐Ÿšจ EXHAUSTIVE ANALYSIS REQUIRED: You must thoroughly analyze ALL artifacts to extract critical context - do NOT be lazy or skim!
13
+ This is the most important function in the entire development process!</critical>
14
+ <critical>๐Ÿ”ฌ UTILIZE SUBPROCESSES AND SUBAGENTS: Use research subagents, subprocesses or parallel processing if available to thoroughly
15
+ analyze different artifacts simultaneously and thoroughly</critical>
16
+ <critical>โ“ SAVE QUESTIONS: If you think of questions or clarifications during analysis, save them for the end after the complete story is
17
+ written</critical>
18
+ <critical>๐ŸŽฏ ZERO USER INTERVENTION: Process should be fully automated except for initial epic/story selection or missing documents</critical>
19
+
20
+ <step n="1" goal="Determine target story">
21
+ <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">
22
+ <action>Parse user-provided story path: extract epic_num, story_num, story_title from format like "1-2-user-auth"</action>
23
+ <action>Set {{epic_num}}, {{story_num}}, {{story_key}} from user input</action>
24
+ <action>GOTO step 2a</action>
25
+ </check>
26
+
27
+ <action>Check if {{sprint_status}} file exists for auto discover</action>
28
+ <check if="sprint status file does NOT exist">
29
+ <output>๐Ÿšซ No sprint status file found and no story specified</output>
30
+ <output>
31
+ **Required Options:**
32
+ 1. Run `sprint-planning` to initialize sprint tracking (recommended)
33
+ 2. Provide specific epic-story number to create (e.g., "1-2-user-auth")
34
+ 3. Provide path to story documents if sprint status doesn't exist yet
35
+ </output>
36
+ <ask>Choose option [1], provide epic-story number, path to story docs, or [q] to quit:</ask>
37
+
38
+ <check if="user chooses 'q'">
39
+ <action>HALT - No work needed</action>
40
+ </check>
41
+
42
+ <check if="user chooses '1'">
43
+ <output>Run sprint-planning workflow first to create sprint-status.yaml</output>
44
+ <action>HALT - User needs to run sprint-planning</action>
45
+ </check>
46
+
47
+ <check if="user provides epic-story number">
48
+ <action>Parse user input: extract epic_num, story_num, story_title</action>
49
+ <action>Set {{epic_num}}, {{story_num}}, {{story_key}} from user input</action>
50
+ <action>GOTO step 2a</action>
51
+ </check>
52
+
53
+ <check if="user provides story docs path">
54
+ <action>Use user-provided path for story documents</action>
55
+ <action>GOTO step 2a</action>
56
+ </check>
57
+ </check>
58
+
59
+ <!-- Auto-discover from sprint status only if no user input -->
60
+ <check if="no user input provided">
61
+ <critical>MUST read COMPLETE {sprint_status} file from start to end to preserve order</critical>
62
+ <action>Load the FULL file: {{sprint_status}}</action>
63
+ <action>Read ALL lines from beginning to end - do not skip any content</action>
64
+ <action>Parse the development_status section completely</action>
65
+
66
+ <action>Find the FIRST story (by reading in order from top to bottom) where:
67
+ - Key matches pattern: number-number-name (e.g., "1-2-user-auth")
68
+ - NOT an epic key (epic-X) or retrospective (epic-X-retrospective)
69
+ - Status value equals "backlog"
70
+ </action>
71
+
72
+ <check if="no backlog story found">
73
+ <output>๐Ÿ“‹ No backlog stories found in sprint-status.yaml
74
+
75
+ All stories are either already created, in progress, or done.
76
+
77
+ **Options:**
78
+ 1. Run sprint-planning to refresh story tracking
79
+ 2. Load PM agent and run correct-course to add more stories
80
+ 3. Check if current sprint is complete and run retrospective
81
+ </output>
82
+ <action>HALT</action>
83
+ </check>
84
+
85
+ <action>Extract from found story key (e.g., "1-2-user-authentication"):
86
+ - epic_num: first number before dash (e.g., "1")
87
+ - story_num: second number after first dash (e.g., "2")
88
+ - story_title: remainder after second dash (e.g., "user-authentication")
89
+ </action>
90
+ <action>Set {{story_id}} = "{{epic_num}}.{{story_num}}"</action>
91
+ <action>Store story_key for later use (e.g., "1-2-user-authentication")</action>
92
+
93
+ <!-- Mark epic as in-progress if this is first story -->
94
+ <action>Check if this is the first story in epic {{epic_num}} by looking for {{epic_num}}-1-* pattern</action>
95
+ <check if="this is first story in epic {{epic_num}}">
96
+ <action>Load {{sprint_status}} and check epic-{{epic_num}} status</action>
97
+ <action>If epic status is "backlog" โ†’ update to "in-progress"</action>
98
+ <action>If epic status is "contexted" (legacy status) โ†’ update to "in-progress" (backward compatibility)</action>
99
+ <action>If epic status is "in-progress" โ†’ no change needed</action>
100
+ <check if="epic status is 'done'">
101
+ <output>๐Ÿšซ ERROR: Cannot create story in completed epic</output>
102
+ <output>Epic {{epic_num}} is marked as 'done'. All stories are complete.</output>
103
+ <output>If you need to add more work, either:</output>
104
+ <output>1. Manually change epic status back to 'in-progress' in sprint-status.yaml</output>
105
+ <output>2. Create a new epic for additional work</output>
106
+ <action>HALT - Cannot proceed</action>
107
+ </check>
108
+ <check if="epic status is not one of: backlog, contexted, in-progress, done">
109
+ <output>๐Ÿšซ ERROR: Invalid epic status '{{epic_status}}'</output>
110
+ <output>Epic {{epic_num}} has invalid status. Expected: backlog, in-progress, or done</output>
111
+ <output>Please fix sprint-status.yaml manually or run sprint-planning to regenerate</output>
112
+ <action>HALT - Cannot proceed</action>
113
+ </check>
114
+ <output>๐Ÿ“Š Epic {{epic_num}} status updated to in-progress</output>
115
+ </check>
116
+
117
+ <action>GOTO step 2a</action>
118
+ </check>
119
+ <action>Load the FULL file: {{sprint_status}}</action>
120
+ <action>Read ALL lines from beginning to end - do not skip any content</action>
121
+ <action>Parse the development_status section completely</action>
122
+
123
+ <action>Find the FIRST story (by reading in order from top to bottom) where:
124
+ - Key matches pattern: number-number-name (e.g., "1-2-user-auth")
125
+ - NOT an epic key (epic-X) or retrospective (epic-X-retrospective)
126
+ - Status value equals "backlog"
127
+ </action>
128
+
129
+ <check if="no backlog story found">
130
+ <output>๐Ÿ“‹ No backlog stories found in sprint-status.yaml
131
+
132
+ All stories are either already created, in progress, or done.
133
+
134
+ **Options:**
135
+ 1. Run sprint-planning to refresh story tracking
136
+ 2. Load PM agent and run correct-course to add more stories
137
+ 3. Check if current sprint is complete and run retrospective
138
+ </output>
139
+ <action>HALT</action>
140
+ </check>
141
+
142
+ <action>Extract from found story key (e.g., "1-2-user-authentication"):
143
+ - epic_num: first number before dash (e.g., "1")
144
+ - story_num: second number after first dash (e.g., "2")
145
+ - story_title: remainder after second dash (e.g., "user-authentication")
146
+ </action>
147
+ <action>Set {{story_id}} = "{{epic_num}}.{{story_num}}"</action>
148
+ <action>Store story_key for later use (e.g., "1-2-user-authentication")</action>
149
+
150
+ <!-- Mark epic as in-progress if this is first story -->
151
+ <action>Check if this is the first story in epic {{epic_num}} by looking for {{epic_num}}-1-* pattern</action>
152
+ <check if="this is first story in epic {{epic_num}}">
153
+ <action>Load {{sprint_status}} and check epic-{{epic_num}} status</action>
154
+ <action>If epic status is "backlog" โ†’ update to "in-progress"</action>
155
+ <action>If epic status is "contexted" (legacy status) โ†’ update to "in-progress" (backward compatibility)</action>
156
+ <action>If epic status is "in-progress" โ†’ no change needed</action>
157
+ <check if="epic status is 'done'">
158
+ <output>๐Ÿšซ ERROR: Cannot create story in completed epic</output>
159
+ <output>Epic {{epic_num}} is marked as 'done'. All stories are complete.</output>
160
+ <output>If you need to add more work, either:</output>
161
+ <output>1. Manually change epic status back to 'in-progress' in sprint-status.yaml</output>
162
+ <output>2. Create a new epic for additional work</output>
163
+ <action>HALT - Cannot proceed</action>
164
+ </check>
165
+ <check if="epic status is not one of: backlog, contexted, in-progress, done">
166
+ <output>๐Ÿšซ ERROR: Invalid epic status '{{epic_status}}'</output>
167
+ <output>Epic {{epic_num}} has invalid status. Expected: backlog, in-progress, or done</output>
168
+ <output>Please fix sprint-status.yaml manually or run sprint-planning to regenerate</output>
169
+ <action>HALT - Cannot proceed</action>
170
+ </check>
171
+ <output>๐Ÿ“Š Epic {{epic_num}} status updated to in-progress</output>
172
+ </check>
173
+
174
+ <action>GOTO step 2a</action>
175
+ </step>
176
+
177
+ <step n="2" goal="Load and analyze core artifacts">
178
+ <critical>๐Ÿ”ฌ EXHAUSTIVE ARTIFACT ANALYSIS - This is where you prevent future developer fuckups!</critical>
179
+
180
+ <!-- Load all available content through discovery protocol -->
181
+ <invoke-protocol
182
+ name="discover_inputs" />
183
+ <note>Available content: {epics_content}, {prd_content}, {architecture_content}, {ux_content},
184
+ {project_context}</note>
185
+
186
+ <!-- Analyze epics file for story foundation -->
187
+ <action>From {epics_content}, extract Epic {{epic_num}} complete context:</action> **EPIC ANALYSIS:** - Epic
188
+ objectives and business value - ALL stories in this epic for cross-story context - Our specific story's requirements, user story
189
+ statement, acceptance criteria - Technical requirements and constraints - Dependencies on other stories/epics - Source hints pointing to
190
+ original documents <!-- Extract specific story requirements -->
191
+ <action>Extract our story ({{epic_num}}-{{story_num}}) details:</action> **STORY FOUNDATION:** - User story statement
192
+ (As a, I want, so that) - Detailed acceptance criteria (already BDD formatted) - Technical requirements specific to this story -
193
+ Business context and value - Success criteria <!-- Previous story analysis for context continuity -->
194
+ <check if="story_num > 1">
195
+ <action>Load previous story file: {{story_dir}}/{{epic_num}}-{{previous_story_num}}-*.md</action> **PREVIOUS STORY INTELLIGENCE:** -
196
+ Dev notes and learnings from previous story - Review feedback and corrections needed - Files that were created/modified and their
197
+ patterns - Testing approaches that worked/didn't work - Problems encountered and solutions found - Code patterns established <action>Extract
198
+ all learnings that could impact current story implementation</action>
199
+ </check>
200
+
201
+ <!-- Retrospective intelligence for learning propagation -->
202
+ <action>Check if {retrospectives_folder} exists and contains retrospective documents</action>
203
+ <check if="retrospective documents found in {retrospectives_folder}">
204
+ <action>Scan {retrospectives_folder} for files matching pattern: epic-*-retro-*.md</action>
205
+ <action>Sort by epic number descending, load the most recent retrospective(s) relevant to current epic</action>
206
+ <action>If current epic_num > 1, prioritize loading epic-{{prev_epic_num}}-retro-*.md (immediately preceding epic)</action>
207
+
208
+ **RETROSPECTIVE INTELLIGENCE:**
209
+ <action>Extract from each loaded retrospective:
210
+ - **Action Items**: Specific agreed-upon changes and their ownership
211
+ - **Team Agreements**: Process or coding conventions the team committed to
212
+ - **Recurring Patterns**: Issues that appeared multiple times across stories
213
+ - **Code Review Findings**: H/M-level issues that were repeatedly flagged
214
+ - **Lessons Learned**: Key insights about what worked and what didn't
215
+ - **Anti-Patterns Identified**: Specific mistakes to avoid going forward
216
+ </action>
217
+ <action>Filter extracted items for relevance to current story's domain and technical area</action>
218
+ <action>Flag any unresolved action items that directly apply to this story's implementation</action>
219
+ </check>
220
+
221
+ <!-- Git intelligence for previous work patterns -->
222
+ <check
223
+ if="previous story exists AND git repository detected">
224
+ <action>Get last 5 commit titles to understand recent work patterns</action>
225
+ <action>Analyze 1-5 most recent commits for relevance to current story:
226
+ - Files created/modified
227
+ - Code patterns and conventions used
228
+ - Library dependencies added/changed
229
+ - Architecture decisions implemented
230
+ - Testing approaches used
231
+ </action>
232
+ <action>Extract actionable insights for current story implementation</action>
233
+ </check>
234
+ </step>
235
+
236
+ <step n="3" goal="Architecture analysis for developer guardrails">
237
+ <critical>๐Ÿ—๏ธ ARCHITECTURE INTELLIGENCE - Extract everything the developer MUST follow!</critical> **ARCHITECTURE DOCUMENT ANALYSIS:** <action>Systematically
238
+ analyze architecture content for story-relevant requirements:</action>
239
+
240
+ <!-- Load architecture - single file or sharded -->
241
+ <check if="architecture file is single file">
242
+ <action>Load complete {architecture_content}</action>
243
+ </check>
244
+ <check if="architecture is sharded to folder">
245
+ <action>Load architecture index and scan all architecture files</action>
246
+ </check> **CRITICAL ARCHITECTURE EXTRACTION:** <action>For
247
+ each architecture section, determine if relevant to this story:</action> - **Technical Stack:** Languages, frameworks, libraries with
248
+ versions - **Code Structure:** Folder organization, naming conventions, file patterns - **API Patterns:** Service structure, endpoint
249
+ patterns, data contracts - **Database Schemas:** Tables, relationships, constraints relevant to story - **Security Requirements:**
250
+ Authentication patterns, authorization rules - **Performance Requirements:** Caching strategies, optimization patterns - **Testing
251
+ Standards:** Testing frameworks, coverage expectations, test patterns - **Deployment Patterns:** Environment configurations, build
252
+ processes - **Integration Patterns:** External service integrations, data flows <action>Extract any story-specific requirements that the
253
+ developer MUST follow</action>
254
+ <action>Identify any architectural decisions that override previous patterns</action>
255
+ </step>
256
+
257
+ <step n="4" goal="Web research for latest technical specifics">
258
+ <critical>๐ŸŒ ENSURE LATEST TECH KNOWLEDGE - Prevent outdated implementations!</critical> **WEB INTELLIGENCE:** <action>Identify specific
259
+ technical areas that require latest version knowledge:</action>
260
+
261
+ <!-- Check for libraries/frameworks mentioned in architecture -->
262
+ <action>From architecture analysis, identify specific libraries, APIs, or
263
+ frameworks</action>
264
+ <action>For each critical technology, research latest stable version and key changes:
265
+ - Latest API documentation and breaking changes
266
+ - Security vulnerabilities or updates
267
+ - Performance improvements or deprecations
268
+ - Best practices for current version
269
+ </action>
270
+ **EXTERNAL CONTEXT INCLUSION:** <action>Include in story any critical latest information the developer needs:
271
+ - Specific library versions and why chosen
272
+ - API endpoints with parameters and authentication
273
+ - Recent security patches or considerations
274
+ - Performance optimization techniques
275
+ - Migration considerations if upgrading
276
+ </action>
277
+ </step>
278
+
279
+ <step n="5" goal="Create comprehensive story file">
280
+ <critical>๐Ÿ“ CREATE ULTIMATE STORY FILE - The developer's master implementation guide!</critical>
281
+
282
+ <action>Initialize from template.md:
283
+ {default_output_file}</action>
284
+ <template-output file="{default_output_file}">story_header</template-output>
285
+
286
+ <!-- Story foundation from epics analysis -->
287
+ <template-output
288
+ file="{default_output_file}">story_requirements</template-output>
289
+
290
+ <!-- Developer context section - MOST IMPORTANT PART -->
291
+ <template-output file="{default_output_file}">
292
+ developer_context_section</template-output> **DEV AGENT GUARDRAILS:** <template-output file="{default_output_file}">
293
+ technical_requirements</template-output>
294
+ <template-output file="{default_output_file}">architecture_compliance</template-output>
295
+ <template-output
296
+ file="{default_output_file}">library_framework_requirements</template-output>
297
+ <template-output file="{default_output_file}">
298
+ file_structure_requirements</template-output>
299
+ <template-output file="{default_output_file}">testing_requirements</template-output>
300
+
301
+ <!-- Retrospective learnings -->
302
+ <check
303
+ if="retrospective analysis completed AND relevant items found">
304
+ <template-output file="{default_output_file}">retrospective_learnings</template-output>
305
+ </check>
306
+
307
+ <!-- Previous story intelligence -->
308
+ <check
309
+ if="previous story learnings available">
310
+ <template-output file="{default_output_file}">previous_story_intelligence</template-output>
311
+ </check>
312
+
313
+ <!-- Git intelligence -->
314
+ <check
315
+ if="git analysis completed">
316
+ <template-output file="{default_output_file}">git_intelligence_summary</template-output>
317
+ </check>
318
+
319
+ <!-- Latest technical specifics -->
320
+ <check if="web research completed">
321
+ <template-output file="{default_output_file}">latest_tech_information</template-output>
322
+ </check>
323
+
324
+ <!-- Project context reference -->
325
+ <template-output
326
+ file="{default_output_file}">project_context_reference</template-output>
327
+
328
+ <!-- Final status update -->
329
+ <template-output file="{default_output_file}">
330
+ story_completion_status</template-output>
331
+
332
+ <!-- CRITICAL: Set status to ready-for-dev -->
333
+ <action>Set story Status to: "ready-for-dev"</action>
334
+ <action>Add completion note: "Ultimate
335
+ context engine analysis completed - comprehensive developer guide created"</action>
336
+ </step>
337
+
338
+ <step n="5.5" goal="์Šคํ† ๋ฆฌ ํƒ€์ž… ๊ฒฐ์ • ๋ฐ GitHub Issue ์ƒ์„ฑ">
339
+ <critical>๐Ÿท๏ธ STORY TYPE DETERMINATION - Consistent labeling for issues and commits!</critical>
340
+
341
+ <!-- ์Šคํ† ๋ฆฌ ํƒ€์ž… ๊ฒฐ์ • -->
342
+ <action>์Šคํ† ๋ฆฌ ๋‚ด์šฉ ๋ถ„์„ํ•˜์—ฌ story-type ๊ฒฐ์ •:
343
+ - ์ƒˆ ๊ธฐ๋Šฅ ๊ตฌํ˜„, ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ ์ถ”๊ฐ€ โ†’ feat
344
+ - ๋ฒ„๊ทธ/์˜ค๋ฅ˜ ์ˆ˜์ •, ๋ฌธ์ œ ํ•ด๊ฒฐ โ†’ fix
345
+ - ์ฝ”๋“œ ๊ฐœ์„ /๋ฆฌํŒฉํ† ๋ง, ์„ฑ๋Šฅ ๊ฐœ์„  โ†’ refactor
346
+ - ๋ฌธ์„œ/์ฃผ์„ ์ž‘์—… โ†’ docs
347
+ - ํ…Œ์ŠคํŠธ ์ถ”๊ฐ€/์ˆ˜์ • โ†’ test
348
+ - ์„ค์ •/๋นŒ๋“œ/์˜์กด์„ฑ/๊ธฐํƒ€ โ†’ chore
349
+ </action>
350
+ <action>์Šคํ† ๋ฆฌ ํŒŒ์ผ์˜ Story-Type ํ•„๋“œ์— ๊ฒฐ์ •๋œ ํƒ€์ž… ๊ธฐ๋ก</action>
351
+
352
+ <!-- GitHub Issue ์ƒ์„ฑ -->
353
+ <check if="git repository detected (run: git rev-parse --git-dir)">
354
+ <action>์ด์Šˆ ์ œ๋ชฉ ์ƒ์„ฑ: "[Epic {{epic_num}}] Story {{epic_num}}.{{story_num}}: {{story_title}}"</action>
355
+ <action>์ด์Šˆ ๋ณธ๋ฌธ ์ƒ์„ฑ:
356
+ ## Story
357
+ {{story_statement}}
358
+
359
+ ## Acceptance Criteria
360
+ {{ac_list}}
361
+
362
+ ## Story File
363
+ `{{story_file_path}}`
364
+ </action>
365
+ <action>์ด์Šˆ ์ƒ์„ฑ ๋ช…๋ น ์‹คํ–‰:
366
+ gh issue create \
367
+ --title "[Epic {{epic_num}}] Story {{epic_num}}.{{story_num}}: {{story_title}}" \
368
+ --body "{{issue_body}}" \
369
+ --label "{{story_type}},epic-{{epic_num}}"
370
+ </action>
371
+
372
+ <check if="gh ๋ช…๋ น ์„ฑ๊ณต">
373
+ <action>๋ฐ˜ํ™˜๋œ ์ด์Šˆ ๋ฒˆํ˜ธ ์ถ”์ถœ (์ถœ๋ ฅ์—์„œ ํŒŒ์‹ฑ)</action>
374
+ <action>์ด์Šˆ URL ์ถ”์ถœ</action>
375
+ <action>์Šคํ† ๋ฆฌ ํŒŒ์ผ์˜ GitHub Tracking ์„น์…˜ ์—…๋ฐ์ดํŠธ:
376
+ - Issue: #{{issue_number}}
377
+ - Issue URL: {{issue_url}}
378
+ </action>
379
+ <action>๋ธŒ๋žœ์น˜๋ช… ๊ฒฐ์ •: {{story_type}}/{{epic_num}}-{{story_num}}-{{story_title_kebab}}</action>
380
+ <action>์Šคํ† ๋ฆฌ ํŒŒ์ผ์˜ GitHub Tracking > Branch ํ•„๋“œ์— ๋ธŒ๋žœ์น˜๋ช… ๊ธฐ๋ก</action>
381
+ <output>โœ… GitHub Issue #{{issue_number}} ์ƒ์„ฑ๋จ: {{issue_url}}</output>
382
+ </check>
383
+
384
+ <check if="gh ๋ช…๋ น ์‹คํŒจ">
385
+ <output>โš ๏ธ GitHub ์ด์Šˆ ์ƒ์„ฑ ์‹คํŒจ: {{error_message}}
386
+
387
+ **ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•:**
388
+ 1. `gh auth login`์œผ๋กœ GitHub CLI ์ธ์ฆ
389
+ 2. ์ˆ˜๋™์œผ๋กœ ์ด์Šˆ ์ƒ์„ฑ ํ›„ SM์—๊ฒŒ `*link-issue` ์š”์ฒญ
390
+ 3. GitHub Tracking ์„น์…˜์„ ์ˆ˜๋™์œผ๋กœ ์—…๋ฐ์ดํŠธ
391
+
392
+ ์Šคํ† ๋ฆฌ ํŒŒ์ผ์€ ์ •์ƒ์ ์œผ๋กœ ์ƒ์„ฑ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. GitHub ์—ฐ๋™์€ ๋‚˜์ค‘์— ์ง„ํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
393
+ </output>
394
+ </check>
395
+ </check>
396
+
397
+ <check if="git repository NOT detected">
398
+ <output>โ„น๏ธ Git ์ €์žฅ์†Œ๊ฐ€ ๊ฐ์ง€๋˜์ง€ ์•Š์Œ - GitHub ์—ฐ๋™ ๊ฑด๋„ˆ๋œ€
399
+ ์Šคํ† ๋ฆฌ ํŒŒ์ผ์€ ์ •์ƒ์ ์œผ๋กœ ์ƒ์„ฑ๋ฉ๋‹ˆ๋‹ค.
400
+ </output>
401
+ </check>
402
+ </step>
403
+
404
+ <step n="5.7" goal="์Šคํ† ๋ฆฌ ๋ฌธ์„œ ๊ฒ€ํ†  ์š”์ฒญ">
405
+ <critical>๐Ÿ“‹ STORY REVIEW - ์‚ฌ์šฉ์ž ๊ฒ€ํ† ๋ฅผ ํ†ตํ•ด ์Šคํ† ๋ฆฌ ํ’ˆ์งˆ ํ™•๋ณด!</critical>
406
+
407
+ <action>์ž‘์„ฑ๋œ ์Šคํ† ๋ฆฌ ํŒŒ์ผ์˜ ํ•ต์‹ฌ ๋‚ด์šฉ ์š”์•ฝ ์ถœ๋ ฅ:</action>
408
+ <output>**๐Ÿ“‹ ์Šคํ† ๋ฆฌ ๋ฌธ์„œ ๊ฒ€ํ†  ์š”์ฒญ**
409
+
410
+ **Story {{epic_num}}.{{story_num}}: {{story_title}}**
411
+ - Story Type: {{story_type}}
412
+ - File: {{story_file}}
413
+
414
+ **Story:**
415
+ {{story_statement}}
416
+
417
+ **Acceptance Criteria:**
418
+ {{ac_summary}}
419
+
420
+ **Tasks:**
421
+ {{tasks_summary}}
422
+
423
+ ์Šคํ† ๋ฆฌ ํŒŒ์ผ ์ „์ฒด ๋‚ด์šฉ์€ `{{story_file}}`์—์„œ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
424
+ </output>
425
+
426
+ <ask>์Šคํ† ๋ฆฌ ๋ฌธ์„œ๋ฅผ ๊ฒ€ํ† ํ•ด ์ฃผ์„ธ์š”. ์ˆ˜์ •์ด ํ•„์š”ํ•˜๋ฉด ํ”ผ๋“œ๋ฐฑ์„, ์Šน์ธํ•˜์‹œ๋ฉด 'ํ™•์ธ' ๋˜๋Š” 'ok'๋ฅผ ์ž…๋ ฅํ•ด ์ฃผ์„ธ์š”:</ask>
427
+
428
+ <check if="์‚ฌ์šฉ์ž๊ฐ€ ์ˆ˜์ • ํ”ผ๋“œ๋ฐฑ ์ œ๊ณต">
429
+ <action>ํ”ผ๋“œ๋ฐฑ ๋‚ด์šฉ์— ๋”ฐ๋ผ ์Šคํ† ๋ฆฌ ํŒŒ์ผ ์ˆ˜์ •</action>
430
+ <action>์ˆ˜์ •๋œ ๋‚ด์šฉ ์š”์•ฝ ์ถœ๋ ฅ</action>
431
+ <ask>์ˆ˜์ • ์‚ฌํ•ญ์„ ๋ฐ˜์˜ํ–ˆ์Šต๋‹ˆ๋‹ค. ์ถ”๊ฐ€ ์ˆ˜์ •์ด ํ•„์š”ํ•˜๋ฉด ํ”ผ๋“œ๋ฐฑ์„, ์Šน์ธํ•˜์‹œ๋ฉด 'ํ™•์ธ'์„ ์ž…๋ ฅํ•ด ์ฃผ์„ธ์š”:</ask>
432
+ <note>์‚ฌ์šฉ์ž๊ฐ€ ์Šน์ธํ•  ๋•Œ๊นŒ์ง€ ์ˆ˜์ •-์žฌ๊ฒ€ํ†  ๋ฐ˜๋ณต</note>
433
+ </check>
434
+
435
+ <check if="์‚ฌ์šฉ์ž๊ฐ€ ์Šน์ธ (ํ™•์ธ, ok, ์ข‹์•„, approve ๋“ฑ)">
436
+ <output>โœ… ์Šคํ† ๋ฆฌ ๋ฌธ์„œ ๊ฒ€ํ†  ์™„๋ฃŒ - ๋ธŒ๋žœ์น˜ ์ƒ์„ฑ ๋ฐ ์ปค๋ฐ‹์„ ์ง„ํ–‰ํ•ฉ๋‹ˆ๋‹ค.</output>
437
+ <action>GOTO step 5.8</action>
438
+ </check>
439
+ </step>
440
+
441
+ <step n="5.8" goal="Git ๋ธŒ๋žœ์น˜ ์ƒ์„ฑ ๋ฐ ์Šคํ† ๋ฆฌ ๋ฌธ์„œ ์ปค๋ฐ‹">
442
+ <critical>๐ŸŒฟ GIT BRANCH & COMMIT - ๊ฒ€ํ†  ์™„๋ฃŒ๋œ ์Šคํ† ๋ฆฌ ๋ฌธ์„œ๋ฅผ ๋ธŒ๋žœ์น˜์— ์ปค๋ฐ‹!</critical>
443
+
444
+ <check if="git repository detected (run: git rev-parse --git-dir)">
445
+ <check if="{{branch_name}}์ด ๋น„์–ด์žˆ์Œ">
446
+ <action>๋ธŒ๋žœ์น˜๋ช… ๊ฒฐ์ •: {{story_type}}/{{epic_num}}-{{story_num}}-{{story_title_kebab}}</action>
447
+ <action>์Šคํ† ๋ฆฌ ํŒŒ์ผ์˜ GitHub Tracking > Branch ํ•„๋“œ์— ๋ธŒ๋žœ์น˜๋ช… ๊ธฐ๋ก</action>
448
+ </check>
449
+
450
+ <action>ํ˜„์žฌ ๋ธŒ๋žœ์น˜ ํ™•์ธ: git branch --show-current</action>
451
+
452
+ <!-- 1์ˆœ์œ„: ์ด๋ฏธ ์˜ฌ๋ฐ”๋ฅธ ๋ธŒ๋žœ์น˜์— ์žˆ์Œ -->
453
+ <check if="ํ˜„์žฌ ๋ธŒ๋žœ์น˜๊ฐ€ {{branch_name}}๊ณผ ๋™์ผ">
454
+ <output>โœ… ์ด๋ฏธ ์˜ฌ๋ฐ”๋ฅธ ๋ธŒ๋žœ์น˜์— ์žˆ์Œ: {{branch_name}}</output>
455
+ </check>
456
+
457
+ <!-- 2์ˆœ์œ„: ๋กœ์ปฌ์— ํ•ด๋‹น ๋ธŒ๋žœ์น˜ ์กด์žฌ -->
458
+ <check if="ํ˜„์žฌ ๋ธŒ๋žœ์น˜๊ฐ€ {{branch_name}}์ด ์•„๋‹˜">
459
+ <action>๋กœ์ปฌ ๋ธŒ๋žœ์น˜ ์กด์žฌ ํ™•์ธ: git branch --list {{branch_name}}</action>
460
+
461
+ <check if="๋กœ์ปฌ์— {{branch_name}} ๋ธŒ๋žœ์น˜๊ฐ€ ์กด์žฌ">
462
+ <action>๊ธฐ์กด ๋กœ์ปฌ ๋ธŒ๋žœ์น˜๋กœ ์ฒดํฌ์•„์›ƒ: git checkout {{branch_name}}</action>
463
+ <output>๐ŸŒฟ ๊ธฐ์กด ๋กœ์ปฌ ๋ธŒ๋žœ์น˜๋กœ ์ฒดํฌ์•„์›ƒ: {{branch_name}}</output>
464
+ </check>
465
+
466
+ <!-- 3์ˆœ์œ„: ๋ฆฌ๋ชจํŠธ์— ํ•ด๋‹น ๋ธŒ๋žœ์น˜ ์กด์žฌ -->
467
+ <check if="๋กœ์ปฌ์— {{branch_name}} ๋ธŒ๋žœ์น˜๊ฐ€ ์—†์Œ">
468
+ <action>๋ฆฌ๋ชจํŠธ ๋ธŒ๋žœ์น˜ ์กด์žฌ ํ™•์ธ: git ls-remote --heads origin {{branch_name}}</action>
469
+
470
+ <check if="๋ฆฌ๋ชจํŠธ์— {{branch_name}} ๋ธŒ๋žœ์น˜๊ฐ€ ์กด์žฌ">
471
+ <action>๋ฆฌ๋ชจํŠธ ๋ธŒ๋žœ์น˜ ๊ธฐ๋ฐ˜์œผ๋กœ ๋กœ์ปฌ ์ฒดํฌ์•„์›ƒ: git checkout -b {{branch_name}} origin/{{branch_name}}</action>
472
+ <output>๐ŸŒฟ ๋ฆฌ๋ชจํŠธ ๋ธŒ๋žœ์น˜์—์„œ ๋กœ์ปฌ ์ฒดํฌ์•„์›ƒ: {{branch_name}}</output>
473
+ </check>
474
+
475
+ <!-- 4์ˆœ์œ„: ์–ด๋””์—๋„ ์—†์Œ โ†’ ์ƒˆ ๋ธŒ๋žœ์น˜ ์ƒ์„ฑ -->
476
+ <check if="๋ฆฌ๋ชจํŠธ์—๋„ {{branch_name}} ๋ธŒ๋žœ์น˜๊ฐ€ ์—†์Œ">
477
+ <action>์ƒˆ ๋ธŒ๋žœ์น˜ ์ƒ์„ฑ ๋ฐ ์ฒดํฌ์•„์›ƒ: git checkout -b {{branch_name}}</action>
478
+ <output>๐ŸŒฟ ์ƒˆ ๋ธŒ๋žœ์น˜ ์ƒ์„ฑ๋จ: {{branch_name}}</output>
479
+ </check>
480
+ </check>
481
+ </check>
482
+
483
+ <!-- ์Šคํ† ๋ฆฌ ๋ฌธ์„œ ์ปค๋ฐ‹ -->
484
+ <action>์Šคํ† ๋ฆฌ ํŒŒ์ผ ์Šคํ…Œ์ด์ง•: git add {{story_file}}</action>
485
+ <action>์Šคํ† ๋ฆฌ ๋ฌธ์„œ ์ปค๋ฐ‹:
486
+ git commit -m "docs(story-{{epic_num}}.{{story_num}}): {{story_title}} ์Šคํ† ๋ฆฌ ๋ฌธ์„œ ์ƒ์„ฑ"
487
+ </action>
488
+
489
+ <check if="์ปค๋ฐ‹ ์„ฑ๊ณต">
490
+ <output>โœ… ์Šคํ† ๋ฆฌ ๋ฌธ์„œ ์ปค๋ฐ‹ ์™„๋ฃŒ: {{branch_name}}</output>
491
+ </check>
492
+
493
+ <check if="์ปค๋ฐ‹ ์‹คํŒจ">
494
+ <output>โš ๏ธ ์Šคํ† ๋ฆฌ ๋ฌธ์„œ ์ปค๋ฐ‹ ์‹คํŒจ: {{error_message}}
495
+ ์ˆ˜๋™์œผ๋กœ ์ปค๋ฐ‹ํ•ด ์ฃผ์„ธ์š”: git add {{story_file}} && git commit -m "docs(story-{{epic_num}}.{{story_num}}): {{story_title}}"
496
+ </output>
497
+ </check>
498
+ </check>
499
+
500
+ <check if="git repository NOT detected">
501
+ <output>โ„น๏ธ Git ์ €์žฅ์†Œ๊ฐ€ ๊ฐ์ง€๋˜์ง€ ์•Š์Œ - ๋ธŒ๋žœ์น˜ ์ƒ์„ฑ ๋ฐ ์ปค๋ฐ‹ ๊ฑด๋„ˆ๋œ€</output>
502
+ </check>
503
+ </step>
504
+
505
+ <step n="6" goal="Update sprint status and finalize">
506
+ <invoke-task>Validate against checklist at {installed_path}/checklist.md using _bmad/core/tasks/validate-workflow.xml</invoke-task>
507
+ <action>Save story document unconditionally</action>
508
+
509
+ <!-- Update sprint status -->
510
+ <check if="sprint status file exists">
511
+ <action>Update {{sprint_status}}</action>
512
+ <action>Load the FULL file and read all development_status entries</action>
513
+ <action>Find development_status key matching {{story_key}}</action>
514
+ <action>Verify current status is "backlog" (expected previous state)</action>
515
+ <action>Update development_status[{{story_key}}] = "ready-for-dev"</action>
516
+ <action>Save file, preserving ALL comments and structure including STATUS DEFINITIONS</action>
517
+ </check>
518
+
519
+ <action>Report completion</action>
520
+ <output>**๐ŸŽฏ ULTIMATE BMad Method STORY CONTEXT CREATED, {user_name}!**
521
+
522
+ **Story Details:**
523
+ - Story ID: {{story_id}}
524
+ - Story Key: {{story_key}}
525
+ - Story Type: {{story_type}}
526
+ - File: {{story_file}}
527
+ - Status: ready-for-dev
528
+
529
+ **GitHub Tracking:**
530
+ - Issue: #{{issue_number}} ({{issue_url}})
531
+ - Branch: {{branch_name}} (์ฒดํฌ์•„์›ƒ ์™„๋ฃŒ, ์Šคํ† ๋ฆฌ ๋ฌธ์„œ ์ปค๋ฐ‹๋จ)
532
+
533
+ **The developer now has everything needed for flawless implementation!**
534
+ </output>
535
+
536
+ <critical>๐Ÿ›‘ PHASE BOUNDARY: create-story ์›Œํฌํ”Œ๋กœ์šฐ๊ฐ€ ์™„๋ฃŒ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. dev-story, code-review ๋“ฑ ๋‹ค๋ฅธ ์›Œํฌํ”Œ๋กœ์šฐ๋ฅผ ์ž๋™์œผ๋กœ ์‹คํ–‰ํ•˜์ง€ ๋งˆ์„ธ์š”. ์‚ฌ์šฉ์ž์˜ ๋‹ค์Œ ์ง€์‹œ๋ฅผ ๊ธฐ๋‹ค๋ฆฌ์„ธ์š”.</critical>
537
+ <action>HALT - Workflow complete. Await user's next instruction.</action>
538
+ </step>
539
+
540
+ </workflow>