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,630 @@
1
+ /**
2
+ * BMAD Documentation Build Pipeline
3
+ *
4
+ * Consolidates docs from multiple sources, generates LLM-friendly files,
5
+ * creates downloadable bundles, and builds the Docusaurus site.
6
+ *
7
+ * Build outputs:
8
+ * build/consolidated/ - Merged docs from all sources
9
+ * build/artifacts/ - With llms.txt, llms-full.txt, ZIPs
10
+ * build/site/ - Final Docusaurus output (deployable)
11
+ */
12
+
13
+ const { execSync } = require('node:child_process');
14
+ const fs = require('node:fs');
15
+ const path = require('node:path');
16
+ const archiver = require('archiver');
17
+
18
+ // =============================================================================
19
+ // Configuration
20
+ // =============================================================================
21
+
22
+ const PROJECT_ROOT = path.dirname(__dirname);
23
+ const BUILD_DIR = path.join(PROJECT_ROOT, 'build');
24
+
25
+ const SITE_URL = process.env.SITE_URL || 'https://bmad-code-org.github.io/BMAD-METHOD';
26
+ const REPO_URL = 'https://github.com/bmad-code-org/BMAD-METHOD';
27
+
28
+ const LLM_MAX_CHARS = 600_000;
29
+ const LLM_WARN_CHARS = 500_000;
30
+
31
+ const MODULES = ['bmm', 'bmb', 'bmgd', 'cis'];
32
+
33
+ // No root docs copied - only docs/ folder content goes to site
34
+ // README.md, CHANGELOG.md etc. link to GitHub
35
+ const ROOT_DOCS = [];
36
+
37
+ const LLM_EXCLUDE_PATTERNS = ['changelog', 'ide-info/', 'v4-to-v6-upgrade', 'downloads/', 'faq'];
38
+
39
+ // =============================================================================
40
+ // Main Entry Point
41
+ // =============================================================================
42
+
43
+ async function main() {
44
+ console.log();
45
+ printBanner('BMAD Documentation Build Pipeline');
46
+ console.log();
47
+ console.log(`Project root: ${PROJECT_ROOT}`);
48
+ console.log(`Build directory: ${BUILD_DIR}`);
49
+ console.log();
50
+
51
+ cleanBuildDirectory();
52
+
53
+ const consolidatedDir = consolidateDocs();
54
+ const artifactsDir = await generateArtifacts(consolidatedDir);
55
+ const siteDir = buildDocusaurusSite(artifactsDir);
56
+
57
+ printBuildSummary(consolidatedDir, artifactsDir, siteDir);
58
+ }
59
+
60
+ main().catch((error) => {
61
+ console.error(error);
62
+ process.exit(1);
63
+ });
64
+
65
+ // =============================================================================
66
+ // Pipeline Stages
67
+ // =============================================================================
68
+
69
+ function consolidateDocs() {
70
+ printHeader('Consolidating documentation sources');
71
+
72
+ const outputDir = path.join(BUILD_DIR, 'consolidated');
73
+ fs.mkdirSync(outputDir, { recursive: true });
74
+
75
+ copyMainDocs(outputDir);
76
+ copyRootDocs(outputDir);
77
+ copyModuleDocs(outputDir);
78
+
79
+ const mdCount = countMarkdownFiles(outputDir);
80
+ console.log();
81
+ console.log(` \u001B[32m✓\u001B[0m Consolidation complete: ${mdCount} markdown files`);
82
+
83
+ return outputDir;
84
+ }
85
+
86
+ async function generateArtifacts(consolidatedDir) {
87
+ printHeader('Generating LLM files and download bundles');
88
+
89
+ const outputDir = path.join(BUILD_DIR, 'artifacts');
90
+ copyDirectory(consolidatedDir, outputDir);
91
+
92
+ generateLlmsTxt(outputDir);
93
+ generateLlmsFullTxt(outputDir);
94
+ await generateDownloadBundles(outputDir);
95
+
96
+ console.log();
97
+ console.log(` \u001B[32m✓\u001B[0m Artifact generation complete`);
98
+
99
+ return outputDir;
100
+ }
101
+
102
+ function buildDocusaurusSite(artifactsDir) {
103
+ printHeader('Building Docusaurus site');
104
+
105
+ const siteDir = path.join(BUILD_DIR, 'site');
106
+ const mainDocs = path.join(PROJECT_ROOT, 'docs');
107
+ const docsBackup = path.join(BUILD_DIR, 'docs-backup');
108
+
109
+ backupAndReplaceDocs(mainDocs, docsBackup, artifactsDir);
110
+
111
+ try {
112
+ runDocusaurusBuild(siteDir);
113
+ } finally {
114
+ restoreDocs(mainDocs, docsBackup);
115
+ }
116
+
117
+ copyArtifactsToSite(artifactsDir, siteDir);
118
+
119
+ console.log();
120
+ console.log(` \u001B[32m✓\u001B[0m Docusaurus build complete`);
121
+
122
+ return siteDir;
123
+ }
124
+
125
+ // =============================================================================
126
+ // Documentation Consolidation
127
+ // =============================================================================
128
+
129
+ function copyMainDocs(destDir) {
130
+ console.log(' → Copying main docs...');
131
+ const docsDir = path.join(PROJECT_ROOT, 'docs');
132
+ copyDirectory(docsDir, destDir, ['modules', 'llms.txt', 'llms-full.txt'], true);
133
+ }
134
+
135
+ function copyRootDocs(destDir) {
136
+ console.log(' → Copying root documentation files...');
137
+
138
+ for (const doc of ROOT_DOCS) {
139
+ const srcPath = path.join(PROJECT_ROOT, doc.src);
140
+ const destPath = path.join(destDir, doc.dest);
141
+
142
+ if (fs.existsSync(srcPath)) {
143
+ let content = fs.readFileSync(srcPath, 'utf-8');
144
+
145
+ if (!content.startsWith('---')) {
146
+ content = `---\ntitle: "${doc.title}"\n---\n\n${content}`;
147
+ }
148
+
149
+ content = transformMarkdownLinks(content);
150
+ fs.writeFileSync(destPath, content);
151
+ console.log(` ${doc.src} → ${doc.dest}`);
152
+ }
153
+ }
154
+ }
155
+
156
+ function copyModuleDocs(destDir) {
157
+ fs.mkdirSync(path.join(destDir, 'modules'), { recursive: true });
158
+
159
+ for (const moduleName of MODULES) {
160
+ const srcPath = path.join(PROJECT_ROOT, 'src', 'modules', moduleName, 'docs');
161
+ const moduleDest = path.join(destDir, 'modules', moduleName);
162
+
163
+ if (fs.existsSync(srcPath)) {
164
+ console.log(` → Copying ${moduleName} docs...`);
165
+ copyDirectory(srcPath, moduleDest, [], false, moduleName);
166
+ const count = countMarkdownFiles(moduleDest);
167
+ console.log(` ${count} markdown files`);
168
+ } else {
169
+ console.log(` ⚠ WARNING: ${moduleName} docs not found`);
170
+ }
171
+ }
172
+ }
173
+
174
+ // =============================================================================
175
+ // LLM File Generation
176
+ // =============================================================================
177
+
178
+ function generateLlmsTxt(outputDir) {
179
+ console.log(' → Generating llms.txt...');
180
+
181
+ const content = [
182
+ '# BMAD Method Documentation',
183
+ '',
184
+ '> AI-driven agile development with specialized agents and workflows that scale from bug fixes to enterprise platforms.',
185
+ '',
186
+ `Documentation: ${SITE_URL}`,
187
+ `Repository: ${REPO_URL}`,
188
+ `Full docs: ${SITE_URL}/llms-full.txt`,
189
+ '',
190
+ '## Quick Start',
191
+ '',
192
+ `- **[Quick Start](${SITE_URL}/docs/modules/bmm/quick-start)** - Get started with BMAD Method`,
193
+ `- **[Installation](${SITE_URL}/docs/getting-started/installation)** - Installation guide`,
194
+ '',
195
+ '## Core Concepts',
196
+ '',
197
+ `- **[Scale Adaptive System](${SITE_URL}/docs/modules/bmm/scale-adaptive-system)** - Understand BMAD scaling`,
198
+ `- **[Quick Flow](${SITE_URL}/docs/modules/bmm/bmad-quick-flow)** - Fast development workflow`,
199
+ `- **[Party Mode](${SITE_URL}/docs/modules/bmm/party-mode)** - Multi-agent collaboration`,
200
+ '',
201
+ '## Modules',
202
+ '',
203
+ `- **[BMM - Method](${SITE_URL}/docs/modules/bmm/quick-start)** - Core methodology module`,
204
+ `- **[BMB - Builder](${SITE_URL}/docs/modules/bmb/)** - Agent and workflow builder`,
205
+ `- **[BMGD - Game Dev](${SITE_URL}/docs/modules/bmgd/quick-start)** - Game development module`,
206
+ '',
207
+ '---',
208
+ '',
209
+ '## Quick Links',
210
+ '',
211
+ `- [Full Documentation (llms-full.txt)](${SITE_URL}/llms-full.txt) - Complete docs for AI context`,
212
+ `- [Source Bundle](${SITE_URL}/downloads/bmad-sources.zip) - Complete source code`,
213
+ `- [Prompts Bundle](${SITE_URL}/downloads/bmad-prompts.zip) - Agent prompts and workflows`,
214
+ '',
215
+ ].join('\n');
216
+
217
+ const outputPath = path.join(outputDir, 'llms.txt');
218
+ fs.writeFileSync(outputPath, content, 'utf-8');
219
+ console.log(` Generated llms.txt (${content.length.toLocaleString()} chars)`);
220
+ }
221
+
222
+ function generateLlmsFullTxt(outputDir) {
223
+ console.log(' → Generating llms-full.txt...');
224
+
225
+ const date = new Date().toISOString().split('T')[0];
226
+ const files = getDocsFromSidebar();
227
+
228
+ const output = [
229
+ '# BMAD Method Documentation (Full)',
230
+ '',
231
+ '> Complete documentation for AI consumption',
232
+ `> Generated: ${date}`,
233
+ `> Repository: ${REPO_URL}`,
234
+ '',
235
+ ];
236
+
237
+ let fileCount = 0;
238
+ let skippedCount = 0;
239
+
240
+ for (const mdPath of files) {
241
+ if (shouldExcludeFromLlm(mdPath)) {
242
+ skippedCount++;
243
+ continue;
244
+ }
245
+
246
+ const fullPath = path.join(outputDir, mdPath);
247
+ try {
248
+ const content = readMarkdownContent(fullPath);
249
+ output.push(`<document path="${mdPath}">`, content, '</document>', '');
250
+ fileCount++;
251
+ } catch (error) {
252
+ console.error(` Warning: Could not read ${mdPath}: ${error.message}`);
253
+ }
254
+ }
255
+
256
+ const result = output.join('\n');
257
+ validateLlmSize(result);
258
+
259
+ const outputPath = path.join(outputDir, 'llms-full.txt');
260
+ fs.writeFileSync(outputPath, result, 'utf-8');
261
+
262
+ const tokenEstimate = Math.floor(result.length / 4).toLocaleString();
263
+ console.log(
264
+ ` Processed ${fileCount} files (skipped ${skippedCount}), ${result.length.toLocaleString()} chars (~${tokenEstimate} tokens)`,
265
+ );
266
+ }
267
+
268
+ function getDocsFromSidebar() {
269
+ const sidebarsPath = path.join(PROJECT_ROOT, 'website', 'sidebars.js');
270
+
271
+ try {
272
+ const sidebarContent = fs.readFileSync(sidebarsPath, 'utf-8');
273
+ const matches = sidebarContent.matchAll(/'([a-zA-Z0-9\-_/]+)'/g);
274
+ const files = [];
275
+
276
+ for (const match of matches) {
277
+ const docId = match[1];
278
+ // Skip Docusaurus keywords
279
+ if (docId.includes('Sidebar') || docId === 'doc' || docId === 'category') {
280
+ continue;
281
+ }
282
+ // Skip category labels (Title Case words without slashes like 'Workflows', 'Reference')
283
+ if (!docId.includes('/') && /^[A-Z][a-z]/.test(docId)) {
284
+ continue;
285
+ }
286
+ files.push(docId + '.md');
287
+ }
288
+
289
+ return files;
290
+ } catch {
291
+ console.log(' Warning: Could not parse sidebars');
292
+ return [];
293
+ }
294
+ }
295
+
296
+ function shouldExcludeFromLlm(filePath) {
297
+ return LLM_EXCLUDE_PATTERNS.some((pattern) => filePath.includes(pattern));
298
+ }
299
+
300
+ function readMarkdownContent(filePath) {
301
+ let content = fs.readFileSync(filePath, 'utf-8');
302
+
303
+ if (content.startsWith('---')) {
304
+ const end = content.indexOf('---', 3);
305
+ if (end !== -1) {
306
+ content = content.slice(end + 3).trim();
307
+ }
308
+ }
309
+
310
+ return content;
311
+ }
312
+
313
+ function validateLlmSize(content) {
314
+ const charCount = content.length;
315
+
316
+ if (charCount > LLM_MAX_CHARS) {
317
+ console.error(` ERROR: Exceeds ${LLM_MAX_CHARS.toLocaleString()} char limit`);
318
+ process.exit(1);
319
+ } else if (charCount > LLM_WARN_CHARS) {
320
+ console.warn(` \u001B[33mWARNING: Approaching ${LLM_WARN_CHARS.toLocaleString()} char limit\u001B[0m`);
321
+ }
322
+ }
323
+
324
+ // =============================================================================
325
+ // Download Bundle Generation
326
+ // =============================================================================
327
+
328
+ async function generateDownloadBundles(outputDir) {
329
+ console.log(' → Generating download bundles...');
330
+
331
+ const downloadsDir = path.join(outputDir, 'downloads');
332
+ fs.mkdirSync(downloadsDir, { recursive: true });
333
+
334
+ await generateSourcesBundle(downloadsDir);
335
+ await generatePromptsBundle(downloadsDir);
336
+ }
337
+
338
+ async function generateSourcesBundle(downloadsDir) {
339
+ const srcDir = path.join(PROJECT_ROOT, 'src');
340
+ if (!fs.existsSync(srcDir)) return;
341
+
342
+ const zipPath = path.join(downloadsDir, 'bmad-sources.zip');
343
+ await createZipArchive(srcDir, zipPath, ['__pycache__', '.pyc', '.DS_Store', 'node_modules']);
344
+
345
+ const size = (fs.statSync(zipPath).size / 1024 / 1024).toFixed(1);
346
+ console.log(` bmad-sources.zip (${size}M)`);
347
+ }
348
+
349
+ async function generatePromptsBundle(downloadsDir) {
350
+ const modulesDir = path.join(PROJECT_ROOT, 'src', 'modules');
351
+ if (!fs.existsSync(modulesDir)) return;
352
+
353
+ const zipPath = path.join(downloadsDir, 'bmad-prompts.zip');
354
+ await createZipArchive(modulesDir, zipPath, ['docs', '.DS_Store', '__pycache__', 'node_modules']);
355
+
356
+ const size = Math.floor(fs.statSync(zipPath).size / 1024);
357
+ console.log(` bmad-prompts.zip (${size}K)`);
358
+ }
359
+
360
+ // =============================================================================
361
+ // Docusaurus Build
362
+ // =============================================================================
363
+
364
+ function backupAndReplaceDocs(mainDocs, backupDir, artifactsDir) {
365
+ console.log(' → Preparing docs for Docusaurus...');
366
+
367
+ if (fs.existsSync(mainDocs)) {
368
+ copyDirectory(mainDocs, backupDir);
369
+ fs.rmSync(mainDocs, { recursive: true });
370
+ }
371
+
372
+ copyDirectory(artifactsDir, mainDocs, ['llms.txt', 'llms-full.txt']);
373
+ removeZipFiles(path.join(mainDocs, 'downloads'));
374
+ }
375
+
376
+ function runDocusaurusBuild(siteDir) {
377
+ console.log(' → Running docusaurus build...');
378
+ execSync('npx docusaurus build --config website/docusaurus.config.js --out-dir ' + siteDir, {
379
+ cwd: PROJECT_ROOT,
380
+ stdio: 'inherit',
381
+ });
382
+ }
383
+
384
+ function restoreDocs(mainDocs, backupDir) {
385
+ console.log(' → Restoring original docs...');
386
+ fs.rmSync(mainDocs, { recursive: true });
387
+
388
+ if (fs.existsSync(backupDir)) {
389
+ copyDirectory(backupDir, mainDocs);
390
+ fs.rmSync(backupDir, { recursive: true });
391
+ }
392
+ }
393
+
394
+ function copyArtifactsToSite(artifactsDir, siteDir) {
395
+ console.log(' → Copying artifacts to site...');
396
+
397
+ fs.copyFileSync(path.join(artifactsDir, 'llms.txt'), path.join(siteDir, 'llms.txt'));
398
+ fs.copyFileSync(path.join(artifactsDir, 'llms-full.txt'), path.join(siteDir, 'llms-full.txt'));
399
+
400
+ const downloadsDir = path.join(artifactsDir, 'downloads');
401
+ if (fs.existsSync(downloadsDir)) {
402
+ copyDirectory(downloadsDir, path.join(siteDir, 'downloads'));
403
+ }
404
+ }
405
+
406
+ function removeZipFiles(dir) {
407
+ if (!fs.existsSync(dir)) return;
408
+
409
+ for (const file of fs.readdirSync(dir)) {
410
+ if (file.endsWith('.zip')) {
411
+ fs.unlinkSync(path.join(dir, file));
412
+ }
413
+ }
414
+ }
415
+
416
+ // =============================================================================
417
+ // Build Summary
418
+ // =============================================================================
419
+
420
+ function printBuildSummary(consolidatedDir, artifactsDir, siteDir) {
421
+ console.log();
422
+ printBanner('Build Complete!');
423
+ console.log();
424
+ console.log('Build artifacts:');
425
+ console.log(` Consolidated docs: ${consolidatedDir}`);
426
+ console.log(` Generated files: ${artifactsDir}`);
427
+ console.log(` Final site: ${siteDir}`);
428
+ console.log();
429
+ console.log(`Deployable output: ${siteDir}/`);
430
+ console.log();
431
+
432
+ listDirectoryContents(siteDir);
433
+ }
434
+
435
+ function listDirectoryContents(dir) {
436
+ const entries = fs.readdirSync(dir).slice(0, 15);
437
+
438
+ for (const entry of entries) {
439
+ const fullPath = path.join(dir, entry);
440
+ const stat = fs.statSync(fullPath);
441
+
442
+ if (stat.isFile()) {
443
+ const sizeStr = formatFileSize(stat.size);
444
+ console.log(` ${entry.padEnd(40)} ${sizeStr.padStart(8)}`);
445
+ } else {
446
+ console.log(` ${entry}/`);
447
+ }
448
+ }
449
+ }
450
+
451
+ function formatFileSize(bytes) {
452
+ if (bytes > 1024 * 1024) {
453
+ return `${(bytes / 1024 / 1024).toFixed(1)}M`;
454
+ } else if (bytes > 1024) {
455
+ return `${Math.floor(bytes / 1024)}K`;
456
+ }
457
+ return `${bytes}B`;
458
+ }
459
+
460
+ // =============================================================================
461
+ // File System Utilities
462
+ // =============================================================================
463
+
464
+ function cleanBuildDirectory() {
465
+ console.log('Cleaning previous build...');
466
+
467
+ if (fs.existsSync(BUILD_DIR)) {
468
+ fs.rmSync(BUILD_DIR, { recursive: true });
469
+ }
470
+ fs.mkdirSync(BUILD_DIR, { recursive: true });
471
+ }
472
+
473
+ function copyDirectory(src, dest, exclude = [], transformMd = false, moduleName = null) {
474
+ if (!fs.existsSync(src)) return false;
475
+ fs.mkdirSync(dest, { recursive: true });
476
+
477
+ for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
478
+ if (exclude.includes(entry.name)) continue;
479
+
480
+ const srcPath = path.join(src, entry.name);
481
+ const destPath = path.join(dest, entry.name);
482
+
483
+ if (entry.isDirectory()) {
484
+ copyDirectory(srcPath, destPath, exclude, transformMd, moduleName);
485
+ } else if (entry.name.endsWith('.md')) {
486
+ // Always transform markdown links, use module context if provided
487
+ let content = fs.readFileSync(srcPath, 'utf-8');
488
+ content = transformMarkdownLinks(content, moduleName);
489
+ fs.writeFileSync(destPath, content);
490
+ } else {
491
+ fs.copyFileSync(srcPath, destPath);
492
+ }
493
+ }
494
+ return true;
495
+ }
496
+
497
+ function transformMarkdownLinks(content, moduleName = null) {
498
+ // Transform HTML img src attributes for module docs images
499
+ content = content.replaceAll(/src="\.\/src\/modules\/([^/]+)\/docs\/images\/([^"]+)"/g, (match, mod, file) => {
500
+ return `src="./modules/${mod}/images/${file}"`;
501
+ });
502
+
503
+ return content.replaceAll(/\]\(([^)]+)\)/g, (match, url) => {
504
+ // src/modules/{mod}/docs/{path}.md → ./modules/{mod}/{path}.md
505
+ // Keeps .md - Docusaurus handles .md → page conversion
506
+ const docsMatch = url.match(/^\.\.?\/src\/modules\/([^/]+)\/docs\/(.+\.md)$/);
507
+ if (docsMatch) return `](./modules/${docsMatch[1]}/${docsMatch[2]})`;
508
+
509
+ // src/modules/{mod}/docs/ → ./modules/{mod}/
510
+ const docsDirMatch = url.match(/^\.\.?\/src\/modules\/([^/]+)\/docs\/$/);
511
+ if (docsDirMatch) return `](./modules/${docsDirMatch[1]}/)`;
512
+
513
+ // src/modules/{mod}/docs/images/{file} → ./modules/{mod}/images/{file}
514
+ const docsImageMatch = url.match(/^\.\.?\/src\/modules\/([^/]+)\/docs\/images\/(.+)$/);
515
+ if (docsImageMatch) return `](./modules/${docsImageMatch[1]}/images/${docsImageMatch[2]})`;
516
+
517
+ // src/modules/{mod}/README.md → GitHub (not in docs folder)
518
+ const readmeMatch = url.match(/^\.\.?\/src\/modules\/([^/]+)\/README\.md$/i);
519
+ if (readmeMatch) return `](${REPO_URL}/blob/main/src/modules/${readmeMatch[1]}/README.md)`;
520
+
521
+ // src/modules/* (non-docs) → GitHub
522
+ const srcMatch = url.match(/^\.\.?\/src\/modules\/(.+)$/);
523
+ if (srcMatch) return `](${REPO_URL}/tree/main/src/modules/${srcMatch[1]})`;
524
+
525
+ // Relative paths escaping docs/ folder → GitHub (when module context is known)
526
+ // e.g., ../workflows/foo/bar.md from within docs/ → src/modules/{mod}/workflows/foo/bar.md
527
+ if (moduleName) {
528
+ const relativeEscapeMatch = url.match(/^\.\.\/([^.][^)]+)$/);
529
+ if (relativeEscapeMatch && !relativeEscapeMatch[1].startsWith('src/')) {
530
+ const relativePath = relativeEscapeMatch[1];
531
+ return `](${REPO_URL}/blob/main/src/modules/${moduleName}/${relativePath})`;
532
+ }
533
+ }
534
+
535
+ // ./docs/{path}.md → ./{path}.md (docs folder contents are at root in build)
536
+ // Keeps .md - Docusaurus handles .md → page conversion
537
+ const rootDocsMatch = url.match(/^\.\/docs\/(.+\.md)$/);
538
+ if (rootDocsMatch) return `](./${rootDocsMatch[1]})`;
539
+
540
+ // Root docs → GitHub (not part of docs site)
541
+ if (url === '../README.md' || url === './README.md' || url === './project-readme') {
542
+ return `](${REPO_URL}/blob/main/README.md)`;
543
+ }
544
+ if (url === '../CHANGELOG.md' || url === './CHANGELOG.md' || url === './changelog') {
545
+ return `](${REPO_URL}/blob/main/CHANGELOG.md)`;
546
+ }
547
+
548
+ // Root files → GitHub (CONTRIBUTING, LICENSE, CODE_OF_CONDUCT, etc.)
549
+ const contributingMatch = url.match(/^(\.\.\/)?CONTRIBUTING\.md(#.*)?$/);
550
+ if (contributingMatch) {
551
+ const anchor = contributingMatch[2] || '';
552
+ return `](${REPO_URL}/blob/main/CONTRIBUTING.md${anchor})`;
553
+ }
554
+ if (url === 'LICENSE' || url === '../LICENSE') {
555
+ return `](${REPO_URL}/blob/main/LICENSE)`;
556
+ }
557
+ if (url === '.github/CODE_OF_CONDUCT.md' || url === '../.github/CODE_OF_CONDUCT.md') {
558
+ return `](${REPO_URL}/blob/main/.github/CODE_OF_CONDUCT.md)`;
559
+ }
560
+
561
+ // Other root .md files → GitHub
562
+ const rootFileMatch = url.match(/^\.\.\/([A-Z][^/]+\.md)$/);
563
+ if (rootFileMatch) return `](${REPO_URL}/blob/main/${rootFileMatch[1]})`;
564
+
565
+ // Cross-module doc links: ../../{mod}/docs/{path}.md → ../{mod}/{path}.md
566
+ // Fixes path structure but keeps .md (Docusaurus handles .md → page conversion)
567
+ const crossModuleDocsMatch = url.match(/^\.\.\/\.\.\/([^/]+)\/docs\/(.+\.md)$/);
568
+ if (crossModuleDocsMatch) return `](../${crossModuleDocsMatch[1]}/${crossModuleDocsMatch[2]})`;
569
+
570
+ // Root-level folders (samples/) → GitHub
571
+ const rootFolderMatch = url.match(/^\.\.\/((samples)\/.*)/);
572
+ if (rootFolderMatch) return `](${REPO_URL}/blob/main/${rootFolderMatch[1]})`;
573
+
574
+ return match;
575
+ });
576
+ }
577
+
578
+ function countMarkdownFiles(dir) {
579
+ let count = 0;
580
+ if (!fs.existsSync(dir)) return 0;
581
+
582
+ for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
583
+ const fullPath = path.join(dir, entry.name);
584
+ if (entry.isDirectory()) {
585
+ count += countMarkdownFiles(fullPath);
586
+ } else if (entry.name.endsWith('.md')) {
587
+ count++;
588
+ }
589
+ }
590
+ return count;
591
+ }
592
+
593
+ function createZipArchive(sourceDir, outputPath, exclude = []) {
594
+ return new Promise((resolve, reject) => {
595
+ const output = fs.createWriteStream(outputPath);
596
+ const archive = archiver('zip', { zlib: { level: 9 } });
597
+
598
+ output.on('close', resolve);
599
+ archive.on('error', reject);
600
+
601
+ archive.pipe(output);
602
+
603
+ const baseName = path.basename(sourceDir);
604
+ archive.directory(sourceDir, baseName, (entry) => {
605
+ for (const pattern of exclude) {
606
+ if (entry.name.includes(pattern)) return false;
607
+ }
608
+ return entry;
609
+ });
610
+
611
+ archive.finalize();
612
+ });
613
+ }
614
+
615
+ // =============================================================================
616
+ // Console Output Formatting
617
+ // =============================================================================
618
+
619
+ function printHeader(title) {
620
+ console.log();
621
+ console.log('┌' + '─'.repeat(62) + '┐');
622
+ console.log(`│ ${title.padEnd(60)} │`);
623
+ console.log('└' + '─'.repeat(62) + '┘');
624
+ }
625
+
626
+ function printBanner(title) {
627
+ console.log('╔' + '═'.repeat(62) + '╗');
628
+ console.log(`║${title.padStart(31 + title.length / 2).padEnd(62)}║`);
629
+ console.log('╚' + '═'.repeat(62) + '╝');
630
+ }
@@ -26,11 +26,12 @@ module.exports = {
26
26
  const result = await installer.quickUpdate(config);
27
27
  console.log(chalk.green('\n✨ Quick update complete!'));
28
28
  console.log(chalk.cyan(`Updated ${result.moduleCount} modules with preserved settings`));
29
- console.log(
30
- chalk.magenta(
31
- "\n📋 Want to see what's new? Check out the changelog: https://github.com/bmad-code-org/BMAD-METHOD/blob/main/CHANGELOG.md",
32
- ),
33
- );
29
+
30
+ // Display version-specific end message
31
+ const { MessageLoader } = require('../installers/lib/message-loader');
32
+ const messageLoader = new MessageLoader();
33
+ messageLoader.displayEndMessage();
34
+
34
35
  process.exit(0);
35
36
  return;
36
37
  }
@@ -97,6 +98,11 @@ module.exports = {
97
98
  }
98
99
  }
99
100
 
101
+ // Display version-specific end message from install-messages.yaml
102
+ const { MessageLoader } = require('../installers/lib/message-loader');
103
+ const messageLoader = new MessageLoader();
104
+ messageLoader.displayEndMessage();
105
+
100
106
  process.exit(0);
101
107
  }
102
108
  } catch (error) {