bmad-method 6.0.0-alpha.19 → 6.0.0-alpha.20

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 (280) hide show
  1. package/.github/workflows/docs.yaml +72 -0
  2. package/.github/workflows/quality.yaml +0 -3
  3. package/CHANGELOG.md +125 -0
  4. package/CONTRIBUTING.md +1 -3
  5. package/README.md +8 -7
  6. package/docs/agent-customization-guide.md +3 -3
  7. package/docs/custom-content-installation.md +1 -1
  8. package/docs/document-sharding-guide.md +2 -2
  9. package/docs/getting-started/installation.md +76 -0
  10. package/docs/ide-info/index.md +24 -0
  11. package/docs/ide-info/rovo-dev.md +14 -380
  12. package/docs/index.md +36 -45
  13. package/eslint.config.mjs +7 -2
  14. package/package.json +14 -8
  15. package/{docs → samples}/sample-custom-modules/README.md +1 -1
  16. package/{docs → samples}/sample-custom-modules/sample-unitary-module/agents/toolsmith/toolsmith-sidecar/knowledge/installers.md +2 -2
  17. package/{docs → samples}/sample-custom-modules/sample-unitary-module/agents/toolsmith/toolsmith-sidecar/knowledge/modules.md +1 -1
  18. package/{docs → samples}/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-01-init.md +1 -1
  19. package/{docs → samples}/sample-custom-modules/sample-unitary-module/workflows/quiz-master/workflow.md +1 -1
  20. package/src/core/tasks/review-adversarial-general.xml +41 -0
  21. package/src/modules/bmb/README.md +25 -0
  22. package/src/modules/bmb/docs/agents/expert-agent-architecture.md +3 -3
  23. package/src/modules/bmb/docs/agents/index.md +9 -9
  24. package/src/modules/bmb/docs/agents/simple-agent-architecture.md +1 -1
  25. package/src/modules/bmb/docs/agents/understanding-agent-types.md +1 -1
  26. package/src/modules/bmb/docs/{README.md → index.md} +10 -12
  27. package/src/modules/bmb/docs/workflows/index.md +6 -6
  28. package/src/modules/bmb/docs/workflows/templates/step-01-init-continuable-template.md +7 -7
  29. package/src/modules/bmb/docs/workflows/templates/step-1b-template.md +1 -1
  30. package/src/modules/bmb/docs/workflows/templates/step-template.md +7 -7
  31. package/src/modules/bmb/docs/workflows/templates/workflow-template.md +1 -1
  32. package/src/modules/bmb/docs/workflows/templates/workflow.md +1 -1
  33. package/src/modules/bmb/reference/workflows/meal-prep-nutrition/workflow.md +1 -1
  34. package/src/modules/bmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/workflow.md +1 -1
  35. package/src/modules/bmb/workflows/create-agent/templates/expert-agent.template.md +3 -3
  36. package/src/modules/bmb/workflows/create-module/steps/step-04-structure.md +1 -1
  37. package/src/modules/bmb/workflows/create-module/steps/step-08-installer.md +5 -5
  38. package/src/modules/bmb/workflows/create-module/templates/agent.template.md +1 -1
  39. package/src/modules/bmb/workflows/create-module/validation.md +2 -2
  40. package/src/modules/bmb/workflows/create-module/workflow.md +1 -1
  41. package/src/modules/bmb/workflows/create-workflow/steps/step-07-build.md +2 -2
  42. package/src/modules/bmb/workflows/create-workflow/workflow.md +1 -1
  43. package/src/modules/bmb/workflows/edit-agent/workflow.md +1 -1
  44. package/src/modules/bmb/workflows/edit-workflow/workflow.md +1 -1
  45. package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-02-workflow-validation.md +1 -1
  46. package/src/modules/bmb/workflows/workflow-compliance-check/workflow.md +1 -1
  47. package/src/modules/bmb/workflows-legacy/edit-module/checklist.md +1 -1
  48. package/src/modules/bmb/workflows-legacy/edit-module/instructions.md +3 -3
  49. package/src/modules/bmb/workflows-legacy/module-brief/instructions.md +2 -2
  50. package/src/modules/bmgd/_module-installer/installer.js +2 -2
  51. package/src/modules/bmgd/agents/game-architect.agent.yaml +4 -0
  52. package/src/modules/bmgd/docs/{README.md → index.md} +2 -2
  53. package/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/instructions.md +4 -4
  54. package/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/steps/step-01-init.md +1 -1
  55. package/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/steps/step-04-complete.md +1 -1
  56. package/src/modules/bmgd/workflows/1-preproduction/game-brief/instructions.md +4 -4
  57. package/src/modules/bmgd/workflows/2-design/narrative/instructions-narrative.md +4 -4
  58. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-11-complete.md +1 -1
  59. package/src/modules/bmgd/workflows/3-technical/game-architecture/instructions.md +5 -5
  60. package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-09-complete.md +60 -6
  61. package/src/modules/bmgd/workflows/3-technical/generate-project-context/project-context-template.md +20 -0
  62. package/src/modules/bmgd/workflows/3-technical/generate-project-context/steps/step-01-discover.md +201 -0
  63. package/src/modules/bmgd/workflows/3-technical/generate-project-context/steps/step-02-generate.md +373 -0
  64. package/src/modules/bmgd/workflows/3-technical/generate-project-context/steps/step-03-complete.md +279 -0
  65. package/src/modules/bmgd/workflows/3-technical/generate-project-context/workflow.md +48 -0
  66. package/src/modules/bmgd/workflows/4-production/code-review/workflow.yaml +3 -3
  67. package/src/modules/bmgd/workflows/4-production/correct-course/checklist.md +1 -1
  68. package/src/modules/bmgd/workflows/4-production/correct-course/instructions.md +2 -2
  69. package/src/modules/bmgd/workflows/4-production/correct-course/workflow.yaml +2 -2
  70. package/src/modules/bmgd/workflows/4-production/create-story/workflow.yaml +3 -3
  71. package/src/modules/bmgd/workflows/4-production/dev-story/workflow.yaml +4 -4
  72. package/src/modules/bmgd/workflows/4-production/retrospective/instructions.md +2 -2
  73. package/src/modules/bmgd/workflows/4-production/retrospective/workflow.yaml +5 -5
  74. package/src/modules/bmgd/workflows/4-production/sprint-planning/instructions.md +11 -2
  75. package/src/modules/bmgd/workflows/4-production/sprint-planning/workflow.yaml +4 -4
  76. package/src/modules/bmgd/workflows/4-production/sprint-status/instructions.md +2 -2
  77. package/src/modules/bmgd/workflows/4-production/sprint-status/workflow.yaml +3 -3
  78. package/src/modules/bmgd/workflows/bmgd-quick-flow/create-tech-spec/instructions.md +3 -3
  79. package/src/modules/bmgd/workflows/bmgd-quick-flow/create-tech-spec/workflow.yaml +1 -1
  80. package/src/modules/bmgd/workflows/bmgd-quick-flow/quick-dev/workflow.yaml +1 -1
  81. package/src/modules/bmgd/workflows/bmgd-quick-flow/quick-prototype/workflow.yaml +1 -1
  82. package/src/modules/bmgd/workflows/workflow-status/init/instructions.md +2 -2
  83. package/src/modules/bmgd/workflows/workflow-status/init/workflow.yaml +1 -1
  84. package/src/modules/bmgd/workflows/workflow-status/instructions.md +2 -2
  85. package/src/modules/bmm/README.md +5 -6
  86. package/src/modules/bmm/_module-installer/installer.js +2 -2
  87. package/src/modules/bmm/agents/analyst.agent.yaml +1 -1
  88. package/src/modules/bmm/agents/dev.agent.yaml +8 -4
  89. package/src/modules/bmm/agents/quick-flow-solo-dev.agent.yaml +8 -17
  90. package/src/modules/bmm/agents/sm.agent.yaml +6 -3
  91. package/src/modules/bmm/agents/tech-writer.agent.yaml +1 -1
  92. package/src/modules/bmm/agents/ux-designer.agent.yaml +6 -3
  93. package/src/modules/bmm/docs/agents-guide.md +83 -1026
  94. package/src/modules/bmm/docs/bmad-quick-flow.md +10 -32
  95. package/src/modules/bmm/docs/brownfield-guide.md +1 -1
  96. package/src/modules/bmm/docs/enterprise-agentic-development.md +1 -1
  97. package/src/modules/bmm/docs/{README.md → index.md} +7 -88
  98. package/src/modules/bmm/docs/quick-spec-flow.md +1 -1
  99. package/src/modules/bmm/docs/quick-start.md +7 -7
  100. package/src/modules/bmm/docs/scale-adaptive-system.md +1 -1
  101. package/src/modules/bmm/docs/test-architecture.md +13 -12
  102. package/src/modules/bmm/docs/workflows-solutioning.md +1 -1
  103. package/src/modules/bmm/module.yaml +11 -10
  104. package/src/modules/bmm/workflows/1-analysis/create-product-brief/product-brief.template.md +7 -5
  105. package/src/modules/bmm/workflows/1-analysis/create-product-brief/steps/step-01-init.md +2 -2
  106. package/src/modules/bmm/workflows/1-analysis/create-product-brief/steps/step-01b-continue.md +2 -4
  107. package/src/modules/bmm/workflows/1-analysis/create-product-brief/steps/step-02-vision.md +2 -2
  108. package/src/modules/bmm/workflows/1-analysis/create-product-brief/steps/step-03-users.md +2 -2
  109. package/src/modules/bmm/workflows/1-analysis/create-product-brief/steps/step-04-metrics.md +2 -2
  110. package/src/modules/bmm/workflows/1-analysis/create-product-brief/steps/step-05-scope.md +2 -2
  111. package/src/modules/bmm/workflows/1-analysis/create-product-brief/steps/step-06-complete.md +7 -10
  112. package/src/modules/bmm/workflows/1-analysis/create-product-brief/workflow.md +3 -3
  113. package/src/modules/bmm/workflows/1-analysis/research/research.template.md +14 -0
  114. package/src/modules/bmm/workflows/1-analysis/research/workflow.md +8 -39
  115. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-01-init.md +15 -15
  116. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-02-discovery.md +5 -25
  117. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-03-core-experience.md +5 -5
  118. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-04-emotional-response.md +5 -5
  119. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-05-inspiration.md +6 -6
  120. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-06-design-system.md +5 -5
  121. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-07-defining-experience.md +5 -5
  122. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-08-visual-foundation.md +5 -5
  123. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-09-design-directions.md +5 -5
  124. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-10-user-journeys.md +5 -5
  125. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-11-component-strategy.md +5 -5
  126. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-12-ux-patterns.md +5 -5
  127. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-13-responsive-accessibility.md +5 -5
  128. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-14-complete.md +2 -2
  129. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/workflow.md +3 -5
  130. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-03-success.md +4 -4
  131. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-04-journeys.md +4 -4
  132. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-05-domain.md +4 -4
  133. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-06-innovation.md +4 -4
  134. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-07-project-type.md +4 -4
  135. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-08-scoping.md +4 -4
  136. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-09-functional.md +4 -4
  137. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-10-nonfunctional.md +4 -4
  138. package/src/modules/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-01-document-discovery.md +1 -1
  139. package/src/modules/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-02-prd-analysis.md +1 -1
  140. package/src/modules/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-03-epic-coverage-validation.md +1 -1
  141. package/src/modules/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-04-ux-alignment.md +1 -1
  142. package/src/modules/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-05-epic-quality-review.md +1 -1
  143. package/src/modules/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-06-final-assessment.md +1 -1
  144. package/src/modules/bmm/workflows/3-solutioning/check-implementation-readiness/workflow.md +2 -2
  145. package/src/modules/bmm/workflows/3-solutioning/create-architecture/architecture-decision-template.md +0 -1
  146. package/src/modules/bmm/workflows/3-solutioning/create-architecture/steps/step-01-init.md +9 -21
  147. package/src/modules/bmm/workflows/3-solutioning/create-architecture/steps/step-02-context.md +4 -4
  148. package/src/modules/bmm/workflows/3-solutioning/create-architecture/steps/step-03-starter.md +2 -2
  149. package/src/modules/bmm/workflows/3-solutioning/create-architecture/steps/step-04-decisions.md +4 -4
  150. package/src/modules/bmm/workflows/3-solutioning/create-architecture/steps/step-05-patterns.md +4 -4
  151. package/src/modules/bmm/workflows/3-solutioning/create-architecture/steps/step-06-structure.md +4 -4
  152. package/src/modules/bmm/workflows/3-solutioning/create-architecture/steps/step-07-validation.md +4 -4
  153. package/src/modules/bmm/workflows/3-solutioning/create-architecture/workflow.md +1 -1
  154. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-01-validate-prerequisites.md +8 -8
  155. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-02-design-epics.md +1 -1
  156. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-03-create-stories.md +1 -1
  157. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-04-final-validation.md +1 -1
  158. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/workflow.md +2 -2
  159. package/src/modules/bmm/workflows/4-implementation/code-review/workflow.yaml +4 -4
  160. package/src/modules/bmm/workflows/4-implementation/correct-course/checklist.md +1 -1
  161. package/src/modules/bmm/workflows/4-implementation/correct-course/instructions.md +2 -2
  162. package/src/modules/bmm/workflows/4-implementation/correct-course/workflow.yaml +16 -14
  163. package/src/modules/bmm/workflows/4-implementation/create-story/instructions.xml +2 -12
  164. package/src/modules/bmm/workflows/4-implementation/create-story/workflow.yaml +4 -4
  165. package/src/modules/bmm/workflows/4-implementation/dev-story/instructions.xml +1 -1
  166. package/src/modules/bmm/workflows/4-implementation/dev-story/workflow.yaml +3 -3
  167. package/src/modules/bmm/workflows/4-implementation/retrospective/instructions.md +2 -2
  168. package/src/modules/bmm/workflows/4-implementation/retrospective/workflow.yaml +5 -5
  169. package/src/modules/bmm/workflows/4-implementation/sprint-planning/instructions.md +2 -2
  170. package/src/modules/bmm/workflows/4-implementation/sprint-planning/workflow.yaml +7 -6
  171. package/src/modules/bmm/workflows/4-implementation/sprint-status/instructions.md +2 -2
  172. package/src/modules/bmm/workflows/4-implementation/sprint-status/workflow.yaml +4 -3
  173. package/src/modules/bmm/workflows/bmad-quick-flow/create-tech-spec/instructions.md +4 -4
  174. package/src/modules/bmm/workflows/bmad-quick-flow/create-tech-spec/workflow.yaml +4 -2
  175. package/src/modules/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-01-mode-detection.md +156 -0
  176. package/src/modules/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-02-context-gathering.md +120 -0
  177. package/src/modules/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-03-execute.md +113 -0
  178. package/src/modules/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-04-self-check.md +113 -0
  179. package/src/modules/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-05-adversarial-review.md +106 -0
  180. package/src/modules/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-06-resolve-findings.md +140 -0
  181. package/src/modules/bmm/workflows/bmad-quick-flow/quick-dev/workflow.md +51 -0
  182. package/src/modules/bmm/workflows/document-project/instructions.md +27 -28
  183. package/src/modules/bmm/workflows/document-project/workflow.yaml +2 -3
  184. package/src/modules/bmm/workflows/generate-project-context/project-context-template.md +2 -1
  185. package/src/modules/bmm/workflows/generate-project-context/steps/step-01-discover.md +5 -15
  186. package/src/modules/bmm/workflows/generate-project-context/steps/step-02-generate.md +2 -2
  187. package/src/modules/bmm/workflows/testarch/atdd/atdd-checklist-template.md +8 -7
  188. package/src/modules/bmm/workflows/testarch/atdd/checklist.md +1 -0
  189. package/src/modules/bmm/workflows/testarch/atdd/instructions.md +1 -0
  190. package/src/modules/bmm/workflows/testarch/automate/checklist.md +2 -0
  191. package/src/modules/bmm/workflows/testarch/ci/checklist.md +2 -0
  192. package/src/modules/bmm/workflows/testarch/ci/instructions.md +2 -0
  193. package/src/modules/bmm/workflows/testarch/nfr-assess/checklist.md +2 -0
  194. package/src/modules/bmm/workflows/testarch/nfr-assess/nfr-report-template.md +2 -0
  195. package/src/modules/bmm/workflows/testarch/test-design/checklist.md +3 -2
  196. package/src/modules/bmm/workflows/testarch/test-design/instructions.md +1 -1
  197. package/src/modules/bmm/workflows/testarch/test-design/test-design-template.md +9 -0
  198. package/src/modules/bmm/workflows/testarch/test-review/checklist.md +2 -0
  199. package/src/modules/bmm/workflows/testarch/test-review/test-review-template.md +2 -0
  200. package/src/modules/bmm/workflows/testarch/trace/checklist.md +1 -0
  201. package/src/modules/bmm/workflows/testarch/trace/instructions.md +2 -0
  202. package/src/modules/bmm/workflows/testarch/trace/trace-template.md +2 -0
  203. package/src/modules/bmm/workflows/workflow-status/init/instructions.md +2 -2
  204. package/src/modules/bmm/workflows/workflow-status/init/workflow.yaml +1 -1
  205. package/src/modules/bmm/workflows/workflow-status/instructions.md +2 -2
  206. package/src/modules/bmm/workflows/workflow-status/workflow.yaml +3 -1
  207. package/src/modules/cis/{readme.md → docs/index.md} +2 -6
  208. package/src/modules/cis/workflows/design-thinking/instructions.md +2 -2
  209. package/src/modules/cis/workflows/innovation-strategy/instructions.md +2 -2
  210. package/src/modules/cis/workflows/problem-solving/instructions.md +2 -2
  211. package/test/fixtures/agent-schema/invalid/menu-triggers/compound-invalid-format.agent.yaml +24 -0
  212. package/test/fixtures/agent-schema/invalid/menu-triggers/compound-mismatched-kebab.agent.yaml +24 -0
  213. package/test/fixtures/agent-schema/invalid/menu-triggers/compound-wrong-shortcut.agent.yaml +24 -0
  214. package/test/fixtures/agent-schema/valid/menu-triggers/compound-triggers.agent.yaml +30 -0
  215. package/tools/build-docs.js +630 -0
  216. package/tools/cli/commands/install.js +11 -5
  217. package/tools/cli/installers/install-messages.yaml +52 -0
  218. package/tools/cli/installers/lib/core/config-collector.js +25 -30
  219. package/tools/cli/installers/lib/message-loader.js +85 -0
  220. package/tools/cli/lib/ui.js +221 -41
  221. package/tools/schema/agent.js +68 -5
  222. package/website/css/custom.css +52 -0
  223. package/website/docusaurus.config.js +179 -0
  224. package/website/sidebars.js +157 -0
  225. package/website/src/pages/downloads.md +81 -0
  226. package/website/src/pages/index.js +50 -0
  227. package/website/static/favicon.ico +0 -0
  228. package/website/static/img/logo.svg +4 -0
  229. package/website/static/robots.txt +37 -0
  230. package/docs/installers-bundlers/ide-injections.md +0 -186
  231. package/docs/installers-bundlers/installers-modules-platforms-reference.md +0 -389
  232. package/src/modules/bmgd/README.md +0 -209
  233. package/src/modules/bmm/workflows/bmad-quick-flow/quick-dev/checklist.md +0 -25
  234. package/src/modules/bmm/workflows/bmad-quick-flow/quick-dev/instructions.md +0 -202
  235. package/src/modules/bmm/workflows/bmad-quick-flow/quick-dev/workflow.yaml +0 -33
  236. package/tools/cli/commands/build.js +0 -283
  237. package/tools/cli/commands/list.js +0 -40
  238. package/tools/cli/commands/status.js +0 -47
  239. package/tools/cli/commands/uninstall.js +0 -44
  240. package/tools/cli/commands/update.js +0 -28
  241. package/tools/validate-bundles.js +0 -87
  242. /package/{docs → samples}/sample-custom-modules/sample-unitary-module/README.md +0 -0
  243. /package/{docs → samples}/sample-custom-modules/sample-unitary-module/agents/commit-poet/commit-poet.agent.yaml +0 -0
  244. /package/{docs → samples}/sample-custom-modules/sample-unitary-module/agents/toolsmith/toolsmith-sidecar/instructions.md +0 -0
  245. /package/{docs → samples}/sample-custom-modules/sample-unitary-module/agents/toolsmith/toolsmith-sidecar/knowledge/bundlers.md +0 -0
  246. /package/{docs → samples}/sample-custom-modules/sample-unitary-module/agents/toolsmith/toolsmith-sidecar/knowledge/deploy.md +0 -0
  247. /package/{docs → samples}/sample-custom-modules/sample-unitary-module/agents/toolsmith/toolsmith-sidecar/knowledge/docs.md +0 -0
  248. /package/{docs → samples}/sample-custom-modules/sample-unitary-module/agents/toolsmith/toolsmith-sidecar/knowledge/tests.md +0 -0
  249. /package/{docs → samples}/sample-custom-modules/sample-unitary-module/agents/toolsmith/toolsmith-sidecar/memories.md +0 -0
  250. /package/{docs → samples}/sample-custom-modules/sample-unitary-module/agents/toolsmith/toolsmith.agent.yaml +0 -0
  251. /package/{docs → samples}/sample-custom-modules/sample-unitary-module/module.yaml +0 -0
  252. /package/{docs → samples}/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-02-q1.md +0 -0
  253. /package/{docs → samples}/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-03-q2.md +0 -0
  254. /package/{docs → samples}/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-04-q3.md +0 -0
  255. /package/{docs → samples}/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-05-q4.md +0 -0
  256. /package/{docs → samples}/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-06-q5.md +0 -0
  257. /package/{docs → samples}/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-07-q6.md +0 -0
  258. /package/{docs → samples}/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-08-q7.md +0 -0
  259. /package/{docs → samples}/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-09-q8.md +0 -0
  260. /package/{docs → samples}/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-10-q9.md +0 -0
  261. /package/{docs → samples}/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-11-q10.md +0 -0
  262. /package/{docs → samples}/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-12-results.md +0 -0
  263. /package/{docs → samples}/sample-custom-modules/sample-unitary-module/workflows/quiz-master/templates/csv-headers.template +0 -0
  264. /package/{docs → samples}/sample-custom-modules/sample-unitary-module/workflows/wassup/workflow.md +0 -0
  265. /package/{docs → samples}/sample-custom-modules/sample-wellness-module/README.md +0 -0
  266. /package/{docs → samples}/sample-custom-modules/sample-wellness-module/agents/meditation-guide.agent.yaml +0 -0
  267. /package/{docs → samples}/sample-custom-modules/sample-wellness-module/agents/wellness-companion/foo.md +0 -0
  268. /package/{docs → samples}/sample-custom-modules/sample-wellness-module/agents/wellness-companion/wellness-companion-sidecar/addition1.md +0 -0
  269. /package/{docs → samples}/sample-custom-modules/sample-wellness-module/agents/wellness-companion/wellness-companion-sidecar/insights.md +0 -0
  270. /package/{docs → samples}/sample-custom-modules/sample-wellness-module/agents/wellness-companion/wellness-companion-sidecar/instructions.md +0 -0
  271. /package/{docs → samples}/sample-custom-modules/sample-wellness-module/agents/wellness-companion/wellness-companion-sidecar/memories.md +0 -0
  272. /package/{docs → samples}/sample-custom-modules/sample-wellness-module/agents/wellness-companion/wellness-companion-sidecar/patterns.md +0 -0
  273. /package/{docs → samples}/sample-custom-modules/sample-wellness-module/agents/wellness-companion/wellness-companion.agent.yaml +0 -0
  274. /package/{docs → samples}/sample-custom-modules/sample-wellness-module/module.yaml +0 -0
  275. /package/{docs → samples}/sample-custom-modules/sample-wellness-module/workflows/daily-checkin/README.md +0 -0
  276. /package/{docs → samples}/sample-custom-modules/sample-wellness-module/workflows/daily-checkin/workflow.md +0 -0
  277. /package/{docs → samples}/sample-custom-modules/sample-wellness-module/workflows/guided-meditation/README.md +0 -0
  278. /package/{docs → samples}/sample-custom-modules/sample-wellness-module/workflows/guided-meditation/workflow.md +0 -0
  279. /package/{docs → samples}/sample-custom-modules/sample-wellness-module/workflows/wellness-journal/README.md +0 -0
  280. /package/{docs → samples}/sample-custom-modules/sample-wellness-module/workflows/wellness-journal/workflow.md +0 -0
