bmad-method 5.0.0 → 5.1.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 (329) hide show
  1. package/.github/FUNDING.yaml +15 -0
  2. package/.github/ISSUE_TEMPLATE/bug_report.md +32 -0
  3. package/.github/ISSUE_TEMPLATE/feature_request.md +22 -0
  4. package/.github/workflows/discord.yaml +25 -0
  5. package/.github/workflows/format-check.yaml +42 -0
  6. package/.github/workflows/manual-release.yaml +173 -0
  7. package/.husky/pre-commit +3 -2
  8. package/.vscode/settings.json +67 -74
  9. package/CHANGELOG.md +564 -19
  10. package/CONTRIBUTING.md +168 -5
  11. package/LICENSE +1 -1
  12. package/README.md +146 -218
  13. package/bmad-core/agent-teams/team-all.yaml +14 -0
  14. package/bmad-core/agent-teams/team-fullstack.yaml +18 -0
  15. package/bmad-core/agent-teams/team-ide-minimal.yaml +10 -0
  16. package/bmad-core/agent-teams/team-no-ui.yaml +13 -0
  17. package/bmad-core/agents/analyst.md +81 -0
  18. package/bmad-core/agents/architect.md +83 -0
  19. package/bmad-core/agents/bmad-master.md +107 -0
  20. package/bmad-core/agents/bmad-orchestrator.md +149 -0
  21. package/bmad-core/agents/dev.md +75 -0
  22. package/bmad-core/agents/pm.md +81 -0
  23. package/bmad-core/agents/po.md +76 -0
  24. package/bmad-core/agents/qa.md +88 -0
  25. package/bmad-core/agents/sm.md +62 -0
  26. package/bmad-core/agents/ux-expert.md +66 -0
  27. package/{.bmad-core → bmad-core}/checklists/architect-checklist.md +0 -5
  28. package/{.bmad-core → bmad-core}/checklists/change-checklist.md +2 -2
  29. package/{.bmad-core → bmad-core}/checklists/pm-checklist.md +0 -5
  30. package/{.bmad-core → bmad-core}/checklists/po-master-checklist.md +0 -9
  31. package/{.bmad-core → bmad-core}/checklists/story-dod-checklist.md +0 -7
  32. package/{.bmad-core → bmad-core}/checklists/story-draft-checklist.md +1 -4
  33. package/bmad-core/core-config.yaml +20 -0
  34. package/bmad-core/data/bmad-kb.md +806 -0
  35. package/bmad-core/data/brainstorming-techniques.md +36 -0
  36. package/bmad-core/data/elicitation-methods.md +154 -0
  37. package/bmad-core/data/test-levels-framework.md +146 -0
  38. package/bmad-core/data/test-priorities-matrix.md +172 -0
  39. package/bmad-core/tasks/advanced-elicitation.md +117 -0
  40. package/{.bmad-core → bmad-core}/tasks/correct-course.md +9 -12
  41. package/bmad-core/tasks/create-brownfield-story.md +312 -0
  42. package/{.bmad-core → bmad-core}/tasks/create-deep-research-prompt.md +4 -27
  43. package/bmad-core/tasks/create-next-story.md +112 -0
  44. package/bmad-core/tasks/document-project.md +343 -0
  45. package/bmad-core/tasks/facilitate-brainstorming-session.md +136 -0
  46. package/bmad-core/tasks/generate-ai-frontend-prompt.md +51 -0
  47. package/{.bmad-core → bmad-core}/tasks/index-docs.md +3 -13
  48. package/bmad-core/tasks/kb-mode-interaction.md +75 -0
  49. package/bmad-core/tasks/nfr-assess.md +343 -0
  50. package/bmad-core/tasks/qa-gate.md +159 -0
  51. package/bmad-core/tasks/review-story.md +314 -0
  52. package/bmad-core/tasks/risk-profile.md +353 -0
  53. package/{.bmad-core → bmad-core}/tasks/shard-doc.md +27 -15
  54. package/bmad-core/tasks/test-design.md +174 -0
  55. package/bmad-core/tasks/trace-requirements.md +264 -0
  56. package/bmad-core/tasks/validate-next-story.md +134 -0
  57. package/bmad-core/templates/architecture-tmpl.yaml +650 -0
  58. package/bmad-core/templates/brainstorming-output-tmpl.yaml +156 -0
  59. package/bmad-core/templates/brownfield-architecture-tmpl.yaml +476 -0
  60. package/bmad-core/templates/brownfield-prd-tmpl.yaml +280 -0
  61. package/bmad-core/templates/competitor-analysis-tmpl.yaml +306 -0
  62. package/bmad-core/templates/front-end-architecture-tmpl.yaml +218 -0
  63. package/bmad-core/templates/front-end-spec-tmpl.yaml +349 -0
  64. package/bmad-core/templates/fullstack-architecture-tmpl.yaml +823 -0
  65. package/bmad-core/templates/market-research-tmpl.yaml +252 -0
  66. package/bmad-core/templates/prd-tmpl.yaml +202 -0
  67. package/bmad-core/templates/project-brief-tmpl.yaml +221 -0
  68. package/bmad-core/templates/qa-gate-tmpl.yaml +102 -0
  69. package/bmad-core/templates/story-tmpl.yaml +137 -0
  70. package/bmad-core/workflows/brownfield-fullstack.yaml +297 -0
  71. package/bmad-core/workflows/brownfield-service.yaml +187 -0
  72. package/bmad-core/workflows/brownfield-ui.yaml +197 -0
  73. package/{.bmad-core/workflows/greenfield-fullstack.yml → bmad-core/workflows/greenfield-fullstack.yaml} +140 -77
  74. package/bmad-core/workflows/greenfield-service.yaml +206 -0
  75. package/bmad-core/workflows/greenfield-ui.yaml +235 -0
  76. package/common/tasks/create-doc.md +101 -0
  77. package/{.bmad-core → common}/tasks/execute-checklist.md +2 -13
  78. package/common/utils/bmad-doc-template.md +325 -0
  79. package/common/utils/workflow-management.md +69 -0
  80. package/dist/agents/analyst.txt +2889 -0
  81. package/dist/agents/architect.txt +3552 -0
  82. package/dist/agents/bmad-master.txt +8769 -0
  83. package/dist/agents/bmad-orchestrator.txt +1513 -0
  84. package/dist/agents/dev.txt +414 -0
  85. package/{.bmad-core/web-bundles → dist}/agents/pm.txt +668 -1119
  86. package/{.bmad-core/web-bundles → dist}/agents/po.txt +341 -484
  87. package/dist/agents/qa.txt +1987 -0
  88. package/dist/agents/sm.txt +658 -0
  89. package/dist/agents/ux-expert.txt +694 -0
  90. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-designer.txt +2371 -0
  91. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-developer.txt +1620 -0
  92. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-sm.txt +815 -0
  93. package/dist/expansion-packs/bmad-2d-phaser-game-dev/teams/phaser-2d-nodejs-game-team.txt +10952 -0
  94. package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-architect.txt +4012 -0
  95. package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-designer.txt +3698 -0
  96. package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-developer.txt +450 -0
  97. package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-sm.txt +973 -0
  98. package/dist/expansion-packs/bmad-2d-unity-game-dev/teams/unity-2d-game-team.txt +15376 -0
  99. package/dist/expansion-packs/bmad-infrastructure-devops/agents/infra-devops-platform.txt +2075 -0
  100. package/dist/teams/team-all.txt +12682 -0
  101. package/dist/teams/team-fullstack.txt +10421 -0
  102. package/dist/teams/team-ide-minimal.txt +5103 -0
  103. package/dist/teams/team-no-ui.txt +8980 -0
  104. package/docs/GUIDING-PRINCIPLES.md +91 -0
  105. package/docs/core-architecture.md +219 -0
  106. package/docs/enhanced-ide-development-workflow.md +248 -0
  107. package/docs/expansion-packs.md +280 -0
  108. package/docs/how-to-contribute-with-pull-requests.md +158 -0
  109. package/docs/user-guide.md +504 -0
  110. package/docs/versioning-and-releases.md +8 -16
  111. package/docs/versions.md +4 -5
  112. package/docs/working-in-the-brownfield.md +597 -0
  113. package/eslint.config.mjs +119 -0
  114. package/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/Complete AI Agent System - Flowchart.svg +102 -0
  115. package/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/PART 1 - Google Cloud Vertex AI Setup Documentation/1.1 Google Cloud Project Setup/1.1.1 - Initial Project Configuration - bash copy.txt +13 -0
  116. package/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/PART 1 - Google Cloud Vertex AI Setup Documentation/1.1 Google Cloud Project Setup/1.1.1 - Initial Project Configuration - bash.txt +13 -0
  117. package/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/PART 1 - Google Cloud Vertex AI Setup Documentation/1.2 Agent Development Kit Installation/1.2.2 - Basic Project Structure - txt.txt +25 -0
  118. package/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/PART 1 - Google Cloud Vertex AI Setup Documentation/1.3 Core Configuration Files/1.3.1 - settings.py +34 -0
  119. package/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/PART 1 - Google Cloud Vertex AI Setup Documentation/1.3 Core Configuration Files/1.3.2 - main.py - Base Application.py +70 -0
  120. package/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/PART 1 - Google Cloud Vertex AI Setup Documentation/1.4 Deployment Configuration/1.4.2 - cloudbuild.yaml +26 -0
  121. package/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/README.md +109 -0
  122. package/expansion-packs/README.md +2 -112
  123. package/expansion-packs/bmad-2d-phaser-game-dev/agent-teams/phaser-2d-nodejs-game-team.yaml +13 -0
  124. package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-designer.md +71 -0
  125. package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-developer.md +78 -0
  126. package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-sm.md +64 -0
  127. package/expansion-packs/bmad-2d-phaser-game-dev/checklists/game-design-checklist.md +201 -0
  128. package/expansion-packs/bmad-2d-phaser-game-dev/checklists/game-story-dod-checklist.md +160 -0
  129. package/expansion-packs/bmad-2d-phaser-game-dev/config.yaml +8 -0
  130. package/expansion-packs/bmad-2d-phaser-game-dev/data/bmad-kb.md +250 -0
  131. package/expansion-packs/bmad-2d-phaser-game-dev/data/development-guidelines.md +647 -0
  132. package/expansion-packs/bmad-2d-phaser-game-dev/tasks/advanced-elicitation.md +110 -0
  133. package/expansion-packs/bmad-2d-phaser-game-dev/tasks/create-game-story.md +216 -0
  134. package/expansion-packs/bmad-2d-phaser-game-dev/tasks/game-design-brainstorming.md +290 -0
  135. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-architecture-tmpl.yaml +613 -0
  136. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-brief-tmpl.yaml +356 -0
  137. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-design-doc-tmpl.yaml +343 -0
  138. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-story-tmpl.yaml +253 -0
  139. package/expansion-packs/bmad-2d-phaser-game-dev/templates/level-design-doc-tmpl.yaml +484 -0
  140. package/expansion-packs/bmad-2d-phaser-game-dev/workflows/game-dev-greenfield.yaml +183 -0
  141. package/expansion-packs/bmad-2d-phaser-game-dev/workflows/game-prototype.yaml +175 -0
  142. package/expansion-packs/bmad-2d-unity-game-dev/agent-teams/unity-2d-game-team.yaml +14 -0
  143. package/expansion-packs/bmad-2d-unity-game-dev/agents/game-architect.md +80 -0
  144. package/expansion-packs/bmad-2d-unity-game-dev/agents/game-designer.md +77 -0
  145. package/expansion-packs/bmad-2d-unity-game-dev/agents/game-developer.md +78 -0
  146. package/expansion-packs/bmad-2d-unity-game-dev/agents/game-sm.md +65 -0
  147. package/expansion-packs/bmad-2d-unity-game-dev/checklists/game-architect-checklist.md +391 -0
  148. package/expansion-packs/bmad-2d-unity-game-dev/checklists/game-change-checklist.md +203 -0
  149. package/expansion-packs/bmad-2d-unity-game-dev/checklists/game-design-checklist.md +201 -0
  150. package/expansion-packs/bmad-2d-unity-game-dev/checklists/game-story-dod-checklist.md +124 -0
  151. package/expansion-packs/bmad-2d-unity-game-dev/config.yaml +6 -0
  152. package/expansion-packs/bmad-2d-unity-game-dev/data/bmad-kb.md +769 -0
  153. package/expansion-packs/bmad-2d-unity-game-dev/data/development-guidelines.md +586 -0
  154. package/expansion-packs/bmad-2d-unity-game-dev/tasks/advanced-elicitation.md +110 -0
  155. package/expansion-packs/bmad-2d-unity-game-dev/tasks/correct-course-game.md +141 -0
  156. package/expansion-packs/bmad-2d-unity-game-dev/tasks/create-game-story.md +184 -0
  157. package/expansion-packs/bmad-2d-unity-game-dev/tasks/game-design-brainstorming.md +290 -0
  158. package/expansion-packs/bmad-2d-unity-game-dev/tasks/validate-game-story.md +200 -0
  159. package/expansion-packs/bmad-2d-unity-game-dev/templates/game-architecture-tmpl.yaml +1030 -0
  160. package/expansion-packs/bmad-2d-unity-game-dev/templates/game-brief-tmpl.yaml +356 -0
  161. package/expansion-packs/bmad-2d-unity-game-dev/templates/game-design-doc-tmpl.yaml +705 -0
  162. package/expansion-packs/bmad-2d-unity-game-dev/templates/game-story-tmpl.yaml +256 -0
  163. package/expansion-packs/bmad-2d-unity-game-dev/templates/level-design-doc-tmpl.yaml +484 -0
  164. package/expansion-packs/bmad-2d-unity-game-dev/workflows/game-dev-greenfield.yaml +183 -0
  165. package/expansion-packs/bmad-2d-unity-game-dev/workflows/game-prototype.yaml +175 -0
  166. package/expansion-packs/{infrastructure-devops → bmad-infrastructure-devops}/README.md +9 -9
  167. package/expansion-packs/{infrastructure-devops → bmad-infrastructure-devops}/agents/infra-devops-platform.md +30 -18
  168. package/expansion-packs/{infrastructure-devops → bmad-infrastructure-devops}/checklists/infrastructure-checklist.md +1 -1
  169. package/expansion-packs/bmad-infrastructure-devops/config.yaml +9 -0
  170. package/expansion-packs/bmad-infrastructure-devops/data/bmad-kb.md +305 -0
  171. package/expansion-packs/{infrastructure-devops → bmad-infrastructure-devops}/tasks/review-infrastructure.md +4 -5
  172. package/expansion-packs/{infrastructure-devops → bmad-infrastructure-devops}/tasks/validate-infrastructure.md +4 -5
  173. package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-architecture-tmpl.yaml +424 -0
  174. package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-platform-from-arch-tmpl.yaml +629 -0
  175. package/package.json +74 -42
  176. package/prettier.config.mjs +32 -0
  177. package/release_notes.md +25 -0
  178. package/tools/bmad-npx-wrapper.js +13 -15
  179. package/tools/builders/web-builder.js +544 -15
  180. package/tools/bump-all-versions.js +115 -0
  181. package/tools/bump-expansion-version.js +90 -0
  182. package/tools/cli.js +65 -32
  183. package/tools/flattener/aggregate.js +76 -0
  184. package/tools/flattener/binary.js +80 -0
  185. package/tools/flattener/discovery.js +71 -0
  186. package/tools/flattener/files.js +35 -0
  187. package/tools/flattener/ignoreRules.js +176 -0
  188. package/tools/flattener/main.js +573 -0
  189. package/tools/flattener/projectRoot.js +206 -0
  190. package/tools/flattener/prompts.js +44 -0
  191. package/tools/flattener/stats.helpers.js +395 -0
  192. package/tools/flattener/stats.js +80 -0
  193. package/tools/flattener/test-matrix.js +413 -0
  194. package/tools/flattener/xml.js +88 -0
  195. package/tools/installer/README.md +3 -53
  196. package/tools/installer/bin/bmad.js +475 -90
  197. package/tools/installer/config/ide-agent-config.yaml +58 -0
  198. package/tools/installer/config/install.config.yaml +123 -0
  199. package/tools/installer/lib/config-loader.js +208 -40
  200. package/tools/installer/lib/file-manager.js +258 -55
  201. package/tools/installer/lib/ide-base-setup.js +228 -0
  202. package/tools/installer/lib/ide-setup.js +1265 -253
  203. package/tools/installer/lib/installer.js +1651 -310
  204. package/tools/installer/lib/memory-profiler.js +225 -0
  205. package/tools/installer/lib/module-manager.js +114 -0
  206. package/tools/installer/lib/resource-locator.js +308 -0
  207. package/tools/installer/package.json +25 -24
  208. package/tools/lib/dependency-resolver.js +44 -48
  209. package/tools/lib/yaml-utils.js +29 -0
  210. package/tools/md-assets/web-agent-startup-instructions.md +39 -0
  211. package/tools/preview-release-notes.js +66 -0
  212. package/tools/shared/bannerArt.js +105 -0
  213. package/tools/sync-installer-version.js +7 -9
  214. package/tools/update-expansion-version.js +53 -0
  215. package/tools/upgraders/v3-to-v4-upgrader.js +221 -320
  216. package/tools/version-bump.js +42 -27
  217. package/tools/yaml-format.js +57 -44
  218. package/.bmad-core/agent-teams/team-all.yml +0 -16
  219. package/.bmad-core/agent-teams/team-fullstack.yml +0 -26
  220. package/.bmad-core/agent-teams/team-no-ui.yml +0 -15
  221. package/.bmad-core/agents/analyst.md +0 -59
  222. package/.bmad-core/agents/architect.md +0 -66
  223. package/.bmad-core/agents/bmad-master.md +0 -104
  224. package/.bmad-core/agents/bmad-orchestrator.md +0 -81
  225. package/.bmad-core/agents/dev.md +0 -70
  226. package/.bmad-core/agents/pm.md +0 -59
  227. package/.bmad-core/agents/po.md +0 -60
  228. package/.bmad-core/agents/qa.md +0 -52
  229. package/.bmad-core/agents/sm.md +0 -55
  230. package/.bmad-core/agents/ux-expert.md +0 -66
  231. package/.bmad-core/data/bmad-kb.md +0 -47
  232. package/.bmad-core/schemas/agent-team-schema.yml +0 -153
  233. package/.bmad-core/tasks/advanced-elicitation.md +0 -92
  234. package/.bmad-core/tasks/brainstorming-techniques.md +0 -238
  235. package/.bmad-core/tasks/core-dump.md +0 -74
  236. package/.bmad-core/tasks/create-agent.md +0 -202
  237. package/.bmad-core/tasks/create-doc.md +0 -74
  238. package/.bmad-core/tasks/create-expansion-pack.md +0 -425
  239. package/.bmad-core/tasks/create-next-story.md +0 -206
  240. package/.bmad-core/tasks/create-team.md +0 -229
  241. package/.bmad-core/tasks/doc-migration-task.md +0 -143
  242. package/.bmad-core/tasks/generate-ai-frontend-prompt.md +0 -58
  243. package/.bmad-core/templates/agent-tmpl.md +0 -58
  244. package/.bmad-core/templates/architecture-tmpl.md +0 -771
  245. package/.bmad-core/templates/brownfield-architecture-tmpl.md +0 -542
  246. package/.bmad-core/templates/brownfield-prd-tmpl.md +0 -240
  247. package/.bmad-core/templates/competitor-analysis-tmpl.md +0 -289
  248. package/.bmad-core/templates/expansion-pack-plan-tmpl.md +0 -91
  249. package/.bmad-core/templates/front-end-architecture-tmpl.md +0 -173
  250. package/.bmad-core/templates/front-end-spec-tmpl.md +0 -411
  251. package/.bmad-core/templates/fullstack-architecture-tmpl.md +0 -1016
  252. package/.bmad-core/templates/market-research-tmpl.md +0 -261
  253. package/.bmad-core/templates/prd-tmpl.md +0 -200
  254. package/.bmad-core/templates/project-brief-tmpl.md +0 -228
  255. package/.bmad-core/templates/simple-project-prd-tmpl.md +0 -461
  256. package/.bmad-core/templates/story-tmpl.md +0 -61
  257. package/.bmad-core/templates/web-agent-startup-instructions-template.md +0 -39
  258. package/.bmad-core/utils/agent-switcher.ide.md +0 -112
  259. package/.bmad-core/utils/template-format.md +0 -26
  260. package/.bmad-core/utils/workflow-management.md +0 -224
  261. package/.bmad-core/web-bundles/agents/analyst.txt +0 -1684
  262. package/.bmad-core/web-bundles/agents/architect.txt +0 -3584
  263. package/.bmad-core/web-bundles/agents/bmad-master.txt +0 -9491
  264. package/.bmad-core/web-bundles/agents/bmad-orchestrator.txt +0 -1466
  265. package/.bmad-core/web-bundles/agents/dev.txt +0 -316
  266. package/.bmad-core/web-bundles/agents/qa.txt +0 -129
  267. package/.bmad-core/web-bundles/agents/sm.txt +0 -658
  268. package/.bmad-core/web-bundles/agents/ux-expert.txt +0 -1099
  269. package/.bmad-core/web-bundles/teams/team-all.txt +0 -10757
  270. package/.bmad-core/web-bundles/teams/team-fullstack.txt +0 -10109
  271. package/.bmad-core/web-bundles/teams/team-no-ui.txt +0 -8950
  272. package/.bmad-core/workflows/brownfield-fullstack.yml +0 -116
  273. package/.bmad-core/workflows/brownfield-service.yml +0 -117
  274. package/.bmad-core/workflows/brownfield-ui.yml +0 -127
  275. package/.bmad-core/workflows/greenfield-service.yml +0 -143
  276. package/.bmad-core/workflows/greenfield-ui.yml +0 -172
  277. package/.claude/commands/analyst.md +0 -63
  278. package/.claude/commands/architect.md +0 -70
  279. package/.claude/commands/bmad-master.md +0 -108
  280. package/.claude/commands/bmad-orchestrator.md +0 -85
  281. package/.claude/commands/dev.md +0 -74
  282. package/.claude/commands/pm.md +0 -63
  283. package/.claude/commands/po.md +0 -64
  284. package/.claude/commands/qa.md +0 -56
  285. package/.claude/commands/sm.md +0 -59
  286. package/.claude/commands/ux-expert.md +0 -70
  287. package/.cursor/rules/analyst.mdc +0 -77
  288. package/.cursor/rules/architect.mdc +0 -84
  289. package/.cursor/rules/bmad-master.mdc +0 -122
  290. package/.cursor/rules/bmad-orchestrator.mdc +0 -99
  291. package/.cursor/rules/dev.mdc +0 -88
  292. package/.cursor/rules/pm.mdc +0 -77
  293. package/.cursor/rules/po.mdc +0 -78
  294. package/.cursor/rules/qa.mdc +0 -70
  295. package/.cursor/rules/sm.mdc +0 -73
  296. package/.cursor/rules/ux-expert.mdc +0 -84
  297. package/.github/workflows/release.yml +0 -59
  298. package/.releaserc.json +0 -18
  299. package/.roo/.roomodes +0 -95
  300. package/.roo/README.md +0 -38
  301. package/.vscode/extensions.json +0 -6
  302. package/.windsurf/rules/analyst.md +0 -71
  303. package/.windsurf/rules/architect.md +0 -78
  304. package/.windsurf/rules/bmad-master.md +0 -116
  305. package/.windsurf/rules/bmad-orchestrator.md +0 -93
  306. package/.windsurf/rules/dev.md +0 -82
  307. package/.windsurf/rules/pm.md +0 -71
  308. package/.windsurf/rules/po.md +0 -72
  309. package/.windsurf/rules/qa.md +0 -64
  310. package/.windsurf/rules/sm.md +0 -67
  311. package/.windsurf/rules/ux-expert.md +0 -78
  312. package/docs/bmad-workflow-guide.md +0 -161
  313. package/docs/claude-code-guide.md +0 -119
  314. package/docs/cursor-guide.md +0 -127
  315. package/docs/roo-code-guide.md +0 -140
  316. package/docs/sample-output/simple-fullstack-greenfield/prd.md +0 -42
  317. package/docs/windsurf-guide.md +0 -127
  318. package/expansion-packs/infrastructure-devops/manifest.yml +0 -38
  319. package/expansion-packs/infrastructure-devops/templates/infrastructure-architecture-tmpl.md +0 -415
  320. package/expansion-packs/infrastructure-devops/templates/infrastructure-platform-from-arch-tmpl.md +0 -0
  321. package/tools/installer/config/install.config.yml +0 -139
  322. package/tools/installer/package-lock.json +0 -906
  323. package/tools/installer/templates/claude-commands.md +0 -7
  324. package/tools/installer/templates/cursor-rules.md +0 -22
  325. package/tools/installer/templates/windsurf-rules.md +0 -22
  326. package/tools/semantic-release-sync-installer.js +0 -31
  327. /package/{.bmad-core → bmad-core}/data/technical-preferences.md +0 -0
  328. /package/{.bmad-core → bmad-core}/tasks/brownfield-create-epic.md +0 -0
  329. /package/{.bmad-core → bmad-core}/tasks/brownfield-create-story.md +0 -0
