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

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 (412) hide show
  1. package/.coderabbit.yaml +36 -0
  2. package/{CODE_OF_CONDUCT.md → .github/CODE_OF_CONDUCT.md} +4 -4
  3. package/CHANGELOG.md +168 -409
  4. package/README.md +4 -1
  5. package/docs/agent-customization-guide.md +7 -7
  6. package/docs/custom-content-installation.md +245 -0
  7. package/docs/ide-info/crush.md +1 -1
  8. package/docs/ide-info/cursor.md +7 -7
  9. package/docs/ide-info/iflow.md +3 -3
  10. package/docs/ide-info/opencode.md +1 -1
  11. package/docs/index.md +2 -2
  12. package/docs/installers-bundlers/ide-injections.md +2 -2
  13. package/docs/installers-bundlers/installers-modules-platforms-reference.md +29 -28
  14. package/docs/v4-to-v6-upgrade.md +10 -10
  15. package/docs/web-bundles-gemini-gpt-guide.md +2 -2
  16. package/package.json +1 -1
  17. package/src/core/_module-installer/installer.js +1 -1
  18. package/src/core/agents/bmad-master.agent.yaml +5 -5
  19. package/src/core/agents/bmad-web-orchestrator.agent.xml +6 -6
  20. package/src/core/{_module-installer/install-config.yaml → module.yaml} +0 -7
  21. package/src/core/resources/excalidraw/README.md +4 -4
  22. package/src/core/tasks/advanced-elicitation.xml +3 -3
  23. package/src/core/tasks/index-docs.xml +1 -1
  24. package/src/core/tasks/validate-workflow.xml +1 -1
  25. package/src/core/tasks/workflow.xml +4 -4
  26. package/src/core/tools/shard-doc.xml +1 -1
  27. package/src/core/workflows/brainstorming/workflow.md +2 -2
  28. package/src/core/workflows/party-mode/steps/step-01-agent-loading.md +2 -2
  29. package/src/core/workflows/party-mode/workflow.md +4 -4
  30. package/src/modules/bmb/README.md +2 -2
  31. package/src/modules/bmb/_module-installer/installer.js +1 -1
  32. package/src/modules/bmb/agents/bmad-builder.agent.yaml +15 -15
  33. package/src/modules/bmb/docs/agents/agent-compilation.md +2 -2
  34. package/src/modules/bmb/docs/agents/agent-menu-patterns.md +22 -22
  35. package/src/modules/bmb/docs/agents/expert-agent-architecture.md +1 -1
  36. package/src/modules/bmb/docs/agents/index.md +2 -2
  37. package/src/modules/bmb/docs/agents/module-agent-architecture.md +50 -51
  38. package/src/modules/bmb/docs/agents/understanding-agent-types.md +3 -3
  39. package/src/modules/bmb/docs/workflows/architecture.md +1 -1
  40. package/src/modules/bmb/docs/workflows/common-workflow-tools.csv +3 -3
  41. package/src/modules/bmb/docs/workflows/templates/step-01-init-continuable-template.md +1 -1
  42. package/src/modules/bmb/docs/workflows/templates/step-1b-template.md +1 -1
  43. package/src/modules/bmb/docs/workflows/templates/step-file.md +3 -3
  44. package/src/modules/bmb/docs/workflows/templates/step-template.md +3 -3
  45. package/src/modules/bmb/docs/workflows/templates/workflow-template.md +2 -2
  46. package/src/modules/bmb/docs/workflows/templates/workflow.md +1 -1
  47. package/src/modules/bmb/{_module-installer/install-config.yaml → module.yaml} +0 -1
  48. package/src/modules/bmb/reference/agents/module-examples/README.md +1 -1
  49. package/src/modules/bmb/reference/agents/module-examples/security-engineer.agent.yaml +5 -5
  50. package/src/modules/bmb/reference/agents/module-examples/trend-analyst.agent.yaml +7 -7
  51. package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-01-init.md +1 -1
  52. package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-01b-continue.md +1 -1
  53. package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-02-profile.md +3 -3
  54. package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-03-assessment.md +3 -3
  55. package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-04-strategy.md +5 -5
  56. package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-05-shopping.md +5 -5
  57. package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-06-prep-schedule.md +5 -5
  58. package/src/modules/bmb/reference/workflows/meal-prep-nutrition/workflow.md +2 -2
  59. package/src/modules/bmb/workflows/create-agent/data/reference/agents/module-examples/README.md +1 -1
  60. package/src/modules/bmb/workflows/create-agent/data/reference/agents/module-examples/security-engineer.agent.yaml +6 -6
  61. package/src/modules/bmb/workflows/create-agent/data/reference/agents/module-examples/trend-analyst.agent.yaml +7 -7
  62. package/src/modules/bmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/steps/step-01-init.md +1 -1
  63. package/src/modules/bmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/steps/step-01b-continue.md +1 -1
  64. package/src/modules/bmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/steps/step-02-profile.md +3 -3
  65. package/src/modules/bmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/steps/step-03-assessment.md +3 -3
  66. package/src/modules/bmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/steps/step-04-strategy.md +5 -5
  67. package/src/modules/bmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/steps/step-05-shopping.md +5 -5
  68. package/src/modules/bmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/steps/step-06-prep-schedule.md +5 -5
  69. package/src/modules/bmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/workflow.md +2 -2
  70. package/src/modules/bmb/workflows/create-agent/data/validation-complete.md +5 -5
  71. package/src/modules/bmb/workflows/create-agent/steps/step-01-brainstorm.md +4 -4
  72. package/src/modules/bmb/workflows/create-agent/steps/step-02-discover.md +4 -4
  73. package/src/modules/bmb/workflows/create-agent/steps/step-03-persona.md +4 -4
  74. package/src/modules/bmb/workflows/create-agent/steps/step-04-commands.md +7 -7
  75. package/src/modules/bmb/workflows/create-agent/steps/step-05-name.md +3 -3
  76. package/src/modules/bmb/workflows/create-agent/steps/step-06-build.md +4 -4
  77. package/src/modules/bmb/workflows/create-agent/steps/step-07-validate.md +4 -4
  78. package/src/modules/bmb/workflows/create-agent/steps/step-08-setup.md +3 -3
  79. package/src/modules/bmb/workflows/create-agent/steps/step-09-customize.md +4 -4
  80. package/src/modules/bmb/workflows/create-agent/steps/step-10-build-tools.md +3 -3
  81. package/src/modules/bmb/workflows/create-agent/steps/step-11-celebrate.md +3 -3
  82. package/src/modules/bmb/workflows/create-agent/workflow.md +13 -13
  83. package/src/modules/bmb/workflows/create-module/steps/step-01-init.md +2 -2
  84. package/src/modules/bmb/workflows/create-module/steps/step-02-concept.md +4 -4
  85. package/src/modules/bmb/workflows/create-module/steps/step-03-components.md +4 -4
  86. package/src/modules/bmb/workflows/create-module/steps/step-04-structure.md +6 -6
  87. package/src/modules/bmb/workflows/create-module/steps/step-05-config.md +5 -5
  88. package/src/modules/bmb/workflows/create-module/steps/step-06-agents.md +6 -6
  89. package/src/modules/bmb/workflows/create-module/steps/step-07-workflows.md +3 -3
  90. package/src/modules/bmb/workflows/create-module/steps/step-08-installer.md +12 -12
  91. package/src/modules/bmb/workflows/create-module/steps/step-09-documentation.md +6 -5
  92. package/src/modules/bmb/workflows/create-module/steps/step-10-roadmap.md +6 -5
  93. package/src/modules/bmb/workflows/create-module/steps/step-11-validate.md +7 -7
  94. package/src/modules/bmb/workflows/create-module/templates/agent.template.md +7 -7
  95. package/src/modules/bmb/workflows/create-module/templates/installer.template.js +1 -1
  96. package/src/modules/bmb/workflows/create-module/templates/{install-config.template.yaml → module.template.yaml} +1 -1
  97. package/src/modules/bmb/workflows/create-module/validation.md +3 -3
  98. package/src/modules/bmb/workflows/create-module/workflow.md +2 -2
  99. package/src/modules/bmb/workflows/create-workflow/steps/step-01-init.md +3 -3
  100. package/src/modules/bmb/workflows/create-workflow/steps/step-02-gather.md +5 -5
  101. package/src/modules/bmb/workflows/create-workflow/steps/step-03-tools-configuration.md +4 -4
  102. package/src/modules/bmb/workflows/create-workflow/steps/step-04-plan-review.md +3 -3
  103. package/src/modules/bmb/workflows/create-workflow/steps/step-05-output-format-design.md +3 -3
  104. package/src/modules/bmb/workflows/create-workflow/steps/step-06-design.md +10 -10
  105. package/src/modules/bmb/workflows/create-workflow/steps/step-07-build.md +13 -13
  106. package/src/modules/bmb/workflows/create-workflow/steps/step-08-review.md +3 -3
  107. package/src/modules/bmb/workflows/create-workflow/steps/step-09-complete.md +1 -1
  108. package/src/modules/bmb/workflows/create-workflow/workflow.md +1 -1
  109. package/src/modules/bmb/workflows/edit-agent/steps/step-01-discover-intent.md +3 -3
  110. package/src/modules/bmb/workflows/edit-agent/steps/step-02-analyze-agent.md +13 -13
  111. package/src/modules/bmb/workflows/edit-agent/steps/step-03-propose-changes.md +5 -5
  112. package/src/modules/bmb/workflows/edit-agent/steps/step-04-apply-changes.md +3 -3
  113. package/src/modules/bmb/workflows/edit-agent/steps/step-05-validate.md +5 -5
  114. package/src/modules/bmb/workflows/edit-agent/workflow.md +1 -1
  115. package/src/modules/bmb/workflows/edit-workflow/steps/step-01-analyze.md +4 -4
  116. package/src/modules/bmb/workflows/edit-workflow/steps/step-02-discover.md +3 -3
  117. package/src/modules/bmb/workflows/edit-workflow/steps/step-03-improve.md +6 -6
  118. package/src/modules/bmb/workflows/edit-workflow/steps/step-04-validate.md +3 -3
  119. package/src/modules/bmb/workflows/edit-workflow/steps/step-05-compliance-check.md +3 -3
  120. package/src/modules/bmb/workflows/edit-workflow/workflow.md +1 -1
  121. package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-01-validate-goal.md +3 -3
  122. package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-02-workflow-validation.md +5 -5
  123. package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-03-step-validation.md +6 -6
  124. package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-04-file-validation.md +4 -4
  125. package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-05-intent-spectrum-validation.md +4 -4
  126. package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-06-web-subprocess-validation.md +4 -4
  127. package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-07-holistic-analysis.md +4 -4
  128. package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-08-generate-report.md +3 -3
  129. package/src/modules/bmb/workflows/workflow-compliance-check/workflow.md +1 -1
  130. package/src/modules/bmb/workflows-legacy/edit-module/README.md +2 -2
  131. package/src/modules/bmb/workflows-legacy/edit-module/checklist.md +2 -2
  132. package/src/modules/bmb/workflows-legacy/edit-module/instructions.md +4 -4
  133. package/src/modules/bmb/workflows-legacy/edit-module/workflow.yaml +10 -10
  134. package/src/modules/bmb/workflows-legacy/module-brief/README.md +2 -2
  135. package/src/modules/bmb/workflows-legacy/module-brief/instructions.md +2 -2
  136. package/src/modules/bmb/workflows-legacy/module-brief/workflow.yaml +4 -4
  137. package/src/modules/bmgd/README.md +3 -2
  138. package/src/modules/bmgd/agents/game-architect.agent.yaml +6 -6
  139. package/src/modules/bmgd/agents/game-designer.agent.yaml +7 -7
  140. package/src/modules/bmgd/agents/game-dev.agent.yaml +9 -9
  141. package/src/modules/bmgd/agents/game-scrum-master.agent.yaml +21 -21
  142. package/src/modules/bmgd/{_module-installer/install-config.yaml → module.yaml} +0 -1
  143. package/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/instructions.md +1 -1
  144. package/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/workflow.yaml +9 -9
  145. package/src/modules/bmgd/workflows/1-preproduction/game-brief/instructions.md +1 -1
  146. package/src/modules/bmgd/workflows/1-preproduction/game-brief/workflow.yaml +8 -8
  147. package/src/modules/bmgd/workflows/2-design/gdd/instructions-gdd.md +4 -4
  148. package/src/modules/bmgd/workflows/2-design/gdd/workflow.yaml +30 -30
  149. package/src/modules/bmgd/workflows/2-design/narrative/instructions-narrative.md +1 -1
  150. package/src/modules/bmgd/workflows/2-design/narrative/workflow.yaml +5 -5
  151. package/src/modules/bmgd/workflows/3-technical/game-architecture/instructions.md +1 -1
  152. package/src/modules/bmgd/workflows/3-technical/game-architecture/workflow.yaml +2 -2
  153. package/src/modules/bmgd/workflows/4-production/code-review/instructions.md +2 -2
  154. package/src/modules/bmgd/workflows/4-production/code-review/workflow.yaml +2 -2
  155. package/src/modules/bmgd/workflows/4-production/correct-course/checklist.md +1 -1
  156. package/src/modules/bmgd/workflows/4-production/correct-course/instructions.md +2 -2
  157. package/src/modules/bmgd/workflows/4-production/correct-course/workflow.yaml +2 -2
  158. package/src/modules/bmgd/workflows/4-production/create-story/instructions.md +2 -2
  159. package/src/modules/bmgd/workflows/4-production/create-story/workflow.yaml +2 -2
  160. package/src/modules/bmgd/workflows/4-production/dev-story/instructions.md +2 -2
  161. package/src/modules/bmgd/workflows/4-production/dev-story/workflow.yaml +2 -2
  162. package/src/modules/bmgd/workflows/4-production/epic-tech-context/checklist.md +1 -1
  163. package/src/modules/bmgd/workflows/4-production/epic-tech-context/instructions.md +2 -2
  164. package/src/modules/bmgd/workflows/4-production/epic-tech-context/workflow.yaml +2 -2
  165. package/src/modules/bmgd/workflows/4-production/retrospective/instructions.md +2 -2
  166. package/src/modules/bmgd/workflows/4-production/retrospective/workflow.yaml +3 -3
  167. package/src/modules/bmgd/workflows/4-production/sprint-planning/instructions.md +2 -2
  168. package/src/modules/bmgd/workflows/4-production/sprint-planning/workflow.yaml +2 -2
  169. package/src/modules/bmgd/workflows/4-production/story-context/checklist.md +1 -1
  170. package/src/modules/bmgd/workflows/4-production/story-context/context-template.xml +1 -1
  171. package/src/modules/bmgd/workflows/4-production/story-context/instructions.md +2 -2
  172. package/src/modules/bmgd/workflows/4-production/story-context/workflow.yaml +2 -2
  173. package/src/modules/bmgd/workflows/4-production/story-done/instructions.md +1 -1
  174. package/src/modules/bmgd/workflows/4-production/story-done/workflow.yaml +2 -2
  175. package/src/modules/bmgd/workflows/4-production/story-ready/instructions.md +1 -1
  176. package/src/modules/bmgd/workflows/4-production/story-ready/workflow.yaml +2 -2
  177. package/src/modules/bmm/_module-installer/installer.js +1 -1
  178. package/src/modules/bmm/_module-installer/platform-specifics/claude-code.js +1 -1
  179. package/src/modules/bmm/_module-installer/platform-specifics/windsurf.js +1 -1
  180. package/src/modules/bmm/agents/analyst.agent.yaml +8 -8
  181. package/src/modules/bmm/agents/architect.agent.yaml +8 -8
  182. package/src/modules/bmm/agents/dev.agent.yaml +3 -3
  183. package/src/modules/bmm/agents/pm.agent.yaml +8 -8
  184. package/src/modules/bmm/agents/quick-flow-solo-dev.agent.yaml +5 -5
  185. package/src/modules/bmm/agents/sm.agent.yaml +9 -9
  186. package/src/modules/bmm/agents/tea.agent.yaml +13 -13
  187. package/src/modules/bmm/agents/tech-writer.agent.yaml +9 -9
  188. package/src/modules/bmm/agents/ux-designer.agent.yaml +6 -6
  189. package/src/modules/bmm/docs/README.md +0 -25
  190. package/src/modules/bmm/docs/agents-guide.md +4 -4
  191. package/src/modules/bmm/docs/brownfield-guide.md +4 -4
  192. package/src/modules/bmm/docs/enterprise-agentic-development.md +3 -3
  193. package/src/modules/bmm/docs/faq.md +1 -1
  194. package/src/modules/bmm/docs/party-mode.md +3 -3
  195. package/src/modules/bmm/docs/quick-start.md +1 -1
  196. package/src/modules/bmm/docs/test-architecture.md +3 -3
  197. package/src/modules/bmm/docs/workflow-document-project-reference.md +1 -1
  198. package/src/modules/bmm/docs/workflows-implementation.md +0 -100
  199. package/src/modules/bmm/{_module-installer/install-config.yaml → module.yaml} +1 -2
  200. package/src/modules/bmm/workflows/1-analysis/product-brief/steps/step-01-init.md +1 -1
  201. package/src/modules/bmm/workflows/1-analysis/product-brief/steps/step-01b-continue.md +1 -1
  202. package/src/modules/bmm/workflows/1-analysis/product-brief/steps/step-02-vision.md +3 -3
  203. package/src/modules/bmm/workflows/1-analysis/product-brief/steps/step-03-users.md +3 -3
  204. package/src/modules/bmm/workflows/1-analysis/product-brief/steps/step-04-metrics.md +3 -3
  205. package/src/modules/bmm/workflows/1-analysis/product-brief/steps/step-05-scope.md +3 -3
  206. package/src/modules/bmm/workflows/1-analysis/product-brief/steps/step-06-complete.md +5 -3
  207. package/src/modules/bmm/workflows/1-analysis/product-brief/workflow.md +2 -2
  208. package/src/modules/bmm/workflows/1-analysis/research/workflow.md +2 -2
  209. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-02-discovery.md +4 -4
  210. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-03-core-experience.md +4 -4
  211. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-04-emotional-response.md +4 -4
  212. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-05-inspiration.md +4 -4
  213. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-06-design-system.md +4 -4
  214. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-07-defining-experience.md +4 -4
  215. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-08-visual-foundation.md +4 -4
  216. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-09-design-directions.md +4 -4
  217. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-10-user-journeys.md +4 -4
  218. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-11-component-strategy.md +4 -4
  219. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-12-ux-patterns.md +4 -4
  220. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-13-responsive-accessibility.md +4 -4
  221. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/workflow.md +2 -2
  222. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-01-init.md +1 -1
  223. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-01b-continue.md +1 -1
  224. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-02-discovery.md +3 -3
  225. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-03-success.md +7 -7
  226. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-04-journeys.md +8 -8
  227. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-05-domain.md +12 -12
  228. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-06-innovation.md +12 -12
  229. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-07-project-type.md +10 -10
  230. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-08-scoping.md +7 -7
  231. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-09-functional.md +9 -9
  232. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-10-nonfunctional.md +9 -9
  233. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-11-complete.md +1 -1
  234. package/src/modules/bmm/workflows/2-plan-workflows/prd/workflow.md +1 -1
  235. package/src/modules/bmm/workflows/3-solutioning/architecture/steps/step-02-context.md +4 -4
  236. package/src/modules/bmm/workflows/3-solutioning/architecture/steps/step-03-starter.md +4 -4
  237. package/src/modules/bmm/workflows/3-solutioning/architecture/steps/step-04-decisions.md +4 -4
  238. package/src/modules/bmm/workflows/3-solutioning/architecture/steps/step-05-patterns.md +4 -4
  239. package/src/modules/bmm/workflows/3-solutioning/architecture/steps/step-06-structure.md +4 -4
  240. package/src/modules/bmm/workflows/3-solutioning/architecture/steps/step-07-validation.md +4 -4
  241. package/src/modules/bmm/workflows/3-solutioning/architecture/steps/step-08-complete.md +1 -1
  242. package/src/modules/bmm/workflows/3-solutioning/architecture/workflow.md +2 -2
  243. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-01-validate-prerequisites.md +1 -1
  244. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-02-design-epics.md +1 -1
  245. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-03-create-stories.md +1 -1
  246. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-04-final-validation.md +1 -1
  247. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/workflow.md +2 -2
  248. package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/steps/step-01-document-discovery.md +1 -1
  249. package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/steps/step-02-prd-analysis.md +1 -1
  250. package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/steps/step-03-epic-coverage-validation.md +6 -6
  251. package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/steps/step-04-ux-alignment.md +1 -1
  252. package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/steps/step-05-epic-quality-review.md +2 -2
  253. package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/steps/step-06-final-assessment.md +1 -1
  254. package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/workflow.md +1 -1
  255. package/src/modules/bmm/workflows/4-implementation/code-review/instructions.xml +1 -1
  256. package/src/modules/bmm/workflows/4-implementation/code-review/workflow.yaml +2 -2
  257. package/src/modules/bmm/workflows/4-implementation/correct-course/checklist.md +1 -1
  258. package/src/modules/bmm/workflows/4-implementation/correct-course/instructions.md +2 -2
  259. package/src/modules/bmm/workflows/4-implementation/correct-course/workflow.yaml +2 -2
  260. package/src/modules/bmm/workflows/4-implementation/create-story/checklist.md +2 -2
  261. package/src/modules/bmm/workflows/4-implementation/create-story/instructions.xml +2 -2
  262. package/src/modules/bmm/workflows/4-implementation/create-story/workflow.yaml +2 -2
  263. package/src/modules/bmm/workflows/4-implementation/dev-story/instructions.xml +1 -1
  264. package/src/modules/bmm/workflows/4-implementation/dev-story/workflow.yaml +2 -2
  265. package/src/modules/bmm/workflows/4-implementation/retrospective/instructions.md +2 -2
  266. package/src/modules/bmm/workflows/4-implementation/retrospective/workflow.yaml +3 -3
  267. package/src/modules/bmm/workflows/4-implementation/sprint-planning/instructions.md +2 -2
  268. package/src/modules/bmm/workflows/4-implementation/sprint-planning/workflow.yaml +2 -2
  269. package/src/modules/bmm/workflows/4-implementation/sprint-status/instructions.md +2 -2
  270. package/src/modules/bmm/workflows/4-implementation/sprint-status/workflow.yaml +2 -2
  271. package/src/modules/bmm/workflows/bmad-quick-flow/create-tech-spec/workflow.yaml +5 -5
  272. package/src/modules/bmm/workflows/bmad-quick-flow/quick-dev/workflow.yaml +7 -7
  273. package/src/modules/bmm/workflows/diagrams/create-dataflow/instructions.md +1 -1
  274. package/src/modules/bmm/workflows/diagrams/create-dataflow/workflow.yaml +5 -5
  275. package/src/modules/bmm/workflows/diagrams/create-diagram/instructions.md +2 -2
  276. package/src/modules/bmm/workflows/diagrams/create-diagram/workflow.yaml +5 -5
  277. package/src/modules/bmm/workflows/diagrams/create-flowchart/instructions.md +2 -2
  278. package/src/modules/bmm/workflows/diagrams/create-flowchart/workflow.yaml +5 -5
  279. package/src/modules/bmm/workflows/diagrams/create-wireframe/instructions.md +1 -1
  280. package/src/modules/bmm/workflows/diagrams/create-wireframe/workflow.yaml +5 -5
  281. package/src/modules/bmm/workflows/document-project/instructions.md +5 -5
  282. package/src/modules/bmm/workflows/document-project/workflow.yaml +2 -2
  283. package/src/modules/bmm/workflows/document-project/workflows/deep-dive.yaml +5 -5
  284. package/src/modules/bmm/workflows/document-project/workflows/full-scan.yaml +5 -5
  285. package/src/modules/bmm/workflows/generate-project-context/steps/step-02-generate.md +2 -2
  286. package/src/modules/bmm/workflows/generate-project-context/workflow.md +2 -2
  287. package/src/modules/bmm/workflows/testarch/atdd/instructions.md +2 -2
  288. package/src/modules/bmm/workflows/testarch/atdd/workflow.yaml +2 -2
  289. package/src/modules/bmm/workflows/testarch/automate/instructions.md +2 -2
  290. package/src/modules/bmm/workflows/testarch/automate/workflow.yaml +2 -2
  291. package/src/modules/bmm/workflows/testarch/ci/instructions.md +1 -1
  292. package/src/modules/bmm/workflows/testarch/ci/workflow.yaml +2 -2
  293. package/src/modules/bmm/workflows/testarch/framework/instructions.md +3 -3
  294. package/src/modules/bmm/workflows/testarch/framework/workflow.yaml +2 -2
  295. package/src/modules/bmm/workflows/testarch/nfr-assess/instructions.md +1 -1
  296. package/src/modules/bmm/workflows/testarch/nfr-assess/workflow.yaml +2 -2
  297. package/src/modules/bmm/workflows/testarch/test-design/instructions.md +3 -3
  298. package/src/modules/bmm/workflows/testarch/test-design/test-design-template.md +1 -1
  299. package/src/modules/bmm/workflows/testarch/test-design/workflow.yaml +2 -2
  300. package/src/modules/bmm/workflows/testarch/test-review/instructions.md +1 -1
  301. package/src/modules/bmm/workflows/testarch/test-review/workflow.yaml +2 -2
  302. package/src/modules/bmm/workflows/testarch/trace/instructions.md +6 -6
  303. package/src/modules/bmm/workflows/testarch/trace/workflow.yaml +2 -2
  304. package/src/modules/bmm/workflows/workflow-status/init/instructions.md +1 -1
  305. package/src/modules/bmm/workflows/workflow-status/init/workflow.yaml +4 -4
  306. package/src/modules/bmm/workflows/workflow-status/instructions.md +3 -3
  307. package/src/modules/bmm/workflows/workflow-status/project-levels.yaml +1 -1
  308. package/src/modules/bmm/workflows/workflow-status/workflow.yaml +2 -2
  309. package/src/modules/cis/README.md +1 -1
  310. package/src/modules/cis/_module-installer/installer.js +1 -1
  311. package/src/modules/cis/agents/README.md +1 -1
  312. package/src/modules/cis/agents/brainstorming-coach.agent.yaml +4 -4
  313. package/src/modules/cis/agents/creative-problem-solver.agent.yaml +4 -4
  314. package/src/modules/cis/agents/design-thinking-coach.agent.yaml +4 -4
  315. package/src/modules/cis/agents/innovation-strategist.agent.yaml +4 -4
  316. package/src/modules/cis/agents/presentation-master.agent.yaml +3 -3
  317. package/src/modules/cis/agents/storyteller.agent.yaml +4 -4
  318. package/src/modules/cis/{_module-installer/install-config.yaml → module.yaml} +0 -1
  319. package/src/modules/cis/workflows/README.md +1 -1
  320. package/src/modules/cis/workflows/design-thinking/instructions.md +2 -2
  321. package/src/modules/cis/workflows/design-thinking/workflow.yaml +7 -7
  322. package/src/modules/cis/workflows/innovation-strategy/instructions.md +2 -2
  323. package/src/modules/cis/workflows/innovation-strategy/workflow.yaml +7 -7
  324. package/src/modules/cis/workflows/problem-solving/instructions.md +2 -2
  325. package/src/modules/cis/workflows/problem-solving/workflow.yaml +7 -7
  326. package/src/modules/cis/workflows/storytelling/instructions.md +2 -2
  327. package/src/modules/cis/workflows/storytelling/workflow.yaml +7 -7
  328. package/src/utility/models/agent-activation-ide.xml +3 -3
  329. package/src/utility/models/agent-activation-web.xml +3 -3
  330. package/src/utility/models/fragments/activation-steps.xml +1 -1
  331. package/src/utility/models/fragments/handler-validate-workflow.xml +1 -1
  332. package/src/utility/models/fragments/handler-workflow.xml +1 -1
  333. package/src/utility/models/fragments/web-bundle-activation-steps.xml +3 -3
  334. package/tools/cli/README.md +23 -23
  335. package/tools/cli/bundlers/web-bundler.js +23 -33
  336. package/tools/cli/commands/build.js +5 -5
  337. package/tools/cli/installers/lib/core/config-collector.js +33 -20
  338. package/tools/cli/installers/lib/core/custom-module-cache.js +251 -0
  339. package/tools/cli/installers/lib/core/detector.js +8 -4
  340. package/tools/cli/installers/lib/core/installer.js +885 -98
  341. package/tools/cli/installers/lib/core/manifest-generator.js +177 -14
  342. package/tools/cli/installers/lib/core/manifest.js +47 -0
  343. package/tools/cli/installers/lib/custom/handler.js +147 -20
  344. package/tools/cli/installers/lib/ide/_base-ide.js +14 -14
  345. package/tools/cli/installers/lib/ide/gemini.js +4 -4
  346. package/tools/cli/installers/lib/ide/shared/agent-command-generator.js +2 -2
  347. package/tools/cli/installers/lib/ide/shared/workflow-command-generator.js +3 -3
  348. package/tools/cli/installers/lib/ide/templates/agent-command-template.md +1 -1
  349. package/tools/cli/installers/lib/ide/templates/gemini-agent-command.toml +3 -3
  350. package/tools/cli/installers/lib/ide/templates/gemini-task-command.toml +3 -3
  351. package/tools/cli/installers/lib/ide/templates/workflow-command-template.md +1 -1
  352. package/tools/cli/installers/lib/modules/manager.js +99 -53
  353. package/tools/cli/lib/agent/compiler.js +6 -14
  354. package/tools/cli/lib/agent/installer.js +4 -3
  355. package/tools/cli/lib/cli-utils.js +21 -4
  356. package/tools/cli/lib/ui.js +496 -12
  357. package/tools/cli/regenerate-manifests.js +3 -4
  358. package/tools/maintainer/review-pr-README.md +55 -0
  359. package/tools/maintainer/review-pr.md +242 -0
  360. package/tools/migrate-custom-module-paths.js +124 -0
  361. package/bmad-method-6.0.0-alpha.14.tgz +0 -0
  362. package/docs/custom-agent-installation.md +0 -137
  363. package/example-custom-content/README.md +0 -4
  364. package/example-custom-content/agents/commit-poet/commit-poet.agent.yaml +0 -129
  365. package/example-custom-content/agents/toolsmith/toolsmith-sidecar/instructions.md +0 -70
  366. package/example-custom-content/agents/toolsmith/toolsmith-sidecar/knowledge/bundlers.md +0 -111
  367. package/example-custom-content/agents/toolsmith/toolsmith-sidecar/knowledge/deploy.md +0 -70
  368. package/example-custom-content/agents/toolsmith/toolsmith-sidecar/knowledge/docs.md +0 -114
  369. package/example-custom-content/agents/toolsmith/toolsmith-sidecar/knowledge/installers.md +0 -134
  370. package/example-custom-content/agents/toolsmith/toolsmith-sidecar/knowledge/modules.md +0 -161
  371. package/example-custom-content/agents/toolsmith/toolsmith-sidecar/knowledge/tests.md +0 -103
  372. package/example-custom-content/agents/toolsmith/toolsmith-sidecar/memories.md +0 -17
  373. package/example-custom-content/agents/toolsmith/toolsmith.agent.yaml +0 -109
  374. package/example-custom-content/custom.yaml +0 -3
  375. package/example-custom-content/workflows/quiz-master/steps/step-01-init.md +0 -168
  376. package/example-custom-content/workflows/quiz-master/steps/step-02-q1.md +0 -155
  377. package/example-custom-content/workflows/quiz-master/steps/step-03-q2.md +0 -89
  378. package/example-custom-content/workflows/quiz-master/steps/step-04-q3.md +0 -36
  379. package/example-custom-content/workflows/quiz-master/steps/step-05-q4.md +0 -36
  380. package/example-custom-content/workflows/quiz-master/steps/step-06-q5.md +0 -36
  381. package/example-custom-content/workflows/quiz-master/steps/step-07-q6.md +0 -36
  382. package/example-custom-content/workflows/quiz-master/steps/step-08-q7.md +0 -36
  383. package/example-custom-content/workflows/quiz-master/steps/step-09-q8.md +0 -36
  384. package/example-custom-content/workflows/quiz-master/steps/step-10-q9.md +0 -36
  385. package/example-custom-content/workflows/quiz-master/steps/step-11-q10.md +0 -36
  386. package/example-custom-content/workflows/quiz-master/steps/step-12-results.md +0 -150
  387. package/example-custom-content/workflows/quiz-master/templates/csv-headers.template +0 -1
  388. package/example-custom-content/workflows/quiz-master/workflow-plan-quiz-master.md +0 -269
  389. package/example-custom-content/workflows/quiz-master/workflow.md +0 -54
  390. package/example-custom-content/workflows/wassup/workflow.md +0 -26
  391. package/example-custom-module/mwm/README.md +0 -4
  392. package/example-custom-module/mwm/_module-installer/install-config.yaml +0 -27
  393. package/example-custom-module/mwm/agents/cbt-coach/cbt-coach-sidecar/cognitive-distortions.md +0 -47
  394. package/example-custom-module/mwm/agents/cbt-coach/cbt-coach-sidecar/thought-records.md +0 -17
  395. package/example-custom-module/mwm/agents/cbt-coach/cbt-coach.agent.yaml +0 -150
  396. package/example-custom-module/mwm/agents/crisis-navigator.agent.yaml +0 -137
  397. package/example-custom-module/mwm/agents/meditation-guide.agent.yaml +0 -137
  398. package/example-custom-module/mwm/agents/wellness-companion/wellness-companion-sidecar/insights.md +0 -13
  399. package/example-custom-module/mwm/agents/wellness-companion/wellness-companion-sidecar/instructions.md +0 -30
  400. package/example-custom-module/mwm/agents/wellness-companion/wellness-companion-sidecar/memories.md +0 -13
  401. package/example-custom-module/mwm/agents/wellness-companion/wellness-companion-sidecar/patterns.md +0 -17
  402. package/example-custom-module/mwm/agents/wellness-companion/wellness-companion.agent.yaml +0 -124
  403. package/example-custom-module/mwm/workflows/cbt-thought-record/README.md +0 -31
  404. package/example-custom-module/mwm/workflows/cbt-thought-record/workflow.md +0 -45
  405. package/example-custom-module/mwm/workflows/crisis-support/README.md +0 -31
  406. package/example-custom-module/mwm/workflows/crisis-support/workflow.md +0 -45
  407. package/example-custom-module/mwm/workflows/daily-checkin/README.md +0 -32
  408. package/example-custom-module/mwm/workflows/daily-checkin/workflow.md +0 -45
  409. package/example-custom-module/mwm/workflows/guided-meditation/README.md +0 -31
  410. package/example-custom-module/mwm/workflows/guided-meditation/workflow.md +0 -45
  411. package/example-custom-module/mwm/workflows/wellness-journal/README.md +0 -31
  412. package/example-custom-module/mwm/workflows/wellness-journal/workflow.md +0 -45