@@ -0,0 +1,52 @@
1
+ # BMAD Installer Messages
2
+ # These messages are displayed during installation
3
+ # Edit this file to change what users see during the install process
4
+
5
+ # Display at the START of installation (after logo, before prompts)
6
+ startMessage: |
7
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
8
+
9
+ 🎉🎉 Happy Holidays and New Year 🍾🍾
10
+
11
+ IMPORTANT Changes with Version Alpha.20 - PLEASE READ THIS if upgrading from earlier Alpha Versions:
12
+
13
+ 1. The BMad Core default output folder has changed from docs to `_bmad-output`. `docs` is meant for long-term artifacts, which you can always decide to move content to.
14
+
15
+ 2. If utilizing the BMad Method Module (BMM) please be aware of the following important recent changes:
16
+
17
+ - Phases 1-3 (Analysis, Planning, Solutioning) will now default output to _bmad-output/planning-artifacts
18
+ - Phase 4 (Implementation) will now default output to _bmad-output/implementation-artifacts
19
+ - Long term project knowledge (research, docs, references, document-project output) will now default to docs/
20
+
21
+ IT IS STRONGLY SUGGESTED to align with these folder conventions instead of dumping all to docs/ - if you are upgrading from a prior
22
+ version where all output was going to docs or docs/sprint-artifacts, it is suggested to reset configs to these new values.
23
+
24
+ If you have anything in progress, you can move what was in sprint-artifacts to _bmad-output/implementation-artifacts, and if you had brainstorming
25
+ content, a PRD, UX or Architecture, you can move the content to _bmad-output/planning-artifacts.
26
+
27
+ Read the latest updates before continuing:
28
+ https://github.com/bmad-code-org/BMAD-METHOD/blob/main/CHANGELOG.md
29
+
30
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
31
+
32
+ # Display at the END of installation (after all setup completes)
33
+ endMessage: |
34
+ ════════════════════════════════════════════════════════════════════════════════
35
+
36
+ ✨ BMAD IS READY TO USE!
37
+
38
+ ONE FINAL NOTE WITH VERSION Alpha.20: Phase 4 (Implementation) is still in the process of being migrated to the improved workflow progressive disclosure system.
39
+ Along with this, the full conversion to the new path locations for content being searched may possibly be incomplete. If you run a workflow that relies on finding input documents automatically, and you notice they are not being found / looking in the wrong location, either:
40
+ 1. Manually specify the correct input location when prompted
41
+ 2. Open an issue on GitHub so we can address the problem quickly if you think its a bug.
42
+ 3. Ensure your content is in the new locations for best results:
43
+ - Planning Artifacts (Phases 1-3): _bmad-output/planning-artifacts
44
+ - Implementation Artifacts (Phase 4): _bmad-output/implementation-artifacts
45
+ - Long Term Project Knowledge (docs, research, references): docs/
46
+
47
+ Thank you for helping test the early release version of the new BMad Core and BMad Method!
48
+ Stable Beta coming soon - please read the full README.md and linked documentation to get started.
49
+
50
+ And again, here is the Change Log with all the details of recent updates: https://github.com/bmad-code-org/BMAD-METHOD/blob/main/CHANGELOG.md
51
+
52
+ ════════════════════════════════════════════════════════════════════════════════
@@ -318,11 +318,11 @@ class ConfigCollector {
318
318
  this.allAnswers[`${moduleName}_user_name`] = this.getDefaultUsername();
319
319
  }
