bmad-method 6.0.0-alpha.16 → 6.0.0-alpha.18

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 (643) hide show
  1. package/.coderabbit.yaml +7 -3
  2. package/.github/scripts/discord-helpers.sh +21 -2
  3. package/.github/workflows/discord.yaml +31 -7
  4. package/.github/workflows/manual-release.yaml +12 -42
  5. package/.markdownlint-cli2.yaml +2 -2
  6. package/.prettierignore +2 -2
  7. package/.vscode/settings.json +1 -1
  8. package/CHANGELOG.md +193 -2
  9. package/LICENSE +1 -1
  10. package/README.md +29 -2
  11. package/docs/agent-customization-guide.md +10 -10
  12. package/docs/custom-content-installation.md +100 -196
  13. package/docs/custom-content.md +122 -0
  14. package/docs/ide-info/crush.md +1 -1
  15. package/docs/ide-info/cursor.md +7 -7
  16. package/docs/ide-info/iflow.md +3 -3
  17. package/docs/ide-info/opencode.md +1 -1
  18. package/docs/ide-info/rovo-dev.md +1 -1
  19. package/docs/index.md +2 -2
  20. package/docs/installers-bundlers/ide-injections.md +2 -2
  21. package/docs/installers-bundlers/installers-modules-platforms-reference.md +13 -13
  22. package/docs/sample-custom-modules/README.md +11 -0
  23. package/docs/sample-custom-modules/sample-unitary-module/README.md +8 -0
  24. package/docs/sample-custom-modules/sample-unitary-module/agents/commit-poet/commit-poet.agent.yaml +129 -0
  25. package/docs/sample-custom-modules/sample-unitary-module/agents/toolsmith/toolsmith-sidecar/instructions.md +70 -0
  26. package/docs/sample-custom-modules/sample-unitary-module/agents/toolsmith/toolsmith-sidecar/knowledge/bundlers.md +111 -0
  27. package/docs/sample-custom-modules/sample-unitary-module/agents/toolsmith/toolsmith-sidecar/knowledge/deploy.md +70 -0
  28. package/docs/sample-custom-modules/sample-unitary-module/agents/toolsmith/toolsmith-sidecar/knowledge/docs.md +114 -0
  29. package/docs/sample-custom-modules/sample-unitary-module/agents/toolsmith/toolsmith-sidecar/knowledge/installers.md +134 -0
  30. package/docs/sample-custom-modules/sample-unitary-module/agents/toolsmith/toolsmith-sidecar/knowledge/modules.md +161 -0
  31. package/docs/sample-custom-modules/sample-unitary-module/agents/toolsmith/toolsmith-sidecar/knowledge/tests.md +103 -0
  32. package/docs/sample-custom-modules/sample-unitary-module/agents/toolsmith/toolsmith-sidecar/memories.md +17 -0
  33. package/docs/sample-custom-modules/sample-unitary-module/agents/toolsmith/toolsmith.agent.yaml +109 -0
  34. package/docs/sample-custom-modules/sample-unitary-module/module.yaml +8 -0
  35. package/docs/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-01-init.md +168 -0
  36. package/docs/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-02-q1.md +155 -0
  37. package/docs/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-03-q2.md +89 -0
  38. package/docs/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-04-q3.md +36 -0
  39. package/docs/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-05-q4.md +36 -0
  40. package/docs/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-06-q5.md +36 -0
  41. package/docs/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-07-q6.md +36 -0
  42. package/docs/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-08-q7.md +36 -0
  43. package/docs/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-09-q8.md +36 -0
  44. package/docs/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-10-q9.md +36 -0
  45. package/docs/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-11-q10.md +36 -0
  46. package/docs/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-12-results.md +150 -0
  47. package/docs/sample-custom-modules/sample-unitary-module/workflows/quiz-master/templates/csv-headers.template +1 -0
  48. package/docs/sample-custom-modules/sample-unitary-module/workflows/quiz-master/workflow.md +54 -0
  49. package/docs/sample-custom-modules/sample-unitary-module/workflows/wassup/workflow.md +26 -0
  50. package/docs/sample-custom-modules/sample-wellness-module/README.md +6 -0
  51. package/docs/sample-custom-modules/sample-wellness-module/agents/meditation-guide.agent.yaml +136 -0
  52. package/docs/sample-custom-modules/sample-wellness-module/agents/wellness-companion/foo.md +3 -0
  53. package/docs/sample-custom-modules/sample-wellness-module/agents/wellness-companion/wellness-companion-sidecar/addition1.md +1 -0
  54. package/docs/sample-custom-modules/sample-wellness-module/agents/wellness-companion/wellness-companion-sidecar/insights.md +13 -0
  55. package/docs/sample-custom-modules/sample-wellness-module/agents/wellness-companion/wellness-companion-sidecar/instructions.md +30 -0
  56. package/docs/sample-custom-modules/sample-wellness-module/agents/wellness-companion/wellness-companion-sidecar/memories.md +13 -0
  57. package/docs/sample-custom-modules/sample-wellness-module/agents/wellness-companion/wellness-companion-sidecar/patterns.md +17 -0
  58. package/docs/sample-custom-modules/sample-wellness-module/agents/wellness-companion/wellness-companion.agent.yaml +120 -0
  59. package/docs/sample-custom-modules/sample-wellness-module/module.yaml +17 -0
  60. package/docs/sample-custom-modules/sample-wellness-module/workflows/daily-checkin/README.md +32 -0
  61. package/docs/sample-custom-modules/sample-wellness-module/workflows/daily-checkin/workflow.md +45 -0
  62. package/docs/sample-custom-modules/sample-wellness-module/workflows/guided-meditation/README.md +31 -0
  63. package/docs/sample-custom-modules/sample-wellness-module/workflows/guided-meditation/workflow.md +45 -0
  64. package/docs/sample-custom-modules/sample-wellness-module/workflows/wellness-journal/README.md +31 -0
  65. package/docs/sample-custom-modules/sample-wellness-module/workflows/wellness-journal/workflow.md +45 -0
  66. package/docs/v4-to-v6-upgrade.md +27 -27
  67. package/docs/web-bundles-gemini-gpt-guide.md +6 -458
  68. package/eslint.config.mjs +2 -2
  69. package/package.json +1 -1
  70. package/src/core/agents/bmad-master.agent.yaml +6 -11
  71. package/src/core/module.yaml +11 -18
  72. package/src/core/resources/excalidraw/README.md +6 -6
  73. package/src/core/tasks/advanced-elicitation.xml +3 -3
  74. package/src/core/tasks/index-docs.xml +1 -1
  75. package/src/core/tasks/validate-workflow.xml +1 -1
  76. package/src/core/tasks/workflow.xml +4 -4
  77. package/src/core/tools/shard-doc.xml +12 -12
  78. package/src/core/workflows/brainstorming/workflow.md +3 -3
  79. package/src/core/workflows/party-mode/steps/step-01-agent-loading.md +2 -2
  80. package/src/core/workflows/party-mode/workflow.md +4 -4
  81. package/src/modules/bmb/agents/bmad-builder.agent.yaml +15 -15
  82. package/src/modules/bmb/{README.md → docs/README.md} +15 -27
  83. package/src/modules/bmb/docs/agents/agent-compilation.md +3 -3
  84. package/src/modules/bmb/docs/agents/agent-menu-patterns.md +23 -24
  85. package/src/modules/bmb/docs/agents/expert-agent-architecture.md +20 -21
  86. package/src/modules/bmb/docs/agents/simple-agent-architecture.md +17 -52
  87. package/src/modules/bmb/docs/agents/understanding-agent-types.md +6 -6
  88. package/src/modules/bmb/docs/workflows/architecture.md +1 -1
  89. package/src/modules/bmb/docs/workflows/common-workflow-tools.csv +3 -3
  90. package/src/modules/bmb/docs/workflows/templates/step-01-init-continuable-template.md +1 -1
  91. package/src/modules/bmb/docs/workflows/templates/step-1b-template.md +1 -1
  92. package/src/modules/bmb/docs/workflows/templates/step-file.md +3 -3
  93. package/src/modules/bmb/docs/workflows/templates/step-template.md +3 -3
  94. package/src/modules/bmb/docs/workflows/templates/workflow-template.md +2 -2
  95. package/src/modules/bmb/docs/workflows/templates/workflow.md +1 -1
  96. package/src/modules/bmb/module.yaml +6 -15
  97. package/src/modules/bmb/reference/agents/expert-examples/journal-keeper/journal-keeper.agent.yaml +7 -7
  98. package/src/modules/bmb/reference/agents/module-examples/README.md +3 -4
  99. package/src/modules/bmb/reference/agents/module-examples/security-engineer.agent.yaml +5 -5
  100. package/src/modules/bmb/reference/agents/module-examples/trend-analyst.agent.yaml +7 -7
  101. package/src/modules/bmb/reference/agents/simple-examples/README.md +1 -1
  102. package/src/modules/bmb/reference/agents/simple-examples/commit-poet.agent.yaml +1 -1
  103. package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-01-init.md +1 -1
  104. package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-01b-continue.md +1 -1
  105. package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-02-profile.md +3 -3
  106. package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-03-assessment.md +3 -3
  107. package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-04-strategy.md +5 -5
  108. package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-05-shopping.md +5 -5
  109. package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-06-prep-schedule.md +5 -5
  110. package/src/modules/bmb/reference/workflows/meal-prep-nutrition/workflow.md +2 -2
  111. package/src/modules/bmb/workflows/create-agent/data/reference/agents/module-examples/README.md +1 -3
  112. package/src/modules/bmb/workflows/create-agent/data/reference/agents/module-examples/security-engineer.agent.yaml +6 -6
  113. package/src/modules/bmb/workflows/create-agent/data/reference/agents/module-examples/trend-analyst.agent.yaml +7 -7
  114. package/src/modules/bmb/workflows/create-agent/data/reference/agents/simple-examples/README.md +1 -1
  115. package/src/modules/bmb/workflows/create-agent/data/reference/agents/simple-examples/commit-poet.agent.yaml +1 -1
  116. package/src/modules/bmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/steps/step-01-init.md +1 -1
  117. package/src/modules/bmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/steps/step-01b-continue.md +1 -1
  118. package/src/modules/bmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/steps/step-02-profile.md +3 -3
  119. package/src/modules/bmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/steps/step-03-assessment.md +3 -3
  120. package/src/modules/bmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/steps/step-04-strategy.md +5 -5
  121. package/src/modules/bmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/steps/step-05-shopping.md +5 -5
  122. package/src/modules/bmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/steps/step-06-prep-schedule.md +5 -5
  123. package/src/modules/bmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/workflow.md +2 -2
  124. package/src/modules/bmb/workflows/create-agent/data/validation-complete.md +3 -3
  125. package/src/modules/bmb/workflows/create-agent/steps/step-01-brainstorm.md +4 -4
  126. package/src/modules/bmb/workflows/create-agent/steps/step-02-discover.md +6 -10
  127. package/src/modules/bmb/workflows/create-agent/steps/step-03-persona.md +6 -6
  128. package/src/modules/bmb/workflows/create-agent/steps/step-04-commands.md +9 -9
  129. package/src/modules/bmb/workflows/create-agent/steps/step-05-name.md +6 -5
  130. package/src/modules/bmb/workflows/create-agent/steps/step-06-build.md +19 -57
  131. package/src/modules/bmb/workflows/create-agent/steps/step-07-validate.md +5 -5
  132. package/src/modules/bmb/workflows/create-agent/steps/{step-11-celebrate.md → step-08-celebrate.md} +2 -6
  133. package/src/modules/bmb/workflows/create-agent/templates/agent-plan.template.md +3 -0
  134. package/src/modules/bmb/workflows/create-agent/templates/expert-agent.template.md +364 -0
  135. package/src/modules/bmb/workflows/create-agent/templates/simple-agent.template.md +257 -0
  136. package/src/modules/bmb/workflows/create-agent/workflow.md +2 -35
  137. package/src/modules/bmb/workflows/create-module/steps/step-01-init.md +4 -4
  138. package/src/modules/bmb/workflows/create-module/steps/step-01b-continue.md +2 -2
  139. package/src/modules/bmb/workflows/create-module/steps/step-02-concept.md +4 -4
  140. package/src/modules/bmb/workflows/create-module/steps/step-03-components.md +4 -4
  141. package/src/modules/bmb/workflows/create-module/steps/step-04-structure.md +6 -6
  142. package/src/modules/bmb/workflows/create-module/steps/step-05-config.md +5 -5
  143. package/src/modules/bmb/workflows/create-module/steps/step-06-agents.md +8 -8
  144. package/src/modules/bmb/workflows/create-module/steps/step-07-workflows.md +5 -5
  145. package/src/modules/bmb/workflows/create-module/steps/step-08-installer.md +8 -8
  146. package/src/modules/bmb/workflows/create-module/steps/step-09-documentation.md +7 -7
  147. package/src/modules/bmb/workflows/create-module/steps/step-10-roadmap.md +7 -7
  148. package/src/modules/bmb/workflows/create-module/steps/step-11-validate.md +6 -6
  149. package/src/modules/bmb/workflows/create-module/templates/agent.template.md +15 -19
  150. package/src/modules/bmb/workflows/create-module/templates/module.template.yaml +1 -1
  151. package/src/modules/bmb/workflows/create-module/workflow.md +3 -3
  152. package/src/modules/bmb/workflows/create-workflow/steps/step-01-init.md +4 -4
  153. package/src/modules/bmb/workflows/create-workflow/steps/step-02-gather.md +6 -6
  154. package/src/modules/bmb/workflows/create-workflow/steps/step-03-tools-configuration.md +5 -5
  155. package/src/modules/bmb/workflows/create-workflow/steps/step-04-plan-review.md +4 -4
  156. package/src/modules/bmb/workflows/create-workflow/steps/step-05-output-format-design.md +4 -4
  157. package/src/modules/bmb/workflows/create-workflow/steps/step-06-design.md +11 -11
  158. package/src/modules/bmb/workflows/create-workflow/steps/step-07-build.md +14 -14
  159. package/src/modules/bmb/workflows/create-workflow/steps/step-08-review.md +4 -4
  160. package/src/modules/bmb/workflows/create-workflow/steps/step-09-complete.md +2 -2
  161. package/src/modules/bmb/workflows/create-workflow/workflow.md +2 -2
  162. package/src/modules/bmb/workflows/edit-agent/steps/step-01-discover-intent.md +2 -2
  163. package/src/modules/bmb/workflows/edit-agent/steps/step-02-analyze-agent.md +12 -12
  164. package/src/modules/bmb/workflows/edit-agent/steps/step-03-propose-changes.md +4 -4
  165. package/src/modules/bmb/workflows/edit-agent/steps/step-04-apply-changes.md +2 -2
  166. package/src/modules/bmb/workflows/edit-agent/steps/step-05-validate.md +4 -4
  167. package/src/modules/bmb/workflows/edit-agent/workflow.md +1 -1
  168. package/src/modules/bmb/workflows/edit-workflow/steps/step-01-analyze.md +4 -4
  169. package/src/modules/bmb/workflows/edit-workflow/steps/step-02-discover.md +3 -3
  170. package/src/modules/bmb/workflows/edit-workflow/steps/step-03-improve.md +6 -6
  171. package/src/modules/bmb/workflows/edit-workflow/steps/step-04-validate.md +3 -3
  172. package/src/modules/bmb/workflows/edit-workflow/steps/step-05-compliance-check.md +3 -3
  173. package/src/modules/bmb/workflows/edit-workflow/workflow.md +1 -1
  174. package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-01-validate-goal.md +3 -3
  175. package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-02-workflow-validation.md +5 -5
  176. package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-03-step-validation.md +6 -6
  177. package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-04-file-validation.md +4 -4
  178. package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-05-intent-spectrum-validation.md +4 -4
  179. package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-06-web-subprocess-validation.md +4 -4
  180. package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-07-holistic-analysis.md +4 -4
  181. package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-08-generate-report.md +3 -3
  182. package/src/modules/bmb/workflows/workflow-compliance-check/workflow.md +1 -1
  183. package/src/modules/bmb/workflows-legacy/edit-module/README.md +1 -17
  184. package/src/modules/bmb/workflows-legacy/edit-module/checklist.md +3 -4
  185. package/src/modules/bmb/workflows-legacy/edit-module/instructions.md +4 -5
  186. package/src/modules/bmb/workflows-legacy/edit-module/workflow.yaml +10 -10
  187. package/src/modules/bmb/workflows-legacy/module-brief/README.md +2 -2
  188. package/src/modules/bmb/workflows-legacy/module-brief/instructions.md +2 -2
  189. package/src/modules/bmb/workflows-legacy/module-brief/workflow.yaml +4 -4
  190. package/src/modules/bmgd/README.md +1 -1
  191. package/src/modules/bmgd/_module-installer/installer.js +160 -0
  192. package/src/modules/bmgd/_module-installer/platform-specifics/claude-code.js +23 -0
  193. package/src/modules/bmgd/_module-installer/platform-specifics/windsurf.js +18 -0
  194. package/src/modules/bmgd/agents/game-architect.agent.yaml +26 -11
  195. package/src/modules/bmgd/agents/game-designer.agent.yaml +41 -21
  196. package/src/modules/bmgd/agents/game-dev.agent.yaml +34 -18
  197. package/src/modules/bmgd/agents/game-qa.agent.yaml +64 -0
  198. package/src/modules/bmgd/agents/game-scrum-master.agent.yaml +32 -44
  199. package/src/modules/bmgd/agents/game-solo-dev.agent.yaml +56 -0
  200. package/src/modules/bmgd/docs/README.md +180 -0
  201. package/src/modules/bmgd/docs/agents-guide.md +407 -0
  202. package/src/modules/bmgd/docs/game-types-guide.md +503 -0
  203. package/src/modules/bmgd/docs/glossary.md +294 -0
  204. package/src/modules/bmgd/docs/quick-flow-guide.md +288 -0
  205. package/src/modules/bmgd/docs/quick-start.md +250 -0
  206. package/src/modules/bmgd/docs/troubleshooting.md +259 -0
  207. package/src/modules/bmgd/docs/workflow-overview.jpg +0 -0
  208. package/src/modules/bmgd/docs/workflows-guide.md +463 -0
  209. package/src/modules/bmgd/gametest/knowledge/balance-testing.md +220 -0
  210. package/src/modules/bmgd/gametest/knowledge/certification-testing.md +319 -0
  211. package/src/modules/bmgd/gametest/knowledge/compatibility-testing.md +228 -0
  212. package/src/modules/bmgd/gametest/knowledge/godot-testing.md +376 -0
  213. package/src/modules/bmgd/gametest/knowledge/input-testing.md +315 -0
  214. package/src/modules/bmgd/gametest/knowledge/localization-testing.md +304 -0
  215. package/src/modules/bmgd/gametest/knowledge/multiplayer-testing.md +322 -0
  216. package/src/modules/bmgd/gametest/knowledge/performance-testing.md +204 -0
  217. package/src/modules/bmgd/gametest/knowledge/playtesting.md +384 -0
  218. package/src/modules/bmgd/gametest/knowledge/qa-automation.md +190 -0
  219. package/src/modules/bmgd/gametest/knowledge/regression-testing.md +280 -0
  220. package/src/modules/bmgd/gametest/knowledge/save-testing.md +280 -0
  221. package/src/modules/bmgd/gametest/knowledge/smoke-testing.md +404 -0
  222. package/src/modules/bmgd/gametest/knowledge/test-priorities.md +271 -0
  223. package/src/modules/bmgd/gametest/knowledge/unity-testing.md +383 -0
  224. package/src/modules/bmgd/gametest/knowledge/unreal-testing.md +388 -0
  225. package/src/modules/bmgd/gametest/qa-index.csv +17 -0
  226. package/src/modules/bmgd/module.yaml +27 -16
  227. package/src/modules/bmgd/teams/default-party.csv +2 -0
  228. package/src/modules/bmgd/teams/team-gamedev.yaml +12 -1
  229. package/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/instructions.md +1 -1
  230. package/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/steps/step-01-init.md +164 -0
  231. package/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/steps/step-02-context.md +210 -0
  232. package/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/steps/step-03-ideation.md +289 -0
  233. package/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/steps/step-04-complete.md +275 -0
  234. package/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/workflow.md +49 -0
  235. package/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/workflow.yaml +35 -14
  236. package/src/modules/bmgd/workflows/1-preproduction/game-brief/instructions.md +1 -1
  237. package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-01-init.md +223 -0
  238. package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-01b-continue.md +151 -0
  239. package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-02-vision.md +218 -0
  240. package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-03-market.md +218 -0
  241. package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-04-fundamentals.md +231 -0
  242. package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-05-scope.md +242 -0
  243. package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-06-references.md +224 -0
  244. package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-07-content.md +282 -0
  245. package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-08-complete.md +296 -0
  246. package/src/modules/bmgd/workflows/1-preproduction/game-brief/workflow.md +62 -0
  247. package/src/modules/bmgd/workflows/1-preproduction/game-brief/workflow.yaml +43 -12
  248. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-01-init.md +248 -0
  249. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-01b-continue.md +173 -0
  250. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-02-context.md +332 -0
  251. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-03-platforms.md +245 -0
  252. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-04-vision.md +229 -0
  253. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-05-core-gameplay.md +258 -0
  254. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-06-mechanics.md +249 -0
  255. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-07-game-type.md +266 -0
  256. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-08-progression.md +272 -0
  257. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-09-levels.md +264 -0
  258. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-10-art-audio.md +255 -0
  259. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-11-technical.md +275 -0
  260. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-12-epics.md +284 -0
  261. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-13-metrics.md +250 -0
  262. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-14-complete.md +335 -0
  263. package/src/modules/bmgd/workflows/2-design/gdd/workflow.md +61 -0
  264. package/src/modules/bmgd/workflows/2-design/gdd/workflow.yaml +54 -34
  265. package/src/modules/bmgd/workflows/2-design/narrative/instructions-narrative.md +1 -1
  266. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-01-init.md +228 -0
  267. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-01b-continue.md +163 -0
  268. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-02-foundation.md +262 -0
  269. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-03-story.md +238 -0
  270. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-04-characters.md +297 -0
  271. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-05-world.md +262 -0
  272. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-06-dialogue.md +250 -0
  273. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-07-environmental.md +244 -0
  274. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-08-delivery.md +264 -0
  275. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-09-integration.md +254 -0
  276. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-10-production.md +262 -0
  277. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-11-complete.md +331 -0
  278. package/src/modules/bmgd/workflows/2-design/narrative/workflow.md +57 -0
  279. package/src/modules/bmgd/workflows/2-design/narrative/workflow.yaml +55 -10
  280. package/src/modules/bmgd/workflows/3-technical/game-architecture/instructions.md +1 -1
  281. package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-01-init.md +223 -0
  282. package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-01b-continue.md +153 -0
  283. package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-02-context.md +262 -0
  284. package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-03-starter.md +290 -0
  285. package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-04-decisions.md +300 -0
  286. package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-05-crosscutting.md +319 -0
  287. package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-06-structure.md +304 -0
  288. package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-07-patterns.md +349 -0
  289. package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-08-validation.md +293 -0
  290. package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-09-complete.md +302 -0
  291. package/src/modules/bmgd/workflows/3-technical/game-architecture/workflow.md +55 -0
  292. package/src/modules/bmgd/workflows/3-technical/game-architecture/workflow.yaml +51 -22
  293. package/src/modules/bmgd/workflows/4-production/code-review/checklist.md +23 -0
  294. package/src/modules/bmgd/workflows/4-production/code-review/instructions.xml +225 -0
  295. package/src/modules/bmgd/workflows/4-production/code-review/workflow.yaml +19 -16
  296. package/src/modules/bmgd/workflows/4-production/correct-course/checklist.md +1 -1
  297. package/src/modules/bmgd/workflows/4-production/correct-course/instructions.md +2 -2
  298. package/src/modules/bmgd/workflows/4-production/correct-course/workflow.yaml +12 -7
  299. package/src/modules/bmgd/workflows/4-production/create-story/checklist.md +332 -214
  300. package/src/modules/bmgd/workflows/4-production/create-story/instructions.xml +298 -0
  301. package/src/modules/bmgd/workflows/4-production/create-story/template.md +3 -5
  302. package/src/modules/bmgd/workflows/4-production/create-story/workflow.yaml +13 -8
  303. package/src/modules/bmgd/workflows/4-production/dev-story/checklist.md +65 -23
  304. package/src/modules/bmgd/workflows/4-production/dev-story/instructions.xml +409 -0
  305. package/src/modules/bmgd/workflows/4-production/dev-story/workflow.yaml +14 -4
  306. package/src/modules/bmgd/workflows/4-production/retrospective/instructions.md +5 -5
  307. package/src/modules/bmgd/workflows/4-production/retrospective/workflow.yaml +14 -9
  308. package/src/modules/bmgd/workflows/4-production/sprint-planning/instructions.md +33 -42
  309. package/src/modules/bmgd/workflows/4-production/sprint-planning/sprint-status-template.yaml +13 -13
  310. package/src/modules/bmgd/workflows/4-production/sprint-planning/workflow.yaml +7 -2
  311. package/src/modules/bmgd/workflows/4-production/sprint-status/instructions.md +229 -0
  312. package/src/modules/bmgd/workflows/4-production/sprint-status/workflow.yaml +35 -0
  313. package/src/modules/bmgd/workflows/bmgd-quick-flow/create-tech-spec/instructions.md +140 -0
  314. package/src/modules/bmgd/workflows/bmgd-quick-flow/create-tech-spec/workflow.yaml +27 -0
  315. package/src/modules/bmgd/workflows/bmgd-quick-flow/quick-dev/checklist.md +37 -0
  316. package/src/modules/bmgd/workflows/bmgd-quick-flow/quick-dev/instructions.md +220 -0
  317. package/src/modules/bmgd/workflows/bmgd-quick-flow/quick-dev/workflow.yaml +45 -0
  318. package/src/modules/bmgd/workflows/bmgd-quick-flow/quick-prototype/checklist.md +26 -0
  319. package/src/modules/bmgd/workflows/bmgd-quick-flow/quick-prototype/instructions.md +156 -0
  320. package/src/modules/bmgd/workflows/bmgd-quick-flow/quick-prototype/workflow.yaml +36 -0
  321. package/src/modules/bmgd/workflows/gametest/automate/checklist.md +93 -0
  322. package/src/modules/bmgd/workflows/gametest/automate/instructions.md +317 -0
  323. package/src/modules/bmgd/workflows/gametest/automate/workflow.yaml +50 -0
  324. package/src/modules/bmgd/workflows/gametest/performance/checklist.md +96 -0
  325. package/src/modules/bmgd/workflows/gametest/performance/instructions.md +323 -0
  326. package/src/modules/bmgd/workflows/gametest/performance/performance-template.md +256 -0
  327. package/src/modules/bmgd/workflows/gametest/performance/workflow.yaml +48 -0
  328. package/src/modules/bmgd/workflows/gametest/playtest-plan/checklist.md +93 -0
  329. package/src/modules/bmgd/workflows/gametest/playtest-plan/instructions.md +297 -0
  330. package/src/modules/bmgd/workflows/gametest/playtest-plan/playtest-template.md +208 -0
  331. package/src/modules/bmgd/workflows/gametest/playtest-plan/workflow.yaml +59 -0
  332. package/src/modules/bmgd/workflows/gametest/test-design/checklist.md +98 -0
  333. package/src/modules/bmgd/workflows/gametest/test-design/instructions.md +280 -0
  334. package/src/modules/bmgd/workflows/gametest/test-design/test-design-template.md +205 -0
  335. package/src/modules/bmgd/workflows/gametest/test-design/workflow.yaml +47 -0
  336. package/src/modules/bmgd/workflows/gametest/test-framework/checklist.md +103 -0
  337. package/src/modules/bmgd/workflows/gametest/test-framework/instructions.md +348 -0
  338. package/src/modules/bmgd/workflows/gametest/test-framework/workflow.yaml +48 -0
  339. package/src/modules/bmgd/workflows/gametest/test-review/checklist.md +87 -0
  340. package/src/modules/bmgd/workflows/gametest/test-review/instructions.md +272 -0
  341. package/src/modules/bmgd/workflows/gametest/test-review/test-review-template.md +203 -0
  342. package/src/modules/bmgd/workflows/gametest/test-review/workflow.yaml +48 -0
  343. package/src/modules/bmgd/workflows/workflow-status/init/instructions.md +299 -0
  344. package/src/modules/bmgd/workflows/workflow-status/init/workflow.yaml +29 -0
  345. package/src/modules/bmgd/workflows/workflow-status/instructions.md +395 -0
  346. package/src/modules/bmgd/workflows/workflow-status/paths/gamedev-brownfield.yaml +65 -0
  347. package/src/modules/bmgd/workflows/workflow-status/paths/gamedev-greenfield.yaml +71 -0
  348. package/src/modules/bmgd/workflows/workflow-status/paths/quickflow-brownfield.yaml +29 -0
  349. package/src/modules/bmgd/workflows/workflow-status/paths/quickflow-greenfield.yaml +39 -0
  350. package/src/modules/bmgd/workflows/workflow-status/project-levels.yaml +63 -0
  351. package/src/modules/bmgd/workflows/workflow-status/workflow-status-template.yaml +24 -0
  352. package/src/modules/bmgd/workflows/workflow-status/workflow.yaml +30 -0
  353. package/src/modules/bmm/README.md +1 -1
  354. package/src/modules/bmm/agents/analyst.agent.yaml +9 -9
  355. package/src/modules/bmm/agents/architect.agent.yaml +8 -8
  356. package/src/modules/bmm/agents/dev.agent.yaml +5 -5
  357. package/src/modules/bmm/agents/pm.agent.yaml +8 -8
  358. package/src/modules/bmm/agents/quick-flow-solo-dev.agent.yaml +5 -5
  359. package/src/modules/bmm/agents/sm.agent.yaml +11 -11
  360. package/src/modules/bmm/agents/tea.agent.yaml +13 -13
  361. package/src/modules/bmm/agents/tech-writer.agent.yaml +9 -9
  362. package/src/modules/bmm/agents/ux-designer.agent.yaml +6 -6
  363. package/src/modules/bmm/docs/agents-guide.md +16 -14
  364. package/src/modules/bmm/docs/brownfield-guide.md +6 -6
  365. package/src/modules/bmm/docs/enterprise-agentic-development.md +3 -3
  366. package/src/modules/bmm/docs/faq.md +5 -18
  367. package/src/modules/bmm/docs/glossary.md +3 -4
  368. package/src/modules/bmm/docs/images/README.md +1 -1
  369. package/src/modules/bmm/docs/images/workflow-method-greenfield.excalidraw +8 -8
  370. package/src/modules/bmm/docs/party-mode.md +3 -3
  371. package/src/modules/bmm/docs/quick-flow-solo-dev.md +5 -5
  372. package/src/modules/bmm/docs/quick-spec-flow.md +2 -16
  373. package/src/modules/bmm/docs/quick-start.md +3 -3
  374. package/src/modules/bmm/docs/test-architecture.md +15 -23
  375. package/src/modules/bmm/docs/troubleshooting.md +6 -25
  376. package/src/modules/bmm/docs/workflow-document-project-reference.md +1 -1
  377. package/src/modules/bmm/docs/workflows-implementation.md +3 -4
  378. package/src/modules/bmm/module.yaml +25 -23
  379. package/src/modules/bmm/testarch/knowledge/overview.md +0 -1
  380. package/src/modules/bmm/workflows/1-analysis/{product-brief → create-product-brief}/steps/step-01-init.md +1 -1
  381. package/src/modules/bmm/workflows/1-analysis/{product-brief → create-product-brief}/steps/step-01b-continue.md +1 -1
  382. package/src/modules/bmm/workflows/1-analysis/{product-brief → create-product-brief}/steps/step-02-vision.md +3 -3
  383. package/src/modules/bmm/workflows/1-analysis/{product-brief → create-product-brief}/steps/step-03-users.md +3 -3
  384. package/src/modules/bmm/workflows/1-analysis/{product-brief → create-product-brief}/steps/step-04-metrics.md +3 -3
  385. package/src/modules/bmm/workflows/1-analysis/{product-brief → create-product-brief}/steps/step-05-scope.md +3 -3
  386. package/src/modules/bmm/workflows/1-analysis/{product-brief → create-product-brief}/steps/step-06-complete.md +1 -1
  387. package/src/modules/bmm/workflows/1-analysis/{product-brief → create-product-brief}/workflow.md +2 -2
  388. package/src/modules/bmm/workflows/1-analysis/research/workflow.md +2 -2
  389. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-02-discovery.md +4 -4
  390. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-03-core-experience.md +4 -4
  391. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-04-emotional-response.md +4 -4
  392. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-05-inspiration.md +4 -4
  393. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-06-design-system.md +4 -4
  394. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-07-defining-experience.md +4 -4
  395. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-08-visual-foundation.md +4 -4
  396. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-09-design-directions.md +4 -4
  397. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-10-user-journeys.md +4 -4
  398. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-11-component-strategy.md +4 -4
  399. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-12-ux-patterns.md +4 -4
  400. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-13-responsive-accessibility.md +4 -4
  401. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/workflow.md +2 -2
  402. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-01-init.md +1 -1
  403. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-01b-continue.md +1 -1
  404. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-02-discovery.md +3 -3
  405. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-03-success.md +7 -7
  406. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-04-journeys.md +8 -8
  407. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-05-domain.md +12 -12
  408. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-06-innovation.md +12 -12
  409. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-07-project-type.md +10 -10
  410. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-08-scoping.md +7 -7
  411. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-09-functional.md +9 -9
  412. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-10-nonfunctional.md +9 -9
  413. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-11-complete.md +1 -1
  414. package/src/modules/bmm/workflows/2-plan-workflows/prd/workflow.md +2 -2
  415. package/src/modules/bmm/workflows/3-solutioning/{implementation-readiness → check-implementation-readiness}/steps/step-01-document-discovery.md +1 -1
  416. package/src/modules/bmm/workflows/3-solutioning/{implementation-readiness → check-implementation-readiness}/steps/step-02-prd-analysis.md +1 -1
  417. package/src/modules/bmm/workflows/3-solutioning/{implementation-readiness → check-implementation-readiness}/steps/step-03-epic-coverage-validation.md +1 -1
  418. package/src/modules/bmm/workflows/3-solutioning/{implementation-readiness → check-implementation-readiness}/steps/step-04-ux-alignment.md +1 -1
  419. package/src/modules/bmm/workflows/3-solutioning/{implementation-readiness → check-implementation-readiness}/steps/step-05-epic-quality-review.md +2 -2
  420. package/src/modules/bmm/workflows/3-solutioning/{implementation-readiness → check-implementation-readiness}/steps/step-06-final-assessment.md +1 -1
  421. package/src/modules/bmm/workflows/3-solutioning/{implementation-readiness → check-implementation-readiness}/workflow.md +1 -1
  422. package/src/modules/bmm/workflows/3-solutioning/{architecture → create-architecture}/steps/step-01-init.md +1 -1
  423. package/src/modules/bmm/workflows/3-solutioning/{architecture → create-architecture}/steps/step-02-context.md +4 -4
  424. package/src/modules/bmm/workflows/3-solutioning/{architecture → create-architecture}/steps/step-03-starter.md +4 -4
  425. package/src/modules/bmm/workflows/3-solutioning/{architecture → create-architecture}/steps/step-04-decisions.md +4 -4
  426. package/src/modules/bmm/workflows/3-solutioning/{architecture → create-architecture}/steps/step-05-patterns.md +4 -4
  427. package/src/modules/bmm/workflows/3-solutioning/{architecture → create-architecture}/steps/step-06-structure.md +4 -4
  428. package/src/modules/bmm/workflows/3-solutioning/{architecture → create-architecture}/steps/step-07-validation.md +4 -4
  429. package/src/modules/bmm/workflows/3-solutioning/{architecture → create-architecture}/steps/step-08-complete.md +3 -3
  430. package/src/modules/bmm/workflows/3-solutioning/{architecture → create-architecture}/workflow.md +2 -2
  431. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-01-validate-prerequisites.md +3 -3
  432. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-02-design-epics.md +3 -3
  433. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-03-create-stories.md +3 -3
  434. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-04-final-validation.md +3 -3
  435. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/workflow.md +3 -3
  436. package/src/modules/bmm/workflows/4-implementation/code-review/instructions.xml +4 -3
  437. package/src/modules/bmm/workflows/4-implementation/code-review/workflow.yaml +2 -2
  438. package/src/modules/bmm/workflows/4-implementation/correct-course/checklist.md +1 -1
  439. package/src/modules/bmm/workflows/4-implementation/correct-course/instructions.md +2 -2
  440. package/src/modules/bmm/workflows/4-implementation/correct-course/workflow.yaml +2 -2
  441. package/src/modules/bmm/workflows/4-implementation/create-story/checklist.md +2 -2
  442. package/src/modules/bmm/workflows/4-implementation/create-story/instructions.xml +5 -5
  443. package/src/modules/bmm/workflows/4-implementation/create-story/template.md +3 -5
  444. package/src/modules/bmm/workflows/4-implementation/create-story/workflow.yaml +2 -2
  445. package/src/modules/bmm/workflows/4-implementation/dev-story/checklist.md +2 -2
  446. package/src/modules/bmm/workflows/4-implementation/dev-story/instructions.xml +11 -8
  447. package/src/modules/bmm/workflows/4-implementation/dev-story/workflow.yaml +2 -2
  448. package/src/modules/bmm/workflows/4-implementation/retrospective/instructions.md +3 -3
  449. package/src/modules/bmm/workflows/4-implementation/retrospective/workflow.yaml +3 -3
  450. package/src/modules/bmm/workflows/4-implementation/sprint-planning/instructions.md +15 -22
  451. package/src/modules/bmm/workflows/4-implementation/sprint-planning/sprint-status-template.yaml +4 -5
  452. package/src/modules/bmm/workflows/4-implementation/sprint-planning/workflow.yaml +2 -2
  453. package/src/modules/bmm/workflows/4-implementation/sprint-status/instructions.md +90 -35
  454. package/src/modules/bmm/workflows/4-implementation/sprint-status/workflow.yaml +2 -2
  455. package/src/modules/bmm/workflows/bmad-quick-flow/create-tech-spec/workflow.yaml +5 -5
  456. package/src/modules/bmm/workflows/bmad-quick-flow/quick-dev/workflow.yaml +7 -7
  457. package/src/modules/bmm/workflows/document-project/instructions.md +5 -5
  458. package/src/modules/bmm/workflows/document-project/workflow.yaml +2 -2
  459. package/src/modules/bmm/workflows/document-project/workflows/deep-dive.yaml +5 -5
  460. package/src/modules/bmm/workflows/document-project/workflows/full-scan.yaml +5 -5
  461. package/src/modules/bmm/workflows/{diagrams → excalidraw-diagrams}/create-dataflow/instructions.md +1 -1
  462. package/src/modules/bmm/workflows/{diagrams → excalidraw-diagrams}/create-dataflow/workflow.yaml +6 -6
  463. package/src/modules/bmm/workflows/{diagrams → excalidraw-diagrams}/create-diagram/instructions.md +2 -2
  464. package/src/modules/bmm/workflows/{diagrams → excalidraw-diagrams}/create-diagram/workflow.yaml +6 -6
  465. package/src/modules/bmm/workflows/{diagrams → excalidraw-diagrams}/create-flowchart/instructions.md +2 -2
  466. package/src/modules/bmm/workflows/{diagrams → excalidraw-diagrams}/create-flowchart/workflow.yaml +6 -6
  467. package/src/modules/bmm/workflows/{diagrams → excalidraw-diagrams}/create-wireframe/instructions.md +1 -1
  468. package/src/modules/bmm/workflows/{diagrams → excalidraw-diagrams}/create-wireframe/workflow.yaml +6 -6
  469. package/src/modules/bmm/workflows/generate-project-context/steps/step-01-discover.md +2 -2
  470. package/src/modules/bmm/workflows/generate-project-context/steps/step-02-generate.md +3 -3
  471. package/src/modules/bmm/workflows/generate-project-context/steps/step-03-complete.md +2 -2
  472. package/src/modules/bmm/workflows/generate-project-context/workflow.md +5 -5
  473. package/src/modules/bmm/workflows/testarch/atdd/instructions.md +2 -2
  474. package/src/modules/bmm/workflows/testarch/atdd/workflow.yaml +2 -2
  475. package/src/modules/bmm/workflows/testarch/automate/instructions.md +2 -2
  476. package/src/modules/bmm/workflows/testarch/automate/workflow.yaml +2 -2
  477. package/src/modules/bmm/workflows/testarch/ci/instructions.md +1 -1
  478. package/src/modules/bmm/workflows/testarch/ci/workflow.yaml +2 -2
  479. package/src/modules/bmm/workflows/testarch/framework/instructions.md +3 -3
  480. package/src/modules/bmm/workflows/testarch/framework/workflow.yaml +2 -2
  481. package/src/modules/bmm/workflows/testarch/nfr-assess/instructions.md +1 -1
  482. package/src/modules/bmm/workflows/testarch/nfr-assess/workflow.yaml +2 -2
  483. package/src/modules/bmm/workflows/testarch/test-design/instructions.md +3 -3
  484. package/src/modules/bmm/workflows/testarch/test-design/test-design-template.md +1 -1
  485. package/src/modules/bmm/workflows/testarch/test-design/workflow.yaml +10 -4
  486. package/src/modules/bmm/workflows/testarch/test-review/instructions.md +1 -1
  487. package/src/modules/bmm/workflows/testarch/test-review/workflow.yaml +2 -2
  488. package/src/modules/bmm/workflows/testarch/trace/instructions.md +6 -6
  489. package/src/modules/bmm/workflows/testarch/trace/workflow.yaml +2 -2
  490. package/src/modules/bmm/workflows/workflow-status/init/instructions.md +1 -1
  491. package/src/modules/bmm/workflows/workflow-status/init/workflow.yaml +4 -4
  492. package/src/modules/bmm/workflows/workflow-status/instructions.md +3 -3
  493. package/src/modules/bmm/workflows/workflow-status/project-levels.yaml +1 -1
  494. package/src/modules/bmm/workflows/workflow-status/workflow.yaml +2 -2
  495. package/src/modules/cis/agents/brainstorming-coach.agent.yaml +4 -4
  496. package/src/modules/cis/agents/creative-problem-solver.agent.yaml +4 -4
  497. package/src/modules/cis/agents/design-thinking-coach.agent.yaml +4 -4
  498. package/src/modules/cis/agents/innovation-strategist.agent.yaml +4 -4
  499. package/src/modules/cis/agents/presentation-master.agent.yaml +3 -3
  500. package/src/modules/cis/agents/storyteller/storyteller-sidecar/stories-told.md +7 -0
  501. package/src/modules/cis/agents/storyteller/storyteller-sidecar/story-preferences.md +7 -0
  502. package/src/modules/cis/agents/{storyteller.agent.yaml → storyteller/storyteller.agent.yaml} +9 -4
  503. package/src/modules/cis/module.yaml +3 -7
  504. package/src/modules/cis/{README.md → readme.md} +1 -1
  505. package/src/modules/cis/workflows/README.md +1 -1
  506. package/src/modules/cis/workflows/design-thinking/instructions.md +2 -2
  507. package/src/modules/cis/workflows/design-thinking/workflow.yaml +7 -7
  508. package/src/modules/cis/workflows/innovation-strategy/instructions.md +2 -2
  509. package/src/modules/cis/workflows/innovation-strategy/workflow.yaml +7 -7
  510. package/src/modules/cis/workflows/problem-solving/instructions.md +2 -2
  511. package/src/modules/cis/workflows/problem-solving/workflow.yaml +7 -7
  512. package/src/modules/cis/workflows/storytelling/instructions.md +2 -2
  513. package/src/modules/cis/workflows/storytelling/workflow.yaml +7 -7
  514. package/src/utility/agent-components/activation-rules.txt +7 -0
  515. package/src/utility/agent-components/activation-steps.txt +13 -0
  516. package/src/utility/agent-components/agent-command-header.md +1 -0
  517. package/src/utility/{templates → agent-components}/agent.customize.template.yaml +0 -1
  518. package/src/utility/agent-components/handler-action.txt +4 -0
  519. package/src/utility/agent-components/handler-exec.txt +6 -0
  520. package/src/utility/agent-components/handler-multi.txt +14 -0
  521. package/src/utility/agent-components/handler-tmpl.txt +5 -0
  522. package/src/utility/agent-components/handler-validate-workflow.txt +7 -0
  523. package/src/utility/agent-components/handler-workflow.txt +10 -0
  524. package/src/utility/agent-components/menu-handlers.txt +6 -0
  525. package/test/README.md +1 -1
  526. package/test/test-agent-schema.js +2 -2
  527. package/tools/cli/README.md +1 -607
  528. package/tools/cli/commands/build.js +7 -7
  529. package/tools/cli/commands/install.js +16 -18
  530. package/tools/cli/commands/list.js +13 -1
  531. package/tools/cli/installers/lib/core/config-collector.js +224 -59
  532. package/tools/cli/installers/lib/core/custom-module-cache.js +18 -10
  533. package/tools/cli/installers/lib/core/dependency-resolver.js +2 -2
  534. package/tools/cli/installers/lib/core/detector.js +16 -16
  535. package/tools/cli/installers/lib/core/ide-config-manager.js +9 -7
  536. package/tools/cli/installers/lib/core/installer.js +634 -1040
  537. package/tools/cli/installers/lib/core/installer.js.bak +3204 -0
  538. package/tools/cli/installers/lib/core/manifest-generator.js +43 -40
  539. package/tools/cli/installers/lib/core/manifest.js +23 -20
  540. package/tools/cli/installers/lib/custom/handler.js +16 -46
  541. package/tools/cli/installers/lib/ide/_base-ide.js +26 -33
  542. package/tools/cli/installers/lib/ide/antigravity.js +3 -3
  543. package/tools/cli/installers/lib/ide/claude-code.js +3 -3
  544. package/tools/cli/installers/lib/ide/codex.js +2 -2
  545. package/tools/cli/installers/lib/ide/gemini.js +6 -6
  546. package/tools/cli/installers/lib/ide/kiro-cli.js +2 -2
  547. package/tools/cli/installers/lib/ide/opencode.js +2 -2
  548. package/tools/cli/installers/lib/ide/roo.js +15 -5
  549. package/tools/cli/installers/lib/ide/shared/agent-command-generator.js +2 -2
  550. package/tools/cli/installers/lib/ide/shared/module-injections.js +2 -2
  551. package/tools/cli/installers/lib/ide/shared/task-tool-command-generator.js +2 -2
  552. package/tools/cli/installers/lib/ide/shared/workflow-command-generator.js +4 -4
  553. package/tools/cli/installers/lib/ide/templates/agent-command-template.md +1 -1
  554. package/tools/cli/installers/lib/ide/templates/gemini-agent-command.toml +3 -3
  555. package/tools/cli/installers/lib/ide/templates/gemini-task-command.toml +3 -3
  556. package/tools/cli/installers/lib/ide/templates/workflow-command-template.md +1 -1
  557. package/tools/cli/installers/lib/modules/manager.js +315 -312
  558. package/tools/cli/lib/activation-builder.js +8 -13
  559. package/tools/cli/lib/agent/compiler.js +166 -167
  560. package/tools/cli/lib/agent/installer.js +8 -128
  561. package/tools/cli/lib/agent-analyzer.js +2 -2
  562. package/tools/cli/lib/agent-party-generator.js +5 -17
  563. package/tools/cli/lib/config.js +2 -2
  564. package/tools/cli/lib/platform-codes.js +2 -2
  565. package/tools/cli/lib/ui.js +678 -564
  566. package/tools/cli/lib/xml-handler.js +3 -55
  567. package/tools/cli/lib/yaml-format.js +4 -6
  568. package/tools/cli/lib/yaml-xml-builder.js +14 -26
  569. package/tools/flattener/ignoreRules.js +1 -1
  570. package/tools/flattener/xml.js +1 -7
  571. package/tools/lib/xml-utils.js +13 -0
  572. package/tools/migrate-custom-module-paths.js +2 -2
  573. package/tools/validate-agent-schema.js +2 -2
  574. package/docs/v6-open-items.md +0 -17
  575. package/src/core/agents/bmad-web-orchestrator.agent.xml +0 -113
  576. package/src/modules/bmb/_module-installer/installer.js +0 -76
  577. package/src/modules/bmb/docs/agents/module-agent-architecture.md +0 -366
  578. package/src/modules/bmb/workflows/create-agent/steps/step-08-setup.md +0 -179
  579. package/src/modules/bmb/workflows/create-agent/steps/step-09-customize.md +0 -197
  580. package/src/modules/bmb/workflows/create-agent/steps/step-10-build-tools.md +0 -180
  581. package/src/modules/bmb/workflows/create-agent/templates/agent_commands.md +0 -21
  582. package/src/modules/bmb/workflows/create-agent/templates/agent_persona.md +0 -25
  583. package/src/modules/bmb/workflows/create-agent/templates/agent_purpose_and_type.md +0 -23
  584. package/src/modules/bmgd/workflows/2-design/gdd/instructions-gdd.md +0 -502
  585. package/src/modules/bmgd/workflows/4-production/code-review/instructions.md +0 -398
  586. package/src/modules/bmgd/workflows/4-production/create-story/instructions.md +0 -256
  587. package/src/modules/bmgd/workflows/4-production/dev-story/instructions.md +0 -267
  588. package/src/modules/bmgd/workflows/4-production/epic-tech-context/checklist.md +0 -17
  589. package/src/modules/bmgd/workflows/4-production/epic-tech-context/instructions.md +0 -164
  590. package/src/modules/bmgd/workflows/4-production/epic-tech-context/template.md +0 -76
  591. package/src/modules/bmgd/workflows/4-production/epic-tech-context/workflow.yaml +0 -58
  592. package/src/modules/bmgd/workflows/4-production/story-context/checklist.md +0 -16
  593. package/src/modules/bmgd/workflows/4-production/story-context/context-template.xml +0 -34
  594. package/src/modules/bmgd/workflows/4-production/story-context/instructions.md +0 -209
  595. package/src/modules/bmgd/workflows/4-production/story-context/workflow.yaml +0 -63
  596. package/src/modules/bmgd/workflows/4-production/story-done/instructions.md +0 -111
  597. package/src/modules/bmgd/workflows/4-production/story-done/workflow.yaml +0 -28
  598. package/src/modules/bmgd/workflows/4-production/story-ready/instructions.md +0 -117
  599. package/src/modules/bmgd/workflows/4-production/story-ready/workflow.yaml +0 -25
  600. package/src/modules/bmm/tasks/daily-standup.xml +0 -85
  601. package/src/modules/cis/agents/README.md +0 -104
  602. package/src/utility/models/action-command-header.md +0 -0
  603. package/src/utility/models/agent-activation-ide.xml +0 -51
  604. package/src/utility/models/agent-activation-web.xml +0 -50
  605. package/src/utility/models/agent-command-header.md +0 -1
  606. package/src/utility/models/agent-config-template.md +0 -23
  607. package/src/utility/models/agent-in-team-activation.xml +0 -3
  608. package/src/utility/models/fragments/activation-rules.xml +0 -7
  609. package/src/utility/models/fragments/activation-steps.xml +0 -16
  610. package/src/utility/models/fragments/handler-action.xml +0 -4
  611. package/src/utility/models/fragments/handler-exec.xml +0 -6
  612. package/src/utility/models/fragments/handler-multi.xml +0 -14
  613. package/src/utility/models/fragments/handler-tmpl.xml +0 -5
  614. package/src/utility/models/fragments/handler-validate-workflow.xml +0 -7
  615. package/src/utility/models/fragments/handler-workflow.xml +0 -9
  616. package/src/utility/models/fragments/menu-handlers.xml +0 -6
  617. package/src/utility/models/fragments/web-bundle-activation-steps.xml +0 -32
  618. package/tools/cli/bundlers/bundle-web.js +0 -179
  619. package/tools/cli/bundlers/test-analyst.js +0 -28
  620. package/tools/cli/bundlers/test-bundler.js +0 -118
  621. package/tools/cli/bundlers/web-bundler.js +0 -1754
  622. package/tools/cli/installers/lib/core/post-install-sidecar-replacement.js +0 -79
  623. package/tools/cli/lib/replace-project-root.js +0 -239
  624. package/tools/cli/regenerate-manifests.js +0 -27
  625. package/tools/cli/test-yaml-builder.js +0 -43
  626. /package/src/modules/bmgd/workflows/1-preproduction/game-brief/{template.md → templates/game-brief-template.md} +0 -0
  627. /package/src/modules/bmgd/workflows/2-design/gdd/{gdd-template.md → templates/gdd-template.md} +0 -0
  628. /package/src/modules/bmgd/workflows/2-design/narrative/{narrative-template.md → templates/narrative-template.md} +0 -0
  629. /package/src/modules/bmgd/workflows/3-technical/game-architecture/{architecture-template.md → templates/architecture-template.md} +0 -0
  630. /package/src/modules/bmgd/workflows/4-production/code-review/{backlog_template.md → backlog-template.md} +0 -0
  631. /package/src/modules/bmm/workflows/1-analysis/{product-brief → create-product-brief}/product-brief.template.md +0 -0
  632. /package/src/modules/bmm/workflows/3-solutioning/{implementation-readiness → check-implementation-readiness}/templates/readiness-report-template.md +0 -0
  633. /package/src/modules/bmm/workflows/3-solutioning/{architecture → create-architecture}/architecture-decision-template.md +0 -0
  634. /package/src/modules/bmm/workflows/3-solutioning/{architecture → create-architecture}/data/domain-complexity.csv +0 -0
  635. /package/src/modules/bmm/workflows/3-solutioning/{architecture → create-architecture}/data/project-types.csv +0 -0
  636. /package/src/modules/bmm/workflows/3-solutioning/{architecture → create-architecture}/steps/step-01b-continue.md +0 -0
  637. /package/src/modules/bmm/workflows/{diagrams → excalidraw-diagrams}/_shared/excalidraw-library.json +0 -0
  638. /package/src/modules/bmm/workflows/{diagrams → excalidraw-diagrams}/_shared/excalidraw-templates.yaml +0 -0
  639. /package/src/modules/bmm/workflows/{diagrams → excalidraw-diagrams}/create-dataflow/checklist.md +0 -0
  640. /package/src/modules/bmm/workflows/{diagrams → excalidraw-diagrams}/create-diagram/checklist.md +0 -0
  641. /package/src/modules/bmm/workflows/{diagrams → excalidraw-diagrams}/create-flowchart/checklist.md +0 -0
  642. /package/src/modules/bmm/workflows/{diagrams → excalidraw-diagrams}/create-wireframe/checklist.md +0 -0
  643. /package/src/utility/{models/fragments/handler-data.xml → agent-components/handler-data.txt} +0 -0
