bmad-method 6.0.0-alpha.1 → 6.0.0-alpha.11

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 (714) hide show
  1. package/.github/ISSUE_TEMPLATE/idea_submission.md +1 -1
  2. package/.github/workflows/bundle-latest.yaml +277 -0
  3. package/.github/workflows/manual-release.yaml +64 -17
  4. package/.github/workflows/{lint.yaml → quality.yaml} +19 -2
  5. package/.husky/pre-commit +4 -0
  6. package/.prettierignore +4 -0
  7. package/.vscode/settings.json +3 -1
  8. package/CHANGELOG.md +321 -12
  9. package/CONTRIBUTING.md +1 -13
  10. package/README.md +138 -187
  11. package/docs/BUNDLE_DISTRIBUTION_SETUP.md +95 -0
  12. package/docs/agent-customization-guide.md +208 -0
  13. package/docs/custom-agent-installation.md +169 -0
  14. package/docs/document-sharding-guide.md +449 -0
  15. package/docs/ide-info/crush.md +1 -1
  16. package/docs/ide-info/cursor.md +7 -7
  17. package/docs/ide-info/iflow.md +3 -3
  18. package/docs/ide-info/opencode.md +1 -1
  19. package/docs/index.md +227 -0
  20. package/docs/installers-bundlers/ide-injections.md +2 -2
  21. package/docs/installers-bundlers/installers-modules-platforms-reference.md +80 -19
  22. package/docs/v4-to-v6-upgrade.md +21 -19
  23. package/docs/v6-open-items.md +17 -0
  24. package/docs/web-bundles-gemini-gpt-guide.md +473 -0
  25. package/eslint.config.mjs +2 -0
  26. package/package.json +6 -3
  27. package/src/core/_module-installer/install-config.yaml +17 -10
  28. package/src/core/_module-installer/installer.js +0 -8
  29. package/src/core/agents/bmad-master.agent.yaml +5 -5
  30. package/src/core/agents/bmad-web-orchestrator.agent.xml +8 -17
  31. package/src/core/resources/excalidraw/README.md +160 -0
  32. package/src/core/resources/excalidraw/excalidraw-helpers.md +127 -0
  33. package/src/core/resources/excalidraw/library-loader.md +50 -0
  34. package/src/core/resources/excalidraw/validate-json-instructions.md +79 -0
  35. package/src/core/tasks/advanced-elicitation-methods.csv +21 -0
  36. package/{bmad/core/tasks/adv-elicit.xml → src/core/tasks/advanced-elicitation.xml} +6 -4
  37. package/src/core/tasks/index-docs.xml +1 -1
  38. package/src/core/tasks/validate-workflow.xml +1 -1
  39. package/src/core/tasks/workflow.xml +126 -22
  40. package/src/core/tools/shard-doc.xml +54 -45
  41. package/src/core/workflows/brainstorming/README.md +6 -16
  42. package/src/core/workflows/brainstorming/instructions.md +6 -5
  43. package/src/core/workflows/brainstorming/template.md +4 -0
  44. package/src/core/workflows/brainstorming/workflow.yaml +8 -13
  45. package/src/core/workflows/party-mode/instructions.md +2 -7
  46. package/src/core/workflows/party-mode/workflow.yaml +11 -6
  47. package/src/modules/bmb/README.md +135 -73
  48. package/src/modules/bmb/_module-installer/install-config.yaml +9 -4
  49. package/src/modules/bmb/agents/bmad-builder.agent.yaml +11 -12
  50. package/src/modules/bmb/docs/agent-compilation.md +340 -0
  51. package/src/modules/bmb/docs/agent-menu-patterns.md +524 -0
  52. package/src/modules/bmb/docs/expert-agent-architecture.md +364 -0
  53. package/src/modules/bmb/docs/index.md +55 -0
  54. package/src/modules/bmb/docs/module-agent-architecture.md +367 -0
  55. package/src/modules/bmb/docs/simple-agent-architecture.md +288 -0
  56. package/src/modules/bmb/docs/understanding-agent-types.md +184 -0
  57. package/src/modules/bmb/reference/agents/expert-examples/journal-keeper/README.md +242 -0
  58. package/src/modules/bmb/reference/agents/expert-examples/journal-keeper/journal-keeper-sidecar/breakthroughs.md +24 -0
  59. package/src/modules/bmb/reference/agents/expert-examples/journal-keeper/journal-keeper-sidecar/instructions.md +108 -0
  60. package/src/modules/bmb/reference/agents/expert-examples/journal-keeper/journal-keeper-sidecar/memories.md +46 -0
  61. package/src/modules/bmb/reference/agents/expert-examples/journal-keeper/journal-keeper-sidecar/mood-patterns.md +39 -0
  62. package/src/modules/bmb/reference/agents/expert-examples/journal-keeper/journal-keeper.agent.yaml +152 -0
  63. package/src/modules/bmb/reference/agents/module-examples/README.md +50 -0
  64. package/src/modules/bmb/reference/agents/module-examples/security-engineer.agent.yaml +53 -0
  65. package/src/modules/bmb/reference/agents/module-examples/trend-analyst.agent.yaml +57 -0
  66. package/src/modules/bmb/reference/agents/simple-examples/README.md +223 -0
  67. package/src/modules/bmb/reference/agents/simple-examples/commit-poet.agent.yaml +126 -0
  68. package/src/modules/bmb/reference/readme.md +3 -0
  69. package/src/modules/bmb/workflows/audit-workflow/checklist.md +5 -6
  70. package/src/modules/bmb/workflows/audit-workflow/instructions.md +6 -6
  71. package/src/modules/bmb/workflows/audit-workflow/workflow.yaml +2 -2
  72. package/src/modules/bmb/workflows/convert-legacy/README.md +5 -5
  73. package/src/modules/bmb/workflows/convert-legacy/checklist.md +2 -2
  74. package/src/modules/bmb/workflows/convert-legacy/instructions.md +17 -17
  75. package/src/modules/bmb/workflows/convert-legacy/workflow.yaml +6 -10
  76. package/src/modules/bmb/workflows/create-agent/agent-validation-checklist.md +174 -0
  77. package/src/modules/bmb/workflows/create-agent/brainstorm-context.md +99 -120
  78. package/src/modules/bmb/workflows/create-agent/communication-presets.csv +61 -0
  79. package/src/modules/bmb/workflows/create-agent/instructions.md +171 -82
  80. package/src/modules/bmb/workflows/create-agent/workflow.yaml +26 -20
  81. package/src/modules/bmb/workflows/create-module/README.md +163 -154
  82. package/src/modules/bmb/workflows/create-module/checklist.md +1 -10
  83. package/src/modules/bmb/workflows/create-module/installer-templates/install-config.yaml +1 -1
  84. package/src/modules/bmb/workflows/create-module/instructions.md +13 -17
  85. package/src/modules/bmb/workflows/create-module/module-structure.md +39 -5
  86. package/src/modules/bmb/workflows/create-module/workflow.yaml +21 -13
  87. package/src/modules/bmb/workflows/create-workflow/README.md +4 -4
  88. package/src/modules/bmb/workflows/create-workflow/checklist.md +1 -1
  89. package/src/modules/bmb/workflows/create-workflow/instructions.md +46 -37
  90. package/src/modules/bmb/workflows/create-workflow/workflow-creation-guide.md +219 -42
  91. package/src/modules/bmb/workflows/create-workflow/workflow-template/instructions.md +4 -2
  92. package/src/modules/bmb/workflows/create-workflow/workflow-template/workflow.yaml +12 -16
  93. package/src/modules/bmb/workflows/create-workflow/workflow.yaml +7 -8
  94. package/src/modules/bmb/workflows/edit-agent/README.md +174 -47
  95. package/src/modules/bmb/workflows/edit-agent/instructions.md +399 -35
  96. package/src/modules/bmb/workflows/edit-agent/workflow.yaml +27 -13
  97. package/src/modules/bmb/workflows/edit-module/README.md +2 -2
  98. package/src/modules/bmb/workflows/edit-module/checklist.md +2 -2
  99. package/src/modules/bmb/workflows/edit-module/instructions.md +7 -5
  100. package/src/modules/bmb/workflows/edit-module/workflow.yaml +11 -13
  101. package/src/modules/bmb/workflows/edit-workflow/instructions.md +4 -4
  102. package/src/modules/bmb/workflows/edit-workflow/workflow.yaml +6 -8
  103. package/src/modules/bmb/workflows/module-brief/README.md +2 -2
  104. package/src/modules/bmb/workflows/module-brief/checklist.md +2 -2
  105. package/src/modules/bmb/workflows/module-brief/instructions.md +3 -2
  106. package/src/modules/bmb/workflows/module-brief/workflow.yaml +12 -7
  107. package/src/modules/bmgd/README.md +208 -0
  108. package/src/modules/bmgd/_module-installer/install-config.yaml +54 -0
  109. package/src/modules/bmgd/agents/game-architect.agent.yaml +33 -0
  110. package/src/modules/bmgd/agents/game-designer.agent.yaml +40 -0
  111. package/src/modules/bmgd/agents/game-dev.agent.yaml +40 -0
  112. package/src/modules/bmgd/agents/game-scrum-master.agent.yaml +75 -0
  113. package/src/modules/bmgd/teams/default-party.csv +10 -0
  114. package/src/modules/{bmm → bmgd}/teams/team-gamedev.yaml +5 -1
  115. package/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/instructions.md +130 -0
  116. package/src/modules/{bmm/workflows/1-analysis → bmgd/workflows/1-preproduction}/brainstorm-game/workflow.yaml +10 -10
  117. package/src/modules/{bmm/workflows/1-analysis → bmgd/workflows/1-preproduction}/game-brief/instructions.md +44 -28
  118. package/src/modules/{bmm/workflows/1-analysis → bmgd/workflows/1-preproduction}/game-brief/workflow.yaml +9 -17
  119. package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/instructions-gdd.md +58 -31
  120. package/src/modules/bmgd/workflows/2-design/gdd/workflow.yaml +81 -0
  121. package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/narrative/instructions-narrative.md +75 -28
  122. package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/narrative/workflow.yaml +6 -12
  123. package/src/modules/bmgd/workflows/3-technical/game-architecture/architecture-patterns.yaml +321 -0
  124. package/src/modules/bmgd/workflows/3-technical/game-architecture/architecture-template.md +103 -0
  125. package/src/modules/bmgd/workflows/3-technical/game-architecture/checklist.md +240 -0
  126. package/src/modules/bmgd/workflows/3-technical/game-architecture/decision-catalog.yaml +222 -0
  127. package/src/modules/bmgd/workflows/3-technical/game-architecture/instructions.md +701 -0
  128. package/src/modules/bmgd/workflows/3-technical/game-architecture/pattern-categories.csv +13 -0
  129. package/src/modules/bmgd/workflows/3-technical/game-architecture/workflow.yaml +69 -0
  130. package/src/modules/bmgd/workflows/4-production/code-review/backlog_template.md +12 -0
  131. package/src/modules/bmgd/workflows/4-production/code-review/checklist.md +22 -0
  132. package/src/modules/bmgd/workflows/4-production/code-review/instructions.md +398 -0
  133. package/src/modules/bmgd/workflows/4-production/code-review/workflow.yaml +61 -0
  134. package/src/modules/bmgd/workflows/4-production/correct-course/checklist.md +279 -0
  135. package/src/modules/bmgd/workflows/4-production/correct-course/instructions.md +206 -0
  136. package/src/modules/bmgd/workflows/4-production/correct-course/workflow.yaml +58 -0
  137. package/src/modules/bmgd/workflows/4-production/create-story/checklist.md +240 -0
  138. package/src/modules/bmgd/workflows/4-production/create-story/instructions.md +256 -0
  139. package/src/modules/bmgd/workflows/4-production/create-story/template.md +51 -0
  140. package/src/modules/bmgd/workflows/4-production/create-story/workflow.yaml +74 -0
  141. package/src/modules/bmgd/workflows/4-production/dev-story/checklist.md +38 -0
  142. package/src/modules/bmgd/workflows/4-production/dev-story/instructions.md +267 -0
  143. package/src/modules/bmgd/workflows/4-production/dev-story/workflow.yaml +58 -0
  144. package/src/modules/bmgd/workflows/4-production/epic-tech-context/checklist.md +17 -0
  145. package/src/modules/bmgd/workflows/4-production/epic-tech-context/instructions.md +164 -0
  146. package/src/modules/bmgd/workflows/4-production/epic-tech-context/template.md +76 -0
  147. package/src/modules/bmgd/workflows/4-production/epic-tech-context/workflow.yaml +58 -0
  148. package/src/modules/bmgd/workflows/4-production/retrospective/instructions.md +1443 -0
  149. package/src/modules/bmgd/workflows/4-production/retrospective/workflow.yaml +57 -0
  150. package/src/modules/bmgd/workflows/4-production/sprint-planning/checklist.md +33 -0
  151. package/src/modules/bmgd/workflows/4-production/sprint-planning/instructions.md +234 -0
  152. package/src/modules/bmgd/workflows/4-production/sprint-planning/sprint-status-template.yaml +55 -0
  153. package/src/modules/bmgd/workflows/4-production/sprint-planning/workflow.yaml +51 -0
  154. package/src/modules/bmgd/workflows/4-production/story-context/checklist.md +16 -0
  155. package/src/modules/bmgd/workflows/4-production/story-context/context-template.xml +34 -0
  156. package/src/modules/bmgd/workflows/4-production/story-context/instructions.md +209 -0
  157. package/src/modules/bmgd/workflows/4-production/story-context/workflow.yaml +63 -0
  158. package/src/modules/bmgd/workflows/4-production/story-done/instructions.md +111 -0
  159. package/src/modules/bmgd/workflows/4-production/story-done/workflow.yaml +28 -0
  160. package/src/modules/bmgd/workflows/4-production/story-ready/instructions.md +117 -0
  161. package/src/modules/bmgd/workflows/4-production/story-ready/workflow.yaml +25 -0
  162. package/src/modules/bmm/README.md +79 -92
  163. package/src/modules/bmm/_module-installer/install-config.yaml +9 -23
  164. package/src/modules/bmm/_module-installer/installer.js +2 -2
  165. package/src/modules/bmm/agents/analyst.agent.yaml +25 -19
  166. package/src/modules/bmm/agents/architect.agent.yaml +28 -19
  167. package/src/modules/bmm/agents/dev.agent.yaml +12 -15
  168. package/src/modules/bmm/agents/pm.agent.yaml +40 -22
  169. package/src/modules/bmm/agents/sm.agent.yaml +30 -24
  170. package/src/modules/bmm/agents/tea.agent.yaml +25 -17
  171. package/src/modules/bmm/agents/tech-writer.agent.yaml +80 -0
  172. package/src/modules/bmm/agents/ux-designer.agent.yaml +22 -12
  173. package/src/modules/bmm/docs/README.md +240 -0
  174. package/src/modules/bmm/docs/agents-guide.md +1058 -0
  175. package/src/modules/bmm/docs/brownfield-guide.md +762 -0
  176. package/src/modules/bmm/docs/enterprise-agentic-development.md +686 -0
  177. package/src/modules/bmm/docs/faq.md +588 -0
  178. package/src/modules/bmm/docs/glossary.md +320 -0
  179. package/src/modules/bmm/docs/images/workflow-method-greenfield.excalidraw +5919 -0
  180. package/src/modules/bmm/docs/images/workflow-method-greenfield.svg +2 -0
  181. package/src/modules/bmm/docs/party-mode.md +224 -0
  182. package/src/modules/bmm/docs/quick-spec-flow.md +652 -0
  183. package/src/modules/bmm/docs/quick-start.md +382 -0
  184. package/src/modules/bmm/docs/scale-adaptive-system.md +618 -0
  185. package/src/modules/bmm/docs/test-architecture.md +396 -0
  186. package/src/modules/bmm/{workflows/3-solutioning/architecture/readme.md → docs/workflow-architecture-reference.md} +132 -84
  187. package/src/modules/bmm/{workflows/document-project/README.md → docs/workflow-document-project-reference.md} +49 -4
  188. package/src/modules/bmm/docs/workflows-analysis.md +370 -0
  189. package/src/modules/bmm/docs/workflows-implementation.md +296 -0
  190. package/src/modules/bmm/docs/workflows-planning.md +612 -0
  191. package/src/modules/bmm/docs/workflows-solutioning.md +554 -0
  192. package/src/modules/bmm/teams/default-party.csv +20 -0
  193. package/src/modules/bmm/teams/team-fullstack.yaml +2 -0
  194. package/src/modules/bmm/workflows/1-analysis/brainstorm-project/instructions.md +45 -24
  195. package/src/modules/bmm/workflows/1-analysis/brainstorm-project/workflow.yaml +8 -8
  196. package/src/modules/bmm/workflows/1-analysis/domain-research/instructions.md +425 -0
  197. package/src/modules/bmm/workflows/1-analysis/domain-research/template.md +180 -0
  198. package/src/modules/bmm/workflows/1-analysis/domain-research/workflow.yaml +56 -0
  199. package/src/modules/bmm/workflows/1-analysis/product-brief/instructions.md +435 -232
  200. package/src/modules/bmm/workflows/1-analysis/product-brief/template.md +93 -77
  201. package/src/modules/bmm/workflows/1-analysis/product-brief/workflow.yaml +32 -14
  202. package/src/modules/bmm/workflows/1-analysis/research/checklist-deep-prompt.md +144 -0
  203. package/src/modules/bmm/workflows/1-analysis/research/checklist-technical.md +249 -0
  204. package/src/modules/bmm/workflows/1-analysis/research/checklist.md +156 -59
  205. package/src/modules/bmm/workflows/1-analysis/research/instructions-deep-prompt.md +70 -65
  206. package/src/modules/bmm/workflows/1-analysis/research/instructions-market.md +205 -143
  207. package/src/modules/bmm/workflows/1-analysis/research/instructions-router.md +55 -46
  208. package/src/modules/bmm/workflows/1-analysis/research/instructions-technical.md +116 -83
  209. package/src/modules/bmm/workflows/1-analysis/research/template-market.md +37 -1
  210. package/src/modules/bmm/workflows/1-analysis/research/template-technical.md +36 -1
  211. package/src/modules/bmm/workflows/1-analysis/research/workflow.yaml +25 -12
  212. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/instructions.md +51 -26
  213. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/workflow.yaml +67 -16
  214. package/src/modules/bmm/workflows/2-plan-workflows/prd/checklist.md +292 -63
  215. package/src/modules/bmm/workflows/2-plan-workflows/prd/domain-complexity.csv +13 -0
  216. package/src/modules/bmm/workflows/2-plan-workflows/prd/instructions.md +544 -290
  217. package/src/modules/bmm/workflows/2-plan-workflows/prd/prd-template.md +165 -23
  218. package/src/modules/bmm/workflows/2-plan-workflows/prd/project-types.csv +11 -0
  219. package/src/modules/bmm/workflows/2-plan-workflows/prd/workflow.yaml +50 -18
  220. package/src/modules/bmm/workflows/2-plan-workflows/tech-spec/checklist.md +146 -36
  221. package/src/modules/bmm/workflows/2-plan-workflows/tech-spec/epics-template.md +67 -4
  222. package/src/modules/bmm/workflows/2-plan-workflows/tech-spec/instructions-generate-stories.md +436 -0
  223. package/src/modules/bmm/workflows/2-plan-workflows/tech-spec/instructions.md +874 -163
  224. package/src/modules/bmm/workflows/2-plan-workflows/tech-spec/tech-spec-template.md +132 -6
  225. package/src/modules/bmm/workflows/2-plan-workflows/tech-spec/user-story-template.md +54 -20
  226. package/src/modules/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml +36 -28
  227. package/src/modules/bmm/workflows/3-solutioning/architecture/architecture-patterns.yaml +0 -26
  228. package/src/modules/bmm/workflows/3-solutioning/architecture/architecture-template.md +1 -1
  229. package/src/modules/bmm/workflows/3-solutioning/architecture/checklist.md +5 -9
  230. package/src/modules/bmm/workflows/3-solutioning/architecture/instructions.md +215 -150
  231. package/src/modules/bmm/workflows/3-solutioning/architecture/workflow.yaml +72 -26
  232. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/epics-template.md +80 -0
  233. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/instructions.md +616 -0
  234. package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/workflow.yaml +63 -0
  235. package/src/modules/bmm/workflows/3-solutioning/{solutioning-gate-check → implementation-readiness}/checklist.md +7 -13
  236. package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/instructions.md +332 -0
  237. package/src/modules/bmm/workflows/3-solutioning/{solutioning-gate-check → implementation-readiness}/template.md +1 -1
  238. package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/workflow.yaml +64 -0
  239. package/src/modules/bmm/workflows/4-implementation/code-review/instructions.md +25 -18
  240. package/src/modules/bmm/workflows/4-implementation/code-review/workflow.yaml +31 -26
  241. package/src/modules/bmm/workflows/4-implementation/correct-course/checklist.md +1 -1
  242. package/src/modules/bmm/workflows/4-implementation/correct-course/instructions.md +7 -2
  243. package/src/modules/bmm/workflows/4-implementation/correct-course/workflow.yaml +38 -25
  244. package/src/modules/bmm/workflows/4-implementation/create-story/instructions.md +22 -18
  245. package/src/modules/bmm/workflows/4-implementation/create-story/workflow.yaml +38 -14
  246. package/src/modules/bmm/workflows/4-implementation/dev-story/instructions.md +8 -3
  247. package/src/modules/bmm/workflows/4-implementation/dev-story/workflow.yaml +35 -5
  248. package/src/modules/bmm/workflows/4-implementation/epic-tech-context/checklist.md +1 -1
  249. package/src/modules/bmm/workflows/4-implementation/epic-tech-context/instructions.md +10 -6
  250. package/src/modules/bmm/workflows/4-implementation/epic-tech-context/workflow.yaml +40 -16
  251. package/src/modules/bmm/workflows/4-implementation/retrospective/instructions.md +1207 -243
  252. package/src/modules/bmm/workflows/4-implementation/retrospective/workflow.yaml +38 -26
  253. package/src/modules/bmm/workflows/4-implementation/sprint-planning/instructions.md +28 -15
  254. package/src/modules/bmm/workflows/4-implementation/sprint-planning/sprint-status-template.yaml +1 -1
  255. package/src/modules/bmm/workflows/4-implementation/sprint-planning/workflow.yaml +16 -6
  256. package/src/modules/bmm/workflows/4-implementation/story-context/checklist.md +1 -1
  257. package/src/modules/bmm/workflows/4-implementation/story-context/context-template.xml +1 -1
  258. package/src/modules/bmm/workflows/4-implementation/story-context/instructions.md +23 -15
  259. package/src/modules/bmm/workflows/4-implementation/story-context/workflow.yaml +39 -8
  260. package/src/modules/bmm/workflows/4-implementation/story-done/instructions.md +1 -1
  261. package/src/modules/bmm/workflows/4-implementation/story-done/workflow.yaml +5 -4
  262. package/src/modules/bmm/workflows/4-implementation/story-ready/instructions.md +6 -6
  263. package/src/modules/bmm/workflows/4-implementation/story-ready/workflow.yaml +5 -7
  264. package/src/modules/bmm/workflows/diagrams/_shared/excalidraw-library.json +90 -0
  265. package/src/modules/bmm/workflows/diagrams/_shared/excalidraw-templates.yaml +127 -0
  266. package/src/modules/bmm/workflows/diagrams/create-dataflow/checklist.md +39 -0
  267. package/src/modules/bmm/workflows/diagrams/create-dataflow/instructions.md +130 -0
  268. package/src/modules/bmm/workflows/diagrams/create-dataflow/workflow.yaml +27 -0
  269. package/src/modules/bmm/workflows/diagrams/create-diagram/checklist.md +43 -0
  270. package/src/modules/bmm/workflows/diagrams/create-diagram/instructions.md +141 -0
  271. package/src/modules/bmm/workflows/diagrams/create-diagram/workflow.yaml +27 -0
  272. package/src/modules/bmm/workflows/diagrams/create-flowchart/checklist.md +49 -0
  273. package/src/modules/bmm/workflows/diagrams/create-flowchart/instructions.md +241 -0
  274. package/src/modules/bmm/workflows/diagrams/create-flowchart/workflow.yaml +27 -0
  275. package/src/modules/bmm/workflows/diagrams/create-wireframe/checklist.md +38 -0
  276. package/src/modules/bmm/workflows/diagrams/create-wireframe/instructions.md +133 -0
  277. package/src/modules/bmm/workflows/diagrams/create-wireframe/workflow.yaml +27 -0
  278. package/src/modules/bmm/workflows/document-project/checklist.md +1 -1
  279. package/src/modules/bmm/workflows/document-project/instructions.md +5 -5
  280. package/src/modules/bmm/workflows/document-project/workflow.yaml +2 -7
  281. package/src/modules/bmm/workflows/document-project/workflows/deep-dive-instructions.md +4 -4
  282. package/src/modules/bmm/workflows/document-project/workflows/deep-dive.yaml +5 -5
  283. package/src/modules/bmm/workflows/document-project/workflows/full-scan-instructions.md +13 -13
  284. package/src/modules/bmm/workflows/document-project/workflows/full-scan.yaml +5 -5
  285. package/src/modules/bmm/workflows/techdoc/documentation-standards.md +262 -0
  286. package/src/modules/bmm/workflows/testarch/atdd/atdd-checklist-template.md +2 -2
  287. package/src/modules/bmm/workflows/testarch/atdd/instructions.md +2 -2
  288. package/src/modules/bmm/workflows/testarch/atdd/workflow.yaml +2 -9
  289. package/src/modules/bmm/workflows/testarch/automate/instructions.md +2 -2
  290. package/src/modules/bmm/workflows/testarch/automate/workflow.yaml +2 -11
  291. package/src/modules/bmm/workflows/testarch/ci/checklist.md +4 -4
  292. package/src/modules/bmm/workflows/testarch/ci/instructions.md +2 -2
  293. package/src/modules/bmm/workflows/testarch/ci/workflow.yaml +2 -10
  294. package/src/modules/bmm/workflows/testarch/framework/checklist.md +4 -4
  295. package/src/modules/bmm/workflows/testarch/framework/instructions.md +2 -2
  296. package/src/modules/bmm/workflows/testarch/framework/workflow.yaml +2 -8
  297. package/src/modules/bmm/workflows/testarch/nfr-assess/instructions.md +1 -1
  298. package/src/modules/bmm/workflows/testarch/nfr-assess/workflow.yaml +2 -11
  299. package/src/modules/bmm/workflows/testarch/test-design/checklist.md +4 -4
  300. package/src/modules/bmm/workflows/testarch/test-design/instructions.md +175 -14
  301. package/src/modules/bmm/workflows/testarch/test-design/test-design-template.md +4 -4
  302. package/src/modules/bmm/workflows/testarch/test-design/workflow.yaml +7 -11
  303. package/src/modules/bmm/workflows/testarch/test-review/instructions.md +1 -1
  304. package/src/modules/bmm/workflows/testarch/test-review/workflow.yaml +2 -9
  305. package/src/modules/bmm/workflows/testarch/trace/instructions.md +9 -9
  306. package/src/modules/bmm/workflows/testarch/trace/workflow.yaml +2 -13
  307. package/src/modules/bmm/workflows/workflow-status/init/instructions.md +249 -212
  308. package/src/modules/bmm/workflows/workflow-status/init/workflow.yaml +6 -5
  309. package/src/modules/bmm/workflows/workflow-status/instructions.md +177 -113
  310. package/src/modules/bmm/workflows/workflow-status/paths/enterprise-brownfield.yaml +126 -0
  311. package/src/modules/bmm/workflows/workflow-status/paths/enterprise-greenfield.yaml +114 -0
  312. package/src/modules/bmm/workflows/workflow-status/paths/{brownfield-level-3.yaml → method-brownfield.yaml} +48 -33
  313. package/src/modules/bmm/workflows/workflow-status/paths/method-greenfield.yaml +101 -0
  314. package/src/modules/bmm/workflows/workflow-status/paths/{brownfield-level-1.yaml → quick-flow-brownfield.yaml} +18 -18
  315. package/src/modules/bmm/workflows/workflow-status/paths/{greenfield-level-1.yaml → quick-flow-greenfield.yaml} +16 -18
  316. package/src/modules/bmm/workflows/workflow-status/project-levels.yaml +1 -1
  317. package/src/modules/bmm/workflows/workflow-status/workflow-status-template.yaml +24 -0
  318. package/src/modules/bmm/workflows/workflow-status/workflow.yaml +5 -5
  319. package/src/modules/cis/README.md +153 -0
  320. package/src/modules/cis/_module-installer/install-config.yaml +6 -4
  321. package/src/modules/cis/agents/README.md +1 -1
  322. package/src/modules/cis/agents/brainstorming-coach.agent.yaml +13 -8
  323. package/src/modules/cis/agents/creative-problem-solver.agent.yaml +13 -8
  324. package/src/modules/cis/agents/design-thinking-coach.agent.yaml +13 -8
  325. package/src/modules/cis/agents/innovation-strategist.agent.yaml +13 -8
  326. package/src/modules/cis/agents/presentation-master.agent.yaml +60 -0
  327. package/src/modules/cis/agents/storyteller.agent.yaml +13 -8
  328. package/src/modules/cis/teams/creative-squad.yaml +1 -0
  329. package/src/modules/cis/teams/default-party.csv +11 -0
  330. package/src/modules/cis/workflows/README.md +102 -30
  331. package/src/modules/cis/workflows/design-thinking/instructions.md +4 -2
  332. package/src/modules/cis/workflows/design-thinking/workflow.yaml +7 -12
  333. package/src/modules/cis/workflows/innovation-strategy/instructions.md +7 -5
  334. package/src/modules/cis/workflows/innovation-strategy/template.md +3 -3
  335. package/src/modules/cis/workflows/innovation-strategy/workflow.yaml +7 -12
  336. package/src/modules/cis/workflows/problem-solving/instructions.md +4 -2
  337. package/src/modules/cis/workflows/problem-solving/workflow.yaml +7 -12
  338. package/src/modules/cis/workflows/storytelling/instructions.md +14 -4
  339. package/src/modules/cis/workflows/storytelling/workflow.yaml +7 -12
  340. package/src/utility/models/action-command-header.md +0 -0
  341. package/src/utility/models/agent-activation-ide.xml +3 -3
  342. package/src/utility/models/agent-activation-web.xml +4 -4
  343. package/src/utility/models/agent-command-header.md +1 -0
  344. package/src/utility/models/fragments/activation-steps.xml +3 -2
  345. package/src/utility/models/fragments/handler-validate-workflow.xml +1 -1
  346. package/src/utility/models/fragments/handler-workflow.xml +1 -1
  347. package/src/utility/models/fragments/web-bundle-activation-steps.xml +3 -3
  348. package/test/test-installation-components.js +214 -0
  349. package/tools/bmad-npx-wrapper.js +10 -98
  350. package/tools/cli/README.md +50 -32
  351. package/tools/cli/bundlers/web-bundler.js +322 -26
  352. package/tools/cli/commands/agent-install.js +409 -0
  353. package/tools/cli/commands/install.js +2 -5
  354. package/tools/cli/installers/lib/core/config-collector.js +279 -39
  355. package/tools/cli/installers/lib/core/detector.js +62 -7
  356. package/tools/cli/installers/lib/core/ide-config-manager.js +3 -1
  357. package/tools/cli/installers/lib/core/installer.js +338 -46
  358. package/tools/cli/installers/lib/core/manifest-generator.js +33 -117
  359. package/tools/cli/installers/lib/core/manifest.js +6 -2
  360. package/tools/cli/installers/lib/ide/_base-ide.js +82 -3
  361. package/tools/cli/installers/lib/ide/antigravity.js +463 -0
  362. package/tools/cli/installers/lib/ide/auggie.js +81 -238
  363. package/tools/cli/installers/lib/ide/claude-code.js +90 -25
  364. package/tools/cli/installers/lib/ide/cline.js +15 -18
  365. package/tools/cli/installers/lib/ide/codex.js +225 -71
  366. package/tools/cli/installers/lib/ide/crush.js +14 -50
  367. package/tools/cli/installers/lib/ide/cursor.js +116 -8
  368. package/tools/cli/installers/lib/ide/gemini.js +87 -37
  369. package/tools/cli/installers/lib/ide/github-copilot.js +121 -35
  370. package/tools/cli/installers/lib/ide/iflow.js +13 -30
  371. package/tools/cli/installers/lib/ide/kilo.js +20 -16
  372. package/tools/cli/installers/lib/ide/manager.js +50 -0
  373. package/tools/cli/installers/lib/ide/opencode.js +61 -17
  374. package/tools/cli/installers/lib/ide/qwen.js +39 -11
  375. package/tools/cli/installers/lib/ide/roo.js +27 -62
  376. package/tools/cli/installers/lib/ide/shared/agent-command-generator.js +90 -0
  377. package/tools/cli/installers/lib/ide/{task-tool-command-generator.js → shared/task-tool-command-generator.js} +1 -1
  378. package/tools/cli/installers/lib/ide/{workflow-command-generator.js → shared/workflow-command-generator.js} +11 -9
  379. package/tools/cli/installers/lib/ide/templates/agent-command-template.md +14 -0
  380. package/tools/cli/installers/lib/ide/templates/gemini-agent-command.toml +14 -0
  381. package/tools/cli/installers/lib/ide/templates/gemini-task-command.toml +12 -0
  382. package/tools/cli/installers/lib/ide/{workflow-command-template.md → templates/workflow-command-template.md} +3 -5
  383. package/tools/cli/installers/lib/ide/trae.js +20 -32
  384. package/tools/cli/installers/lib/ide/windsurf.js +65 -8
  385. package/tools/cli/installers/lib/modules/manager.js +213 -7
  386. package/tools/cli/lib/agent/compiler.js +390 -0
  387. package/tools/cli/lib/agent/installer.js +725 -0
  388. package/tools/cli/lib/agent/template-engine.js +152 -0
  389. package/tools/cli/lib/cli-utils.js +52 -50
  390. package/tools/cli/lib/config.js +3 -1
  391. package/tools/cli/lib/ui.js +34 -17
  392. package/tools/cli/lib/xml-handler.js +1 -0
  393. package/tools/cli/lib/yaml-format.js +2 -1
  394. package/tools/cli/lib/yaml-xml-builder.js +76 -8
  395. package/tools/schema/agent.js +12 -3
  396. package/.claude/commands/bmad/bmb/agents/bmad-builder.md +0 -70
  397. package/.claude/commands/bmad/bmb/workflows/README.md +0 -67
  398. package/.claude/commands/bmad/bmb/workflows/audit-workflow.md +0 -15
  399. package/.claude/commands/bmad/bmb/workflows/convert-legacy.md +0 -15
  400. package/.claude/commands/bmad/bmb/workflows/create-agent.md +0 -15
  401. package/.claude/commands/bmad/bmb/workflows/create-module.md +0 -15
  402. package/.claude/commands/bmad/bmb/workflows/create-workflow.md +0 -15
  403. package/.claude/commands/bmad/bmb/workflows/edit-agent.md +0 -15
  404. package/.claude/commands/bmad/bmb/workflows/edit-module.md +0 -15
  405. package/.claude/commands/bmad/bmb/workflows/edit-workflow.md +0 -15
  406. package/.claude/commands/bmad/bmb/workflows/module-brief.md +0 -15
  407. package/.claude/commands/bmad/bmb/workflows/redoc.md +0 -15
  408. package/.claude/commands/bmad/bmd/agents/cli-chief.md +0 -108
  409. package/.claude/commands/bmad/bmd/agents/doc-keeper.md +0 -115
  410. package/.claude/commands/bmad/bmd/agents/release-chief.md +0 -109
  411. package/.claude/commands/bmad/core/agents/bmad-master.md +0 -71
  412. package/.claude/commands/bmad/core/tasks/index-docs.md +0 -9
  413. package/.claude/commands/bmad/core/tools/shard-doc.md +0 -9
  414. package/.claude/commands/bmad/core/workflows/README.md +0 -27
  415. package/.claude/commands/bmad/core/workflows/brainstorming.md +0 -15
  416. package/.claude/commands/bmad/core/workflows/party-mode.md +0 -15
  417. package/.claude/hooks/bmad-tts-injector.sh +0 -415
  418. package/.claude/hooks/bmad-voice-manager.sh +0 -511
  419. package/.claude/hooks/check-output-style.sh +0 -112
  420. package/.claude/hooks/download-extra-voices.sh +0 -244
  421. package/.claude/hooks/github-star-reminder.sh +0 -154
  422. package/.claude/hooks/language-manager.sh +0 -392
  423. package/.claude/hooks/learn-manager.sh +0 -475
  424. package/.claude/hooks/personality-manager.sh +0 -438
  425. package/.claude/hooks/piper-download-voices.sh +0 -165
  426. package/.claude/hooks/piper-installer.sh +0 -178
  427. package/.claude/hooks/piper-multispeaker-registry.sh +0 -165
  428. package/.claude/hooks/piper-voice-manager.sh +0 -293
  429. package/.claude/hooks/play-tts-elevenlabs.sh +0 -404
  430. package/.claude/hooks/play-tts-piper.sh +0 -338
  431. package/.claude/hooks/play-tts.sh +0 -100
  432. package/.claude/hooks/provider-commands.sh +0 -540
  433. package/.claude/hooks/provider-manager.sh +0 -298
  434. package/.claude/hooks/replay-target-audio.sh +0 -95
  435. package/.claude/hooks/sentiment-manager.sh +0 -201
  436. package/.claude/hooks/speed-manager.sh +0 -291
  437. package/.claude/hooks/voice-manager.sh +0 -594
  438. package/.claude/hooks/voices-config.sh +0 -70
  439. package/.claude/settings.local.json +0 -41
  440. package/bmad/_cfg/agent-manifest.csv +0 -7
  441. package/bmad/_cfg/agents/bmb-bmad-builder.customize.yaml +0 -42
  442. package/bmad/_cfg/agents/bmd-cli-chief.customize.yaml +0 -32
  443. package/bmad/_cfg/agents/bmd-doc-keeper.customize.yaml +0 -42
  444. package/bmad/_cfg/agents/bmd-release-chief.customize.yaml +0 -42
  445. package/bmad/_cfg/agents/core-bmad-master.customize.yaml +0 -42
  446. package/bmad/_cfg/files-manifest.csv +0 -83
  447. package/bmad/_cfg/manifest.yaml +0 -12
  448. package/bmad/_cfg/task-manifest.csv +0 -5
  449. package/bmad/_cfg/tool-manifest.csv +0 -2
  450. package/bmad/_cfg/workflow-manifest.csv +0 -15
  451. package/bmad/bmb/README.md +0 -132
  452. package/bmad/bmb/agents/bmad-builder.md +0 -70
  453. package/bmad/bmb/config.yaml +0 -14
  454. package/bmad/bmb/workflows/audit-workflow/checklist.md +0 -143
  455. package/bmad/bmb/workflows/audit-workflow/instructions.md +0 -341
  456. package/bmad/bmb/workflows/audit-workflow/template.md +0 -118
  457. package/bmad/bmb/workflows/audit-workflow/workflow.yaml +0 -23
  458. package/bmad/bmb/workflows/audit-workflow/workflow.yaml.bak +0 -21
  459. package/bmad/bmb/workflows/convert-legacy/README.md +0 -262
  460. package/bmad/bmb/workflows/convert-legacy/checklist.md +0 -205
  461. package/bmad/bmb/workflows/convert-legacy/instructions.md +0 -377
  462. package/bmad/bmb/workflows/convert-legacy/workflow.yaml +0 -32
  463. package/bmad/bmb/workflows/create-agent/README.md +0 -320
  464. package/bmad/bmb/workflows/create-agent/agent-architecture.md +0 -419
  465. package/bmad/bmb/workflows/create-agent/agent-architecture.md.bak +0 -412
  466. package/bmad/bmb/workflows/create-agent/agent-command-patterns.md +0 -759
  467. package/bmad/bmb/workflows/create-agent/agent-command-patterns.md.bak +0 -759
  468. package/bmad/bmb/workflows/create-agent/agent-types.md +0 -292
  469. package/bmad/bmb/workflows/create-agent/brainstorm-context.md +0 -174
  470. package/bmad/bmb/workflows/create-agent/checklist.md +0 -62
  471. package/bmad/bmb/workflows/create-agent/communication-styles.md +0 -202
  472. package/bmad/bmb/workflows/create-agent/instructions.md +0 -430
  473. package/bmad/bmb/workflows/create-agent/workflow.yaml +0 -37
  474. package/bmad/bmb/workflows/create-module/README.md +0 -220
  475. package/bmad/bmb/workflows/create-module/README.md.bak +0 -218
  476. package/bmad/bmb/workflows/create-module/brainstorm-context.md +0 -137
  477. package/bmad/bmb/workflows/create-module/checklist.md +0 -244
  478. package/bmad/bmb/workflows/create-module/checklist.md.bak +0 -245
  479. package/bmad/bmb/workflows/create-module/installer-templates/install-config.yaml +0 -92
  480. package/bmad/bmb/workflows/create-module/installer-templates/installer.js +0 -231
  481. package/bmad/bmb/workflows/create-module/installer-templates/installer.js.bak +0 -231
  482. package/bmad/bmb/workflows/create-module/instructions.md +0 -581
  483. package/bmad/bmb/workflows/create-module/instructions.md.bak +0 -521
  484. package/bmad/bmb/workflows/create-module/module-structure.md +0 -366
  485. package/bmad/bmb/workflows/create-module/module-structure.md.bak +0 -310
  486. package/bmad/bmb/workflows/create-module/workflow.yaml +0 -42
  487. package/bmad/bmb/workflows/create-module/workflow.yaml.bak +0 -40
  488. package/bmad/bmb/workflows/create-workflow/README.md +0 -277
  489. package/bmad/bmb/workflows/create-workflow/brainstorm-context.md +0 -197
  490. package/bmad/bmb/workflows/create-workflow/checklist.md +0 -94
  491. package/bmad/bmb/workflows/create-workflow/instructions.md +0 -716
  492. package/bmad/bmb/workflows/create-workflow/workflow-creation-guide.md +0 -1150
  493. package/bmad/bmb/workflows/create-workflow/workflow-template/checklist.md +0 -24
  494. package/bmad/bmb/workflows/create-workflow/workflow-template/instructions.md +0 -13
  495. package/bmad/bmb/workflows/create-workflow/workflow-template/template.md +0 -9
  496. package/bmad/bmb/workflows/create-workflow/workflow-template/workflow.yaml +0 -39
  497. package/bmad/bmb/workflows/create-workflow/workflow-template/workflow.yaml.bak +0 -39
  498. package/bmad/bmb/workflows/create-workflow/workflow.yaml +0 -40
  499. package/bmad/bmb/workflows/create-workflow/workflow.yaml.bak +0 -38
  500. package/bmad/bmb/workflows/edit-agent/README.md +0 -112
  501. package/bmad/bmb/workflows/edit-agent/checklist.md +0 -112
  502. package/bmad/bmb/workflows/edit-agent/instructions.md +0 -290
  503. package/bmad/bmb/workflows/edit-agent/workflow.yaml +0 -33
  504. package/bmad/bmb/workflows/edit-module/README.md +0 -187
  505. package/bmad/bmb/workflows/edit-module/checklist.md +0 -165
  506. package/bmad/bmb/workflows/edit-module/instructions.md +0 -339
  507. package/bmad/bmb/workflows/edit-module/workflow.yaml +0 -34
  508. package/bmad/bmb/workflows/edit-workflow/README.md +0 -119
  509. package/bmad/bmb/workflows/edit-workflow/checklist.md +0 -70
  510. package/bmad/bmb/workflows/edit-workflow/instructions.md +0 -342
  511. package/bmad/bmb/workflows/edit-workflow/workflow.yaml +0 -27
  512. package/bmad/bmb/workflows/edit-workflow/workflow.yaml.bak +0 -25
  513. package/bmad/bmb/workflows/module-brief/README.md +0 -264
  514. package/bmad/bmb/workflows/module-brief/checklist.md +0 -116
  515. package/bmad/bmb/workflows/module-brief/instructions.md +0 -267
  516. package/bmad/bmb/workflows/module-brief/template.md +0 -275
  517. package/bmad/bmb/workflows/module-brief/workflow.yaml +0 -29
  518. package/bmad/bmb/workflows/module-brief/workflow.yaml.bak +0 -27
  519. package/bmad/bmb/workflows/redoc/README.md +0 -87
  520. package/bmad/bmb/workflows/redoc/checklist.md +0 -99
  521. package/bmad/bmb/workflows/redoc/instructions.md +0 -265
  522. package/bmad/bmb/workflows/redoc/workflow.yaml +0 -32
  523. package/bmad/bmb/workflows/redoc/workflow.yaml.bak +0 -31
  524. package/bmad/bmd/README.md +0 -193
  525. package/bmad/bmd/README.md.bak +0 -193
  526. package/bmad/bmd/agents/cli-chief-sidecar/instructions.md +0 -102
  527. package/bmad/bmd/agents/cli-chief-sidecar/instructions.md.bak +0 -102
  528. package/bmad/bmd/agents/cli-chief-sidecar/knowledge/README.md +0 -68
  529. package/bmad/bmd/agents/cli-chief-sidecar/knowledge/README.md.bak +0 -68
  530. package/bmad/bmd/agents/cli-chief-sidecar/knowledge/cli-reference.md +0 -123
  531. package/bmad/bmd/agents/cli-chief-sidecar/knowledge/cli-reference.md.bak +0 -123
  532. package/bmad/bmd/agents/cli-chief-sidecar/memories.md +0 -53
  533. package/bmad/bmd/agents/cli-chief-sidecar/memories.md.bak +0 -53
  534. package/bmad/bmd/agents/cli-chief.md +0 -108
  535. package/bmad/bmd/agents/cli-chief.md.bak +0 -108
  536. package/bmad/bmd/agents/doc-keeper-sidecar/instructions.md +0 -177
  537. package/bmad/bmd/agents/doc-keeper-sidecar/instructions.md.bak +0 -177
  538. package/bmad/bmd/agents/doc-keeper-sidecar/knowledge/README.md +0 -81
  539. package/bmad/bmd/agents/doc-keeper-sidecar/knowledge/README.md.bak +0 -81
  540. package/bmad/bmd/agents/doc-keeper-sidecar/memories.md +0 -88
  541. package/bmad/bmd/agents/doc-keeper-sidecar/memories.md.bak +0 -88
  542. package/bmad/bmd/agents/doc-keeper.md +0 -115
  543. package/bmad/bmd/agents/doc-keeper.md.bak +0 -115
  544. package/bmad/bmd/agents/release-chief-sidecar/instructions.md +0 -164
  545. package/bmad/bmd/agents/release-chief-sidecar/instructions.md.bak +0 -164
  546. package/bmad/bmd/agents/release-chief-sidecar/knowledge/README.md +0 -82
  547. package/bmad/bmd/agents/release-chief-sidecar/knowledge/README.md.bak +0 -82
  548. package/bmad/bmd/agents/release-chief-sidecar/memories.md +0 -73
  549. package/bmad/bmd/agents/release-chief-sidecar/memories.md.bak +0 -73
  550. package/bmad/bmd/agents/release-chief.md +0 -109
  551. package/bmad/bmd/agents/release-chief.md.bak +0 -109
  552. package/bmad/bmd/config.yaml +0 -10
  553. package/bmad/core/agents/bmad-master.md +0 -71
  554. package/bmad/core/agents/bmad-web-orchestrator.agent.xml +0 -122
  555. package/bmad/core/config.yaml +0 -9
  556. package/bmad/core/tasks/adv-elicit-methods.csv +0 -39
  557. package/bmad/core/tasks/index-docs.xml +0 -65
  558. package/bmad/core/tasks/validate-workflow.xml +0 -89
  559. package/bmad/core/tasks/workflow.xml +0 -174
  560. package/bmad/core/tools/shard-doc.xml +0 -100
  561. package/bmad/core/workflows/brainstorming/README.md +0 -271
  562. package/bmad/core/workflows/brainstorming/brain-methods.csv +0 -36
  563. package/bmad/core/workflows/brainstorming/instructions.md +0 -314
  564. package/bmad/core/workflows/brainstorming/template.md +0 -102
  565. package/bmad/core/workflows/brainstorming/workflow.yaml +0 -43
  566. package/bmad/core/workflows/party-mode/instructions.md +0 -188
  567. package/bmad/core/workflows/party-mode/workflow.yaml +0 -23
  568. package/bmad/docs/claude-code-instructions.md +0 -25
  569. package/bmad/docs/codex-instructions.md +0 -21
  570. package/bmd/README.md +0 -193
  571. package/bmd/agents/cli-chief-sidecar/instructions.md +0 -102
  572. package/bmd/agents/cli-chief-sidecar/knowledge/README.md +0 -68
  573. package/bmd/agents/cli-chief-sidecar/knowledge/cli-reference.md +0 -123
  574. package/bmd/agents/cli-chief-sidecar/memories.md +0 -53
  575. package/bmd/agents/cli-chief.agent.yaml +0 -126
  576. package/bmd/agents/doc-keeper-sidecar/instructions.md +0 -177
  577. package/bmd/agents/doc-keeper-sidecar/knowledge/README.md +0 -81
  578. package/bmd/agents/doc-keeper-sidecar/memories.md +0 -88
  579. package/bmd/agents/doc-keeper.agent.yaml +0 -137
  580. package/bmd/agents/release-chief-sidecar/instructions.md +0 -164
  581. package/bmd/agents/release-chief-sidecar/knowledge/README.md +0 -82
  582. package/bmd/agents/release-chief-sidecar/memories.md +0 -73
  583. package/bmd/agents/release-chief.agent.yaml +0 -127
  584. package/bmd/bmad-custom-module-installer-plan.md +0 -1176
  585. package/bmd/config.yaml +0 -12
  586. package/docs/bmad-brownfield-guide.md +0 -1260
  587. package/docs/conversion-report-shard-doc-2025-10-26.md +0 -188
  588. package/docs/installers-bundlers/web-bundler-usage.md +0 -54
  589. package/src/core/tasks/adv-elicit.xml +0 -104
  590. package/src/modules/bmb/workflows/create-agent/README.md +0 -320
  591. package/src/modules/bmb/workflows/create-agent/agent-architecture.md +0 -419
  592. package/src/modules/bmb/workflows/create-agent/agent-command-patterns.md +0 -759
  593. package/src/modules/bmb/workflows/create-agent/agent-types.md +0 -292
  594. package/src/modules/bmb/workflows/create-agent/checklist.md +0 -62
  595. package/src/modules/bmb/workflows/create-agent/communication-styles.md +0 -202
  596. package/src/modules/bmb/workflows/edit-agent/checklist.md +0 -112
  597. package/src/modules/bmb/workflows/redoc/README.md +0 -87
  598. package/src/modules/bmb/workflows/redoc/checklist.md +0 -99
  599. package/src/modules/bmb/workflows/redoc/instructions.md +0 -265
  600. package/src/modules/bmb/workflows/redoc/workflow.yaml +0 -34
  601. package/src/modules/bmm/agents/game-architect.agent.yaml +0 -35
  602. package/src/modules/bmm/agents/game-designer.agent.yaml +0 -47
  603. package/src/modules/bmm/agents/game-dev.agent.yaml +0 -39
  604. package/src/modules/bmm/sub-modules/claude-code/config.yaml +0 -5
  605. package/src/modules/bmm/sub-modules/claude-code/injections.yaml +0 -242
  606. package/src/modules/bmm/sub-modules/claude-code/readme.md +0 -87
  607. package/src/modules/bmm/sub-modules/claude-code/sub-agents/bmad-analysis/api-documenter.md +0 -102
  608. package/src/modules/bmm/sub-modules/claude-code/sub-agents/bmad-analysis/codebase-analyzer.md +0 -82
  609. package/src/modules/bmm/sub-modules/claude-code/sub-agents/bmad-analysis/data-analyst.md +0 -101
  610. package/src/modules/bmm/sub-modules/claude-code/sub-agents/bmad-analysis/pattern-detector.md +0 -84
  611. package/src/modules/bmm/sub-modules/claude-code/sub-agents/bmad-planning/dependency-mapper.md +0 -83
  612. package/src/modules/bmm/sub-modules/claude-code/sub-agents/bmad-planning/epic-optimizer.md +0 -81
  613. package/src/modules/bmm/sub-modules/claude-code/sub-agents/bmad-planning/requirements-analyst.md +0 -61
  614. package/src/modules/bmm/sub-modules/claude-code/sub-agents/bmad-planning/technical-decisions-curator.md +0 -168
  615. package/src/modules/bmm/sub-modules/claude-code/sub-agents/bmad-planning/trend-spotter.md +0 -115
  616. package/src/modules/bmm/sub-modules/claude-code/sub-agents/bmad-planning/user-journey-mapper.md +0 -123
  617. package/src/modules/bmm/sub-modules/claude-code/sub-agents/bmad-planning/user-researcher.md +0 -72
  618. package/src/modules/bmm/sub-modules/claude-code/sub-agents/bmad-research/market-researcher.md +0 -51
  619. package/src/modules/bmm/sub-modules/claude-code/sub-agents/bmad-research/tech-debt-auditor.md +0 -106
  620. package/src/modules/bmm/sub-modules/claude-code/sub-agents/bmad-review/document-reviewer.md +0 -102
  621. package/src/modules/bmm/sub-modules/claude-code/sub-agents/bmad-review/technical-evaluator.md +0 -68
  622. package/src/modules/bmm/sub-modules/claude-code/sub-agents/bmad-review/test-coverage-analyzer.md +0 -108
  623. package/src/modules/bmm/tasks/daily-standup.xml +0 -85
  624. package/src/modules/bmm/tasks/retrospective.xml +0 -104
  625. package/src/modules/bmm/testarch/README.md +0 -311
  626. package/src/modules/bmm/workflows/1-analysis/brainstorm-game/README.md +0 -38
  627. package/src/modules/bmm/workflows/1-analysis/brainstorm-game/instructions.md +0 -109
  628. package/src/modules/bmm/workflows/1-analysis/brainstorm-project/README.md +0 -29
  629. package/src/modules/bmm/workflows/1-analysis/game-brief/README.md +0 -221
  630. package/src/modules/bmm/workflows/1-analysis/product-brief/README.md +0 -180
  631. package/src/modules/bmm/workflows/1-analysis/research/README.md +0 -454
  632. package/src/modules/bmm/workflows/1-analysis/research/claude-code/sub-agents/bmm-competitor-analyzer.md +0 -259
  633. package/src/modules/bmm/workflows/1-analysis/research/claude-code/sub-agents/bmm-data-analyst.md +0 -190
  634. package/src/modules/bmm/workflows/1-analysis/research/claude-code/sub-agents/bmm-market-researcher.md +0 -337
  635. package/src/modules/bmm/workflows/1-analysis/research/claude-code/sub-agents/bmm-trend-spotter.md +0 -107
  636. package/src/modules/bmm/workflows/1-analysis/research/claude-code/sub-agents/bmm-user-researcher.md +0 -329
  637. package/src/modules/bmm/workflows/2-plan-workflows/README.md +0 -258
  638. package/src/modules/bmm/workflows/2-plan-workflows/gdd/README.md +0 -222
  639. package/src/modules/bmm/workflows/2-plan-workflows/gdd/workflow.yaml +0 -67
  640. package/src/modules/bmm/workflows/2-plan-workflows/prd/epics-template.md +0 -63
  641. package/src/modules/bmm/workflows/2-plan-workflows/tech-spec/instructions-level0-story.md +0 -167
  642. package/src/modules/bmm/workflows/2-plan-workflows/tech-spec/instructions-level1-stories.md +0 -278
  643. package/src/modules/bmm/workflows/3-solutioning/README.md +0 -1
  644. package/src/modules/bmm/workflows/3-solutioning/solutioning-gate-check/README.md +0 -177
  645. package/src/modules/bmm/workflows/3-solutioning/solutioning-gate-check/instructions.md +0 -273
  646. package/src/modules/bmm/workflows/3-solutioning/solutioning-gate-check/validation-criteria.yaml +0 -189
  647. package/src/modules/bmm/workflows/3-solutioning/solutioning-gate-check/workflow.yaml +0 -40
  648. package/src/modules/bmm/workflows/4-implementation/README.md +0 -221
  649. package/src/modules/bmm/workflows/4-implementation/code-review/README.md +0 -69
  650. package/src/modules/bmm/workflows/4-implementation/correct-course/README.md +0 -73
  651. package/src/modules/bmm/workflows/4-implementation/create-story/README.md +0 -129
  652. package/src/modules/bmm/workflows/4-implementation/dev-story/AUDIT-REPORT.md +0 -367
  653. package/src/modules/bmm/workflows/4-implementation/dev-story/README.md +0 -206
  654. package/src/modules/bmm/workflows/4-implementation/epic-tech-context/README.md +0 -195
  655. package/src/modules/bmm/workflows/4-implementation/retrospective/README.md +0 -77
  656. package/src/modules/bmm/workflows/4-implementation/sprint-planning/README.md +0 -156
  657. package/src/modules/bmm/workflows/4-implementation/story-context/README.md +0 -234
  658. package/src/modules/bmm/workflows/README.md +0 -577
  659. package/src/modules/bmm/workflows/document-project/templates/README.md +0 -38
  660. package/src/modules/bmm/workflows/testarch/README.md +0 -26
  661. package/src/modules/bmm/workflows/testarch/atdd/README.md +0 -672
  662. package/src/modules/bmm/workflows/testarch/automate/README.md +0 -869
  663. package/src/modules/bmm/workflows/testarch/ci/README.md +0 -493
  664. package/src/modules/bmm/workflows/testarch/framework/README.md +0 -340
  665. package/src/modules/bmm/workflows/testarch/nfr-assess/README.md +0 -469
  666. package/src/modules/bmm/workflows/testarch/test-design/README.md +0 -493
  667. package/src/modules/bmm/workflows/testarch/test-review/README.md +0 -775
  668. package/src/modules/bmm/workflows/testarch/trace/README.md +0 -802
  669. package/src/modules/bmm/workflows/workflow-status/README.md +0 -241
  670. package/src/modules/bmm/workflows/workflow-status/paths/brownfield-level-0.yaml +0 -54
  671. package/src/modules/bmm/workflows/workflow-status/paths/brownfield-level-2.yaml +0 -76
  672. package/src/modules/bmm/workflows/workflow-status/paths/brownfield-level-4.yaml +0 -88
  673. package/src/modules/bmm/workflows/workflow-status/paths/game-design.yaml +0 -75
  674. package/src/modules/bmm/workflows/workflow-status/paths/greenfield-level-0.yaml +0 -45
  675. package/src/modules/bmm/workflows/workflow-status/paths/greenfield-level-2.yaml +0 -78
  676. package/src/modules/bmm/workflows/workflow-status/paths/greenfield-level-3.yaml +0 -73
  677. package/src/modules/bmm/workflows/workflow-status/paths/greenfield-level-4.yaml +0 -75
  678. package/src/modules/bmm/workflows/workflow-status/workflow-status-template.md +0 -30
  679. package/src/modules/cis/readme.md +0 -86
  680. package/test/fixtures/agent-schema/invalid/persona/principles-as-string.agent.yaml +0 -23
  681. package/v6-open-items.md +0 -23
  682. /package/src/modules/{bmm/workflows/1-analysis → bmgd/workflows/1-preproduction}/brainstorm-game/game-brain-methods.csv +0 -0
  683. /package/src/modules/{bmm/workflows/1-analysis → bmgd/workflows/1-preproduction}/brainstorm-game/game-context.md +0 -0
  684. /package/src/modules/{bmm/workflows/1-analysis → bmgd/workflows/1-preproduction}/game-brief/checklist.md +0 -0
  685. /package/src/modules/{bmm/workflows/1-analysis → bmgd/workflows/1-preproduction}/game-brief/template.md +0 -0
  686. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/checklist.md +0 -0
  687. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/action-platformer.md +0 -0
  688. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/adventure.md +0 -0
  689. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/card-game.md +0 -0
  690. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/fighting.md +0 -0
  691. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/horror.md +0 -0
  692. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/idle-incremental.md +0 -0
  693. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/metroidvania.md +0 -0
  694. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/moba.md +0 -0
  695. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/party-game.md +0 -0
  696. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/puzzle.md +0 -0
  697. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/racing.md +0 -0
  698. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/rhythm.md +0 -0
  699. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/roguelike.md +0 -0
  700. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/rpg.md +0 -0
  701. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/sandbox.md +0 -0
  702. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/shooter.md +0 -0
  703. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/simulation.md +0 -0
  704. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/sports.md +0 -0
  705. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/strategy.md +0 -0
  706. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/survival.md +0 -0
  707. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/text-based.md +0 -0
  708. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/tower-defense.md +0 -0
  709. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/turn-based-tactics.md +0 -0
  710. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/visual-novel.md +0 -0
  711. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types.csv +0 -0
  712. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/gdd-template.md +0 -0
  713. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/narrative/checklist.md +0 -0
  714. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/narrative/narrative-template.md +0 -0
