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

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 (355) hide show
  1. package/.coderabbit.yaml +36 -0
  2. package/.github/CODE_OF_CONDUCT.md +128 -0
  3. package/.github/ISSUE_TEMPLATE/idea_submission.md +1 -1
  4. package/.github/scripts/discord-helpers.sh +15 -0
  5. package/.github/workflows/discord.yaml +278 -8
  6. package/.github/workflows/quality.yaml +19 -0
  7. package/.markdownlint-cli2.yaml +42 -0
  8. package/.prettierignore +3 -0
  9. package/CHANGELOG.md +183 -360
  10. package/README.md +4 -1
  11. package/docs/agent-customization-guide.md +2 -2
  12. package/docs/custom-content-installation.md +245 -0
  13. package/docs/document-sharding-guide.md +1 -1
  14. package/docs/index.md +2 -2
  15. package/docs/installers-bundlers/installers-modules-platforms-reference.md +6 -5
  16. package/docs/web-bundles-gemini-gpt-guide.md +1 -1
  17. package/eslint.config.mjs +14 -0
  18. package/example-custom-content/README.md +8 -0
  19. package/{custom/src → example-custom-content}/agents/commit-poet/commit-poet.agent.yaml +1 -1
  20. package/{custom/src → example-custom-content}/agents/toolsmith/toolsmith-sidecar/instructions.md +5 -5
  21. package/{custom/src → example-custom-content}/agents/toolsmith/toolsmith-sidecar/knowledge/docs.md +1 -1
  22. package/{custom/src → example-custom-content}/agents/toolsmith/toolsmith-sidecar/knowledge/installers.md +1 -1
  23. package/{custom/src → example-custom-content}/agents/toolsmith/toolsmith-sidecar/knowledge/modules.md +2 -2
  24. package/{custom/src → example-custom-content}/agents/toolsmith/toolsmith-sidecar/memories.md +1 -1
  25. package/{custom/src → example-custom-content}/agents/toolsmith/toolsmith.agent.yaml +18 -17
  26. package/example-custom-content/module.yaml +4 -0
  27. package/example-custom-content/workflows/quiz-master/steps/step-01-init.md +168 -0
  28. package/example-custom-content/workflows/quiz-master/steps/step-02-q1.md +155 -0
  29. package/example-custom-content/workflows/quiz-master/steps/step-03-q2.md +89 -0
  30. package/example-custom-content/workflows/quiz-master/steps/step-04-q3.md +36 -0
  31. package/example-custom-content/workflows/quiz-master/steps/step-05-q4.md +36 -0
  32. package/example-custom-content/workflows/quiz-master/steps/step-06-q5.md +36 -0
  33. package/example-custom-content/workflows/quiz-master/steps/step-07-q6.md +36 -0
  34. package/example-custom-content/workflows/quiz-master/steps/step-08-q7.md +36 -0
  35. package/example-custom-content/workflows/quiz-master/steps/step-09-q8.md +36 -0
  36. package/example-custom-content/workflows/quiz-master/steps/step-10-q9.md +36 -0
  37. package/example-custom-content/workflows/quiz-master/steps/step-11-q10.md +36 -0
  38. package/example-custom-content/workflows/quiz-master/steps/step-12-results.md +150 -0
  39. package/example-custom-content/workflows/quiz-master/templates/csv-headers.template +1 -0
  40. package/example-custom-content/workflows/quiz-master/workflow.md +54 -0
  41. package/example-custom-content/workflows/wassup/workflow.md +26 -0
  42. package/example-custom-module/mwm/README.md +9 -0
  43. package/example-custom-module/mwm/agents/cbt-coach/cbt-coach-sidecar/cognitive-distortions.md +47 -0
  44. package/example-custom-module/mwm/agents/cbt-coach/cbt-coach-sidecar/thought-records.md +17 -0
  45. package/example-custom-module/mwm/agents/cbt-coach/cbt-coach.agent.yaml +151 -0
  46. package/example-custom-module/mwm/agents/crisis-navigator.agent.yaml +138 -0
  47. package/example-custom-module/mwm/agents/meditation-guide.agent.yaml +138 -0
  48. package/example-custom-module/mwm/agents/wellness-companion/wellness-companion-sidecar/insights.md +13 -0
  49. package/example-custom-module/mwm/agents/wellness-companion/wellness-companion-sidecar/instructions.md +30 -0
  50. package/example-custom-module/mwm/agents/wellness-companion/wellness-companion-sidecar/memories.md +13 -0
  51. package/example-custom-module/mwm/agents/wellness-companion/wellness-companion-sidecar/patterns.md +17 -0
  52. package/example-custom-module/mwm/agents/wellness-companion/wellness-companion.agent.yaml +125 -0
  53. package/example-custom-module/mwm/module.yaml +28 -0
  54. package/example-custom-module/mwm/workflows/cbt-thought-record/README.md +31 -0
  55. package/example-custom-module/mwm/workflows/cbt-thought-record/workflow.md +45 -0
  56. package/example-custom-module/mwm/workflows/crisis-support/README.md +31 -0
  57. package/example-custom-module/mwm/workflows/crisis-support/workflow.md +45 -0
  58. package/example-custom-module/mwm/workflows/daily-checkin/README.md +32 -0
  59. package/example-custom-module/mwm/workflows/daily-checkin/workflow.md +45 -0
  60. package/example-custom-module/mwm/workflows/guided-meditation/README.md +31 -0
  61. package/example-custom-module/mwm/workflows/guided-meditation/workflow.md +45 -0
  62. package/example-custom-module/mwm/workflows/wellness-journal/README.md +31 -0
  63. package/example-custom-module/mwm/workflows/wellness-journal/workflow.md +45 -0
  64. package/package.json +9 -4
  65. package/src/core/_module-installer/installer.js +1 -1
  66. package/src/core/{_module-installer/install-config.yaml → module.yaml} +5 -1
  67. package/src/core/resources/excalidraw/library-loader.md +2 -2
  68. package/src/core/workflows/brainstorming/steps/step-01-session-setup.md +1 -1
  69. package/src/core/workflows/brainstorming/workflow.md +1 -1
  70. package/src/core/workflows/party-mode/steps/step-03-graceful-exit.md +0 -1
  71. package/src/core/workflows/party-mode/workflow.md +2 -3
  72. package/src/modules/bmb/README.md +1 -1
  73. package/src/modules/bmb/_module-installer/installer.js +76 -0
  74. package/src/modules/bmb/agents/bmad-builder.agent.yaml +32 -9
  75. package/src/modules/bmb/docs/agents/agent-menu-patterns.md +5 -5
  76. package/src/modules/bmb/docs/agents/expert-agent-architecture.md +20 -20
  77. package/src/modules/bmb/docs/agents/index.md +1 -1
  78. package/src/modules/bmb/docs/agents/module-agent-architecture.md +45 -45
  79. package/src/modules/bmb/docs/agents/simple-agent-architecture.md +7 -3
  80. package/src/modules/bmb/docs/workflows/architecture.md +1 -1
  81. package/src/modules/bmb/docs/workflows/templates/step-01-init-continuable-template.md +241 -0
  82. package/src/modules/bmb/docs/workflows/templates/step-1b-template.md +223 -0
  83. package/src/modules/bmb/{workflows/create-workflow → docs/workflows}/templates/step-file.md +4 -4
  84. package/src/modules/bmb/docs/workflows/{step-template.md → templates/step-template.md} +40 -33
  85. package/src/modules/bmb/docs/workflows/templates/workflow-template.md +104 -0
  86. package/src/modules/bmb/{workflows/create-workflow → docs/workflows}/templates/workflow.md +1 -1
  87. package/src/modules/bmb/{_module-installer/install-config.yaml → module.yaml} +4 -9
  88. package/src/modules/bmb/reference/agents/expert-examples/journal-keeper/README.md +4 -4
  89. package/src/modules/bmb/reference/agents/expert-examples/journal-keeper/journal-keeper.agent.yaml +8 -8
  90. package/src/modules/bmb/reference/agents/module-examples/security-engineer.agent.yaml +6 -6
  91. package/src/modules/bmb/reference/agents/module-examples/trend-analyst.agent.yaml +7 -7
  92. package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-01-init.md +2 -3
  93. package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-01b-continue.md +10 -40
  94. package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-02-profile.md +1 -1
  95. package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-03-assessment.md +1 -0
  96. package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-04-strategy.md +2 -2
  97. package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-05-shopping.md +2 -2
  98. package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-06-prep-schedule.md +2 -2
  99. package/src/modules/bmb/reference/workflows/meal-prep-nutrition/workflow.md +2 -2
  100. package/src/modules/bmb/workflows/create-agent/data/info-and-installation-guide.md +16 -4
  101. package/src/modules/bmb/workflows/create-agent/data/reference/agents/expert-examples/journal-keeper/README.md +4 -4
  102. package/src/modules/bmb/workflows/create-agent/data/reference/agents/expert-examples/journal-keeper/journal-keeper.agent.yaml +7 -7
  103. package/src/modules/bmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/steps/step-05-shopping.md +1 -1
  104. package/src/modules/bmb/workflows/create-agent/data/validation-complete.md +3 -3
  105. package/src/modules/bmb/workflows/create-agent/steps/step-01-brainstorm.md +3 -3
  106. package/src/modules/bmb/workflows/create-agent/steps/step-02-discover.md +3 -3
  107. package/src/modules/bmb/workflows/create-agent/steps/step-03-persona.md +3 -3
  108. package/src/modules/bmb/workflows/create-agent/steps/step-04-commands.md +6 -6
  109. package/src/modules/bmb/workflows/create-agent/steps/step-05-name.md +2 -2
  110. package/src/modules/bmb/workflows/create-agent/steps/step-06-build.md +3 -3
  111. package/src/modules/bmb/workflows/create-agent/steps/step-07-validate.md +3 -3
  112. package/src/modules/bmb/workflows/create-agent/steps/step-08-setup.md +2 -2
  113. package/src/modules/bmb/workflows/create-agent/steps/step-09-customize.md +3 -3
  114. package/src/modules/bmb/workflows/create-agent/steps/step-10-build-tools.md +2 -2
  115. package/src/modules/bmb/workflows/create-agent/steps/step-11-celebrate.md +2 -2
  116. package/src/modules/bmb/workflows/create-agent/workflow.md +11 -11
  117. package/src/modules/bmb/workflows/create-module/steps/step-01-init.md +155 -0
  118. package/src/modules/bmb/workflows/create-module/steps/step-01b-continue.md +169 -0
  119. package/src/modules/bmb/workflows/create-module/steps/step-02-concept.md +217 -0
  120. package/src/modules/bmb/workflows/create-module/steps/step-03-components.md +267 -0
  121. package/src/modules/bmb/workflows/create-module/steps/step-04-structure.md +228 -0
  122. package/src/modules/bmb/workflows/create-module/steps/step-05-config.md +233 -0
  123. package/src/modules/bmb/workflows/create-module/steps/step-06-agents.md +296 -0
  124. package/src/modules/bmb/workflows/create-module/steps/step-07-workflows.md +228 -0
  125. package/src/modules/bmb/workflows/create-module/steps/step-08-installer.md +186 -0
  126. package/src/modules/bmb/workflows/create-module/steps/step-09-documentation.md +309 -0
  127. package/src/modules/bmb/workflows/create-module/steps/step-10-roadmap.md +337 -0
  128. package/src/modules/bmb/workflows/create-module/steps/step-11-validate.md +335 -0
  129. package/src/modules/bmb/workflows/create-module/templates/agent.template.md +317 -0
  130. package/src/modules/bmb/workflows/create-module/templates/installer.template.js +47 -0
  131. package/src/modules/bmb/workflows/create-module/templates/module-plan.template.md +5 -0
  132. package/src/modules/bmb/workflows/create-module/templates/module.template.yaml +53 -0
  133. package/src/modules/bmb/workflows/create-module/templates/workflow-plan-template.md +23 -0
  134. package/src/modules/bmb/workflows/create-module/validation.md +126 -0
  135. package/src/modules/bmb/workflows/create-module/workflow.md +55 -0
  136. package/src/modules/bmb/workflows/create-workflow/steps/step-01-init.md +45 -56
  137. package/src/modules/bmb/workflows/create-workflow/steps/step-02-gather.md +9 -31
  138. package/src/modules/bmb/workflows/create-workflow/steps/step-03-tools-configuration.md +250 -0
  139. package/src/modules/bmb/workflows/create-workflow/steps/step-04-plan-review.md +216 -0
  140. package/src/modules/bmb/workflows/create-workflow/steps/step-05-output-format-design.md +289 -0
  141. package/src/modules/bmb/workflows/create-workflow/steps/{step-09-design.md → step-06-design.md} +76 -44
  142. package/src/modules/bmb/workflows/create-workflow/steps/{step-11-build.md → step-07-build.md} +71 -25
  143. package/src/modules/bmb/workflows/create-workflow/steps/{step-12-review.md → step-08-review.md} +30 -16
  144. package/src/modules/bmb/workflows/create-workflow/steps/step-09-complete.md +187 -0
  145. package/src/modules/bmb/workflows/create-workflow/workflow.md +2 -2
  146. package/src/modules/bmb/workflows/edit-agent/steps/step-01-discover-intent.md +2 -2
  147. package/src/modules/bmb/workflows/edit-agent/steps/step-02-analyze-agent.md +14 -14
  148. package/src/modules/bmb/workflows/edit-agent/steps/step-03-propose-changes.md +4 -4
  149. package/src/modules/bmb/workflows/edit-agent/steps/step-04-apply-changes.md +2 -2
  150. package/src/modules/bmb/workflows/edit-agent/steps/step-05-validate.md +4 -4
  151. package/src/modules/bmb/workflows/edit-agent/workflow.md +1 -1
  152. package/src/modules/bmb/workflows/edit-workflow/steps/step-01-analyze.md +2 -6
  153. package/src/modules/bmb/workflows/edit-workflow/steps/step-03-improve.md +2 -2
  154. package/src/modules/bmb/workflows/edit-workflow/steps/step-04-validate.md +1 -1
  155. package/src/modules/bmb/workflows/edit-workflow/workflow.md +1 -1
  156. package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-01-validate-goal.md +2 -2
  157. package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-02-workflow-validation.md +5 -5
  158. package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-03-step-validation.md +7 -7
  159. package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-04-file-validation.md +3 -3
  160. package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-05-intent-spectrum-validation.md +3 -3
  161. package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-06-web-subprocess-validation.md +3 -3
  162. package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-07-holistic-analysis.md +3 -3
  163. package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-08-generate-report.md +2 -2
  164. package/src/modules/bmb/workflows/workflow-compliance-check/workflow.md +1 -1
  165. package/src/modules/bmb/workflows-legacy/edit-module/checklist.md +0 -1
  166. package/src/modules/bmgd/README.md +2 -1
  167. package/src/modules/bmgd/workflows/3-technical/game-architecture/instructions.md +8 -8
  168. package/src/modules/bmm/_module-installer/installer.js +1 -1
  169. package/src/modules/bmm/_module-installer/platform-specifics/claude-code.js +1 -1
  170. package/src/modules/bmm/_module-installer/platform-specifics/windsurf.js +1 -1
  171. package/src/modules/bmm/agents/analyst.agent.yaml +11 -8
  172. package/src/modules/bmm/agents/architect.agent.yaml +1 -5
  173. package/src/modules/bmm/agents/pm.agent.yaml +5 -5
  174. package/src/modules/bmm/docs/README.md +23 -1
  175. package/src/modules/bmm/docs/agents-guide.md +16 -35
  176. package/src/modules/bmm/docs/brownfield-guide.md +17 -30
  177. package/src/modules/bmm/docs/enterprise-agentic-development.md +2 -2
  178. package/src/modules/bmm/docs/faq.md +6 -39
  179. package/src/modules/bmm/docs/glossary.md +11 -24
  180. package/src/modules/bmm/docs/images/README.md +37 -0
  181. package/src/modules/bmm/docs/images/workflow-method-greenfield.excalidraw +62 -202
  182. package/src/modules/bmm/docs/images/workflow-method-greenfield.svg +3 -1
  183. package/src/modules/bmm/docs/quick-spec-flow.md +652 -0
  184. package/src/modules/bmm/docs/quick-start.md +9 -25
  185. package/src/modules/bmm/docs/test-architecture.md +6 -6
  186. package/src/modules/bmm/docs/troubleshooting.md +680 -0
  187. package/src/modules/bmm/docs/workflow-document-project-reference.md +1 -1
  188. package/src/modules/bmm/docs/workflows-implementation.md +143 -3
  189. package/src/modules/bmm/docs/workflows-solutioning.md +2 -2
  190. package/src/modules/bmm/{_module-installer/install-config.yaml → module.yaml} +1 -1
  191. package/src/modules/bmm/tasks/daily-standup.xml +85 -0
  192. package/src/modules/bmm/testarch/knowledge/ci-burn-in.md +1 -1
  193. package/src/modules/bmm/testarch/knowledge/overview.md +1 -1
  194. package/src/modules/bmm/workflows/1-analysis/product-brief/steps/step-02-vision.md +2 -2
  195. package/src/modules/bmm/workflows/1-analysis/product-brief/steps/step-03-users.md +2 -2
  196. package/src/modules/bmm/workflows/1-analysis/product-brief/steps/step-04-metrics.md +2 -2
  197. package/src/modules/bmm/workflows/1-analysis/product-brief/steps/step-05-scope.md +2 -2
  198. package/src/modules/bmm/workflows/1-analysis/product-brief/workflow.md +1 -1
  199. package/src/modules/bmm/workflows/1-analysis/research/domain-steps/step-01-init.md +8 -8
  200. package/src/modules/bmm/workflows/1-analysis/research/domain-steps/step-02-domain-analysis.md +18 -18
  201. package/src/modules/bmm/workflows/1-analysis/research/domain-steps/step-03-competitive-landscape.md +18 -18
  202. package/src/modules/bmm/workflows/1-analysis/research/domain-steps/step-04-regulatory-focus.md +18 -18
  203. package/src/modules/bmm/workflows/1-analysis/research/domain-steps/step-05-technical-trends.md +17 -17
  204. package/src/modules/bmm/workflows/1-analysis/research/domain-steps/step-06-research-synthesis.md +35 -36
  205. package/src/modules/bmm/workflows/1-analysis/research/market-steps/step-01-init.md +5 -6
  206. package/src/modules/bmm/workflows/1-analysis/research/market-steps/step-02-customer-behavior.md +20 -19
  207. package/src/modules/bmm/workflows/1-analysis/research/market-steps/step-02-customer-insights.md +21 -20
  208. package/src/modules/bmm/workflows/1-analysis/research/market-steps/step-03-customer-pain-points.md +20 -19
  209. package/src/modules/bmm/workflows/1-analysis/research/market-steps/step-04-customer-decisions.md +21 -20
  210. package/src/modules/bmm/workflows/1-analysis/research/market-steps/step-05-competitive-analysis.md +16 -15
  211. package/src/modules/bmm/workflows/1-analysis/research/market-steps/step-06-research-completion.md +36 -37
  212. package/src/modules/bmm/workflows/1-analysis/research/research.template.md +0 -1
  213. package/src/modules/bmm/workflows/1-analysis/research/technical-steps/step-01-init.md +8 -8
  214. package/src/modules/bmm/workflows/1-analysis/research/technical-steps/step-02-technical-overview.md +19 -18
  215. package/src/modules/bmm/workflows/1-analysis/research/technical-steps/step-03-integration-patterns.md +20 -19
  216. package/src/modules/bmm/workflows/1-analysis/research/technical-steps/step-04-architectural-patterns.md +21 -20
  217. package/src/modules/bmm/workflows/1-analysis/research/technical-steps/step-05-implementation-research.md +19 -18
  218. package/src/modules/bmm/workflows/1-analysis/research/technical-steps/step-06-research-synthesis.md +38 -39
  219. package/src/modules/bmm/workflows/1-analysis/research/workflow.md +14 -8
  220. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/workflow.md +6 -0
  221. package/src/modules/bmm/workflows/2-plan-workflows/prd/prd-template.md +7 -0
  222. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-01-init.md +138 -56
  223. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-01b-continue.md +93 -51
  224. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-02-discovery.md +223 -78
  225. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-03-success.md +20 -2
  226. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-04-journeys.md +18 -0
  227. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-05-domain.md +21 -0
  228. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-06-innovation.md +21 -0
  229. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-07-project-type.md +21 -0
  230. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-08-scoping.md +18 -0
  231. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-09-functional.md +18 -0
  232. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-10-nonfunctional.md +18 -0
  233. package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-11-complete.md +13 -0
  234. package/src/modules/bmm/workflows/2-plan-workflows/prd/workflow.md +2 -2
  235. package/src/modules/bmm/workflows/3-solutioning/architecture/steps/step-03-starter.md +14 -14
  236. package/src/modules/bmm/workflows/3-solutioning/architecture/steps/step-04-decisions.md +7 -7
  237. package/src/modules/bmm/workflows/3-solutioning/architecture/workflow.md +2 -1
  238. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-01-validate-prerequisites.md +258 -0
  239. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-02-design-epics.md +232 -0
  240. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-03-create-stories.md +271 -0
  241. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-04-final-validation.md +144 -0
  242. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/templates/epics-template.md +57 -0
  243. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/workflow.md +58 -0
  244. package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/steps/step-01-document-discovery.md +189 -0
  245. package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/steps/step-02-prd-analysis.md +177 -0
  246. package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/steps/step-03-epic-coverage-validation.md +178 -0
  247. package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/steps/step-04-ux-alignment.md +138 -0
  248. package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/steps/step-05-epic-quality-review.md +251 -0
  249. package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/steps/step-06-final-assessment.md +132 -0
  250. package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/templates/readiness-report-template.md +4 -0
  251. package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/workflow.md +54 -0
  252. package/src/modules/{bmgd/workflows/4-production → bmm/workflows/4-implementation}/code-review/checklist.md +2 -1
  253. package/src/modules/bmm/workflows/4-implementation/code-review/instructions.xml +51 -3
  254. package/src/modules/bmm/workflows/4-implementation/code-review/workflow.yaml +1 -1
  255. package/src/modules/bmm/workflows/4-implementation/create-story/instructions.xml +32 -2
  256. package/src/modules/bmm/workflows/4-implementation/retrospective/instructions.md +3 -3
  257. package/src/modules/bmm/workflows/4-implementation/sprint-planning/instructions.md +19 -21
  258. package/src/modules/bmm/workflows/4-implementation/sprint-planning/sprint-status-template.yaml +10 -10
  259. package/src/modules/bmm/workflows/4-implementation/sprint-status/instructions.md +174 -0
  260. package/src/modules/bmm/workflows/4-implementation/sprint-status/workflow.yaml +35 -0
  261. package/src/modules/bmm/workflows/bmad-quick-flow/quick-dev/instructions.md +104 -7
  262. package/src/modules/bmm/workflows/bmad-quick-flow/quick-dev/workflow.yaml +4 -0
  263. package/src/modules/bmm/workflows/document-project/instructions.md +1 -1
  264. package/src/modules/bmm/workflows/document-project/workflows/deep-dive-instructions.md +2 -2
  265. package/src/modules/bmm/workflows/generate-project-context/workflow.md +1 -1
  266. package/src/modules/bmm/workflows/testarch/atdd/atdd-checklist-template.md +1 -1
  267. package/src/modules/bmm/workflows/testarch/ci/checklist.md +1 -1
  268. package/src/modules/bmm/workflows/testarch/ci/github-actions-template.yaml +36 -3
  269. package/src/modules/bmm/workflows/testarch/ci/gitlab-ci-template.yaml +25 -4
  270. package/src/modules/bmm/workflows/testarch/ci/instructions.md +2 -2
  271. package/src/modules/bmm/workflows/testarch/test-review/instructions.md +1 -1
  272. package/src/modules/bmm/workflows/workflow-status/paths/enterprise-brownfield.yaml +1 -6
  273. package/src/modules/bmm/workflows/workflow-status/paths/enterprise-greenfield.yaml +1 -6
  274. package/src/modules/bmm/workflows/workflow-status/paths/method-brownfield.yaml +1 -6
  275. package/src/modules/bmm/workflows/workflow-status/paths/method-greenfield.yaml +1 -7
  276. package/src/modules/cis/_module-installer/installer.js +1 -1
  277. package/tools/cli/README.md +7 -7
  278. package/tools/cli/commands/build.js +9 -184
  279. package/tools/cli/commands/install.js +1 -6
  280. package/tools/cli/installers/lib/core/config-collector.js +80 -12
  281. package/tools/cli/installers/lib/core/custom-module-cache.js +239 -0
  282. package/tools/cli/installers/lib/core/detector.js +8 -4
  283. package/tools/cli/installers/lib/core/installer.js +933 -376
  284. package/tools/cli/installers/lib/core/manifest-generator.js +265 -41
  285. package/tools/cli/installers/lib/core/manifest.js +47 -0
  286. package/tools/cli/installers/lib/core/post-install-sidecar-replacement.js +79 -0
  287. package/tools/cli/installers/lib/custom/handler.js +396 -0
  288. package/tools/cli/installers/lib/ide/_base-ide.js +10 -0
  289. package/tools/cli/installers/lib/ide/auggie.js +19 -7
  290. package/tools/cli/installers/lib/ide/crush.js +19 -6
  291. package/tools/cli/installers/lib/ide/cursor.js +29 -13
  292. package/tools/cli/installers/lib/ide/gemini.js +49 -1
  293. package/tools/cli/installers/lib/ide/iflow.js +20 -1
  294. package/tools/cli/installers/lib/ide/kiro-cli.js +327 -0
  295. package/tools/cli/installers/lib/ide/opencode.js +3 -3
  296. package/tools/cli/installers/lib/ide/roo.js +120 -184
  297. package/tools/cli/installers/lib/ide/rovo-dev.js +1 -1
  298. package/tools/cli/installers/lib/ide/shared/agent-command-generator.js +8 -2
  299. package/tools/cli/installers/lib/ide/shared/bmad-artifacts.js +34 -19
  300. package/tools/cli/installers/lib/ide/shared/workflow-command-generator.js +18 -14
  301. package/tools/cli/installers/lib/ide/templates/agent-command-template.md +1 -1
  302. package/tools/cli/installers/lib/ide/templates/workflow-commander.md +5 -0
  303. package/tools/cli/installers/lib/modules/manager.js +535 -56
  304. package/tools/cli/lib/agent/compiler.js +57 -16
  305. package/tools/cli/lib/agent/installer.js +129 -28
  306. package/tools/cli/lib/cli-utils.js +21 -4
  307. package/tools/cli/lib/config.js +2 -1
  308. package/tools/cli/lib/ui.js +561 -12
  309. package/tools/cli/lib/yaml-xml-builder.js +0 -15
  310. package/tools/maintainer/review-pr-README.md +55 -0
  311. package/tools/maintainer/review-pr.md +242 -0
  312. package/tools/migrate-custom-module-paths.js +124 -0
  313. package/tools/schema/agent.js +149 -89
  314. package/tools/validate-svg-changes.sh +356 -0
  315. package/custom/src/agents/commit-poet/installation-guide.md +0 -36
  316. package/custom/src/agents/toolsmith/installation-guide.md +0 -36
  317. package/docs/custom-agent-installation.md +0 -183
  318. package/src/modules/bmb/docs/workflows/workflow-template.md +0 -152
  319. package/src/modules/bmb/workflows/create-workflow/steps/step-03-tools-overview.md +0 -127
  320. package/src/modules/bmb/workflows/create-workflow/steps/step-04-core-tools.md +0 -145
  321. package/src/modules/bmb/workflows/create-workflow/steps/step-05-memory-requirements.md +0 -136
  322. package/src/modules/bmb/workflows/create-workflow/steps/step-06-external-tools.md +0 -154
  323. package/src/modules/bmb/workflows/create-workflow/steps/step-07-installation-guidance.md +0 -159
  324. package/src/modules/bmb/workflows/create-workflow/steps/step-08-tools-summary.md +0 -167
  325. package/src/modules/bmb/workflows/create-workflow/steps/step-10-plan-review.md +0 -215
  326. package/src/modules/bmb/workflows/create-workflow/templates/build-summary.md +0 -36
  327. package/src/modules/bmb/workflows/create-workflow/templates/completion-section.md +0 -39
  328. package/src/modules/bmb/workflows/create-workflow/templates/content-template.md +0 -21
  329. package/src/modules/bmb/workflows/create-workflow/templates/design-section.md +0 -53
  330. package/src/modules/bmb/workflows/create-workflow/templates/project-info.md +0 -18
  331. package/src/modules/bmb/workflows/create-workflow/templates/requirements-section.md +0 -47
  332. package/src/modules/bmb/workflows/create-workflow/templates/review-section.md +0 -56
  333. package/src/modules/bmb/workflows/create-workflow/templates/workflow-plan.md +0 -54
  334. package/src/modules/bmb/workflows-legacy/create-module/README.md +0 -229
  335. package/src/modules/bmb/workflows-legacy/create-module/brainstorm-context.md +0 -137
  336. package/src/modules/bmb/workflows-legacy/create-module/checklist.md +0 -235
  337. package/src/modules/bmb/workflows-legacy/create-module/installer-templates/install-config.yaml +0 -92
  338. package/src/modules/bmb/workflows-legacy/create-module/installer-templates/installer.js +0 -231
  339. package/src/modules/bmb/workflows-legacy/create-module/instructions.md +0 -577
  340. package/src/modules/bmb/workflows-legacy/create-module/module-structure.md +0 -400
  341. package/src/modules/bmb/workflows-legacy/create-module/workflow.yaml +0 -52
  342. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/epics-template.md +0 -80
  343. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/instructions.md +0 -387
  344. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/workflow.yaml +0 -53
  345. package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/checklist.md +0 -169
  346. package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/instructions.md +0 -332
  347. package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/template.md +0 -146
  348. package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/workflow.yaml +0 -64
  349. package/tools/cli/commands/agent-install.js +0 -409
  350. package/tools/cli/commands/cleanup.js +0 -141
  351. /package/{custom/src → example-custom-content}/agents/toolsmith/toolsmith-sidecar/knowledge/bundlers.md +0 -0
  352. /package/{custom/src → example-custom-content}/agents/toolsmith/toolsmith-sidecar/knowledge/deploy.md +0 -0
  353. /package/{custom/src → example-custom-content}/agents/toolsmith/toolsmith-sidecar/knowledge/tests.md +0 -0
  354. /package/src/modules/bmgd/{_module-installer/install-config.yaml → module.yaml} +0 -0
  355. /package/src/modules/cis/{_module-installer/install-config.yaml → module.yaml} +0 -0
