siesa-agents 2.1.2 → 2.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/README.md +83 -83
  2. package/bin/install.js +400 -400
  3. package/bin/prepare-publish.js +26 -26
  4. package/bin/restore-folders.js +26 -26
  5. package/bmad-core/agent-teams/team-all.yaml +15 -15
  6. package/bmad-core/agent-teams/team-fullstack.yaml +19 -19
  7. package/bmad-core/agent-teams/team-ide-minimal.yaml +11 -11
  8. package/bmad-core/agent-teams/team-no-ui.yaml +14 -14
  9. package/bmad-core/agents/analyst.md +84 -84
  10. package/bmad-core/agents/architect.md +94 -94
  11. package/bmad-core/agents/backend-agent.md +189 -189
  12. package/bmad-core/agents/bmad-master.md +110 -110
  13. package/bmad-core/agents/bmad-orchestrator.md +147 -147
  14. package/bmad-core/agents/dev.md +81 -81
  15. package/bmad-core/agents/frontend-agent.md +168 -168
  16. package/bmad-core/agents/pm.md +84 -84
  17. package/bmad-core/agents/po.md +79 -79
  18. package/bmad-core/agents/qa.md +91 -91
  19. package/bmad-core/agents/sm.md +65 -65
  20. package/bmad-core/agents/ux-expert.md +69 -69
  21. package/bmad-core/checklists/architect-checklist.md +440 -440
  22. package/bmad-core/checklists/backend-checklist.md +142 -142
  23. package/bmad-core/checklists/change-checklist.md +184 -184
  24. package/bmad-core/checklists/frontend-checklist.md +105 -105
  25. package/bmad-core/checklists/pm-checklist.md +372 -372
  26. package/bmad-core/checklists/po-master-checklist.md +434 -434
  27. package/bmad-core/checklists/story-dod-checklist.md +96 -96
  28. package/bmad-core/checklists/story-draft-checklist.md +155 -155
  29. package/bmad-core/core-config.yaml +22 -22
  30. package/bmad-core/data/backend-standards.md +439 -439
  31. package/bmad-core/data/bmad-kb.md +809 -809
  32. package/bmad-core/data/brainstorming-techniques.md +38 -38
  33. package/bmad-core/data/elicitation-methods.md +156 -156
  34. package/bmad-core/data/frontend-standards.md +323 -323
  35. package/bmad-core/data/technical-preferences.md +5 -5
  36. package/bmad-core/data/test-levels-framework.md +148 -148
  37. package/bmad-core/data/test-priorities-matrix.md +174 -174
  38. package/bmad-core/enhanced-ide-development-workflow.md +248 -248
  39. package/bmad-core/install-manifest.yaml +230 -230
  40. package/bmad-core/tasks/advanced-elicitation.md +119 -119
  41. package/bmad-core/tasks/apply-qa-fixes.md +150 -150
  42. package/bmad-core/tasks/brownfield-create-epic.md +162 -162
  43. package/bmad-core/tasks/brownfield-create-story.md +149 -149
  44. package/bmad-core/tasks/correct-course.md +72 -72
  45. package/bmad-core/tasks/create-brownfield-story.md +314 -314
  46. package/bmad-core/tasks/create-component.md +102 -102
  47. package/bmad-core/tasks/create-deep-research-prompt.md +280 -280
  48. package/bmad-core/tasks/create-doc.md +103 -103
  49. package/bmad-core/tasks/create-entity.md +132 -132
  50. package/bmad-core/tasks/create-feature.md +90 -90
  51. package/bmad-core/tasks/create-next-story.md +114 -114
  52. package/bmad-core/tasks/create-service.md +117 -117
  53. package/bmad-core/tasks/create-use-case.md +140 -140
  54. package/bmad-core/tasks/document-project.md +345 -345
  55. package/bmad-core/tasks/execute-checklist.md +88 -88
  56. package/bmad-core/tasks/facilitate-brainstorming-session.md +138 -138
  57. package/bmad-core/tasks/generate-ai-frontend-prompt.md +53 -53
  58. package/bmad-core/tasks/index-docs.md +175 -175
  59. package/bmad-core/tasks/kb-mode-interaction.md +77 -77
  60. package/bmad-core/tasks/nfr-assess.md +345 -345
  61. package/bmad-core/tasks/qa-gate.md +163 -163
  62. package/bmad-core/tasks/review-story.md +316 -316
  63. package/bmad-core/tasks/risk-profile.md +355 -355
  64. package/bmad-core/tasks/scaffold-backend.md +110 -110
  65. package/bmad-core/tasks/scaffold-frontend.md +78 -78
  66. package/bmad-core/tasks/shard-doc.md +187 -187
  67. package/bmad-core/tasks/test-design.md +176 -176
  68. package/bmad-core/tasks/trace-requirements.md +266 -266
  69. package/bmad-core/tasks/validate-next-story.md +136 -136
  70. package/bmad-core/templates/architecture-tmpl.yaml +662 -662
  71. package/bmad-core/templates/brainstorming-output-tmpl.yaml +156 -156
  72. package/bmad-core/templates/brownfield-architecture-tmpl.yaml +477 -477
  73. package/bmad-core/templates/brownfield-prd-tmpl.yaml +281 -281
  74. package/bmad-core/templates/competitor-analysis-tmpl.yaml +307 -307
  75. package/bmad-core/templates/front-end-architecture-tmpl.yaml +258 -258
  76. package/bmad-core/templates/front-end-spec-tmpl.yaml +350 -350
  77. package/bmad-core/templates/fullstack-architecture-tmpl.yaml +824 -824
  78. package/bmad-core/templates/market-research-tmpl.yaml +253 -253
  79. package/bmad-core/templates/prd-tmpl.yaml +203 -203
  80. package/bmad-core/templates/project-brief-tmpl.yaml +222 -222
  81. package/bmad-core/templates/qa-gate-tmpl.yaml +103 -103
  82. package/bmad-core/templates/story-tmpl.yaml +138 -138
  83. package/bmad-core/user-guide.md +530 -530
  84. package/bmad-core/utils/bmad-doc-template.md +327 -327
  85. package/bmad-core/utils/workflow-management.md +71 -71
  86. package/bmad-core/workflows/brownfield-fullstack.yaml +298 -298
  87. package/bmad-core/workflows/brownfield-service.yaml +188 -188
  88. package/bmad-core/workflows/brownfield-ui.yaml +198 -198
  89. package/bmad-core/workflows/greenfield-fullstack.yaml +241 -241
  90. package/bmad-core/workflows/greenfield-service.yaml +207 -207
  91. package/bmad-core/workflows/greenfield-ui.yaml +236 -236
  92. package/bmad-core/working-in-the-brownfield.md +606 -606
  93. package/claude/commands/BMad/agents/backend.md +187 -187
  94. package/claude/commands/BMad/agents/frontend.md +150 -150
  95. package/github/b-mad-expert.md +742 -742
  96. package/github/chatmodes/analyst.chatmode.md +89 -89
  97. package/github/chatmodes/architect.chatmode.md +97 -97
  98. package/github/chatmodes/backend.chatmode.md +194 -194
  99. package/github/chatmodes/bmad-master.chatmode.md +115 -115
  100. package/github/chatmodes/bmad-orchestrator.chatmode.md +152 -152
  101. package/github/chatmodes/dev.chatmode.md +86 -86
  102. package/github/chatmodes/frontend.chatmode.md +157 -157
  103. package/github/chatmodes/pm.chatmode.md +89 -89
  104. package/github/chatmodes/po.chatmode.md +84 -84
  105. package/github/chatmodes/qa.chatmode.md +96 -96
  106. package/github/chatmodes/sm.chatmode.md +70 -70
  107. package/github/chatmodes/ux-expert.chatmode.md +74 -74
  108. package/index.js +9 -9
  109. package/package.json +37 -37
  110. package/vscode/mcp.json +11 -11
  111. package/vscode/settings.json +12 -12
