bmad-method 4.28.0 → 4.29.0

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 (41) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/bmad-core/agents/bmad-master.md +0 -2
  3. package/bmad-core/agents/bmad-orchestrator.md +0 -3
  4. package/bmad-core/core-config.yaml +1 -5
  5. package/bmad-core/data/bmad-kb.md +2 -2
  6. package/bmad-core/tasks/correct-course.md +9 -12
  7. package/bmad-core/tasks/create-brownfield-story.md +10 -61
  8. package/bmad-core/tasks/create-deep-research-prompt.md +5 -17
  9. package/bmad-core/tasks/create-next-story.md +3 -4
  10. package/bmad-core/tasks/document-project.md +37 -13
  11. package/bmad-core/tasks/facilitate-brainstorming-session.md +1 -1
  12. package/bmad-core/tasks/generate-ai-frontend-prompt.md +1 -1
  13. package/bmad-core/tasks/kb-mode-interaction.md +8 -3
  14. package/bmad-core/tasks/review-story.md +3 -3
  15. package/bmad-core/tasks/shard-doc.md +5 -9
  16. package/common/tasks/create-doc.md +4 -0
  17. package/dist/agents/analyst.txt +43 -31
  18. package/dist/agents/architect.txt +42 -30
  19. package/dist/agents/bmad-master.txt +61 -602
  20. package/dist/agents/bmad-orchestrator.txt +7 -548
  21. package/dist/agents/pm.txt +19 -38
  22. package/dist/agents/po.txt +14 -21
  23. package/dist/agents/qa.txt +3 -3
  24. package/dist/agents/sm.txt +11 -15
  25. package/dist/agents/ux-expert.txt +6 -18
  26. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-designer.txt +5 -17
  27. package/dist/expansion-packs/bmad-2d-phaser-game-dev/teams/phaser-2d-nodejs-game-team.txt +50 -579
  28. package/dist/expansion-packs/bmad-creator-tools/agents/bmad-the-creator.txt +5 -17
  29. package/dist/teams/team-all.txt +70 -607
  30. package/dist/teams/team-fullstack.txt +65 -601
  31. package/dist/teams/team-ide-minimal.txt +26 -575
  32. package/dist/teams/team-no-ui.txt +64 -600
  33. package/expansion-packs/bmad-2d-phaser-game-dev/config.yaml +1 -0
  34. package/expansion-packs/bmad-creator-tools/config.yaml +1 -0
  35. package/expansion-packs/bmad-infrastructure-devops/config.yaml +1 -0
  36. package/package.json +1 -1
  37. package/tools/installer/lib/ide-setup.js +325 -12
  38. package/tools/installer/package.json +1 -1
  39. package/bmad-core/tasks/create-workflow-plan.md +0 -289
  40. package/bmad-core/tasks/doc-migration-task.md +0 -143
  41. package/bmad-core/tasks/update-workflow-plan.md +0 -248
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [4.29.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.28.0...v4.29.0) (2025-07-13)
2
+
3
+
4
+ ### Features
5
+
6
+ * Claude Code slash commands for Tasks and Agents! ([e9e541a](https://github.com/bmadcode/BMAD-METHOD/commit/e9e541a52e45f6632b2f8c91d10e39c077c1ecc9))
7
+
1
8
  # [4.28.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.27.6...v4.28.0) (2025-07-12)
2
9
 
3
10
 
@@ -46,14 +46,12 @@ dependencies:
46
46
  - correct-course.md
47
47
  - create-deep-research-prompt.md
48
48
  - create-doc.md
49
- - create-workflow-plan.md
50
49
  - document-project.md
51
50
  - create-next-story.md
52
51
  - execute-checklist.md
53
52
  - generate-ai-frontend-prompt.md
54
53
  - index-docs.md
55
54
  - shard-doc.md
56
- - update-workflow-plan.md
57
55
  templates:
58
56
  - architecture-tmpl.yaml
59
57
  - brownfield-architecture-tmpl.yaml
@@ -114,7 +114,6 @@ workflow-guidance:
114
114
  - Understand each workflow's purpose, options, and decision points
115
115
  - Ask clarifying questions based on the workflow's structure
116
116
  - Guide users through workflow selection when multiple options exist
117
- - For complex projects, offer to create a workflow plan using create-workflow-plan task
118
117
  - When appropriate, suggest: "Would you like me to create a detailed workflow plan before starting?"
119
118
  - For workflows with divergent paths, help users choose the right path
120
119
  - Adapt questions to the specific domain (e.g., game dev vs infrastructure vs web dev)
@@ -124,9 +123,7 @@ dependencies:
124
123
  tasks:
125
124
  - advanced-elicitation.md
126
125
  - create-doc.md
127
- - create-workflow-plan.md
128
126
  - kb-mode-interaction.md
129
- - update-workflow-plan.md
130
127
  data:
131
128
  - bmad-kb.md
132
129
  - elicitation-methods.md
@@ -18,8 +18,4 @@ devLoadAlwaysFiles:
18
18
  - docs/architecture/source-tree.md
19
19
  devDebugLog: .ai/debug-log.md
20
20
  devStoryLocation: docs/stories
21
- workflow:
22
- planFile: docs/workflow-plan.md
23
- trackProgress: true
24
- enforceSequence: false
25
- updateOnCompletion: true
21
+ slashPrefix: BMad
@@ -162,8 +162,8 @@ npx bmad-method install
162
162
 
163
163
  **CRITICAL RULE for Development**:
164
164
 
165
- - **ALWAYS use SM agent for story creation** - Never use bmad-master/orchestrator
166
- - **ALWAYS use Dev agent for implementation** - Never use bmad-master/orchestrator
165
+ - **ALWAYS use SM agent for story creation** - Never use bmad-master or bmad-orchestrator
166
+ - **ALWAYS use Dev agent for implementation** - Never use bmad-master or bmad-orchestrator
167
167
  - **Why this matters**: SM and Dev agents are specifically optimized for the development workflow
168
168
  - **No exceptions**: Even if using bmad-master for everything else, switch to SM → Dev for implementation
169
169
 
@@ -2,9 +2,9 @@
2
2
 
3
3
  ## Purpose
4
4
 
5
- - Guide a structured response to a change trigger using the `change-checklist`.
5
+ - Guide a structured response to a change trigger using the `{root}/checklists/change-checklist`.
6
6
  - Analyze the impacts of the change on epics, project artifacts, and the MVP, guided by the checklist's structure.
7
- - Explore potential solutions (e.g., adjust scope, rollback elements, rescope features) as prompted by the checklist.
7
+ - Explore potential solutions (e.g., adjust scope, rollback elements, re-scope features) as prompted by the checklist.
8
8
  - Draft specific, actionable proposed updates to any affected project artifacts (e.g., epics, user stories, PRD sections, architecture document sections) based on the analysis.
9
9
  - Produce a consolidated "Sprint Change Proposal" document that contains the impact analysis and the clearly drafted proposed edits for user review and approval.
10
10
  - Ensure a clear handoff path if the nature of the changes necessitates fundamental replanning by other core agents (like PM or Architect).
@@ -16,19 +16,16 @@
16
16
  - **Acknowledge Task & Inputs:**
17
17
  - Confirm with the user that the "Correct Course Task" (Change Navigation & Integration) is being initiated.
18
18
  - Verify the change trigger and ensure you have the user's initial explanation of the issue and its perceived impact.
19
- - Confirm access to all relevant project artifacts (e.g., PRD, Epics/Stories, Architecture Documents, UI/UX Specifications) and, critically, the `change-checklist` (e.g., `change-checklist`).
19
+ - Confirm access to all relevant project artifacts (e.g., PRD, Epics/Stories, Architecture Documents, UI/UX Specifications) and, critically, the `{root}/checklists/change-checklist`.
20
20
  - **Establish Interaction Mode:**
21
21
  - Ask the user their preferred interaction mode for this task:
22
- - **"Incrementally (Default & Recommended):** Shall we work through the `change-checklist` section by section, discussing findings and collaboratively drafting proposed changes for each relevant part before moving to the next? This allows for detailed, step-by-step refinement."
22
+ - **"Incrementally (Default & Recommended):** Shall we work through the change-checklist section by section, discussing findings and collaboratively drafting proposed changes for each relevant part before moving to the next? This allows for detailed, step-by-step refinement."
23
23
  - **"YOLO Mode (Batch Processing):** Or, would you prefer I conduct a more batched analysis based on the checklist and then present a consolidated set of findings and proposed changes for a broader review? This can be quicker for initial assessment but might require more extensive review of the combined proposals."
24
- - Request the user to select their preferred mode.
25
- - Once the user chooses, confirm the selected mode (e.g., "Okay, we will proceed in Incremental mode."). This chosen mode will govern how subsequent steps in this task are executed.
26
- - **Explain Process:** Briefly inform the user: "We will now use the `change-checklist` to analyze the change and draft proposed updates. I will guide you through the checklist items based on our chosen interaction mode."
27
- <rule>When asking multiple questions or presenting multiple points for user input at once, number them clearly (e.g., 1., 2a., 2b.) to make it easier for the user to provide specific responses.</rule>
24
+ - Once the user chooses, confirm the selected mode and then inform the user: "We will now use the change-checklist to analyze the change and draft proposed updates. I will guide you through the checklist items based on our chosen interaction mode."
28
25
 
29
26
  ### 2. Execute Checklist Analysis (Iteratively or Batched, per Interaction Mode)
30
27
 
31
- - Systematically work through Sections 1-4 of the `change-checklist` (typically covering Change Context, Epic/Story Impact Analysis, Artifact Conflict Resolution, and Path Evaluation/Recommendation).
28
+ - Systematically work through Sections 1-4 of the change-checklist (typically covering Change Context, Epic/Story Impact Analysis, Artifact Conflict Resolution, and Path Evaluation/Recommendation).
32
29
  - For each checklist item or logical group of items (depending on interaction mode):
33
30
  - Present the relevant prompt(s) or considerations from the checklist to the user.
34
31
  - Request necessary information and actively analyze the relevant project artifacts (PRD, epics, architecture documents, story history, etc.) to assess the impact.
@@ -51,7 +48,7 @@
51
48
 
52
49
  ### 4. Generate "Sprint Change Proposal" with Edits
53
50
 
54
- - Synthesize the complete `change-checklist` analysis (covering findings from Sections 1-4) and all the agreed-upon proposed edits (from Instruction 3) into a single document titled "Sprint Change Proposal." This proposal should align with the structure suggested by Section 5 of the `change-checklist` (Proposal Components).
51
+ - Synthesize the complete change-checklist analysis (covering findings from Sections 1-4) and all the agreed-upon proposed edits (from Instruction 3) into a single document titled "Sprint Change Proposal." This proposal should align with the structure suggested by Section 5 of the change-checklist.
55
52
  - The proposal must clearly present:
56
53
  - **Analysis Summary:** A concise overview of the original issue, its analyzed impact (on epics, artifacts, MVP scope), and the rationale for the chosen path forward.
57
54
  - **Specific Proposed Edits:** For each affected artifact, clearly show or describe the exact changes (e.g., "Change Story X.Y from: [old text] To: [new text]", "Add new Acceptance Criterion to Story A.B: [new AC]", "Update Section 3.2 of Architecture Document as follows: [new/modified text or diagram description]").
@@ -68,6 +65,6 @@
68
65
  ## Output Deliverables
69
66
 
70
67
  - **Primary:** A "Sprint Change Proposal" document (in markdown format). This document will contain:
71
- - A summary of the `change-checklist` analysis (issue, impact, rationale for the chosen path).
68
+ - A summary of the change-checklist analysis (issue, impact, rationale for the chosen path).
72
69
  - Specific, clearly drafted proposed edits for all affected project artifacts.
73
- - **Implicit:** An annotated `change-checklist` (or the record of its completion) reflecting the discussions, findings, and decisions made during the process.
70
+ - **Implicit:** An annotated change-checklist (or the record of its completion) reflecting the discussions, findings, and decisions made during the process.
@@ -22,20 +22,7 @@ Create detailed, implementation-ready stories for brownfield projects where trad
22
22
 
23
23
  ## Task Execution Instructions
24
24
 
25
- ### 0. Check Workflow Plan and Documentation Context
26
-
27
- [[LLM: Check for workflow plan first, then available documentation]]
28
-
29
- #### 0.1 Check Workflow Plan
30
-
31
- - Load core-config.yaml and check if `workflow.trackProgress: true`
32
- - If yes, check for active plan at `workflow.planFile`
33
- - If plan exists:
34
- - Verify story creation aligns with current plan step
35
- - If out of sequence, warn user (enforce based on config)
36
- - Note which step this story creation corresponds to
37
-
38
- #### 0.2 Determine Documentation Context
25
+ ### 0. Documentation Context
39
26
 
40
27
  Check for available documentation in this order:
41
28
 
@@ -68,7 +55,7 @@ Based on available documentation:
68
55
 
69
56
  #### 1.2 Gather Essential Context
70
57
 
71
- [[LLM: For brownfield stories, you MUST gather enough context for safe implementation. Be prepared to ask the user for missing information.]]
58
+ CRITICAL: For brownfield stories, you MUST gather enough context for safe implementation. Be prepared to ask the user for missing information.
72
59
 
73
60
  **Required Information Checklist:**
74
61
 
@@ -78,21 +65,7 @@ Based on available documentation:
78
65
  - [ ] What technical constraints exist?
79
66
  - [ ] Are there any "gotchas" or workarounds to know about?
80
67
 
81
- If any required information is missing, ask the user:
82
-
83
- ```
84
- I need additional context for this brownfield story:
85
-
86
- Missing Information:
87
- - [List specific missing items]
88
-
89
- Please provide:
90
- 1. [Specific question about integration]
91
- 2. [Specific question about patterns]
92
- 3. [Specific question about constraints]
93
-
94
- Or point me to documentation that contains this information.
95
- ```
68
+ If any required information is missing, list the missing information and ask the user to provide it.
96
69
 
97
70
  ### 2. Extract Technical Context from Available Sources
98
71
 
@@ -117,8 +90,6 @@ If using brownfield PRD:
117
90
 
118
91
  #### 2.3 From User Documentation
119
92
 
120
- [[LLM: When working with non-BMad documentation, actively extract and organize the information into categories the Dev agent will need]]
121
-
122
93
  Ask the user to help identify:
123
94
 
124
95
  - Relevant technical specifications
@@ -138,12 +109,13 @@ Start with the story template, filling in what's known:
138
109
  ## Status: Draft
139
110
 
140
111
  ## Story
112
+
141
113
  As a {{user_type}},
142
114
  I want {{enhancement_capability}},
143
115
  so that {{value_delivered}}.
144
116
 
145
117
  ## Context Source
146
- [[LLM: Document where story requirements came from]]
118
+
147
119
  - Source Document: {{document name/type}}
148
120
  - Enhancement Type: {{single feature/bug fix/integration/etc}}
149
121
  - Existing System Impact: {{brief assessment}}
@@ -151,7 +123,7 @@ so that {{value_delivered}}.
151
123
 
152
124
  #### 3.2 Develop Acceptance Criteria
153
125
 
154
- [[LLM: For brownfield, ALWAYS include criteria about maintaining existing functionality]]
126
+ Critical: For brownfield, ALWAYS include criteria about maintaining existing functionality
155
127
 
156
128
  Standard structure:
157
129
 
@@ -163,7 +135,7 @@ Standard structure:
163
135
 
164
136
  #### 3.3 Gather Technical Guidance
165
137
 
166
- [[LLM: This is where you'll need to be interactive with the user if information is missing]]
138
+ Critical: This is where you'll need to be interactive with the user if information is missing
167
139
 
168
140
  Create Dev Technical Guidance section with available information:
169
141
 
@@ -180,22 +152,8 @@ Create Dev Technical Guidance section with available information:
180
152
  [From documentation or user input]
181
153
 
182
154
  ### Missing Information
183
- [[LLM: List anything you couldn't find that dev will need]]
184
- - [ ] {{missing item 1}}
185
- - [ ] {{missing item 2}}
186
- ```
187
-
188
- If critical information is missing, pause and ask:
189
-
190
- ```
191
- To complete the technical guidance for this story, I need:
192
155
 
193
- 1. **{{Missing Category}}**:
194
- - Specifically: {{what you need to know}}
195
- - Why needed: {{how it impacts implementation}}
196
-
197
- Can you provide this information or point me to relevant code/docs?
198
- ```
156
+ Critical: List anything you couldn't find that dev will need and ask for the missing information
199
157
 
200
158
  ### 4. Task Generation with Safety Checks
201
159
 
@@ -236,7 +194,7 @@ Example task structure for brownfield:
236
194
 
237
195
  ### 5. Risk Assessment and Mitigation
238
196
 
239
- [[LLM: CRITICAL for brownfield - always include risk assessment]]
197
+ CRITICAL: for brownfield - always include risk assessment
240
198
 
241
199
  Add section for brownfield-specific risks:
242
200
 
@@ -324,15 +282,6 @@ Next Steps:
324
282
  4. Dev agent can then implement with safety checks
325
283
  ```
326
284
 
327
- ### 9. Update Workflow Plan (if applicable)
328
-
329
- [[LLM: After successful story creation]]
330
-
331
- - If workflow plan tracking is enabled and story was created successfully:
332
- - Call update-workflow-plan task to mark step complete
333
- - Parameters: task: create-brownfield-story, step_id: {from plan check}, status: complete
334
- - If plan shows next recommended step, include it in handoff message
335
-
336
285
  ## Success Criteria
337
286
 
338
287
  The brownfield story creation is successful when:
@@ -348,7 +297,7 @@ The brownfield story creation is successful when:
348
297
  ## Important Notes
349
298
 
350
299
  - This task is specifically for brownfield projects with non-standard documentation
351
- - Always prioritize existing system safety over new features
300
+ - Always prioritize existing system stability over new features
352
301
  - When in doubt, add exploration and verification tasks
353
302
  - It's better to ask the user for clarification than make assumptions
354
303
  - Each story should be self-contained for the dev agent
@@ -14,7 +14,7 @@ Generate well-structured research prompts that:
14
14
 
15
15
  ## Research Type Selection
16
16
 
17
- [[LLM: First, help the user select the most appropriate research focus based on their needs and any input documents they've provided.]]
17
+ CRITICAL: First, help the user select the most appropriate research focus based on their needs and any input documents they've provided.
18
18
 
19
19
  ### 1. Research Focus Options
20
20
 
@@ -77,15 +77,13 @@ Present these numbered options to the user:
77
77
  - Consider regulatory and legal implications
78
78
 
79
79
  9. **Custom Research Focus**
80
- [[LLM: Allow user to define their own specific research focus.]]
80
+
81
81
  - User-defined research objectives
82
82
  - Specialized domain investigation
83
83
  - Cross-functional research needs
84
84
 
85
85
  ### 2. Input Processing
86
86
 
87
- [[LLM: Based on the selected research type and any provided inputs (project brief, brainstorming results, etc.), extract relevant context and constraints.]]
88
-
89
87
  **If Project Brief provided:**
90
88
 
91
89
  - Extract key product concepts and goals
@@ -118,11 +116,11 @@ Present these numbered options to the user:
118
116
 
119
117
  ### 3. Research Prompt Structure
120
118
 
121
- [[LLM: Based on the selected research type and context, collaboratively develop a comprehensive research prompt with these components.]]
119
+ CRITICAL: collaboratively develop a comprehensive research prompt with these components.
122
120
 
123
121
  #### A. Research Objectives
124
122
 
125
- [[LLM: Work with the user to articulate clear, specific objectives for the research.]]
123
+ CRITICAL: collaborate with the user to articulate clear, specific objectives for the research.
126
124
 
127
125
  - Primary research goal and purpose
128
126
  - Key decisions the research will inform
@@ -131,7 +129,7 @@ Present these numbered options to the user:
131
129
 
132
130
  #### B. Research Questions
133
131
 
134
- [[LLM: Develop specific, actionable research questions organized by theme.]]
132
+ CRITICAL: collaborate with the user to develop specific, actionable research questions organized by theme.
135
133
 
136
134
  **Core Questions:**
137
135
 
@@ -147,8 +145,6 @@ Present these numbered options to the user:
147
145
 
148
146
  #### C. Research Methodology
149
147
 
150
- [[LLM: Specify appropriate research methods based on the type and objectives.]]
151
-
152
148
  **Data Collection Methods:**
153
149
 
154
150
  - Secondary research sources
@@ -165,8 +161,6 @@ Present these numbered options to the user:
165
161
 
166
162
  #### D. Output Requirements
167
163
 
168
- [[LLM: Define how research findings should be structured and presented.]]
169
-
170
164
  **Format Specifications:**
171
165
 
172
166
  - Executive summary requirements
@@ -183,8 +177,6 @@ Present these numbered options to the user:
183
177
 
184
178
  ### 4. Prompt Generation
185
179
 
186
- [[LLM: Synthesize all elements into a comprehensive, ready-to-use research prompt.]]
187
-
188
180
  **Research Prompt Template:**
189
181
 
190
182
  ```markdown
@@ -253,8 +245,6 @@ Present these numbered options to the user:
253
245
 
254
246
  ### 5. Review and Refinement
255
247
 
256
- [[LLM: Present the draft research prompt for user review and refinement.]]
257
-
258
248
  1. **Present Complete Prompt**
259
249
 
260
250
  - Show the full research prompt
@@ -276,8 +266,6 @@ Present these numbered options to the user:
276
266
 
277
267
  ### 6. Next Steps Guidance
278
268
 
279
- [[LLM: Provide clear guidance on how to use the research prompt.]]
280
-
281
269
  **Execution Options:**
282
270
 
283
271
  1. **Use with AI Research Assistant**: Provide this prompt to an AI model with research capabilities
@@ -8,7 +8,7 @@ To identify the next logical story based on project progress and epic definition
8
8
 
9
9
  ### 0. Load Core Configuration and Check Workflow
10
10
 
11
- - Load `.bmad-core/core-config.yaml` from the project root
11
+ - Load `{root}/core-config.yaml` from the project root
12
12
  - If the file does not exist, HALT and inform the user: "core-config.yaml not found. This file is required for story creation. You can either: 1) Copy it from GITHUB bmad-core/core-config.yaml and configure it for your project OR 2) Run the BMad installer against your project to upgrade and add the file automatically. Please add and configure core-config.yaml before proceeding."
13
13
  - Extract key configurations: `devStoryLocation`, `prd.*`, `architecture.*`, `workflow.*`
14
14
 
@@ -102,12 +102,11 @@ ALWAYS cite source documents: `[Source: architecture/{filename}.md#{section}]`
102
102
  - Verify all source references are included for technical details
103
103
  - Ensure tasks align with both epic requirements and architecture constraints
104
104
  - Update status to "Draft" and save the story file
105
- - If `workflow.trackProgress: true` and `workflow.updateOnCompletion: true`, call update-workflow-plan task to mark story creation step complete
106
- - Execute `tasks/execute-checklist` `checklists/story-draft-checklist`
105
+ - Execute `{root}/tasks/execute-checklist` `{root}/checklists/story-draft-checklist`
107
106
  - Provide summary to user including:
108
107
  - Story created: `{devStoryLocation}/{epicNum}.{storyNum}.story.md`
109
108
  - Status: Draft
110
109
  - Key technical components included from architecture docs
111
110
  - Any deviations or conflicts noted between epic and architecture
112
111
  - Checklist Results
113
- - Next steps: For Complex stories, suggest the user carefully review the story draft and also optionally have the PO run the task `validate-next-story`
112
+ - Next steps: For Complex stories, suggest the user carefully review the story draft and also optionally have the PO run the task `{root}/tasks/validate-next-story`
@@ -8,9 +8,9 @@ Generate comprehensive documentation for existing projects optimized for AI deve
8
8
 
9
9
  ### 1. Initial Project Analysis
10
10
 
11
- [[LLM: First, check if a PRD or requirements document exists in context. If yes, use it to focus your documentation efforts on relevant areas only.
11
+ **CRITICAL:** First, check if a PRD or requirements document exists in context. If yes, use it to focus your documentation efforts on relevant areas only.
12
12
 
13
- **IF PRD EXISTS**:
13
+ **IF PRD EXISTS**:
14
14
 
15
15
  - Review the PRD to understand what enhancement/feature is planned
16
16
  - Identify which modules, services, or areas will be affected
@@ -56,11 +56,10 @@ Ask the user these elicitation questions to better understand their needs:
56
56
  - Are there any existing documentation standards or formats you prefer?
57
57
  - What level of technical detail should the documentation target? (junior developers, senior developers, mixed team)
58
58
  - Is there a specific feature or enhancement you're planning? (This helps focus documentation)
59
- ]]
60
59
 
61
60
  ### 2. Deep Codebase Analysis
62
61
 
63
- [[LLM: Before generating documentation, conduct extensive analysis of the existing codebase:
62
+ CRITICAL: Before generating documentation, conduct extensive analysis of the existing codebase:
64
63
 
65
64
  1. **Explore Key Areas**:
66
65
  - Entry points (main files, index files, app initializers)
@@ -83,13 +82,14 @@ Ask the user these elicitation questions to better understand their needs:
83
82
  - Document workarounds and technical debt
84
83
  - Note areas that differ from standard patterns
85
84
 
86
- **IF PRD PROVIDED**: Also analyze what would need to change for the enhancement]]
85
+ **IF PRD PROVIDED**: Also analyze what would need to change for the enhancement
87
86
 
88
87
  ### 3. Core Documentation Generation
89
88
 
90
89
  [[LLM: Generate a comprehensive BROWNFIELD architecture document that reflects the ACTUAL state of the codebase.
91
90
 
92
91
  **CRITICAL**: This is NOT an aspirational architecture document. Document what EXISTS, including:
92
+
93
93
  - Technical debt and workarounds
94
94
  - Inconsistent patterns between different parts
95
95
  - Legacy code that can't be changed
@@ -101,13 +101,16 @@ Ask the user these elicitation questions to better understand their needs:
101
101
  # [Project Name] Brownfield Architecture Document
102
102
 
103
103
  ## Introduction
104
+
104
105
  This document captures the CURRENT STATE of the [Project Name] codebase, including technical debt, workarounds, and real-world patterns. It serves as a reference for AI agents working on enhancements.
105
106
 
106
107
  ### Document Scope
108
+
107
109
  [If PRD provided: "Focused on areas relevant to: {enhancement description}"]
108
110
  [If no PRD: "Comprehensive documentation of entire system"]
109
111
 
110
112
  ### Change Log
113
+
111
114
  | Date | Version | Description | Author |
112
115
  |------|---------|-------------|--------|
113
116
  | [Date] | 1.0 | Initial brownfield analysis | [Analyst] |
@@ -115,6 +118,7 @@ This document captures the CURRENT STATE of the [Project Name] codebase, includi
115
118
  ## Quick Reference - Key Files and Entry Points
116
119
 
117
120
  ### Critical Files for Understanding the System
121
+
118
122
  - **Main Entry**: `src/index.js` (or actual entry point)
119
123
  - **Configuration**: `config/app.config.js`, `.env.example`
120
124
  - **Core Business Logic**: `src/services/`, `src/domain/`
@@ -123,22 +127,25 @@ This document captures the CURRENT STATE of the [Project Name] codebase, includi
123
127
  - **Key Algorithms**: [List specific files with complex logic]
124
128
 
125
129
  ### If PRD Provided - Enhancement Impact Areas
130
+
126
131
  [Highlight which files/modules will be affected by the planned enhancement]
127
132
 
128
133
  ## High Level Architecture
129
134
 
130
135
  ### Technical Summary
131
- [Real assessment of architecture - mention if it's well-structured or has issues]
132
136
 
133
137
  ### Actual Tech Stack (from package.json/requirements.txt)
138
+
134
139
  | Category | Technology | Version | Notes |
135
140
  |----------|------------|---------|--------|
136
141
  | Runtime | Node.js | 16.x | [Any constraints] |
137
142
  | Framework | Express | 4.18.2 | [Custom middleware?] |
138
143
  | Database | PostgreSQL | 13 | [Connection pooling setup] |
139
- | [etc...] |
144
+
145
+ etc...
140
146
 
141
147
  ### Repository Structure Reality Check
148
+
142
149
  - Type: [Monorepo/Polyrepo/Hybrid]
143
150
  - Package Manager: [npm/yarn/pnpm]
144
151
  - Notable: [Any unusual structure decisions]
@@ -146,7 +153,8 @@ This document captures the CURRENT STATE of the [Project Name] codebase, includi
146
153
  ## Source Tree and Module Organization
147
154
 
148
155
  ### Project Structure (Actual)
149
- ```
156
+
157
+ ```text
150
158
  project-root/
151
159
  ├── src/
152
160
  │ ├── controllers/ # HTTP request handlers
@@ -160,6 +168,7 @@ project-root/
160
168
  ```
161
169
 
162
170
  ### Key Modules and Their Purpose
171
+
163
172
  - **User Management**: `src/services/userService.js` - Handles all user operations
164
173
  - **Authentication**: `src/middleware/auth.js` - JWT-based, custom implementation
165
174
  - **Payment Processing**: `src/legacy/payment.js` - CRITICAL: Do not refactor, tightly coupled
@@ -168,12 +177,14 @@ project-root/
168
177
  ## Data Models and APIs
169
178
 
170
179
  ### Data Models
180
+
171
181
  Instead of duplicating, reference actual model files:
172
182
  - **User Model**: See `src/models/User.js`
173
183
  - **Order Model**: See `src/models/Order.js`
174
184
  - **Related Types**: TypeScript definitions in `src/types/`
175
185
 
176
186
  ### API Specifications
187
+
177
188
  - **OpenAPI Spec**: `docs/api/openapi.yaml` (if exists)
178
189
  - **Postman Collection**: `docs/api/postman-collection.json`
179
190
  - **Manual Endpoints**: [List any undocumented endpoints discovered]
@@ -181,12 +192,14 @@ Instead of duplicating, reference actual model files:
181
192
  ## Technical Debt and Known Issues
182
193
 
183
194
  ### Critical Technical Debt
195
+
184
196
  1. **Payment Service**: Legacy code in `src/legacy/payment.js` - tightly coupled, no tests
185
197
  2. **User Service**: Different pattern than other services, uses callbacks instead of promises
186
198
  3. **Database Migrations**: Manually tracked, no proper migration tool
187
199
  4. **[Other significant debt]**
188
200
 
189
201
  ### Workarounds and Gotchas
202
+
190
203
  - **Environment Variables**: Must set `NODE_ENV=production` even for staging (historical reason)
191
204
  - **Database Connections**: Connection pool hardcoded to 10, changing breaks payment service
192
205
  - **[Other workarounds developers need to know]**
@@ -194,13 +207,16 @@ Instead of duplicating, reference actual model files:
194
207
  ## Integration Points and External Dependencies
195
208
 
196
209
  ### External Services
210
+
197
211
  | Service | Purpose | Integration Type | Key Files |
198
212
  |---------|---------|------------------|-----------|
199
213
  | Stripe | Payments | REST API | `src/integrations/stripe/` |
200
214
  | SendGrid | Emails | SDK | `src/services/emailService.js` |
201
- | [etc...] |
215
+
216
+ etc...
202
217
 
203
218
  ### Internal Integration Points
219
+
204
220
  - **Frontend Communication**: REST API on port 3000, expects specific headers
205
221
  - **Background Jobs**: Redis queue, see `src/workers/`
206
222
  - **[Other integrations]**
@@ -208,11 +224,13 @@ Instead of duplicating, reference actual model files:
208
224
  ## Development and Deployment
209
225
 
210
226
  ### Local Development Setup
227
+
211
228
  1. Actual steps that work (not ideal steps)
212
229
  2. Known issues with setup
213
230
  3. Required environment variables (see `.env.example`)
214
231
 
215
232
  ### Build and Deployment Process
233
+
216
234
  - **Build Command**: `npm run build` (webpack config in `webpack.config.js`)
217
235
  - **Deployment**: Manual deployment via `scripts/deploy.sh`
218
236
  - **Environments**: Dev, Staging, Prod (see `config/environments/`)
@@ -220,12 +238,14 @@ Instead of duplicating, reference actual model files:
220
238
  ## Testing Reality
221
239
 
222
240
  ### Current Test Coverage
241
+
223
242
  - Unit Tests: 60% coverage (Jest)
224
243
  - Integration Tests: Minimal, in `tests/integration/`
225
244
  - E2E Tests: None
226
245
  - Manual Testing: Primary QA method
227
246
 
228
247
  ### Running Tests
248
+
229
249
  ```bash
230
250
  npm test # Runs unit tests
231
251
  npm run test:integration # Runs integration tests (requires local DB)
@@ -234,6 +254,7 @@ npm run test:integration # Runs integration tests (requires local DB)
234
254
  ## If Enhancement PRD Provided - Impact Analysis
235
255
 
236
256
  ### Files That Will Need Modification
257
+
237
258
  Based on the enhancement requirements, these files will be affected:
238
259
  - `src/services/userService.js` - Add new user fields
239
260
  - `src/models/User.js` - Update schema
@@ -241,11 +262,13 @@ Based on the enhancement requirements, these files will be affected:
241
262
  - [etc...]
242
263
 
243
264
  ### New Files/Modules Needed
265
+
244
266
  - `src/services/newFeatureService.js` - New business logic
245
267
  - `src/models/NewFeature.js` - New data model
246
268
  - [etc...]
247
269
 
248
270
  ### Integration Considerations
271
+
249
272
  - Will need to integrate with existing auth middleware
250
273
  - Must follow existing response format in `src/utils/responseFormatter.js`
251
274
  - [Other integration points]
@@ -253,6 +276,7 @@ Based on the enhancement requirements, these files will be affected:
253
276
  ## Appendix - Useful Commands and Scripts
254
277
 
255
278
  ### Frequently Used Commands
279
+
256
280
  ```bash
257
281
  npm run dev # Start development server
258
282
  npm run build # Production build
@@ -261,14 +285,13 @@ npm run seed # Seed test data
261
285
  ```
262
286
 
263
287
  ### Debugging and Troubleshooting
288
+
264
289
  - **Logs**: Check `logs/app.log` for application logs
265
290
  - **Debug Mode**: Set `DEBUG=app:*` for verbose logging
266
291
  - **Common Issues**: See `docs/troubleshooting.md`]]
267
292
 
268
293
  ### 4. Document Delivery
269
294
 
270
- [[LLM: After generating the complete architecture document:
271
-
272
295
  1. **In Web UI (Gemini, ChatGPT, Claude)**:
273
296
  - Present the entire document in one response (or multiple if too long)
274
297
  - Tell user to copy and save as `docs/brownfield-architecture.md` or `docs/project-architecture.md`
@@ -280,6 +303,7 @@ npm run seed # Seed test data
280
303
  - Can be sharded later using PO agent if desired
281
304
 
282
305
  The document should be comprehensive enough that future agents can understand:
306
+
283
307
  - The actual state of the system (not idealized)
284
308
  - Where to find key files and logic
285
309
  - What technical debt exists
@@ -288,7 +312,7 @@ The document should be comprehensive enough that future agents can understand:
288
312
 
289
313
  ### 5. Quality Assurance
290
314
 
291
- [[LLM: Before finalizing the document:
315
+ CRITICAL: Before finalizing the document:
292
316
 
293
317
  1. **Accuracy Check**: Verify all technical details match the actual codebase
294
318
  2. **Completeness Review**: Ensure all major system components are documented
@@ -296,7 +320,7 @@ The document should be comprehensive enough that future agents can understand:
296
320
  4. **Clarity Assessment**: Check that explanations are clear for AI agents
297
321
  5. **Navigation**: Ensure document has clear section structure for easy reference
298
322
 
299
- Apply the advanced elicitation task after major sections to refine based on user feedback.]]
323
+ Apply the advanced elicitation task after major sections to refine based on user feedback.
300
324
 
301
325
  ## Success Criteria
302
326
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  docOutputLocation: docs/brainstorming-session-results.md
3
- template: brainstorming-output-tmpl
3
+ template: "{root}/templates/brainstorming-output-tmpl.md"
4
4
  ---
5
5
 
6
6
  # Facilitate Brainstorming Session Task
@@ -6,7 +6,7 @@ To generate a masterful, comprehensive, and optimized prompt that can be used wi
6
6
 
7
7
  ## Inputs
8
8
 
9
- - Completed UI/UX Specification (`front-end-spec`)
9
+ - Completed UI/UX Specification (`front-end-spec.md`)
10
10
  - Completed Frontend Architecture Document (`front-end-architecture`) or a full stack combined architecture such as `architecture.md`
11
11
  - Main System Architecture Document (`architecture` - for API contracts and tech stack to give further context)
12
12