@@ -4,6 +4,7 @@ const yaml = require('js-yaml');
4
4
  const { BaseIdeSetup } = require('./_base-ide');
5
5
  const chalk = require('chalk');
6
6
  const { AgentCommandGenerator } = require('./shared/agent-command-generator');
7
+ const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator');
7
8
 
8
9
  /**
9
10
  * Gemini CLI setup handler
@@ -68,9 +69,13 @@ class GeminiSetup extends BaseIdeSetup {
68
69
  const agentGen = new AgentCommandGenerator(this.bmadFolderName);
69
70
  const { artifacts: agentArtifacts } = await agentGen.collectAgentArtifacts(bmadDir, options.selectedModules || []);
70
71
 
71
- // Get tasks
72
+ // Get tasks and workflows (ALL workflows now generate commands)
72
73
  const tasks = await this.getTasks(bmadDir);
73
74
 
75
+ // Get ALL workflows using the new workflow command generator
76
+ const workflowGenerator = new WorkflowCommandGenerator(this.bmadFolderName);
77
+ const { artifacts: workflowArtifacts, counts: workflowCounts } = await workflowGenerator.collectWorkflowArtifacts(bmadDir);
78
+
74
79
  // Install agents as TOML files with bmad- prefix (flat structure)
75
80
  let agentCount = 0;
76
81
  for (const artifact of agentArtifacts) {
@@ -98,17 +103,37 @@ class GeminiSetup extends BaseIdeSetup {
98
103
  console.log(chalk.green(` ✓ Added task: /bmad:tasks:${task.module}:${task.name}`));
99
104
  }
100
105
 
106
+ // Install workflows as TOML files with bmad- prefix (flat structure)
107
+ let workflowCount = 0;
108
+ for (const artifact of workflowArtifacts) {
109
+ if (artifact.type === 'workflow-command') {
110
+ // Create TOML wrapper around workflow command content
111
+ const tomlContent = await this.createWorkflowToml(artifact);
112
+
113
+ // Flat structure: bmad-workflow-{module}-{name}.toml
114
+ const workflowName = path.basename(artifact.relativePath, '.md');
115
+ const tomlPath = path.join(commandsDir, `bmad-workflow-${artifact.module}-${workflowName}.toml`);
116
+ await this.writeFile(tomlPath, tomlContent);
117
+ workflowCount++;
118
+
119
+ console.log(chalk.green(` ✓ Added workflow: /bmad:workflows:${artifact.module}:${workflowName}`));
120
+ }
121
+ }
122
+
101
123
  console.log(chalk.green(`✓ ${this.name} configured:`));
102
124
  console.log(chalk.dim(` - ${agentCount} agents configured`));
103
125
  console.log(chalk.dim(` - ${taskCount} tasks configured`));
126
+ console.log(chalk.dim(` - ${workflowCount} workflows configured`));
104
127
  console.log(chalk.dim(` - Commands directory: ${path.relative(projectDir, commandsDir)}`));
105
128
  console.log(chalk.dim(` - Agent activation: /bmad:agents:{agent-name}`));
106
129
  console.log(chalk.dim(` - Task activation: /bmad:tasks:{task-name}`));
130
+ console.log(chalk.dim(` - Workflow activation: /bmad:workflows:{workflow-name}`));
107
131
 
108
132
  return {
109
133
  success: true,
110
134
  agents: agentCount,
111
135
  tasks: taskCount,
136
+ workflows: workflowCount,
112
137
  };
113
138
  }
114
139
 
@@ -149,6 +174,7 @@ ${contentWithoutFrontmatter}
149
174
  // Note: {user_name} and other {config_values} are left as-is for runtime substitution by Gemini
150
175
  const tomlContent = template
151
176
  .replaceAll('{{title}}', title)
177
+ .replaceAll('{{*bmad_folder*}}', '{bmad_folder}')
152
178
  .replaceAll('{{bmad_folder}}', this.bmadFolderName)
153
179
  .replaceAll('{{module}}', agent.module)
154
180
  .replaceAll('{{name}}', agent.name);
@@ -170,6 +196,7 @@ ${contentWithoutFrontmatter}
170
196
  // Replace template variables
171
197
  const tomlContent = template
172
198
  .replaceAll('{{taskName}}', taskName)
199
+ .replaceAll('{{*bmad_folder*}}', '{bmad_folder}')
173
200
  .replaceAll('{{bmad_folder}}', this.bmadFolderName)
174
201
  .replaceAll('{{module}}', task.module)
175
202
  .replaceAll('{{filename}}', task.filename);
@@ -177,6 +204,27 @@ ${contentWithoutFrontmatter}
177
204
  return tomlContent;
178
205
  }
179
206
 
207
+ /**
208
+ * Create workflow TOML content from artifact
209
+ */
210
+ async createWorkflowToml(artifact) {
211
+ // Extract description from artifact content
212
+ const descriptionMatch = artifact.content.match(/description:\s*"([^"]+)"/);
213
+ const description = descriptionMatch
214
+ ? descriptionMatch[1]
215
+ : `BMAD ${artifact.module.toUpperCase()} Workflow: ${path.basename(artifact.relativePath, '.md')}`;
216
+
217
+ // Strip frontmatter from command content
218
+ const frontmatterRegex = /^---\s*\n[\s\S]*?\n---\s*\n/;
219
+ const contentWithoutFrontmatter = artifact.content.replace(frontmatterRegex, '').trim();
220
+
221
+ return `description = "${description}"
222
+ prompt = """
223
+ ${contentWithoutFrontmatter}
224
+ """
225
+ `;
226
+ }
227
+
180
228
  /**
181
229
  * Cleanup Gemini configuration - surgically remove only BMAD files
182
230
  */