320
320
  }
321
- }
322
321
 
323
- // Show "no config" message for modules with no new questions (that have config keys)
324
- console.log(chalk.dim(` ✓ ${moduleName.toUpperCase()} module already up to date`));
325
- return false; // No new fields
322
+ // Show "no config" message for modules with no new questions (that have config keys)
323
+ console.log(chalk.dim(` ✓ ${moduleName.toUpperCase()} module already up to date`));
324
+ return false; // No new fields
325
+ }
326
326
 
327
327
  // If we have new fields (interactive or static), process them
328
328
  if (newKeys.length > 0 || newStaticKeys.length > 0) {
@@ -363,6 +363,13 @@ class ConfigCollector {
363
363
  Object.assign(this.allAnswers, allAnswers);
364
364
 
365
365
  // Process all answers (both static and prompted)
366
+ // First, copy existing config to preserve values that aren't being updated
367
+ if (this.existingConfig && this.existingConfig[moduleName]) {
368
+ this.collectedConfig[moduleName] = { ...this.existingConfig[moduleName] };
369
+ } else {
370
+ this.collectedConfig[moduleName] = {};
371
+ }
372
+
366
373
  for (const key of Object.keys(allAnswers)) {
367
374
  const originalKey = key.replace(`${moduleName}_`, '');
368
375
  const item = moduleConfig[originalKey];
@@ -377,9 +384,7 @@ class ConfigCollector {
377
384
  result = value;
378
385
  }
379
386
 
380
- if (!this.collectedConfig[moduleName]) {
381
- this.collectedConfig[moduleName] = {};
382
- }
387
+ // Update the collected config with new/updated values
383
388
  this.collectedConfig[moduleName][originalKey] = result;
384
389
  }
385
390
  }
@@ -577,26 +582,23 @@ class ConfigCollector {
577
582
 
578
583
  // If there are questions to ask, prompt for accepting defaults vs customizing
579
584
  if (questions.length > 0) {
580
- // Get friendly module name from config or use uppercase module name
581
585
  const moduleDisplayName = moduleConfig.header || `${moduleName.toUpperCase()} Module`;
582
-
583
- // Add blank line for better readability
584
586
  console.log();
585
-
586
- // Display the module name in color first
587
587
  console.log(chalk.cyan('?') + ' ' + chalk.magenta(moduleDisplayName));
588
+ let customize = true;
589
+ if (moduleName !== 'core') {
590
+ const customizeAnswer = await inquirer.prompt([
591
+ {
592
+ type: 'confirm',
593
+ name: 'customize',
594
+ message: 'Accept Defaults (no to customize)?',
595
+ default: true,
596
+ },
597
+ ]);
598
+ customize = customizeAnswer.customize;
599
+ }
588
600
 
589
- // Ask user if they want to accept defaults or customize on the next line
590
- const { customize } = await inquirer.prompt([
591
- {
592
- type: 'confirm',
593
- name: 'customize',
594
- message: 'Accept Defaults (no to customize)?',
595
- default: true,
596
- },
597
- ]);
598
-
599
- if (customize) {
601
+ if (customize && moduleName !== 'core') {
600
602
  // Accept defaults - only ask questions that have NO default value
601
603
  const questionsWithoutDefaults = questions.filter((q) => q.default === undefined || q.default === null || q.default === '');
602
604
 
@@ -616,8 +618,6 @@ class ConfigCollector {
616
618
  allAnswers[question.name] = question.default;
617
619
  }
618
620
  } else {
619
- // Customize - ask all questions
620
- console.log(chalk.dim(`\n Configuring ${moduleName.toUpperCase()}...`));
621
621
  const promptedAnswers = await inquirer.prompt(questions);
622
622
  Object.assign(allAnswers, promptedAnswers);
623
623
  }
@@ -642,8 +642,6 @@ class ConfigCollector {
642
642
 
643
643
  // For arrays (multi-select), handle differently
644
644
  if (Array.isArray(value)) {
645
- // If there's a result template and it's a string, don't use it for arrays
646
- // Just use the array value directly
647
645
  result = value;
648
646
  } else if (item.result) {
649
647
  result = item.result;
@@ -658,11 +656,9 @@ class ConfigCollector {
658
656
  if (result === '{value}') {
659
657
  result = value;
660
658
  } else {
661
- // Otherwise replace in the string
662
659
  result = result.replace('{value}', value);
663
660
  }
664
661
  } else {
665
- // For non-string values, use directly
666
662
  result = value;
667
663
  }
668
664
 
@@ -714,7 +710,6 @@ class ConfigCollector {
714
710
  }
715
711
  }
716
712
  } else {
717
- // No result template, use value directly
718
713
  result = value;
719
714
  }
720
715
 
@@ -0,0 +1,85 @@
1
+ const fs = require('fs-extra');
2
+ const path = require('node:path');
3
+ const yaml = require('yaml');
4
+ const chalk = require('chalk');
5
+
6
+ /**
7
+ * Load and display installer messages from messages.yaml
8
+ */
9
+ class MessageLoader {
10
+ constructor() {}
11
+
12
+ /**
13
+ * Load messages from the YAML file
14
+ * @returns {Object|null} Messages object or null if not found
15
+ */
16
+ load() {
17
+ if (this.messages) {
18
+ return this.messages;
19
+ }
20
+
21
+ const messagesPath = path.join(__dirname, '..', 'install-messages.yaml');
22
+
23
+ try {
24
+ const content = fs.readFileSync(messagesPath, 'utf8');
25
+ this.messages = yaml.parse(content);
26
+ return this.messages;
27
+ } catch {
28
+ // File doesn't exist or is invalid - return null
29
+ return null;
30
+ }
31
+ }
32
+
33
+ /**
34
+ * Get the start message for display
35
+ * @returns {string|null} Start message or null
36
+ */
37
+ getStartMessage() {
38
+ const messages = this.load();
39
+ return messages?.startMessage || null;
40
+ }
41
+
42
+ /**
43
+ * Get the end message for display
44
+ * @returns {string|null} End message or null
45
+ */
46
+ getEndMessage() {
47
+ const messages = this.load();
48
+ return messages?.endMessage || null;
49
+ }
50
+
51
+ /**
52
+ * Display the start message (after logo, before prompts)
53
+ */
54
+ displayStartMessage() {
55
+ const message = this.getStartMessage();
56
+ if (message) {
57
+ console.log(chalk.cyan(message));
58
+ console.log();
59
+ }
60
+ }
61
+
62
+ /**
63
+ * Display the end message (after installation completes)
64
+ */
65
+ displayEndMessage() {
66
+ const message = this.getEndMessage();
67
+ if (message) {
68
+ console.log();
69
+ console.log(chalk.cyan(message));
70
+ }
71
+ }
72
+
73
+ /**
74
+ * Check if messages exist for the current version
75
+ * @param {string} currentVersion - Current package version
76
+ * @returns {boolean} True if messages match current version
77
+ */
78
+ isCurrent(currentVersion) {
79
+ const messages = this.load();
80
+ return messages && messages.version === currentVersion;
81
+ }
82
+ messages = null;
83
+ }
84
+
85
+ module.exports = { MessageLoader };
@@ -17,8 +17,10 @@ class UI {
17
17
  async promptInstall() {
18
18
  CLIUtils.displayLogo();
19
19
 
20
- // Display changelog link
21
- console.log(chalk.cyan('\n📋 Read the latest updates: https://github.com/bmad-code-org/BMAD-METHOD/blob/main/CHANGELOG.md\n'));
20
+ // Display version-specific start message from install-messages.yaml
21
+ const { MessageLoader } = require('../installers/lib/message-loader');
22
+ const messageLoader = new MessageLoader();
23
+ messageLoader.displayStartMessage();
22
24
 
23
25
  const confirmedDirectory = await this.getConfirmedDirectory();
24
26
 
@@ -43,7 +45,7 @@ class UI {
43
45
  if (await fs.pathExists(confirmedDirectory)) {
44
46
  const entries = await fs.readdir(confirmedDirectory, { withFileTypes: true });
45
47
  for (const entry of entries) {
46
- if (entry.isDirectory() && entry.name === '.bmad') {
48
+ if (entry.isDirectory() && (entry.name === '.bmad' || entry.name === 'bmad')) {
47
49
  hasLegacyBmadFolder = true;
48
50
  legacyBmadPath = path.join(confirmedDirectory, '.bmad');
49
51
  bmadDir = legacyBmadPath;
@@ -58,53 +60,85 @@ class UI {
58
60
  }
59
61
  }
60
62
 
61
- // If no .bmad found, check for current installations
63
+ // If no .bmad or bmad found, check for current installations _bmad
62
64
  if (!hasLegacyBmadFolder) {
63
65
  const bmadResult = await installer.findBmadDir(confirmedDirectory);
64
66
  bmadDir = bmadResult.bmadDir;
65
67
  hasLegacyCfg = bmadResult.hasLegacyCfg;
66
68
  }
67
69
 
70
+ // Handle legacy .bmad or _cfg folder - these are very old (more than 2 versions behind)
71
+ // Show version warning instead of offering conversion
68
72
  if (hasLegacyBmadFolder || hasLegacyCfg) {
69
- console.log(chalk.yellow('\n⚠️ Legacy folder structure detected'));
70
-
71
- let message = 'The following folders need to be renamed:\n';
72
- if (hasLegacyBmadFolder) {
73
- message += chalk.dim(` • ".bmad" → "_bmad"\n`);
74
- }
75
- if (hasLegacyCfg) {
76
- message += chalk.dim(` • "_cfg" → "_config"\n`);
77
- }
78
- console.log(message);
73
+ console.log('');
74
+ console.log(chalk.yellow.bold('⚠️ LEGACY INSTALLATION DETECTED'));
75
+ console.log(chalk.yellow(''.repeat(80)));
76
+ console.log(
77
+ chalk.yellow(
78
+ 'Found a ".bmad"/"bmad" folder, or a legacy "_cfg" folder under the bmad folder - this is from a old BMAD version that is out of date for automatic upgrade, manual intervention required.',
79
+ ),
80
+ );
81
+ console.log(chalk.yellow('This version is more than 2 alpha versions behind current.'));
82
+ console.log('');
83
+ console.log(chalk.dim('For stability, we only support updates from the previous 2 alpha versions.'));
84
+ console.log(chalk.dim('Legacy installations may have compatibility issues.'));
85
+ console.log('');
86
+ console.log(chalk.dim('For the best experience, we strongly recommend:'));
87
+ console.log(chalk.dim(' 1. Delete your current BMAD installation folder (.bmad or bmad)'));
88
+ console.log(
89
+ chalk.dim(
90
+ ' 2. Run a fresh installation\n\nIf you do not want to start fresh, you can attempt to proceed beyond this point IF you have ensured the bmad folder is named _bmad, and under it there is a _config folder. If you have a folder under your bmad folder named _cfg, you would need to rename it _config, and then restart the installer.',
91
+ ),
92
+ );
93
+ console.log('');
94
+ console.log(chalk.dim('Benefits of a fresh install:'));
95
+ console.log(chalk.dim(' • Cleaner configuration without legacy artifacts'));
96
+ console.log(chalk.dim(' • All new features properly configured'));
97
+ console.log(chalk.dim(' • Fewer potential conflicts'));
98
+ console.log(chalk.dim(''));
99
+ console.log(
100
+ chalk.dim(
101
+ 'If you have already produced output from an earlier alpha version, you can still retain those artifacts. After installation, ensure you configured during install the proper file locations for artifacts depending on the module you are using, or move the files to the proper locations.',
102
+ ),
103
+ );
104
+ console.log(chalk.yellow('─'.repeat(80)));
105
+ console.log('');
79
106
 
80
- const { shouldRename } = await inquirer.prompt([
107
+ const { proceed } = await inquirer.prompt([
81
108
  {
82
- type: 'confirm',
83
- name: 'shouldRename',
84
- message: 'Would you like the installer to rename these folders for you?',
85
- default: true,
109
+ type: 'list',
110
+ name: 'proceed',
111
+ message: 'What would you like to do?',
112
+ choices: [
113
+ {
114
+ name: 'Cancel and do a fresh install (recommended)',
115
+ value: 'cancel',
116
+ short: 'Cancel installation',
117
+ },
118
+ {
119
+ name: 'Proceed anyway (will attempt update, potentially may fail or have unstable behavior)',
120
+ value: 'proceed',
121
+ short: 'Proceed with update',
122
+ },
123
+ ],
124
+ default: 'cancel',
86
125
  },
87
126
  ]);
88
127
 
89
- if (!shouldRename) {
90
- console.log(chalk.red('\n❌ Installation cancelled'));
91
- console.log(chalk.dim('You must manually rename the folders before proceeding:'));
92
- if (hasLegacyBmadFolder) {
93
- console.log(chalk.dim(` Rename ".bmad" to "_bmad"`));
94
- }
95
- if (hasLegacyCfg) {
96
- console.log(chalk.dim(` • Rename "_cfg" to "_config"`));
97
- }
128
+ if (proceed === 'cancel') {
129
+ console.log('');
130
+ console.log(chalk.cyan('To do a fresh install:'));
131
+ console.log(chalk.dim(' 1. Delete the existing bmad folder in your project'));
132
+ console.log(chalk.dim(" 2. Run 'bmad install' again"));
133
+ console.log('');
98
134
  process.exit(0);
99
135
  return;
100
136
  }
101
137
 
102
- // Perform the renames
103
138
  const ora = require('ora');
104
139
  const spinner = ora('Updating folder structure...').start();
105
-
106
140
  try {
107
- // First rename .bmad to _bmad if needed
141
+ // Handle .bmad folder
108
142
  if (hasLegacyBmadFolder) {
109
143
  const newBmadPath = path.join(confirmedDirectory, '_bmad');
110
144
  await fs.move(legacyBmadPath, newBmadPath);
@@ -112,16 +146,14 @@ class UI {
112
146
  spinner.succeed('Renamed ".bmad" to "_bmad"');
113
147
  }
114
148
 
115
- // Then rename _cfg to _config if needed
116
- if (hasLegacyCfg) {
149
+ // Handle _cfg folder (either from .bmad or standalone)
150
+ const cfgPath = path.join(bmadDir, '_cfg');
151
+ if (await fs.pathExists(cfgPath)) {
117
152
  spinner.start('Renaming configuration folder...');
118
- const oldCfgPath = path.join(bmadDir, '_cfg');
119
153
  const newCfgPath = path.join(bmadDir, '_config');
120
- await fs.move(oldCfgPath, newCfgPath);
154
+ await fs.move(cfgPath, newCfgPath);
121
155
  spinner.succeed('Renamed "_cfg" to "_config"');
122
156
  }
123
-
124
- spinner.succeed('Folder structure updated successfully');
125
157
  } catch (error) {
126
158
  spinner.fail('Failed to update folder structure');
127
159
  console.error(chalk.red(`Error: ${error.message}`));
@@ -173,11 +205,20 @@ class UI {
173
205
  // Only show action menu if there's an existing installation
174
206
  if (hasExistingInstall) {
175
207
  // Get version information
176
- const { existingInstall } = await this.getExistingInstallation(confirmedDirectory);
208
+ const { existingInstall, bmadDir } = await this.getExistingInstallation(confirmedDirectory);
177
209
  const packageJsonPath = path.join(__dirname, '../../../package.json');
178
210
  const currentVersion = require(packageJsonPath).version;
179
211
  const installedVersion = existingInstall.version || 'unknown';
180
212
 
213
+ // Check if version is too old and warn user
214
+ const shouldProceed = await this.showOldAlphaVersionWarning(installedVersion, currentVersion, path.basename(bmadDir));
215
+
216
+ // If user chose to cancel, exit the installer
217
+ if (!shouldProceed) {
218
+ process.exit(0);
219
+ return;
220
+ }
221
+
181
222
  // Build menu choices dynamically
182
223
  const choices = [];
183
224
 
@@ -662,7 +703,7 @@ class UI {
662
703
  /**
663
704
  * Get existing installation info and installed modules
664
705
  * @param {string} directory - Installation directory
665
- * @returns {Object} Object with existingInstall and installedModuleIds
706
+ * @returns {Object} Object with existingInstall, installedModuleIds, and bmadDir
666
707
  */
667
708
  async getExistingInstallation(directory) {
668
709
  const { Detector } = require('../installers/lib/core/detector');
@@ -670,10 +711,11 @@ class UI {
670
711
  const detector = new Detector();
671
712
  const installer = new Installer();
672
713
  const bmadDirResult = await installer.findBmadDir(directory);
673
- const existingInstall = await detector.detect(bmadDirResult.bmadDir);
714
+ const bmadDir = bmadDirResult.bmadDir;
715
+ const existingInstall = await detector.detect(bmadDir);
674
716
  const installedModuleIds = new Set(existingInstall.modules.map((mod) => mod.id));
675
717
 
676
- return { existingInstall, installedModuleIds };
718
+ return { existingInstall, installedModuleIds, bmadDir };
677
719
  }
678
720
 
679
721
  /**
@@ -1457,6 +1499,144 @@ class UI {
1457
1499
 
1458
1500
  return result;
1459
1501
  }
1502
+
1503
+ /**
1504
+ * Parse alpha version string (e.g., "6.0.0-Alpha.20")
1505
+ * @param {string} version - Version string
1506
+ * @returns {Object|null} Object with alphaNumber and fullVersion, or null if invalid
1507
+ */
1508
+ parseAlphaVersion(version) {
1509
+ if (!version || version === 'unknown') {
1510
+ return null;
1511
+ }
1512
+
1513
+ // Remove 'v' prefix if present
1514
+ const cleanVersion = version.toString().replace(/^v/i, '');
1515
+
1516
+ // Match alpha version pattern: X.Y.Z-Alpha.N (case-insensitive)
1517
+ const match = cleanVersion.match(/[\d.]+-Alpha\.(\d+)/i);
1518
+
1519
+ if (!match) {
1520
+ return null;
1521
+ }
1522
+
1523
+ return {
1524
+ alphaNumber: parseInt(match[1], 10),
1525
+ fullVersion: cleanVersion,
1526
+ };
1527
+ }
1528
+
1529
+ /**
1530
+ * Check if installed version is more than 2 alpha versions behind current
1531
+ * @param {string} installedVersion - The installed version
1532
+ * @param {string} currentVersion - The current version
1533
+ * @returns {Object} Object with { isOldVersion, versionDiff, shouldWarn, installed, current }
1534
+ */
1535
+ checkAlphaVersionAge(installedVersion, currentVersion) {
1536
+ const installed = this.parseAlphaVersion(installedVersion);
1537
+ const current = this.parseAlphaVersion(currentVersion);
1538
+
1539
+ // If we can't parse either version, don't warn
1540
+ if (!installed || !current) {
1541
+ return { isOldVersion: false, versionDiff: 0, shouldWarn: false };
1542
+ }
1543
+
1544
+ // Calculate alpha version difference
1545
+ const versionDiff = current.alphaNumber - installed.alphaNumber;
1546
+
1547
+ // Consider it old if more than 2 versions behind
1548
+ const isOldVersion = versionDiff > 2;
1549
+
1550
+ return {
1551
+ isOldVersion,
1552
+ versionDiff,
1553
+ shouldWarn: isOldVersion,
1554
+ installed: installed.fullVersion,
1555
+ current: current.fullVersion,
1556
+ installedAlpha: installed.alphaNumber,
1557
+ currentAlpha: current.alphaNumber,
1558
+ };
1559
+ }
1560
+
1561
+ /**
1562
+ * Show warning for old alpha version and ask if user wants to proceed
1563
+ * @param {string} installedVersion - The installed version
1564
+ * @param {string} currentVersion - The current version
1565
+ * @param {string} bmadFolderName - Name of the BMAD folder
1566
+ * @returns {Promise<boolean>} True if user wants to proceed, false if they cancel
1567
+ */
1568
+ async showOldAlphaVersionWarning(installedVersion, currentVersion, bmadFolderName) {
1569
+ const versionInfo = this.checkAlphaVersionAge(installedVersion, currentVersion);
1570
+
1571
+ // Also warn if version is unknown or can't be parsed (legacy/unsupported)
1572
+ const isUnknownVersion = installedVersion === 'unknown' || !versionInfo.installed;
1573
+
1574
+ if (!versionInfo.shouldWarn && !isUnknownVersion) {
1575
+ return true; // Not old, proceed
1576
+ }
1577
+
1578
+ console.log('');
1579
+ console.log(chalk.yellow.bold('⚠️ VERSION WARNING'));
1580
+ console.log(chalk.yellow('─'.repeat(80)));
1581
+
1582
+ if (isUnknownVersion) {
1583
+ console.log(chalk.yellow('Unable to detect your installed BMAD version.'));
1584
+ console.log(chalk.yellow('This appears to be a legacy or unsupported installation.'));
1585
+ console.log('');
1586
+ console.log(chalk.dim('For stability, we only support updates from the previous 2 alpha versions.'));
1587
+ console.log(chalk.dim('Legacy installations may have compatibility issues.'));
1588
+ } else {
1589
+ console.log(chalk.yellow(`You are updating from ${versionInfo.installed} to ${versionInfo.current}.`));
1590
+ console.log(chalk.yellow(`This is ${versionInfo.versionDiff} alpha versions behind.`));
1591
+ console.log('');
1592
+ console.log(chalk.dim(`For stability, we only support updates from the previous 2 alpha versions`));
1593
+ console.log(chalk.dim(`(Alpha.${versionInfo.currentAlpha - 2} through Alpha.${versionInfo.currentAlpha - 1}).`));
1594
+ }
1595
+
1596
+ console.log('');
1597
+ console.log(chalk.dim('For the best experience, we recommend:'));
1598
+ console.log(chalk.dim(' 1. Delete your current BMAD installation folder'));
1599
+ console.log(chalk.dim(` (the "${bmadFolderName}/" folder in your project)`));
1600
+ console.log(chalk.dim(' 2. Run a fresh installation'));
1601
+ console.log('');
1602
+ console.log(chalk.dim('Benefits of a fresh install:'));
1603
+ console.log(chalk.dim(' • Cleaner configuration without legacy artifacts'));
1604
+ console.log(chalk.dim(' • All new features properly configured'));
1605
+ console.log(chalk.dim(' • Fewer potential conflicts'));
1606
+ console.log(chalk.yellow('─'.repeat(80)));
1607
+ console.log('');
1608
+
1609
+ const { proceed } = await inquirer.prompt([
1610
+ {
1611
+ type: 'list',
1612
+ name: 'proceed',
1613
+ message: 'What would you like to do?',
1614
+ choices: [
1615
+ {
1616
+ name: 'Proceed with update anyway (may have issues)',
1617
+ value: 'proceed',
1618
+ short: 'Proceed with update',
1619
+ },
1620
+ {
1621
+ name: 'Cancel (recommended - do a fresh install instead)',
1622
+ value: 'cancel',
1623
+ short: 'Cancel installation',
1624
+ },
1625
+ ],
1626
+ default: 'cancel',
1627
+ },
1628
+ ]);
1629
+
1630
+ if (proceed === 'cancel') {
1631
+ console.log('');
1632
+ console.log(chalk.cyan('To do a fresh install:'));
1633
+ console.log(chalk.dim(` 1. Delete the "${bmadFolderName}/" folder in your project`));
1634
+ console.log(chalk.dim(" 2. Run 'bmad install' again"));
1635
+ console.log('');
1636
+ }
1637
+
1638
+ return proceed === 'proceed';
1639
+ }
1460
1640
  }
1461
1641
 
1462
1642
  module.exports = { UI };