@@ -23,7 +23,7 @@ class ManifestGenerator {
23
23
 
24
24
  /**
25
25
  * Generate all manifests for the installation
26
- * @param {string} bmadDir - BMAD installation directory
26
+ * @param {string} bmadDir - .bmad
27
27
  * @param {Array} selectedModules - Selected modules for installation
28
28
  * @param {Array} installedFiles - All installed files (optional, for hash tracking)
29
29
  */
@@ -41,7 +41,11 @@ class ManifestGenerator {
41
41
  // Deduplicate modules list to prevent duplicates
42
42
  this.modules = [...new Set(['core', ...selectedModules, ...preservedModules, ...installedModules])];
43
43
  this.updatedModules = [...new Set(['core', ...selectedModules, ...installedModules])]; // All installed modules get rescanned
44
- this.preservedModules = preservedModules; // These stay as-is in CSVs
44
+
45
+ // For CSV manifests, we need to include ALL modules that are installed
46
+ // preservedModules controls which modules stay as-is in the CSV (don't get rescanned)
47
+ // But all modules should be included in the final manifest
48
+ this.preservedModules = [...new Set([...preservedModules, ...selectedModules, ...installedModules])]; // Include all installed modules
45
49
  this.bmadDir = bmadDir;
46
50
  this.bmadFolderName = path.basename(bmadDir); // Get the actual folder name (e.g., '.bmad' or 'bmad')
47
51
  this.allInstalledFiles = installedFiles;
@@ -61,14 +65,14 @@ class ManifestGenerator {
61
65
  // Collect workflow data
62
66
  await this.collectWorkflows(selectedModules);
63
67
 
64
- // Collect agent data
65
- await this.collectAgents(selectedModules);
68
+ // Collect agent data - use updatedModules which includes all installed modules
69
+ await this.collectAgents(this.updatedModules);
66
70
 
67
71
  // Collect task data
68
- await this.collectTasks(selectedModules);
72
+ await this.collectTasks(this.updatedModules);
69
73
 
70
74
  // Collect tool data
71
- await this.collectTools(selectedModules);
75
+ await this.collectTools(this.updatedModules);
72
76
 
73
77
  // Write manifest files and collect their paths
74
78
  const manifestFiles = [
@@ -450,6 +454,21 @@ class ManifestGenerator {
450
454
  async writeMainManifest(cfgDir) {
451
455
  const manifestPath = path.join(cfgDir, 'manifest.yaml');
452
456
 
457
+ // Read existing manifest to preserve custom modules
458
+ let existingCustomModules = [];
459
+ if (await fs.pathExists(manifestPath)) {
460
+ try {
461
+ const existingContent = await fs.readFile(manifestPath, 'utf8');
462
+ const existingManifest = yaml.load(existingContent);
463
+ if (existingManifest && existingManifest.customModules) {
464
+ existingCustomModules = existingManifest.customModules;
465
+ }
466
+ } catch {
467
+ // If we can't read the existing manifest, continue without preserving custom modules
468
+ console.warn('Warning: Could not read existing manifest to preserve custom modules');
469
+ }
470
+ }
471
+
453
472
  const manifest = {
454
473
  installation: {
455
474
  version: packageJson.version,
@@ -457,6 +476,7 @@ class ManifestGenerator {
457
476
  lastUpdated: new Date().toISOString(),
458
477
  },
459
478
  modules: this.modules,
479
+ customModules: existingCustomModules, // Preserve custom modules
460
480
  ides: this.selectedIdes,
461
481
  };
462
482
 
@@ -562,12 +582,47 @@ class ManifestGenerator {
562
582
  async writeWorkflowManifest(cfgDir) {
563
583
  const csvPath = path.join(cfgDir, 'workflow-manifest.csv');
564
584
 
585
+ // Read existing manifest to preserve entries
586
+ const existingEntries = new Map();
587
+ if (await fs.pathExists(csvPath)) {
588
+ const content = await fs.readFile(csvPath, 'utf8');
589
+ const lines = content.split('\n').filter((line) => line.trim());
590
+
591
+ // Skip header
592
+ for (let i = 1; i < lines.length; i++) {
593
+ const line = lines[i];
594
+ if (line) {
595
+ // Parse CSV (simple parsing assuming no commas in quoted fields)
596
+ const parts = line.split('","');
597
+ if (parts.length >= 4) {
598
+ const name = parts[0].replace(/^"/, '');
599
+ const module = parts[2];
600
+ existingEntries.set(`${module}:${name}`, line);
601
+ }
602
+ }
603
+ }
604
+ }
605
+
565
606
  // Create CSV header - removed standalone column as ALL workflows now generate commands
566
607
  let csv = 'name,description,module,path\n';
567
608
 
568
- // Add all workflows - no standalone property needed anymore
609
+ // Combine existing and new workflows
610
+ const allWorkflows = new Map();
611
+
612
+ // Add existing entries
613
+ for (const [key, value] of existingEntries) {
614
+ allWorkflows.set(key, value);
615
+ }
616
+
617
+ // Add/update new workflows
569
618
  for (const workflow of this.workflows) {
570
- csv += `"${workflow.name}","${workflow.description}","${workflow.module}","${workflow.path}"\n`;
619
+ const key = `${workflow.module}:${workflow.name}`;
620
+ allWorkflows.set(key, `"${workflow.name}","${workflow.description}","${workflow.module}","${workflow.path}"`);
621
+ }
622
+
623
+ // Write all workflows
624
+ for (const [, value] of allWorkflows) {
625
+ csv += value + '\n';
571
626
  }
572
627
 
573
628
  await fs.writeFile(csvPath, csv);
@@ -581,12 +636,50 @@ class ManifestGenerator {
581
636
  async writeAgentManifest(cfgDir) {
582
637
  const csvPath = path.join(cfgDir, 'agent-manifest.csv');
583
638
 
639
+ // Read existing manifest to preserve entries
640
+ const existingEntries = new Map();
641
+ if (await fs.pathExists(csvPath)) {
642
+ const content = await fs.readFile(csvPath, 'utf8');
643
+ const lines = content.split('\n').filter((line) => line.trim());
644
+
645
+ // Skip header
646
+ for (let i = 1; i < lines.length; i++) {
647
+ const line = lines[i];
648
+ if (line) {
649
+ // Parse CSV (simple parsing assuming no commas in quoted fields)
650
+ const parts = line.split('","');
651
+ if (parts.length >= 11) {
652
+ const name = parts[0].replace(/^"/, '');
653
+ const module = parts[8];
654
+ existingEntries.set(`${module}:${name}`, line);
655
+ }
656
+ }
657
+ }
658
+ }
659
+
584
660
  // Create CSV header with persona fields
585
661
  let csv = 'name,displayName,title,icon,role,identity,communicationStyle,principles,module,path\n';
586
662
 
587
- // Add all agents
663
+ // Combine existing and new agents, preferring new data for duplicates
664
+ const allAgents = new Map();
665
+
666
+ // Add existing entries
667
+ for (const [key, value] of existingEntries) {
668
+ allAgents.set(key, value);
669
+ }
670
+
671
+ // Add/update new agents
588
672
  for (const agent of this.agents) {
589
- csv += `"${agent.name}","${agent.displayName}","${agent.title}","${agent.icon}","${agent.role}","${agent.identity}","${agent.communicationStyle}","${agent.principles}","${agent.module}","${agent.path}"\n`;
673
+ const key = `${agent.module}:${agent.name}`;
674
+ allAgents.set(
675
+ key,
676
+ `"${agent.name}","${agent.displayName}","${agent.title}","${agent.icon}","${agent.role}","${agent.identity}","${agent.communicationStyle}","${agent.principles}","${agent.module}","${agent.path}"`,
677
+ );
678
+ }
679
+
680
+ // Write all agents
681
+ for (const [, value] of allAgents) {
682
+ csv += value + '\n';
590
683
  }
591
684
 
592
685
  await fs.writeFile(csvPath, csv);
@@ -600,12 +693,47 @@ class ManifestGenerator {
600
693
  async writeTaskManifest(cfgDir) {
601
694
  const csvPath = path.join(cfgDir, 'task-manifest.csv');
602
695
 
696
+ // Read existing manifest to preserve entries
697
+ const existingEntries = new Map();
698
+ if (await fs.pathExists(csvPath)) {
699
+ const content = await fs.readFile(csvPath, 'utf8');
700
+ const lines = content.split('\n').filter((line) => line.trim());
701
+
702
+ // Skip header
703
+ for (let i = 1; i < lines.length; i++) {
704
+ const line = lines[i];
705
+ if (line) {
706
+ // Parse CSV (simple parsing assuming no commas in quoted fields)
707
+ const parts = line.split('","');
708
+ if (parts.length >= 6) {
709
+ const name = parts[0].replace(/^"/, '');
710
+ const module = parts[3];
711
+ existingEntries.set(`${module}:${name}`, line);
712
+ }
713
+ }
714
+ }
715
+ }
716
+
603
717
  // Create CSV header with standalone column
604
718
  let csv = 'name,displayName,description,module,path,standalone\n';
605
719
 
606
- // Add all tasks
720
+ // Combine existing and new tasks
721
+ const allTasks = new Map();
722
+
723
+ // Add existing entries
724
+ for (const [key, value] of existingEntries) {
725
+ allTasks.set(key, value);
726
+ }
727
+
728
+ // Add/update new tasks
607
729
  for (const task of this.tasks) {
608
- csv += `"${task.name}","${task.displayName}","${task.description}","${task.module}","${task.path}","${task.standalone}"\n`;
730
+ const key = `${task.module}:${task.name}`;
731
+ allTasks.set(key, `"${task.name}","${task.displayName}","${task.description}","${task.module}","${task.path}","${task.standalone}"`);
732
+ }
733
+
734
+ // Write all tasks
735
+ for (const [, value] of allTasks) {
736
+ csv += value + '\n';
609
737
  }
610
738
 
611
739
  await fs.writeFile(csvPath, csv);
@@ -619,12 +747,47 @@ class ManifestGenerator {
619
747
  async writeToolManifest(cfgDir) {
620
748
  const csvPath = path.join(cfgDir, 'tool-manifest.csv');
621
749
 
750
+ // Read existing manifest to preserve entries
751
+ const existingEntries = new Map();
752
+ if (await fs.pathExists(csvPath)) {
753
+ const content = await fs.readFile(csvPath, 'utf8');
754
+ const lines = content.split('\n').filter((line) => line.trim());
755
+
756
+ // Skip header
757
+ for (let i = 1; i < lines.length; i++) {
758
+ const line = lines[i];
759
+ if (line) {
760
+ // Parse CSV (simple parsing assuming no commas in quoted fields)
761
+ const parts = line.split('","');
762
+ if (parts.length >= 6) {
763
+ const name = parts[0].replace(/^"/, '');
764
+ const module = parts[3];
765
+ existingEntries.set(`${module}:${name}`, line);
766
+ }
767
+ }
768
+ }
769
+ }
770
+
622
771
  // Create CSV header with standalone column
623
772
  let csv = 'name,displayName,description,module,path,standalone\n';
624
773
 
625
- // Add all tools
774
+ // Combine existing and new tools
775
+ const allTools = new Map();
776
+
777
+ // Add existing entries
778
+ for (const [key, value] of existingEntries) {
779
+ allTools.set(key, value);
780
+ }
781
+
782
+ // Add/update new tools
626
783
  for (const tool of this.tools) {
627
- csv += `"${tool.name}","${tool.displayName}","${tool.description}","${tool.module}","${tool.path}","${tool.standalone}"\n`;
784
+ const key = `${tool.module}:${tool.name}`;
785
+ allTools.set(key, `"${tool.name}","${tool.displayName}","${tool.description}","${tool.module}","${tool.path}","${tool.standalone}"`);
786
+ }
787
+
788
+ // Write all tools
789
+ for (const [, value] of allTools) {
790
+ csv += value + '\n';
628
791
  }
629
792
 
630
793
  await fs.writeFile(csvPath, csv);
@@ -61,6 +61,7 @@ class Manifest {
61
61
  installDate: manifestData.installation?.installDate,
62
62
  lastUpdated: manifestData.installation?.lastUpdated,
63
63
  modules: manifestData.modules || [],
64
+ customModules: manifestData.customModules || [],
64
65
  ides: manifestData.ides || [],
65
66
  };
66
67
  } catch (error) {
@@ -93,6 +94,7 @@ class Manifest {
93
94
  lastUpdated: manifest.lastUpdated,
94
95
  },
95
96
  modules: manifest.modules || [],
97
+ customModules: manifest.customModules || [],
96
98
  ides: manifest.ides || [],
97
99
  };
98
100
 
@@ -535,6 +537,51 @@ class Manifest {
535
537
 
536
538
  return configs;
537
539
  }
540
+ /**
541
+ * Add a custom module to the manifest with its source path
542
+ * @param {string} bmadDir - Path to bmad directory
543
+ * @param {Object} customModule - Custom module info
544
+ */
545
+ async addCustomModule(bmadDir, customModule) {
546
+ const manifest = await this.read(bmadDir);
547
+ if (!manifest) {
548
+ throw new Error('No manifest found');
549
+ }
550
+
551
+ if (!manifest.customModules) {
552
+ manifest.customModules = [];
553
+ }
554
+
555
+ // Check if custom module already exists
556
+ const existingIndex = manifest.customModules.findIndex((m) => m.id === customModule.id);
557
+ if (existingIndex === -1) {
558
+ // Add new entry
559
+ manifest.customModules.push(customModule);
560
+ } else {
561
+ // Update existing entry
562
+ manifest.customModules[existingIndex] = customModule;
563
+ }
564
+
565
+ await this.update(bmadDir, { customModules: manifest.customModules });
566
+ }
567
+
568
+ /**
569
+ * Remove a custom module from the manifest
570
+ * @param {string} bmadDir - Path to bmad directory
571
+ * @param {string} moduleId - Module ID to remove
572
+ */
573
+ async removeCustomModule(bmadDir, moduleId) {
574
+ const manifest = await this.read(bmadDir);
575
+ if (!manifest || !manifest.customModules) {
576
+ return;
577
+ }
578
+
579
+ const index = manifest.customModules.findIndex((m) => m.id === moduleId);
580
+ if (index !== -1) {
581
+ manifest.customModules.splice(index, 1);
582
+ await this.update(bmadDir, { customModules: manifest.customModules });
583
+ }
584
+ }
538
585
  }
539
586
 
540
587
  module.exports = { Manifest };
@@ -3,6 +3,7 @@ const fs = require('fs-extra');
3
3
  const chalk = require('chalk');
4
4
  const yaml = require('js-yaml');
5
5
  const { FileOps } = require('../../../lib/file-ops');
6
+ const { XmlHandler } = require('../../../lib/xml-handler');
6
7
 
7
8
  /**
8
9
  * Handler for custom content (custom.yaml)
@@ -11,6 +12,7 @@ const { FileOps } = require('../../../lib/file-ops');
11
12
  class CustomHandler {
12
13
  constructor() {
13
14
  this.fileOps = new FileOps();
15
+ this.xmlHandler = new XmlHandler();
14
16
  }
15
17
 
16
18
  /**
@@ -52,6 +54,12 @@ class CustomHandler {
52
54
  } else if (entry.name === 'custom.yaml') {
53
55
  // Found a custom.yaml file
54
56
  customPaths.push(fullPath);
57
+ } else if (
58
+ entry.name === 'module.yaml' && // Check if this is a custom module (either in _module-installer or in root directory)
59
+ // Skip if it's in src/modules (those are standard modules)
60
+ !fullPath.includes(path.join('src', 'modules'))
61
+ ) {
62
+ customPaths.push(fullPath);
55
63
  }
56
64
  }
57
65
  } catch {
@@ -66,37 +74,44 @@ class CustomHandler {
66
74
  }
67
75
 
68
76
  /**
69
- * Get custom content info from a custom.yaml file
70
- * @param {string} customYamlPath - Path to custom.yaml file
77
+ * Get custom content info from a custom.yaml or module.yaml file
78
+ * @param {string} configPath - Path to config file
79
+ * @param {string} projectRoot - Project root directory for calculating relative paths
71
80
  * @returns {Object|null} Custom content info
72
81
  */
73
- async getCustomInfo(customYamlPath) {
82
+ async getCustomInfo(configPath, projectRoot = null) {
74
83
  try {
75
- const configContent = await fs.readFile(customYamlPath, 'utf8');
84
+ const configContent = await fs.readFile(configPath, 'utf8');
76
85
 
77
86
  // Try to parse YAML with error handling
78
87
  let config;
79
88
  try {
80
89
  config = yaml.load(configContent);
81
90
  } catch (parseError) {
82
- console.warn(chalk.yellow(`Warning: YAML parse error in ${customYamlPath}:`, parseError.message));
91
+ console.warn(chalk.yellow(`Warning: YAML parse error in ${configPath}:`, parseError.message));
83
92
  return null;
84
93
  }
85
94
 
86
- const customDir = path.dirname(customYamlPath);
87
- const relativePath = path.relative(process.cwd(), customDir);
95
+ // Check if this is an module.yaml (module) or custom.yaml (custom content)
96
+ const isInstallConfig = configPath.endsWith('module.yaml');
97
+ const configDir = path.dirname(configPath);
98
+
99
+ // Use provided projectRoot or fall back to process.cwd()
100
+ const basePath = projectRoot || process.cwd();
101
+ const relativePath = path.relative(basePath, configDir);
88
102
 
89
103
  return {
90
- id: config.code || path.basename(customDir),
91
- name: config.name || `Custom: ${path.basename(customDir)}`,
92
- description: config.description || 'Custom agents and workflows',
93
- path: customDir,
104
+ id: config.code || 'unknown-code',
105
+ name: config.name,
106
+ description: config.description || '',
107
+ path: configDir,
94
108
  relativePath: relativePath,
95
109
  defaultSelected: config.default_selected === true,
96
110
  config: config,
111
+ isInstallConfig: isInstallConfig, // Track which type this is
97
112
  };
98
113
  } catch (error) {
99
- console.warn(chalk.yellow(`Warning: Failed to read ${customYamlPath}:`, error.message));
114
+ console.warn(chalk.yellow(`Warning: Failed to read ${configPath}:`, error.message));
100
115
  return null;
101
116
  }
102
117
  }
@@ -128,10 +143,10 @@ class CustomHandler {
128
143
  await fs.ensureDir(bmadAgentsDir);
129
144
  await fs.ensureDir(bmadWorkflowsDir);
130
145
 
131
- // Process agents - copy entire agents directory structure
146
+ // Process agents - compile and copy agents
132
147
  const agentsDir = path.join(customPath, 'agents');
133
148
  if (await fs.pathExists(agentsDir)) {
134
- await this.copyDirectory(agentsDir, bmadAgentsDir, results, fileTrackingCallback, config);
149
+ await this.compileAndCopyAgents(agentsDir, bmadAgentsDir, bmadDir, config, fileTrackingCallback, results);
135
150
 
136
151
  // Count agent files
137
152
  const agentFiles = await this.findFilesRecursively(agentsDir, ['.agent.yaml', '.md']);
@@ -236,13 +251,19 @@ class CustomHandler {
236
251
  // Copy with placeholder replacement for text files
237
252
  const textExtensions = ['.md', '.yaml', '.yml', '.txt', '.json'];
238
253
  if (textExtensions.some((ext) => entry.name.endsWith(ext))) {
239
- await this.fileOps.copyFile(sourcePath, targetPath, {
240
- bmadFolder: config.bmad_folder || 'bmad',
241
- userName: config.user_name || 'User',
242
- communicationLanguage: config.communication_language || 'English',
243
- outputFolder: config.output_folder || 'docs',
244
- });
254
+ // Read source content
255
+ let content = await fs.readFile(sourcePath, 'utf8');
256
+
257
+ // Replace placeholders
258
+ content = content.replaceAll('{user_name}', config.user_name || 'User');
259
+ content = content.replaceAll('{communication_language}', config.communication_language || 'English');
260
+ content = content.replaceAll('{output_folder}', config.output_folder || 'docs');
261
+
262
+ // Write to target
263
+ await fs.ensureDir(path.dirname(targetPath));
264
+ await fs.writeFile(targetPath, content, 'utf8');
245
265
  } else {
266
+ // Copy binary files as-is
246
267
  await fs.copy(sourcePath, targetPath);
247
268
  }
248
269
 
@@ -261,6 +282,112 @@ class CustomHandler {
261
282
  }
262
283
  }
263
284
  }
285
+
286
+ /**
287
+ * Compile .agent.yaml files to .md format and handle sidecars
288
+ * @param {string} sourceAgentsPath - Source agents directory
289
+ * @param {string} targetAgentsPath - Target agents directory
290
+ * @param {string} bmadDir - BMAD installation directory
291
+ * @param {Object} config - Configuration for placeholder replacement
292
+ * @param {Function} fileTrackingCallback - Optional callback to track installed files
293
+ * @param {Object} results - Results object to update
294
+ */
295
+ async compileAndCopyAgents(sourceAgentsPath, targetAgentsPath, bmadDir, config, fileTrackingCallback, results) {
296
+ // Get all .agent.yaml files recursively
297
+ const agentFiles = await this.findFilesRecursively(sourceAgentsPath, ['.agent.yaml']);
298
+
299
+ for (const agentFile of agentFiles) {
300
+ const relativePath = path.relative(sourceAgentsPath, agentFile);
301
+ const targetDir = path.join(targetAgentsPath, path.dirname(relativePath));
302
+
303
+ await fs.ensureDir(targetDir);
304
+
305
+ const agentName = path.basename(agentFile, '.agent.yaml');
306
+ const targetMdPath = path.join(targetDir, `${agentName}.md`);
307
+ // Use the actual bmadDir if available (for when installing to temp dir)
308
+ const actualBmadDir = config._bmadDir || bmadDir;
309
+ const customizePath = path.join(actualBmadDir, '_cfg', 'agents', `custom-${agentName}.customize.yaml`);
310
+
311
+ // Read and compile the YAML
312
+ try {
313
+ const yamlContent = await fs.readFile(agentFile, 'utf8');
314
+ const { compileAgent } = require('../../../lib/agent/compiler');
315
+
316
+ // Create customize template if it doesn't exist
317
+ if (!(await fs.pathExists(customizePath))) {
318
+ const { getSourcePath } = require('../../../lib/project-root');
319
+ const genericTemplatePath = getSourcePath('utility', 'templates', 'agent.customize.template.yaml');
320
+ if (await fs.pathExists(genericTemplatePath)) {
321
+ // Copy with placeholder replacement
322
+ let templateContent = await fs.readFile(genericTemplatePath, 'utf8');
323
+ await fs.writeFile(customizePath, templateContent, 'utf8');
324
+ console.log(chalk.dim(` Created customize: custom-${agentName}.customize.yaml`));
325
+ }
326
+ }
327
+
328
+ // Compile the agent
329
+ const { xml } = compileAgent(yamlContent, {}, agentName, relativePath, { config });
330
+
331
+ // Replace placeholders in the compiled content
332
+ let processedXml = xml;
333
+ processedXml = processedXml.replaceAll('{user_name}', config.user_name || 'User');
334
+ processedXml = processedXml.replaceAll('{communication_language}', config.communication_language || 'English');
335
+ processedXml = processedXml.replaceAll('{output_folder}', config.output_folder || 'docs');
336
+
337
+ // Write the compiled MD file
338
+ await fs.writeFile(targetMdPath, processedXml, 'utf8');
339
+
340
+ // Check if agent has sidecar
341
+ let hasSidecar = false;
342
+ try {
343
+ const yamlLib = require('yaml');
344
+ const agentYaml = yamlLib.parse(yamlContent);
345
+ hasSidecar = agentYaml?.agent?.metadata?.hasSidecar === true;
346
+ } catch {
347
+ // Continue without sidecar processing
348
+ }
349
+
350
+ // Copy sidecar files if agent has hasSidecar flag
351
+ if (hasSidecar && config.agent_sidecar_folder) {
352
+ const { copyAgentSidecarFiles } = require('../../../lib/agent/installer');
353
+
354
+ // Resolve agent sidecar folder path
355
+ const projectDir = path.dirname(bmadDir);
356
+ const resolvedSidecarFolder = config.agent_sidecar_folder
357
+ .replaceAll('{project-root}', projectDir)
358
+ .replaceAll('.bmad', path.basename(bmadDir));
359
+
360
+ // Create sidecar directory for this agent
361
+ const agentSidecarDir = path.join(resolvedSidecarFolder, agentName);
362
+ await fs.ensureDir(agentSidecarDir);
363
+
364
+ // Copy sidecar files
365
+ const sidecarResult = copyAgentSidecarFiles(path.dirname(agentFile), agentSidecarDir, agentFile);
366
+
367
+ if (sidecarResult.copied.length > 0) {
368
+ console.log(chalk.dim(` Copied ${sidecarResult.copied.length} sidecar file(s) to: ${agentSidecarDir}`));
369
+ }
370
+ if (sidecarResult.preserved.length > 0) {
371
+ console.log(chalk.dim(` Preserved ${sidecarResult.preserved.length} existing sidecar file(s)`));
372
+ }
373
+ }
374
+
375
+ // Track the file
376
+ if (fileTrackingCallback) {
377
+ fileTrackingCallback(targetMdPath);
378
+ }
379
+
380
+ console.log(
381
+ chalk.dim(
382
+ ` Compiled agent: ${agentName} -> ${path.relative(targetAgentsPath, targetMdPath)}${hasSidecar ? ' (with sidecar)' : ''}`,
383
+ ),
384
+ );
385
+ } catch (error) {
386
+ console.warn(chalk.yellow(` Failed to compile agent ${agentName}:`, error.message));
387
+ results.errors.push(`Failed to compile agent ${agentName}: ${error.message}`);
388
+ }
389
+ }
390
+ }
264
391
  }
265
392
 
266
393
  module.exports = { CustomHandler };
@@ -527,26 +527,26 @@ class BaseIdeSetup {
527
527
  }
528
528
 
529
529
  /**
530
- * Write file with content (replaces {bmad_folder} placeholder)
530
+ * Write file with content (replaces .bmad placeholder)
531
531
  * @param {string} filePath - File path
532
532
  * @param {string} content - File content
533
533
  */
534
534
  async writeFile(filePath, content) {
535
- // Replace {bmad_folder} placeholder if present
536
- if (typeof content === 'string' && content.includes('{bmad_folder}')) {
537
- content = content.replaceAll('{bmad_folder}', this.bmadFolderName);
535
+ // Replace .bmad placeholder if present
536
+ if (typeof content === 'string' && content.includes('.bmad')) {
537
+ content = content.replaceAll('.bmad', this.bmadFolderName);
538
538
  }
539
539
 
540
- // Replace escape sequence {*bmad_folder*} with literal {bmad_folder}
541
- if (typeof content === 'string' && content.includes('{*bmad_folder*}')) {
542
- content = content.replaceAll('{*bmad_folder*}', '{bmad_folder}');
540
+ // Replace escape sequence .bmad with literal .bmad
541
+ if (typeof content === 'string' && content.includes('.bmad')) {
542
+ content = content.replaceAll('.bmad', '.bmad');
543
543
  }
544
544
  await this.ensureDir(path.dirname(filePath));
545
545
  await fs.writeFile(filePath, content, 'utf8');
546
546
  }
547
547
 
548
548
  /**
549
- * Copy file from source to destination (replaces {bmad_folder} placeholder in text files)
549
+ * Copy file from source to destination (replaces .bmad placeholder in text files)
550
550
  * @param {string} source - Source file path
551
551
  * @param {string} dest - Destination file path
552
552
  */
@@ -563,14 +563,14 @@ class BaseIdeSetup {
563
563
  // Read the file content
564
564
  let content = await fs.readFile(source, 'utf8');
565
565
 
566
- // Replace {bmad_folder} placeholder with actual folder name
567
- if (content.includes('{bmad_folder}')) {
568
- content = content.replaceAll('{bmad_folder}', this.bmadFolderName);
566
+ // Replace .bmad placeholder with actual folder name
567
+ if (content.includes('.bmad')) {
568
+ content = content.replaceAll('.bmad', this.bmadFolderName);
569
569
  }
570
570
 
571
- // Replace escape sequence {*bmad_folder*} with literal {bmad_folder}
572
- if (content.includes('{*bmad_folder*}')) {
573
- content = content.replaceAll('{*bmad_folder*}', '{bmad_folder}');
571
+ // Replace escape sequence .bmad with literal .bmad
572
+ if (content.includes('.bmad')) {
573
+ content = content.replaceAll('.bmad', '.bmad');
574
574
  }
575
575
 
576
576
  // Write to dest with replaced content
@@ -174,8 +174,8 @@ ${contentWithoutFrontmatter}
174
174
  // Note: {user_name} and other {config_values} are left as-is for runtime substitution by Gemini
175
175
  const tomlContent = template
176
176
  .replaceAll('{{title}}', title)
177
- .replaceAll('{{*bmad_folder*}}', '{bmad_folder}')
178
- .replaceAll('{{bmad_folder}}', this.bmadFolderName)
177
+ .replaceAll('{.bmad}', '.bmad')
178
+ .replaceAll('{.bmad}', this.bmadFolderName)
179
179
  .replaceAll('{{module}}', agent.module)
180
180
  .replaceAll('{{name}}', agent.name);
181
181
 
@@ -196,8 +196,8 @@ ${contentWithoutFrontmatter}
196
196
  // Replace template variables
197
197
  const tomlContent = template
198
198
  .replaceAll('{{taskName}}', taskName)
199
- .replaceAll('{{*bmad_folder*}}', '{bmad_folder}')
200
- .replaceAll('{{bmad_folder}}', this.bmadFolderName)
199
+ .replaceAll('{.bmad}', '.bmad')
200
+ .replaceAll('{.bmad}', this.bmadFolderName)
201
201
  .replaceAll('{{module}}', task.module)
202
202
  .replaceAll('{{filename}}', task.filename);
203
203
 
@@ -65,8 +65,8 @@ class AgentCommandGenerator {
65
65
  .replaceAll('{{module}}', agent.module)
66
66
  .replaceAll('{{path}}', agentPathInModule)
67
67
  .replaceAll('{{description}}', agent.description || `${agent.name} agent`)
68
- .replaceAll('{bmad_folder}', this.bmadFolderName)
69
- .replaceAll('{*bmad_folder*}', '{bmad_folder}');
68
+ .replaceAll('.bmad', this.bmadFolderName)
69
+ .replaceAll('.bmad', '.bmad');
70
70
  }
71
71
 
72
72
  /**