bmad-method 6.0.0-alpha.5 → 6.0.0-alpha.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.
Files changed (161) hide show
  1. package/.claude/agents/bmad-analysis/api-documenter.md +102 -0
  2. package/.claude/agents/bmad-analysis/codebase-analyzer.md +82 -0
  3. package/.claude/agents/bmad-analysis/data-analyst.md +101 -0
  4. package/.claude/agents/bmad-analysis/pattern-detector.md +84 -0
  5. package/.claude/agents/bmad-planning/dependency-mapper.md +83 -0
  6. package/.claude/agents/bmad-planning/epic-optimizer.md +81 -0
  7. package/.claude/agents/bmad-planning/requirements-analyst.md +61 -0
  8. package/.claude/agents/bmad-planning/technical-decisions-curator.md +168 -0
  9. package/.claude/agents/bmad-planning/trend-spotter.md +115 -0
  10. package/.claude/agents/bmad-planning/user-journey-mapper.md +123 -0
  11. package/.claude/agents/bmad-planning/user-researcher.md +72 -0
  12. package/.claude/agents/bmad-research/market-researcher.md +51 -0
  13. package/.claude/agents/bmad-research/tech-debt-auditor.md +106 -0
  14. package/.claude/agents/bmad-review/document-reviewer.md +102 -0
  15. package/.claude/agents/bmad-review/technical-evaluator.md +68 -0
  16. package/.claude/agents/bmad-review/test-coverage-analyzer.md +108 -0
  17. package/.claude/commands/bmad/bmm/workflows/README.md +2 -2
  18. package/.claude/commands/bmad/bmm/workflows/prd.md +1 -1
  19. package/.claude/commands/bmad/bmm/workflows/tech-spec.md +3 -3
  20. package/.claude/commands/bmad/core/workflows/README.md +0 -10
  21. package/.claude/settings.local.json +3 -4
  22. package/CONTRIBUTING.md +1 -13
  23. package/bmad/_cfg/agent-manifest.csv +0 -6
  24. package/bmad/_cfg/files-manifest.csv +26 -78
  25. package/bmad/_cfg/ides/claude-code.yaml +4 -3
  26. package/bmad/_cfg/manifest.yaml +3 -5
  27. package/bmad/_cfg/task-manifest.csv +0 -4
  28. package/bmad/_cfg/tool-manifest.csv +0 -1
  29. package/bmad/_cfg/workflow-manifest.csv +2 -8
  30. package/bmad/bmb/config.yaml +2 -2
  31. package/bmad/bmb/workflows/audit-workflow/instructions.md +1 -1
  32. package/bmad/bmm/config.yaml +4 -3
  33. package/bmad/bmm/workflows/2-plan-workflows/create-ux-design/instructions.md +1 -19
  34. package/bmad/bmm/workflows/2-plan-workflows/prd/checklist.md +10 -9
  35. package/bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/epics-template.md +23 -34
  36. package/bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/instructions.md +105 -331
  37. package/bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/workflow.yaml +23 -11
  38. package/bmad/bmm/workflows/2-plan-workflows/prd/instructions.md +23 -38
  39. package/bmad/bmm/workflows/2-plan-workflows/prd/workflow.yaml +1 -1
  40. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/epics-template.md +38 -16
  41. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/instructions.md +1 -19
  42. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/user-story-template.md +35 -32
  43. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml +2 -2
  44. package/bmad/bmm/workflows/3-solutioning/architecture/instructions.md +7 -18
  45. package/bmad/bmm/workflows/3-solutioning/solutioning-gate-check/instructions.md +1 -18
  46. package/bmad/bmm/workflows/3-solutioning/solutioning-gate-check/workflow.yaml +6 -6
  47. package/bmad/bmm/workflows/techdoc/documentation-standards.md +24 -1
  48. package/bmad/bmm/workflows/testarch/atdd/atdd-checklist-template.md +2 -2
  49. package/bmad/core/config.yaml +2 -2
  50. package/package.json +1 -1
  51. package/src/modules/bmm/_module-installer/install-config.yaml +5 -0
  52. package/src/modules/bmm/docs/README.md +10 -9
  53. package/src/modules/bmm/docs/agents-guide.md +1 -1
  54. package/src/modules/bmm/docs/brownfield-guide.md +5 -6
  55. package/src/modules/bmm/docs/enterprise-agentic-development.md +3 -3
  56. package/src/modules/bmm/docs/faq.md +6 -6
  57. package/src/modules/bmm/docs/glossary.md +8 -8
  58. package/src/modules/bmm/docs/quick-spec-flow.md +3 -3
  59. package/src/modules/bmm/docs/quick-start.md +5 -5
  60. package/src/modules/bmm/docs/scale-adaptive-system.md +1 -1
  61. package/src/modules/bmm/docs/test-architecture.md +329 -0
  62. package/src/modules/bmm/docs/troubleshooting.md +6 -6
  63. package/src/modules/bmm/docs/workflows-analysis.md +64 -28
  64. package/src/modules/bmm/docs/workflows-implementation.md +196 -1670
  65. package/src/modules/bmm/docs/workflows-planning.md +74 -35
  66. package/src/modules/bmm/docs/workflows-solutioning.md +46 -16
  67. package/src/modules/bmm/workflows/techdoc/documentation-standards.md +24 -1
  68. package/src/modules/bmm/workflows/testarch/atdd/atdd-checklist-template.md +2 -2
  69. package/tools/cli/installers/lib/core/config-collector.js +39 -11
  70. package/tools/cli/installers/lib/core/ide-config-manager.js +3 -1
  71. package/tools/cli/installers/lib/core/installer.js +20 -9
  72. package/tools/cli/installers/lib/core/manifest-generator.js +3 -1
  73. package/tools/cli/installers/lib/core/manifest.js +6 -2
  74. package/tools/cli/installers/lib/modules/manager.js +6 -0
  75. package/tools/cli/lib/config.js +3 -1
  76. package/tools/cli/lib/ui.js +5 -5
  77. package/tools/cli/lib/yaml-format.js +2 -1
  78. package/tools/schema/agent.js +2 -0
  79. package/.claude/commands/bmad/bmm/agents/paige.md +0 -82
  80. package/.claude/commands/bmad/bmm/workflows/tech-spec-sm.md +0 -15
  81. package/bmad/_cfg/agents/bmm-paige.customize.yaml +0 -42
  82. package/bmad/_cfg/agents/cis-brainstorming-coach.customize.yaml +0 -42
  83. package/bmad/_cfg/agents/cis-creative-problem-solver.customize.yaml +0 -42
  84. package/bmad/_cfg/agents/cis-design-thinking-coach.customize.yaml +0 -42
  85. package/bmad/_cfg/agents/cis-innovation-strategist.customize.yaml +0 -42
  86. package/bmad/_cfg/agents/cis-storyteller.customize.yaml +0 -42
  87. package/bmad/bmb/agents/bmad-builder.md.bak +0 -70
  88. package/bmad/bmb/workflows/audit-workflow/workflow.yaml.bak +0 -23
  89. package/bmad/bmb/workflows/create-module/workflow.yaml.bak +0 -42
  90. package/bmad/bmb/workflows/create-workflow/workflow-template/workflow.yaml.bak +0 -39
  91. package/bmad/bmb/workflows/create-workflow/workflow.yaml.bak +0 -40
  92. package/bmad/bmb/workflows/edit-agent/workflow.yaml.bak +0 -33
  93. package/bmad/bmb/workflows/edit-module/workflow.yaml.bak +0 -34
  94. package/bmad/bmb/workflows/edit-workflow/workflow.yaml.bak +0 -27
  95. package/bmad/bmb/workflows/module-brief/workflow.yaml.bak +0 -29
  96. package/bmad/bmb/workflows/redoc/workflow.yaml.bak +0 -32
  97. package/bmad/bmm/README.md.bak +0 -169
  98. package/bmad/bmm/agents/analyst.md.bak +0 -67
  99. package/bmad/bmm/agents/architect.md.bak +0 -73
  100. package/bmad/bmm/agents/dev.md.bak +0 -69
  101. package/bmad/bmm/agents/paige.md.bak +0 -82
  102. package/bmad/bmm/agents/pm.md.bak +0 -76
  103. package/bmad/bmm/agents/sm.md.bak +0 -85
  104. package/bmad/bmm/agents/tea.md.bak +0 -72
  105. package/bmad/bmm/agents/ux-designer.md.bak +0 -71
  106. package/bmad/bmm/docs/README.md +0 -235
  107. package/bmad/bmm/docs/agents-guide.md +0 -1057
  108. package/bmad/bmm/docs/brownfield-guide.md +0 -759
  109. package/bmad/bmm/docs/enterprise-agentic-development.md +0 -680
  110. package/bmad/bmm/docs/faq.md +0 -589
  111. package/bmad/bmm/docs/glossary.md +0 -321
  112. package/bmad/bmm/docs/party-mode.md +0 -224
  113. package/bmad/bmm/docs/quick-spec-flow.md +0 -652
  114. package/bmad/bmm/docs/quick-start.md +0 -366
  115. package/bmad/bmm/docs/scale-adaptive-system.md +0 -599
  116. package/bmad/bmm/docs/troubleshooting.md +0 -680
  117. package/bmad/bmm/docs/workflow-architecture-reference.md +0 -371
  118. package/bmad/bmm/docs/workflow-document-project-reference.md +0 -487
  119. package/bmad/bmm/docs/workflows-analysis.md +0 -670
  120. package/bmad/bmm/docs/workflows-implementation.md +0 -1758
  121. package/bmad/bmm/docs/workflows-planning.md +0 -1086
  122. package/bmad/bmm/docs/workflows-solutioning.md +0 -726
  123. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml.bak +0 -60
  124. package/bmad/bmm/workflows/techdoc/documentation-standards.md.bak +0 -238
  125. package/bmad/bmm/workflows/workflow-status/init/workflow.yaml.bak +0 -27
  126. package/bmad/cis/README.md +0 -153
  127. package/bmad/cis/agents/README.md +0 -104
  128. package/bmad/cis/agents/brainstorming-coach.md +0 -62
  129. package/bmad/cis/agents/brainstorming-coach.md.bak +0 -62
  130. package/bmad/cis/agents/creative-problem-solver.md +0 -62
  131. package/bmad/cis/agents/creative-problem-solver.md.bak +0 -62
  132. package/bmad/cis/agents/design-thinking-coach.md +0 -62
  133. package/bmad/cis/agents/design-thinking-coach.md.bak +0 -62
  134. package/bmad/cis/agents/innovation-strategist.md +0 -62
  135. package/bmad/cis/agents/innovation-strategist.md.bak +0 -62
  136. package/bmad/cis/agents/storyteller.md +0 -59
  137. package/bmad/cis/agents/storyteller.md.bak +0 -59
  138. package/bmad/cis/config.yaml +0 -10
  139. package/bmad/cis/teams/creative-squad.yaml +0 -6
  140. package/bmad/cis/workflows/README.md +0 -139
  141. package/bmad/cis/workflows/design-thinking/README.md +0 -56
  142. package/bmad/cis/workflows/design-thinking/design-methods.csv +0 -31
  143. package/bmad/cis/workflows/design-thinking/instructions.md +0 -200
  144. package/bmad/cis/workflows/design-thinking/template.md +0 -111
  145. package/bmad/cis/workflows/design-thinking/workflow.yaml +0 -32
  146. package/bmad/cis/workflows/innovation-strategy/README.md +0 -56
  147. package/bmad/cis/workflows/innovation-strategy/innovation-frameworks.csv +0 -31
  148. package/bmad/cis/workflows/innovation-strategy/instructions.md +0 -274
  149. package/bmad/cis/workflows/innovation-strategy/template.md +0 -189
  150. package/bmad/cis/workflows/innovation-strategy/workflow.yaml +0 -32
  151. package/bmad/cis/workflows/problem-solving/README.md +0 -56
  152. package/bmad/cis/workflows/problem-solving/instructions.md +0 -250
  153. package/bmad/cis/workflows/problem-solving/solving-methods.csv +0 -31
  154. package/bmad/cis/workflows/problem-solving/template.md +0 -165
  155. package/bmad/cis/workflows/problem-solving/workflow.yaml +0 -32
  156. package/bmad/cis/workflows/storytelling/README.md +0 -58
  157. package/bmad/cis/workflows/storytelling/instructions.md +0 -291
  158. package/bmad/cis/workflows/storytelling/story-types.csv +0 -26
  159. package/bmad/cis/workflows/storytelling/template.md +0 -113
  160. package/bmad/cis/workflows/storytelling/workflow.yaml +0 -32
  161. package/bmad/core/agents/bmad-master.md.bak +0 -71
