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

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 (335) hide show
  1. package/.github/ISSUE_TEMPLATE/idea_submission.md +1 -1
  2. package/.github/scripts/discord-helpers.sh +15 -0
  3. package/.github/workflows/discord.yaml +278 -8
  4. package/.github/workflows/quality.yaml +19 -0
  5. package/.markdownlint-cli2.yaml +42 -0
  6. package/.prettierignore +3 -0
  7. package/CHANGELOG.md +95 -0
  8. package/CODE_OF_CONDUCT.md +128 -0
  9. package/bmad-method-6.0.0-alpha.14.tgz +0 -0
  10. package/docs/agent-customization-guide.md +2 -2
  11. package/docs/custom-agent-installation.md +56 -102
  12. package/docs/document-sharding-guide.md +1 -1
  13. package/eslint.config.mjs +14 -0
  14. package/example-custom-content/README.md +4 -0
  15. package/{custom/src → example-custom-content}/agents/toolsmith/toolsmith-sidecar/instructions.md +4 -4
  16. package/{custom/src → example-custom-content}/agents/toolsmith/toolsmith-sidecar/memories.md +1 -1
  17. package/{custom/src → example-custom-content}/agents/toolsmith/toolsmith.agent.yaml +17 -16
  18. package/example-custom-content/custom.yaml +3 -0
  19. package/example-custom-content/workflows/quiz-master/steps/step-01-init.md +168 -0
  20. package/example-custom-content/workflows/quiz-master/steps/step-02-q1.md +155 -0
  21. package/example-custom-content/workflows/quiz-master/steps/step-03-q2.md +89 -0
  22. package/example-custom-content/workflows/quiz-master/steps/step-04-q3.md +36 -0
  23. package/example-custom-content/workflows/quiz-master/steps/step-05-q4.md +36 -0
  24. package/example-custom-content/workflows/quiz-master/steps/step-06-q5.md +36 -0
  25. package/example-custom-content/workflows/quiz-master/steps/step-07-q6.md +36 -0
  26. package/example-custom-content/workflows/quiz-master/steps/step-08-q7.md +36 -0
  27. package/example-custom-content/workflows/quiz-master/steps/step-09-q8.md +36 -0
  28. package/example-custom-content/workflows/quiz-master/steps/step-10-q9.md +36 -0
  29. package/example-custom-content/workflows/quiz-master/steps/step-11-q10.md +36 -0
  30. package/example-custom-content/workflows/quiz-master/steps/step-12-results.md +150 -0
  31. package/example-custom-content/workflows/quiz-master/templates/csv-headers.template +1 -0
  32. package/example-custom-content/workflows/quiz-master/workflow-plan-quiz-master.md +269 -0
  33. package/example-custom-content/workflows/quiz-master/workflow.md +54 -0
  34. package/example-custom-content/workflows/wassup/workflow.md +26 -0
  35. package/example-custom-module/mwm/README.md +4 -0
  36. package/example-custom-module/mwm/_module-installer/install-config.yaml +27 -0
  37. package/example-custom-module/mwm/agents/cbt-coach/cbt-coach-sidecar/cognitive-distortions.md +47 -0
  38. package/example-custom-module/mwm/agents/cbt-coach/cbt-coach-sidecar/thought-records.md +17 -0
  39. package/example-custom-module/mwm/agents/cbt-coach/cbt-coach.agent.yaml +150 -0
  40. package/example-custom-module/mwm/agents/crisis-navigator.agent.yaml +137 -0
  41. package/example-custom-module/mwm/agents/meditation-guide.agent.yaml +137 -0
  42. package/example-custom-module/mwm/agents/wellness-companion/wellness-companion-sidecar/insights.md +13 -0
  43. package/example-custom-module/mwm/agents/wellness-companion/wellness-companion-sidecar/instructions.md +30 -0
  44. package/example-custom-module/mwm/agents/wellness-companion/wellness-companion-sidecar/memories.md +13 -0
  45. package/example-custom-module/mwm/agents/wellness-companion/wellness-companion-sidecar/patterns.md +17 -0
  46. package/example-custom-module/mwm/agents/wellness-companion/wellness-companion.agent.yaml +124 -0
  47. package/example-custom-module/mwm/workflows/cbt-thought-record/README.md +31 -0
  48. package/example-custom-module/mwm/workflows/cbt-thought-record/workflow.md +45 -0
  49. package/example-custom-module/mwm/workflows/crisis-support/README.md +31 -0
  50. package/example-custom-module/mwm/workflows/crisis-support/workflow.md +45 -0
  51. package/example-custom-module/mwm/workflows/daily-checkin/README.md +32 -0
  52. package/example-custom-module/mwm/workflows/daily-checkin/workflow.md +45 -0
  53. package/example-custom-module/mwm/workflows/guided-meditation/README.md +31 -0
  54. package/example-custom-module/mwm/workflows/guided-meditation/workflow.md +45 -0
  55. package/example-custom-module/mwm/workflows/wellness-journal/README.md +31 -0
  56. package/example-custom-module/mwm/workflows/wellness-journal/workflow.md +45 -0
  57. package/package.json +9 -4
  58. package/src/core/_module-installer/install-config.yaml +5 -1
  59. package/src/core/resources/excalidraw/library-loader.md +2 -2
  60. package/src/core/workflows/brainstorming/steps/step-01-session-setup.md +1 -1
  61. package/src/core/workflows/brainstorming/workflow.md +1 -1
  62. package/src/core/workflows/party-mode/steps/step-03-graceful-exit.md +0 -1
  63. package/src/core/workflows/party-mode/workflow.md +2 -3
  64. package/src/modules/bmb/README.md +1 -1
  65. package/src/modules/bmb/_module-installer/install-config.yaml +4 -9
  66. package/src/modules/bmb/_module-installer/installer.js +76 -0
  67. package/src/modules/bmb/agents/bmad-builder.agent.yaml +32 -9
  68. package/src/modules/bmb/docs/agents/agent-menu-patterns.md +5 -5
  69. package/src/modules/bmb/docs/agents/expert-agent-architecture.md +20 -20
  70. package/src/modules/bmb/docs/agents/module-agent-architecture.md +45 -45
  71. package/src/modules/bmb/docs/agents/simple-agent-architecture.md +7 -3
  72. package/src/modules/bmb/docs/workflows/architecture.md +1 -1
  73. package/src/modules/bmb/docs/workflows/templates/step-01-init-continuable-template.md +241 -0
  74. package/src/modules/bmb/docs/workflows/templates/step-1b-template.md +223 -0
  75. package/src/modules/bmb/{workflows/create-workflow → docs/workflows}/templates/step-file.md +4 -4
  76. package/src/modules/bmb/docs/workflows/{step-template.md → templates/step-template.md} +40 -33
  77. package/src/modules/bmb/docs/workflows/templates/workflow-template.md +104 -0
  78. package/src/modules/bmb/{workflows/create-workflow → docs/workflows}/templates/workflow.md +1 -1
  79. package/src/modules/bmb/reference/agents/expert-examples/journal-keeper/README.md +4 -4
  80. package/src/modules/bmb/reference/agents/expert-examples/journal-keeper/journal-keeper.agent.yaml +8 -8
  81. package/src/modules/bmb/reference/agents/module-examples/security-engineer.agent.yaml +6 -6
  82. package/src/modules/bmb/reference/agents/module-examples/trend-analyst.agent.yaml +7 -7
  83. package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-01-init.md +2 -3
  84. package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-01b-continue.md +10 -40
  85. package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-02-profile.md +1 -1
  86. package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-03-assessment.md +1 -0
  87. package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-04-strategy.md +2 -2
  88. package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-05-shopping.md +2 -2
  89. package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-06-prep-schedule.md +2 -2
  90. package/src/modules/bmb/reference/workflows/meal-prep-nutrition/workflow.md +2 -2
  91. package/src/modules/bmb/workflows/create-agent/data/info-and-installation-guide.md +16 -4
  92. package/src/modules/bmb/workflows/create-agent/data/reference/agents/expert-examples/journal-keeper/README.md +4 -4
  93. package/src/modules/bmb/workflows/create-agent/data/reference/agents/expert-examples/journal-keeper/journal-keeper.agent.yaml +7 -7
  94. package/src/modules/bmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/steps/step-05-shopping.md +1 -1
  95. package/src/modules/bmb/workflows/create-agent/data/validation-complete.md +3 -3
  96. package/src/modules/bmb/workflows/create-agent/steps/step-01-brainstorm.md +3 -3
  97. package/src/modules/bmb/workflows/create-agent/steps/step-02-discover.md +3 -3
  98. package/src/modules/bmb/workflows/create-agent/steps/step-03-persona.md +3 -3
  99. package/src/modules/bmb/workflows/create-agent/steps/step-04-commands.md +6 -6
  100. package/src/modules/bmb/workflows/create-agent/steps/step-05-name.md +2 -2
  101. package/src/modules/bmb/workflows/create-agent/steps/step-06-build.md +3 -3
  102. package/src/modules/bmb/workflows/create-agent/steps/step-07-validate.md +3 -3
  103. package/src/modules/bmb/workflows/create-agent/steps/step-08-setup.md +2 -2
  104. package/src/modules/bmb/workflows/create-agent/steps/step-09-customize.md +3 -3
  105. package/src/modules/bmb/workflows/create-agent/steps/step-10-build-tools.md +2 -2
  106. package/src/modules/bmb/workflows/create-agent/steps/step-11-celebrate.md +2 -2
  107. package/src/modules/bmb/workflows/create-agent/workflow.md +11 -11
  108. package/src/modules/bmb/workflows/create-module/steps/step-01-init.md +155 -0
  109. package/src/modules/bmb/workflows/create-module/steps/step-01b-continue.md +169 -0
  110. package/src/modules/bmb/workflows/create-module/steps/step-02-concept.md +217 -0
  111. package/src/modules/bmb/workflows/create-module/steps/step-03-components.md +267 -0
  112. package/src/modules/bmb/workflows/create-module/steps/step-04-structure.md +228 -0
  113. package/src/modules/bmb/workflows/create-module/steps/step-05-config.md +233 -0
  114. package/src/modules/bmb/workflows/create-module/steps/step-06-agents.md +296 -0
  115. package/src/modules/bmb/workflows/create-module/steps/step-07-workflows.md +228 -0
  116. package/src/modules/bmb/workflows/create-module/steps/step-08-installer.md +186 -0
  117. package/src/modules/bmb/workflows/create-module/steps/step-09-documentation.md +308 -0
  118. package/src/modules/bmb/workflows/create-module/steps/step-10-roadmap.md +336 -0
  119. package/src/modules/bmb/workflows/create-module/steps/step-11-validate.md +335 -0
  120. package/src/modules/bmb/workflows/create-module/templates/agent.template.md +317 -0
  121. package/src/modules/bmb/workflows/create-module/templates/install-config.template.yaml +53 -0
  122. package/src/modules/bmb/workflows/create-module/templates/installer.template.js +47 -0
  123. package/src/modules/bmb/workflows/create-module/templates/module-plan.template.md +5 -0
  124. package/src/modules/bmb/workflows/create-module/templates/workflow-plan-template.md +23 -0
  125. package/src/modules/bmb/workflows/create-module/validation.md +126 -0
  126. package/src/modules/bmb/workflows/create-module/workflow.md +55 -0
  127. package/src/modules/bmb/workflows/create-workflow/steps/step-01-init.md +45 -56
  128. package/src/modules/bmb/workflows/create-workflow/steps/step-02-gather.md +9 -31
  129. package/src/modules/bmb/workflows/create-workflow/steps/step-03-tools-configuration.md +250 -0
  130. package/src/modules/bmb/workflows/create-workflow/steps/step-04-plan-review.md +216 -0
  131. package/src/modules/bmb/workflows/create-workflow/steps/step-05-output-format-design.md +289 -0
  132. package/src/modules/bmb/workflows/create-workflow/steps/{step-09-design.md → step-06-design.md} +76 -44
  133. package/src/modules/bmb/workflows/create-workflow/steps/{step-11-build.md → step-07-build.md} +70 -24
  134. package/src/modules/bmb/workflows/create-workflow/steps/{step-12-review.md → step-08-review.md} +30 -16
  135. package/src/modules/bmb/workflows/create-workflow/steps/step-09-complete.md +187 -0
  136. package/src/modules/bmb/workflows/create-workflow/workflow.md +2 -2
  137. package/src/modules/bmb/workflows/edit-agent/steps/step-01-discover-intent.md +2 -2
  138. package/src/modules/bmb/workflows/edit-agent/steps/step-02-analyze-agent.md +14 -14
  139. package/src/modules/bmb/workflows/edit-agent/steps/step-03-propose-changes.md +4 -4
  140. package/src/modules/bmb/workflows/edit-agent/steps/step-04-apply-changes.md +2 -2
  141. package/src/modules/bmb/workflows/edit-agent/steps/step-05-validate.md +4 -4
  142. package/src/modules/bmb/workflows/edit-agent/workflow.md +1 -1
  143. package/src/modules/bmb/workflows/edit-workflow/steps/step-01-analyze.md +2 -6
  144. package/src/modules/bmb/workflows/edit-workflow/steps/step-03-improve.md +2 -2
  145. package/src/modules/bmb/workflows/edit-workflow/steps/step-04-validate.md +1 -1
  146. package/src/modules/bmb/workflows/edit-workflow/workflow.md +1 -1
  147. package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-01-validate-goal.md +2 -2
  148. package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-02-workflow-validation.md +5 -5
  149. package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-03-step-validation.md +7 -7
  150. package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-04-file-validation.md +3 -3
  151. package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-05-intent-spectrum-validation.md +3 -3
  152. package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-06-web-subprocess-validation.md +3 -3
  153. package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-07-holistic-analysis.md +3 -3
  154. package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-08-generate-report.md +2 -2
  155. package/src/modules/bmb/workflows/workflow-compliance-check/workflow.md +1 -1
  156. package/src/modules/bmb/workflows-legacy/edit-module/checklist.md +0 -1
  157. package/src/modules/bmgd/workflows/3-technical/game-architecture/instructions.md +8 -8
  158. package/src/modules/bmm/_module-installer/install-config.yaml +1 -1
  159. package/src/modules/bmm/agents/analyst.agent.yaml +11 -8
  160. package/src/modules/bmm/agents/architect.agent.yaml +1 -5
  161. package/src/modules/bmm/agents/pm.agent.yaml +5 -5
  162. package/src/modules/bmm/docs/README.md +23 -1
  163. package/src/modules/bmm/docs/agents-guide.md +16 -35
  164. package/src/modules/bmm/docs/brownfield-guide.md +17 -30
  165. package/src/modules/bmm/docs/enterprise-agentic-development.md +2 -2
  166. package/src/modules/bmm/docs/faq.md +6 -39
  167. package/src/modules/bmm/docs/glossary.md +11 -24
  168. package/src/modules/bmm/docs/images/README.md +37 -0
  169. package/src/modules/bmm/docs/images/workflow-method-greenfield.excalidraw +62 -202
  170. package/src/modules/bmm/docs/images/workflow-method-greenfield.svg +3 -1
  171. package/src/modules/bmm/docs/quick-spec-flow.md +652 -0
  172. package/src/modules/bmm/docs/quick-start.md +9 -25
  173. package/src/modules/bmm/docs/test-architecture.md +6 -6
  174. package/src/modules/bmm/docs/troubleshooting.md +680 -0
  175. package/src/modules/bmm/docs/workflow-document-project-reference.md +1 -1
  176. package/src/modules/bmm/docs/workflows-implementation.md +143 -3
  177. package/src/modules/bmm/docs/workflows-solutioning.md +2 -2
  178. package/src/modules/bmm/tasks/daily-standup.xml +85 -0
  179. package/src/modules/bmm/testarch/knowledge/ci-burn-in.md +1 -1
  180. package/src/modules/bmm/testarch/knowledge/overview.md +1 -1
  181. package/src/modules/bmm/workflows/1-analysis/product-brief/steps/step-02-vision.md +2 -2
  182. package/src/modules/bmm/workflows/1-analysis/product-brief/steps/step-03-users.md +2 -2
  183. package/src/modules/bmm/workflows/1-analysis/product-brief/steps/step-04-metrics.md +2 -2
  184. package/src/modules/bmm/workflows/1-analysis/product-brief/steps/step-05-scope.md +2 -2
  185. package/src/modules/bmm/workflows/1-analysis/product-brief/workflow.md +1 -1
  186. package/src/modules/bmm/workflows/1-analysis/research/domain-steps/step-01-init.md +8 -8
  187. package/src/modules/bmm/workflows/1-analysis/research/domain-steps/step-02-domain-analysis.md +18 -18
  188. package/src/modules/bmm/workflows/1-analysis/research/domain-steps/step-03-competitive-landscape.md +18 -18
  189. package/src/modules/bmm/workflows/1-analysis/research/domain-steps/step-04-regulatory-focus.md +18 -18
  190. package/src/modules/bmm/workflows/1-analysis/research/domain-steps/step-05-technical-trends.md +17 -17
  191. package/src/modules/bmm/workflows/1-analysis/research/domain-steps/step-06-research-synthesis.md +35 -36
  192. package/src/modules/bmm/workflows/1-analysis/research/market-steps/step-01-init.md +5 -6
  193. package/src/modules/bmm/workflows/1-analysis/research/market-steps/step-02-customer-behavior.md +20 -19
  194. package/src/modules/bmm/workflows/1-analysis/research/market-steps/step-02-customer-insights.md +21 -20
  195. package/src/modules/bmm/workflows/1-analysis/research/market-steps/step-03-customer-pain-points.md +20 -19
  196. package/src/modules/bmm/workflows/1-analysis/research/market-steps/step-04-customer-decisions.md +21 -20
  197. package/src/modules/bmm/workflows/1-analysis/research/market-steps/step-05-competitive-analysis.md +16 -15
  198. package/src/modules/bmm/workflows/1-analysis/research/market-steps/step-06-research-completion.md +36 -37
  199. package/src/modules/bmm/workflows/1-analysis/research/research.template.md +0 -1
  200. package/src/modules/bmm/workflows/1-analysis/research/technical-steps/step-01-init.md +8 -8
  201. package/src/modules/bmm/workflows/1-analysis/research/technical-steps/step-02-technical-overview.md +19 -18
  202. package/src/modules/bmm/workflows/1-analysis/research/technical-steps/step-03-integration-patterns.md +20 -19
  203. package/src/modules/bmm/workflows/1-analysis/research/technical-steps/step-04-architectural-patterns.md +21 -20
  204. package/src/modules/bmm/workflows/1-analysis/research/technical-steps/step-05-implementation-research.md +19 -18
  205. package/src/modules/bmm/workflows/1-analysis/research/technical-steps/step-06-research-synthesis.md +38 -39
  206. package/src/modules/bmm/workflows/1-analysis/research/workflow.md +14 -8
  207. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/workflow.md +6 -0
  208. package/src/modules/bmm/workflows/2-plan-workflows/prd/prd-template.md +7 -0
  209. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-01-init.md +138 -56
  210. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-01b-continue.md +93 -51
  211. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-02-discovery.md +223 -78
  212. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-03-success.md +20 -2
  213. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-04-journeys.md +18 -0
  214. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-05-domain.md +21 -0
  215. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-06-innovation.md +21 -0
  216. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-07-project-type.md +21 -0
  217. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-08-scoping.md +18 -0
  218. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-09-functional.md +18 -0
  219. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-10-nonfunctional.md +18 -0
  220. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-11-complete.md +13 -0
  221. package/src/modules/bmm/workflows/2-plan-workflows/prd/workflow.md +2 -2
  222. package/src/modules/bmm/workflows/3-solutioning/architecture/steps/step-03-starter.md +14 -14
  223. package/src/modules/bmm/workflows/3-solutioning/architecture/steps/step-04-decisions.md +7 -7
  224. package/src/modules/bmm/workflows/3-solutioning/architecture/workflow.md +2 -1
  225. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-01-validate-prerequisites.md +258 -0
  226. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-02-design-epics.md +232 -0
  227. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-03-create-stories.md +271 -0
  228. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-04-final-validation.md +144 -0
  229. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/templates/epics-template.md +57 -0
  230. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/workflow.md +58 -0
  231. package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/steps/step-01-document-discovery.md +189 -0
  232. package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/steps/step-02-prd-analysis.md +177 -0
  233. package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/steps/step-03-epic-coverage-validation.md +178 -0
  234. package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/steps/step-04-ux-alignment.md +138 -0
  235. package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/steps/step-05-epic-quality-review.md +251 -0
  236. package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/steps/step-06-final-assessment.md +132 -0
  237. package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/templates/readiness-report-template.md +4 -0
  238. package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/workflow.md +54 -0
  239. package/src/modules/{bmgd/workflows/4-production → bmm/workflows/4-implementation}/code-review/checklist.md +2 -1
  240. package/src/modules/bmm/workflows/4-implementation/code-review/instructions.xml +51 -3
  241. package/src/modules/bmm/workflows/4-implementation/code-review/workflow.yaml +1 -1
  242. package/src/modules/bmm/workflows/4-implementation/create-story/instructions.xml +32 -2
  243. package/src/modules/bmm/workflows/4-implementation/retrospective/instructions.md +3 -3
  244. package/src/modules/bmm/workflows/4-implementation/sprint-planning/instructions.md +19 -21
  245. package/src/modules/bmm/workflows/4-implementation/sprint-planning/sprint-status-template.yaml +10 -10
  246. package/src/modules/bmm/workflows/4-implementation/sprint-status/instructions.md +174 -0
  247. package/src/modules/bmm/workflows/4-implementation/sprint-status/workflow.yaml +35 -0
  248. package/src/modules/bmm/workflows/bmad-quick-flow/quick-dev/instructions.md +104 -7
  249. package/src/modules/bmm/workflows/bmad-quick-flow/quick-dev/workflow.yaml +4 -0
  250. package/src/modules/bmm/workflows/document-project/instructions.md +1 -1
  251. package/src/modules/bmm/workflows/document-project/workflows/deep-dive-instructions.md +2 -2
  252. package/src/modules/bmm/workflows/generate-project-context/workflow.md +1 -1
  253. package/src/modules/bmm/workflows/testarch/atdd/atdd-checklist-template.md +1 -1
  254. package/src/modules/bmm/workflows/testarch/ci/checklist.md +1 -1
  255. package/src/modules/bmm/workflows/testarch/ci/github-actions-template.yaml +36 -3
  256. package/src/modules/bmm/workflows/testarch/ci/gitlab-ci-template.yaml +25 -4
  257. package/src/modules/bmm/workflows/testarch/ci/instructions.md +2 -2
  258. package/src/modules/bmm/workflows/testarch/test-review/instructions.md +1 -1
  259. package/src/modules/bmm/workflows/workflow-status/paths/enterprise-brownfield.yaml +1 -6
  260. package/src/modules/bmm/workflows/workflow-status/paths/enterprise-greenfield.yaml +1 -6
  261. package/src/modules/bmm/workflows/workflow-status/paths/method-brownfield.yaml +1 -6
  262. package/src/modules/bmm/workflows/workflow-status/paths/method-greenfield.yaml +1 -7
  263. package/tools/cli/README.md +3 -3
  264. package/tools/cli/commands/build.js +9 -184
  265. package/tools/cli/commands/install.js +1 -6
  266. package/tools/cli/installers/lib/core/config-collector.js +70 -10
  267. package/tools/cli/installers/lib/core/installer.js +153 -388
  268. package/tools/cli/installers/lib/core/manifest-generator.js +91 -30
  269. package/tools/cli/installers/lib/core/post-install-sidecar-replacement.js +79 -0
  270. package/tools/cli/installers/lib/custom/handler.js +266 -0
  271. package/tools/cli/installers/lib/ide/_base-ide.js +10 -0
  272. package/tools/cli/installers/lib/ide/auggie.js +19 -7
  273. package/tools/cli/installers/lib/ide/crush.js +19 -6
  274. package/tools/cli/installers/lib/ide/cursor.js +29 -13
  275. package/tools/cli/installers/lib/ide/gemini.js +49 -1
  276. package/tools/cli/installers/lib/ide/iflow.js +20 -1
  277. package/tools/cli/installers/lib/ide/kiro-cli.js +327 -0
  278. package/tools/cli/installers/lib/ide/opencode.js +3 -3
  279. package/tools/cli/installers/lib/ide/roo.js +120 -184
  280. package/tools/cli/installers/lib/ide/rovo-dev.js +1 -1
  281. package/tools/cli/installers/lib/ide/shared/agent-command-generator.js +8 -2
  282. package/tools/cli/installers/lib/ide/shared/bmad-artifacts.js +34 -19
  283. package/tools/cli/installers/lib/ide/shared/workflow-command-generator.js +18 -14
  284. package/tools/cli/installers/lib/ide/templates/agent-command-template.md +1 -1
  285. package/tools/cli/installers/lib/ide/templates/workflow-commander.md +5 -0
  286. package/tools/cli/installers/lib/modules/manager.js +486 -53
  287. package/tools/cli/lib/agent/compiler.js +54 -5
  288. package/tools/cli/lib/agent/installer.js +127 -27
  289. package/tools/cli/lib/config.js +2 -1
  290. package/tools/cli/lib/ui.js +65 -4
  291. package/tools/cli/lib/yaml-xml-builder.js +0 -15
  292. package/tools/schema/agent.js +149 -89
  293. package/tools/validate-svg-changes.sh +356 -0
  294. package/custom/src/agents/commit-poet/installation-guide.md +0 -36
  295. package/custom/src/agents/toolsmith/installation-guide.md +0 -36
  296. package/src/modules/bmb/docs/workflows/workflow-template.md +0 -152
  297. package/src/modules/bmb/workflows/create-workflow/steps/step-03-tools-overview.md +0 -127
  298. package/src/modules/bmb/workflows/create-workflow/steps/step-04-core-tools.md +0 -145
  299. package/src/modules/bmb/workflows/create-workflow/steps/step-05-memory-requirements.md +0 -136
  300. package/src/modules/bmb/workflows/create-workflow/steps/step-06-external-tools.md +0 -154
  301. package/src/modules/bmb/workflows/create-workflow/steps/step-07-installation-guidance.md +0 -159
  302. package/src/modules/bmb/workflows/create-workflow/steps/step-08-tools-summary.md +0 -167
  303. package/src/modules/bmb/workflows/create-workflow/steps/step-10-plan-review.md +0 -215
  304. package/src/modules/bmb/workflows/create-workflow/templates/build-summary.md +0 -36
  305. package/src/modules/bmb/workflows/create-workflow/templates/completion-section.md +0 -39
  306. package/src/modules/bmb/workflows/create-workflow/templates/content-template.md +0 -21
  307. package/src/modules/bmb/workflows/create-workflow/templates/design-section.md +0 -53
  308. package/src/modules/bmb/workflows/create-workflow/templates/project-info.md +0 -18
  309. package/src/modules/bmb/workflows/create-workflow/templates/requirements-section.md +0 -47
  310. package/src/modules/bmb/workflows/create-workflow/templates/review-section.md +0 -56
  311. package/src/modules/bmb/workflows/create-workflow/templates/workflow-plan.md +0 -54
  312. package/src/modules/bmb/workflows-legacy/create-module/README.md +0 -229
  313. package/src/modules/bmb/workflows-legacy/create-module/brainstorm-context.md +0 -137
  314. package/src/modules/bmb/workflows-legacy/create-module/checklist.md +0 -235
  315. package/src/modules/bmb/workflows-legacy/create-module/installer-templates/install-config.yaml +0 -92
  316. package/src/modules/bmb/workflows-legacy/create-module/installer-templates/installer.js +0 -231
  317. package/src/modules/bmb/workflows-legacy/create-module/instructions.md +0 -577
  318. package/src/modules/bmb/workflows-legacy/create-module/module-structure.md +0 -400
  319. package/src/modules/bmb/workflows-legacy/create-module/workflow.yaml +0 -52
  320. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/epics-template.md +0 -80
  321. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/instructions.md +0 -387
  322. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/workflow.yaml +0 -53
  323. package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/checklist.md +0 -169
  324. package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/instructions.md +0 -332
  325. package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/template.md +0 -146
  326. package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/workflow.yaml +0 -64
  327. package/tools/cli/commands/agent-install.js +0 -409
  328. package/tools/cli/commands/cleanup.js +0 -141
  329. /package/{custom/src → example-custom-content}/agents/commit-poet/commit-poet.agent.yaml +0 -0
  330. /package/{custom/src → example-custom-content}/agents/toolsmith/toolsmith-sidecar/knowledge/bundlers.md +0 -0
  331. /package/{custom/src → example-custom-content}/agents/toolsmith/toolsmith-sidecar/knowledge/deploy.md +0 -0
  332. /package/{custom/src → example-custom-content}/agents/toolsmith/toolsmith-sidecar/knowledge/docs.md +0 -0
  333. /package/{custom/src → example-custom-content}/agents/toolsmith/toolsmith-sidecar/knowledge/installers.md +0 -0
  334. /package/{custom/src → example-custom-content}/agents/toolsmith/toolsmith-sidecar/knowledge/modules.md +0 -0
  335. /package/{custom/src → example-custom-content}/agents/toolsmith/toolsmith-sidecar/knowledge/tests.md +0 -0