@@ -1,267 +1,978 @@
1
- # PRD Workflow - Small Projects (Level 0-1)
1
+ # Tech-Spec Workflow - Context-Aware Technical Planning (quick-flow)
2
2
 
3
3
  <workflow>
4
4
 
5
- <critical>The workflow execution engine is governed by: {project_root}/bmad/core/tasks/workflow.xml</critical>
5
+ <critical>The workflow execution engine is governed by: {project-root}/{bmad_folder}/core/tasks/workflow.xml</critical>
6
6
  <critical>You MUST have already loaded and processed: {installed_path}/workflow.yaml</critical>
7
7
  <critical>Communicate all responses in {communication_language} and language MUST be tailored to {user_skill_level}</critical>
8
8
  <critical>Generate all documents in {document_output_language}</critical>
9
- <critical>This is the SMALL instruction set for Level 0-1 projects - tech-spec with story generation</critical>
10
- <critical>Level 0: tech-spec + single user story | Level 1: tech-spec + epic/stories</critical>
11
- <critical>Project analysis already completed - proceeding directly to technical specification</critical>
12
- <critical>NO PRD generated - uses tech_spec_template + story templates</critical>
13
-
9
+ <critical>This is quick-flow efforts - tech-spec with context-rich story generation</critical>
10
+ <critical>Quick Flow: tech-spec + epic with 1-5 stories (always generates epic structure)</critical>
11
+ <critical>LIVING DOCUMENT: Write to tech-spec.md continuously as you discover - never wait until the end</critical>
12
+ <critical>CONTEXT IS KING: Gather ALL available context before generating specs</critical>
14
13
  <critical>DOCUMENT OUTPUT: Technical, precise, definitive. Specific versions only. User skill level ({user_skill_level}) affects conversation style ONLY, not document content.</critical>