@@ -1,759 +0,0 @@
1
- # BMad Method Brownfield Development Guide
2
-
3
- **Complete guide for working with existing codebases**
4
-
5
- **Reading Time:** ~35 minutes
6
-
7
- ---
8
-
9
- ## Quick Navigation
10
-
11
- **Jump to:**
12
-
13
- - [Quick Reference](#quick-reference) - Commands and files
14
- - [Common Scenarios](#common-scenarios) - Real-world examples
15
- - [Troubleshooting](#troubleshooting) - Problem solutions
16
- - [Best Practices](#best-practices) - Success tips
17
-
18
- ---
19
-
20
- ## What is Brownfield Development?
21
-
22
- Brownfield projects involve working within existing codebases rather than starting fresh:
23
-
24
- - **Bug fixes** - Single file changes
25
- - **Small features** - Adding to existing modules
26
- - **Feature sets** - Multiple related features
27
- - **Major integrations** - Complex architectural additions
28
- - **System expansions** - Enterprise-scale enhancements
29
-
30
- **Key Difference from Greenfield:** You must understand and respect existing patterns, architecture, and constraints.
31
-
32
- **Core Principle:** AI agents need comprehensive documentation to understand existing code before they can effectively plan or implement changes.
33
-
34
- ---
35
-
36
- ## Getting Started
37
-
38
- ### Understanding Planning Tracks
39
-
40
- For complete track details, see [Scale Adaptive System](./scale-adaptive-system.md).
41
-
42
- **Brownfield tracks at a glance:**
43
-
44
- | Track | Scope | Typical Stories | Key Difference |
45
- | --------------------- | -------------------------- | --------------- | ----------------------------------------------- |
46
- | **Quick Flow** | Bug fixes, small features | 1-15 | Must understand affected code and patterns |
47
- | **BMad Method** | Feature sets, integrations | 10-50+ | Integrate with existing architecture |
48
- | **Enterprise Method** | Enterprise expansions | 30+ | Full system documentation + compliance required |
49
-
50
- **Note:** Story counts are guidance, not definitions. Tracks are chosen based on planning needs.
51
-
52
- ### Track Selection for Brownfield
53
-
54
- When you run `workflow-init`, it handles brownfield intelligently:
55
-
56
- **Step 1: Shows what it found**
57
-
58
- - Old planning docs (PRD, epics, stories)
59
- - Existing codebase
60
-
61
- **Step 2: Asks about YOUR work**
62
-
63
- > "Are these works in progress, previous effort, or proposed work?"
64
-
65
- - **(a) Works in progress** → Uses artifacts to determine level
66
- - **(b) Previous effort** → Asks you to describe NEW work
67
- - **(c) Proposed work** → Uses artifacts as guidance
68
- - **(d) None of these** → You explain your work
69
-
70
- **Step 3: Analyzes your description**
71
-
72
- - Keywords: "fix", "bug" → Quick Flow, "dashboard", "platform" → BMad Method, "enterprise", "multi-tenant" → Enterprise Method
73
- - Complexity assessment
74
- - Confirms suggested track with you
75
-
76
- **Key Principle:** System asks about YOUR current work first, uses old artifacts as context only.
77
-
78
- **Example: Old Complex PRD, New Simple Work**
79
-
80
- ```
81
- System: "Found PRD.md (BMad Method track, 30 stories, 6 months old)"
82
- System: "Is this work in progress or previous effort?"
83
- You: "Previous effort - I'm just fixing a bug now"
84
- System: "Tell me about your current work"
85
- You: "Update payment method enums"
86
- System: "Quick Flow track (tech-spec approach). Correct?"
87
- You: "Yes"
88
- ✅ Creates Quick Flow workflow
89
- ```
90
-
91
- ---
92
-
93
- ## Phase 0: Documentation (Critical First Step)
94
-
95
- 🚨 **For brownfield projects: Always ensure adequate AI-usable documentation before planning**
96
-
97
- ### Default Recommendation: Run document-project
98
-
99
- **Best practice:** Run `document-project` workflow unless you have **confirmed, trusted, AI-optimized documentation**.
100
-
101
- ### Why Document-Project is Almost Always the Right Choice
102
-
103
- Existing documentation often has quality issues that break AI workflows:
104
-
105
- **Common Problems:**
106
-
107
- - **Too Much Information (TMI):** Massive markdown files with 10s or 100s of level 2 sections
108
- - **Out of Date:** Documentation hasn't been updated with recent code changes
109
- - **Wrong Format:** Written for humans, not AI agents (lacks structure, index, clear patterns)
110
- - **Incomplete Coverage:** Missing critical architecture, patterns, or setup info
111
- - **Inconsistent Quality:** Some areas documented well, others not at all
112
-
113
- **Impact on AI Agents:**
114
-
115
- - AI agents hit token limits reading massive files
116
- - Outdated docs cause hallucinations (agent thinks old patterns still apply)
117
- - Missing structure means agents can't find relevant information
118
- - Incomplete coverage leads to incorrect assumptions
119
-
120
- ### Documentation Decision Tree
121
-
122
- **Step 1: Assess Existing Documentation Quality**
123
-
124
- Ask yourself:
125
-
126
- - ✅ Is it **current** (updated in last 30 days)?
127
- - ✅ Is it **AI-optimized** (structured with index.md, clear sections, <500 lines per file)?
128
- - ✅ Is it **comprehensive** (architecture, patterns, setup all documented)?
129
- - ✅ Do you **trust** it completely for AI agent consumption?
130
-
131
- **If ANY answer is NO → Run `document-project`**
132
-
133
- **Step 2: Check for Massive Documents**
134
-
135
- If you have documentation but files are huge (>500 lines, 10+ level 2 sections):
136
-
137
- 1. **First:** Run `shard-doc` tool to split large files:
138
-
139
- ```bash
140
- # Load BMad Master or any agent
141
- bmad/core/tools/shard-doc.xml --input docs/massive-doc.md
142
- ```
143
-
144
- - Splits on level 2 sections by default
145
- - Creates organized, manageable files
146
- - Preserves content integrity
147
-
148
- 2. **Then:** Run `index-docs` task to create navigation:
149
-
150
- ```bash
151
- bmad/core/tasks/index-docs.xml --directory ./docs
152
- ```
153
-
154
- 3. **Finally:** Validate quality - if sharded docs still seem incomplete/outdated → Run `document-project`
155
-
156
- ### Four Real-World Scenarios
157
-
158
- | Scenario | You Have | Action | Why |
159
- | -------- | ------------------------------------------ | -------------------------- | --------------------------------------- |
160
- | **A** | No documentation | `document-project` | Only option - generate from scratch |
161
- | **B** | Docs exist but massive/outdated/incomplete | `document-project` | Safer to regenerate than trust bad docs |
162
- | **C** | Good docs but no structure | `shard-doc` → `index-docs` | Structure existing content for AI |
163
- | **D** | Confirmed AI-optimized docs with index.md | Skip Phase 0 | Rare - only if you're 100% confident |
164
-
165
- ### Scenario A: No Documentation (Most Common)
166
-
167
- **Action: Run document-project workflow**
168
-
169
- 1. Load Analyst or Technical Writer (Paige) agent
170
- 2. Run `*document-project`
171
- 3. Choose scan level:
172
- - **Quick** (2-5min): Pattern analysis, no source reading
173
- - **Deep** (10-30min): Reads critical paths - **Recommended**
174
- - **Exhaustive** (30-120min): Reads all files
175
-
176
- **Outputs:**
177
-
178
- - `docs/index.md` - Master AI entry point
179
- - `docs/project-overview.md` - Executive summary
180
- - `docs/architecture.md` - Architecture analysis
181
- - `docs/source-tree-analysis.md` - Directory structure
182
- - Additional files based on project type (API, web app, etc.)
183
-
184
- ### Scenario B: Docs Exist But Quality Unknown/Poor (Very Common)
185
-
186
- **Action: Run document-project workflow (regenerate)**
187
-
188
- Even if `docs/` folder exists, if you're unsure about quality → **regenerate**.
189
-
190
- **Why regenerate instead of index?**
191
-
192
- - Outdated docs → AI makes wrong assumptions
193
- - Incomplete docs → AI invents missing information
194
- - TMI docs → AI hits token limits, misses key info
195
- - Human-focused docs → Missing AI-critical structure
196
-
197
- **document-project** will:
198
-
199
- - Scan actual codebase (source of truth)
200
- - Generate fresh, accurate documentation
201
- - Structure properly for AI consumption
202
- - Include only relevant, current information
203
-
204
- ### Scenario C: Good Docs But Needs Structure
205
-
206
- **Action: Shard massive files, then index**
207
-
208
- If you have **good, current documentation** but it's in massive files:
209
-
210
- **Step 1: Shard large documents**
211
-
212
- ```bash
213
- # For each massive doc (>500 lines or 10+ level 2 sections)
214
- bmad/core/tools/shard-doc.xml \
215
- --input docs/api-documentation.md \
216
- --output docs/api/ \
217
- --level 2 # Split on ## headers (default)
218
- ```
219
-
220
- **Step 2: Generate index**
221
-
222
- ```bash
223
- bmad/core/tasks/index-docs.xml --directory ./docs
224
- ```
225
-
226
- **Step 3: Validate**
227
-
228
- - Review generated `docs/index.md`
229
- - Check that sharded files are <500 lines each
230
- - Verify content is current and accurate
231
- - **If anything seems off → Run document-project instead**
232
-
233
- ### Scenario D: Confirmed AI-Optimized Documentation (Rare)
234
-
235
- **Action: Skip Phase 0**
236
-
237
- Only skip if ALL conditions met:
238
-
239
- - ✅ `docs/index.md` exists and is comprehensive
240
- - ✅ Documentation updated within last 30 days
241
- - ✅ All doc files <500 lines with clear structure
242
- - ✅ Covers architecture, patterns, setup, API surface
243
- - ✅ You personally verified quality for AI consumption
244
- - ✅ Previous AI agents used it successfully
245
-
246
- **If unsure → Run document-project** (costs 10-30 minutes, saves hours of confusion)
247
-
248
- ### Why document-project is Critical
249
-
250
- Without AI-optimized documentation, workflows fail:
251
-
252
- - **tech-spec** (Quick Flow) can't auto-detect stack/patterns → Makes wrong assumptions
253
- - **PRD** (BMad Method) can't reference existing code → Designs incompatible features
254
- - **architecture** can't build on existing structure → Suggests conflicting patterns
255
- - **story-context** can't inject existing patterns → Dev agent rewrites working code
256
- - **dev-story** invents implementations → Breaks existing integrations
257
-
258
- ### Key Principle
259
-
260
- **When in doubt, run document-project.**
261
-
262
- It's better to spend 10-30 minutes generating fresh, accurate docs than to waste hours debugging AI agents working from bad documentation.
263
-
264
- ---
265
-
266
- ## Workflow Phases by Track
267
-
268
- ### Phase 1: Analysis (Optional)
269
-
270
- **Workflows:**
271
-
272
- - `brainstorm-project` - Solution exploration
273
- - `research` - Technical/market research
274
- - `product-brief` - Strategic planning (BMad Method/Enterprise tracks only)
275
-
276
- **When to use:** Complex features, technical decisions, strategic additions
277
-
278
- **When to skip:** Bug fixes, well-understood features, time-sensitive changes
279
-
280
- See [Workflows Guide](../workflows/README.md) for details.
281
-
282
- ### Phase 2: Planning (Required)
283
-
284
- **Planning approach adapts by track:**
285
-
286
- **Quick Flow:** Use `tech-spec` workflow
287
-
288
- - Creates tech-spec.md
289
- - Auto-detects existing stack (brownfield)
290
- - Confirms conventions with you
291
- - Generates implementation-ready stories
292
-
293
- **BMad Method/Enterprise:** Use `prd` workflow
294
-
295
- - Creates PRD.md + epic breakdown
296
- - References existing architecture
297
- - Plans integration points
298
-
299
- **Brownfield-specific:** See [Scale Adaptive System](./scale-adaptive-system.md) for complete workflow paths by track.
300
-
301
- ### Phase 3: Solutioning (BMad Method/Enterprise Only)
302
-
303
- **Critical for brownfield:**
304
-
305
- - Review existing architecture FIRST
306
- - Document integration points explicitly
307
- - Plan backward compatibility
308
- - Consider migration strategy
309
-
310
- **Workflows:**
311
-
312
- - `create-architecture` - Extend architecture docs (BMad Method/Enterprise)
313
- - `solutioning-gate-check` - Validate before implementation (BMad Method/Enterprise)
314
-
315
- ### Phase 4: Implementation (All Tracks)
316
-
317
- **Sprint-based development through story iteration:**
318
-
319
- ```mermaid
320
- flowchart TD
321
- SPRINT[sprint-planning<br/>Initialize tracking]
322
- EPIC[epic-tech-context<br/>Per epic]
323
- CREATE[create-story]
324
- CONTEXT[story-context]
325
- DEV[dev-story]
326
- REVIEW[code-review]
327
- CHECK{More stories?}
328
- RETRO[retrospective<br/>Per epic]
329
-
330
- SPRINT --> EPIC
331
- EPIC --> CREATE
332
- CREATE --> CONTEXT
333
- CONTEXT --> DEV
334
- DEV --> REVIEW
335
- REVIEW --> CHECK
336
- CHECK -->|Yes| CREATE
337
- CHECK -->|No| RETRO
338
-
339
- style SPRINT fill:#bfb,stroke:#333,stroke-width:2px
340
- style RETRO fill:#fbf,stroke:#333,stroke-width:2px
341
- ```
342
-
343
- **Status Progression:**
344
-
345
- - Epic: `backlog → contexted`
346
- - Story: `backlog → drafted → ready-for-dev → in-progress → review → done`
347
-
348
- **Brownfield-Specific Implementation Tips:**
349
-
350
- 1. **Respect existing patterns** - Follow established conventions
351
- 2. **Test integration thoroughly** - Validate interactions with existing code
352
- 3. **Use feature flags** - Enable gradual rollout
353
- 4. **Context injection matters** - epic-tech-context and story-context reference existing patterns
354
-
355
- ---
356
-
357
- ## Best Practices
358
-
359
- ### 1. Always Document First
360
-
361
- Even if you know the code, AI agents need `document-project` output for context. Run it before planning.
362
-
363
- ### 2. Be Specific About Current Work
364
-
365
- When workflow-init asks about your work:
366
-
367
- - ✅ "Update payment method enums to include Apple Pay"
368
- - ❌ "Fix stuff"
369
-
370
- ### 3. Choose Right Documentation Approach
371
-
372
- - **Has good docs, no index?** → Run `index-docs` task (fast)
373
- - **No docs or need codebase analysis?** → Run `document-project` (Deep scan)
374
-
375
- ### 4. Respect Existing Patterns
376
-
377
- Tech-spec and story-context will detect conventions. Follow them unless explicitly modernizing.
378
-
379
- ### 5. Plan Integration Points Explicitly
380
-
381
- Document in tech-spec/architecture:
382
-
383
- - Which existing modules you'll modify
384
- - What APIs/services you'll integrate with
385
- - How data flows between new and existing code
386
-
387
- ### 6. Design for Gradual Rollout
388
-
389
- - Use feature flags for new functionality
390
- - Plan rollback strategies
391
- - Maintain backward compatibility
392
- - Create migration scripts if needed
393
-
394
- ### 7. Test Integration Thoroughly
395
-
396
- - Regression testing of existing features
397
- - Integration point validation
398
- - Performance impact assessment
399
- - API contract verification
400
-
401
- ### 8. Use Sprint Planning Effectively
402
-
403
- - Run `sprint-planning` at Phase 4 start
404
- - Context epics before drafting stories
405
- - Update `sprint-status.yaml` as work progresses
406
-
407
- ### 9. Leverage Context Injection
408
-
409
- - Run `epic-tech-context` before story drafting
410
- - Always create `story-context` before implementation
411
- - These reference existing patterns for consistency
412
-
413
- ### 10. Learn Continuously
414
-
415
- - Run `retrospective` after each epic
416
- - Incorporate learnings into next stories
417
- - Update discovered patterns
418
- - Share insights across team
419
-
420
- ---
421
-
422
- ## Common Scenarios
423
-
424
- ### Scenario 1: Bug Fix (Quick Flow)
425
-
426
- **Situation:** Authentication token expiration causing logout issues
427
-
428
- **Track:** Quick Flow
429
-
430
- **Workflow:**
431
-
432
- 1. **Document:** Skip if auth system documented, else run `document-project` (Quick scan)
433
- 2. **Plan:** Load PM → run `tech-spec`
434
- - Analyzes bug
435
- - Detects stack (Express, Jest)
436
- - Confirms conventions
437
- - Creates tech-spec.md + story
438
- 3. **Implement:** Load DEV → run `dev-story`
439
- 4. **Review:** Load DEV → run `code-review`
440
-
441
- **Time:** 2-4 hours
442
-
443
- ---
444
-
445
- ### Scenario 2: Small Feature (Quick Flow)
446
-
447
- **Situation:** Add "forgot password" to existing auth system
448
-
449
- **Track:** Quick Flow
450
-
451
- **Workflow:**
452
-
453
- 1. **Document:** Run `document-project` (Deep scan of auth module if not documented)
454
- 2. **Plan:** Load PM → run `tech-spec`
455
- - Detects Next.js 13.4, NextAuth.js
456
- - Analyzes existing auth patterns
457
- - Confirms conventions
458
- - Creates tech-spec.md + epic + 3-5 stories
459
- 3. **Implement:** Load SM → `sprint-planning` → `create-story` → `story-context`
460
- Load DEV → `dev-story` for each story
461
- 4. **Review:** Load DEV → `code-review`
462
-
463
- **Time:** 1-3 days
464
-
465
- ---
466
-
467
- ### Scenario 3: Feature Set (BMad Method)
468
-
469
- **Situation:** Add user dashboard with analytics, preferences, activity
470
-
471
- **Track:** BMad Method
472
-
473
- **Workflow:**
474
-
475
- 1. **Document:** Run `document-project` (Deep scan) - Critical for understanding existing UI patterns
476
- 2. **Analyze:** Load Analyst → `research` (if evaluating analytics libraries)
477
- 3. **Plan:** Load PM → `prd`
478
- 4. **Solution:** Load Architect → `create-architecture` → `solutioning-gate-check`
479
- 5. **Implement:** Sprint-based (10-15 stories)
480
- - Load SM → `sprint-planning`
481
- - Per epic: `epic-tech-context` → stories
482
- - Load DEV → `dev-story` per story
483
- 6. **Review:** Per story completion
484
-
485
- **Time:** 1-2 weeks
486
-
487
- ---
488
-
489
- ### Scenario 4: Complex Integration (BMad Method)
490
-
491
- **Situation:** Add real-time collaboration to document editor
492
-
493
- **Track:** BMad Method
494
-
495
- **Workflow:**
496
-
497
- 1. **Document:** Run `document-project` (Exhaustive if not documented) - **Mandatory**
498
- 2. **Analyze:** Load Analyst → `research` (WebSocket vs WebRTC vs CRDT)
499
- 3. **Plan:** Load PM → `prd`
500
- 4. **Solution:**
501
- - Load Architect → `create-architecture` (extend for real-time layer)
502
- - Load Architect → `solutioning-gate-check`
503
- 5. **Implement:** Sprint-based (20-30 stories)
504
-
505
- **Time:** 3-6 weeks
506
-
507
- ---
508
-
509
- ### Scenario 5: Enterprise Expansion (Enterprise Method)
510
-
511
- **Situation:** Add multi-tenancy to single-tenant SaaS platform
512
-
513
- **Track:** Enterprise Method
514
-
515
- **Workflow:**
516
-
517
- 1. **Document:** Run `document-project` (Exhaustive) - **Mandatory**
518
- 2. **Analyze:** **Required**
519
- - `brainstorm-project` - Explore multi-tenancy approaches
520
- - `research` - Database sharding, tenant isolation, pricing
521
- - `product-brief` - Strategic document
522
- 3. **Plan:** Load PM → `prd` (comprehensive)
523
- 4. **Solution:**
524
- - `create-architecture` - Full system architecture
525
- - `integration-planning` - Phased migration strategy
526
- - `create-architecture` - Multi-tenancy architecture
527
- - `validate-architecture` - External review
528
- - `solutioning-gate-check` - Executive approval
529
- 5. **Implement:** Phased sprint-based (50+ stories)
530
-
531
- **Time:** 3-6 months
532
-
533
- ---
534
-
535
- ## Troubleshooting
536
-
537
- For complete troubleshooting, see [Troubleshooting Guide](./troubleshooting.md).
538
-
539
- ### AI Agents Lack Codebase Understanding
540
-
541
- **Symptoms:**
542
-
543
- - Suggestions don't align with existing patterns
544
- - Ignores available components
545
- - Doesn't reference existing code
546
-
547
- **Solution:**
548
-
549
- 1. Run `document-project` with Deep scan
550
- 2. Verify `docs/index.md` exists
551
- 3. Check documentation completeness
552
- 4. Run deep-dive on specific areas if needed
553
-
554
- ### Have Documentation But Agents Can't Find It
555
-
556
- **Symptoms:**
557
-
558
- - README.md, ARCHITECTURE.md exist
559
- - AI agents ask questions already answered
560
- - No `docs/index.md` file
561
-
562
- **Solution:**
563
-
564
- - **Quick fix:** Run `index-docs` task (2-5min)
565
- - **Comprehensive:** Run `document-project` workflow (10-30min)
566
-
567
- ### Integration Points Unclear
568
-
569
- **Symptoms:**
570
-
571
- - Not sure how to connect new code to existing
572
- - Unsure which files to modify
573
-
574
- **Solution:**
575
-
576
- 1. Ensure `document-project` captured existing architecture
577
- 2. Check `story-context` - should document integration points
578
- 3. In tech-spec/architecture - explicitly document:
579
- - Which existing modules to modify
580
- - What APIs/services to integrate with
581
- - Data flow between new and existing code
582
- 4. Review architecture document for integration guidance
583
-
584
- ### Existing Tests Breaking
585
-
586
- **Symptoms:**
587
-
588
- - Regression test failures
589
- - Previously working functionality broken
590
-
591
- **Solution:**
592
-
593
- 1. Review changes against existing patterns
594
- 2. Verify API contracts unchanged (unless intentionally versioned)
595
- 3. Run `test-review` workflow (TEA agent)
596
- 4. Add regression testing to DoD
597
- 5. Consider feature flags for gradual rollout
598
-
599
- ### Inconsistent Patterns Being Introduced
600
-
601
- **Symptoms:**
602
-
603
- - New code style doesn't match existing
604
- - Different architectural approach
605
-
606
- **Solution:**
607
-
608
- 1. Check convention detection (Quick Spec Flow should detect patterns)
609
- 2. Review documentation - ensure `document-project` captured patterns
610
- 3. Use `story-context` - injects pattern guidance
611
- 4. Add to code-review checklist: pattern adherence, convention consistency
612
- 5. Run retrospective to identify deviations early
613
-
614
- ---
615
-
616
- ## Quick Reference
617
-
618
- ### Commands by Phase
619
-
620
- ```bash
621
- # Phase 0: Documentation (If Needed)
622
- # Analyst agent:
623
- document-project # Create comprehensive docs (10-30min)
624
- # OR load index-docs task for existing docs (2-5min)
625
-
626
- # Phase 1: Analysis (Optional)
627
- # Analyst agent:
628
- brainstorm-project # Explore solutions
629
- research # Gather data
630
- product-brief # Strategic planning (BMad Method/Enterprise only)
631
-
632
- # Phase 2: Planning (Required)
633
- # PM agent:
634
- tech-spec # Quick Flow track
635
- prd # BMad Method/Enterprise tracks
636
-
637
- # Phase 3: Solutioning (BMad Method/Enterprise)
638
- # Architect agent:
639
- create-architecture # Extend architecture
640
- solutioning-gate-check # Final validation
641
-
642
- # Phase 4: Implementation (All Tracks)
643
- # SM agent:
644
- sprint-planning # Initialize tracking
645
- epic-tech-context # Epic context
646
- create-story # Draft story
647
- story-context # Story context
648
-
649
- # DEV agent:
650
- dev-story # Implement
651
- code-review # Review
652
-
653
- # SM agent:
654
- retrospective # After epic
655
- correct-course # If issues
656
- ```
657
-
658
- ### Key Files
659
-
660
- **Phase 0 Output:**
661
-
662
- - `docs/index.md` - **Master AI entry point (REQUIRED)**
663
- - `docs/project-overview.md`
664
- - `docs/architecture.md`
665
- - `docs/source-tree-analysis.md`
666
-
667
- **Phase 1-3 Tracking:**
668
-
669
- - `docs/bmm-workflow-status.yaml` - Progress tracker
670
-
671
- **Phase 2 Planning:**
672
-
673
- - `docs/tech-spec.md` (Quick Flow track)
674
- - `docs/PRD.md` (BMad Method/Enterprise tracks)
675
- - Epic breakdown
676
-
677
- **Phase 3 Architecture:**
678
-
679
- - `docs/architecture.md` (BMad Method/Enterprise tracks)
680
-
681
- **Phase 4 Implementation:**
682
-
683
- - `docs/sprint-status.yaml` - **Single source of truth**
684
- - `docs/epic-{n}-context.md`
685
- - `docs/stories/{epic}-{story}-{title}.md`
686
- - `docs/stories/{epic}-{story}-{title}-context.md`
687
-
688
- ### Decision Flowchart
689
-
690
- ```mermaid
691
- flowchart TD
692
- START([Brownfield Project])
693
- CHECK{Has docs/<br/>index.md?}
694
-
695
- START --> CHECK
696
- CHECK -->|No| DOC[document-project<br/>Deep scan]
697
- CHECK -->|Yes| TRACK{What Track?}
698
-
699
- DOC --> TRACK
700
-
701
- TRACK -->|Quick Flow| TS[tech-spec]
702
- TRACK -->|BMad Method| PRD[prd → architecture]
703
- TRACK -->|Enterprise| PRD2[prd → arch + security/devops]
704
-
705
- TS --> IMPL[Phase 4<br/>Implementation]
706
- PRD --> IMPL
707
- PRD2 --> IMPL
708
-
709
- style START fill:#f9f,stroke:#333,stroke-width:2px
710
- style DOC fill:#ffb,stroke:#333,stroke-width:2px
711
- style IMPL fill:#bfb,stroke:#333,stroke-width:2px
712
- ```
713
-
714
- ---
715
-
716
- ## Prevention Tips
717
-
718
- **Avoid issues before they happen:**
719
-
720
- 1. ✅ **Always run document-project for brownfield** - Saves context issues later
721
- 2. ✅ **Use fresh chats for complex workflows** - Prevents hallucinations
722
- 3. ✅ **Verify files exist before workflows** - Check PRD, epics, stories present
723
- 4. ✅ **Read agent menu first** - Confirm agent has the workflow
724
- 5. ✅ **Start with simpler track if unsure** - Easy to upgrade (Quick Flow → BMad Method)
725
- 6. ✅ **Keep status files updated** - Manual updates when needed
726
- 7. ✅ **Run retrospectives after epics** - Catch issues early
727
- 8. ✅ **Follow phase sequence** - Don't skip required phases
728
-
729
- ---
730
-
731
- ## Related Documentation
732
-
733
- - **[Scale Adaptive System](./scale-adaptive-system.md)** - Understanding tracks and complexity
734
- - **[Quick Spec Flow](./quick-spec-flow.md)** - Fast-track for Quick Flow
735
- - **[Quick Start Guide](./quick-start.md)** - Getting started with BMM
736
- - **[Glossary](./glossary.md)** - Key terminology
737
- - **[FAQ](./faq.md)** - Common questions
738
- - **[Troubleshooting](./troubleshooting.md)** - Problem resolution
739
- - **[Workflows Guide](../workflows/README.md)** - Complete workflow reference
740
-
741
- ---
742
-
743
- ## Support & Resources
744
-
745
- **Community:**
746
-
747
- - [Discord](https://discord.gg/gk8jAdXWmj) - #general-dev, #bugs-issues
748
- - [GitHub Issues](https://github.com/bmad-code-org/BMAD-METHOD/issues)
749
- - [YouTube Channel](https://www.youtube.com/@BMadCode)
750
-
751
- **Documentation:**
752
-
753
- - [BMM Workflows Guide](../workflows/README.md)
754
- - [Test Architect Guide](../testarch/README.md)
755
- - [BMM Module README](../README.md)
756
-
757
- ---
758
-
759
- _Brownfield development is about understanding and respecting what exists while thoughtfully extending it._