@@ -34,9 +34,13 @@ class ManifestGenerator {
34
34
 
35
35
  // Store modules list (all modules including preserved ones)
36
36
  const preservedModules = options.preservedModules || [];
37
+
38
+ // Scan the bmad directory to find all actually installed modules
39
+ const installedModules = await this.scanInstalledModules(bmadDir);
40
+
37
41
  // Deduplicate modules list to prevent duplicates
38
- this.modules = [...new Set(['core', ...selectedModules, ...preservedModules])];
39
- this.updatedModules = [...new Set(['core', ...selectedModules])]; // Only these get rescanned
42
+ this.modules = [...new Set(['core', ...selectedModules, ...preservedModules, ...installedModules])];
43
+ this.updatedModules = [...new Set(['core', ...selectedModules, ...installedModules])]; // All installed modules get rescanned
40
44
  this.preservedModules = preservedModules; // These stay as-is in CSVs
41
45
  this.bmadDir = bmadDir;
42
46
  this.bmadFolderName = path.basename(bmadDir); // Get the actual folder name (e.g., '.bmad' or 'bmad')
@@ -105,7 +109,7 @@ class ManifestGenerator {
105
109
  }
106
110
 
107
111
  /**
108
- * Recursively find and parse workflow.yaml files
112
+ * Recursively find and parse workflow.yaml and workflow.md files
109
113
  */
110
114
  async getWorkflowsFromPath(basePath, moduleName) {
111
115
  const workflows = [];
@@ -126,11 +130,23 @@ class ManifestGenerator {
126
130
  // Recurse into subdirectories
127
131
  const newRelativePath = relativePath ? `${relativePath}/${entry.name}` : entry.name;
128
132
  await findWorkflows(fullPath, newRelativePath);
129
- } else if (entry.name === 'workflow.yaml') {
130
- // Parse workflow file
133
+ } else if (entry.name === 'workflow.yaml' || entry.name === 'workflow.md') {
134
+ // Parse workflow file (both YAML and MD formats)
131
135
  try {
132
136
  const content = await fs.readFile(fullPath, 'utf8');
133
- const workflow = yaml.load(content);
137
+
138
+ let workflow;
139
+ if (entry.name === 'workflow.yaml') {
140
+ // Parse YAML workflow
141
+ workflow = yaml.load(content);
142
+ } else {
143
+ // Parse MD workflow with YAML frontmatter
144
+ const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
145
+ if (!frontmatterMatch) {
146
+ continue; // Skip MD files without frontmatter
147
+ }
148
+ workflow = yaml.load(frontmatterMatch[1]);
149
+ }
134
150
 
135
151
  // Skip template workflows (those with placeholder values)
136
152
  if (workflow.name && workflow.name.includes('{') && workflow.name.includes('}')) {
@@ -141,18 +157,15 @@ class ManifestGenerator {
141
157
  // Build relative path for installation
142
158
  const installPath =
143
159
  moduleName === 'core'
144
- ? `${this.bmadFolderName}/core/workflows/${relativePath}/workflow.yaml`
145
- : `${this.bmadFolderName}/${moduleName}/workflows/${relativePath}/workflow.yaml`;
146
-
147
- // Check for standalone property (default: false)
148
- const standalone = workflow.standalone === true;
160
+ ? `${this.bmadFolderName}/core/workflows/${relativePath}/${entry.name}`
161
+ : `${this.bmadFolderName}/${moduleName}/workflows/${relativePath}/${entry.name}`;
149
162
 
163
+ // ALL workflows now generate commands - no standalone property needed
150
164
  workflows.push({
151
165
  name: workflow.name,
152
166
  description: workflow.description.replaceAll('"', '""'), // Escape quotes for CSV
153
167
  module: moduleName,
154
168
  path: installPath,
155
- standalone: standalone,
156
169
  });
157
170
 
158
171
  // Add to files list
@@ -207,18 +220,23 @@ class ManifestGenerator {
207
220
  }
208
221
 
209
222
  /**
210
- * Get agents from a directory
223
+ * Get agents from a directory recursively
211
224
  * Only includes compiled .md files (not .agent.yaml source files)
212
225
  */
213
- async getAgentsFromDir(dirPath, moduleName) {
226
+ async getAgentsFromDir(dirPath, moduleName, relativePath = '') {
214
227
  const agents = [];
215
- const files = await fs.readdir(dirPath);
228
+ const entries = await fs.readdir(dirPath, { withFileTypes: true });
216
229
 
217
- for (const file of files) {
218
- // Only include .md files, skip .agent.yaml source files and README.md
219
- if (file.endsWith('.md') && !file.endsWith('.agent.yaml') && file.toLowerCase() !== 'readme.md') {
220
- const filePath = path.join(dirPath, file);
221
- const content = await fs.readFile(filePath, 'utf8');
230
+ for (const entry of entries) {
231
+ const fullPath = path.join(dirPath, entry.name);
232
+
233
+ if (entry.isDirectory()) {
234
+ // Recurse into subdirectories
235
+ const newRelativePath = relativePath ? `${relativePath}/${entry.name}` : entry.name;
236
+ const subDirAgents = await this.getAgentsFromDir(fullPath, moduleName, newRelativePath);
237
+ agents.push(...subDirAgents);
238
+ } else if (entry.name.endsWith('.md') && !entry.name.endsWith('.agent.yaml') && entry.name.toLowerCase() !== 'readme.md') {
239
+ const content = await fs.readFile(fullPath, 'utf8');
222
240
 
223
241
  // Skip files that don't contain <agent> tag (e.g., README files)
224
242
  if (!content.includes('<agent')) {
@@ -242,10 +260,13 @@ class ManifestGenerator {
242
260
  const principlesMatch = content.match(/<principles>([\s\S]*?)<\/principles>/);
243
261
 
244
262
  // Build relative path for installation
263
+ const fileRelativePath = relativePath ? `${relativePath}/${entry.name}` : entry.name;
245
264
  const installPath =
246
- moduleName === 'core' ? `${this.bmadFolderName}/core/agents/${file}` : `${this.bmadFolderName}/${moduleName}/agents/${file}`;
265
+ moduleName === 'core'
266
+ ? `${this.bmadFolderName}/core/agents/${fileRelativePath}`
267
+ : `${this.bmadFolderName}/${moduleName}/agents/${fileRelativePath}`;
247
268
 
248
- const agentName = file.replace('.md', '');
269
+ const agentName = entry.name.replace('.md', '');
249
270
 
250
271
  // Helper function to clean and escape CSV content
251
272
  const cleanForCSV = (text) => {
@@ -541,12 +562,12 @@ class ManifestGenerator {
541
562
  async writeWorkflowManifest(cfgDir) {
542
563
  const csvPath = path.join(cfgDir, 'workflow-manifest.csv');
543
564
 
544
- // Create CSV header with standalone column
545
- let csv = 'name,description,module,path,standalone\n';
565
+ // Create CSV header - removed standalone column as ALL workflows now generate commands
566
+ let csv = 'name,description,module,path\n';
546
567
 
547
- // Add all workflows
568
+ // Add all workflows - no standalone property needed anymore
548
569
  for (const workflow of this.workflows) {
549
- csv += `"${workflow.name}","${workflow.description}","${workflow.module}","${workflow.path}","${workflow.standalone}"\n`;
570
+ csv += `"${workflow.name}","${workflow.description}","${workflow.module}","${workflow.path}"\n`;
550
571
  }
551
572
 
552
573
  await fs.writeFile(csvPath, csv);
@@ -641,13 +662,14 @@ class ManifestGenerator {
641
662
  if (this.allInstalledFiles && this.allInstalledFiles.length > 0) {
642
663
  // Process all installed files
643
664
  for (const filePath of this.allInstalledFiles) {
644
- const relativePath = 'bmad' + filePath.replace(this.bmadDir, '').replaceAll('\\', '/');
665
+ // Store paths relative to bmadDir (no folder prefix)
666
+ const relativePath = filePath.replace(this.bmadDir, '').replaceAll('\\', '/').replace(/^\//, '');
645
667
  const ext = path.extname(filePath).toLowerCase();
646
668
  const fileName = path.basename(filePath, ext);
647
669
 
648
- // Determine module from path
670
+ // Determine module from path (first directory component)
649
671
  const pathParts = relativePath.split('/');
650
- const module = pathParts.length > 1 ? pathParts[1] : 'unknown';
672
+ const module = pathParts.length > 0 ? pathParts[0] : 'unknown';
651
673
 
652
674
  // Calculate hash
653
675
  const hash = await this.calculateFileHash(filePath);
@@ -663,10 +685,13 @@ class ManifestGenerator {
663
685
  } else {
664
686
  // Fallback: use the collected workflows/agents/tasks
665
687
  for (const file of this.files) {
666
- const filePath = path.join(this.bmadDir, file.path.replace(this.bmadFolderName + '/', ''));
688
+ // Strip the folder prefix if present (for consistency)
689
+ const relPath = file.path.replace(this.bmadFolderName + '/', '');
690
+ const filePath = path.join(this.bmadDir, relPath);
667
691
  const hash = await this.calculateFileHash(filePath);
668
692
  allFiles.push({
669
693
  ...file,
694
+ path: relPath,
670
695
  hash: hash,
671
696
  });
672
697
  }
@@ -687,6 +712,42 @@ class ManifestGenerator {
687
712
  await fs.writeFile(csvPath, csv);
688
713
  return csvPath;
689
714
  }
715
+
716
+ /**
717
+ * Scan the bmad directory to find all installed modules
718
+ * @param {string} bmadDir - Path to bmad directory
719
+ * @returns {Array} List of module names
720
+ */
721
+ async scanInstalledModules(bmadDir) {
722
+ const modules = [];
723
+
724
+ try {
725
+ const entries = await fs.readdir(bmadDir, { withFileTypes: true });
726
+
727
+ for (const entry of entries) {
728
+ // Skip if not a directory or is a special directory
729
+ if (!entry.isDirectory() || entry.name.startsWith('.') || entry.name === '_cfg') {
730
+ continue;
731
+ }
732
+
733
+ // Check if this looks like a module (has agents, workflows, or tasks directory)
734
+ const modulePath = path.join(bmadDir, entry.name);
735
+ const hasAgents = await fs.pathExists(path.join(modulePath, 'agents'));
736
+ const hasWorkflows = await fs.pathExists(path.join(modulePath, 'workflows'));
737
+ const hasTasks = await fs.pathExists(path.join(modulePath, 'tasks'));
738
+ const hasTools = await fs.pathExists(path.join(modulePath, 'tools'));
739
+
740
+ // If it has any of these directories, it's likely a module
741
+ if (hasAgents || hasWorkflows || hasTasks || hasTools) {
742
+ modules.push(entry.name);
743
+ }
744
+ }
745
+ } catch (error) {
746
+ console.warn(`Warning: Could not scan for installed modules: ${error.message}`);
747
+ }
748
+
749
+ return modules;
750
+ }
690
751
  }
691
752
 
692
753
  module.exports = { ManifestGenerator };
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Post-installation sidecar folder replacement utility
3
+ * Replaces {agent_sidecar_folder} placeholders in all installed agents
4
+ */
5
+
6
+ const fs = require('fs-extra');
7
+ const path = require('node:path');
8
+ const yaml = require('yaml');
9
+ const glob = require('glob');
10
+ const chalk = require('chalk');
11
+
12
+ /**
13
+ * Replace {agent_sidecar_folder} placeholders in all agent files
14
+ * @param {string} bmadDir - Path to .bmad directory
15
+ * @returns {Object} Statistics about replacements made
16
+ */
17
+ async function replaceAgentSidecarFolders(bmadDir) {
18
+ const results = {
19
+ filesScanned: 0,
20
+ filesReplaced: 0,
21
+ totalReplacements: 0,
22
+ errors: [],
23
+ };
24
+
25
+ try {
26
+ // Load core config to get agent_sidecar_folder value
27
+ const coreConfigPath = path.join(bmadDir, 'bmb', 'config.yaml');
28
+
29
+ if (!(await fs.pathExists(coreConfigPath))) {
30
+ throw new Error(`Core config not found at ${coreConfigPath}`);
31
+ }
32
+
33
+ const coreConfigContent = await fs.readFile(coreConfigPath, 'utf8');
34
+ const coreConfig = yaml.parse(coreConfigContent);
35
+ const agentSidecarFolder = coreConfig.agent_sidecar_folder;
36
+
37
+ // Use the literal value from config, don't resolve the placeholders
38
+ console.log(chalk.dim(`\n Replacing {agent_sidecar_folder} with: ${agentSidecarFolder}`));
39
+
40
+ // Find all agent .md files
41
+ const agentPattern = path.join(bmadDir, '**/*.md');
42
+ const agentFiles = glob.sync(agentPattern);
43
+
44
+ for (const agentFile of agentFiles) {
45
+ results.filesScanned++;
46
+
47
+ try {
48
+ let content = await fs.readFile(agentFile, 'utf8');
49
+
50
+ // Check if file contains {agent_sidecar_folder}
51
+ if (content.includes('{agent_sidecar_folder}')) {
52
+ // Replace all occurrences
53
+ const originalContent = content;
54
+ content = content.replaceAll('{agent_sidecar_folder}', agentSidecarFolder);
55
+
56
+ // Only write if content changed
57
+ if (content !== originalContent) {
58
+ await fs.writeFile(agentFile, content, 'utf8');
59
+
60
+ const replacementCount = (originalContent.match(/{agent_sidecar_folder}/g) || []).length;
61
+ results.filesReplaced++;
62
+ results.totalReplacements += replacementCount;
63
+
64
+ console.log(chalk.dim(` ✓ Replaced ${replacementCount} occurrence(s) in ${path.relative(bmadDir, agentFile)}`));
65
+ }
66
+ }
67
+ } catch (error) {
68
+ results.errors.push(`Error processing ${agentFile}: ${error.message}`);
69
+ }
70
+ }
71
+
72
+ return results;
73
+ } catch (error) {
74
+ results.errors.push(`Fatal error: ${error.message}`);
75
+ return results;
76
+ }
77
+ }
78
+
79
+ module.exports = { replaceAgentSidecarFolders };
@@ -0,0 +1,266 @@
1
+ const path = require('node:path');
2
+ const fs = require('fs-extra');
3
+ const chalk = require('chalk');
4
+ const yaml = require('js-yaml');
5
+ const { FileOps } = require('../../../lib/file-ops');
6
+
7
+ /**
8
+ * Handler for custom content (custom.yaml)
9
+ * Installs custom agents and workflows without requiring a full module structure
10
+ */
11
+ class CustomHandler {
12
+ constructor() {
13
+ this.fileOps = new FileOps();
14
+ }
15
+
16
+ /**
17
+ * Find all custom.yaml files in the project
18
+ * @param {string} projectRoot - Project root directory
19
+ * @returns {Array} List of custom content paths
20
+ */
21
+ async findCustomContent(projectRoot) {
22
+ const customPaths = [];
23
+
24
+ // Helper function to recursively scan directories
25
+ async function scanDirectory(dir, excludePaths = []) {
26
+ try {
27
+ const entries = await fs.readdir(dir, { withFileTypes: true });
28
+
29
+ for (const entry of entries) {
30
+ const fullPath = path.join(dir, entry.name);
31
+
32
+ // Skip hidden directories and common exclusions
33
+ if (
34
+ entry.name.startsWith('.') ||
35
+ entry.name === 'node_modules' ||
36
+ entry.name === 'dist' ||
37
+ entry.name === 'build' ||
38
+ entry.name === '.git' ||
39
+ entry.name === 'bmad'
40
+ ) {
41
+ continue;
42
+ }
43
+
44
+ // Skip excluded paths
45
+ if (excludePaths.some((exclude) => fullPath.startsWith(exclude))) {
46
+ continue;
47
+ }
48
+
49
+ if (entry.isDirectory()) {
50
+ // Recursively scan subdirectories
51
+ await scanDirectory(fullPath, excludePaths);
52
+ } else if (entry.name === 'custom.yaml') {
53
+ // Found a custom.yaml file
54
+ customPaths.push(fullPath);
55
+ }
56
+ }
57
+ } catch {
58
+ // Ignore errors (e.g., permission denied)
59
+ }
60
+ }
61
+
62
+ // Scan the entire project, but exclude source directories
63
+ await scanDirectory(projectRoot, [path.join(projectRoot, 'src'), path.join(projectRoot, 'tools'), path.join(projectRoot, 'test')]);
64
+
65
+ return customPaths;
66
+ }
67
+
68
+ /**
69
+ * Get custom content info from a custom.yaml file
70
+ * @param {string} customYamlPath - Path to custom.yaml file
71
+ * @returns {Object|null} Custom content info
72
+ */
73
+ async getCustomInfo(customYamlPath) {
74
+ try {
75
+ const configContent = await fs.readFile(customYamlPath, 'utf8');
76
+
77
+ // Try to parse YAML with error handling
78
+ let config;
79
+ try {
80
+ config = yaml.load(configContent);
81
+ } catch (parseError) {
82
+ console.warn(chalk.yellow(`Warning: YAML parse error in ${customYamlPath}:`, parseError.message));
83
+ return null;
84
+ }
85
+
86
+ const customDir = path.dirname(customYamlPath);
87
+ const relativePath = path.relative(process.cwd(), customDir);
88
+
89
+ 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,
94
+ relativePath: relativePath,
95
+ defaultSelected: config.default_selected === true,
96
+ config: config,
97
+ };
98
+ } catch (error) {
99
+ console.warn(chalk.yellow(`Warning: Failed to read ${customYamlPath}:`, error.message));
100
+ return null;
101
+ }
102
+ }
103
+
104
+ /**
105
+ * Install custom content
106
+ * @param {string} customPath - Path to custom content directory
107
+ * @param {string} bmadDir - Target bmad directory
108
+ * @param {Object} config - Configuration from custom.yaml
109
+ * @param {Function} fileTrackingCallback - Optional callback to track installed files
110
+ * @returns {Object} Installation result
111
+ */
112
+ async install(customPath, bmadDir, config, fileTrackingCallback = null) {
113
+ const results = {
114
+ agentsInstalled: 0,
115
+ workflowsInstalled: 0,
116
+ filesCopied: 0,
117
+ preserved: 0,
118
+ errors: [],
119
+ };
120
+
121
+ try {
122
+ // Create custom directories in bmad
123
+ const bmadCustomDir = path.join(bmadDir, 'custom');
124
+ const bmadAgentsDir = path.join(bmadCustomDir, 'agents');
125
+ const bmadWorkflowsDir = path.join(bmadCustomDir, 'workflows');
126
+
127
+ await fs.ensureDir(bmadCustomDir);
128
+ await fs.ensureDir(bmadAgentsDir);
129
+ await fs.ensureDir(bmadWorkflowsDir);
130
+
131
+ // Process agents - copy entire agents directory structure
132
+ const agentsDir = path.join(customPath, 'agents');
133
+ if (await fs.pathExists(agentsDir)) {
134
+ await this.copyDirectory(agentsDir, bmadAgentsDir, results, fileTrackingCallback, config);
135
+
136
+ // Count agent files
137
+ const agentFiles = await this.findFilesRecursively(agentsDir, ['.agent.yaml', '.md']);
138
+ results.agentsInstalled = agentFiles.length;
139
+ }
140
+
141
+ // Process workflows - copy entire workflows directory structure
142
+ const workflowsDir = path.join(customPath, 'workflows');
143
+ if (await fs.pathExists(workflowsDir)) {
144
+ await this.copyDirectory(workflowsDir, bmadWorkflowsDir, results, fileTrackingCallback, config);
145
+
146
+ // Count workflow files
147
+ const workflowFiles = await this.findFilesRecursively(workflowsDir, ['.md']);
148
+ results.workflowsInstalled = workflowFiles.length;
149
+ }
150
+
151
+ // Process any additional files at root
152
+ const entries = await fs.readdir(customPath, { withFileTypes: true });
153
+ for (const entry of entries) {
154
+ if (entry.isFile() && entry.name !== 'custom.yaml' && !entry.name.startsWith('.') && !entry.name.endsWith('.md')) {
155
+ // Skip .md files at root as they're likely docs
156
+ const sourcePath = path.join(customPath, entry.name);
157
+ const targetPath = path.join(bmadCustomDir, entry.name);
158
+
159
+ try {
160
+ // Check if file already exists
161
+ if (await fs.pathExists(targetPath)) {
162
+ // File already exists, preserve it
163
+ results.preserved = (results.preserved || 0) + 1;
164
+ } else {
165
+ await fs.copy(sourcePath, targetPath);
166
+ results.filesCopied++;
167
+
168
+ if (fileTrackingCallback) {
169
+ fileTrackingCallback(targetPath);
170
+ }
171
+ }
172
+ } catch (error) {
173
+ results.errors.push(`Failed to copy file ${entry.name}: ${error.message}`);
174
+ }
175
+ }
176
+ }
177
+ } catch (error) {
178
+ results.errors.push(`Installation failed: ${error.message}`);
179
+ }
180
+
181
+ return results;
182
+ }
183
+
184
+ /**
185
+ * Find all files with specific extensions recursively
186
+ * @param {string} dir - Directory to search
187
+ * @param {Array} extensions - File extensions to match
188
+ * @returns {Array} List of matching files
189
+ */
190
+ async findFilesRecursively(dir, extensions) {
191
+ const files = [];
192
+
193
+ async function search(currentDir) {
194
+ const entries = await fs.readdir(currentDir, { withFileTypes: true });
195
+
196
+ for (const entry of entries) {
197
+ const fullPath = path.join(currentDir, entry.name);
198
+
199
+ if (entry.isDirectory()) {
200
+ await search(fullPath);
201
+ } else if (extensions.some((ext) => entry.name.endsWith(ext))) {
202
+ files.push(fullPath);
203
+ }
204
+ }
205
+ }
206
+
207
+ await search(dir);
208
+ return files;
209
+ }
210
+
211
+ /**
212
+ * Recursively copy a directory
213
+ * @param {string} sourceDir - Source directory
214
+ * @param {string} targetDir - Target directory
215
+ * @param {Object} results - Results object to update
216
+ * @param {Function} fileTrackingCallback - Optional callback
217
+ * @param {Object} config - Configuration for placeholder replacement
218
+ */
219
+ async copyDirectory(sourceDir, targetDir, results, fileTrackingCallback, config) {
220
+ await fs.ensureDir(targetDir);
221
+ const entries = await fs.readdir(sourceDir, { withFileTypes: true });
222
+
223
+ for (const entry of entries) {
224
+ const sourcePath = path.join(sourceDir, entry.name);
225
+ const targetPath = path.join(targetDir, entry.name);
226
+
227
+ if (entry.isDirectory()) {
228
+ await this.copyDirectory(sourcePath, targetPath, results, fileTrackingCallback, config);
229
+ } else {
230
+ try {
231
+ // Check if file already exists
232
+ if (await fs.pathExists(targetPath)) {
233
+ // File already exists, preserve it
234
+ results.preserved = (results.preserved || 0) + 1;
235
+ } else {
236
+ // Copy with placeholder replacement for text files
237
+ const textExtensions = ['.md', '.yaml', '.yml', '.txt', '.json'];
238
+ 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
+ });
245
+ } else {
246
+ await fs.copy(sourcePath, targetPath);
247
+ }
248
+
249
+ results.filesCopied++;
250
+ if (fileTrackingCallback) {
251
+ fileTrackingCallback(targetPath);
252
+ }
253
+ }
254
+
255
+ if (entry.name.endsWith('.md')) {
256
+ results.workflowsInstalled++;
257
+ }
258
+ } catch (error) {
259
+ results.errors.push(`Failed to copy ${entry.name}: ${error.message}`);
260
+ }
261
+ }
262
+ }
263
+ }
264
+ }
265
+
266
+ module.exports = { CustomHandler };
@@ -536,6 +536,11 @@ class BaseIdeSetup {
536
536
  if (typeof content === 'string' && content.includes('{bmad_folder}')) {
537
537
  content = content.replaceAll('{bmad_folder}', this.bmadFolderName);
538
538
  }
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}');
543
+ }
539
544
  await this.ensureDir(path.dirname(filePath));
540
545
  await fs.writeFile(filePath, content, 'utf8');
541
546
  }
@@ -563,6 +568,11 @@ class BaseIdeSetup {
563
568
  content = content.replaceAll('{bmad_folder}', this.bmadFolderName);
564
569
  }
565
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}');
574
+ }
575
+
566
576
  // Write to dest with replaced content
567
577
  await fs.writeFile(dest, content, 'utf8');
568
578
  } catch {
@@ -3,6 +3,7 @@ const fs = require('fs-extra');
3
3
  const { BaseIdeSetup } = require('./_base-ide');
4
4
  const chalk = require('chalk');
5
5
  const { AgentCommandGenerator } = require('./shared/agent-command-generator');
6
+ const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator');
6
7
 
7
8
  /**
8
9
  * Auggie CLI setup handler
@@ -33,10 +34,23 @@ class AuggieSetup extends BaseIdeSetup {
33
34
  const agentGen = new AgentCommandGenerator(this.bmadFolderName);
34
35
  const { artifacts: agentArtifacts } = await agentGen.collectAgentArtifacts(bmadDir, options.selectedModules || []);
35
36
 
36
- // Get tasks, tools, and workflows (standalone only)
37
+ // Get tasks, tools, and workflows (ALL workflows now generate commands)
37
38
  const tasks = await this.getTasks(bmadDir, true);
38
39
  const tools = await this.getTools(bmadDir, true);
39
- const workflows = await this.getWorkflows(bmadDir, true);
40
+
41
+ // Get ALL workflows using the new workflow command generator
42
+ const workflowGenerator = new WorkflowCommandGenerator(this.bmadFolderName);
43
+ const { artifacts: workflowArtifacts, counts: workflowCounts } = await workflowGenerator.collectWorkflowArtifacts(bmadDir);
44
+
45
+ // Convert workflow artifacts to expected format
46
+ const workflows = workflowArtifacts
47
+ .filter((artifact) => artifact.type === 'workflow-command')
48
+ .map((artifact) => ({
49
+ module: artifact.module,
50
+ name: path.basename(artifact.relativePath, '.md'),
51
+ path: artifact.sourcePath,
52
+ content: artifact.content,
53
+ }));
40
54
 
41
55
  const bmadCommandsDir = path.join(location, 'bmad');
42
56
  const agentsDir = path.join(bmadCommandsDir, 'agents');
@@ -73,13 +87,11 @@ class AuggieSetup extends BaseIdeSetup {
73
87
  await this.writeFile(targetPath, commandContent);
74
88
  }
75
89
 
76
- // Install workflows
90
+ // Install workflows (already generated commands)
77
91
  for (const workflow of workflows) {
78
- const content = await this.readFile(workflow.path);
79
- const commandContent = this.createWorkflowCommand(workflow, content);
80
-
92
+ // Use the pre-generated workflow command content
81
93
  const targetPath = path.join(workflowsDir, `${workflow.module}-${workflow.name}.md`);
82
- await this.writeFile(targetPath, commandContent);
94
+ await this.writeFile(targetPath, workflow.content);
83
95
  }
84
96
 
85
97
  const totalInstalled = agentArtifacts.length + tasks.length + tools.length + workflows.length;