@@ -1,9 +1,10 @@
1
1
  const path = require('node:path');
2
2
  const fs = require('fs-extra');
3
- const yaml = require('js-yaml');
3
+ const yaml = require('yaml');
4
4
  const chalk = require('chalk');
5
5
  const { XmlHandler } = require('../../../lib/xml-handler');
6
6
  const { getProjectRoot, getSourcePath, getModulePath } = require('../../../lib/project-root');
7
+ const { filterCustomizationData } = require('../../../lib/agent/compiler');
7
8
 
8
9
  /**
9
10
  * Manages the installation, updating, and removal of BMAD modules.
@@ -12,7 +13,7 @@ const { getProjectRoot, getSourcePath, getModulePath } = require('../../../lib/p
12
13
  *
13
14
  * @class ModuleManager
14
15
  * @requires fs-extra
15
- * @requires js-yaml
16
+ * @requires yaml
16
17
  * @requires chalk
17
18
  * @requires XmlHandler
18
19
  *
@@ -27,7 +28,7 @@ class ModuleManager {
27
28
  this.modulesSourcePath = getSourcePath('modules');
28
29
  this.xmlHandler = new XmlHandler();
29
30
  this.bmadFolderName = 'bmad'; // Default, can be overridden
30
- this.scanProjectForModules = options.scanProjectForModules !== false; // Default to true for backward compatibility
31
+ this.customModulePaths = new Map(); // Initialize custom module paths
31
32
  }
32
33
 
33
34
  /**
@@ -47,50 +48,30 @@ class ModuleManager {
47
48
  }
48
49
 
49
50
  /**
50
- * Copy a file and replace .bmad placeholder with actual folder name
51
+ * Set custom module paths for priority lookup
52
+ * @param {Map<string, string>} customModulePaths - Map of module ID to source path
53
+ */
54
+ setCustomModulePaths(customModulePaths) {
55
+ this.customModulePaths = customModulePaths;
56
+ }
57
+
58
+ /**
59
+ * Copy a file to the target location
51
60
  * @param {string} sourcePath - Source file path
52
61
  * @param {string} targetPath - Target file path
62
+ * @param {boolean} overwrite - Whether to overwrite existing files (default: true)
53
63
  */