@@ -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
  * iFlow CLI setup handler
@@ -29,9 +30,11 @@ class IFlowSetup extends BaseIdeSetup {
29
30
  const commandsDir = path.join(iflowDir, this.commandsDir, 'bmad');
30
31
  const agentsDir = path.join(commandsDir, 'agents');
31
32
  const tasksDir = path.join(commandsDir, 'tasks');
33
+ const workflowsDir = path.join(commandsDir, 'workflows');
32
34
 
33
35
  await this.ensureDir(agentsDir);
34
36
  await this.ensureDir(tasksDir);
37
+ await this.ensureDir(workflowsDir);
35
38
 
36
39
  // Generate agent launchers
37
40
  const agentGen = new AgentCommandGenerator(this.bmadFolderName);
@@ -47,9 +50,13 @@ class IFlowSetup extends BaseIdeSetup {
47
50
  agentCount++;
48
51
  }
49
52
 
50
- // Get tasks
53
+ // Get tasks and workflows (ALL workflows now generate commands)
51
54
  const tasks = await this.getTasks(bmadDir);
52
55
 
56
+ // Get ALL workflows using the new workflow command generator
57
+ const workflowGenerator = new WorkflowCommandGenerator(this.bmadFolderName);
58
+ const { artifacts: workflowArtifacts, counts: workflowCounts } = await workflowGenerator.collectWorkflowArtifacts(bmadDir);
59
+
53
60
  // Setup tasks as commands
54
61
  let taskCount = 0;
55
62
  for (const task of tasks) {
@@ -61,15 +68,27 @@ class IFlowSetup extends BaseIdeSetup {
61
68
  taskCount++;
62
69
  }
63
70
 
71
+ // Setup workflows as commands (already generated)
72
+ let workflowCount = 0;
73
+ for (const artifact of workflowArtifacts) {
74
+ if (artifact.type === 'workflow-command') {
75
+ const targetPath = path.join(workflowsDir, `${artifact.module}-${path.basename(artifact.relativePath, '.md')}.md`);
76
+ await this.writeFile(targetPath, artifact.content);
77
+ workflowCount++;
78
+ }
79
+ }
80
+
64
81
  console.log(chalk.green(`✓ ${this.name} configured:`));
65
82
  console.log(chalk.dim(` - ${agentCount} agent commands created`));
66
83
  console.log(chalk.dim(` - ${taskCount} task commands created`));
84
+ console.log(chalk.dim(` - ${workflowCount} workflow commands created`));
67
85
  console.log(chalk.dim(` - Commands directory: ${path.relative(projectDir, commandsDir)}`));
68
86
 
69
87
  return {
70
88
  success: true,
71
89
  agents: agentCount,
72
90
  tasks: taskCount,
91
+ workflows: workflowCount,
73
92
  };
74
93
  }
75
94
 
@@ -0,0 +1,327 @@
1
+ const path = require('node:path');
2
+ const { BaseIdeSetup } = require('./_base-ide');
3
+ const chalk = require('chalk');
4
+ const fs = require('fs-extra');
5
+ const yaml = require('js-yaml');
6
+
7
+ /**
8
+ * Kiro CLI setup handler for BMad Method
9
+ */
10
+ class KiroCliSetup extends BaseIdeSetup {
11
+ constructor() {
12
+ super('kiro-cli', 'Kiro CLI', false);
13
+ this.configDir = '.kiro';
14
+ this.agentsDir = 'agents';
15
+ }
16
+
17
+ /**
18
+ * Cleanup old BMAD installation before reinstalling
19
+ * @param {string} projectDir - Project directory
20
+ */
21
+ async cleanup(projectDir) {
22
+ const bmadAgentsDir = path.join(projectDir, this.configDir, this.agentsDir);
23
+
24
+ if (await fs.pathExists(bmadAgentsDir)) {
25
+ // Remove existing BMad agents
26
+ const files = await fs.readdir(bmadAgentsDir);
27
+ for (const file of files) {
28
+ if (file.startsWith('bmad-') || file.includes('bmad')) {
29
+ await fs.remove(path.join(bmadAgentsDir, file));
30
+ }
31
+ }
32
+ console.log(chalk.dim(` Cleaned old BMAD agents from ${this.name}`));
33
+ }
34
+ }
35
+
36
+ /**
37
+ * Setup Kiro CLI configuration with BMad agents
38
+ * @param {string} projectDir - Project directory
39
+ * @param {string} bmadDir - BMAD installation directory
40
+ * @param {Object} options - Setup options
41
+ */
42
+ async setup(projectDir, bmadDir, options = {}) {
43
+ console.log(chalk.cyan(`Setting up ${this.name}...`));
44
+
45
+ await this.cleanup(projectDir);
46
+
47
+ const kiroDir = path.join(projectDir, this.configDir);
48
+ const agentsDir = path.join(kiroDir, this.agentsDir);
49
+
50
+ await this.ensureDir(agentsDir);
51
+
52
+ // Create BMad agents from source YAML files
53
+ await this.createBmadAgentsFromSource(agentsDir, projectDir);
54
+
55
+ console.log(chalk.green(`✓ ${this.name} configured with BMad agents`));
56
+ }
57
+
58
+ /**
59
+ * Create BMad agent definitions from source YAML files
60
+ * @param {string} agentsDir - Agents directory
61
+ * @param {string} projectDir - Project directory
62
+ */
63
+ async createBmadAgentsFromSource(agentsDir, projectDir) {
64
+ const sourceDir = path.join(__dirname, '../../../../../src/modules');
65
+
66
+ // Find all agent YAML files
67
+ const agentFiles = await this.findAgentFiles(sourceDir);
68
+
69
+ for (const agentFile of agentFiles) {
70
+ try {
71
+ await this.processAgentFile(agentFile, agentsDir, projectDir);
72
+ } catch (error) {
73
+ console.warn(chalk.yellow(`⚠️ Failed to process ${agentFile}: ${error.message}`));
74
+ }
75
+ }
76
+ }
77
+
78
+ /**
79
+ * Find all agent YAML files in modules and core
80
+ * @param {string} sourceDir - Source modules directory
81
+ * @returns {Array} Array of agent file paths
82
+ */
83
+ async findAgentFiles(sourceDir) {
84
+ const agentFiles = [];
85
+
86
+ // Check core agents
87
+ const coreAgentsDir = path.join(__dirname, '../../../../../src/core/agents');
88
+ if (await fs.pathExists(coreAgentsDir)) {
89
+ const files = await fs.readdir(coreAgentsDir);
90
+
91
+ for (const file of files) {
92
+ if (file.endsWith('.agent.yaml')) {
93
+ agentFiles.push(path.join(coreAgentsDir, file));
94
+ }
95
+ }
96
+ }
97
+
98
+ // Check module agents
99
+ if (!(await fs.pathExists(sourceDir))) {
100
+ return agentFiles;
101
+ }
102
+
103
+ const modules = await fs.readdir(sourceDir);
104
+
105
+ for (const module of modules) {
106
+ const moduleAgentsDir = path.join(sourceDir, module, 'agents');
107
+
108
+ if (await fs.pathExists(moduleAgentsDir)) {
109
+ const files = await fs.readdir(moduleAgentsDir);
110
+
111
+ for (const file of files) {
112
+ if (file.endsWith('.agent.yaml')) {
113
+ agentFiles.push(path.join(moduleAgentsDir, file));
114
+ }
115
+ }
116
+ }
117
+ }
118
+
119
+ return agentFiles;
120
+ }
121
+
122
+ /**
123
+ * Validate BMad Core compliance
124
+ * @param {Object} agentData - Agent YAML data
125
+ * @returns {boolean} True if compliant
126
+ */
127
+ validateBmadCompliance(agentData) {
128
+ const requiredFields = ['agent.metadata.id', 'agent.persona.role', 'agent.persona.principles'];
129
+
130
+ for (const field of requiredFields) {
131
+ const keys = field.split('.');
132
+ let current = agentData;
133
+
134
+ for (const key of keys) {
135
+ if (!current || !current[key]) {
136
+ return false;
137
+ }
138
+ current = current[key];
139
+ }
140
+ }
141
+
142
+ return true;
143
+ }
144
+
145
+ /**
146
+ * Process individual agent YAML file
147
+ * @param {string} agentFile - Path to agent YAML file
148
+ * @param {string} agentsDir - Target agents directory
149
+ * @param {string} projectDir - Project directory
150
+ */
151
+ async processAgentFile(agentFile, agentsDir, projectDir) {
152
+ const yamlContent = await fs.readFile(agentFile, 'utf8');
153
+ const agentData = yaml.load(yamlContent);
154
+
155
+ if (!this.validateBmadCompliance(agentData)) {
156
+ return;
157
+ }
158
+
159
+ // Extract module from file path
160
+ const normalizedPath = path.normalize(agentFile);
161
+ const pathParts = normalizedPath.split(path.sep);
162
+ const basename = path.basename(agentFile, '.agent.yaml');
163
+
164
+ // Find the module name from path
165
+ let moduleName = 'unknown';
166
+ if (pathParts.includes('src')) {
167
+ const srcIndex = pathParts.indexOf('src');
168
+ if (srcIndex + 3 < pathParts.length) {
169
+ const folderAfterSrc = pathParts[srcIndex + 1];
170
+ // Handle both src/core/agents and src/modules/[module]/agents patterns
171
+ if (folderAfterSrc === 'core') {
172
+ moduleName = 'core';
173
+ } else if (folderAfterSrc === 'modules') {
174
+ moduleName = pathParts[srcIndex + 2]; // The actual module name
175
+ }
176
+ }
177
+ }
178
+
179
+ // Extract the agent name from the ID path in YAML if available
180
+ let agentBaseName = basename;
181
+ if (agentData.agent && agentData.agent.metadata && agentData.agent.metadata.id) {
182
+ const idPath = agentData.agent.metadata.id;
183
+ agentBaseName = path.basename(idPath, '.md');
184
+ }
185
+
186
+ const agentName = `bmad-${moduleName}-${agentBaseName}`;
187
+ const sanitizedAgentName = this.sanitizeAgentName(agentName);
188
+
189
+ // Create JSON definition
190
+ await this.createAgentDefinitionFromYaml(agentsDir, sanitizedAgentName, agentData);
191
+
192
+ // Create prompt file
193
+ await this.createAgentPromptFromYaml(agentsDir, sanitizedAgentName, agentData, projectDir);
194
+ }
195
+
196
+ /**
197
+ * Sanitize agent name for file naming
198
+ * @param {string} name - Agent name
199
+ * @returns {string} Sanitized name
200
+ */
201
+ sanitizeAgentName(name) {
202
+ return name
203
+ .toLowerCase()
204
+ .replaceAll(/\s+/g, '-')
205
+ .replaceAll(/[^a-z0-9-]/g, '');
206
+ }
207
+
208
+ /**
209
+ * Create agent JSON definition from YAML data
210
+ * @param {string} agentsDir - Agents directory
211
+ * @param {string} agentName - Agent name (role-based)
212
+ * @param {Object} agentData - Agent YAML data
213
+ */
214
+ async createAgentDefinitionFromYaml(agentsDir, agentName, agentData) {
215
+ const personName = agentData.agent.metadata.name;
216
+ const role = agentData.agent.persona.role;
217
+
218
+ const agentConfig = {
219
+ name: agentName,
220
+ description: `${personName} - ${role}`,
221
+ prompt: `file://./${agentName}-prompt.md`,
222
+ tools: ['*'],
223
+ mcpServers: {},
224
+ useLegacyMcpJson: true,
225
+ resources: [],
226
+ };
227
+
228
+ const agentPath = path.join(agentsDir, `${agentName}.json`);
229
+ await fs.writeJson(agentPath, agentConfig, { spaces: 2 });
230
+ }
231
+
232
+ /**
233
+ * Create agent prompt from YAML data
234
+ * @param {string} agentsDir - Agents directory
235
+ * @param {string} agentName - Agent name (role-based)
236
+ * @param {Object} agentData - Agent YAML data
237
+ * @param {string} projectDir - Project directory
238
+ */
239
+ async createAgentPromptFromYaml(agentsDir, agentName, agentData, projectDir) {
240
+ const promptPath = path.join(agentsDir, `${agentName}-prompt.md`);
241
+
242
+ // Generate prompt from YAML data
243
+ const prompt = this.generatePromptFromYaml(agentData);
244
+ await fs.writeFile(promptPath, prompt);
245
+ }
246
+
247
+ /**
248
+ * Generate prompt content from YAML data
249
+ * @param {Object} agentData - Agent YAML data
250
+ * @returns {string} Generated prompt
251
+ */
252
+ generatePromptFromYaml(agentData) {
253
+ const agent = agentData.agent;
254
+ const name = agent.metadata.name;
255
+ const icon = agent.metadata.icon || '🤖';
256
+ const role = agent.persona.role;
257
+ const identity = agent.persona.identity;
258
+ const style = agent.persona.communication_style;
259
+ const principles = agent.persona.principles;
260
+
261
+ let prompt = `# ${name} ${icon}\n\n`;
262
+ prompt += `## Role\n${role}\n\n`;
263
+
264
+ if (identity) {
265
+ prompt += `## Identity\n${identity}\n\n`;
266
+ }
267
+
268
+ if (style) {
269
+ prompt += `## Communication Style\n${style}\n\n`;
270
+ }
271
+
272
+ if (principles) {
273
+ prompt += `## Principles\n`;
274
+ if (typeof principles === 'string') {
275
+ // Handle multi-line string principles
276
+ prompt += principles + '\n\n';
277
+ } else if (Array.isArray(principles)) {
278
+ // Handle array principles
279
+ for (const principle of principles) {
280
+ prompt += `- ${principle}\n`;
281
+ }
282
+ prompt += '\n';
283
+ }
284
+ }
285
+
286
+ // Add menu items if available
287
+ if (agent.menu && agent.menu.length > 0) {
288
+ prompt += `## Available Workflows\n`;
289
+ for (let i = 0; i < agent.menu.length; i++) {
290
+ const item = agent.menu[i];
291
+ prompt += `${i + 1}. **${item.trigger}**: ${item.description}\n`;
292
+ }
293
+ prompt += '\n';
294
+ }
295
+
296
+ prompt += `## Instructions\nYou are ${name}, part of the BMad Method. Follow your role and principles while assisting users with their development needs.\n`;
297
+
298
+ return prompt;
299
+ }
300
+
301
+ /**
302
+ * Check if Kiro CLI is available
303
+ * @returns {Promise<boolean>} True if available
304
+ */
305
+ async isAvailable() {
306
+ try {
307
+ const { execSync } = require('node:child_process');
308
+ execSync('kiro-cli --version', { stdio: 'ignore' });
309
+ return true;
310
+ } catch {
311
+ return false;
312
+ }
313
+ }
314
+
315
+ /**
316
+ * Get installation instructions
317
+ * @returns {string} Installation instructions
318
+ */
319
+ getInstallInstructions() {
320
+ return `Install Kiro CLI:
321
+ curl -fsSL https://github.com/aws/kiro-cli/releases/latest/download/install.sh | bash
322
+
323
+ Or visit: https://github.com/aws/kiro-cli`;
324
+ }
325
+ }
326
+
327
+ module.exports = { KiroCliSetup };
@@ -47,7 +47,7 @@ class OpenCodeSetup extends BaseIdeSetup {
47
47
  agentCount++;
48
48
  }
49
49
 
50
- // Install workflow commands with flat naming: bmad-workflow-{module}-{name}.md
50
+ // Install workflow commands with flat naming: bmad-{module}-{workflow-name}
51
51
  const workflowGenerator = new WorkflowCommandGenerator(this.bmadFolderName);
52
52
  const { artifacts: workflowArtifacts, counts: workflowCounts } = await workflowGenerator.collectWorkflowArtifacts(bmadDir);
53
53
 
@@ -55,10 +55,10 @@ class OpenCodeSetup extends BaseIdeSetup {
55
55
  for (const artifact of workflowArtifacts) {
56
56
  if (artifact.type === 'workflow-command') {
57
57
  const commandContent = artifact.content;
58
- // Flat structure: bmad-workflow-{module}-{name}.md
58
+ // Flat structure: bmad-{module}-{workflow-name}.md
59
59
  // artifact.relativePath is like: bmm/workflows/plan-project.md
60
60
  const workflowName = path.basename(artifact.relativePath, '.md');
61
- const targetPath = path.join(commandsBaseDir, `bmad-workflow-${artifact.module}-${workflowName}.md`);
61
+ const targetPath = path.join(commandsBaseDir, `bmad-${artifact.module}-${workflowName}.md`);
62
62
  await this.writeFile(targetPath, commandContent);
63
63
  workflowCommandCount++;
64
64
  }