@@ -0,0 +1,597 @@
1
+ # Working in the Brownfield: A Complete Guide
2
+
3
+ > **HIGHLY RECOMMENDED: Use Gemini Web or Gemini CLI for Brownfield Documentation Generation!**
4
+ >
5
+ > Gemini Web's 1M+ token context window or Gemini CLI (when it's working) can analyze your ENTIRE codebase, or critical sections of it, all at once (obviously within reason):
6
+ >
7
+ > - Upload via GitHub URL or use gemini cli in the project folder
8
+ > - If working in the web: use `npx bmad-method flatten` to flatten your project into a single file, then upload that file to your web agent.
9
+
10
+ ## What is Brownfield Development?
11
+
12
+ Brownfield development refers to adding features, fixing bugs, or modernizing existing software projects. Unlike greenfield (new) projects, brownfield work requires understanding existing code, respecting constraints, and ensuring new changes integrate seamlessly without breaking existing functionality.
13
+
14
+ ## When to Use BMad for Brownfield
15
+
16
+ - Add significant new features to existing applications
17
+ - Modernize legacy codebases
18
+ - Integrate new technologies or services
19
+ - Refactor complex systems
20
+ - Fix bugs that require architectural understanding
21
+ - Document undocumented systems
22
+
23
+ ## When NOT to use a Brownfield Flow
24
+
25
+ If you have just completed an MVP with BMad, and you want to continue with post-MVP, its easier to just talk to the PM and ask it to work with you to create a new epic to add into the PRD, shard out the epic, update any architecture documents with the architect, and just go from there.
26
+
27
+ ## The Complete Brownfield Workflow
28
+
29
+ 1. **Follow the [<ins>User Guide - Installation</ins>](user-guide.md#installation) steps to setup your agent in the web.**
30
+ 2. **Generate a 'flattened' single file of your entire codebase** run: `npx bmad-method flatten`
31
+
32
+ ### Choose Your Approach
33
+
34
+ #### Approach A: PRD-First (Recommended if adding very large and complex new features, single or multiple epics or massive changes)
35
+
36
+ **Best for**: Large codebases, monorepos, or when you know exactly what you want to build
37
+
38
+ 1. **Create PRD First** to define requirements
39
+ 2. **Document only relevant areas** based on PRD needs
40
+ 3. **More efficient** - avoids documenting unused code
41
+
42
+ #### Approach B: Document-First (Good for Smaller Projects)
43
+
44
+ **Best for**: Smaller codebases, unknown systems, or exploratory changes
45
+
46
+ 1. **Document entire system** first
47
+ 2. **Create PRD** with full context
48
+ 3. **More thorough** - captures everything
49
+
50
+ ### Approach A: PRD-First Workflow (Recommended)
51
+
52
+ #### Phase 1: Define Requirements First
53
+
54
+ **In Gemini Web (with your flattened-codebase.xml uploaded):**
55
+
56
+ ```bash
57
+ @pm
58
+ *create-brownfield-prd
59
+ ```
60
+
61
+ The PM will:
62
+
63
+ - **Ask about your enhancement** requirements
64
+ - **Explore the codebase** to understand current state
65
+ - **Identify affected areas** that need documentation
66
+ - **Create focused PRD** with clear scope
67
+
68
+ **Key Advantage**: The PRD identifies which parts of your monorepo/large codebase actually need documentation!
69
+
70
+ #### Phase 2: Focused Documentation
71
+
72
+ **Still in Gemini Web, now with PRD context:**
73
+
74
+ ```bash
75
+ @architect
76
+ *document-project
77
+ ```
78
+
79
+ The architect will:
80
+
81
+ - **Ask about your focus** if no PRD was provided
82
+ - **Offer options**: Create PRD, provide requirements, or describe the enhancement
83
+ - **Reference the PRD/description** to understand scope
84
+ - **Focus on relevant modules** identified in PRD or your description
85
+ - **Skip unrelated areas** to keep docs lean
86
+ - **Generate ONE architecture document** for all environments
87
+
88
+ The architect creates:
89
+
90
+ - **One comprehensive architecture document** following fullstack-architecture template
91
+ - **Covers all system aspects** in a single file
92
+ - **Easy to copy and save** as `docs/architecture.md`
93
+ - **Can be sharded later** in IDE if desired
94
+
95
+ For example, if you say "Add payment processing to user service":
96
+
97
+ - Documents only: user service, API endpoints, database schemas, payment integrations
98
+ - Creates focused source tree showing only payment-related code paths
99
+ - Skips: admin panels, reporting modules, unrelated microservices
100
+
101
+ ### Approach B: Document-First Workflow
102
+
103
+ #### Phase 1: Document the Existing System
104
+
105
+ **Best Approach - Gemini Web with 1M+ Context**:
106
+
107
+ 1. **Go to Gemini Web** (gemini.google.com)
108
+ 2. **Upload your project**:
109
+ - **Option A**: Paste your GitHub repository URL directly
110
+ - **Option B**: Upload your flattened-codebase.xml file
111
+ 3. **Load the architect agent**: Upload `dist/agents/architect.txt`
112
+ 4. **Run documentation**: Type `*document-project`
113
+
114
+ The architect will generate comprehensive documentation of everything.
115
+
116
+ #### Phase 2: Plan Your Enhancement
117
+
118
+ ##### Option A: Full Brownfield Workflow (Recommended for Major Changes)
119
+
120
+ **1. Create Brownfield PRD**:
121
+
122
+ ```bash
123
+ @pm
124
+ *create-brownfield-prd
125
+ ```
126
+
127
+ The PM agent will:
128
+
129
+ - **Analyze existing documentation** from Phase 1
130
+ - **Request specific enhancement details** from you
131
+ - **Assess complexity** and recommend approach
132
+ - **Create epic/story structure** for the enhancement
133
+ - **Identify risks and integration points**
134
+
135
+ **How PM Agent Gets Project Context**:
136
+
137
+ - In Gemini Web: Already has full project context from Phase 1 documentation
138
+ - In IDE: Will ask "Please provide the path to your existing project documentation"
139
+
140
+ **Key Prompts You'll Encounter**:
141
+
142
+ - "What specific enhancement or feature do you want to add?"
143
+ - "Are there any existing systems or APIs this needs to integrate with?"
144
+ - "What are the critical constraints we must respect?"
145
+ - "What is your timeline and team size?"
146
+
147
+ **2. Create Brownfield Architecture**:
148
+
149
+ ```bash
150
+ @architect
151
+ *create-brownfield-architecture
152
+ ```
153
+
154
+ The architect will:
155
+
156
+ - **Review the brownfield PRD**
157
+ - **Design integration strategy**
158
+ - **Plan migration approach** if needed
159
+ - **Identify technical risks**
160
+ - **Define compatibility requirements**
161
+
162
+ ##### Option B: Quick Enhancement (For Focused Changes)
163
+
164
+ **For Single Epic Without Full PRD**:
165
+
166
+ ```bash
167
+ @pm
168
+ *create-brownfield-epic
169
+ ```
170
+
171
+ Use when:
172
+
173
+ - Enhancement is well-defined and isolated
174
+ - Existing documentation is comprehensive
175
+ - Changes don't impact multiple systems
176
+ - You need quick turnaround
177
+
178
+ **For Single Story**:
179
+
180
+ ```bash
181
+ @pm
182
+ *create-brownfield-story
183
+ ```
184
+
185
+ Use when:
186
+
187
+ - Bug fix or tiny feature
188
+ - Very isolated change
189
+ - No architectural impact
190
+ - Clear implementation path
191
+
192
+ ### Phase 3: Validate Planning Artifacts
193
+
194
+ ```bash
195
+ @po
196
+ *execute-checklist-po
197
+ ```
198
+
199
+ The PO ensures:
200
+
201
+ - Compatibility with existing system
202
+ - No breaking changes planned
203
+ - Risk mitigation strategies in place
204
+ - Clear integration approach
205
+
206
+ ### Phase 4: Save and Shard Documents
207
+
208
+ 1. Save your PRD and Architecture as:
209
+ docs/prd.md
210
+ docs/architecture.md
211
+ (Note: You can optionally prefix with 'brownfield-' if managing multiple versions)
212
+ 2. Shard your docs:
213
+ In your IDE
214
+
215
+ ```bash
216
+ @po
217
+ shard docs/prd.md
218
+ ```
219
+
220
+ ```bash
221
+ @po
222
+ shard docs/architecture.md
223
+ ```
224
+
225
+ ### Phase 5: Transition to Development
226
+
227
+ **Follow the [<ins>Enhanced IDE Development Workflow</ins>](enhanced-ide-development-workflow.md)**
228
+
229
+ ## Brownfield Best Practices
230
+
231
+ ### 1. Always Document First
232
+
233
+ Even if you think you know the codebase:
234
+
235
+ - Run `document-project` to capture current state
236
+ - AI agents need this context
237
+ - Discovers undocumented patterns
238
+
239
+ ### 2. Respect Existing Patterns
240
+
241
+ The brownfield templates specifically look for:
242
+
243
+ - Current coding conventions
244
+ - Existing architectural patterns
245
+ - Technology constraints
246
+ - Team preferences
247
+
248
+ ### 3. Plan for Gradual Rollout
249
+
250
+ Brownfield changes should:
251
+
252
+ - Support feature flags
253
+ - Plan rollback strategies
254
+ - Include migration scripts
255
+ - Maintain backwards compatibility
256
+
257
+ ### 4. Test Integration Thoroughly
258
+
259
+ #### Why the Test Architect is Critical for Brownfield
260
+
261
+ In brownfield projects, the Test Architect (Quinn) becomes your safety net against breaking existing functionality. Unlike greenfield where you're building fresh, brownfield requires careful validation that new changes don't destabilize what already works.
262
+
263
+ #### Brownfield-Specific Testing Challenges
264
+
265
+ The Test Architect addresses unique brownfield complexities:
266
+
267
+ | **Challenge** | **How Test Architect Helps** | **Command** |
268
+ | --------------------------- | ------------------------------------------------- | ------------------- |
269
+ | **Regression Risks** | Identifies which existing features might break | `*risk` |
270
+ | **Legacy Dependencies** | Maps integration points and hidden dependencies | `*trace` |
271
+ | **Performance Degradation** | Validates no slowdown in existing flows | `*nfr` |
272
+ | **Coverage Gaps** | Finds untested legacy code that new changes touch | `*design` |
273
+ | **Breaking Changes** | Detects API/contract violations | `*review` |
274
+ | **Migration Safety** | Validates data transformations and rollback plans | `*risk` + `*review` |
275
+
276
+ #### Complete Test Architect Workflow for Brownfield
277
+
278
+ ##### Stage 1: Before Development (Risk & Strategy)
279
+
280
+ **CRITICAL FOR BROWNFIELD - Run These First:**
281
+
282
+ ```bash
283
+ # 1. RISK ASSESSMENT (Run IMMEDIATELY after story creation)
284
+ @qa *risk {brownfield-story}
285
+ # Identifies: Legacy dependencies, breaking changes, integration points
286
+ # Output: docs/qa/assessments/{epic}.{story}-risk-{YYYYMMDD}.md
287
+ # Brownfield Focus:
288
+ # - Regression probability scoring
289
+ # - Affected downstream systems
290
+ # - Data migration risks
291
+ # - Rollback complexity
292
+
293
+ # 2. TEST DESIGN (After risk assessment)
294
+ @qa *design {brownfield-story}
295
+ # Creates: Regression test strategy + new feature tests
296
+ # Output: docs/qa/assessments/{epic}.{story}-test-design-{YYYYMMDD}.md
297
+ # Brownfield Focus:
298
+ # - Existing functionality that needs regression tests
299
+ # - Integration test requirements
300
+ # - Performance benchmarks to maintain
301
+ # - Feature flag test scenarios
302
+ ```
303
+
304
+ ##### Stage 2: During Development (Continuous Validation)
305
+
306
+ **Monitor Integration Health While Coding:**
307
+
308
+ ```bash
309
+ # 3. REQUIREMENTS TRACING (Mid-development checkpoint)
310
+ @qa *trace {brownfield-story}
311
+ # Maps: New requirements + existing functionality preservation
312
+ # Output: docs/qa/assessments/{epic}.{story}-trace-{YYYYMMDD}.md
313
+ # Brownfield Focus:
314
+ # - Existing features that must still work
315
+ # - New/old feature interactions
316
+ # - API contract preservation
317
+ # - Missing regression test coverage
318
+
319
+ # 4. NFR VALIDATION (Before considering "done")
320
+ @qa *nfr {brownfield-story}
321
+ # Validates: Performance, security, reliability unchanged
322
+ # Output: docs/qa/assessments/{epic}.{story}-nfr-{YYYYMMDD}.md
323
+ # Brownfield Focus:
324
+ # - Performance regression detection
325
+ # - Security implications of integrations
326
+ # - Backward compatibility validation
327
+ # - Load/stress on legacy components
328
+ ```
329
+
330
+ ##### Stage 3: Code Review (Deep Integration Analysis)
331
+
332
+ **Comprehensive Brownfield Review:**
333
+
334
+ ```bash
335
+ # 5. FULL REVIEW (When development complete)
336
+ @qa *review {brownfield-story}
337
+ # Performs: Deep analysis + active refactoring
338
+ # Outputs:
339
+ # - QA Results in story file
340
+ # - Gate file: docs/qa/gates/{epic}.{story}-{slug}.yml
341
+ ```
342
+
343
+ The review specifically analyzes:
344
+
345
+ - **API Breaking Changes**: Validates all existing contracts maintained
346
+ - **Data Migration Safety**: Checks transformation logic and rollback procedures
347
+ - **Performance Regression**: Compares against baseline metrics
348
+ - **Integration Points**: Validates all touchpoints with legacy code
349
+ - **Feature Flag Logic**: Ensures proper toggle behavior
350
+ - **Dependency Impacts**: Maps affected downstream systems
351
+
352
+ ##### Stage 4: Post-Review (Gate Updates)
353
+
354
+ ```bash
355
+ # 6. GATE STATUS UPDATE (After addressing issues)
356
+ @qa *gate {brownfield-story}
357
+ # Updates: Quality gate decision after fixes
358
+ # Output: docs/qa/gates/{epic}.{story}-{slug}.yml
359
+ # Brownfield Considerations:
360
+ # - May WAIVE certain legacy code issues
361
+ # - Documents technical debt acceptance
362
+ # - Tracks migration progress
363
+ ```
364
+
365
+ #### Brownfield-Specific Risk Scoring
366
+
367
+ The Test Architect uses enhanced risk scoring for brownfield:
368
+
369
+ | **Risk Category** | **Brownfield Factors** | **Impact on Gate** |
370
+ | ---------------------- | ------------------------------------------ | ------------------- |
371
+ | **Regression Risk** | Number of integration points × Age of code | Score ≥9 = FAIL |
372
+ | **Data Risk** | Migration complexity × Data volume | Score ≥6 = CONCERNS |
373
+ | **Performance Risk** | Current load × Added complexity | Score ≥6 = CONCERNS |
374
+ | **Compatibility Risk** | API consumers × Contract changes | Score ≥9 = FAIL |
375
+
376
+ #### Brownfield Testing Standards
377
+
378
+ Quinn enforces additional standards for brownfield:
379
+
380
+ - **Regression Test Coverage**: Every touched legacy module needs tests
381
+ - **Performance Baselines**: Must maintain or improve current metrics
382
+ - **Rollback Procedures**: Every change needs a rollback plan
383
+ - **Feature Flags**: All risky changes behind toggles
384
+ - **Integration Tests**: Cover all legacy touchpoints
385
+ - **Contract Tests**: Validate API compatibility
386
+ - **Data Validation**: Migration correctness checks
387
+
388
+ #### Quick Reference: Brownfield Test Commands
389
+
390
+ | **Scenario** | **Commands to Run** | **Order** | **Why Critical** |
391
+ | --------------------------------- | ---------------------------------------------------- | ---------- | ----------------------------- |
392
+ | **Adding Feature to Legacy Code** | `*risk` → `*design` → `*trace` → `*review` | Sequential | Map all dependencies first |
393
+ | **API Modification** | `*risk` → `*design` → `*nfr` → `*review` | Sequential | Prevent breaking consumers |
394
+ | **Performance-Critical Change** | `*nfr` early and often → `*review` | Continuous | Catch degradation immediately |
395
+ | **Data Migration** | `*risk` → `*design` → `*trace` → `*review` → `*gate` | Full cycle | Ensure data integrity |
396
+ | **Bug Fix in Complex System** | `*risk` → `*trace` → `*review` | Focused | Prevent side effects |
397
+
398
+ #### Integration with Brownfield Scenarios
399
+
400
+ **Scenario-Specific Guidance:**
401
+
402
+ 1. **Legacy Code Modernization**
403
+ - Start with `*risk` to map all dependencies
404
+ - Use `*design` to plan strangler fig approach
405
+ - Run `*trace` frequently to ensure nothing breaks
406
+ - `*review` with focus on gradual migration
407
+
408
+ 2. **Adding Features to Monolith**
409
+ - `*risk` identifies integration complexity
410
+ - `*design` plans isolation strategies
411
+ - `*nfr` monitors performance impact
412
+ - `*review` validates no monolith degradation
413
+
414
+ 3. **Microservice Extraction**
415
+ - `*risk` maps service boundaries
416
+ - `*trace` ensures functionality preservation
417
+ - `*nfr` validates network overhead acceptable
418
+ - `*gate` documents accepted trade-offs
419
+
420
+ 4. **Database Schema Changes**
421
+ - `*risk` assesses migration complexity
422
+ - `*design` plans backward-compatible approach
423
+ - `*trace` maps all affected queries
424
+ - `*review` validates migration safety
425
+
426
+ ### 5. Communicate Changes
427
+
428
+ Document:
429
+
430
+ - What changed and why
431
+ - Migration instructions
432
+ - New patterns introduced
433
+ - Deprecation notices
434
+
435
+ ## Common Brownfield Scenarios
436
+
437
+ ### Scenario 1: Adding a New Feature
438
+
439
+ 1. Document existing system
440
+ 2. Create brownfield PRD focusing on integration
441
+ 3. **Test Architect Early Involvement**:
442
+ - Run `@qa *risk` on draft stories to identify integration risks
443
+ - Use `@qa *design` to plan regression test strategy
444
+ 4. Architecture emphasizes compatibility
445
+ 5. Stories include integration tasks with test requirements
446
+ 6. **During Development**:
447
+ - Developer runs `@qa *trace` to verify coverage
448
+ - Use `@qa *nfr` to monitor performance impact
449
+ 7. **Review Stage**: `@qa *review` validates integration safety
450
+
451
+ ### Scenario 2: Modernizing Legacy Code
452
+
453
+ 1. Extensive documentation phase
454
+ 2. PRD includes migration strategy
455
+ 3. **Test Architect Strategy Planning**:
456
+ - `@qa *risk` assesses modernization complexity
457
+ - `@qa *design` plans parallel testing approach
458
+ 4. Architecture plans gradual transition (strangler fig pattern)
459
+ 5. Stories follow incremental modernization with:
460
+ - Regression tests for untouched legacy code
461
+ - Integration tests for new/old boundaries
462
+ - Performance benchmarks at each stage
463
+ 6. **Continuous Validation**: Run `@qa *trace` after each increment
464
+ 7. **Gate Management**: Use `@qa *gate` to track technical debt acceptance
465
+
466
+ ### Scenario 3: Bug Fix in Complex System
467
+
468
+ 1. Document relevant subsystems
469
+ 2. Use `create-brownfield-story` for focused fix
470
+ 3. **Test Architect Risk Assessment**: Run `@qa *risk` to identify side effect potential
471
+ 4. Include regression test requirements from `@qa *design` output
472
+ 5. **During Fix**: Use `@qa *trace` to map affected functionality
473
+ 6. **Before Commit**: Run `@qa *review` for comprehensive validation
474
+ 7. Test Architect validates no side effects using:
475
+ - Risk profiling for side effect analysis (probability × impact scoring)
476
+ - Trace matrix to ensure fix doesn't break related features
477
+ - NFR assessment to verify performance/security unchanged
478
+ - Gate decision documents fix safety
479
+
480
+ ### Scenario 4: API Integration
481
+
482
+ 1. Document existing API patterns
483
+ 2. PRD defines integration requirements
484
+ 3. **Test Architect Contract Analysis**:
485
+ - `@qa *risk` identifies breaking change potential
486
+ - `@qa *design` creates contract test strategy
487
+ 4. Architecture ensures consistent patterns
488
+ 5. **API Testing Focus**:
489
+ - Contract tests for backward compatibility
490
+ - Integration tests for new endpoints
491
+ - Performance tests for added load
492
+ 6. Stories include API documentation updates
493
+ 7. **Validation Checkpoints**:
494
+ - `@qa *trace` maps all API consumers
495
+ - `@qa *nfr` validates response times
496
+ - `@qa *review` ensures no breaking changes
497
+ 8. **Gate Decision**: Document any accepted breaking changes with migration path
498
+
499
+ ## Troubleshooting
500
+
501
+ ### "The AI doesn't understand my codebase"
502
+
503
+ **Solution**: Re-run `document-project` with more specific paths to critical files
504
+
505
+ ### "Generated plans don't fit our patterns"
506
+
507
+ **Solution**: Update generated documentation with your specific conventions before planning phase
508
+
509
+ ### "Too much boilerplate for small changes"
510
+
511
+ **Solution**: Use `create-brownfield-story` instead of full workflow
512
+
513
+ ### "Integration points unclear"
514
+
515
+ **Solution**: Provide more context during PRD creation, specifically highlighting integration systems
516
+
517
+ ## Quick Reference
518
+
519
+ ### Brownfield-Specific Commands
520
+
521
+ ```bash
522
+ # Document existing project
523
+ @architect *document-project
524
+
525
+ # Create enhancement PRD
526
+ @pm *create-brownfield-prd
527
+
528
+ # Create architecture with integration focus
529
+ @architect *create-brownfield-architecture
530
+
531
+ # Quick epic creation
532
+ @pm *create-brownfield-epic
533
+
534
+ # Single story creation
535
+ @pm *create-brownfield-story
536
+ ```
537
+
538
+ ### Test Architect Commands for Brownfield
539
+
540
+ Note: Short forms shown below. Full commands: `*risk-profile`, `*test-design`, `*nfr-assess`, `*trace-requirements`
541
+
542
+ ```bash
543
+ # BEFORE DEVELOPMENT (Planning)
544
+ @qa *risk {story} # Assess regression & integration risks
545
+ @qa *design {story} # Plan regression + new feature tests
546
+
547
+ # DURING DEVELOPMENT (Validation)
548
+ @qa *trace {story} # Verify coverage of old + new
549
+ @qa *nfr {story} # Check performance degradation
550
+
551
+ # AFTER DEVELOPMENT (Review)
552
+ @qa *review {story} # Deep integration analysis
553
+ @qa *gate {story} # Update quality decision
554
+ ```
555
+
556
+ ### Decision Tree
557
+
558
+ ```text
559
+ Do you have a large codebase or monorepo?
560
+ ├─ Yes → PRD-First Approach
561
+ │ └─ Create PRD → Document only affected areas
562
+ └─ No → Is the codebase well-known to you?
563
+ ├─ Yes → PRD-First Approach
564
+ └─ No → Document-First Approach
565
+
566
+ Is this a major enhancement affecting multiple systems?
567
+ ├─ Yes → Full Brownfield Workflow
568
+ │ └─ ALWAYS run Test Architect *risk + *design first
569
+ └─ No → Is this more than a simple bug fix?
570
+ ├─ Yes → *create-brownfield-epic
571
+ │ └─ Run Test Architect *risk for integration points
572
+ └─ No → *create-brownfield-story
573
+ └─ Still run *risk if touching critical paths
574
+
575
+ Does the change touch legacy code?
576
+ ├─ Yes → Test Architect is MANDATORY
577
+ │ ├─ *risk → Identify regression potential
578
+ │ ├─ *design → Plan test coverage
579
+ │ └─ *review → Validate no breakage
580
+ └─ No → Test Architect is RECOMMENDED
581
+ └─ *review → Ensure quality standards
582
+ ```
583
+
584
+ ## Conclusion
585
+
586
+ Brownfield development with BMad Method provides structure and safety when modifying existing systems. The Test Architect becomes your critical safety net, using risk assessment, regression testing, and continuous validation to ensure new changes don't destabilize existing functionality.
587
+
588
+ **The Brownfield Success Formula:**
589
+
590
+ 1. **Document First** - Understand what exists
591
+ 2. **Assess Risk Early** - Use Test Architect `*risk` before coding
592
+ 3. **Plan Test Strategy** - Design regression + new feature tests
593
+ 4. **Validate Continuously** - Check integration health during development
594
+ 5. **Review Comprehensively** - Deep analysis before committing
595
+ 6. **Gate Decisively** - Document quality decisions
596
+
597
+ Remember: **In brownfield, the Test Architect isn't optional - it's your insurance policy against breaking production.**