14
+ <critical>Input documents specified in workflow.yaml input_file_patterns - workflow engine handles fuzzy matching, whole vs sharded document discovery automatically</critical>
15
+ <critical>⚠️ ABSOLUTELY NO TIME ESTIMATES - NEVER mention hours, days, weeks, months, or ANY time-based predictions. AI has fundamentally changed development speed - what once took teams weeks/months can now be done by one person in hours. DO NOT give ANY time estimates whatsoever.</critical>
16
+ <critical>⚠️ CHECKPOINT PROTOCOL: After EVERY <template-output> tag, you MUST follow workflow.xml substep 2c: SAVE content to file immediately → SHOW checkpoint separator (━━━━━━━━━━━━━━━━━━━━━━━) → DISPLAY generated content → PRESENT options [a]Advanced Elicitation/[c]Continue/[p]Party-Mode/[y]YOLO → WAIT for user response. Never batch saves or skip checkpoints.</critical>
15
17
 
16
- <step n="0" goal="Validate workflow and extract project configuration">
18
+ <step n="0" goal="Validate workflow readiness and detect project level" tag="workflow-status">
19
+ <action>Check if {output_folder}/bmm-workflow-status.yaml exists</action>
17
20
 
18
- <invoke-workflow path="{project-root}/bmad/bmm/workflows/workflow-status">
19
- <param>mode: data</param>
20
- <param>data_request: project_config</param>
21
- </invoke-workflow>
21
+ <check if="status file not found">
22
+ <output>No workflow status file found. Tech-spec workflow can run standalone or as part of BMM workflow path.</output>
23
+ <output>**Recommended:** Run `workflow-init` first for project context tracking and workflow sequencing.</output>
24
+ <output>**Quick Start:** Continue in standalone mode - perfect for rapid prototyping and quick changes!</output>
25
+ <ask>Continue in standalone mode or exit to run workflow-init? (continue/exit)</ask>
26
+ <check if="continue">
27
+ <action>Set standalone_mode = true</action>
22
28
 