@@ -1,314 +1,314 @@
1
- <!-- Powered by BMAD™ Core -->
2
-
3
- # Create Brownfield Story Task
4
-
5
- ## Purpose
6
-
7
- Create detailed, implementation-ready stories for brownfield projects where traditional sharded PRD/architecture documents may not exist. This task bridges the gap between various documentation formats (document-project output, brownfield PRDs, epics, or user documentation) and executable stories for the Dev agent.
8
-
9
- ## When to Use This Task
10
-
11
- **Use this task when:**
12
-
13
- - Working on brownfield projects with non-standard documentation
14
- - Stories need to be created from document-project output
15
- - Working from brownfield epics without full PRD/architecture
16
- - Existing project documentation doesn't follow BMad v4+ structure
17
- - Need to gather additional context from user during story creation
18
-
19
- **Use create-next-story when:**
20
-
21
- - Working with properly sharded PRD and v4 architecture documents
22
- - Following standard greenfield or well-documented brownfield workflow
23
- - All technical context is available in structured format
24
-
25
- ## Task Execution Instructions
26
-
27
- ### 0. Documentation Context
28
-
29
- Check for available documentation in this order:
30
-
31
- 1. **Sharded PRD/Architecture** (docs/prd/, docs/architecture/)
32
- - If found, recommend using create-next-story task instead
33
-
34
- 2. **Brownfield Architecture Document** (docs/brownfield-architecture.md or similar)
35
- - Created by document-project task
36
- - Contains actual system state, technical debt, workarounds
37
-
38
- 3. **Brownfield PRD** (docs/prd.md)
39
- - May contain embedded technical details
40
-
41
- 4. **Epic Files** (docs/epics/ or similar)
42
- - Created by brownfield-create-epic task
43
-
44
- 5. **User-Provided Documentation**
45
- - Ask user to specify location and format
46
-
47
- ### 1. Story Identification and Context Gathering
48
-
49
- #### 1.1 Identify Story Source
50
-
51
- Based on available documentation:
52
-
53
- - **From Brownfield PRD**: Extract stories from epic sections
54
- - **From Epic Files**: Read epic definition and story list
55
- - **From User Direction**: Ask user which specific enhancement to implement
56
- - **No Clear Source**: Work with user to define the story scope
57
-
58
- #### 1.2 Gather Essential Context
59
-
60
- CRITICAL: For brownfield stories, you MUST gather enough context for safe implementation. Be prepared to ask the user for missing information.
61
-
62
- **Required Information Checklist:**
63
-
64
- - [ ] What existing functionality might be affected?
65
- - [ ] What are the integration points with current code?
66
- - [ ] What patterns should be followed (with examples)?
67
- - [ ] What technical constraints exist?
68
- - [ ] Are there any "gotchas" or workarounds to know about?
69
-
70
- If any required information is missing, list the missing information and ask the user to provide it.
71
-
72
- ### 2. Extract Technical Context from Available Sources
73
-
74
- #### 2.1 From Document-Project Output
75
-
76
- If using brownfield-architecture.md from document-project:
77
-
78
- - **Technical Debt Section**: Note any workarounds affecting this story
79
- - **Key Files Section**: Identify files that will need modification
80
- - **Integration Points**: Find existing integration patterns
81
- - **Known Issues**: Check if story touches problematic areas
82
- - **Actual Tech Stack**: Verify versions and constraints
83
-
84
- #### 2.2 From Brownfield PRD
85
-
86
- If using brownfield PRD:
87
-
88
- - **Technical Constraints Section**: Extract all relevant constraints
89
- - **Integration Requirements**: Note compatibility requirements
90
- - **Code Organization**: Follow specified patterns
91
- - **Risk Assessment**: Understand potential impacts
92
-
93
- #### 2.3 From User Documentation
94
-
95
- Ask the user to help identify:
96
-
97
- - Relevant technical specifications
98
- - Existing code examples to follow
99
- - Integration requirements
100
- - Testing approaches used in the project
101
-
102
- ### 3. Story Creation with Progressive Detail Gathering
103
-
104
- #### 3.1 Create Initial Story Structure
105
-
106
- Start with the story template, filling in what's known:
107
-
108
- ```markdown
109
- # Story {{Enhancement Title}}
110
-
111
- ## Status: Draft
112
-
113
- ## Story
114
-
115
- As a {{user_type}},
116
- I want {{enhancement_capability}},
117
- so that {{value_delivered}}.
118
-
119
- ## Context Source
120
-
121
- - Source Document: {{document name/type}}
122
- - Enhancement Type: {{single feature/bug fix/integration/etc}}
123
- - Existing System Impact: {{brief assessment}}
124
- ```
125
-
126
- #### 3.2 Develop Acceptance Criteria
127
-
128
- Critical: For brownfield, ALWAYS include criteria about maintaining existing functionality
129
-
130
- Standard structure:
131
-
132
- 1. New functionality works as specified
133
- 2. Existing {{affected feature}} continues to work unchanged
134
- 3. Integration with {{existing system}} maintains current behavior
135
- 4. No regression in {{related area}}
136
- 5. Performance remains within acceptable bounds
137
-
138
- #### 3.3 Gather Technical Guidance
139
-
140
- Critical: This is where you'll need to be interactive with the user if information is missing
141
-
142
- Create Dev Technical Guidance section with available information:
143
-
144
- ````markdown
145
- ## Dev Technical Guidance
146
-
147
- ### Existing System Context
148
-
149
- [Extract from available documentation]
150
-
151
- ### Integration Approach
152
-
153
- [Based on patterns found or ask user]
154
-
155
- ### Technical Constraints
156
-
157
- [From documentation or user input]
158
-
159
- ### Missing Information
160
-
161
- Critical: List anything you couldn't find that dev will need and ask for the missing information
162
-
163
- ### 4. Task Generation with Safety Checks
164
-
165
- #### 4.1 Generate Implementation Tasks
166
-
167
- Based on gathered context, create tasks that:
168
-
169
- - Include exploration tasks if system understanding is incomplete
170
- - Add verification tasks for existing functionality
171
- - Include rollback considerations
172
- - Reference specific files/patterns when known
173
-
174
- Example task structure for brownfield:
175
-
176
- ```markdown
177
- ## Tasks / Subtasks
178
-
179
- - [ ] Task 1: Analyze existing {{component/feature}} implementation
180
- - [ ] Review {{specific files}} for current patterns
181
- - [ ] Document integration points
182
- - [ ] Identify potential impacts
183
-
184
- - [ ] Task 2: Implement {{new functionality}}
185
- - [ ] Follow pattern from {{example file}}
186
- - [ ] Integrate with {{existing component}}
187
- - [ ] Maintain compatibility with {{constraint}}
188
-
189
- - [ ] Task 3: Verify existing functionality
190
- - [ ] Test {{existing feature 1}} still works
191
- - [ ] Verify {{integration point}} behavior unchanged
192
- - [ ] Check performance impact
193
-
194
- - [ ] Task 4: Add tests
195
- - [ ] Unit tests following {{project test pattern}}
196
- - [ ] Integration test for {{integration point}}
197
- - [ ] Update existing tests if needed
198
- ```
199
- ````
200
-
201
- ### 5. Risk Assessment and Mitigation
202
-
203
- CRITICAL: for brownfield - always include risk assessment
204
-
205
- Add section for brownfield-specific risks:
206
-
207
- ```markdown
208
- ## Risk Assessment
209
-
210
- ### Implementation Risks
211
-
212
- - **Primary Risk**: {{main risk to existing system}}
213
- - **Mitigation**: {{how to address}}
214
- - **Verification**: {{how to confirm safety}}
215
-
216
- ### Rollback Plan
217
-
218
- - {{Simple steps to undo changes if needed}}
219
-
220
- ### Safety Checks
221
-
222
- - [ ] Existing {{feature}} tested before changes
223
- - [ ] Changes can be feature-flagged or isolated
224
- - [ ] Rollback procedure documented
225
- ```
226
-
227
- ### 6. Final Story Validation
228
-
229
- Before finalizing:
230
-
231
- 1. **Completeness Check**:
232
- - [ ] Story has clear scope and acceptance criteria
233
- - [ ] Technical context is sufficient for implementation
234
- - [ ] Integration approach is defined
235
- - [ ] Risks are identified with mitigation
236
-
237
- 2. **Safety Check**:
238
- - [ ] Existing functionality protection included
239
- - [ ] Rollback plan is feasible
240
- - [ ] Testing covers both new and existing features
241
-
242
- 3. **Information Gaps**:
243
- - [ ] All critical missing information gathered from user
244
- - [ ] Remaining unknowns documented for dev agent
245
- - [ ] Exploration tasks added where needed
246
-
247
- ### 7. Story Output Format
248
-
249
- Save the story with appropriate naming:
250
-
251
- - If from epic: `docs/stories/epic-{n}-story-{m}.md`
252
- - If standalone: `docs/stories/brownfield-{feature-name}.md`
253
- - If sequential: Follow existing story numbering
254
-
255
- Include header noting documentation context:
256
-
257
- ```markdown
258
- # Story: {{Title}}
259
-
260
- <!-- Source: {{documentation type used}} -->
261
- <!-- Context: Brownfield enhancement to {{existing system}} -->
262
-
263
- ## Status: Draft
264
-
265
- [Rest of story content...]
266
- ```
267
-
268
- ### 8. Handoff Communication
269
-
270
- Provide clear handoff to the user:
271
-
272
- ```text
273
- Brownfield story created: {{story title}}
274
-
275
- Source Documentation: {{what was used}}
276
- Story Location: {{file path}}
277
-
278
- Key Integration Points Identified:
279
- - {{integration point 1}}
280
- - {{integration point 2}}
281
-
282
- Risks Noted:
283
- - {{primary risk}}
284
-
285
- {{If missing info}}:
286
- Note: Some technical details were unclear. The story includes exploration tasks to gather needed information during implementation.
287
-
288
- Next Steps:
289
- 1. Review story for accuracy
290
- 2. Verify integration approach aligns with your system
291
- 3. Approve story or request adjustments
292
- 4. Dev agent can then implement with safety checks
293
- ```
294
-
295
- ## Success Criteria
296
-
297
- The brownfield story creation is successful when:
298
-
299
- 1. Story can be implemented without requiring dev to search multiple documents
300
- 2. Integration approach is clear and safe for existing system
301
- 3. All available technical context has been extracted and organized
302
- 4. Missing information has been identified and addressed
303
- 5. Risks are documented with mitigation strategies
304
- 6. Story includes verification of existing functionality
305
- 7. Rollback approach is defined
306
-
307
- ## Important Notes
308
-
309
- - This task is specifically for brownfield projects with non-standard documentation
310
- - Always prioritize existing system stability over new features
311
- - When in doubt, add exploration and verification tasks
312
- - It's better to ask the user for clarification than make assumptions
313
- - Each story should be self-contained for the dev agent
314
- - Include references to existing code patterns when available
1
+ <!-- Powered by BMAD™ Core -->
2
+
3
+ # Create Brownfield Story Task
4
+
5
+ ## Purpose
6
+
7
+ Create detailed, implementation-ready stories for brownfield projects where traditional sharded PRD/architecture documents may not exist. This task bridges the gap between various documentation formats (document-project output, brownfield PRDs, epics, or user documentation) and executable stories for the Dev agent.
8
+
9
+ ## When to Use This Task
10
+
11
+ **Use this task when:**
12
+
13
+ - Working on brownfield projects with non-standard documentation
14
+ - Stories need to be created from document-project output
15
+ - Working from brownfield epics without full PRD/architecture
16
+ - Existing project documentation doesn't follow BMad v4+ structure
17
+ - Need to gather additional context from user during story creation
18
+
19
+ **Use create-next-story when:**
20
+
21
+ - Working with properly sharded PRD and v4 architecture documents
22
+ - Following standard greenfield or well-documented brownfield workflow
23
+ - All technical context is available in structured format
24
+
25
+ ## Task Execution Instructions
26
+
27
+ ### 0. Documentation Context
28
+
29
+ Check for available documentation in this order:
30
+
31
+ 1. **Sharded PRD/Architecture** (docs/prd/, docs/architecture/)
32
+ - If found, recommend using create-next-story task instead
33
+
34
+ 2. **Brownfield Architecture Document** (docs/brownfield-architecture.md or similar)
35
+ - Created by document-project task
36
+ - Contains actual system state, technical debt, workarounds
37
+
38
+ 3. **Brownfield PRD** (docs/prd.md)
39
+ - May contain embedded technical details
40
+
41
+ 4. **Epic Files** (docs/epics/ or similar)
42
+ - Created by brownfield-create-epic task
43
+
44
+ 5. **User-Provided Documentation**
45
+ - Ask user to specify location and format
46
+
47
+ ### 1. Story Identification and Context Gathering
48
+
49
+ #### 1.1 Identify Story Source
50
+
51
+ Based on available documentation:
52
+
53
+ - **From Brownfield PRD**: Extract stories from epic sections
54
+ - **From Epic Files**: Read epic definition and story list
55
+ - **From User Direction**: Ask user which specific enhancement to implement
56
+ - **No Clear Source**: Work with user to define the story scope
57
+
58
+ #### 1.2 Gather Essential Context
59
+
60
+ CRITICAL: For brownfield stories, you MUST gather enough context for safe implementation. Be prepared to ask the user for missing information.
61
+
62
+ **Required Information Checklist:**
63
+
64
+ - [ ] What existing functionality might be affected?
65
+ - [ ] What are the integration points with current code?
66
+ - [ ] What patterns should be followed (with examples)?
67
+ - [ ] What technical constraints exist?
68
+ - [ ] Are there any "gotchas" or workarounds to know about?
69
+
70
+ If any required information is missing, list the missing information and ask the user to provide it.
71
+
72
+ ### 2. Extract Technical Context from Available Sources
73
+
74
+ #### 2.1 From Document-Project Output
75
+
76
+ If using brownfield-architecture.md from document-project:
77
+
78
+ - **Technical Debt Section**: Note any workarounds affecting this story
79
+ - **Key Files Section**: Identify files that will need modification
80
+ - **Integration Points**: Find existing integration patterns
81
+ - **Known Issues**: Check if story touches problematic areas
82
+ - **Actual Tech Stack**: Verify versions and constraints
83
+
84
+ #### 2.2 From Brownfield PRD
85
+
86
+ If using brownfield PRD:
87
+
88
+ - **Technical Constraints Section**: Extract all relevant constraints
89
+ - **Integration Requirements**: Note compatibility requirements
90
+ - **Code Organization**: Follow specified patterns
91
+ - **Risk Assessment**: Understand potential impacts
92
+
93
+ #### 2.3 From User Documentation
94
+
95
+ Ask the user to help identify:
96
+
97
+ - Relevant technical specifications
98
+ - Existing code examples to follow
99
+ - Integration requirements
100
+ - Testing approaches used in the project
101
+
102
+ ### 3. Story Creation with Progressive Detail Gathering
103
+
104
+ #### 3.1 Create Initial Story Structure
105
+
106
+ Start with the story template, filling in what's known:
107
+
108
+ ```markdown
109
+ # Story {{Enhancement Title}}
110
+
111
+ ## Status: Draft
112
+
113
+ ## Story
114
+
115
+ As a {{user_type}},
116
+ I want {{enhancement_capability}},
117
+ so that {{value_delivered}}.
118
+
119
+ ## Context Source
120
+
121
+ - Source Document: {{document name/type}}
122
+ - Enhancement Type: {{single feature/bug fix/integration/etc}}
123
+ - Existing System Impact: {{brief assessment}}
124
+ ```
125
+
126
+ #### 3.2 Develop Acceptance Criteria
127
+
128
+ Critical: For brownfield, ALWAYS include criteria about maintaining existing functionality
129
+
130
+ Standard structure:
131
+
132
+ 1. New functionality works as specified
133
+ 2. Existing {{affected feature}} continues to work unchanged
134
+ 3. Integration with {{existing system}} maintains current behavior
135
+ 4. No regression in {{related area}}
136
+ 5. Performance remains within acceptable bounds
137
+
138
+ #### 3.3 Gather Technical Guidance
139
+
140
+ Critical: This is where you'll need to be interactive with the user if information is missing
141
+
142
+ Create Dev Technical Guidance section with available information:
143
+
144
+ ````markdown
145
+ ## Dev Technical Guidance
146
+
147
+ ### Existing System Context
148
+
149
+ [Extract from available documentation]
150
+
151
+ ### Integration Approach
152
+
153
+ [Based on patterns found or ask user]
154
+
155
+ ### Technical Constraints
156
+
157
+ [From documentation or user input]
158
+
159
+ ### Missing Information
160
+
161
+ Critical: List anything you couldn't find that dev will need and ask for the missing information
162
+
163
+ ### 4. Task Generation with Safety Checks
164
+
165
+ #### 4.1 Generate Implementation Tasks
166
+
167
+ Based on gathered context, create tasks that:
168
+
169
+ - Include exploration tasks if system understanding is incomplete
170
+ - Add verification tasks for existing functionality
171
+ - Include rollback considerations
172
+ - Reference specific files/patterns when known
173
+
174
+ Example task structure for brownfield:
175
+
176
+ ```markdown
177
+ ## Tasks / Subtasks
178
+
179
+ - [ ] Task 1: Analyze existing {{component/feature}} implementation
180
+ - [ ] Review {{specific files}} for current patterns
181
+ - [ ] Document integration points
182
+ - [ ] Identify potential impacts
183
+
184
+ - [ ] Task 2: Implement {{new functionality}}
185
+ - [ ] Follow pattern from {{example file}}
186
+ - [ ] Integrate with {{existing component}}
187
+ - [ ] Maintain compatibility with {{constraint}}
188
+
189
+ - [ ] Task 3: Verify existing functionality
190
+ - [ ] Test {{existing feature 1}} still works
191
+ - [ ] Verify {{integration point}} behavior unchanged
192
+ - [ ] Check performance impact
193
+
194
+ - [ ] Task 4: Add tests
195
+ - [ ] Unit tests following {{project test pattern}}
196
+ - [ ] Integration test for {{integration point}}
197
+ - [ ] Update existing tests if needed
198
+ ```
199
+ ````
200
+
201
+ ### 5. Risk Assessment and Mitigation
202
+
203
+ CRITICAL: for brownfield - always include risk assessment
204
+
205
+ Add section for brownfield-specific risks:
206
+
207
+ ```markdown
208
+ ## Risk Assessment
209
+
210
+ ### Implementation Risks
211
+
212
+ - **Primary Risk**: {{main risk to existing system}}
213
+ - **Mitigation**: {{how to address}}
214
+ - **Verification**: {{how to confirm safety}}
215
+
216
+ ### Rollback Plan
217
+
218
+ - {{Simple steps to undo changes if needed}}
219
+
220
+ ### Safety Checks
221
+
222
+ - [ ] Existing {{feature}} tested before changes
223
+ - [ ] Changes can be feature-flagged or isolated
224
+ - [ ] Rollback procedure documented
225
+ ```
226
+
227
+ ### 6. Final Story Validation
228
+
229
+ Before finalizing:
230
+
231
+ 1. **Completeness Check**:
232
+ - [ ] Story has clear scope and acceptance criteria
233
+ - [ ] Technical context is sufficient for implementation
234
+ - [ ] Integration approach is defined
235
+ - [ ] Risks are identified with mitigation
236
+
237
+ 2. **Safety Check**:
238
+ - [ ] Existing functionality protection included
239
+ - [ ] Rollback plan is feasible
240
+ - [ ] Testing covers both new and existing features
241
+
242
+ 3. **Information Gaps**:
243
+ - [ ] All critical missing information gathered from user
244
+ - [ ] Remaining unknowns documented for dev agent
245
+ - [ ] Exploration tasks added where needed
246
+
247
+ ### 7. Story Output Format
248
+
249
+ Save the story with appropriate naming:
250
+
251
+ - If from epic: `docs/stories/epic-{n}-story-{m}.md`
252
+ - If standalone: `docs/stories/brownfield-{feature-name}.md`
253
+ - If sequential: Follow existing story numbering
254
+
255
+ Include header noting documentation context:
256
+
257
+ ```markdown
258
+ # Story: {{Title}}
259
+
260
+ <!-- Source: {{documentation type used}} -->
261
+ <!-- Context: Brownfield enhancement to {{existing system}} -->
262
+
263
+ ## Status: Draft
264
+
265
+ [Rest of story content...]
266
+ ```
267
+
268
+ ### 8. Handoff Communication
269
+
270
+ Provide clear handoff to the user:
271
+
272
+ ```text
273
+ Brownfield story created: {{story title}}
274
+
275
+ Source Documentation: {{what was used}}
276
+ Story Location: {{file path}}
277
+
278
+ Key Integration Points Identified:
279
+ - {{integration point 1}}
280
+ - {{integration point 2}}
281
+
282
+ Risks Noted:
283
+ - {{primary risk}}
284
+
285
+ {{If missing info}}:
286
+ Note: Some technical details were unclear. The story includes exploration tasks to gather needed information during implementation.
287
+
288
+ Next Steps:
289
+ 1. Review story for accuracy
290
+ 2. Verify integration approach aligns with your system
291
+ 3. Approve story or request adjustments
292
+ 4. Dev agent can then implement with safety checks
293
+ ```
294
+
295
+ ## Success Criteria
296
+
297
+ The brownfield story creation is successful when:
298
+
299
+ 1. Story can be implemented without requiring dev to search multiple documents
300
+ 2. Integration approach is clear and safe for existing system
301
+ 3. All available technical context has been extracted and organized
302
+ 4. Missing information has been identified and addressed
303
+ 5. Risks are documented with mitigation strategies
304
+ 6. Story includes verification of existing functionality
305
+ 7. Rollback approach is defined
306
+
307
+ ## Important Notes
308
+
309
+ - This task is specifically for brownfield projects with non-standard documentation
310
+ - Always prioritize existing system stability over new features
311
+ - When in doubt, add exploration and verification tasks
312
+ - It's better to ask the user for clarification than make assumptions
313
+ - Each story should be self-contained for the dev agent
314
+ - Include references to existing code patterns when available