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
@@ -1,15 +1,15 @@
1
- const fs = require("fs").promises;
2
- const path = require("path");
3
- const { glob } = require("glob");
1
+ const fs = require('node:fs').promises;
2
+ const path = require('node:path');
3
+ const { glob } = require('glob');
4
4
 
5
5
  // Dynamic imports for ES modules
6
6
  let chalk, ora, inquirer;
7
7
 
8
8
  // Initialize ES modules
9
9
  async function initializeModules() {
10
- chalk = (await import("chalk")).default;
11
- ora = (await import("ora")).default;
12
- inquirer = (await import("inquirer")).default;
10
+ chalk = (await import('chalk')).default;
11
+ ora = (await import('ora')).default;
12
+ inquirer = (await import('inquirer')).default;
13
13
  }
14
14
 
15
15
  class V3ToV4Upgrader {
@@ -25,23 +25,15 @@ class V3ToV4Upgrader {
25
25
  process.stdin.resume();
26
26
 
27
27
  // 1. Welcome message
28
- console.log(
29
- chalk.bold("\nWelcome to BMAD-METHOD V3 to V4 Upgrade Tool\n")
30
- );
31
- console.log(
32
- "This tool will help you upgrade your BMAD-METHOD V3 project to V4.\n"
33
- );
34
- console.log(chalk.cyan("What this tool does:"));
35
- console.log("- Creates a backup of your V3 files (.bmad-v3-backup/)");
36
- console.log("- Installs the new V4 .bmad-core structure");
37
- console.log(
38
- "- Preserves your PRD, Architecture, and Stories in the new format\n"
39
- );
40
- console.log(chalk.yellow("What this tool does NOT do:"));
41
- console.log(
42
- "- Modify your document content (use doc-migration-task after upgrade)"
43
- );
44
- console.log("- Touch any files outside bmad-agent/ and docs/\n");
28
+ console.log(chalk.bold('\nWelcome to BMad-Method V3 to V4 Upgrade Tool\n'));
29
+ console.log('This tool will help you upgrade your BMad-Method V3 project to V4.\n');
30
+ console.log(chalk.cyan('What this tool does:'));
31
+ console.log('- Creates a backup of your V3 files (.bmad-v3-backup/)');
32
+ console.log('- Installs the new V4 .bmad-core structure');
33
+ console.log('- Preserves your PRD, Architecture, and Stories in the new format\n');
34
+ console.log(chalk.yellow('What this tool does NOT do:'));
35
+ console.log('- Modify your document content (use doc-migration-task after upgrade)');
36
+ console.log('- Touch any files outside bmad-agent/ and docs/\n');
45
37
 
46
38
  // 2. Get project path
47
39
  const projectPath = await this.getProjectPath(options.projectPath);
@@ -49,15 +41,11 @@ class V3ToV4Upgrader {
49
41
  // 3. Validate V3 structure
50
42
  const validation = await this.validateV3Project(projectPath);
51
43
  if (!validation.isValid) {
52
- console.error(
53
- chalk.red("\nError: This doesn't appear to be a V3 project.")
54
- );
55
- console.error("Expected to find:");
56
- console.error("- bmad-agent/ directory");
57
- console.error("- docs/ directory\n");
58
- console.error(
59
- "Please check you're in the correct directory and try again."
60
- );
44
+ console.error(chalk.red("\nError: This doesn't appear to be a V3 project."));
45
+ console.error('Expected to find:');
46
+ console.error('- bmad-agent/ directory');
47
+ console.error('- docs/ directory\n');
48
+ console.error("Please check you're in the correct directory and try again.");
61
49
  return;
62
50
  }
63
51
 
@@ -68,15 +56,15 @@ class V3ToV4Upgrader {
68
56
  if (!options.dryRun) {
69
57
  const { confirm } = await inquirer.prompt([
70
58
  {
71
- type: "confirm",
72
- name: "confirm",
73
- message: "Continue with upgrade?",
59
+ type: 'confirm',
60
+ name: 'confirm',
61
+ message: 'Continue with upgrade?',
74
62
  default: true,
75
63
  },
76
64
  ]);
77
65
 
78
66
  if (!confirm) {
79
- console.log("Upgrade cancelled.");
67
+ console.log('Upgrade cancelled.');
80
68
  return;
81
69
  }
82
70
  }
@@ -98,7 +86,7 @@ class V3ToV4Upgrader {
98
86
 
99
87
  // 8. Setup IDE
100
88
  if (!options.dryRun) {
101
- await this.setupIDE(projectPath);
89
+ await this.setupIDE(projectPath, options.ides);
102
90
  }
103
91
 
104
92
  // 9. Show completion report
@@ -106,7 +94,7 @@ class V3ToV4Upgrader {
106
94
 
107
95
  process.exit(0);
108
96
  } catch (error) {
109
- console.error(chalk.red("\nUpgrade error:"), error.message);
97
+ console.error(chalk.red('\nUpgrade error:'), error.message);
110
98
  process.exit(1);
111
99
  }
112
100
  }
@@ -118,9 +106,9 @@ class V3ToV4Upgrader {
118
106
 
119
107
  const { projectPath } = await inquirer.prompt([
120
108
  {
121
- type: "input",
122
- name: "projectPath",
123
- message: "Please enter the path to your V3 project:",
109
+ type: 'input',
110
+ name: 'projectPath',
111
+ message: 'Please enter the path to your V3 project:',
124
112
  default: process.cwd(),
125
113
  },
126
114
  ]);
@@ -129,45 +117,45 @@ class V3ToV4Upgrader {
129
117
  }
130
118
 
131
119
  async validateV3Project(projectPath) {
132
- const spinner = ora("Validating project structure...").start();
120
+ const spinner = ora('Validating project structure...').start();
133
121
 
134
122
  try {
135
- const bmadAgentPath = path.join(projectPath, "bmad-agent");
136
- const docsPath = path.join(projectPath, "docs");
123
+ const bmadAgentPath = path.join(projectPath, 'bmad-agent');
124
+ const docsPath = path.join(projectPath, 'docs');
137
125
 
138
126
  const hasBmadAgent = await this.pathExists(bmadAgentPath);
139
127
  const hasDocs = await this.pathExists(docsPath);
140
128
 
141
129
  if (hasBmadAgent) {
142
- spinner.text = "✓ Found bmad-agent/ directory";
143
- console.log(chalk.green("\n✓ Found bmad-agent/ directory"));
130
+ spinner.text = '✓ Found bmad-agent/ directory';
131
+ console.log(chalk.green('\n✓ Found bmad-agent/ directory'));
144
132
  }
145
133
 
146
134
  if (hasDocs) {
147
- console.log(chalk.green("✓ Found docs/ directory"));
135
+ console.log(chalk.green('✓ Found docs/ directory'));
148
136
  }
149
137
 
150
138
  const isValid = hasBmadAgent && hasDocs;
151
139
 
152
140
  if (isValid) {
153
- spinner.succeed("This appears to be a valid V3 project");
141
+ spinner.succeed('This appears to be a valid V3 project');
154
142
  } else {
155
- spinner.fail("Invalid V3 project structure");
143
+ spinner.fail('Invalid V3 project structure');
156
144
  }
157
145
 
158
146
  return { isValid, hasBmadAgent, hasDocs };
159
147
  } catch (error) {
160
- spinner.fail("Validation failed");
148
+ spinner.fail('Validation failed');
161
149
  throw error;
162
150
  }
163
151
  }
164
152
 
165
153
  async analyzeProject(projectPath) {
166
- const docsPath = path.join(projectPath, "docs");
167
- const bmadAgentPath = path.join(projectPath, "bmad-agent");
154
+ const docsPath = path.join(projectPath, 'docs');
155
+ const bmadAgentPath = path.join(projectPath, 'bmad-agent');
168
156
 
169
157
  // Find PRD
170
- const prdCandidates = ["prd.md", "PRD.md", "product-requirements.md"];
158
+ const prdCandidates = ['prd.md', 'PRD.md', 'product-requirements.md'];
171
159
  let prdFile = null;
172
160
  for (const candidate of prdCandidates) {
173
161
  const candidatePath = path.join(docsPath, candidate);
@@ -178,11 +166,7 @@ class V3ToV4Upgrader {
178
166
  }
179
167
 
180
168
  // Find Architecture
181
- const archCandidates = [
182
- "architecture.md",
183
- "Architecture.md",
184
- "technical-architecture.md",
185
- ];
169
+ const archCandidates = ['architecture.md', 'Architecture.md', 'technical-architecture.md'];
186
170
  let archFile = null;
187
171
  for (const candidate of archCandidates) {
188
172
  const candidatePath = path.join(docsPath, candidate);
@@ -194,9 +178,9 @@ class V3ToV4Upgrader {
194
178
 
195
179
  // Find Front-end Architecture (V3 specific)
196
180
  const frontEndCandidates = [
197
- "front-end-architecture.md",
198
- "frontend-architecture.md",
199
- "ui-architecture.md",
181
+ 'front-end-architecture.md',
182
+ 'frontend-architecture.md',
183
+ 'ui-architecture.md',
200
184
  ];
201
185
  let frontEndArchFile = null;
202
186
  for (const candidate of frontEndCandidates) {
@@ -209,10 +193,10 @@ class V3ToV4Upgrader {
209
193
 
210
194
  // Find UX/UI spec
211
195
  const uxSpecCandidates = [
212
- "ux-ui-spec.md",
213
- "ux-ui-specification.md",
214
- "ui-spec.md",
215
- "ux-spec.md",
196
+ 'ux-ui-spec.md',
197
+ 'ux-ui-specification.md',
198
+ 'ui-spec.md',
199
+ 'ux-spec.md',
216
200
  ];
217
201
  let uxSpecFile = null;
218
202
  for (const candidate of uxSpecCandidates) {
@@ -224,12 +208,7 @@ class V3ToV4Upgrader {
224
208
  }
225
209
 
226
210
  // Find v0 prompt or UX prompt
227
- const uxPromptCandidates = [
228
- "v0-prompt.md",
229
- "ux-prompt.md",
230
- "ui-prompt.md",
231
- "design-prompt.md",
232
- ];
211
+ const uxPromptCandidates = ['v0-prompt.md', 'ux-prompt.md', 'ui-prompt.md', 'design-prompt.md'];
233
212
  let uxPromptFile = null;
234
213
  for (const candidate of uxPromptCandidates) {
235
214
  const candidatePath = path.join(docsPath, candidate);
@@ -240,19 +219,19 @@ class V3ToV4Upgrader {
240
219
  }
241
220
 
242
221
  // Find epic files
243
- const epicFiles = await glob("epic*.md", { cwd: docsPath });
222
+ const epicFiles = await glob('epic*.md', { cwd: docsPath });
244
223
 
245
224
  // Find story files
246
- const storiesPath = path.join(docsPath, "stories");
225
+ const storiesPath = path.join(docsPath, 'stories');
247
226
  let storyFiles = [];
248
227
  if (await this.pathExists(storiesPath)) {
249
- storyFiles = await glob("*.md", { cwd: storiesPath });
228
+ storyFiles = await glob('*.md', { cwd: storiesPath });
250
229
  }
251
230
 
252
231
  // Count custom files in bmad-agent
253
- const bmadAgentFiles = await glob("**/*.md", {
232
+ const bmadAgentFiles = await glob('**/*.md', {
254
233
  cwd: bmadAgentPath,
255
- ignore: ["node_modules/**"],
234
+ ignore: ['node_modules/**'],
256
235
  });
257
236
 
258
237
  return {
@@ -268,330 +247,274 @@ class V3ToV4Upgrader {
268
247
  }
269
248
 
270
249
  async showPreflightCheck(analysis, options) {
271
- console.log(chalk.bold("\nProject Analysis:"));
250
+ console.log(chalk.bold('\nProject Analysis:'));
272
251
  console.log(
273
- `- PRD found: ${
274
- analysis.prdFile
275
- ? `docs/${analysis.prdFile}`
276
- : chalk.yellow("Not found")
277
- }`
252
+ `- PRD found: ${analysis.prdFile ? `docs/${analysis.prdFile}` : chalk.yellow('Not found')}`,
278
253
  );
279
254
  console.log(
280
255
  `- Architecture found: ${
281
- analysis.archFile
282
- ? `docs/${analysis.archFile}`
283
- : chalk.yellow("Not found")
284
- }`
256
+ analysis.archFile ? `docs/${analysis.archFile}` : chalk.yellow('Not found')
257
+ }`,
285
258
  );
286
259
  if (analysis.frontEndArchFile) {
287
- console.log(
288
- `- Front-end Architecture found: docs/${analysis.frontEndArchFile}`
289
- );
260
+ console.log(`- Front-end Architecture found: docs/${analysis.frontEndArchFile}`);
290
261
  }
291
262
  console.log(
292
263
  `- UX/UI Spec found: ${
293
- analysis.uxSpecFile
294
- ? `docs/${analysis.uxSpecFile}`
295
- : chalk.yellow("Not found")
296
- }`
264
+ analysis.uxSpecFile ? `docs/${analysis.uxSpecFile}` : chalk.yellow('Not found')
265
+ }`,
297
266
  );
298
267
  console.log(
299
268
  `- UX/Design Prompt found: ${
300
- analysis.uxPromptFile
301
- ? `docs/${analysis.uxPromptFile}`
302
- : chalk.yellow("Not found")
303
- }`
304
- );
305
- console.log(
306
- `- Epic files found: ${analysis.epicFiles.length} files (epic*.md)`
307
- );
308
- console.log(
309
- `- Stories found: ${analysis.storyFiles.length} files in docs/stories/`
269
+ analysis.uxPromptFile ? `docs/${analysis.uxPromptFile}` : chalk.yellow('Not found')
270
+ }`,
310
271
  );
272
+ console.log(`- Epic files found: ${analysis.epicFiles.length} files (epic*.md)`);
273
+ console.log(`- Stories found: ${analysis.storyFiles.length} files in docs/stories/`);
311
274
  console.log(`- Custom files in bmad-agent/: ${analysis.customFileCount}`);
312
275
 
313
276
  if (!options.dryRun) {
314
- console.log("\nThe following will be backed up to .bmad-v3-backup/:");
315
- console.log("- bmad-agent/ (entire directory)");
316
- console.log("- docs/ (entire directory)");
277
+ console.log('\nThe following will be backed up to .bmad-v3-backup/:');
278
+ console.log('- bmad-agent/ (entire directory)');
279
+ console.log('- docs/ (entire directory)');
317
280
 
318
281
  if (analysis.epicFiles.length > 0) {
319
282
  console.log(
320
283
  chalk.green(
321
- "\nNote: Epic files found! They will be placed in docs/prd/ with an index.md file."
322
- )
284
+ '\nNote: Epic files found! They will be placed in docs/prd/ with an index.md file.',
285
+ ),
323
286
  );
324
287
  console.log(
325
- chalk.green(
326
- "Since epic files exist, you won't need to shard the PRD after upgrade."
327
- )
288
+ chalk.green("Since epic files exist, you won't need to shard the PRD after upgrade."),
328
289
  );
329
290
  }
330
291
  }
331
292
  }
332
293
 
333
294
  async createBackup(projectPath) {
334
- const spinner = ora("Creating backup...").start();
295
+ const spinner = ora('Creating backup...').start();
335
296
 
336
297
  try {
337
- const backupPath = path.join(projectPath, ".bmad-v3-backup");
298
+ const backupPath = path.join(projectPath, '.bmad-v3-backup');
338
299
 
339
300
  // Check if backup already exists
340
301
  if (await this.pathExists(backupPath)) {
341
- spinner.fail("Backup directory already exists");
342
- console.error(
343
- chalk.red(
344
- "\nError: Backup directory .bmad-v3-backup/ already exists."
345
- )
346
- );
347
- console.error("\nThis might mean an upgrade was already attempted.");
348
- console.error(
349
- "Please remove or rename the existing backup and try again."
350
- );
351
- throw new Error("Backup already exists");
302
+ spinner.fail('Backup directory already exists');
303
+ console.error(chalk.red('\nError: Backup directory .bmad-v3-backup/ already exists.'));
304
+ console.error('\nThis might mean an upgrade was already attempted.');
305
+ console.error('Please remove or rename the existing backup and try again.');
306
+ throw new Error('Backup already exists');
352
307
  }
353
308
 
354
309
  // Create backup directory
355
310
  await fs.mkdir(backupPath, { recursive: true });
356
- spinner.text = "✓ Created .bmad-v3-backup/";
357
- console.log(chalk.green("\n✓ Created .bmad-v3-backup/"));
311
+ spinner.text = '✓ Created .bmad-v3-backup/';
312
+ console.log(chalk.green('\n✓ Created .bmad-v3-backup/'));
358
313
 
359
314
  // Move bmad-agent
360
- const bmadAgentSrc = path.join(projectPath, "bmad-agent");
361
- const bmadAgentDest = path.join(backupPath, "bmad-agent");
362
- await fs.rename(bmadAgentSrc, bmadAgentDest);
363
- console.log(chalk.green("✓ Moved bmad-agent/ to backup"));
315
+ const bmadAgentSource = path.join(projectPath, 'bmad-agent');
316
+ const bmadAgentDestination = path.join(backupPath, 'bmad-agent');
317
+ await fs.rename(bmadAgentSource, bmadAgentDestination);
318
+ console.log(chalk.green('✓ Moved bmad-agent/ to backup'));
364
319
 
365
320
  // Move docs
366
- const docsSrc = path.join(projectPath, "docs");
367
- const docsDest = path.join(backupPath, "docs");
321
+ const docsSrc = path.join(projectPath, 'docs');
322
+ const docsDest = path.join(backupPath, 'docs');
368
323
  await fs.rename(docsSrc, docsDest);
369
- console.log(chalk.green("✓ Moved docs/ to backup"));
324
+ console.log(chalk.green('✓ Moved docs/ to backup'));
370
325
 
371
- spinner.succeed("Backup created successfully");
326
+ spinner.succeed('Backup created successfully');
372
327
  } catch (error) {
373
- spinner.fail("Backup failed");
328
+ spinner.fail('Backup failed');
374
329
  throw error;
375
330
  }
376
331
  }
377
332
 
378
333
  async installV4Structure(projectPath) {
379
- const spinner = ora("Installing V4 structure...").start();
334
+ const spinner = ora('Installing V4 structure...').start();
380
335
 
381
336
  try {
382
- // Get the source .bmad-core directory
383
- const sourcePath = path.join(__dirname, "..", "..", ".bmad-core");
384
- const destPath = path.join(projectPath, ".bmad-core");
337
+ // Get the source bmad-core directory (without dot prefix)
338
+ const sourcePath = path.join(__dirname, '..', '..', 'bmad-core');
339
+ const destinationPath = path.join(projectPath, '.bmad-core');
385
340
 
386
341
  // Copy .bmad-core
387
- await this.copyDirectory(sourcePath, destPath);
388
- spinner.text = "✓ Copied fresh .bmad-core/ directory from V4";
389
- console.log(
390
- chalk.green("\n✓ Copied fresh .bmad-core/ directory from V4")
391
- );
342
+ await this.copyDirectory(sourcePath, destinationPath);
343
+ spinner.text = '✓ Copied fresh .bmad-core/ directory from V4';
344
+ console.log(chalk.green('\n✓ Copied fresh .bmad-core/ directory from V4'));
392
345
 
393
346
  // Create docs directory
394
- const docsPath = path.join(projectPath, "docs");
347
+ const docsPath = path.join(projectPath, 'docs');
395
348
  await fs.mkdir(docsPath, { recursive: true });
396
- console.log(chalk.green("✓ Created new docs/ directory"));
349
+ console.log(chalk.green('✓ Created new docs/ directory'));
397
350
 
398
351
  // Create install manifest for future updates
399
352
  await this.createInstallManifest(projectPath);
400
- console.log(chalk.green("✓ Created install manifest"));
353
+ console.log(chalk.green('✓ Created install manifest'));
401
354
 
402
355
  console.log(
403
- chalk.yellow(
404
- "\nNote: Your V3 bmad-agent content has been backed up and NOT migrated."
405
- )
356
+ chalk.yellow('\nNote: Your V3 bmad-agent content has been backed up and NOT migrated.'),
406
357
  );
407
358
  console.log(
408
359
  chalk.yellow(
409
- "The new V4 agents are completely different and look for different file structures."
410
- )
360
+ 'The new V4 agents are completely different and look for different file structures.',
361
+ ),
411
362
  );
412
363
 
413
- spinner.succeed("V4 structure installed successfully");
364
+ spinner.succeed('V4 structure installed successfully');
414
365
  } catch (error) {
415
- spinner.fail("V4 installation failed");
366
+ spinner.fail('V4 installation failed');
416
367
  throw error;
417
368
  }
418
369
  }
419
370
 
420
371
  async migrateDocuments(projectPath, analysis) {
421
- const spinner = ora("Migrating your project documents...").start();
372
+ const spinner = ora('Migrating your project documents...').start();
422
373
 
423
374
  try {
424
- const backupDocsPath = path.join(projectPath, ".bmad-v3-backup", "docs");
425
- const newDocsPath = path.join(projectPath, "docs");
375
+ const backupDocsPath = path.join(projectPath, '.bmad-v3-backup', 'docs');
376
+ const newDocsPath = path.join(projectPath, 'docs');
426
377
  let copiedCount = 0;
427
378
 
428
379
  // Copy PRD
429
380
  if (analysis.prdFile) {
430
- const src = path.join(backupDocsPath, analysis.prdFile);
431
- const dest = path.join(newDocsPath, analysis.prdFile);
432
- await fs.copyFile(src, dest);
381
+ const source = path.join(backupDocsPath, analysis.prdFile);
382
+ const destination = path.join(newDocsPath, analysis.prdFile);
383
+ await fs.copyFile(source, destination);
433
384
  console.log(chalk.green(`\n✓ Copied PRD to docs/${analysis.prdFile}`));
434
385
  copiedCount++;
435
386
  }
436
387
 
437
388
  // Copy Architecture
438
389
  if (analysis.archFile) {
439
- const src = path.join(backupDocsPath, analysis.archFile);
440
- const dest = path.join(newDocsPath, analysis.archFile);
441
- await fs.copyFile(src, dest);
442
- console.log(
443
- chalk.green(`✓ Copied Architecture to docs/${analysis.archFile}`)
444
- );
390
+ const source = path.join(backupDocsPath, analysis.archFile);
391
+ const destination = path.join(newDocsPath, analysis.archFile);
392
+ await fs.copyFile(source, destination);
393
+ console.log(chalk.green(`✓ Copied Architecture to docs/${analysis.archFile}`));
445
394
  copiedCount++;
446
395
  }
447
396
 
448
397
  // Copy Front-end Architecture if exists
449
398
  if (analysis.frontEndArchFile) {
450
- const src = path.join(backupDocsPath, analysis.frontEndArchFile);
451
- const dest = path.join(newDocsPath, analysis.frontEndArchFile);
452
- await fs.copyFile(src, dest);
399
+ const source = path.join(backupDocsPath, analysis.frontEndArchFile);
400
+ const destination = path.join(newDocsPath, analysis.frontEndArchFile);
401
+ await fs.copyFile(source, destination);
453
402
  console.log(
454
- chalk.green(
455
- `✓ Copied Front-end Architecture to docs/${analysis.frontEndArchFile}`
456
- )
403
+ chalk.green(`✓ Copied Front-end Architecture to docs/${analysis.frontEndArchFile}`),
457
404
  );
458
405
  console.log(
459
406
  chalk.yellow(
460
- "Note: V4 uses a single full-stack-architecture.md - use doc-migration-task to merge"
461
- )
407
+ 'Note: V4 uses a single full-stack-architecture.md - use doc-migration-task to merge',
408
+ ),
462
409
  );
463
410
  copiedCount++;
464
411
  }
465
412
 
466
413
  // Copy UX/UI Spec if exists
467
414
  if (analysis.uxSpecFile) {
468
- const src = path.join(backupDocsPath, analysis.uxSpecFile);
469
- const dest = path.join(newDocsPath, analysis.uxSpecFile);
470
- await fs.copyFile(src, dest);
471
- console.log(
472
- chalk.green(`✓ Copied UX/UI Spec to docs/${analysis.uxSpecFile}`)
473
- );
415
+ const source = path.join(backupDocsPath, analysis.uxSpecFile);
416
+ const destination = path.join(newDocsPath, analysis.uxSpecFile);
417
+ await fs.copyFile(source, destination);
418
+ console.log(chalk.green(`✓ Copied UX/UI Spec to docs/${analysis.uxSpecFile}`));
474
419
  copiedCount++;
475
420
  }
476
421
 
477
422
  // Copy UX/Design Prompt if exists
478
423
  if (analysis.uxPromptFile) {
479
- const src = path.join(backupDocsPath, analysis.uxPromptFile);
480
- const dest = path.join(newDocsPath, analysis.uxPromptFile);
481
- await fs.copyFile(src, dest);
482
- console.log(
483
- chalk.green(
484
- `✓ Copied UX/Design Prompt to docs/${analysis.uxPromptFile}`
485
- )
486
- );
424
+ const source = path.join(backupDocsPath, analysis.uxPromptFile);
425
+ const destination = path.join(newDocsPath, analysis.uxPromptFile);
426
+ await fs.copyFile(source, destination);
427
+ console.log(chalk.green(`✓ Copied UX/Design Prompt to docs/${analysis.uxPromptFile}`));
487
428
  copiedCount++;
488
429
  }
489
430
 
490
431
  // Copy stories
491
432
  if (analysis.storyFiles.length > 0) {
492
- const storiesDir = path.join(newDocsPath, "stories");
433
+ const storiesDir = path.join(newDocsPath, 'stories');
493
434
  await fs.mkdir(storiesDir, { recursive: true });
494
435
 
495
436
  for (const storyFile of analysis.storyFiles) {
496
- const src = path.join(backupDocsPath, "stories", storyFile);
497
- const dest = path.join(storiesDir, storyFile);
498
- await fs.copyFile(src, dest);
437
+ const source = path.join(backupDocsPath, 'stories', storyFile);
438
+ const destination = path.join(storiesDir, storyFile);
439
+ await fs.copyFile(source, destination);
499
440
  }
500
441
  console.log(
501
- chalk.green(
502
- `✓ Copied ${analysis.storyFiles.length} story files to docs/stories/`
503
- )
442
+ chalk.green(`✓ Copied ${analysis.storyFiles.length} story files to docs/stories/`),
504
443
  );
505
444
  copiedCount += analysis.storyFiles.length;
506
445
  }
507
446
 
508
447
  // Copy epic files to prd subfolder
509
448
  if (analysis.epicFiles.length > 0) {
510
- const prdDir = path.join(newDocsPath, "prd");
449
+ const prdDir = path.join(newDocsPath, 'prd');
511
450
  await fs.mkdir(prdDir, { recursive: true });
512
451
 
513
452
  for (const epicFile of analysis.epicFiles) {
514
- const src = path.join(backupDocsPath, epicFile);
515
- const dest = path.join(prdDir, epicFile);
516
- await fs.copyFile(src, dest);
453
+ const source = path.join(backupDocsPath, epicFile);
454
+ const destination = path.join(prdDir, epicFile);
455
+ await fs.copyFile(source, destination);
517
456
  }
518
457
  console.log(
519
- chalk.green(
520
- `✓ Found and copied ${analysis.epicFiles.length} epic files to docs/prd/`
521
- )
458
+ chalk.green(`✓ Found and copied ${analysis.epicFiles.length} epic files to docs/prd/`),
522
459
  );
523
460
 
524
461
  // Create index.md for the prd folder
525
462
  await this.createPrdIndex(projectPath, analysis);
526
- console.log(chalk.green("✓ Created index.md in docs/prd/"));
463
+ console.log(chalk.green('✓ Created index.md in docs/prd/'));
527
464
 
528
465
  console.log(
529
466
  chalk.green(
530
- "\nNote: Epic files detected! These are compatible with V4 and have been copied."
531
- )
532
- );
533
- console.log(
534
- chalk.green(
535
- "You won't need to shard the PRD since epics already exist."
536
- )
467
+ '\nNote: Epic files detected! These are compatible with V4 and have been copied.',
468
+ ),
537
469
  );
470
+ console.log(chalk.green("You won't need to shard the PRD since epics already exist."));
538
471
  copiedCount += analysis.epicFiles.length;
539
472
  }
540
473
 
541
474
  spinner.succeed(`Migrated ${copiedCount} documents successfully`);
542
475
  } catch (error) {
543
- spinner.fail("Document migration failed");
476
+ spinner.fail('Document migration failed');
544
477
  throw error;
545
478
  }
546
479
  }
547
480
 
548
- async setupIDE(projectPath) {
549
- const { ide } = await inquirer.prompt([
550
- {
551
- type: "list",
552
- name: "ide",
553
- message: "Which IDE are you using?",
554
- choices: [
555
- { name: "Cursor", value: "cursor" },
556
- { name: "Claude Code", value: "claude-code" },
557
- { name: "Windsurf", value: "windsurf" },
558
- { name: "Roo Code", value: "roo" },
559
- { name: "VS Code", value: "skip" },
560
- { name: "Other/Skip", value: "skip" },
561
- ],
562
- },
563
- ]);
564
-
565
- const selectedIde = ide === "skip" ? null : ide;
481
+ async setupIDE(projectPath, selectedIdes) {
482
+ // Use the IDE selections passed from the installer
483
+ if (!selectedIdes || selectedIdes.length === 0) {
484
+ console.log(chalk.dim('No IDE setup requested - skipping'));
485
+ return;
486
+ }
566
487
 
567
- if (selectedIde) {
568
- const ideSetup = require("../installer/lib/ide-setup");
569
- const spinner = ora("Setting up IDE rules for all agents...").start();
488
+ const ideSetup = require('../installer/lib/ide-setup');
489
+ const spinner = ora('Setting up IDE rules for all agents...').start();
570
490
 
571
- try {
572
- await ideSetup.setup(selectedIde, projectPath);
573
- spinner.succeed("IDE setup complete!");
574
-
575
- const ideMessages = {
576
- cursor: "Rules created in .cursor/rules/",
577
- "claude-code": "Commands created in .claude/commands/",
578
- windsurf: "Rules created in .windsurf/rules/",
579
- roo: "Custom modes created in .roomodes",
580
- };
581
-
582
- console.log(chalk.green(`- ${ideMessages[selectedIde]}`));
583
- } catch (error) {
584
- spinner.fail("IDE setup failed");
585
- console.error(
586
- chalk.yellow("IDE setup failed, but upgrade is complete.")
587
- );
491
+ try {
492
+ const ideMessages = {
493
+ cursor: 'Rules created in .cursor/rules/bmad/',
494
+ 'claude-code': 'Commands created in .claude/commands/BMad/',
495
+ windsurf: 'Rules created in .windsurf/workflows/',
496
+ trae: 'Rules created in.trae/rules/',
497
+ roo: 'Custom modes created in .roomodes',
498
+ cline: 'Rules created in .clinerules/',
499
+ };
500
+
501
+ // Setup each selected IDE
502
+ for (const ide of selectedIdes) {
503
+ spinner.text = `Setting up ${ide}...`;
504
+ await ideSetup.setup(ide, projectPath);
505
+ console.log(chalk.green(`\n✓ ${ideMessages[ide]}`));
588
506
  }
507
+
508
+ spinner.succeed(`IDE setup complete for ${selectedIdes.length} IDE(s)!`);
509
+ } catch {
510
+ spinner.fail('IDE setup failed');
511
+ console.error(chalk.yellow('IDE setup failed, but upgrade is complete.'));
589
512
  }
590
513
  }
591
514
 
592
515
  showCompletionReport(projectPath, analysis) {
593
- console.log(chalk.bold.green("\n✓ Upgrade Complete!\n"));
594
- console.log(chalk.bold("Summary:"));
516
+ console.log(chalk.bold.green('\n✓ Upgrade Complete!\n'));
517
+ console.log(chalk.bold('Summary:'));
595
518
  console.log(`- V3 files backed up to: .bmad-v3-backup/`);
596
519
  console.log(`- V4 structure installed: .bmad-core/ (fresh from V4)`);
597
520
 
@@ -604,50 +527,36 @@ class V3ToV4Upgrader {
604
527
  analysis.storyFiles.length;
605
528
  console.log(
606
529
  `- Documents migrated: ${totalDocs} files${
607
- analysis.epicFiles.length > 0
608
- ? ` + ${analysis.epicFiles.length} epics`
609
- : ""
610
- }`
530
+ analysis.epicFiles.length > 0 ? ` + ${analysis.epicFiles.length} epics` : ''
531
+ }`,
611
532
  );
612
533
 
613
- console.log(chalk.bold("\nImportant Changes:"));
614
- console.log(
615
- "- The V4 agents (sm, dev, etc.) expect different file structures than V3"
616
- );
617
- console.log(
618
- "- Your V3 bmad-agent content was NOT migrated (it's incompatible)"
619
- );
534
+ console.log(chalk.bold('\nImportant Changes:'));
535
+ console.log('- The V4 agents (sm, dev, etc.) expect different file structures than V3');
536
+ console.log("- Your V3 bmad-agent content was NOT migrated (it's incompatible)");
620
537
  if (analysis.epicFiles.length > 0) {
621
- console.log(
622
- "- Epic files were found and copied - no PRD sharding needed!"
623
- );
538
+ console.log('- Epic files were found and copied - no PRD sharding needed!');
624
539
  }
625
540
  if (analysis.frontEndArchFile) {
626
541
  console.log(
627
- "- Front-end architecture found - V4 uses full-stack-architecture.md, migration needed"
542
+ '- Front-end architecture found - V4 uses full-stack-architecture.md, migration needed',
628
543
  );
629
544
  }
630
545
  if (analysis.uxSpecFile || analysis.uxPromptFile) {
631
- console.log(
632
- "- UX/UI design files found and copied - ready for use with V4"
633
- );
546
+ console.log('- UX/UI design files found and copied - ready for use with V4');
634
547
  }
635
548
 
636
- console.log(chalk.bold("\nNext Steps:"));
637
- console.log("1. Review your documents in the new docs/ folder");
549
+ console.log(chalk.bold('\nNext Steps:'));
550
+ console.log('1. Review your documents in the new docs/ folder');
638
551
  console.log(
639
- "2. Use @bmad-master agent to run the doc-migration-task to align your documents with V4 templates"
552
+ '2. Use @bmad-master agent to run the doc-migration-task to align your documents with V4 templates',
640
553
  );
641
554
  if (analysis.epicFiles.length === 0) {
642
- console.log(
643
- "3. Use @bmad-master agent to shard the PRD to create epic files"
644
- );
555
+ console.log('3. Use @bmad-master agent to shard the PRD to create epic files');
645
556
  }
646
557
 
647
558
  console.log(
648
- chalk.dim(
649
- "\nYour V3 backup is preserved in .bmad-v3-backup/ and can be restored if needed."
650
- )
559
+ chalk.dim('\nYour V3 backup is preserved in .bmad-v3-backup/ and can be restored if needed.'),
651
560
  );
652
561
  }
653
562
 
@@ -660,67 +569,61 @@ class V3ToV4Upgrader {
660
569
  }
661
570
  }
662
571
 
663
- async copyDirectory(src, dest) {
664
- await fs.mkdir(dest, { recursive: true });
665
- const entries = await fs.readdir(src, { withFileTypes: true });
572
+ async copyDirectory(source, destination) {
573
+ await fs.mkdir(destination, { recursive: true });
574
+ const entries = await fs.readdir(source, { withFileTypes: true });
666
575
 
667
576
  for (const entry of entries) {
668
- const srcPath = path.join(src, entry.name);
669
- const destPath = path.join(dest, entry.name);
577
+ const sourcePath = path.join(source, entry.name);
578
+ const destinationPath = path.join(destination, entry.name);
670
579
 
671
- if (entry.isDirectory()) {
672
- await this.copyDirectory(srcPath, destPath);
673
- } else {
674
- await fs.copyFile(srcPath, destPath);
675
- }
580
+ await (entry.isDirectory()
581
+ ? this.copyDirectory(sourcePath, destinationPath)
582
+ : fs.copyFile(sourcePath, destinationPath));
676
583
  }
677
584
  }
678
585
 
679
586
  async createPrdIndex(projectPath, analysis) {
680
- const prdIndexPath = path.join(projectPath, "docs", "prd", "index.md");
681
- const prdPath = path.join(
682
- projectPath,
683
- "docs",
684
- analysis.prdFile || "prd.md"
685
- );
587
+ const prdIndexPath = path.join(projectPath, 'docs', 'prd', 'index.md');
588
+ const prdPath = path.join(projectPath, 'docs', analysis.prdFile || 'prd.md');
686
589
 
687
- let indexContent = "# Product Requirements Document\n\n";
590
+ let indexContent = '# Product Requirements Document\n\n';
688
591
 
689
592
  // Try to read the PRD to get the title and intro content
690
593
  if (analysis.prdFile && (await this.pathExists(prdPath))) {
691
594
  try {
692
- const prdContent = await fs.readFile(prdPath, "utf8");
693
- const lines = prdContent.split("\n");
595
+ const prdContent = await fs.readFile(prdPath, 'utf8');
596
+ const lines = prdContent.split('\n');
694
597
 
695
598
  // Find the first heading
696
- const titleMatch = lines.find((line) => line.startsWith("# "));
599
+ const titleMatch = lines.find((line) => line.startsWith('# '));
697
600
  if (titleMatch) {
698
- indexContent = titleMatch + "\n\n";
601
+ indexContent = titleMatch + '\n\n';
699
602
  }
700
603
 
701
604
  // Get any content before the first ## section
702
- let introContent = "";
605
+ let introContent = '';
703
606
  let foundFirstSection = false;
704
607
  for (const line of lines) {
705
- if (line.startsWith("## ")) {
608
+ if (line.startsWith('## ')) {
706
609
  foundFirstSection = true;
707
610
  break;
708
611
  }
709
- if (!line.startsWith("# ")) {
710
- introContent += line + "\n";
612
+ if (!line.startsWith('# ')) {
613
+ introContent += line + '\n';
711
614
  }
712
615
  }
713
616
 
714
617
  if (introContent.trim()) {
715
- indexContent += introContent.trim() + "\n\n";
618
+ indexContent += introContent.trim() + '\n\n';
716
619
  }
717
- } catch (error) {
620
+ } catch {
718
621
  // If we can't read the PRD, just use default content
719
622
  }
720
623
  }
721
624
 
722
625
  // Add sections list
723
- indexContent += "## Sections\n\n";
626
+ indexContent += '## Sections\n\n';
724
627
 
725
628
  // Sort epic files for consistent ordering
726
629
  const sortedEpics = [...analysis.epicFiles].sort();
@@ -728,38 +631,36 @@ class V3ToV4Upgrader {
728
631
  for (const epicFile of sortedEpics) {
729
632
  // Extract epic name from filename
730
633
  const epicName = epicFile
731
- .replace(/\.md$/, "")
732
- .replace(/^epic-?/i, "")
733
- .replace(/-/g, " ")
734
- .replace(/^\d+\s*/, "") // Remove leading numbers
634
+ .replace(/\.md$/, '')
635
+ .replace(/^epic-?/i, '')
636
+ .replaceAll('-', ' ')
637
+ .replace(/^\d+\s*/, '') // Remove leading numbers
735
638
  .trim();
736
639
 
737
640
  const displayName = epicName.charAt(0).toUpperCase() + epicName.slice(1);
738
- indexContent += `- [${
739
- displayName || epicFile.replace(".md", "")
740
- }](./${epicFile})\n`;
641
+ indexContent += `- [${displayName || epicFile.replace('.md', '')}](./${epicFile})\n`;
741
642
  }
742
643
 
743
644
  await fs.writeFile(prdIndexPath, indexContent);
744
645
  }
745
646
 
746
647
  async createInstallManifest(projectPath) {
747
- const fileManager = require("../installer/lib/file-manager");
748
- const { glob } = require("glob");
648
+ const fileManager = require('../installer/lib/file-manager');
649
+ const { glob } = require('glob');
749
650
 
750
651
  // Get all files in .bmad-core for the manifest
751
- const bmadCorePath = path.join(projectPath, ".bmad-core");
752
- const files = await glob("**/*", {
652
+ const bmadCorePath = path.join(projectPath, '.bmad-core');
653
+ const files = await glob('**/*', {
753
654
  cwd: bmadCorePath,
754
655
  nodir: true,
755
- ignore: ["**/.git/**", "**/node_modules/**"],
656
+ ignore: ['**/.git/**', '**/node_modules/**'],
756
657
  });
757
658
 
758
659
  // Prepend .bmad-core/ to file paths for manifest
759
- const manifestFiles = files.map((file) => path.join(".bmad-core", file));
660
+ const manifestFiles = files.map((file) => path.join('.bmad-core', file));
760
661
 
761
662
  const config = {
762
- installType: "full",
663
+ installType: 'full',
763
664
  agent: null,
764
665
  ide: null, // Will be set if IDE setup is done later
765
666
  };