23
- <check if="status_exists == false">
24
- <output>**Note: No Workflow Status File Found**
29
+ <output>Great! Let's quickly configure your project...</output>
25
30
 
26
- The tech-spec workflow can run standalone or as part of the BMM workflow path.
31
+ <ask>How many user stories do you think this work requires?
27
32
 
28
- **Recommended:** Run `workflow-init` first for:
33
+ **Single Story** - Simple change (bug fix, small isolated feature, single file change)
34
+ → Generates: tech-spec + epic (minimal) + 1 story
35
+ → Example: "Fix login validation bug" or "Add email field to user form"
29
36
 
30
- - Project context tracking
31
- - Workflow sequencing guidance
32
- - Progress monitoring across workflows
37
+ **Multiple Stories (2-5)** - Coherent feature (multiple related changes, small feature set)
38
+ → Generates: tech-spec + epic (detailed) + 2-5 stories
39
+ Example: "Add OAuth integration" or "Build user profile page"
33
40
 
34
- **Or continue standalone** without progress tracking.
35
- </output>
36
- <ask>Continue in standalone mode or exit to run workflow-init? (continue/exit)</ask>
37
- <check if="continue">
38
- <action>Set standalone_mode = true</action>
41
+ Enter **1** for single story, or **2-5** for number of stories you estimate</ask>
42
+
43
+ <action>Capture user response as story_count (1-5)</action>
44
+ <action>Validate: If not 1-5, ask for clarification. If > 5, suggest using full BMad Method instead</action>
45
+
46
+ <ask if="not already known greenfield vs brownfield">Is this a **greenfield** (new/empty codebase) or **brownfield** (existing codebase) project?
47
+
48
+ **Greenfield** - Starting fresh, no existing code aside from starter templates
49
+ **Brownfield** - Adding to or modifying existing functional code or project
50
+
51
+ Enter **greenfield** or **brownfield**:</ask>
52
+
53
+ <action>Capture user response as field_type (greenfield or brownfield)</action>
54
+ <action>Validate: If not greenfield or brownfield, ask again</action>
55
+
56
+ <output>Perfect! Running as:
57
+
58
+ - **Story Count:** {{story_count}} {{#if story_count == 1}}story (minimal epic){{else}}stories (detailed epic){{/if}}
59
+ - **Field Type:** {{field_type}}
60
+ - **Mode:** Standalone (no status file tracking)
61
+
62
+ Let's build your tech-spec!</output>
39
63
  </check>
40
64
  <check if="exit">
41
65
  <action>Exit workflow</action>
42
66
  </check>
43
67
  </check>
44
68
 
45
- <check if="status_exists == true">
46
- <action>Store {{status_file_path}} for later updates</action>
69
+ <check if="status file found">
70
+ <action>Load the FULL file: {workflow-status}</action>
71
+ <action>Parse workflow_status section</action>
72
+ <action>Check status of "tech-spec" workflow</action>
73
+ <action>Get selected_track from YAML metadata indicating this is quick-flow-greenfield or quick-flow-brownfield</action>
74
+ <action>Get field_type from YAML metadata (greenfield or brownfield)</action>
75
+ <action>Find first non-completed workflow (next expected workflow)</action>
76
+
77
+ <check if="selected_track is NOT quick-flow-greenfield AND NOT quick-flow-brownfield">
78
+ <output>**Incorrect Workflow for Level {{selected_track}}**
79
+ Tech-spec is for Simple projects. **Correct workflow:** `create-prd` (PM agent). You should Exit at this point, unless you want to force run this workflow.
80
+ </output>
81
+ </check>
47
82
 
48
- <check if="project_level >= 2">
49
- <output>**Incorrect Workflow for Level {{project_level}}**
83
+ <check if="tech-spec status is file path (already completed)">
84
+ <output>⚠️ Tech-spec already completed: {{tech-spec status}}</output>
85
+ <ask>Re-running will overwrite the existing tech-spec. Continue? (y/n)</ask>
86
+ <check if="n">
87
+ <output>Exiting. Use workflow-status to see your next step.</output>
88
+ <action>Exit workflow</action>
89
+ </check>
90
+ </check>
50
91
 
51
- Tech-spec is for Level 0-1 projects. Level 2-4 should use PRD workflow.
92
+ <check if="tech-spec is not the next expected workflow">
93
+ <output>⚠️ Next expected workflow: {{next_workflow}}. Tech-spec is out of sequence.</output>
94
+ <ask>Continue with tech-spec anyway? (y/n)</ask>
95
+ <check if="n">
96
+ <output>Exiting. Run {{next_workflow}} instead.</output>
97
+ <action>Exit workflow</action>
98
+ </check>
99
+ </check>
52
100
 
53
- **Correct workflow:** `prd` (PM agent)
54
- </output>
55
- <action>Exit and redirect to prd</action>
101
+ <action>Set standalone_mode = false</action>
56
102
  </check>
103
+ </step>
57
104
 
58
- <check if="project_type == game">
59
- <output>**Incorrect Workflow for Game Projects**
105
+ <step n="0.5" goal="Discover and load input documents">
106
+ <invoke-protocol name="discover_inputs" />
107
+ <note>After discovery, these content variables are available: {product_brief_content}, {research_content}, {document_project_content}</note>
108
+ </step>
60
109
 
61
- Game projects should use GDD workflow instead of tech-spec.
110
+ <step n="1" goal="Comprehensive context discovery - gather everything available">
62
111
 
63
- **Correct workflow:** `gdd` (PM agent)
64
- </output>
65
- <action>Exit and redirect to gdd</action>
112
+ <action>Welcome {user_name} warmly and explain what we're about to do:
113
+
114
+ "I'm going to gather all available context about your project before we dive into the technical spec. The following content has been auto-loaded:
115
+
116
+ - Product briefs and research: {product_brief_content}, {research_content}
117
+ - Brownfield codebase documentation: {document_project_content} (loaded via INDEX_GUIDED strategy)
118
+ - Your project's tech stack and dependencies
119
+ - Existing code patterns and structure
120
+
121
+ This ensures the tech-spec is grounded in reality and gives developers everything they need."
122
+ </action>
123
+
124
+ <action>**PHASE 1: Load Existing Documents**
125
+
126
+ Search for and load (using dual-strategy: whole first, then sharded):
127
+
128
+ 1. **Product Brief:**
129
+ - Search pattern: {output*folder}/\_brief*.md
130
+ - Sharded: {output*folder}/\_brief*/index.md
131
+ - If found: Load completely and extract key context
132
+
133
+ 2. **Research Documents:**
134
+ - Search pattern: {output*folder}/\_research*.md
135
+ - Sharded: {output*folder}/\_research*/index.md
136
+ - If found: Load completely and extract insights
137
+
138
+ 3. **Document-Project Output (CRITICAL for brownfield):**
139
+ - Always check: {output_folder}/index.md
140
+ - If found: This is the brownfield codebase map - load ALL shards!
141
+ - Extract: File structure, key modules, existing patterns, naming conventions
142
+
143
+ Create a summary of what was found and ask user if there are other documents or information to consider before proceeding:
144
+
145
+ - List of loaded documents
146
+ - Key insights from each
147
+ - Brownfield vs greenfield determination
148
+ </action>
149
+
150
+ <action>**PHASE 2: Intelligently Detect Project Stack**
151
+
152
+ Use your comprehensive knowledge as a coding-capable LLM to analyze the project:
153
+
154
+ **Discover Setup Files:**
155
+
156
+ - Search {project-root} for dependency manifests (package.json, requirements.txt, Gemfile, go.mod, Cargo.toml, composer.json, pom.xml, build.gradle, pyproject.toml, etc.)
157
+ - Adapt to ANY project type - you know the ecosystem conventions
158
+
159
+ **Extract Critical Information:**
160
+
161
+ 1. Framework name and EXACT version (e.g., "React 18.2.0", "Django 4.2.1")
162
+ 2. All production dependencies with specific versions
163
+ 3. Dev tools and testing frameworks (Jest, pytest, ESLint, etc.)
164
+ 4. Available build/test scripts
165
+ 5. Project type (web app, API, CLI, library, etc.)
166
+
167
+ **Assess Currency:**
168
+
169
+ - Identify if major dependencies are outdated (>2 years old)
170
+ - Use WebSearch to find current recommended versions if needed
171
+ - Note migration complexity in your summary
172
+
173
+ **For Greenfield Projects:**
174
+ <check if="field_type == greenfield">
175
+ <action>Use WebSearch to discover current best practices and official starter templates</action>
176
+ <action>Recommend appropriate starters based on detected framework (or user's intended stack)</action>
177
+ <action>Present benefits conversationally: setup time saved, modern patterns, testing included</action>
178
+ <ask>Would you like to use a starter template? (yes/no/show-me-options)</ask>
179
+ <action>Capture preference and include in implementation stack if accepted</action>
66
180
  </check>
181
+
182
+ **Trust Your Intelligence:**
183
+ You understand project ecosystems deeply. Adapt your analysis to any stack - don't be constrained by examples. Extract what matters for developers.
184
+
185
+ Store comprehensive findings as {{project_stack_summary}}
186
+ </action>
187
+
188
+ <action>**PHASE 3: Brownfield Codebase Reconnaissance** (if applicable)
189
+
190
+ <check if="field_type == brownfield OR document-project output found">
191
+
192
+ Analyze the existing project structure:
193
+
194
+ 1. **Directory Structure:**
195
+ - Identify main code directories (src/, lib/, app/, components/, services/)
196
+ - Note organization patterns (feature-based, layer-based, domain-driven)
197
+ - Identify test directories and patterns
198
+
199
+ 2. **Code Patterns:**
200
+ - Look for dominant patterns (class-based, functional, MVC, microservices)
201
+ - Identify naming conventions (camelCase, snake_case, PascalCase)
202
+ - Note file organization patterns
203
+
204
+ 3. **Key Modules/Services:**
205
+ - Identify major modules or services already in place
206
+ - Note entry points (main.js, app.py, index.ts)
207
+ - Document important utilities or shared code
208
+
209
+ 4. **Testing Patterns & Standards (CRITICAL):**
210
+ - Identify test framework in use (from package.json/requirements.txt)
211
+ - Note test file naming patterns (.test.js, test.py, .spec.ts, Test.java)
212
+ - Document test organization (tests/, **tests**, spec/, test/)
213
+ - Look for test configuration files (jest.config.js, pytest.ini, .rspec)
214
+ - Check for coverage requirements (in CI config, test scripts)
215
+ - Identify mocking/stubbing libraries (jest.mock, unittest.mock, sinon)
216
+ - Note assertion styles (expect, assert, should)
217
+
218
+ 5. **Code Style & Conventions (MUST CONFORM):**
219
+ - Check for linter config (.eslintrc, .pylintrc, rubocop.yml)
220
+ - Check for formatter config (.prettierrc, .black, .editorconfig)
221
+ - Identify code style:
222
+ - Semicolons: yes/no (JavaScript/TypeScript)
223
+ - Quotes: single/double
224
+ - Indentation: spaces/tabs, size
225
+ - Line length limits
226
+ - Import/export patterns (named vs default, organization)
227
+ - Error handling patterns (try/catch, Result types, error classes)
228
+ - Logging patterns (console, winston, logging module, specific formats)
229
+ - Documentation style (JSDoc, docstrings, YARD, JavaDoc)
230
+
231
+ Store this as {{existing_structure_summary}}
232
+
233
+ **CRITICAL: Confirm Conventions with User**
234
+ <ask>I've detected these conventions in your codebase:
235
+
236
+ **Code Style:**
237
+ {{detected_code_style}}
238
+
239
+ **Test Patterns:**
240
+ {{detected_test_patterns}}
241
+
242
+ **File Organization:**
243
+ {{detected_file_organization}}
244
+
245
+ Should I follow these existing conventions for the new code?
246
+
247
+ Enter **yes** to conform to existing patterns, or **no** if you want to establish new standards:</ask>
248
+
249
+ <action>Capture user response as conform_to_conventions (yes/no)</action>
250
+
251
+ <check if="conform_to_conventions == no">
252
+ <ask>What conventions would you like to use instead? (Or should I suggest modern best practices?)</ask>
253
+ <action>Capture new conventions or use WebSearch for current best practices</action>
67
254
  </check>
68
- </step>
69
255
 
70
- <step n="0.5" goal="Validate workflow sequencing">
256
+ <action>Store confirmed conventions as {{existing_conventions}}</action>
71
257
 
72
- <invoke-workflow path="{project-root}/bmad/bmm/workflows/workflow-status">
73
- <param>mode: validate</param>
74
- <param>calling_workflow: tech-spec</param>
75
- </invoke-workflow>
258
+ </check>
76
259
 
77
- <check if="warning != ''">
78
- <output>{{warning}}</output>
79
- <ask>Continue with tech-spec anyway? (y/n)</ask>
80
- <check if="n">
81
- <output>{{suggestion}}</output>
82
- <action>Exit workflow</action>
83
- </check>
260
+ <check if="field_type == greenfield">
261
+ <action>Note: Greenfield project - no existing code to analyze</action>
262
+ <action>Set {{existing_structure_summary}} = "Greenfield project - new codebase"</action>
84
263
  </check>
264
+
265
+ </action>
266
+
267
+ <action>**PHASE 4: Synthesize Context Summary**
268
+
269
+ Create {{loaded_documents_summary}} that includes:
270
+
271
+ - Documents found and loaded
272
+ - Brownfield vs greenfield status
273
+ - Tech stack detected (or "To be determined" if greenfield)
274
+ - Existing patterns identified (or "None - greenfield" if applicable)
275
+
276
+ Present this summary to {user_name} conversationally:
277
+
278
+ "Here's what I found about your project:
279
+
280
+ **Documents Available:**
281
+ [List what was found]
282
+
283
+ **Project Type:**
284
+ [Brownfield with X framework Y version OR Greenfield - new project]
285
+
286
+ **Existing Stack:**
287
+ [Framework and dependencies OR "To be determined"]
288
+
289
+ **Code Structure:**
290
+ [Existing patterns OR "New codebase"]
291
+
292
+ This gives me a solid foundation for creating a context-rich tech spec!"
293
+ </action>
294
+
295
+ <template-output>loaded_documents_summary</template-output>
296
+ <template-output>project_stack_summary</template-output>
297
+ <template-output>existing_structure_summary</template-output>
298
+
85
299
  </step>
86
300
 
87
- <step n="1" goal="Confirm project scope and update tracking">
301
+ <step n="2" goal="Conversational discovery of the change/feature">
88
302
 
89
- <action>Use {{project_level}} from status data</action>
303
+ <action>Engage {user_name} in natural, adaptive conversation to deeply understand what needs to be built.
90
304
 
91
- <action>Update Workflow Status:</action>
92
- <template-output file="{{status_file_path}}">current_workflow</template-output>
93
- <check if="project_level == 0">
94
- <action>Set to: "tech-spec (Level 0 - generating tech spec)"</action>
95
- </check>
96
- <check if="project_level == 1">
97
- <action>Set to: "tech-spec (Level 1 - generating tech spec)"</action>
98
- </check>
305
+ **Discovery Approach:**
306
+ Adapt your questioning style to the complexity:
99
307
 
100
- <template-output file="{{status_file_path}}">progress_percentage</template-output>
101
- <action>Set to: 20%</action>
308
+ - For single-story changes: Focus on the specific problem, location, and approach
309
+ - For multi-story features: Explore user value, integration strategy, and scope boundaries
102
310
 
103
- <action>Save {{status_file_path}}</action>
311
+ **Core Discovery Goals (accomplish through natural dialogue):**
104
312
 
105
- <check if="project_level == 0">
106
- <action>Confirm Level 0 - Single atomic change</action>
107
- <ask>Please describe the specific change/fix you need to implement:</ask>
108
- </check>
313
+ 1. **The Problem/Need**
314
+ - What user or technical problem are we solving?
315
+ - Why does this matter now?
316
+ - What's the impact if we don't do this?
109
317
 
110
- <check if="project_level == 1">
111
- <action>Confirm Level 1 - Coherent feature</action>
112
- <ask>Please describe the feature you need to implement:</ask>
113
- </check>
318
+ 2. **The Solution Approach**
319
+ - What's the proposed solution?
320
+ - How should this work from a user/system perspective?
321
+ - What alternatives were considered?
322
+
323
+ 3. **Integration & Location**
324
+ - <check if="brownfield">Where does this fit in the existing codebase?</check>
325
+ - What existing code/patterns should we reference or follow?
326
+ - What are the integration points?
327
+
328
+ 4. **Scope Clarity**
329
+ - What's IN scope for this work?
330
+ - What's explicitly OUT of scope (future work, not needed)?
331
+ - If multiple stories: What's MVP vs enhancement?
332
+
333
+ 5. **Constraints & Dependencies**
334
+ - Technical limitations or requirements?
335
+ - Dependencies on other systems, APIs, or services?
336
+ - Performance, security, or compliance considerations?
337
+
338
+ 6. **Success Criteria**
339
+ - How will we know this is done correctly?
340
+ - What does "working" look like?
341
+ - What edge cases matter?
342
+
343
+ **Conversation Style:**
344
+
345
+ - Be warm and collaborative, not interrogative
346
+ - Ask follow-up questions based on their responses
347
+ - Help them think through implications
348
+ - Reference context from Phase 1 (existing code, stack, patterns)
349
+ - Adapt depth to {{story_count}} complexity
350
+
351
+ Synthesize discoveries into clear, comprehensive specifications.
352
+ </action>
353
+
354
+ <template-output>problem_statement</template-output>
355
+ <template-output>solution_overview</template-output>
356
+ <template-output>change_type</template-output>
357
+ <template-output>scope_in</template-output>
358
+ <template-output>scope_out</template-output>
114
359
 
115
360
  </step>
116
361
 
117
- <step n="2" goal="Generate DEFINITIVE tech spec">
362
+ <step n="3" goal="Generate context-aware, definitive technical specification">
118
363
 
119
- <critical>Generate tech-spec.md - this is the TECHNICAL SOURCE OF TRUTH</critical>
120
364
  <critical>ALL TECHNICAL DECISIONS MUST BE DEFINITIVE - NO AMBIGUITY ALLOWED</critical>
365
+ <critical>Use existing stack info to make SPECIFIC decisions</critical>
366
+ <critical>Reference brownfield code to guide implementation</critical>
367
+
368
+ <action>Initialize tech-spec.md with the rich template</action>
369
+
370
+ <action>**Generate Context Section (already captured):**
371
+
372
+ These template variables are already populated from Step 1:
373
+
374
+ - {{loaded_documents_summary}}
375
+ - {{project_stack_summary}}
376
+ - {{existing_structure_summary}}
377
+
378
+ Just save them to the file.
379
+ </action>
380
+
381
+ <template-output file="tech-spec.md">loaded_documents_summary</template-output>
382
+ <template-output file="tech-spec.md">project_stack_summary</template-output>
383
+ <template-output file="tech-spec.md">existing_structure_summary</template-output>
384
+
385
+ <action>**Generate The Change Section:**
386
+
387
+ Already captured from Step 2:
388
+
389
+ - {{problem_statement}}
390
+ - {{solution_overview}}
391
+ - {{scope_in}}
392
+ - {{scope_out}}
121
393
 
122
- <action>Update progress:</action>
123
- <template-output file="{{status_file_path}}">progress_percentage</template-output>
124
- <action>Set to: 40%</action>
125
- <action>Save {{status_file_path}}</action>
394
+ Save to file.
395
+ </action>
126
396
 
127
- <action>Initialize and write out tech-spec.md using tech_spec_template</action>
397
+ <template-output file="tech-spec.md">problem_statement</template-output>
398
+ <template-output file="tech-spec.md">solution_overview</template-output>
399
+ <template-output file="tech-spec.md">scope_in</template-output>
400
+ <template-output file="tech-spec.md">scope_out</template-output>
128
401
 
129
- <critical>DEFINITIVE DECISIONS REQUIRED:</critical>
402
+ <action>**Generate Implementation Details:**
130
403
 
131
- **BAD Examples (NEVER DO THIS):**
404
+ Now make DEFINITIVE technical decisions using all the context gathered.
132
405
 
133
- - "Python 2 or 3"
134
- - "Use a logger like pino or winston" ❌
406
+ **Source Tree Changes - BE SPECIFIC:**
135
407
 
136
- **GOOD Examples (ALWAYS DO THIS):**
408
+ Bad (NEVER do this):
137
409
 
138
- - "Python 3.11"
139
- - "winston v3.8.2 for logging"
410
+ - "Update some files in the services folder"
411
+ - "Add tests somewhere"
140
412
 
141
- **Source Tree Structure**: EXACT file changes needed
142
- <template-output file="tech-spec.md">source_tree</template-output>
413
+ Good (ALWAYS do this):
414
+
415
+ - "src/services/UserService.ts - MODIFY - Add validateEmail() method at line 45"
416
+ - "src/routes/api/users.ts - MODIFY - Add POST /users/validate endpoint"
417
+ - "tests/services/UserService.test.ts - CREATE - Test suite for email validation"
418
+
419
+ Include:
420
+
421
+ - Exact file paths
422
+ - Action: CREATE, MODIFY, DELETE
423
+ - Specific what changes (methods, classes, endpoints, components)
424
+
425
+ **Use brownfield context:**
426
+
427
+ - If modifying existing files, reference current structure
428
+ - Follow existing naming patterns
429
+ - Place new code logically based on current organization
430
+ </action>
431
+
432
+ <template-output file="tech-spec.md">source_tree_changes</template-output>
433
+
434
+ <action>**Technical Approach - BE DEFINITIVE:**
435
+
436
+ Bad (ambiguous):
437
+
438
+ - "Use a logging library like winston or pino"
439
+ - "Use Python 2 or 3"
440
+ - "Set up some kind of validation"
441
+
442
+ Good (definitive):
443
+
444
+ - "Use winston v3.8.2 (already in package.json) for logging"
445
+ - "Implement using Python 3.11 as specified in pyproject.toml"
446
+ - "Use Joi v17.9.0 for request validation following pattern in UserController.ts"
447
+
448
+ **Use detected stack:**
449
+
450
+ - Reference exact versions from package.json/requirements.txt
451
+ - Specify frameworks already in use
452
+ - Make decisions based on what's already there
453
+
454
+ **For greenfield:**
455
+
456
+ - Make definitive choices and justify them
457
+ - Specify exact versions
458
+ - No "or" statements allowed
459
+ </action>
143
460
 
144
- **Technical Approach**: SPECIFIC implementation for the change
145
461
  <template-output file="tech-spec.md">technical_approach</template-output>
146
462
 
147
- **Implementation Stack**: DEFINITIVE tools and versions
463
+ <action>**Existing Patterns to Follow:**
464
+
465
+ <check if="brownfield">
466
+ Document patterns from the existing codebase:
467
+ - Class structure patterns
468
+ - Function naming conventions
469
+ - Error handling approach
470
+ - Testing patterns
471
+ - Documentation style
472
+
473
+ Example:
474
+ "Follow the service pattern established in UserService.ts:
475
+
476
+ - Export class with constructor injection
477
+ - Use async/await for all asynchronous operations
478
+ - Throw ServiceError with error codes
479
+ - Include JSDoc comments for all public methods"
480
+ </check>
481
+
482
+ <check if="greenfield">
483
+ "Greenfield project - establishing new patterns:
484
+ - [Define the patterns to establish]"
485
+ </check>
486
+
487
+ </action>
488
+
489
+ <template-output file="tech-spec.md">existing_patterns</template-output>
490
+
491
+ <action>**Integration Points:**
492
+
493
+ Identify how this change connects:
494
+
495
+ - Internal modules it depends on
496
+ - External APIs or services
497
+ - Database interactions
498
+ - Event emitters/listeners
499
+ - State management
500
+
501
+ Be specific about interfaces and contracts.
502
+ </action>
503
+
504
+ <template-output file="tech-spec.md">integration_points</template-output>
505
+
506
+ <action>**Development Context:**
507
+
508
+ **Relevant Existing Code:**
509
+ <check if="brownfield">
510
+ Reference specific files or code sections developers should review:
511
+
512
+ - "See UserService.ts lines 120-150 for similar validation pattern"
513
+ - "Reference AuthMiddleware.ts for authentication approach"
514
+ - "Follow error handling in PaymentService.ts"
515
+ </check>
516
+
517
+ **Framework/Libraries:**
518
+ List with EXACT versions from detected stack:
519
+
520
+ - Express 4.18.2 (web framework)
521
+ - winston 3.8.2 (logging)
522
+ - Joi 17.9.0 (validation)
523
+ - TypeScript 5.1.6 (language)
524
+
525
+ **Internal Modules:**
526
+ List internal dependencies:
527
+
528
+ - @/services/UserService
529
+ - @/middleware/auth
530
+ - @/utils/validation
531
+
532
+ **Configuration Changes:**
533
+ Any config files to update:
534
+
535
+ - Update .env with new SMTP settings
536
+ - Add validation schema to config/schemas.ts
537
+ - Update package.json scripts if needed
538
+ </action>
539
+
540
+ <template-output file="tech-spec.md">existing_code_references</template-output>
541
+ <template-output file="tech-spec.md">framework_dependencies</template-output>
542
+ <template-output file="tech-spec.md">internal_dependencies</template-output>
543
+ <template-output file="tech-spec.md">configuration_changes</template-output>
544
+
545
+ <check if="field_type == brownfield">
546
+ <template-output file="tech-spec.md">existing_conventions</template-output>
547
+ </check>
548
+
549
+ <check if="field_type == greenfield">
550
+ <action>Set {{existing_conventions}} = "Greenfield project - establishing new conventions per modern best practices"</action>
551
+ <template-output file="tech-spec.md">existing_conventions</template-output>
552
+ </check>
553
+
554
+ <action>**Implementation Stack:**
555
+
556
+ Comprehensive stack with versions:
557
+
558
+ - Runtime: Node.js 20.x
559
+ - Framework: Express 4.18.2
560
+ - Language: TypeScript 5.1.6
561
+ - Testing: Jest 29.5.0
562
+ - Linting: ESLint 8.42.0
563
+ - Validation: Joi 17.9.0
564
+
565
+ All from detected project setup!
566
+ </action>
567
+
148
568
  <template-output file="tech-spec.md">implementation_stack</template-output>
149
569
 
150
- **Technical Details**: PRECISE change details
570
+ <action>**Technical Details:**
571
+
572
+ Deep technical specifics:
573
+
574
+ - Algorithms to implement
575
+ - Data structures to use
576
+ - Performance considerations
577
+ - Security considerations
578
+ - Error scenarios and handling
579
+ - Edge cases
580
+
581
+ Be thorough - developers need details!
582
+ </action>
583
+
151
584
  <template-output file="tech-spec.md">technical_details</template-output>
152
585
 
153
- **Testing Approach**: How to verify the change
154
- <template-output file="tech-spec.md">testing_approach</template-output>
586
+ <action>**Development Setup:**
155
587
 
156
- **Deployment Strategy**: How to deploy the change
157
- <template-output file="tech-spec.md">deployment_strategy</template-output>
588
+ What does a developer need to run this locally?
158
589
 
159
- <invoke-task halt="true">{project-root}/bmad/core/tasks/adv-elicit.xml</invoke-task>
590
+ Based on detected stack and scripts:
160
591
 
161
- </step>
592
+ ```
593
+ 1. Clone repo (if not already)
594
+ 2. npm install (installs all deps from package.json)
595
+ 3. cp .env.example .env (configure environment)
596
+ 4. npm run dev (starts development server)
597
+ 5. npm test (runs test suite)
598
+ ```
162
599
 
163
- <step n="3" goal="Validate cohesion" optional="true">
600
+ Or for Python:
164
601
 
165
- <action>Offer to run cohesion validation</action>
602
+ ```
603
+ 1. python -m venv venv
604
+ 2. source venv/bin/activate
605
+ 3. pip install -r requirements.txt
606
+ 4. python manage.py runserver
607
+ ```
166
608
 
167
- <ask>Tech-spec complete! Before proceeding to implementation, would you like to validate project cohesion?
609
+ Use the actual scripts from package.json/setup files!
610
+ </action>
168
611
 
169
- **Cohesion Validation** checks:
612
+ <template-output file="tech-spec.md">development_setup</template-output>
170
613
 
171
- - Tech spec completeness and definitiveness
172
- - Feature sequencing and dependencies
173
- - External dependencies properly planned
174
- - User/agent responsibilities clear
175
- - Greenfield/brownfield-specific considerations
614
+ <action>**Implementation Guide:**
176
615
 
177
- Run cohesion validation? (y/n)</ask>
616
+ **Setup Steps:**
617
+ Pre-implementation checklist:
178
618
 
179
- <check if="yes">
180
- <action>Load {installed_path}/checklist.md</action>
181
- <action>Review tech-spec.md against "Cohesion Validation (All Levels)" section</action>
182
- <action>Focus on Section A (Tech Spec), Section D (Feature Sequencing)</action>
183
- <action>Apply Section B (Greenfield) or Section C (Brownfield) based on field_type</action>
184
- <action>Generate validation report with findings</action>
185
- </check>
619
+ - Create feature branch
620
+ - Verify dev environment running
621
+ - Review existing code references
622
+ - Set up test data if needed
186
623
 
187
- </step>
624
+ **Implementation Steps:**
625
+ Step-by-step breakdown:
188
626
 
189
- <step n="4" goal="Generate user stories based on project level">
627
+ For single-story changes:
190
628
 
191
- <action>Use {{project_level}} from status data</action>
629
+ 1. [Step 1 with specific file and action]
630
+ 2. [Step 2 with specific file and action]
631
+ 3. [Write tests]
632
+ 4. [Verify acceptance criteria]
192
633
 
193
- <check if="project_level == 0">
194
- <action>Invoke instructions-level0-story.md to generate single user story</action>
195
- <action>Story will be saved to user-story.md</action>
196
- <action>Story links to tech-spec.md for technical implementation details</action>
197
- </check>
634
+ For multi-story features:
635
+ Organize by story/phase:
636
+
637
+ 1. Phase 1: [Foundation work]
638
+ 2. Phase 2: [Core implementation]
639
+ 3. Phase 3: [Testing and validation]
640
+
641
+ **Testing Strategy:**
642
+
643
+ - Unit tests for [specific functions]
644
+ - Integration tests for [specific flows]
645
+ - Manual testing checklist
646
+ - Performance testing if applicable
647
+
648
+ **Acceptance Criteria:**
649
+ Specific, measurable, testable criteria:
650
+
651
+ 1. Given [scenario], when [action], then [outcome]
652
+ 2. [Metric] meets [threshold]
653
+ 3. [Feature] works in [environment]
654
+ </action>
198
655
 
199
- <check if="project_level == 1">
200
- <action>Invoke instructions-level1-stories.md to generate epic and stories</action>
201
- <action>Epic and stories will be saved to epics.md
202
- <action>Stories link to tech-spec.md implementation tasks</action>
656
+ <template-output file="tech-spec.md">setup_steps</template-output>
657
+ <template-output file="tech-spec.md">implementation_steps</template-output>
658
+ <template-output file="tech-spec.md">testing_strategy</template-output>
659
+ <template-output file="tech-spec.md">acceptance_criteria</template-output>
660
+
661
+ <action>**Developer Resources:**
662
+
663
+ **File Paths Reference:**
664
+ Complete list of all files involved:
665
+
666
+ - /src/services/UserService.ts
667
+ - /src/routes/api/users.ts
668
+ - /tests/services/UserService.test.ts
669
+ - /src/types/user.ts
670
+
671
+ **Key Code Locations:**
672
+ Important functions, classes, modules:
673
+
674
+ - UserService class (src/services/UserService.ts:15)
675
+ - validateUser function (src/utils/validation.ts:42)
676
+ - User type definition (src/types/user.ts:8)
677
+
678
+ **Testing Locations:**
679
+ Where tests go:
680
+
681
+ - Unit: tests/services/
682
+ - Integration: tests/integration/
683
+ - E2E: tests/e2e/
684
+
685
+ **Documentation to Update:**
686
+ Docs that need updating:
687
+
688
+ - README.md - Add new endpoint documentation
689
+ - API.md - Document /users/validate endpoint
690
+ - CHANGELOG.md - Note the new feature
691
+ </action>
692
+
693
+ <template-output file="tech-spec.md">file_paths_complete</template-output>
694
+ <template-output file="tech-spec.md">key_code_locations</template-output>
695
+ <template-output file="tech-spec.md">testing_locations</template-output>
696
+ <template-output file="tech-spec.md">documentation_updates</template-output>
697
+
698
+ <action>**UX/UI Considerations:**
699
+
700
+ <check if="change affects user interface OR user experience">
701
+ **Determine if this change has UI/UX impact:**
702
+ - Does it change what users see?
703
+ - Does it change how users interact?
704
+ - Does it affect user workflows?
705
+
706
+ If YES, document:
707
+
708
+ **UI Components Affected:**
709
+
710
+ - List specific components (buttons, forms, modals, pages)
711
+ - Note which need creation vs modification
712
+
713
+ **UX Flow Changes:**
714
+
715
+ - Current flow vs new flow
716
+ - User journey impact
717
+ - Navigation changes
718
+
719
+ **Visual/Interaction Patterns:**
720
+
721
+ - Follow existing design system? (check for design tokens, component library)
722
+ - New patterns needed?
723
+ - Responsive design considerations (mobile, tablet, desktop)
724
+
725
+ **Accessibility:**
726
+
727
+ - Keyboard navigation requirements
728
+ - Screen reader compatibility
729
+ - ARIA labels needed
730
+ - Color contrast standards
731
+
732
+ **User Feedback:**
733
+
734
+ - Loading states
735
+ - Error messages
736
+ - Success confirmations
737
+ - Progress indicators
738
+ </check>
739
+
740
+ <check if="no UI/UX impact">
741
+ "No UI/UX impact - backend/API/infrastructure change only"
203
742
  </check>
743
+ </action>
744
+
745
+ <template-output file="tech-spec.md">ux_ui_considerations</template-output>
746
+
747
+ <action>**Testing Approach:**
748
+
749
+ Comprehensive testing strategy using {{test_framework_info}}:
750
+
751
+ **CONFORM TO EXISTING TEST STANDARDS:**
752
+ <check if="conform_to_conventions == yes">
753
+
754
+ - Follow existing test file naming: {{detected_test_patterns.file_naming}}
755
+ - Use existing test organization: {{detected_test_patterns.organization}}
756
+ - Match existing assertion style: {{detected_test_patterns.assertion_style}}
757
+ - Meet existing coverage requirements: {{detected_test_patterns.coverage}}
758
+ </check>
759
+
760
+ **Test Strategy:**
761
+
762
+ - Test framework: {{detected_test_framework}} (from project dependencies)
763
+ - Unit tests for [specific functions/methods]
764
+ - Integration tests for [specific flows/APIs]
765
+ - E2E tests if UI changes
766
+ - Mock/stub strategies (use existing patterns: {{detected_test_patterns.mocking}})
767
+ - Performance benchmarks if applicable
768
+ - Accessibility tests if UI changes
769
+
770
+ **Coverage:**
771
+
772
+ - Unit test coverage: [target %]
773
+ - Integration coverage: [critical paths]
774
+ - Ensure all acceptance criteria have corresponding tests
775
+ </action>
776
+
777
+ <template-output file="tech-spec.md">test_framework_info</template-output>
778
+ <template-output file="tech-spec.md">testing_approach</template-output>
779
+
780
+ <action>**Deployment Strategy:**
781
+
782
+ **Deployment Steps:**
783
+ How to deploy this change:
784
+
785
+ 1. Merge to main branch
786
+ 2. Run CI/CD pipeline
787
+ 3. Deploy to staging
788
+ 4. Verify in staging
789
+ 5. Deploy to production
790
+ 6. Monitor for issues
791
+
792
+ **Rollback Plan:**
793
+ How to undo if problems:
794
+
795
+ 1. Revert commit [hash]
796
+ 2. Redeploy previous version
797
+ 3. Verify rollback successful
798
+
799
+ **Monitoring:**
800
+ What to watch after deployment:
801
+
802
+ - Error rates in [logging service]
803
+ - Response times for [endpoint]
804
+ - User feedback on [feature]
805
+ </action>
806
+
807
+ <template-output file="tech-spec.md">deployment_steps</template-output>
808
+ <template-output file="tech-spec.md">rollback_plan</template-output>
809
+ <template-output file="tech-spec.md">monitoring_approach</template-output>
204
810
 
205
811
  </step>
206
812
 
207
- <step n="5" goal="Finalize and determine next steps">
813
+ <step n="4" goal="Auto-validate cohesion, completeness, and quality">
208
814
 
209
- <action>Confirm tech-spec is complete and definitive</action>
815
+ <critical>Always run validation - this is NOT optional!</critical>
210
816
 
211
- <check if="project_level == 0">
212
- <action>Confirm user-story.md generated successfully</action>
213
- </check>
817
+ <action>Tech-spec generation complete! Now running automatic validation...</action>
214
818
 
215
- <check if="project_level == 1">
216
- <action>Confirm epics.md generated successfully</action>
217
- </check>
819
+ <action>Load {installed_path}/checklist.md</action>
820
+ <action>Review tech-spec.md against ALL checklist criteria:
218
821
 
219
- ## Summary
822
+ **Section 1: Output Files Exist**
220
823
 
221
- <check if="project_level == 0">
222
- - **Level 0 Output**: tech-spec.md + user-story.md
223
- - **No PRD required**
224
- - **Direct to implementation with story tracking**
225
- </check>
824
+ - Verify tech-spec.md created
825
+ - Check for unfilled template variables
826
+
827
+ **Section 2: Context Gathering**
828
+
829
+ - Validate all available documents were loaded
830
+ - Confirm stack detection worked
831
+ - Verify brownfield analysis (if applicable)
832
+
833
+ **Section 3: Tech-Spec Definitiveness**
834
+
835
+ - Scan for "or" statements (FAIL if found)
836
+ - Verify all versions are specific
837
+ - Check stack alignment
838
+
839
+ **Section 4: Context-Rich Content**
840
+
841
+ - Verify all new template sections populated
842
+ - Check existing code references (brownfield)
843
+ - Validate framework dependencies listed
844
+
845
+ **Section 5-6: Story Quality (deferred to Step 5)**
846
+
847
+ **Section 7: Workflow Status (if applicable)**
848
+
849
+ **Section 8: Implementation Readiness**
850
+
851
+ - Can developer start immediately?
852
+ - Is tech-spec comprehensive enough?
853
+ </action>
854
+
855
+ <action>Generate validation report with specific scores:
856
+
857
+ - Context Gathering: [Comprehensive/Partial/Insufficient]
858
+ - Definitiveness: [All definitive/Some ambiguity/Major issues]
859
+ - Brownfield Integration: [N/A/Excellent/Partial/Missing]
860
+ - Stack Alignment: [Perfect/Good/Partial/None]
861
+ - Implementation Readiness: [Yes/No]
862
+ </action>
863
+
864
+ <check if="validation issues found">
865
+ <output>⚠️ **Validation Issues Detected:**
866
+
867
+ {{list_of_issues}}
226
868
 
227
- <check if="project_level == 1">
228
- - **Level 1 Output**: tech-spec.md + epics.md
229
- - **No PRD required**
230
- - **Ready for sprint planning with epic/story breakdown**
869
+ I can fix these automatically. Shall I proceed? (yes/no)</output>
870
+
871
+ <ask>Fix validation issues? (yes/no)</ask>
872
+
873
+ <check if="yes">
874
+ <action>Fix each issue and re-validate</action>
875
+ <output>✅ Issues fixed! Re-validation passed.</output>
876
+ </check>
877
+
878
+ <check if="no">
879
+ <output>⚠️ Proceeding with warnings. Issues should be addressed manually.</output>
880
+ </check>
231
881
  </check>
232
882
 
233
- ## Next Steps
883
+ <check if="validation passes">
884
+ <output>✅ **Validation Passed!**
885
+
886
+ **Scores:**
234
887
 
235
- <invoke-workflow path="{project-root}/bmad/bmm/workflows/workflow-status">
236
- <param>mode: update</param>
237
- <param>action: complete_workflow</param>
238
- <param>workflow_name: tech-spec</param>
239
- </invoke-workflow>
888
+ - Context Gathering: {{context_score}}
889
+ - Definitiveness: {{definitiveness_score}}
890
+ - Brownfield Integration: {{brownfield_score}}
891
+ - Stack Alignment: {{stack_score}}
892
+ - Implementation Readiness: ✅ Ready
240
893
 
241
- <check if="success == true">
242
- <output>Status updated!</output>
894
+ Tech-spec is high quality and ready for story generation!</output>
243
895
  </check>
244
896
 
897
+ </step>
898
+
899
+ <step n="5" goal="Generate epic and context-rich stories">
900
+
901
+ <action>Invoke unified story generation workflow: {instructions_generate_stories}</action>
902
+
903
+ <action>This will generate:
904
+
905
+ - **epics.md** - Epic structure (minimal for 1 story, detailed for multiple)
906
+ - **story-{epic-slug}-N.md** - Story files (where N = 1 to {{story_count}})
907
+
908
+ All stories reference tech-spec.md as primary context - comprehensive enough that developers can often skip story-context workflow.
909
+ </action>
910
+
911
+ </step>
912
+
913
+ <step n="6" goal="Finalize and guide next steps">
914
+
245
915
  <output>**✅ Tech-Spec Complete, {user_name}!**
246
916
 
247
917
  **Deliverables Created:**
248
- <check if="project_level == 0">
249
918
 
250
- - ✅ tech-spec.md - Technical specification
251
- - user-story.md - Single user story
252
- </check>
919
+ - ✅ **tech-spec.md** - Context-rich technical specification
920
+ - Includes: brownfield analysis, framework details, existing patterns
921
+ - ✅ **epics.md** - Epic structure{{#if story_count == 1}} (minimal for single story){{else}} with {{story_count}} stories{{/if}}
922
+ - ✅ **story-{epic-slug}-1.md** - First story{{#if story_count > 1}}
923
+ - ✅ **story-{epic-slug}-2.md** - Second story{{/if}}{{#if story_count > 2}}
924
+ - ✅ **story-{epic-slug}-3.md** - Third story{{/if}}{{#if story_count > 3}}
925
+ - ✅ **Additional stories** through story-{epic-slug}-{{story_count}}.md{{/if}}
253
926
 
254
- <check if="project_level == 1">
255
- - ✅ tech-spec.md - Technical specification
256
- - epics.md - Epic and story breakdown
257
- </check>
927
+ **What Makes This Tech-Spec Special:**
928
+
929
+ The tech-spec is comprehensive enough to serve as the primary context document:
930
+
931
+ - ✨ Brownfield codebase analysis (if applicable)
932
+ - ✨ Exact framework and library versions from your project
933
+ - ✨ Existing patterns and code references
934
+ - ✨ Specific file paths and integration points
935
+ - ✨ Complete developer resources
258
936
 
259
937
  **Next Steps:**
260
938
 
261
- - **Next required:** {{next_workflow}} ({{next_agent}} agent)
262
- - **Optional:** Create test plan or document UI changes if applicable
939
+ **🎯 Recommended Path - Direct to Development:**
940
+
941
+ Since the tech-spec is CONTEXT-RICH, you can often skip story-context generation!
942
+
943
+ {{#if story_count == 1}}
944
+ **For Your Single Story:**
945
+
946
+ 1. Ask DEV agent to run `dev-story`
947
+ - Select story-{epic-slug}-1.md
948
+ - Tech-spec provides all the context needed!
949
+
950
+ 💡 **Optional:** Only run `story-context` (SM agent) if this is unusually complex
951
+ {{else}}
952
+ **For Your {{story_count}} Stories - Iterative Approach:**
953
+
954
+ 1. **Start with Story 1:**
955
+ - Ask DEV agent to run `dev-story`
956
+ - Select story-{epic-slug}-1.md
957
+ - Tech-spec provides context
958
+
959
+ 2. **After Story 1 Complete:**
960
+ - Repeat for story-{epic-slug}-2.md
961
+ - Continue through story {{story_count}}
962
+
963
+ 💡 **Alternative:** Use `sprint-planning` (SM agent) to organize all stories as a coordinated sprint
964
+
965
+ 💡 **Optional:** Run `story-context` (SM agent) for complex stories needing additional context
966
+ {{/if}}
967
+
968
+ **Your Tech-Spec:**
969
+
970
+ - 📄 Saved to: `{output_folder}/tech-spec.md`
971
+ - Epic & Stories: `{output_folder}/epics.md` + `{sprint_artifacts}/`
972
+ - Contains: All context, decisions, patterns, and implementation guidance
973
+ - Ready for: Direct development!
263
974
 
264
- Check status anytime with: `workflow-status`
975
+ The tech-spec is your single source of truth! 🚀
265
976
  </output>
266
977
 
267
978
  </step>