54
- async copyFileWithPlaceholderReplacement(sourcePath, targetPath) {
55
- // List of text file extensions that should have placeholder replacement
56
- const textExtensions = ['.md', '.yaml', '.yml', '.txt', '.json', '.js', '.ts', '.html', '.css', '.sh', '.bat', '.csv'];
57
- const ext = path.extname(sourcePath).toLowerCase();
58
-
59
- // Check if this is a text file that might contain placeholders
60
- if (textExtensions.includes(ext)) {
61
- try {
62
- // Read the file content
63
- let content = await fs.readFile(sourcePath, 'utf8');
64
-
65
- // Replace escape sequence .bmad with literal .bmad
66
- if (content.includes('.bmad')) {
67
- content = content.replaceAll('.bmad', '.bmad');
68
- }
69
-
70
- // Replace .bmad placeholder with actual folder name
71
- if (content.includes('.bmad')) {
72
- content = content.replaceAll('.bmad', this.bmadFolderName);
73
- }
74
-
75
- // Write to target with replaced content
76
- await fs.ensureDir(path.dirname(targetPath));
77
- await fs.writeFile(targetPath, content, 'utf8');
78
- } catch {
79
- // If reading as text fails (might be binary despite extension), fall back to regular copy
80
- await fs.copy(sourcePath, targetPath, { overwrite: true });
81
- }
82
- } else {
83
- // Binary file or other file type - just copy directly
84
- await fs.copy(sourcePath, targetPath, { overwrite: true });
85
- }
64
+ async copyFileWithPlaceholderReplacement(sourcePath, targetPath, overwrite = true) {
65
+ await fs.copy(sourcePath, targetPath, { overwrite });
86
66
  }
87
67
 
88
68
  /**
89
- * Copy a directory recursively with placeholder replacement
69
+ * Copy a directory recursively
90
70
  * @param {string} sourceDir - Source directory path
91
71
  * @param {string} targetDir - Target directory path
72
+ * @param {boolean} overwrite - Whether to overwrite existing files (default: true)
92
73
  */
93
- async copyDirectoryWithPlaceholderReplacement(sourceDir, targetDir) {
74
+ async copyDirectoryWithPlaceholderReplacement(sourceDir, targetDir, overwrite = true) {
94
75
  await fs.ensureDir(targetDir);
95
76
  const entries = await fs.readdir(sourceDir, { withFileTypes: true });
96
77
 
@@ -99,81 +80,108 @@ class ModuleManager {
99
80
  const targetPath = path.join(targetDir, entry.name);
100
81
 
101
82
  if (entry.isDirectory()) {
102
- await this.copyDirectoryWithPlaceholderReplacement(sourcePath, targetPath);
83
+ await this.copyDirectoryWithPlaceholderReplacement(sourcePath, targetPath, overwrite);
103
84
  } else {
104
- await this.copyFileWithPlaceholderReplacement(sourcePath, targetPath);
85
+ await this.copyFileWithPlaceholderReplacement(sourcePath, targetPath, overwrite);
105
86
  }
106
87
  }
107
88
  }
108
89
 
109
90
  /**
110
- * Find all modules in the project by searching for module.yaml files
111
- * @returns {Array} List of module paths
91
+ * Copy sidecar directory to _bmad/_memory location with update-safe handling
92
+ * @param {string} sourceSidecarPath - Source sidecar directory path
93
+ * @param {string} agentName - Name of the agent (for naming)
94
+ * @param {string} bmadMemoryPath - This should ALWAYS be _bmad/_memory
95
+ * @param {boolean} isUpdate - Whether this is an update (default: false)
96
+ * @param {string} bmadDir - BMAD installation directory
97
+ * @param {Object} installer - Installer instance for file tracking
112
98
  */
113
- async findModulesInProject() {
114
- const projectRoot = getProjectRoot();
115
- const modulePaths = new Set();
116
-
117
- // Helper function to recursively scan directories
118
- async function scanDirectory(dir, excludePaths = []) {
119
- try {
120
- const entries = await fs.readdir(dir, { withFileTypes: true });
121
-
122
- for (const entry of entries) {
123
- const fullPath = path.join(dir, entry.name);
99
+ async copySidecarToMemory(sourceSidecarPath, agentName, bmadMemoryPath, isUpdate = false, bmadDir = null, installer = null) {
100
+ const crypto = require('node:crypto');
101
+ const sidecarTargetDir = path.join(bmadMemoryPath, `${agentName}-sidecar`);
102
+
103
+ // Ensure target directory exists
104
+ await fs.ensureDir(bmadMemoryPath);
105
+ await fs.ensureDir(sidecarTargetDir);
106
+
107
+ // Get existing files manifest for update checking
108
+ let existingFilesManifest = [];
109
+ if (isUpdate && installer) {
110
+ existingFilesManifest = await installer.readFilesManifest(bmadDir);
111
+ }
124
112
 
125
- // Skip hidden directories, node_modules, and literal placeholder directories
126
- if (
127
- entry.name.startsWith('.') ||
128
- entry.name === 'node_modules' ||
129
- entry.name === 'dist' ||
130
- entry.name === 'build' ||
131
- entry.name === '{project-root}'
132
- ) {
133
- continue;
134
- }
113
+ // Build map of existing sidecar files with their hashes
114
+ const existingSidecarFiles = new Map();
115
+ for (const fileEntry of existingFilesManifest) {
116
+ if (fileEntry.path && fileEntry.path.includes(`${agentName}-sidecar/`)) {
117
+ existingSidecarFiles.set(fileEntry.path, fileEntry.hash);
118
+ }
119
+ }
135
120
 
136
- // Skip excluded paths
137
- if (excludePaths.some((exclude) => fullPath.startsWith(exclude))) {
138
- continue;
139
- }
121
+ // Get all files in source sidecar
122
+ const sourceFiles = await this.getFileList(sourceSidecarPath);
140
123
 
141
- if (entry.isDirectory()) {
142
- // Skip core module - it's always installed first and not selectable
143
- if (entry.name === 'core') {
144
- continue;
124
+ for (const file of sourceFiles) {
125
+ const sourceFilePath = path.join(sourceSidecarPath, file);
126
+ const targetFilePath = path.join(sidecarTargetDir, file);
127
+
128
+ // Calculate current source file hash
129
+ const sourceHash = crypto
130
+ .createHash('sha256')
131
+ .update(await fs.readFile(sourceFilePath))
132
+ .digest('hex');
133
+
134
+ // Path relative to bmad directory
135
+ const relativeToBmad = path.join('_memory', `${agentName}-sidecar`, file);
136
+
137
+ if (isUpdate && (await fs.pathExists(targetFilePath))) {
138
+ // Calculate current target file hash
139
+ const currentTargetHash = crypto
140
+ .createHash('sha256')
141
+ .update(await fs.readFile(targetFilePath))
142
+ .digest('hex');
143
+
144
+ // Get the last known hash from files-manifest
145
+ const lastKnownHash = existingSidecarFiles.get(relativeToBmad);
146
+
147
+ if (lastKnownHash) {
148
+ // We have a record of this file
149
+ if (currentTargetHash === lastKnownHash) {
150
+ // File hasn't been modified by user, safe to update
151
+ await this.copyFileWithPlaceholderReplacement(sourceFilePath, targetFilePath, true);
152
+ if (process.env.BMAD_VERBOSE_INSTALL === 'true') {
153
+ console.log(chalk.dim(` Updated sidecar file: ${relativeToBmad}`));
145
154
  }
146
-
147
- // Check if this directory contains a module (module.yaml OR custom.yaml)
148
- const moduleConfigPath = path.join(fullPath, 'module.yaml');
149
- const installerConfigPath = path.join(fullPath, '_module-installer', 'module.yaml');
150
- const customConfigPath = path.join(fullPath, '_module-installer', 'custom.yaml');
151
- const rootCustomConfigPath = path.join(fullPath, 'custom.yaml');
152
-
153
- if (
154
- (await fs.pathExists(moduleConfigPath)) ||
155
- (await fs.pathExists(installerConfigPath)) ||
156
- (await fs.pathExists(customConfigPath)) ||
157
- (await fs.pathExists(rootCustomConfigPath))
158
- ) {
159
- modulePaths.add(fullPath);
160
- // Don't scan inside modules - they might have their own nested structures
161
- continue;
155
+ } else {
156
+ // User has modified the file, preserve it
157
+ if (process.env.BMAD_VERBOSE_INSTALL === 'true') {
158
+ console.log(chalk.dim(` Preserving user-modified file: ${relativeToBmad}`));
162
159
  }
163
-
164
- // Recursively scan subdirectories
165
- await scanDirectory(fullPath, excludePaths);
166
160
  }
161
+ } else {
162
+ // First time seeing this file in manifest, copy it
163
+ await this.copyFileWithPlaceholderReplacement(sourceFilePath, targetFilePath, true);
164
+ if (process.env.BMAD_VERBOSE_INSTALL === 'true') {
165
+ console.log(chalk.dim(` Added new sidecar file: ${relativeToBmad}`));
166
+ }
167
+ }
168
+ } else {
169
+ // New installation
170
+ await this.copyFileWithPlaceholderReplacement(sourceFilePath, targetFilePath, true);
171
+ if (process.env.BMAD_VERBOSE_INSTALL === 'true') {
172
+ console.log(chalk.dim(` Copied sidecar file: ${relativeToBmad}`));
167
173
  }
168
- } catch {
169
- // Ignore errors (e.g., permission denied)
170
174
  }
171
- }
172
175
 
173
- // Scan the entire project, but exclude src/modules since we handle it separately
174
- await scanDirectory(projectRoot, [this.modulesSourcePath]);
176
+ // Track the file in the installer's file tracking system
177
+ if (installer && installer.installedFiles) {
178
+ installer.installedFiles.add(targetFilePath);
179
+ }
180
+ }
175
181
 
176
- return [...modulePaths];
182
+ // Return list of files that were processed
183
+ const processedFiles = sourceFiles.map((file) => path.join('_memory', `${agentName}-sidecar`, file));
184
+ return processedFiles;
177
185
  }
178
186
 
179
187
  /**
@@ -218,43 +226,19 @@ class ModuleManager {
218
226
  }
219
227
  }
220
228
 
221
- // Then, find all other modules in the project (only if scanning is enabled)
222
- if (this.scanProjectForModules) {
223
- const otherModulePaths = await this.findModulesInProject();
224
- for (const modulePath of otherModulePaths) {
225
- const moduleName = path.basename(modulePath);
226
- const relativePath = path.relative(getProjectRoot(), modulePath);
227
-
228
- // Skip core module - it's always installed first and not selectable
229
- if (moduleName === 'core') {
230
- continue;
231
- }
232
-
233
- const moduleInfo = await this.getModuleInfo(modulePath, moduleName, relativePath);
234
- if (moduleInfo && !modules.some((m) => m.id === moduleInfo.id) && !customModules.some((m) => m.id === moduleInfo.id)) {
235
- // Avoid duplicates - skip if we already have this module ID
236
- if (moduleInfo.isCustom) {
237
- customModules.push(moduleInfo);
238
- } else {
239
- modules.push(moduleInfo);
240
- }
241
- }
242
- }
243
-
244
- // Also check for cached custom modules in _cfg/custom/
245
- if (this.bmadDir) {
246
- const customCacheDir = path.join(this.bmadDir, '_cfg', 'custom');
247
- if (await fs.pathExists(customCacheDir)) {
248
- const cacheEntries = await fs.readdir(customCacheDir, { withFileTypes: true });
249
- for (const entry of cacheEntries) {
250
- if (entry.isDirectory()) {
251
- const cachePath = path.join(customCacheDir, entry.name);
252
- const moduleInfo = await this.getModuleInfo(cachePath, entry.name, '_cfg/custom');
253
- if (moduleInfo && !modules.some((m) => m.id === moduleInfo.id) && !customModules.some((m) => m.id === moduleInfo.id)) {
254
- moduleInfo.isCustom = true;
255
- moduleInfo.fromCache = true;
256
- customModules.push(moduleInfo);
257
- }
229
+ // Check for cached custom modules in _config/custom/
230
+ if (this.bmadDir) {
231
+ const customCacheDir = path.join(this.bmadDir, '_config', 'custom');
232
+ if (await fs.pathExists(customCacheDir)) {
233
+ const cacheEntries = await fs.readdir(customCacheDir, { withFileTypes: true });
234
+ for (const entry of cacheEntries) {
235
+ if (entry.isDirectory()) {
236
+ const cachePath = path.join(customCacheDir, entry.name);
237
+ const moduleInfo = await this.getModuleInfo(cachePath, entry.name, '_config/custom');
238
+ if (moduleInfo && !modules.some((m) => m.id === moduleInfo.id) && !customModules.some((m) => m.id === moduleInfo.id)) {
239
+ moduleInfo.isCustom = true;
240
+ moduleInfo.fromCache = true;
241
+ customModules.push(moduleInfo);
258
242
  }
259
243
  }
260
244
  }
@@ -312,7 +296,7 @@ class ModuleManager {
312
296
  // Read module config for metadata
313
297
  try {
314
298
  const configContent = await fs.readFile(configPath, 'utf8');
315
- const config = yaml.load(configContent);
299
+ const config = yaml.parse(configContent);
316
300
 
317
301
  // Use the code property as the id if available
318
302
  if (config.code) {
@@ -333,66 +317,50 @@ class ModuleManager {
333
317
 
334
318
  /**
335
319
  * Find the source path for a module by searching all possible locations
336
- * @param {string} moduleName - Name of the module to find
320
+ * @param {string} moduleCode - Code of the module to find (from module.yaml)
337
321
  * @returns {string|null} Path to the module source or null if not found
338
322
  */
339
- async findModuleSource(moduleName) {
323
+ async findModuleSource(moduleCode) {
340
324
  const projectRoot = getProjectRoot();
341
325
 
342
- // First, check src/modules
343
- const srcModulePath = path.join(this.modulesSourcePath, moduleName);
344
- if (await fs.pathExists(srcModulePath)) {
345
- // Check if this looks like a module (has module.yaml)
346
- const moduleConfigPath = path.join(srcModulePath, 'module.yaml');
347
- const installerConfigPath = path.join(srcModulePath, '_module-installer', 'module.yaml');
348
-
349
- if ((await fs.pathExists(moduleConfigPath)) || (await fs.pathExists(installerConfigPath))) {
350
- return srcModulePath;
351
- }
352
-
353
- // Also check for custom.yaml in src/modules/_module-installer
354
- const customConfigPath = path.join(srcModulePath, '_module-installer', 'custom.yaml');
355
- if (await fs.pathExists(customConfigPath)) {
356
- return srcModulePath;
357
- }
326
+ // First check custom module paths if they exist
327
+ if (this.customModulePaths && this.customModulePaths.has(moduleCode)) {
328
+ return this.customModulePaths.get(moduleCode);
358
329
  }
359
330
 
360
- // If not found in src/modules, search the entire project
361
- const allModulePaths = await this.findModulesInProject();
362
- for (const modulePath of allModulePaths) {
363
- if (path.basename(modulePath) === moduleName) {
364
- return modulePath;
365
- }
366
- }
331
+ // Search in src/modules by READING module.yaml files to match by code
332
+ if (await fs.pathExists(this.modulesSourcePath)) {
333
+ const entries = await fs.readdir(this.modulesSourcePath, { withFileTypes: true });
334
+ for (const entry of entries) {
335
+ if (entry.isDirectory()) {
336
+ const modulePath = path.join(this.modulesSourcePath, entry.name);
367
337
 
368
- // Also check by module ID (not just folder name)
369
- // Need to read configs to match by ID
370
- for (const modulePath of allModulePaths) {
371
- const moduleConfigPath = path.join(modulePath, 'module.yaml');
372
- const installerConfigPath = path.join(modulePath, '_module-installer', 'module.yaml');
373
- const customConfigPath = path.join(modulePath, '_module-installer', 'custom.yaml');
374
- const rootCustomConfigPath = path.join(modulePath, 'custom.yaml');
375
-
376
- let configPath = null;
377
- if (await fs.pathExists(moduleConfigPath)) {
378
- configPath = moduleConfigPath;
379
- } else if (await fs.pathExists(installerConfigPath)) {
380
- configPath = installerConfigPath;
381
- } else if (await fs.pathExists(customConfigPath)) {
382
- configPath = customConfigPath;
383
- } else if (await fs.pathExists(rootCustomConfigPath)) {
384
- configPath = rootCustomConfigPath;
385
- }
338
+ // Read module.yaml to get the code
339
+ const moduleConfigPath = path.join(modulePath, 'module.yaml');
340
+ const installerConfigPath = path.join(modulePath, '_module-installer', 'module.yaml');
341
+ const customConfigPath = path.join(modulePath, '_module-installer', 'custom.yaml');
386
342
 
387
- if (configPath) {
388
- try {
389
- const configContent = await fs.readFile(configPath, 'utf8');
390
- const config = yaml.load(configContent);
391
- if (config.code === moduleName) {
392
- return modulePath;
343
+ let configPath = null;
344
+ if (await fs.pathExists(moduleConfigPath)) {
345
+ configPath = moduleConfigPath;
346
+ } else if (await fs.pathExists(installerConfigPath)) {
347
+ configPath = installerConfigPath;
348
+ } else if (await fs.pathExists(customConfigPath)) {
349
+ configPath = customConfigPath;
350
+ }
351
+
352
+ if (configPath) {
353
+ try {
354
+ const configContent = await fs.readFile(configPath, 'utf8');
355
+ const config = yaml.parse(configContent);
356
+ if (config.code === moduleCode) {
357
+ return modulePath;
358
+ }
359
+ } catch (error) {
360
+ // Continue to next module if parse fails
361
+ console.warn(`Warning: Failed to parse module config at ${configPath}: ${error.message}`);
362
+ }
393
363
  }
394
- } catch (error) {
395
- throw new Error(`Failed to parse module.yaml at ${configPath}: ${error.message}`);
396
364
  }
397
365
  }
398
366
  }
@@ -402,7 +370,7 @@ class ModuleManager {
402
370
 
403
371
  /**
404
372
  * Install a module
405
- * @param {string} moduleName - Name of the module to install
373
+ * @param {string} moduleName - Code of the module to install (from module.yaml)
406
374
  * @param {string} bmadDir - Target bmad directory
407
375
  * @param {Function} fileTrackingCallback - Optional callback to track installed files
408
376
  * @param {Object} options - Additional installation options
@@ -416,7 +384,10 @@ class ModuleManager {
416
384
 
417
385
  // Check if source module exists
418
386
  if (!sourcePath) {
419
- throw new Error(`Module '${moduleName}' not found in any source location`);
387
+ // Provide a more user-friendly error message
388
+ throw new Error(
389
+ `Source for module '${moduleName}' is not available. It will be retained but cannot be updated without its source files.`,
390
+ );
420
391
  }
421
392
 
422
393
  // Check if this is a custom module and read its custom.yaml values
@@ -427,14 +398,14 @@ class ModuleManager {
427
398
  if (await fs.pathExists(rootCustomConfigPath)) {
428
399
  try {
429
400
  const customContent = await fs.readFile(rootCustomConfigPath, 'utf8');
430
- customConfig = yaml.load(customContent);
401
+ customConfig = yaml.parse(customContent);
431
402
  } catch (error) {
432
403
  console.warn(chalk.yellow(`Warning: Failed to read custom.yaml for ${moduleName}:`, error.message));
433
404
  }
434
405
  } else if (await fs.pathExists(moduleInstallerCustomPath)) {
435
406
  try {
436
407
  const customContent = await fs.readFile(moduleInstallerCustomPath, 'utf8');
437
- customConfig = yaml.load(customContent);
408
+ customConfig = yaml.parse(customContent);
438
409
  } catch (error) {
439
410
  console.warn(chalk.yellow(`Warning: Failed to read custom.yaml for ${moduleName}:`, error.message));
440
411
  }
@@ -450,7 +421,6 @@ class ModuleManager {
450
421
 
451
422
  // Check if already installed
452
423
  if (await fs.pathExists(targetPath)) {
453
- console.log(chalk.yellow(`Module '${moduleName}' already installed, updating...`));
454
424
  await fs.remove(targetPath);
455
425
  }
456
426
 
@@ -462,7 +432,7 @@ class ModuleManager {
462
432
  await this.copyModuleWithFiltering(sourcePath, targetPath, fileTrackingCallback, options.moduleConfig);
463
433
 
464
434
  // Compile any .agent.yaml files to .md format
465
- await this.compileModuleAgents(sourcePath, targetPath, moduleName, bmadDir);
435
+ await this.compileModuleAgents(sourcePath, targetPath, moduleName, bmadDir, options.installer);
466
436
 
467
437
  // Process agent files to inject activation block
468
438
  await this.processAgentFiles(targetPath, moduleName);
@@ -506,6 +476,10 @@ class ModuleManager {
506
476
  } else {
507
477
  // Selective update - preserve user modifications
508
478
  await this.syncModule(sourcePath, targetPath);
479
+
480
+ // Recompile agents (#1133)
481
+ await this.compileModuleAgents(sourcePath, targetPath, moduleName, bmadDir, options.installer);
482
+ await this.processAgentFiles(targetPath, moduleName);
509
483
  }
510
484
 
511
485
  return {
@@ -569,7 +543,7 @@ class ModuleManager {
569
543
  if (await fs.pathExists(configPath)) {
570
544
  try {
571
545
  const configContent = await fs.readFile(configPath, 'utf8');
572
- const config = yaml.load(configContent);
546
+ const config = yaml.parse(configContent);
573
547
  Object.assign(moduleInfo, config);
574
548
  } catch (error) {
575
549
  console.warn(`Failed to read installed module config:`, error.message);
@@ -590,29 +564,21 @@ class ModuleManager {
590
564
  // Get all files in source
591
565
  const sourceFiles = await this.getFileList(sourcePath);
592
566
 
593
- // Game development files to conditionally exclude
594
- const gameDevFiles = [
595
- 'agents/game-architect.agent.yaml',
596
- 'agents/game-designer.agent.yaml',
597
- 'agents/game-dev.agent.yaml',
598
- 'workflows/1-analysis/brainstorm-game',
599
- 'workflows/1-analysis/game-brief',
600
- 'workflows/2-plan-workflows/gdd',
601
- ];
602
-
603
567
  for (const file of sourceFiles) {
604
568
  // Skip sub-modules directory - these are IDE-specific and handled separately
605
569
  if (file.startsWith('sub-modules/')) {
606
570
  continue;
607
571
  }
608
572
 
609
- // Skip sidecar directories - they are handled separately during agent compilation
610
- if (
611
- path
612
- .dirname(file)
613
- .split('/')
614
- .some((dir) => dir.toLowerCase().includes('sidecar'))
615
- ) {
573
+ // Only skip sidecar directories - they are handled separately during agent compilation
574
+ // But still allow other files in agent directories
575
+ const isInAgentDirectory = file.startsWith('agents/');
576
+ const isInSidecarDirectory = path
577
+ .dirname(file)
578
+ .split('/')
579
+ .some((dir) => dir.toLowerCase().endsWith('-sidecar'));
580
+
581
+ if (isInSidecarDirectory) {
616
582
  continue;
617
583
  }
618
584
 
@@ -622,8 +588,7 @@ class ModuleManager {
622
588
  }
623
589
 
624
590
  // Skip config.yaml templates - we'll generate clean ones with actual values
625
- // Also skip custom.yaml files - their values will be merged into core config
626
- if (file === 'config.yaml' || file.endsWith('/config.yaml') || file === 'custom.yaml' || file.endsWith('/custom.yaml')) {
591
+ if (file === 'config.yaml' || file.endsWith('/config.yaml')) {
627
592
  continue;
628
593
  }
629
594
 
@@ -632,25 +597,6 @@ class ModuleManager {
632
597
  continue;
633
598
  }
634
599
 
635
- // Skip user documentation if install_user_docs is false
636
- if (moduleConfig.install_user_docs === false && (file.startsWith('docs/') || file.startsWith('docs\\'))) {
637
- console.log(chalk.dim(` Skipping user documentation: ${file}`));
638
- continue;
639
- }
640
-
641
- // Skip game development content if include_game_planning is false
642
- if (moduleConfig.include_game_planning === false) {
643
- const shouldSkipGameDev = gameDevFiles.some((gamePath) => {
644
- // Check if file path starts with or is within any game dev directory
645
- return file === gamePath || file.startsWith(gamePath + '/') || file.startsWith(gamePath + '\\');
646
- });
647
-
648
- if (shouldSkipGameDev) {
649
- console.log(chalk.dim(` Skipping game dev content: ${file}`));
650
- continue;
651
- }
652
- }
653
-
654
600
  const sourceFile = path.join(sourcePath, file);
655
601
  const targetFile = path.join(targetPath, file);
656
602
 
@@ -695,12 +641,12 @@ class ModuleManager {
695
641
 
696
642
  // IMPORTANT: Replace escape sequence and placeholder BEFORE parsing YAML
697
643
  // Otherwise parsing will fail on the placeholder
698
- yamlContent = yamlContent.replaceAll('.bmad', '.bmad');
699
- yamlContent = yamlContent.replaceAll('.bmad', this.bmadFolderName);
644
+ yamlContent = yamlContent.replaceAll('_bmad', '_bmad');
645
+ yamlContent = yamlContent.replaceAll('_bmad', this.bmadFolderName);
700
646
 
701
647
  try {
702
648
  // First check if web_bundle exists by parsing
703
- const workflowConfig = yaml.load(yamlContent);
649
+ const workflowConfig = yaml.parse(yamlContent);
704
650
 
705
651
  if (workflowConfig.web_bundle === undefined) {
706
652
  // No web_bundle section, just write (placeholders already replaced above)
@@ -780,11 +726,12 @@ class ModuleManager {
780
726
  * @param {string} targetPath - Target module path
781
727
  * @param {string} moduleName - Module name
782
728
  * @param {string} bmadDir - BMAD installation directory
729
+ * @param {Object} installer - Installer instance for file tracking
783
730
  */
784
- async compileModuleAgents(sourcePath, targetPath, moduleName, bmadDir) {
731
+ async compileModuleAgents(sourcePath, targetPath, moduleName, bmadDir, installer = null) {
785
732
  const sourceAgentsPath = path.join(sourcePath, 'agents');
786
733
  const targetAgentsPath = path.join(targetPath, 'agents');
787
- const cfgAgentsDir = path.join(bmadDir, '_cfg', 'agents');
734
+ const cfgAgentsDir = path.join(bmadDir, '_bmad', '_config', 'agents');
788
735
 
789
736
  // Check if agents directory exists in source
790
737
  if (!(await fs.pathExists(sourceAgentsPath))) {
@@ -815,84 +762,145 @@ class ModuleManager {
815
762
  // Create customize template if it doesn't exist
816
763
  if (!(await fs.pathExists(customizePath))) {
817
764
  const { getSourcePath } = require('../../../lib/project-root');
818
- const genericTemplatePath = getSourcePath('utility', 'templates', 'agent.customize.template.yaml');
765
+ const genericTemplatePath = getSourcePath('utility', 'agent-components', 'agent.customize.template.yaml');
819
766
  if (await fs.pathExists(genericTemplatePath)) {
820
767
  await this.copyFileWithPlaceholderReplacement(genericTemplatePath, customizePath);
821
- console.log(chalk.dim(` Created customize: ${moduleName}-${agentName}.customize.yaml`));
768
+ // Only show customize creation in verbose mode
769
+ if (process.env.BMAD_VERBOSE_INSTALL === 'true') {
770
+ console.log(chalk.dim(` Created customize: ${moduleName}-${agentName}.customize.yaml`));
771
+ }
772
+
773
+ // Store original hash for modification detection
774
+ const crypto = require('node:crypto');
775
+ const customizeContent = await fs.readFile(customizePath, 'utf8');
776
+ const originalHash = crypto.createHash('sha256').update(customizeContent).digest('hex');
777
+
778
+ // Store in main manifest
779
+ const manifestPath = path.join(bmadDir, '_config', 'manifest.yaml');
780
+ let manifestData = {};
781
+ if (await fs.pathExists(manifestPath)) {
782
+ const manifestContent = await fs.readFile(manifestPath, 'utf8');
783
+ const yaml = require('yaml');
784
+ manifestData = yaml.parse(manifestContent);
785
+ }
786
+ if (!manifestData.agentCustomizations) {
787
+ manifestData.agentCustomizations = {};
788
+ }
789
+ manifestData.agentCustomizations[path.relative(bmadDir, customizePath)] = originalHash;
790
+
791
+ // Write back to manifest
792
+ const yaml = require('yaml');
793
+ // Clean the manifest data to remove any non-serializable values
794
+ const cleanManifestData = structuredClone(manifestData);
795
+
796
+ const updatedContent = yaml.stringify(cleanManifestData, {
797
+ indent: 2,
798
+ lineWidth: 0,
799
+ });
800
+ await fs.writeFile(manifestPath, updatedContent, 'utf8');
822
801
  }
823
802
  }
824
803
 
825
- // Check for customizations
804
+ // Check for customizations and build answers object
826
805
  let customizedFields = [];
806
+ let answers = {};
827
807
  if (await fs.pathExists(customizePath)) {
828
808
  const customizeContent = await fs.readFile(customizePath, 'utf8');
829
- const customizeData = yaml.load(customizeContent);
809
+ const customizeData = yaml.parse(customizeContent);
830
810
  customizedFields = customizeData.customized_fields || [];
831
- }
832
-
833
- // Load core config to get agent_sidecar_folder
834
- const coreConfigPath = path.join(bmadDir, 'bmb', 'config.yaml');
835
- let coreConfig = {};
836
811
 
837
- if (await fs.pathExists(coreConfigPath)) {
838
- const yamlLib = require('yaml');
839
- const coreConfigContent = await fs.readFile(coreConfigPath, 'utf8');
840
- coreConfig = yamlLib.parse(coreConfigContent);
812
+ // Build answers object from customizations
813
+ if (customizeData.persona) {
814
+ answers.persona = customizeData.persona;
815
+ }
816
+ if (customizeData.agent?.metadata) {
817
+ const filteredMetadata = filterCustomizationData(customizeData.agent.metadata);
818
+ if (Object.keys(filteredMetadata).length > 0) {
819
+ Object.assign(answers, { metadata: filteredMetadata });
820
+ }
821
+ }
822
+ if (customizeData.critical_actions && customizeData.critical_actions.length > 0) {
823
+ answers.critical_actions = customizeData.critical_actions;
824
+ }
825
+ if (customizeData.memories && customizeData.memories.length > 0) {
826
+ answers.memories = customizeData.memories;
827
+ }
828
+ if (customizeData.menu && customizeData.menu.length > 0) {
829
+ answers.menu = customizeData.menu;
830
+ }
831
+ if (customizeData.prompts && customizeData.prompts.length > 0) {
832
+ answers.prompts = customizeData.prompts;
833
+ }
841
834
  }
842
835
 
843
836
  // Check if agent has sidecar
844
837
  let hasSidecar = false;
845
838
  try {
846
- const yamlLib = require('yaml');
847
- const agentYaml = yamlLib.parse(yamlContent);
839
+ const agentYaml = yaml.parse(yamlContent);
848
840
  hasSidecar = agentYaml?.agent?.metadata?.hasSidecar === true;
849
841
  } catch {
850
842
  // Continue without sidecar processing
851
843
  }
852
844
 
853
845
  // Compile with customizations if any
854
- const { xml } = compileAgent(yamlContent, {}, agentName, relativePath, { config: this.coreConfig });
846
+ const { xml } = await compileAgent(yamlContent, answers, agentName, relativePath, { config: this.coreConfig || {} });
855
847
 
856
- // Replace .bmad placeholder if needed
857
- if (xml.includes('.bmad') && this.bmadFolderName) {
858
- const processedXml = xml.replaceAll('.bmad', this.bmadFolderName);
859
- await fs.writeFile(targetMdPath, processedXml, 'utf8');
860
- } else {
861
- await fs.writeFile(targetMdPath, xml, 'utf8');
848
+ // Process TTS injection points if installer is available
849
+ let finalXml = xml;
850
+ if (installer && installer.processTTSInjectionPoints) {
851
+ finalXml = installer.processTTSInjectionPoints(xml, targetMdPath);
862
852
  }
863
853
 
864
- // Copy sidecar files if agent has hasSidecar flag
865
- if (hasSidecar) {
866
- const { copyAgentSidecarFiles } = require('../../../lib/agent/installer');
854
+ // Write the compiled agent
855
+ await fs.writeFile(targetMdPath, finalXml, 'utf8');
867
856
 
868
- // Get agent sidecar folder from core config (should always be set)
869
- const agentSidecarFolder = this.coreConfig?.agent_sidecar_folder;
857
+ // Handle sidecar copying if present
858
+ if (hasSidecar) {
859
+ // Get the agent's directory to look for sidecar
860
+ const agentDir = path.dirname(agentFile);
861
+ const sidecarDirName = `${agentName}-sidecar`;
862
+ const sourceSidecarPath = path.join(agentDir, sidecarDirName);
870
863
 
871
- // Resolve path variables
872
- const projectDir = path.dirname(bmadDir);
873
- const resolvedSidecarFolder = agentSidecarFolder
874
- .replaceAll('{project-root}', projectDir)
875
- .replaceAll('.bmad', path.basename(bmadDir));
864
+ // Check if sidecar directory exists
865
+ if (await fs.pathExists(sourceSidecarPath)) {
866
+ // Memory is always in _bmad/_memory
867
+ const bmadMemoryPath = path.join(bmadDir, '_memory');
876
868
 
877
- // Create sidecar directory for this agent
878
- const agentSidecarDir = path.join(resolvedSidecarFolder, agentName);
879
- await fs.ensureDir(agentSidecarDir);
869
+ // Determine if this is an update (by checking if agent already exists)
870
+ const isUpdate = await fs.pathExists(targetMdPath);
880
871
 
881
- // Copy sidecar files (preserve existing, add new)
882
- const sidecarResult = copyAgentSidecarFiles(path.dirname(sourceYamlPath), agentSidecarDir, sourceYamlPath);
883
- const totalFiles = sidecarResult.copied.length + sidecarResult.preserved.length;
872
+ // Copy sidecar to memory location with update-safe handling
873
+ const copiedFiles = await this.copySidecarToMemory(sourceSidecarPath, agentName, bmadMemoryPath, isUpdate, bmadDir, installer);
884
874
 
885
- if (sidecarResult.copied.length > 0) {
886
- console.log(chalk.dim(` Copied ${sidecarResult.copied.length} new sidecar file(s) to: ${agentSidecarDir}`));
875
+ if (process.env.BMAD_VERBOSE_INSTALL === 'true' && copiedFiles.length > 0) {
876
+ console.log(chalk.dim(` Sidecar files processed: ${copiedFiles.length} files`));
877
+ }
878
+ } else if (process.env.BMAD_VERBOSE_INSTALL === 'true') {
879
+ console.log(chalk.yellow(` Warning: Agent marked as having sidecar but ${sidecarDirName} directory not found`));
887
880
  }
888
- if (sidecarResult.preserved.length > 0) {
889
- console.log(chalk.dim(` Preserved ${sidecarResult.preserved.length} existing sidecar file(s)`));
881
+ }
882
+
883
+ // Copy any non-sidecar files from agent directory (e.g., foo.md)
884
+ const agentDir = path.dirname(agentFile);
885
+ const agentEntries = await fs.readdir(agentDir, { withFileTypes: true });
886
+
887
+ for (const entry of agentEntries) {
888
+ if (entry.isFile() && !entry.name.endsWith('.agent.yaml') && !entry.name.endsWith('.md')) {
889
+ // Copy additional files (like foo.md) to the agent target directory
890
+ const sourceFile = path.join(agentDir, entry.name);
891
+ const targetFile = path.join(targetDir, entry.name);
892
+ await this.copyFileWithPlaceholderReplacement(sourceFile, targetFile);
890
893
  }
891
894
  }
892
895
 
893
- console.log(
894
- chalk.dim(` Compiled agent: ${agentName} -> ${path.relative(targetPath, targetMdPath)}${hasSidecar ? ' (with sidecar)' : ''}`),
895
- );
896
+ // Only show compilation details in verbose mode
897
+ if (process.env.BMAD_VERBOSE_INSTALL === 'true') {
898
+ console.log(
899
+ chalk.dim(
900
+ ` Compiled agent: ${agentName} -> ${path.relative(targetPath, targetMdPath)}${hasSidecar ? ' (with sidecar)' : ''}`,
901
+ ),
902
+ );
903
+ }
896
904
  } catch (error) {
897
905
  console.warn(chalk.yellow(` Failed to compile agent ${agentName}:`, error.message));
898
906
  }
@@ -931,28 +939,23 @@ class ModuleManager {
931
939
  * @param {string} moduleName - Module name
932
940
  */
933
941
  async processAgentFiles(modulePath, moduleName) {
934
- const agentsPath = path.join(modulePath, 'agents');
935
-
936
- // Check if agents directory exists
937
- if (!(await fs.pathExists(agentsPath))) {
938
- return; // No agents to process
939
- }
940
-
941
- // Get all agent MD files recursively
942
- const agentFiles = await this.findAgentMdFiles(agentsPath);
943
-
944
- for (const agentFile of agentFiles) {
945
- if (!agentFile.endsWith('.md')) continue;
946
-
947
- let content = await fs.readFile(agentFile, 'utf8');
948
-
949
- // Check if content has agent XML and no activation block
950
- if (content.includes('<agent') && !content.includes('<activation')) {
951
- // Inject the activation block using XML handler
952
- content = this.xmlHandler.injectActivationSimple(content);
953
- await fs.writeFile(agentFile, content, 'utf8');
954
- }
955
- }
942
+ // const agentsPath = path.join(modulePath, 'agents');
943
+ // // Check if agents directory exists
944
+ // if (!(await fs.pathExists(agentsPath))) {
945
+ // return; // No agents to process
946
+ // }
947
+ // // Get all agent MD files recursively
948
+ // const agentFiles = await this.findAgentMdFiles(agentsPath);
949
+ // for (const agentFile of agentFiles) {
950
+ // if (!agentFile.endsWith('.md')) continue;
951
+ // let content = await fs.readFile(agentFile, 'utf8');
952
+ // // Check if content has agent XML and no activation block
953
+ // if (content.includes('<agent') && !content.includes('<activation')) {
954
+ // // Inject the activation block using XML handler
955
+ // content = this.xmlHandler.injectActivationSimple(content);
956
+ // await fs.writeFile(agentFile, content, 'utf8');
957
+ // }
958
+ // }
956
959
  }
957
960
 
958
961
  /**
@@ -1008,7 +1011,7 @@ class ModuleManager {
1008
1011
 
1009
1012
  for (const agentFile of yamlFiles) {
1010
1013
  const agentPath = path.join(sourceAgentsPath, agentFile);
1011
- const agentYaml = yaml.load(await fs.readFile(agentPath, 'utf8'));
1014
+ const agentYaml = yaml.parse(await fs.readFile(agentPath, 'utf8'));
1012
1015
 
1013
1016
  // Check if agent has menu items with workflow-install
1014
1017
  const menuItems = agentYaml?.agent?.menu || [];
@@ -1030,10 +1033,10 @@ class ModuleManager {
1030
1033
  const installWorkflowPath = item['workflow-install']; // Where to copy TO
1031
1034
 
1032
1035
  // Parse SOURCE workflow path
1033
- // Handle both .bmad placeholder and hardcoded 'bmad'
1034
- // Example: {project-root}/.bmad/bmm/workflows/4-implementation/create-story/workflow.yaml
1036
+ // Handle both _bmad placeholder and hardcoded 'bmad'
1037
+ // Example: {project-root}/_bmad/bmm/workflows/4-implementation/create-story/workflow.yaml
1035
1038
  // Or: {project-root}/bmad/bmm/workflows/4-implementation/create-story/workflow.yaml
1036
- const sourceMatch = sourceWorkflowPath.match(/\{project-root\}\/(?:\.bmad)\/([^/]+)\/workflows\/(.+)/);
1039
+ const sourceMatch = sourceWorkflowPath.match(/\{project-root\}\/(?:_bmad)\/([^/]+)\/workflows\/(.+)/);
1037
1040
  if (!sourceMatch) {
1038
1041
  console.warn(chalk.yellow(` Could not parse workflow path: ${sourceWorkflowPath}`));
1039
1042
  continue;
@@ -1042,9 +1045,9 @@ class ModuleManager {
1042
1045
  const [, sourceModule, sourceWorkflowSubPath] = sourceMatch;
1043
1046
 
1044
1047
  // Parse INSTALL workflow path
1045
- // Handle.bmad
1046
- // Example: {project-root}/.bmad/bmgd/workflows/4-production/create-story/workflow.yaml
1047
- const installMatch = installWorkflowPath.match(/\{project-root\}\/(\.bmad)\/([^/]+)\/workflows\/(.+)/);
1048
+ // Handle_bmad
1049
+ // Example: {project-root}/_bmad/bmgd/workflows/4-production/create-story/workflow.yaml
1050
+ const installMatch = installWorkflowPath.match(/\{project-root\}\/(_bmad)\/([^/]+)\/workflows\/(.+)/);
1048
1051
  if (!installMatch) {
1049
1052
  console.warn(chalk.yellow(` Could not parse workflow-install path: ${installWorkflowPath}`));
1050
1053
  continue;
@@ -1096,9 +1099,9 @@ class ModuleManager {
1096
1099
  async updateWorkflowConfigSource(workflowYamlPath, newModuleName) {
1097
1100
  let yamlContent = await fs.readFile(workflowYamlPath, 'utf8');
1098
1101
 
1099
- // Replace config_source: "{project-root}/.bmad/OLD_MODULE/config.yaml"
1100
- // with config_source: "{project-root}/.bmad/NEW_MODULE/config.yaml"
1101
- // Note: At this point .bmad has already been replaced with actual folder name
1102
+ // Replace config_source: "{project-root}/_bmad/OLD_MODULE/config.yaml"
1103
+ // with config_source: "{project-root}/_bmad/NEW_MODULE/config.yaml"
1104
+ // Note: At this point _bmad has already been replaced with actual folder name
1102
1105
  const configSourcePattern = /config_source:\s*["']?\{project-root\}\/[^/]+\/[^/]+\/config\.yaml["']?/g;
1103
1106
  const newConfigSource = `config_source: "{project-root}/${this.bmadFolderName}/${newModuleName}/config.yaml"`;
1104
1107