bmad-method 6.0.0-alpha.5 → 6.0.0-alpha.7

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 (449) hide show
  1. package/.claude/settings.local.json +12 -6
  2. package/.github/workflows/{lint.yaml → quality.yaml} +19 -2
  3. package/.husky/pre-commit +4 -0
  4. package/CONTRIBUTING.md +1 -13
  5. package/README.md +59 -1
  6. package/bmad/_cfg/agent-manifest.csv +1 -13
  7. package/bmad/_cfg/files-manifest.csv +10 -256
  8. package/bmad/_cfg/ides/claude-code.yaml +2 -2
  9. package/bmad/_cfg/manifest.yaml +4 -5
  10. package/bmad/_cfg/task-manifest.csv +4 -1
  11. package/bmad/_cfg/tool-manifest.csv +1 -0
  12. package/bmad/_cfg/workflow-manifest.csv +2 -35
  13. package/bmad/bmb/config.yaml +2 -2
  14. package/bmad/bmb/workflows/audit-workflow/instructions.md +1 -1
  15. package/bmad/bmb/workflows/create-agent/instructions.md +25 -9
  16. package/bmad/bmb/workflows/create-module/module-structure.md +34 -0
  17. package/bmad/core/config.yaml +2 -2
  18. package/docs/installers-bundlers/installers-modules-platforms-reference.md +61 -0
  19. package/package.json +5 -3
  20. package/src/core/tasks/adv-elicit.xml +1 -1
  21. package/src/modules/bmb/workflows/create-agent/instructions.md +25 -9
  22. package/src/modules/bmb/workflows/create-module/module-structure.md +34 -0
  23. package/src/modules/bmgd/README.md +208 -0
  24. package/src/modules/bmgd/_module-installer/install-config.yaml +66 -0
  25. package/src/modules/{bmm → bmgd}/agents/game-architect.agent.yaml +5 -12
  26. package/src/modules/{bmm → bmgd}/agents/game-designer.agent.yaml +10 -22
  27. package/src/modules/{bmm → bmgd}/agents/game-dev.agent.yaml +9 -10
  28. package/src/modules/bmgd/agents/game-scrum-master.agent.yaml +70 -0
  29. package/{bmad/bmm → src/modules/bmgd}/teams/team-gamedev.yaml +3 -1
  30. package/src/modules/{bmm/workflows/1-analysis → bmgd/workflows/1-preproduction}/brainstorm-game/workflow.yaml +7 -7
  31. package/src/modules/{bmm/workflows/1-analysis → bmgd/workflows/1-preproduction}/game-brief/workflow.yaml +9 -9
  32. package/src/modules/bmgd/workflows/2-design/gdd/workflow.yaml +81 -0
  33. package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/narrative/workflow.yaml +6 -6
  34. package/{bmad/bmm/workflows/3-solutioning/architecture → src/modules/bmgd/workflows/3-technical/game-architecture}/instructions.md +7 -18
  35. package/{bmad/bmm/workflows/3-solutioning/architecture → src/modules/bmgd/workflows/3-technical/game-architecture}/workflow.yaml +16 -16
  36. package/{bmad/bmm/workflows/4-implementation → src/modules/bmgd/workflows/4-production}/code-review/workflow.yaml +3 -1
  37. package/{bmad/bmm/workflows/4-implementation → src/modules/bmgd/workflows/4-production}/correct-course/workflow.yaml +3 -1
  38. package/{bmad/bmm/workflows/4-implementation → src/modules/bmgd/workflows/4-production}/create-story/workflow.yaml +3 -1
  39. package/{bmad/bmm/workflows/4-implementation → src/modules/bmgd/workflows/4-production}/dev-story/workflow.yaml +3 -1
  40. package/{bmad/bmm/workflows/4-implementation → src/modules/bmgd/workflows/4-production}/epic-tech-context/workflow.yaml +3 -1
  41. package/{bmad/bmm/workflows/4-implementation → src/modules/bmgd/workflows/4-production}/retrospective/workflow.yaml +3 -1
  42. package/{bmad/bmm/workflows/4-implementation → src/modules/bmgd/workflows/4-production}/sprint-planning/workflow.yaml +3 -1
  43. package/{bmad/bmm/workflows/4-implementation → src/modules/bmgd/workflows/4-production}/story-context/workflow.yaml +3 -1
  44. package/{bmad/bmm/workflows/4-implementation → src/modules/bmgd/workflows/4-production}/story-done/workflow.yaml +3 -1
  45. package/{bmad/bmm/workflows/4-implementation → src/modules/bmgd/workflows/4-production}/story-ready/workflow.yaml +3 -1
  46. package/src/modules/bmm/_module-installer/install-config.yaml +5 -0
  47. package/src/modules/bmm/docs/README.md +18 -18
  48. package/src/modules/bmm/docs/agents-guide.md +1 -2
  49. package/src/modules/bmm/docs/brownfield-guide.md +10 -15
  50. package/src/modules/bmm/docs/enterprise-agentic-development.md +3 -3
  51. package/src/modules/bmm/docs/faq.md +10 -12
  52. package/src/modules/bmm/docs/glossary.md +8 -9
  53. package/src/modules/bmm/docs/quick-spec-flow.md +7 -7
  54. package/src/modules/bmm/docs/quick-start.md +9 -9
  55. package/src/modules/bmm/docs/scale-adaptive-system.md +6 -6
  56. package/src/modules/bmm/docs/test-architecture.md +394 -0
  57. package/src/modules/bmm/docs/workflows-analysis.md +229 -529
  58. package/src/modules/bmm/docs/workflows-implementation.md +196 -1670
  59. package/src/modules/bmm/docs/workflows-planning.md +364 -849
  60. package/src/modules/bmm/docs/workflows-solutioning.md +268 -493
  61. package/src/modules/bmm/workflows/1-analysis/domain-research/workflow.yaml +65 -32
  62. package/src/modules/bmm/workflows/1-analysis/product-brief/workflow.yaml +4 -0
  63. package/src/modules/bmm/workflows/1-analysis/research/instructions-market.md +1 -1
  64. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/workflow.yaml +34 -5
  65. package/src/modules/bmm/workflows/2-plan-workflows/prd/instructions.md +1 -1
  66. package/src/modules/bmm/workflows/2-plan-workflows/prd/workflow.yaml +8 -0
  67. package/src/modules/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml +6 -0
  68. package/src/modules/bmm/workflows/3-solutioning/architecture/workflow.yaml +47 -0
  69. package/src/modules/bmm/workflows/techdoc/documentation-standards.md +24 -1
  70. package/src/modules/bmm/workflows/testarch/atdd/atdd-checklist-template.md +2 -2
  71. package/src/modules/bmm/workflows/workflow-status/init/instructions.md +50 -0
  72. package/src/modules/bmm/workflows/workflow-status/paths/enterprise-brownfield.yaml +18 -11
  73. package/src/modules/bmm/workflows/workflow-status/paths/enterprise-greenfield.yaml +18 -11
  74. package/src/modules/bmm/workflows/workflow-status/paths/game-design.yaml +42 -65
  75. package/test/test-installation-components.js +214 -0
  76. package/tools/cli/bundlers/web-bundler.js +127 -8
  77. package/tools/cli/installers/lib/core/config-collector.js +39 -11
  78. package/tools/cli/installers/lib/core/ide-config-manager.js +3 -1
  79. package/tools/cli/installers/lib/core/installer.js +20 -9
  80. package/tools/cli/installers/lib/core/manifest-generator.js +3 -1
  81. package/tools/cli/installers/lib/core/manifest.js +6 -2
  82. package/tools/cli/installers/lib/ide/auggie.js +9 -20
  83. package/tools/cli/installers/lib/ide/claude-code.js +33 -3
  84. package/tools/cli/installers/lib/ide/cursor.js +17 -0
  85. package/tools/cli/installers/lib/modules/manager.js +134 -0
  86. package/tools/cli/lib/config.js +3 -1
  87. package/tools/cli/lib/ui.js +5 -5
  88. package/tools/cli/lib/yaml-format.js +2 -1
  89. package/tools/cli/lib/yaml-xml-builder.js +9 -1
  90. package/tools/schema/agent.js +3 -0
  91. package/v6-open-items.md +3 -9
  92. package/web-bundles/bmm/agents/analyst.xml +5028 -0
  93. package/web-bundles/bmm/agents/architect.xml +2047 -0
  94. package/web-bundles/bmm/agents/dev.xml +68 -0
  95. package/web-bundles/bmm/agents/pm.xml +3808 -0
  96. package/web-bundles/bmm/agents/sm.xml +77 -0
  97. package/web-bundles/bmm/agents/tea.xml +66 -0
  98. package/web-bundles/bmm/agents/tech-writer.xml +84 -0
  99. package/web-bundles/bmm/agents/ux-designer.xml +2018 -0
  100. package/web-bundles/bmm/teams/team-fullstack.xml +12039 -0
  101. package/.claude/commands/bmad/bmb/workflows/README.md +0 -67
  102. package/.claude/commands/bmad/bmm/agents/analyst.md +0 -67
  103. package/.claude/commands/bmad/bmm/agents/architect.md +0 -72
  104. package/.claude/commands/bmad/bmm/agents/dev.md +0 -69
  105. package/.claude/commands/bmad/bmm/agents/paige.md +0 -82
  106. package/.claude/commands/bmad/bmm/agents/pm.md +0 -76
  107. package/.claude/commands/bmad/bmm/agents/sm.md +0 -85
  108. package/.claude/commands/bmad/bmm/agents/tea.md +0 -72
  109. package/.claude/commands/bmad/bmm/agents/tech-writer.md +0 -82
  110. package/.claude/commands/bmad/bmm/agents/ux-designer.md +0 -71
  111. package/.claude/commands/bmad/bmm/workflows/README.md +0 -132
  112. package/.claude/commands/bmad/bmm/workflows/architecture.md +0 -15
  113. package/.claude/commands/bmad/bmm/workflows/brainstorm-project.md +0 -15
  114. package/.claude/commands/bmad/bmm/workflows/code-review.md +0 -15
  115. package/.claude/commands/bmad/bmm/workflows/correct-course.md +0 -15
  116. package/.claude/commands/bmad/bmm/workflows/create-epics-and-stories.md +0 -15
  117. package/.claude/commands/bmad/bmm/workflows/create-story.md +0 -15
  118. package/.claude/commands/bmad/bmm/workflows/create-ux-design.md +0 -15
  119. package/.claude/commands/bmad/bmm/workflows/dev-story.md +0 -15
  120. package/.claude/commands/bmad/bmm/workflows/document-project.md +0 -15
  121. package/.claude/commands/bmad/bmm/workflows/epic-tech-context.md +0 -15
  122. package/.claude/commands/bmad/bmm/workflows/narrative.md +0 -15
  123. package/.claude/commands/bmad/bmm/workflows/prd.md +0 -15
  124. package/.claude/commands/bmad/bmm/workflows/product-brief.md +0 -15
  125. package/.claude/commands/bmad/bmm/workflows/research.md +0 -15
  126. package/.claude/commands/bmad/bmm/workflows/retrospective.md +0 -15
  127. package/.claude/commands/bmad/bmm/workflows/solutioning-gate-check.md +0 -15
  128. package/.claude/commands/bmad/bmm/workflows/sprint-planning.md +0 -15
  129. package/.claude/commands/bmad/bmm/workflows/story-context.md +0 -15
  130. package/.claude/commands/bmad/bmm/workflows/story-done.md +0 -15
  131. package/.claude/commands/bmad/bmm/workflows/story-ready.md +0 -15
  132. package/.claude/commands/bmad/bmm/workflows/tech-spec-sm.md +0 -15
  133. package/.claude/commands/bmad/bmm/workflows/tech-spec.md +0 -15
  134. package/.claude/commands/bmad/bmm/workflows/workflow-init.md +0 -15
  135. package/.claude/commands/bmad/bmm/workflows/workflow-status.md +0 -15
  136. package/.claude/commands/bmad/cis/agents/README.md +0 -104
  137. package/.claude/commands/bmad/cis/agents/brainstorming-coach.md +0 -62
  138. package/.claude/commands/bmad/cis/agents/creative-problem-solver.md +0 -62
  139. package/.claude/commands/bmad/cis/agents/design-thinking-coach.md +0 -62
  140. package/.claude/commands/bmad/cis/agents/innovation-strategist.md +0 -62
  141. package/.claude/commands/bmad/cis/agents/storyteller.md +0 -59
  142. package/.claude/commands/bmad/cis/workflows/README.md +0 -37
  143. package/.claude/commands/bmad/cis/workflows/design-thinking.md +0 -15
  144. package/.claude/commands/bmad/cis/workflows/innovation-strategy.md +0 -15
  145. package/.claude/commands/bmad/cis/workflows/problem-solving.md +0 -15
  146. package/.claude/commands/bmad/cis/workflows/storytelling.md +0 -15
  147. package/.claude/commands/bmad/core/workflows/README.md +0 -37
  148. package/bmad/_cfg/agents/bmm-analyst.customize.yaml +0 -42
  149. package/bmad/_cfg/agents/bmm-architect.customize.yaml +0 -42
  150. package/bmad/_cfg/agents/bmm-dev.customize.yaml +0 -42
  151. package/bmad/_cfg/agents/bmm-paige.customize.yaml +0 -42
  152. package/bmad/_cfg/agents/bmm-pm.customize.yaml +0 -42
  153. package/bmad/_cfg/agents/bmm-sm.customize.yaml +0 -42
  154. package/bmad/_cfg/agents/bmm-tea.customize.yaml +0 -42
  155. package/bmad/_cfg/agents/bmm-tech-writer.customize.yaml +0 -42
  156. package/bmad/_cfg/agents/bmm-ux-designer.customize.yaml +0 -42
  157. package/bmad/_cfg/agents/cis-brainstorming-coach.customize.yaml +0 -42
  158. package/bmad/_cfg/agents/cis-creative-problem-solver.customize.yaml +0 -42
  159. package/bmad/_cfg/agents/cis-design-thinking-coach.customize.yaml +0 -42
  160. package/bmad/_cfg/agents/cis-innovation-strategist.customize.yaml +0 -42
  161. package/bmad/_cfg/agents/cis-storyteller.customize.yaml +0 -42
  162. package/bmad/bmb/agents/bmad-builder.md.bak +0 -70
  163. package/bmad/bmb/workflows/audit-workflow/workflow.yaml.bak +0 -23
  164. package/bmad/bmb/workflows/create-module/workflow.yaml.bak +0 -42
  165. package/bmad/bmb/workflows/create-workflow/workflow-template/workflow.yaml.bak +0 -39
  166. package/bmad/bmb/workflows/create-workflow/workflow.yaml.bak +0 -40
  167. package/bmad/bmb/workflows/edit-agent/workflow.yaml.bak +0 -33
  168. package/bmad/bmb/workflows/edit-module/workflow.yaml.bak +0 -34
  169. package/bmad/bmb/workflows/edit-workflow/workflow.yaml.bak +0 -27
  170. package/bmad/bmb/workflows/module-brief/workflow.yaml.bak +0 -29
  171. package/bmad/bmb/workflows/redoc/workflow.yaml.bak +0 -32
  172. package/bmad/bmm/README.md +0 -128
  173. package/bmad/bmm/README.md.bak +0 -169
  174. package/bmad/bmm/agents/analyst.md +0 -67
  175. package/bmad/bmm/agents/analyst.md.bak +0 -67
  176. package/bmad/bmm/agents/architect.md +0 -72
  177. package/bmad/bmm/agents/architect.md.bak +0 -73
  178. package/bmad/bmm/agents/dev.md +0 -69
  179. package/bmad/bmm/agents/dev.md.bak +0 -69
  180. package/bmad/bmm/agents/paige.md.bak +0 -82
  181. package/bmad/bmm/agents/pm.md +0 -76
  182. package/bmad/bmm/agents/pm.md.bak +0 -76
  183. package/bmad/bmm/agents/sm.md +0 -85
  184. package/bmad/bmm/agents/sm.md.bak +0 -85
  185. package/bmad/bmm/agents/tea.md +0 -72
  186. package/bmad/bmm/agents/tea.md.bak +0 -72
  187. package/bmad/bmm/agents/tech-writer.md +0 -82
  188. package/bmad/bmm/agents/ux-designer.md +0 -71
  189. package/bmad/bmm/agents/ux-designer.md.bak +0 -71
  190. package/bmad/bmm/config.yaml +0 -17
  191. package/bmad/bmm/docs/README.md +0 -235
  192. package/bmad/bmm/docs/agents-guide.md +0 -1057
  193. package/bmad/bmm/docs/brownfield-guide.md +0 -759
  194. package/bmad/bmm/docs/enterprise-agentic-development.md +0 -680
  195. package/bmad/bmm/docs/faq.md +0 -589
  196. package/bmad/bmm/docs/glossary.md +0 -321
  197. package/bmad/bmm/docs/party-mode.md +0 -224
  198. package/bmad/bmm/docs/quick-spec-flow.md +0 -652
  199. package/bmad/bmm/docs/quick-start.md +0 -366
  200. package/bmad/bmm/docs/scale-adaptive-system.md +0 -599
  201. package/bmad/bmm/docs/troubleshooting.md +0 -680
  202. package/bmad/bmm/docs/workflow-architecture-reference.md +0 -371
  203. package/bmad/bmm/docs/workflow-document-project-reference.md +0 -487
  204. package/bmad/bmm/docs/workflows-analysis.md +0 -670
  205. package/bmad/bmm/docs/workflows-implementation.md +0 -1758
  206. package/bmad/bmm/docs/workflows-planning.md +0 -1086
  207. package/bmad/bmm/docs/workflows-solutioning.md +0 -726
  208. package/bmad/bmm/tasks/daily-standup.xml +0 -85
  209. package/bmad/bmm/teams/team-fullstack.yaml +0 -11
  210. package/bmad/bmm/testarch/knowledge/ci-burn-in.md +0 -675
  211. package/bmad/bmm/testarch/knowledge/component-tdd.md +0 -486
  212. package/bmad/bmm/testarch/knowledge/contract-testing.md +0 -957
  213. package/bmad/bmm/testarch/knowledge/data-factories.md +0 -500
  214. package/bmad/bmm/testarch/knowledge/email-auth.md +0 -721
  215. package/bmad/bmm/testarch/knowledge/error-handling.md +0 -725
  216. package/bmad/bmm/testarch/knowledge/feature-flags.md +0 -750
  217. package/bmad/bmm/testarch/knowledge/fixture-architecture.md +0 -401
  218. package/bmad/bmm/testarch/knowledge/network-first.md +0 -486
  219. package/bmad/bmm/testarch/knowledge/nfr-criteria.md +0 -670
  220. package/bmad/bmm/testarch/knowledge/playwright-config.md +0 -730
  221. package/bmad/bmm/testarch/knowledge/probability-impact.md +0 -601
  222. package/bmad/bmm/testarch/knowledge/risk-governance.md +0 -615
  223. package/bmad/bmm/testarch/knowledge/selective-testing.md +0 -732
  224. package/bmad/bmm/testarch/knowledge/selector-resilience.md +0 -527
  225. package/bmad/bmm/testarch/knowledge/test-healing-patterns.md +0 -644
  226. package/bmad/bmm/testarch/knowledge/test-levels-framework.md +0 -473
  227. package/bmad/bmm/testarch/knowledge/test-priorities-matrix.md +0 -373
  228. package/bmad/bmm/testarch/knowledge/test-quality.md +0 -664
  229. package/bmad/bmm/testarch/knowledge/timing-debugging.md +0 -372
  230. package/bmad/bmm/testarch/knowledge/visual-debugging.md +0 -524
  231. package/bmad/bmm/testarch/tea-index.csv +0 -22
  232. package/bmad/bmm/workflows/1-analysis/brainstorm-project/instructions.md +0 -110
  233. package/bmad/bmm/workflows/1-analysis/brainstorm-project/project-context.md +0 -25
  234. package/bmad/bmm/workflows/1-analysis/brainstorm-project/workflow.yaml +0 -26
  235. package/bmad/bmm/workflows/1-analysis/domain-research/instructions.md +0 -423
  236. package/bmad/bmm/workflows/1-analysis/domain-research/template.md +0 -180
  237. package/bmad/bmm/workflows/1-analysis/domain-research/workflow.yaml +0 -36
  238. package/bmad/bmm/workflows/1-analysis/product-brief/checklist.md +0 -115
  239. package/bmad/bmm/workflows/1-analysis/product-brief/instructions.md +0 -524
  240. package/bmad/bmm/workflows/1-analysis/product-brief/template.md +0 -181
  241. package/bmad/bmm/workflows/1-analysis/product-brief/workflow.yaml +0 -45
  242. package/bmad/bmm/workflows/1-analysis/research/checklist-deep-prompt.md +0 -144
  243. package/bmad/bmm/workflows/1-analysis/research/checklist-technical.md +0 -249
  244. package/bmad/bmm/workflows/1-analysis/research/checklist.md +0 -299
  245. package/bmad/bmm/workflows/1-analysis/research/claude-code/injections.yaml +0 -114
  246. package/bmad/bmm/workflows/1-analysis/research/instructions-deep-prompt.md +0 -439
  247. package/bmad/bmm/workflows/1-analysis/research/instructions-market.md +0 -679
  248. package/bmad/bmm/workflows/1-analysis/research/instructions-router.md +0 -133
  249. package/bmad/bmm/workflows/1-analysis/research/instructions-technical.md +0 -538
  250. package/bmad/bmm/workflows/1-analysis/research/template-deep-prompt.md +0 -94
  251. package/bmad/bmm/workflows/1-analysis/research/template-market.md +0 -347
  252. package/bmad/bmm/workflows/1-analysis/research/template-technical.md +0 -245
  253. package/bmad/bmm/workflows/1-analysis/research/workflow.yaml +0 -44
  254. package/bmad/bmm/workflows/2-plan-workflows/create-ux-design/checklist.md +0 -310
  255. package/bmad/bmm/workflows/2-plan-workflows/create-ux-design/instructions.md +0 -1319
  256. package/bmad/bmm/workflows/2-plan-workflows/create-ux-design/ux-design-template.md +0 -145
  257. package/bmad/bmm/workflows/2-plan-workflows/create-ux-design/workflow.yaml +0 -64
  258. package/bmad/bmm/workflows/2-plan-workflows/narrative/workflow.yaml +0 -29
  259. package/bmad/bmm/workflows/2-plan-workflows/prd/checklist.md +0 -349
  260. package/bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/epics-template.md +0 -63
  261. package/bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/instructions.md +0 -395
  262. package/bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/workflow.yaml +0 -33
  263. package/bmad/bmm/workflows/2-plan-workflows/prd/domain-complexity.csv +0 -13
  264. package/bmad/bmm/workflows/2-plan-workflows/prd/instructions.md +0 -423
  265. package/bmad/bmm/workflows/2-plan-workflows/prd/prd-template.md +0 -237
  266. package/bmad/bmm/workflows/2-plan-workflows/prd/project-types.csv +0 -11
  267. package/bmad/bmm/workflows/2-plan-workflows/prd/workflow.yaml +0 -46
  268. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/checklist.md +0 -214
  269. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/epics-template.md +0 -58
  270. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/instructions-level0-story.md +0 -200
  271. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/instructions-level1-stories.md +0 -451
  272. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/instructions.md +0 -1133
  273. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/tech-spec-template.md +0 -181
  274. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/user-story-template.md +0 -87
  275. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml +0 -60
  276. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml.bak +0 -60
  277. package/bmad/bmm/workflows/3-solutioning/solutioning-gate-check/checklist.md +0 -175
  278. package/bmad/bmm/workflows/3-solutioning/solutioning-gate-check/instructions.md +0 -322
  279. package/bmad/bmm/workflows/3-solutioning/solutioning-gate-check/template.md +0 -146
  280. package/bmad/bmm/workflows/3-solutioning/solutioning-gate-check/validation-criteria.yaml +0 -189
  281. package/bmad/bmm/workflows/3-solutioning/solutioning-gate-check/workflow.yaml +0 -64
  282. package/bmad/bmm/workflows/document-project/checklist.md +0 -245
  283. package/bmad/bmm/workflows/document-project/documentation-requirements.csv +0 -12
  284. package/bmad/bmm/workflows/document-project/instructions.md +0 -222
  285. package/bmad/bmm/workflows/document-project/templates/deep-dive-template.md +0 -345
  286. package/bmad/bmm/workflows/document-project/templates/index-template.md +0 -169
  287. package/bmad/bmm/workflows/document-project/templates/project-overview-template.md +0 -103
  288. package/bmad/bmm/workflows/document-project/templates/project-scan-report-schema.json +0 -160
  289. package/bmad/bmm/workflows/document-project/templates/source-tree-template.md +0 -135
  290. package/bmad/bmm/workflows/document-project/workflow.yaml +0 -34
  291. package/bmad/bmm/workflows/document-project/workflows/deep-dive-instructions.md +0 -298
  292. package/bmad/bmm/workflows/document-project/workflows/deep-dive.yaml +0 -31
  293. package/bmad/bmm/workflows/document-project/workflows/full-scan-instructions.md +0 -1106
  294. package/bmad/bmm/workflows/document-project/workflows/full-scan.yaml +0 -31
  295. package/bmad/bmm/workflows/techdoc/documentation-standards.md +0 -239
  296. package/bmad/bmm/workflows/techdoc/documentation-standards.md.bak +0 -238
  297. package/bmad/bmm/workflows/testarch/atdd/atdd-checklist-template.md +0 -363
  298. package/bmad/bmm/workflows/testarch/atdd/checklist.md +0 -373
  299. package/bmad/bmm/workflows/testarch/atdd/instructions.md +0 -785
  300. package/bmad/bmm/workflows/testarch/atdd/workflow.yaml +0 -52
  301. package/bmad/bmm/workflows/testarch/automate/checklist.md +0 -580
  302. package/bmad/bmm/workflows/testarch/automate/instructions.md +0 -1303
  303. package/bmad/bmm/workflows/testarch/automate/workflow.yaml +0 -61
  304. package/bmad/bmm/workflows/testarch/ci/checklist.md +0 -246
  305. package/bmad/bmm/workflows/testarch/ci/github-actions-template.yaml +0 -165
  306. package/bmad/bmm/workflows/testarch/ci/gitlab-ci-template.yaml +0 -128
  307. package/bmad/bmm/workflows/testarch/ci/instructions.md +0 -517
  308. package/bmad/bmm/workflows/testarch/ci/workflow.yaml +0 -53
  309. package/bmad/bmm/workflows/testarch/framework/checklist.md +0 -321
  310. package/bmad/bmm/workflows/testarch/framework/instructions.md +0 -455
  311. package/bmad/bmm/workflows/testarch/framework/workflow.yaml +0 -53
  312. package/bmad/bmm/workflows/testarch/nfr-assess/checklist.md +0 -405
  313. package/bmad/bmm/workflows/testarch/nfr-assess/instructions.md +0 -722
  314. package/bmad/bmm/workflows/testarch/nfr-assess/nfr-report-template.md +0 -443
  315. package/bmad/bmm/workflows/testarch/nfr-assess/workflow.yaml +0 -56
  316. package/bmad/bmm/workflows/testarch/test-design/checklist.md +0 -234
  317. package/bmad/bmm/workflows/testarch/test-design/instructions.md +0 -621
  318. package/bmad/bmm/workflows/testarch/test-design/test-design-template.md +0 -285
  319. package/bmad/bmm/workflows/testarch/test-design/workflow.yaml +0 -52
  320. package/bmad/bmm/workflows/testarch/test-review/checklist.md +0 -470
  321. package/bmad/bmm/workflows/testarch/test-review/instructions.md +0 -608
  322. package/bmad/bmm/workflows/testarch/test-review/test-review-template.md +0 -388
  323. package/bmad/bmm/workflows/testarch/test-review/workflow.yaml +0 -53
  324. package/bmad/bmm/workflows/testarch/trace/checklist.md +0 -654
  325. package/bmad/bmm/workflows/testarch/trace/instructions.md +0 -1045
  326. package/bmad/bmm/workflows/testarch/trace/trace-template.md +0 -673
  327. package/bmad/bmm/workflows/testarch/trace/workflow.yaml +0 -66
  328. package/bmad/bmm/workflows/workflow-status/init/instructions.md +0 -771
  329. package/bmad/bmm/workflows/workflow-status/init/workflow.yaml +0 -27
  330. package/bmad/bmm/workflows/workflow-status/init/workflow.yaml.bak +0 -27
  331. package/bmad/bmm/workflows/workflow-status/instructions.md +0 -386
  332. package/bmad/bmm/workflows/workflow-status/paths/enterprise-brownfield.yaml +0 -120
  333. package/bmad/bmm/workflows/workflow-status/paths/enterprise-greenfield.yaml +0 -108
  334. package/bmad/bmm/workflows/workflow-status/paths/game-design.yaml +0 -75
  335. package/bmad/bmm/workflows/workflow-status/paths/method-brownfield.yaml +0 -97
  336. package/bmad/bmm/workflows/workflow-status/paths/method-greenfield.yaml +0 -88
  337. package/bmad/bmm/workflows/workflow-status/paths/quick-flow-brownfield.yaml +0 -58
  338. package/bmad/bmm/workflows/workflow-status/paths/quick-flow-greenfield.yaml +0 -47
  339. package/bmad/bmm/workflows/workflow-status/project-levels.yaml +0 -59
  340. package/bmad/bmm/workflows/workflow-status/sample-level-3-workflow.yaml +0 -49
  341. package/bmad/bmm/workflows/workflow-status/workflow-status-template.yaml +0 -31
  342. package/bmad/bmm/workflows/workflow-status/workflow.yaml +0 -28
  343. package/bmad/cis/README.md +0 -153
  344. package/bmad/cis/agents/README.md +0 -104
  345. package/bmad/cis/agents/brainstorming-coach.md +0 -62
  346. package/bmad/cis/agents/brainstorming-coach.md.bak +0 -62
  347. package/bmad/cis/agents/creative-problem-solver.md +0 -62
  348. package/bmad/cis/agents/creative-problem-solver.md.bak +0 -62
  349. package/bmad/cis/agents/design-thinking-coach.md +0 -62
  350. package/bmad/cis/agents/design-thinking-coach.md.bak +0 -62
  351. package/bmad/cis/agents/innovation-strategist.md +0 -62
  352. package/bmad/cis/agents/innovation-strategist.md.bak +0 -62
  353. package/bmad/cis/agents/storyteller.md +0 -59
  354. package/bmad/cis/agents/storyteller.md.bak +0 -59
  355. package/bmad/cis/config.yaml +0 -10
  356. package/bmad/cis/teams/creative-squad.yaml +0 -6
  357. package/bmad/cis/workflows/README.md +0 -139
  358. package/bmad/cis/workflows/design-thinking/README.md +0 -56
  359. package/bmad/cis/workflows/design-thinking/design-methods.csv +0 -31
  360. package/bmad/cis/workflows/design-thinking/instructions.md +0 -200
  361. package/bmad/cis/workflows/design-thinking/template.md +0 -111
  362. package/bmad/cis/workflows/design-thinking/workflow.yaml +0 -32
  363. package/bmad/cis/workflows/innovation-strategy/README.md +0 -56
  364. package/bmad/cis/workflows/innovation-strategy/innovation-frameworks.csv +0 -31
  365. package/bmad/cis/workflows/innovation-strategy/instructions.md +0 -274
  366. package/bmad/cis/workflows/innovation-strategy/template.md +0 -189
  367. package/bmad/cis/workflows/innovation-strategy/workflow.yaml +0 -32
  368. package/bmad/cis/workflows/problem-solving/README.md +0 -56
  369. package/bmad/cis/workflows/problem-solving/instructions.md +0 -250
  370. package/bmad/cis/workflows/problem-solving/solving-methods.csv +0 -31
  371. package/bmad/cis/workflows/problem-solving/template.md +0 -165
  372. package/bmad/cis/workflows/problem-solving/workflow.yaml +0 -32
  373. package/bmad/cis/workflows/storytelling/README.md +0 -58
  374. package/bmad/cis/workflows/storytelling/instructions.md +0 -291
  375. package/bmad/cis/workflows/storytelling/story-types.csv +0 -26
  376. package/bmad/cis/workflows/storytelling/template.md +0 -113
  377. package/bmad/cis/workflows/storytelling/workflow.yaml +0 -32
  378. package/bmad/core/agents/bmad-master.md.bak +0 -71
  379. package/src/modules/bmm/docs/troubleshooting.md +0 -680
  380. package/src/modules/bmm/teams/team-gamedev.yaml +0 -14
  381. package/src/modules/bmm/workflows/2-plan-workflows/gdd/workflow.yaml +0 -81
  382. package/src/modules/bmm/workflows/2-plan-workflows/narrative/checklist.md +0 -139
  383. package/src/modules/bmm/workflows/2-plan-workflows/narrative/instructions-narrative.md +0 -608
  384. package/src/modules/bmm/workflows/2-plan-workflows/narrative/narrative-template.md +0 -195
  385. /package/src/modules/{bmm/workflows/1-analysis → bmgd/workflows/1-preproduction}/brainstorm-game/game-brain-methods.csv +0 -0
  386. /package/src/modules/{bmm/workflows/1-analysis → bmgd/workflows/1-preproduction}/brainstorm-game/game-context.md +0 -0
  387. /package/src/modules/{bmm/workflows/1-analysis → bmgd/workflows/1-preproduction}/brainstorm-game/instructions.md +0 -0
  388. /package/src/modules/{bmm/workflows/1-analysis → bmgd/workflows/1-preproduction}/game-brief/checklist.md +0 -0
  389. /package/src/modules/{bmm/workflows/1-analysis → bmgd/workflows/1-preproduction}/game-brief/instructions.md +0 -0
  390. /package/src/modules/{bmm/workflows/1-analysis → bmgd/workflows/1-preproduction}/game-brief/template.md +0 -0
  391. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/checklist.md +0 -0
  392. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/action-platformer.md +0 -0
  393. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/adventure.md +0 -0
  394. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/card-game.md +0 -0
  395. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/fighting.md +0 -0
  396. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/horror.md +0 -0
  397. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/idle-incremental.md +0 -0
  398. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/metroidvania.md +0 -0
  399. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/moba.md +0 -0
  400. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/party-game.md +0 -0
  401. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/puzzle.md +0 -0
  402. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/racing.md +0 -0
  403. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/rhythm.md +0 -0
  404. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/roguelike.md +0 -0
  405. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/rpg.md +0 -0
  406. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/sandbox.md +0 -0
  407. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/shooter.md +0 -0
  408. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/simulation.md +0 -0
  409. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/sports.md +0 -0
  410. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/strategy.md +0 -0
  411. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/survival.md +0 -0
  412. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/text-based.md +0 -0
  413. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/tower-defense.md +0 -0
  414. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/turn-based-tactics.md +0 -0
  415. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types/visual-novel.md +0 -0
  416. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/game-types.csv +0 -0
  417. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/gdd-template.md +0 -0
  418. /package/src/modules/{bmm/workflows/2-plan-workflows → bmgd/workflows/2-design}/gdd/instructions-gdd.md +0 -0
  419. /package/{bmad/bmm/workflows/2-plan-workflows → src/modules/bmgd/workflows/2-design}/narrative/checklist.md +0 -0
  420. /package/{bmad/bmm/workflows/2-plan-workflows → src/modules/bmgd/workflows/2-design}/narrative/instructions-narrative.md +0 -0
  421. /package/{bmad/bmm/workflows/2-plan-workflows → src/modules/bmgd/workflows/2-design}/narrative/narrative-template.md +0 -0
  422. /package/{bmad/bmm/workflows/3-solutioning/architecture → src/modules/bmgd/workflows/3-technical/game-architecture}/architecture-patterns.yaml +0 -0
  423. /package/{bmad/bmm/workflows/3-solutioning/architecture → src/modules/bmgd/workflows/3-technical/game-architecture}/architecture-template.md +0 -0
  424. /package/{bmad/bmm/workflows/3-solutioning/architecture → src/modules/bmgd/workflows/3-technical/game-architecture}/checklist.md +0 -0
  425. /package/{bmad/bmm/workflows/3-solutioning/architecture → src/modules/bmgd/workflows/3-technical/game-architecture}/decision-catalog.yaml +0 -0
  426. /package/{bmad/bmm/workflows/3-solutioning/architecture → src/modules/bmgd/workflows/3-technical/game-architecture}/pattern-categories.csv +0 -0
  427. /package/{bmad/bmm/workflows/4-implementation → src/modules/bmgd/workflows/4-production}/code-review/backlog_template.md +0 -0
  428. /package/{bmad/bmm/workflows/4-implementation → src/modules/bmgd/workflows/4-production}/code-review/checklist.md +0 -0
  429. /package/{bmad/bmm/workflows/4-implementation → src/modules/bmgd/workflows/4-production}/code-review/instructions.md +0 -0
  430. /package/{bmad/bmm/workflows/4-implementation → src/modules/bmgd/workflows/4-production}/correct-course/checklist.md +0 -0
  431. /package/{bmad/bmm/workflows/4-implementation → src/modules/bmgd/workflows/4-production}/correct-course/instructions.md +0 -0
  432. /package/{bmad/bmm/workflows/4-implementation → src/modules/bmgd/workflows/4-production}/create-story/checklist.md +0 -0
  433. /package/{bmad/bmm/workflows/4-implementation → src/modules/bmgd/workflows/4-production}/create-story/instructions.md +0 -0
  434. /package/{bmad/bmm/workflows/4-implementation → src/modules/bmgd/workflows/4-production}/create-story/template.md +0 -0
  435. /package/{bmad/bmm/workflows/4-implementation → src/modules/bmgd/workflows/4-production}/dev-story/AUDIT-REPORT.md +0 -0
  436. /package/{bmad/bmm/workflows/4-implementation → src/modules/bmgd/workflows/4-production}/dev-story/checklist.md +0 -0
  437. /package/{bmad/bmm/workflows/4-implementation → src/modules/bmgd/workflows/4-production}/dev-story/instructions.md +0 -0
  438. /package/{bmad/bmm/workflows/4-implementation → src/modules/bmgd/workflows/4-production}/epic-tech-context/checklist.md +0 -0
  439. /package/{bmad/bmm/workflows/4-implementation → src/modules/bmgd/workflows/4-production}/epic-tech-context/instructions.md +0 -0
  440. /package/{bmad/bmm/workflows/4-implementation → src/modules/bmgd/workflows/4-production}/epic-tech-context/template.md +0 -0
  441. /package/{bmad/bmm/workflows/4-implementation → src/modules/bmgd/workflows/4-production}/retrospective/instructions.md +0 -0
  442. /package/{bmad/bmm/workflows/4-implementation → src/modules/bmgd/workflows/4-production}/sprint-planning/checklist.md +0 -0
  443. /package/{bmad/bmm/workflows/4-implementation → src/modules/bmgd/workflows/4-production}/sprint-planning/instructions.md +0 -0
  444. /package/{bmad/bmm/workflows/4-implementation → src/modules/bmgd/workflows/4-production}/sprint-planning/sprint-status-template.yaml +0 -0
  445. /package/{bmad/bmm/workflows/4-implementation → src/modules/bmgd/workflows/4-production}/story-context/checklist.md +0 -0
  446. /package/{bmad/bmm/workflows/4-implementation → src/modules/bmgd/workflows/4-production}/story-context/context-template.xml +0 -0
  447. /package/{bmad/bmm/workflows/4-implementation → src/modules/bmgd/workflows/4-production}/story-context/instructions.md +0 -0
  448. /package/{bmad/bmm/workflows/4-implementation → src/modules/bmgd/workflows/4-production}/story-done/instructions.md +0 -0
  449. /package/{bmad/bmm/workflows/4-implementation → src/modules/bmgd/workflows/4-production}/story-ready/instructions.md +0 -0
@@ -0,0 +1,3808 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <agent-bundle>
3
+ <!-- Agent Definition -->
4
+ <agent id="bmad/bmm/agents/pm.md" name="John" title="Product Manager" icon="📋">
5
+ <activation critical="MANDATORY">
6
+ <step n="1">Load persona from this current agent XML block containing this activation you are reading now</step>
7
+
8
+ <step n="4">Show greeting + numbered list of ALL commands IN ORDER from current agent's menu section</step>
9
+ <step n="5">CRITICAL HALT. AWAIT user input. NEVER continue without it.</step>
10
+ <step n="6">On user input: Number → execute menu item[n] | Text → case-insensitive substring match | Multiple matches → ask user
11
+ to clarify | No match → show "Not recognized"</step>
12
+ <step n="7">When executing a menu item: Check menu-handlers section below - extract any attributes from the selected menu item
13
+ (workflow, exec, tmpl, data, action, validate-workflow) and follow the corresponding handler instructions</step>
14
+
15
+ <bundled-files critical="MANDATORY">
16
+ <access-method>
17
+ All dependencies are bundled within this XML file as &lt;file&gt; elements with CDATA content.
18
+ When you need to access a file path like "bmad/core/tasks/workflow.xml":
19
+ 1. Find the &lt;file id="bmad/core/tasks/workflow.xml"&gt; element in this document
20
+ 2. Extract the content from within the CDATA section
21
+ 3. Use that content as if you read it from the filesystem
22
+ </access-method>
23
+ <rules>
24
+ <rule>NEVER attempt to read files from filesystem - all files are bundled in this XML</rule>
25
+ <rule>File paths starting with "bmad/" or "bmad/" refer to &lt;file id="..."&gt; elements</rule>
26
+ <rule>When instructions reference a file path, locate the corresponding &lt;file&gt; element by matching the id attribute</rule>
27
+ <rule>YAML files are bundled with only their web_bundle section content (flattened to root level)</rule>
28
+ </rules>
29
+ </bundled-files>
30
+
31
+ <rules>
32
+ Stay in character until *exit
33
+ Number all option lists, use letters for sub-options
34
+ All file content is bundled in &lt;file&gt; elements - locate by id attribute
35
+ NEVER attempt filesystem operations - everything is in this XML
36
+ Menu triggers use asterisk (*) - display exactly as shown
37
+ </rules>
38
+
39
+ <menu-handlers>
40
+ <handlers>
41
+ <handler type="workflow">
42
+ When menu item has: workflow="path/to/workflow.yaml"
43
+ 1. CRITICAL: Always LOAD bmad/core/tasks/workflow.xml
44
+ 2. Read the complete file - this is the CORE OS for executing BMAD workflows
45
+ 3. Pass the yaml path as 'workflow-config' parameter to those instructions
46
+ 4. Execute workflow.xml instructions precisely following all steps
47
+ 5. Save outputs after completing EACH workflow step (never batch multiple steps together)
48
+ 6. If workflow.yaml path is "todo", inform user the workflow hasn't been implemented yet
49
+ </handler>
50
+ <handler type="validate-workflow">
51
+ When command has: validate-workflow="path/to/workflow.yaml"
52
+ 1. You MUST LOAD the file at: bmad/core/tasks/validate-workflow.xml
53
+ 2. READ its entire contents and EXECUTE all instructions in that file
54
+ 3. Pass the workflow, and also check the workflow yaml validation property to find and load the validation schema to pass as the checklist
55
+ 4. The workflow should try to identify the file to validate based on checklist context or else you will ask the user to specify
56
+ </handler>
57
+ </handlers>
58
+ </menu-handlers>
59
+
60
+ </activation>
61
+ <persona>
62
+ <role>Investigative Product Strategist + Market-Savvy PM</role>
63
+ <identity>Product management veteran with 8+ years experience launching B2B and consumer products. Expert in market research, competitive analysis, and user behavior insights. Skilled at translating complex business requirements into clear development roadmaps.</identity>
64
+ <communication_style>Direct and analytical with stakeholders. Asks probing questions to uncover root causes. Uses data and user insights to support recommendations. Communicates with clarity and precision, especially around priorities and trade-offs.</communication_style>
65
+ <principles>I operate with an investigative mindset that seeks to uncover the deeper &quot;why&quot; behind every requirement while maintaining relentless focus on delivering value to target users. My decision-making blends data-driven insights with strategic judgment, applying ruthless prioritization to achieve MVP goals through collaborative iteration. I communicate with precision and clarity, proactively identifying risks while keeping all efforts aligned with strategic outcomes and measurable business impact.</principles>
66
+ </persona>
67
+ <menu>
68
+ <item cmd="*help">Show numbered menu</item><item cmd="*create-prd" workflow="bmad/bmm/workflows/2-plan-workflows/prd/workflow.yaml">Create Product Requirements Document (PRD) for Level 2-4 projects</item>
69
+ <item cmd="*create-epics-and-stories" workflow="bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/workflow.yaml">Break PRD requirements into implementable epics and stories</item>
70
+ <item cmd="*validate-prd" validate-workflow="bmad/bmm/workflows/2-plan-workflows/prd/workflow.yaml">Validate PRD + Epics + Stories completeness and quality</item>
71
+ <item cmd="*tech-spec" workflow="bmad/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml">Create Tech Spec for Level 0-1 (sometimes Level 2) projects</item>
72
+ <item cmd="*validate-tech-spec" validate-workflow="bmad/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml">Validate Technical Specification Document</item><item cmd="*exit">Exit with confirmation</item>
73
+ </menu>
74
+ </agent>
75
+
76
+ <!-- Dependencies -->
77
+ <file id="bmad/bmm/workflows/2-plan-workflows/prd/workflow.yaml" type="yaml"><![CDATA[name: prd
78
+ description: >-
79
+ Unified PRD workflow for BMad Method and Enterprise Method tracks. Produces
80
+ strategic PRD and tactical epic breakdown. Hands off to architecture workflow
81
+ for technical design. Note: Quick Flow track uses tech-spec workflow.
82
+ author: BMad
83
+ instructions: bmad/bmm/workflows/2-plan-workflows/prd/instructions.md
84
+ validation: bmad/bmm/workflows/2-plan-workflows/prd/checklist.md
85
+ web_bundle_files:
86
+ - bmad/bmm/workflows/2-plan-workflows/prd/instructions.md
87
+ - bmad/bmm/workflows/2-plan-workflows/prd/prd-template.md
88
+ - bmad/bmm/workflows/2-plan-workflows/prd/project-types.csv
89
+ - bmad/bmm/workflows/2-plan-workflows/prd/domain-complexity.csv
90
+ - bmad/bmm/workflows/2-plan-workflows/prd/checklist.md
91
+ - >-
92
+ bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/workflow.yaml
93
+ - >-
94
+ bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/instructions.md
95
+ - >-
96
+ bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/epics-template.md
97
+ - bmad/core/tasks/workflow.xml
98
+ - bmad/core/tasks/adv-elicit.xml
99
+ - bmad/core/tasks/adv-elicit-methods.csv
100
+ child_workflows:
101
+ - create-epics-and-stories: >-
102
+ bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/workflow.yaml
103
+ ]]></file>
104
+ <file id="bmad/core/tasks/workflow.xml" type="xml">
105
+ <task id="bmad/core/tasks/workflow.xml" name="Execute Workflow">
106
+ <objective>Execute given workflow by loading its configuration, following instructions, and producing output</objective>
107
+
108
+ <llm critical="true">
109
+ <mandate>Always read COMPLETE files - NEVER use offset/limit when reading any workflow related files</mandate>
110
+ <mandate>Instructions are MANDATORY - either as file path, steps or embedded list in YAML, XML or markdown</mandate>
111
+ <mandate>Execute ALL steps in instructions IN EXACT ORDER</mandate>
112
+ <mandate>Save to template output file after EVERY "template-output" tag</mandate>
113
+ <mandate>NEVER delegate a step - YOU are responsible for every steps execution</mandate>
114
+ </llm>
115
+
116
+ <WORKFLOW-RULES critical="true">
117
+ <rule n="1">Steps execute in exact numerical order (1, 2, 3...)</rule>
118
+ <rule n="2">Optional steps: Ask user unless #yolo mode active</rule>
119
+ <rule n="3">Template-output tags: Save content → Show user → Get approval before continuing</rule>
120
+ <rule n="4">User must approve each major section before continuing UNLESS #yolo mode active</rule>
121
+ </WORKFLOW-RULES>
122
+
123
+ <flow>
124
+ <step n="1" title="Load and Initialize Workflow">
125
+ <substep n="1a" title="Load Configuration and Resolve Variables">
126
+ <action>Read workflow.yaml from provided path</action>
127
+ <mandate>Load config_source (REQUIRED for all modules)</mandate>
128
+ <phase n="1">Load external config from config_source path</phase>
129
+ <phase n="2">Resolve all {config_source}: references with values from config</phase>
130
+ <phase n="3">Resolve system variables (date:system-generated) and paths ({project-root}, {installed_path})</phase>
131
+ <phase n="4">Ask user for input of any variables that are still unknown</phase>
132
+ </substep>
133
+
134
+ <substep n="1b" title="Load Required Components">
135
+ <mandate>Instructions: Read COMPLETE file from path OR embedded list (REQUIRED)</mandate>
136
+ <check>If template path → Read COMPLETE template file</check>
137
+ <check>If validation path → Note path for later loading when needed</check>
138
+ <check>If template: false → Mark as action-workflow (else template-workflow)</check>
139
+ <note>Data files (csv, json) → Store paths only, load on-demand when instructions reference them</note>
140
+ </substep>
141
+
142
+ <substep n="1c" title="Initialize Output" if="template-workflow">
143
+ <action>Resolve default_output_file path with all variables and {{date}}</action>
144
+ <action>Create output directory if doesn't exist</action>
145
+ <action>If template-workflow → Write template to output file with placeholders</action>
146
+ <action>If action-workflow → Skip file creation</action>
147
+ </substep>
148
+ </step>
149
+
150
+ <step n="2" title="Process Each Instruction Step">
151
+ <iterate>For each step in instructions:</iterate>
152
+
153
+ <substep n="2a" title="Handle Step Attributes">
154
+ <check>If optional="true" and NOT #yolo → Ask user to include</check>
155
+ <check>If if="condition" → Evaluate condition</check>
156
+ <check>If for-each="item" → Repeat step for each item</check>
157
+ <check>If repeat="n" → Repeat step n times</check>
158
+ </substep>
159
+
160
+ <substep n="2b" title="Execute Step Content">
161
+ <action>Process step instructions (markdown or XML tags)</action>
162
+ <action>Replace {{variables}} with values (ask user if unknown)</action>
163
+ <execute-tags>
164
+ <tag>action xml tag → Perform the action</tag>
165
+ <tag>check if="condition" xml tag → Conditional block wrapping actions (requires closing &lt;/check&gt;)</tag>
166
+ <tag>ask xml tag → Prompt user and WAIT for response</tag>
167
+ <tag>invoke-workflow xml tag → Execute another workflow with given inputs</tag>
168
+ <tag>invoke-task xml tag → Execute specified task</tag>
169
+ <tag>goto step="x" → Jump to specified step</tag>
170
+ </execute-tags>
171
+ </substep>
172
+
173
+ <substep n="2c" title="Handle Special Output Tags">
174
+ <if tag="template-output">
175
+ <mandate>Generate content for this section</mandate>
176
+ <mandate>Save to file (Write first time, Edit subsequent)</mandate>
177
+ <action>Show checkpoint separator: ━━━━━━━━━━━━━━━━━━━━━━━</action>
178
+ <action>Display generated content</action>
179
+ <ask>Continue [c] or Edit [e]? WAIT for response</ask>
180
+ </if>
181
+ </substep>
182
+
183
+ <substep n="2d" title="Step Completion">
184
+ <check>If no special tags and NOT #yolo:</check>
185
+ <ask>Continue to next step? (y/n/edit)</ask>
186
+ </substep>
187
+ </step>
188
+
189
+ <step n="3" title="Completion">
190
+ <check>If checklist exists → Run validation</check>
191
+ <check>If template: false → Confirm actions completed</check>
192
+ <check>Else → Confirm document saved to output path</check>
193
+ <action>Report workflow completion</action>
194
+ </step>
195
+ </flow>
196
+
197
+ <execution-modes>
198
+ <mode name="normal">Full user interaction at all decision points</mode>
199
+ <mode name="#yolo">Skip optional sections, skip all elicitation, minimize prompts</mode>
200
+ </execution-modes>
201
+
202
+ <supported-tags desc="Instructions can use these tags">
203
+ <structural>
204
+ <tag>step n="X" goal="..." - Define step with number and goal</tag>
205
+ <tag>optional="true" - Step can be skipped</tag>
206
+ <tag>if="condition" - Conditional execution</tag>
207
+ <tag>for-each="collection" - Iterate over items</tag>
208
+ <tag>repeat="n" - Repeat n times</tag>
209
+ </structural>
210
+ <execution>
211
+ <tag>action - Required action to perform</tag>
212
+ <tag>action if="condition" - Single conditional action (inline, no closing tag needed)</tag>
213
+ <tag>check if="condition"&gt;...&lt;/check&gt; - Conditional block wrapping multiple items (closing tag required)</tag>
214
+ <tag>ask - Get user input (wait for response)</tag>
215
+ <tag>goto - Jump to another step</tag>
216
+ <tag>invoke-workflow - Call another workflow</tag>
217
+ <tag>invoke-task - Call a task</tag>
218
+ </execution>
219
+ <output>
220
+ <tag>template-output - Save content checkpoint</tag>
221
+ <tag>critical - Cannot be skipped</tag>
222
+ <tag>example - Show example output</tag>
223
+ </output>
224
+ </supported-tags>
225
+
226
+ <conditional-execution-patterns desc="When to use each pattern">
227
+ <pattern type="single-action">
228
+ <use-case>One action with a condition</use-case>
229
+ <syntax>&lt;action if="condition"&gt;Do something&lt;/action&gt;</syntax>
230
+ <example>&lt;action if="file exists"&gt;Load the file&lt;/action&gt;</example>
231
+ <rationale>Cleaner and more concise for single items</rationale>
232
+ </pattern>
233
+
234
+ <pattern type="multi-action-block">
235
+ <use-case>Multiple actions/tags under same condition</use-case>
236
+ <syntax>&lt;check if="condition"&gt;
237
+ &lt;action&gt;First action&lt;/action&gt;
238
+ &lt;action&gt;Second action&lt;/action&gt;
239
+ &lt;/check&gt;</syntax>
240
+ <example>&lt;check if="validation fails"&gt;
241
+ &lt;action&gt;Log error&lt;/action&gt;
242
+ &lt;goto step="1"&gt;Retry&lt;/goto&gt;
243
+ &lt;/check&gt;</example>
244
+ <rationale>Explicit scope boundaries prevent ambiguity</rationale>
245
+ </pattern>
246
+
247
+ <pattern type="nested-conditions">
248
+ <use-case>Else/alternative branches</use-case>
249
+ <syntax>&lt;check if="condition A"&gt;...&lt;/check&gt;
250
+ &lt;check if="else"&gt;...&lt;/check&gt;</syntax>
251
+ <rationale>Clear branching logic with explicit blocks</rationale>
252
+ </pattern>
253
+ </conditional-execution-patterns>
254
+
255
+ <llm final="true">
256
+ <mandate>This is the complete workflow execution engine</mandate>
257
+ <mandate>You MUST Follow instructions exactly as written and maintain conversation context between steps</mandate>
258
+ <mandate>If confused, re-read this task, the workflow yaml, and any yaml indicated files</mandate>
259
+ </llm>
260
+ </task>
261
+ </file>
262
+ <file id="bmad/bmm/workflows/2-plan-workflows/prd/instructions.md" type="md"><![CDATA[# PRD Workflow - Intent-Driven Product Planning
263
+
264
+ <critical>The workflow execution engine is governed by: bmad/core/tasks/workflow.xml</critical>
265
+ <critical>You MUST have already loaded and processed: {installed_path}/workflow.yaml</critical>
266
+ <critical>This workflow uses INTENT-DRIVEN PLANNING - adapt organically to product type and context</critical>
267
+ <critical>Communicate all responses in {communication_language} and adapt deeply to {user_skill_level}</critical>
268
+ <critical>Generate all documents in {document_output_language}</critical>
269
+ <critical>LIVING DOCUMENT: Write to PRD.md continuously as you discover - never wait until the end</critical>
270
+ <critical>GUIDING PRINCIPLE: Find and weave the product's magic throughout - what makes it special should inspire every section</critical>
271
+ <critical>Input documents specified in workflow.yaml input_file_patterns - workflow engine handles fuzzy matching, whole vs sharded document discovery automatically</critical>
272
+
273
+ <workflow>
274
+
275
+ <step n="0" goal="Validate workflow readiness" tag="workflow-status">
276
+ <action>Check if {status_file} exists</action>
277
+
278
+ <action if="status file not found">Set standalone_mode = true</action>
279
+
280
+ <check if="status file found">
281
+ <action>Load the FULL file: {status_file}</action>
282
+ <action>Parse workflow_status section</action>
283
+ <action>Check status of "prd" workflow</action>
284
+ <action>Get project_track from YAML metadata</action>
285
+ <action>Find first non-completed workflow (next expected workflow)</action>
286
+
287
+ <check if="project_track is Quick Flow">
288
+ <output>**Quick Flow Track - Redirecting**
289
+
290
+ Quick Flow projects use tech-spec workflow for implementation-focused planning.
291
+ PRD is for BMad Method and Enterprise Method tracks that need comprehensive requirements.</output>
292
+ <action>Exit and suggest tech-spec workflow</action>
293
+ </check>
294
+
295
+ <check if="prd status is file path (already completed)">
296
+ <output>⚠️ PRD already completed: {{prd status}}</output>
297
+ <ask>Re-running will overwrite the existing PRD. Continue? (y/n)</ask>
298
+ <check if="n">
299
+ <output>Exiting. Use workflow-status to see your next step.</output>
300
+ <action>Exit workflow</action>
301
+ </check>
302
+ </check>
303
+
304
+ <action>Set standalone_mode = false</action>
305
+ </check>
306
+ </step>
307
+
308
+ <step n="1" goal="Discovery - Project, Domain, and Vision">
309
+ <action>Welcome {user_name} and begin comprehensive discovery, and then start to GATHER ALL CONTEXT:
310
+ 1. Check workflow-status.yaml for project_context (if exists)
311
+ 2. Look for existing documents (Product Brief, Domain Brief, research)
312
+ 3. Detect project type AND domain complexity
313
+
314
+ Load references:
315
+ {installed_path}/project-types.csv
316
+ {installed_path}/domain-complexity.csv
317
+
318
+ Through natural conversation:
319
+ "Tell me about what you want to build - what problem does it solve and for whom?"
320
+
321
+ DUAL DETECTION:
322
+ Project type signals: API, mobile, web, CLI, SDK, SaaS
323
+ Domain complexity signals: medical, finance, government, education, aerospace
324
+
325
+ SPECIAL ROUTING:
326
+ If game detected → Inform user that game development requires the BMGD module (BMad Game Development)
327
+ If complex domain detected → Offer domain research options:
328
+ A) Run domain-research workflow (thorough)
329
+ B) Quick web search (basic)
330
+ C) User provides context
331
+ D) Continue with general knowledge
332
+
333
+ CAPTURE THE MAGIC EARLY with a few questions such as for example: "What excites you most about this product?", "What would make users love this?", "What's the moment that will make people go 'wow'?"
334
+
335
+ This excitement becomes the thread woven throughout the PRD.</action>
336
+
337
+ <template-output>vision_alignment</template-output>
338
+ <template-output>project_classification</template-output>
339
+ <template-output>project_type</template-output>
340
+ <template-output>domain_type</template-output>
341
+ <template-output>complexity_level</template-output>
342
+ <check if="complex domain">
343
+ <template-output>domain_context_summary</template-output>
344
+ </check>
345
+ <template-output>product_magic_essence</template-output>
346
+ <template-output>product_brief_path</template-output>
347
+ <template-output>domain_brief_path</template-output>
348
+ <template-output>research_documents</template-output>
349
+ </step>
350
+
351
+ <step n="2" goal="Success Definition">
352
+ <action>Define what winning looks like for THIS specific product
353
+
354
+ INTENT: Meaningful success criteria, not generic metrics
355
+
356
+ Adapt to context:
357
+
358
+ - Consumer: User love, engagement, retention
359
+ - B2B: ROI, efficiency, adoption
360
+ - Developer tools: Developer experience, community
361
+ - Regulated: Compliance, safety, validation
362
+
363
+ Make it specific:
364
+
365
+ - NOT: "10,000 users"
366
+ - BUT: "100 power users who rely on it daily"
367
+
368
+ - NOT: "99.9% uptime"
369
+ - BUT: "Zero data loss during critical operations"
370
+
371
+ Weave in the magic:
372
+
373
+ - "Success means users experience [that special moment] and [desired outcome]"</action>
374
+
375
+ <template-output>success_criteria</template-output>
376
+ <check if="business focus">
377
+ <template-output>business_metrics</template-output>
378
+ </check>
379
+ <invoke-task halt="true">bmad/core/tasks/adv-elicit.xml</invoke-task>
380
+ </step>
381
+
382
+ <step n="3" goal="Scope Definition">
383
+ <action>Smart scope negotiation - find the sweet spot
384
+
385
+ The Scoping Game:
386
+
387
+ 1. "What must work for this to be useful?" → MVP
388
+ 2. "What makes it competitive?" → Growth
389
+ 3. "What's the dream version?" → Vision
390
+
391
+ Challenge scope creep conversationally:
392
+
393
+ - "Could that wait until after launch?"
394
+ - "Is that essential for proving the concept?"
395
+
396
+ For complex domains:
397
+
398
+ - Include compliance minimums in MVP
399
+ - Note regulatory gates between phases</action>
400
+
401
+ <template-output>mvp_scope</template-output>
402
+ <template-output>growth_features</template-output>
403
+ <template-output>vision_features</template-output>
404
+ <invoke-task halt="true">bmad/core/tasks/adv-elicit.xml</invoke-task>
405
+ </step>
406
+
407
+ <step n="4" goal="Domain-Specific Exploration" optional="true">
408
+ <action>Only if complex domain detected or domain-brief exists
409
+
410
+ Synthesize domain requirements that will shape everything:
411
+
412
+ - Regulatory requirements
413
+ - Compliance needs
414
+ - Industry standards
415
+ - Safety/risk factors
416
+ - Required validations
417
+ - Special expertise needed
418
+
419
+ These inform:
420
+
421
+ - What features are mandatory
422
+ - What NFRs are critical
423
+ - How to sequence development
424
+ - What validation is required</action>
425
+
426
+ <check if="complex domain">
427
+ <template-output>domain_considerations</template-output>
428
+ </check>
429
+ </step>
430
+
431
+ <step n="5" goal="Innovation Discovery" optional="true">
432
+ <action>Identify truly novel patterns if applicable
433
+
434
+ Listen for innovation signals:
435
+
436
+ - "Nothing like this exists"
437
+ - "We're rethinking how [X] works"
438
+ - "Combining [A] with [B] for the first time"
439
+
440
+ Explore deeply:
441
+
442
+ - What makes it unique?
443
+ - What assumption are you challenging?
444
+ - How do we validate it?
445
+ - What's the fallback?
446
+
447
+ <WebSearch if="novel">{concept} innovations {date}</WebSearch></action>
448
+
449
+ <check if="innovation detected">
450
+ <template-output>innovation_patterns</template-output>
451
+ <template-output>validation_approach</template-output>
452
+ </check>
453
+ </step>
454
+
455
+ <step n="6" goal="Project-Specific Deep Dive">
456
+ <action>Based on detected project type, dive deep into specific needs
457
+
458
+ Load project type requirements from CSV and expand naturally.
459
+
460
+ FOR API/BACKEND:
461
+
462
+ - Map out endpoints, methods, parameters
463
+ - Define authentication and authorization
464
+ - Specify error codes and rate limits
465
+ - Document data schemas
466
+
467
+ FOR MOBILE:
468
+
469
+ - Platform requirements (iOS/Android/both)
470
+ - Device features needed
471
+ - Offline capabilities
472
+ - Store compliance
473
+
474
+ FOR SAAS B2B:
475
+
476
+ - Multi-tenant architecture
477
+ - Permission models
478
+ - Subscription tiers
479
+ - Critical integrations
480
+
481
+ [Continue for other types...]
482
+
483
+ Always relate back to the product magic:
484
+ "How does [requirement] enhance [the special thing]?"</action>
485
+
486
+ <template-output>project_type_requirements</template-output>
487
+
488
+ <!-- Dynamic sections based on project type -->
489
+ <check if="API/Backend project">
490
+ <template-output>endpoint_specification</template-output>
491
+ <template-output>authentication_model</template-output>
492
+ </check>
493
+
494
+ <check if="Mobile project">
495
+ <template-output>platform_requirements</template-output>
496
+ <template-output>device_features</template-output>
497
+ </check>
498
+
499
+ <check if="SaaS B2B project">
500
+ <template-output>tenant_model</template-output>
501
+ <template-output>permission_matrix</template-output>
502
+ </check>
503
+ </step>
504
+
505
+ <step n="7" goal="UX Principles" if="project has UI or UX">
506
+ <action>Only if product has a UI
507
+
508
+ Light touch on UX - not full design:
509
+
510
+ - Visual personality
511
+ - Key interaction patterns
512
+ - Critical user flows
513
+
514
+ "How should this feel to use?"
515
+ "What's the vibe - professional, playful, minimal?"
516
+
517
+ Connect to the magic:
518
+ "The UI should reinforce [the special moment] through [design approach]"</action>
519
+
520
+ <check if="has UI">
521
+ <template-output>ux_principles</template-output>
522
+ <template-output>key_interactions</template-output>
523
+ </check>
524
+ </step>
525
+
526
+ <step n="8" goal="Functional Requirements Synthesis">
527
+ <action>Transform everything discovered into clear functional requirements
528
+
529
+ Pull together:
530
+
531
+ - Core features from scope
532
+ - Domain-mandated features
533
+ - Project-type specific needs
534
+ - Innovation requirements
535
+
536
+ Organize by capability, not technology:
537
+
538
+ - User Management (not "auth system")
539
+ - Content Discovery (not "search algorithm")
540
+ - Team Collaboration (not "websockets")
541
+
542
+ Each requirement should:
543
+
544
+ - Be specific and measurable
545
+ - Connect to user value
546
+ - Include acceptance criteria
547
+ - Note domain constraints
548
+
549
+ The magic thread:
550
+ Highlight which requirements deliver the special experience</action>
551
+
552
+ <template-output>functional_requirements_complete</template-output>
553
+ <invoke-task halt="true">bmad/core/tasks/adv-elicit.xml</invoke-task>
554
+ </step>
555
+
556
+ <step n="9" goal="Non-Functional Requirements Discovery">
557
+ <action>Only document NFRs that matter for THIS product
558
+
559
+ Performance: Only if user-facing impact
560
+ Security: Only if handling sensitive data
561
+ Scale: Only if growth expected
562
+ Accessibility: Only if broad audience
563
+ Integration: Only if connecting systems
564
+
565
+ For each NFR:
566
+
567
+ - Why it matters for THIS product
568
+ - Specific measurable criteria
569
+ - Domain-driven requirements
570
+
571
+ Skip categories that don't apply!</action>
572
+
573
+ <!-- Only output sections that were discussed -->
574
+ <check if="performance matters">
575
+ <template-output>performance_requirements</template-output>
576
+ </check>
577
+ <check if="security matters">
578
+ <template-output>security_requirements</template-output>
579
+ </check>
580
+ <check if="scale matters">
581
+ <template-output>scalability_requirements</template-output>
582
+ </check>
583
+ <check if="accessibility matters">
584
+ <template-output>accessibility_requirements</template-output>
585
+ </check>
586
+ <check if="integration matters">
587
+ <template-output>integration_requirements</template-output>
588
+ </check>
589
+ </step>
590
+
591
+ <step n="10" goal="Review PRD and transition to epics">
592
+ <action>Review the PRD we've built together
593
+
594
+ "Let's review what we've captured:
595
+
596
+ - Vision: [summary]
597
+ - Success: [key metrics]
598
+ - Scope: [MVP highlights]
599
+ - Requirements: [count] functional, [count] non-functional
600
+ - Special considerations: [domain/innovation]
601
+
602
+ Does this capture your product vision?"</action>
603
+
604
+ <template-output>prd_summary</template-output>
605
+ <invoke-task halt="true">bmad/core/tasks/adv-elicit.xml</invoke-task>
606
+
607
+ <action>After PRD review and refinement complete:
608
+
609
+ "Excellent! Now we need to break these requirements into implementable epics and stories.
610
+
611
+ For the epic breakdown, you have two options:
612
+
613
+ 1. Start a new session focused on epics (recommended for complex projects)
614
+ 2. Continue here (I'll transform requirements into epics now)
615
+
616
+ Which would you prefer?"
617
+
618
+ If new session:
619
+ "To start epic planning in a new session:
620
+
621
+ 1. Save your work here
622
+ 2. Start fresh and run: workflow epics-stories
623
+ 3. It will load your PRD and create the epic breakdown
624
+
625
+ This keeps each session focused and manageable."
626
+
627
+ If continue:
628
+ "Let's continue with epic breakdown here..."
629
+ [Proceed with epics-stories subworkflow]
630
+ Set project_track based on workflow status (BMad Method or Enterprise Method)
631
+ Generate epic_details for the epics breakdown document</action>
632
+
633
+ <template-output>project_track</template-output>
634
+ <template-output>epic_details</template-output>
635
+ </step>
636
+
637
+ <step n="11" goal="Complete PRD and suggest next steps">
638
+ <template-output>product_magic_summary</template-output>
639
+
640
+ <check if="standalone_mode != true">
641
+ <action>Load the FULL file: {status_file}</action>
642
+ <action>Update workflow_status["prd"] = "{default_output_file}"</action>
643
+ <action>Save file, preserving ALL comments and structure</action>
644
+ </check>
645
+
646
+ <output>**✅ PRD Complete, {user_name}!**
647
+
648
+ Your product requirements are documented and ready for implementation.
649
+
650
+ **Created:**
651
+
652
+ - **PRD.md** - Complete requirements adapted to {project_type} and {domain}
653
+
654
+ **Next Steps:**
655
+
656
+ 1. **Epic Breakdown** (Required)
657
+ Run: `workflow create-epics-and-stories` to decompose requirements into implementable stories
658
+
659
+ 2. **UX Design** (If UI exists)
660
+ Run: `workflow ux-design` for detailed user experience design
661
+
662
+ 3. **Architecture** (Recommended)
663
+ Run: `workflow create-architecture` for technical architecture decisions
664
+
665
+ The magic of your product - {product_magic_summary} - is woven throughout the PRD and will guide all subsequent work.
666
+ </output>
667
+ </step>
668
+
669
+ </workflow>
670
+ ]]></file>
671
+ <file id="bmad/bmm/workflows/2-plan-workflows/prd/prd-template.md" type="md"><![CDATA[# {{project_name}} - Product Requirements Document
672
+
673
+ **Author:** {{user_name}}
674
+ **Date:** {{date}}
675
+ **Version:** 1.0
676
+
677
+ ---
678
+
679
+ ## Executive Summary
680
+
681
+ {{vision_alignment}}
682
+
683
+ ### What Makes This Special
684
+
685
+ {{product_magic_essence}}
686
+
687
+ ---
688
+
689
+ ## Project Classification
690
+
691
+ **Technical Type:** {{project_type}}
692
+ **Domain:** {{domain_type}}
693
+ **Complexity:** {{complexity_level}}
694
+
695
+ {{project_classification}}
696
+
697
+ {{#if domain_context_summary}}
698
+
699
+ ### Domain Context
700
+
701
+ {{domain_context_summary}}
702
+ {{/if}}
703
+
704
+ ---
705
+
706
+ ## Success Criteria
707
+
708
+ {{success_criteria}}
709
+
710
+ {{#if business_metrics}}
711
+
712
+ ### Business Metrics
713
+
714
+ {{business_metrics}}
715
+ {{/if}}
716
+
717
+ ---
718
+
719
+ ## Product Scope
720
+
721
+ ### MVP - Minimum Viable Product
722
+
723
+ {{mvp_scope}}
724
+
725
+ ### Growth Features (Post-MVP)
726
+
727
+ {{growth_features}}
728
+
729
+ ### Vision (Future)
730
+
731
+ {{vision_features}}
732
+
733
+ ---
734
+
735
+ {{#if domain_considerations}}
736
+
737
+ ## Domain-Specific Requirements
738
+
739
+ {{domain_considerations}}
740
+
741
+ This section shapes all functional and non-functional requirements below.
742
+ {{/if}}
743
+
744
+ ---
745
+
746
+ {{#if innovation_patterns}}
747
+
748
+ ## Innovation & Novel Patterns
749
+
750
+ {{innovation_patterns}}
751
+
752
+ ### Validation Approach
753
+
754
+ {{validation_approach}}
755
+ {{/if}}
756
+
757
+ ---
758
+
759
+ {{#if project_type_requirements}}
760
+
761
+ ## {{project_type}} Specific Requirements
762
+
763
+ {{project_type_requirements}}
764
+
765
+ {{#if endpoint_specification}}
766
+
767
+ ### API Specification
768
+
769
+ {{endpoint_specification}}
770
+ {{/if}}
771
+
772
+ {{#if authentication_model}}
773
+
774
+ ### Authentication & Authorization
775
+
776
+ {{authentication_model}}
777
+ {{/if}}
778
+
779
+ {{#if platform_requirements}}
780
+
781
+ ### Platform Support
782
+
783
+ {{platform_requirements}}
784
+ {{/if}}
785
+
786
+ {{#if device_features}}
787
+
788
+ ### Device Capabilities
789
+
790
+ {{device_features}}
791
+ {{/if}}
792
+
793
+ {{#if tenant_model}}
794
+
795
+ ### Multi-Tenancy Architecture
796
+
797
+ {{tenant_model}}
798
+ {{/if}}
799
+
800
+ {{#if permission_matrix}}
801
+
802
+ ### Permissions & Roles
803
+
804
+ {{permission_matrix}}
805
+ {{/if}}
806
+ {{/if}}
807
+
808
+ ---
809
+
810
+ {{#if ux_principles}}
811
+
812
+ ## User Experience Principles
813
+
814
+ {{ux_principles}}
815
+
816
+ ### Key Interactions
817
+
818
+ {{key_interactions}}
819
+ {{/if}}
820
+
821
+ ---
822
+
823
+ ## Functional Requirements
824
+
825
+ {{functional_requirements_complete}}
826
+
827
+ ---
828
+
829
+ ## Non-Functional Requirements
830
+
831
+ {{#if performance_requirements}}
832
+
833
+ ### Performance
834
+
835
+ {{performance_requirements}}
836
+ {{/if}}
837
+
838
+ {{#if security_requirements}}
839
+
840
+ ### Security
841
+
842
+ {{security_requirements}}
843
+ {{/if}}
844
+
845
+ {{#if scalability_requirements}}
846
+
847
+ ### Scalability
848
+
849
+ {{scalability_requirements}}
850
+ {{/if}}
851
+
852
+ {{#if accessibility_requirements}}
853
+
854
+ ### Accessibility
855
+
856
+ {{accessibility_requirements}}
857
+ {{/if}}
858
+
859
+ {{#if integration_requirements}}
860
+
861
+ ### Integration
862
+
863
+ {{integration_requirements}}
864
+ {{/if}}
865
+
866
+ {{#if no_nfrs}}
867
+ _No specific non-functional requirements identified for this project type._
868
+ {{/if}}
869
+
870
+ ---
871
+
872
+ ## Implementation Planning
873
+
874
+ ### Epic Breakdown Required
875
+
876
+ Requirements must be decomposed into epics and bite-sized stories (200k context limit).
877
+
878
+ **Next Step:** Run `workflow epics-stories` to create the implementation breakdown.
879
+
880
+ ---
881
+
882
+ ## References
883
+
884
+ {{#if product_brief_path}}
885
+
886
+ - Product Brief: {{product_brief_path}}
887
+ {{/if}}
888
+ {{#if domain_brief_path}}
889
+ - Domain Brief: {{domain_brief_path}}
890
+ {{/if}}
891
+ {{#if research_documents}}
892
+ - Research: {{research_documents}}
893
+ {{/if}}
894
+
895
+ ---
896
+
897
+ ## Next Steps
898
+
899
+ 1. **Epic & Story Breakdown** - Run: `workflow epics-stories`
900
+ 2. **UX Design** (if UI) - Run: `workflow ux-design`
901
+ 3. **Architecture** - Run: `workflow create-architecture`
902
+
903
+ ---
904
+
905
+ _This PRD captures the essence of {{project_name}} - {{product_magic_summary}}_
906
+
907
+ _Created through collaborative discovery between {{user_name}} and AI facilitator._
908
+ ]]></file>
909
+ <file id="bmad/bmm/workflows/2-plan-workflows/prd/project-types.csv" type="csv"><![CDATA[project_type,detection_signals,key_questions,required_sections,skip_sections,web_search_triggers,innovation_signals
910
+ api_backend,"API,REST,GraphQL,backend,service,endpoints","Endpoints needed?;Authentication method?;Data formats?;Rate limits?;Versioning?;SDK needed?","endpoint_specs;auth_model;data_schemas;error_codes;rate_limits;api_docs","ux_ui;visual_design;user_journeys","framework best practices;OpenAPI standards","API composition;New protocol"
911
+ mobile_app,"iOS,Android,app,mobile,iPhone,iPad","Native or cross-platform?;Offline needed?;Push notifications?;Device features?;Store compliance?","platform_reqs;device_permissions;offline_mode;push_strategy;store_compliance","desktop_features;cli_commands","app store guidelines;platform requirements","Gesture innovation;AR/VR features"
912
+ saas_b2b,"SaaS,B2B,platform,dashboard,teams,enterprise","Multi-tenant?;Permission model?;Subscription tiers?;Integrations?;Compliance?","tenant_model;rbac_matrix;subscription_tiers;integration_list;compliance_reqs","cli_interface;mobile_first","compliance requirements;integration guides","Workflow automation;AI agents"
913
+ developer_tool,"SDK,library,package,npm,pip,framework","Language support?;Package managers?;IDE integration?;Documentation?;Examples?","language_matrix;installation_methods;api_surface;code_examples;migration_guide","visual_design;store_compliance","package manager best practices;API design patterns","New paradigm;DSL creation"
914
+ cli_tool,"CLI,command,terminal,bash,script","Interactive or scriptable?;Output formats?;Config method?;Shell completion?","command_structure;output_formats;config_schema;scripting_support","visual_design;ux_principles;touch_interactions","CLI design patterns;shell integration","Natural language CLI;AI commands"
915
+ web_app,"website,webapp,browser,SPA,PWA","SPA or MPA?;Browser support?;SEO needed?;Real-time?;Accessibility?","browser_matrix;responsive_design;performance_targets;seo_strategy;accessibility_level","native_features;cli_commands","web standards;WCAG guidelines","New interaction;WebAssembly use"
916
+ game,"game,player,gameplay,level,character","REDIRECT TO GAME WORKFLOWS","game-brief;GDD","most_sections","game design patterns","Novel mechanics;Genre mixing"
917
+ desktop_app,"desktop,Windows,Mac,Linux,native","Cross-platform?;Auto-update?;System integration?;Offline?","platform_support;system_integration;update_strategy;offline_capabilities","web_seo;mobile_features","desktop guidelines;platform requirements","Desktop AI;System automation"
918
+ iot_embedded,"IoT,embedded,device,sensor,hardware","Hardware specs?;Connectivity?;Power constraints?;Security?;OTA updates?","hardware_reqs;connectivity_protocol;power_profile;security_model;update_mechanism","visual_ui;browser_support","IoT standards;protocol specs","Edge AI;New sensors"
919
+ blockchain_web3,"blockchain,crypto,DeFi,NFT,smart contract","Chain selection?;Wallet integration?;Gas optimization?;Security audit?","chain_specs;wallet_support;smart_contracts;security_audit;gas_optimization","traditional_auth;centralized_db","blockchain standards;security patterns","Novel tokenomics;DAO structure"]]></file>
920
+ <file id="bmad/bmm/workflows/2-plan-workflows/prd/domain-complexity.csv" type="csv"><![CDATA[domain,signals,complexity,key_concerns,required_knowledge,suggested_workflow,web_searches,special_sections
921
+ healthcare,"medical,diagnostic,clinical,FDA,patient,treatment,HIPAA,therapy,pharma,drug",high,"FDA approval;Clinical validation;HIPAA compliance;Patient safety;Medical device classification;Liability","Regulatory pathways;Clinical trial design;Medical standards;Data privacy;Integration requirements","domain-research","FDA software medical device guidance {date};HIPAA compliance software requirements;Medical software standards {date};Clinical validation software","clinical_requirements;regulatory_pathway;validation_methodology;safety_measures"
922
+ fintech,"payment,banking,trading,investment,crypto,wallet,transaction,KYC,AML,funds,fintech",high,"Regional compliance;Security standards;Audit requirements;Fraud prevention;Data protection","KYC/AML requirements;PCI DSS;Open banking;Regional laws (US/EU/APAC);Crypto regulations","domain-research","fintech regulations {date};payment processing compliance {date};open banking API standards;cryptocurrency regulations {date}","compliance_matrix;security_architecture;audit_requirements;fraud_prevention"
923
+ govtech,"government,federal,civic,public sector,citizen,municipal,voting",high,"Procurement rules;Security clearance;Accessibility (508);FedRAMP;Privacy;Transparency","Government procurement;Security frameworks;Accessibility standards;Privacy laws;Open data requirements","domain-research","government software procurement {date};FedRAMP compliance requirements;section 508 accessibility;government security standards","procurement_compliance;security_clearance;accessibility_standards;transparency_requirements"
924
+ edtech,"education,learning,student,teacher,curriculum,assessment,K-12,university,LMS",medium,"Student privacy (COPPA/FERPA);Accessibility;Content moderation;Age verification;Curriculum standards","Educational privacy laws;Learning standards;Accessibility requirements;Content guidelines;Assessment validity","domain-research","educational software privacy {date};COPPA FERPA compliance;WCAG education requirements;learning management standards","privacy_compliance;content_guidelines;accessibility_features;curriculum_alignment"
925
+ aerospace,"aircraft,spacecraft,aviation,drone,satellite,propulsion,flight,radar,navigation",high,"Safety certification;DO-178C compliance;Performance validation;Simulation accuracy;Export controls","Aviation standards;Safety analysis;Simulation validation;ITAR/export controls;Performance requirements","domain-research + technical-model","DO-178C software certification;aerospace simulation standards {date};ITAR export controls software;aviation safety requirements","safety_certification;simulation_validation;performance_requirements;export_compliance"
926
+ automotive,"vehicle,car,autonomous,ADAS,automotive,driving,EV,charging",high,"Safety standards;ISO 26262;V2X communication;Real-time requirements;Certification","Automotive standards;Functional safety;V2X protocols;Real-time systems;Testing requirements","domain-research","ISO 26262 automotive software;automotive safety standards {date};V2X communication protocols;EV charging standards","safety_standards;functional_safety;communication_protocols;certification_requirements"
927
+ scientific,"research,algorithm,simulation,modeling,computational,analysis,data science,ML,AI",medium,"Reproducibility;Validation methodology;Peer review;Performance;Accuracy;Computational resources","Scientific method;Statistical validity;Computational requirements;Domain expertise;Publication standards","technical-model","scientific computing best practices {date};research reproducibility standards;computational modeling validation;peer review software","validation_methodology;accuracy_metrics;reproducibility_plan;computational_requirements"
928
+ legaltech,"legal,law,contract,compliance,litigation,patent,attorney,court",high,"Legal ethics;Bar regulations;Data retention;Attorney-client privilege;Court system integration","Legal practice rules;Ethics requirements;Court filing systems;Document standards;Confidentiality","domain-research","legal technology ethics {date};law practice management software requirements;court filing system standards;attorney client privilege technology","ethics_compliance;data_retention;confidentiality_measures;court_integration"
929
+ insuretech,"insurance,claims,underwriting,actuarial,policy,risk,premium",high,"Insurance regulations;Actuarial standards;Data privacy;Fraud detection;State compliance","Insurance regulations by state;Actuarial methods;Risk modeling;Claims processing;Regulatory reporting","domain-research","insurance software regulations {date};actuarial standards software;insurance fraud detection;state insurance compliance","regulatory_requirements;risk_modeling;fraud_detection;reporting_compliance"
930
+ energy,"energy,utility,grid,solar,wind,power,electricity,oil,gas",high,"Grid compliance;NERC standards;Environmental regulations;Safety requirements;Real-time operations","Energy regulations;Grid standards;Environmental compliance;Safety protocols;SCADA systems","domain-research","energy sector software compliance {date};NERC CIP standards;smart grid requirements;renewable energy software standards","grid_compliance;safety_protocols;environmental_compliance;operational_requirements"
931
+ gaming,"game,player,gameplay,level,character,multiplayer,quest",redirect,"REDIRECT TO GAME WORKFLOWS","Game design","game-brief","NA","NA"
932
+ general,"",low,"Standard requirements;Basic security;User experience;Performance","General software practices","continue","software development best practices {date}","standard_requirements"]]></file>
933
+ <file id="bmad/bmm/workflows/2-plan-workflows/prd/checklist.md" type="md"><![CDATA[# PRD + Epics + Stories Validation Checklist
934
+
935
+ **Purpose**: Comprehensive validation that PRD, epics, and stories form a complete, implementable product plan.
936
+
937
+ **Scope**: Validates the complete planning output (PRD.md + epics.md) for Levels 2-4 software projects
938
+
939
+ **Expected Outputs**:
940
+
941
+ - PRD.md with complete requirements
942
+ - epics.md with detailed epic and story breakdown
943
+ - Updated bmm-workflow-status.yaml
944
+
945
+ ---
946
+
947
+ ## 1. PRD Document Completeness
948
+
949
+ ### Core Sections Present
950
+
951
+ - [ ] Executive Summary with vision alignment
952
+ - [ ] Product magic essence clearly articulated
953
+ - [ ] Project classification (type, domain, complexity)
954
+ - [ ] Success criteria defined
955
+ - [ ] Product scope (MVP, Growth, Vision) clearly delineated
956
+ - [ ] Functional requirements comprehensive and numbered
957
+ - [ ] Non-functional requirements (when applicable)
958
+ - [ ] References section with source documents
959
+
960
+ ### Project-Specific Sections
961
+
962
+ - [ ] **If complex domain:** Domain context and considerations documented
963
+ - [ ] **If innovation:** Innovation patterns and validation approach documented
964
+ - [ ] **If API/Backend:** Endpoint specification and authentication model included
965
+ - [ ] **If Mobile:** Platform requirements and device features documented
966
+ - [ ] **If SaaS B2B:** Tenant model and permission matrix included
967
+ - [ ] **If UI exists:** UX principles and key interactions documented
968
+
969
+ ### Quality Checks
970
+
971
+ - [ ] No unfilled template variables ({{variable}})
972
+ - [ ] All variables properly populated with meaningful content
973
+ - [ ] Product magic woven throughout (not just stated once)
974
+ - [ ] Language is clear, specific, and measurable
975
+ - [ ] Project type correctly identified and sections match
976
+ - [ ] Domain complexity appropriately addressed
977
+
978
+ ---
979
+
980
+ ## 2. Functional Requirements Quality
981
+
982
+ ### FR Format and Structure
983
+
984
+ - [ ] Each FR has unique identifier (FR-001, FR-002, etc.)
985
+ - [ ] FRs describe WHAT capabilities, not HOW to implement
986
+ - [ ] FRs are specific and measurable
987
+ - [ ] FRs are testable and verifiable
988
+ - [ ] FRs focus on user/business value
989
+ - [ ] No technical implementation details in FRs (those belong in architecture)
990
+
991
+ ### FR Completeness
992
+
993
+ - [ ] All MVP scope features have corresponding FRs
994
+ - [ ] Growth features documented (even if deferred)
995
+ - [ ] Vision features captured for future reference
996
+ - [ ] Domain-mandated requirements included
997
+ - [ ] Innovation requirements captured with validation needs
998
+ - [ ] Project-type specific requirements complete
999
+
1000
+ ### FR Organization
1001
+
1002
+ - [ ] FRs organized by capability/feature area (not by tech stack)
1003
+ - [ ] Related FRs grouped logically
1004
+ - [ ] Dependencies between FRs noted when critical
1005
+ - [ ] Priority/phase indicated (MVP vs Growth vs Vision)
1006
+
1007
+ ---
1008
+
1009
+ ## 3. Epics Document Completeness
1010
+
1011
+ ### Required Files
1012
+
1013
+ - [ ] epics.md exists in output folder
1014
+ - [ ] Epic list in PRD.md matches epics in epics.md (titles and count)
1015
+ - [ ] All epics have detailed breakdown sections
1016
+
1017
+ ### Epic Quality
1018
+
1019
+ - [ ] Each epic has clear goal and value proposition
1020
+ - [ ] Each epic includes complete story breakdown
1021
+ - [ ] Stories follow proper user story format: "As a [role], I want [goal], so that [benefit]"
1022
+ - [ ] Each story has numbered acceptance criteria
1023
+ - [ ] Prerequisites/dependencies explicitly stated per story
1024
+ - [ ] Stories are AI-agent sized (completable in 2-4 hour session)
1025
+
1026
+ ---
1027
+
1028
+ ## 4. FR Coverage Validation (CRITICAL)
1029
+
1030
+ ### Complete Traceability
1031
+
1032
+ - [ ] **Every FR from PRD.md is covered by at least one story in epics.md**
1033
+ - [ ] Each story references relevant FR numbers
1034
+ - [ ] No orphaned FRs (requirements without stories)
1035
+ - [ ] No orphaned stories (stories without FR connection)
1036
+ - [ ] Coverage matrix verified (can trace FR → Epic → Stories)
1037
+
1038
+ ### Coverage Quality
1039
+
1040
+ - [ ] Stories sufficiently decompose FRs into implementable units
1041
+ - [ ] Complex FRs broken into multiple stories appropriately
1042
+ - [ ] Simple FRs have appropriately scoped single stories
1043
+ - [ ] Non-functional requirements reflected in story acceptance criteria
1044
+ - [ ] Domain requirements embedded in relevant stories
1045
+
1046
+ ---
1047
+
1048
+ ## 5. Story Sequencing Validation (CRITICAL)
1049
+
1050
+ ### Epic 1 Foundation Check
1051
+
1052
+ - [ ] **Epic 1 establishes foundational infrastructure**
1053
+ - [ ] Epic 1 delivers initial deployable functionality
1054
+ - [ ] Epic 1 creates baseline for subsequent epics
1055
+ - [ ] Exception: If adding to existing app, foundation requirement adapted appropriately
1056
+
1057
+ ### Vertical Slicing
1058
+
1059
+ - [ ] **Each story delivers complete, testable functionality** (not horizontal layers)
1060
+ - [ ] No "build database" or "create UI" stories in isolation
1061
+ - [ ] Stories integrate across stack (data + logic + presentation when applicable)
1062
+ - [ ] Each story leaves system in working/deployable state
1063
+
1064
+ ### No Forward Dependencies
1065
+
1066
+ - [ ] **No story depends on work from a LATER story or epic**
1067
+ - [ ] Stories within each epic are sequentially ordered
1068
+ - [ ] Each story builds only on previous work
1069
+ - [ ] Dependencies flow backward only (can reference earlier stories)
1070
+ - [ ] Parallel tracks clearly indicated if stories are independent
1071
+
1072
+ ### Value Delivery Path
1073
+
1074
+ - [ ] Each epic delivers significant end-to-end value
1075
+ - [ ] Epic sequence shows logical product evolution
1076
+ - [ ] User can see value after each epic completion
1077
+ - [ ] MVP scope clearly achieved by end of designated epics
1078
+
1079
+ ---
1080
+
1081
+ ## 6. Scope Management
1082
+
1083
+ ### MVP Discipline
1084
+
1085
+ - [ ] MVP scope is genuinely minimal and viable
1086
+ - [ ] Core features list contains only true must-haves
1087
+ - [ ] Each MVP feature has clear rationale for inclusion
1088
+ - [ ] No obvious scope creep in "must-have" list
1089
+
1090
+ ### Future Work Captured
1091
+
1092
+ - [ ] Growth features documented for post-MVP
1093
+ - [ ] Vision features captured to maintain long-term direction
1094
+ - [ ] Out-of-scope items explicitly listed
1095
+ - [ ] Deferred features have clear reasoning for deferral
1096
+
1097
+ ### Clear Boundaries
1098
+
1099
+ - [ ] Stories marked as MVP vs Growth vs Vision
1100
+ - [ ] Epic sequencing aligns with MVP → Growth progression
1101
+ - [ ] No confusion about what's in vs out of initial scope
1102
+
1103
+ ---
1104
+
1105
+ ## 7. Research and Context Integration
1106
+
1107
+ ### Source Document Integration
1108
+
1109
+ - [ ] **If product brief exists:** Key insights incorporated into PRD
1110
+ - [ ] **If domain brief exists:** Domain requirements reflected in FRs and stories
1111
+ - [ ] **If research documents exist:** Research findings inform requirements
1112
+ - [ ] **If competitive analysis exists:** Differentiation strategy clear in PRD
1113
+ - [ ] All source documents referenced in PRD References section
1114
+
1115
+ ### Research Continuity to Architecture
1116
+
1117
+ - [ ] Domain complexity considerations documented for architects
1118
+ - [ ] Technical constraints from research captured
1119
+ - [ ] Regulatory/compliance requirements clearly stated
1120
+ - [ ] Integration requirements with existing systems documented
1121
+ - [ ] Performance/scale requirements informed by research data
1122
+
1123
+ ### Information Completeness for Next Phase
1124
+
1125
+ - [ ] PRD provides sufficient context for architecture decisions
1126
+ - [ ] Epics provide sufficient detail for technical design
1127
+ - [ ] Stories have enough acceptance criteria for implementation
1128
+ - [ ] Non-obvious business rules documented
1129
+ - [ ] Edge cases and special scenarios captured
1130
+
1131
+ ---
1132
+
1133
+ ## 8. Cross-Document Consistency
1134
+
1135
+ ### Terminology Consistency
1136
+
1137
+ - [ ] Same terms used across PRD and epics for concepts
1138
+ - [ ] Feature names consistent between documents
1139
+ - [ ] Epic titles match between PRD and epics.md
1140
+ - [ ] No contradictions between PRD and epics
1141
+
1142
+ ### Alignment Checks
1143
+
1144
+ - [ ] Success metrics in PRD align with story outcomes
1145
+ - [ ] Product magic articulated in PRD reflected in epic goals
1146
+ - [ ] Technical preferences in PRD align with story implementation hints
1147
+ - [ ] Scope boundaries consistent across all documents
1148
+
1149
+ ---
1150
+
1151
+ ## 9. Readiness for Implementation
1152
+
1153
+ ### Architecture Readiness (Next Phase)
1154
+
1155
+ - [ ] PRD provides sufficient context for architecture workflow
1156
+ - [ ] Technical constraints and preferences documented
1157
+ - [ ] Integration points identified
1158
+ - [ ] Performance/scale requirements specified
1159
+ - [ ] Security and compliance needs clear
1160
+
1161
+ ### Development Readiness
1162
+
1163
+ - [ ] Stories are specific enough to estimate
1164
+ - [ ] Acceptance criteria are testable
1165
+ - [ ] Technical unknowns identified and flagged
1166
+ - [ ] Dependencies on external systems documented
1167
+ - [ ] Data requirements specified
1168
+
1169
+ ### Track-Appropriate Detail
1170
+
1171
+ **If BMad Method:**
1172
+
1173
+ - [ ] PRD supports full architecture workflow
1174
+ - [ ] Epic structure supports phased delivery
1175
+ - [ ] Scope appropriate for product/platform development
1176
+ - [ ] Clear value delivery through epic sequence
1177
+
1178
+ **If Enterprise Method:**
1179
+
1180
+ - [ ] PRD addresses enterprise requirements (security, compliance, multi-tenancy)
1181
+ - [ ] Epic structure supports extended planning phases
1182
+ - [ ] Scope includes security, devops, and test strategy considerations
1183
+ - [ ] Clear value delivery with enterprise gates
1184
+
1185
+ ---
1186
+
1187
+ ## 10. Quality and Polish
1188
+
1189
+ ### Writing Quality
1190
+
1191
+ - [ ] Language is clear and free of jargon (or jargon is defined)
1192
+ - [ ] Sentences are concise and specific
1193
+ - [ ] No vague statements ("should be fast", "user-friendly")
1194
+ - [ ] Measurable criteria used throughout
1195
+ - [ ] Professional tone appropriate for stakeholder review
1196
+
1197
+ ### Document Structure
1198
+
1199
+ - [ ] Sections flow logically
1200
+ - [ ] Headers and numbering consistent
1201
+ - [ ] Cross-references accurate (FR numbers, section references)
1202
+ - [ ] Formatting consistent throughout
1203
+ - [ ] Tables/lists formatted properly
1204
+
1205
+ ### Completeness Indicators
1206
+
1207
+ - [ ] No [TODO] or [TBD] markers remain
1208
+ - [ ] No placeholder text
1209
+ - [ ] All sections have substantive content
1210
+ - [ ] Optional sections either complete or omitted (not half-done)
1211
+
1212
+ ---
1213
+
1214
+ ## Critical Failures (Auto-Fail)
1215
+
1216
+ If ANY of these are true, validation FAILS:
1217
+
1218
+ - [ ] ❌ **No epics.md file exists** (two-file output required)
1219
+ - [ ] ❌ **Epic 1 doesn't establish foundation** (violates core sequencing principle)
1220
+ - [ ] ❌ **Stories have forward dependencies** (breaks sequential implementation)
1221
+ - [ ] ❌ **Stories not vertically sliced** (horizontal layers block value delivery)
1222
+ - [ ] ❌ **Epics don't cover all FRs** (orphaned requirements)
1223
+ - [ ] ❌ **FRs contain technical implementation details** (should be in architecture)
1224
+ - [ ] ❌ **No FR traceability to stories** (can't validate coverage)
1225
+ - [ ] ❌ **Template variables unfilled** (incomplete document)
1226
+
1227
+ ---
1228
+
1229
+ ## Validation Summary
1230
+
1231
+ **Total Validation Points:** ~85
1232
+
1233
+ ### Scoring Guide
1234
+
1235
+ - **Pass Rate ≥ 95% (81+/85):** ✅ EXCELLENT - Ready for architecture phase
1236
+ - **Pass Rate 85-94% (72-80/85):** ⚠️ GOOD - Minor fixes needed
1237
+ - **Pass Rate 70-84% (60-71/85):** ⚠️ FAIR - Important issues to address
1238
+ - **Pass Rate < 70% (<60/85):** ❌ POOR - Significant rework required
1239
+
1240
+ ### Critical Issue Threshold
1241
+
1242
+ - **0 Critical Failures:** Proceed to fixes
1243
+ - **1+ Critical Failures:** STOP - Must fix critical issues first
1244
+
1245
+ ---
1246
+
1247
+ ## Validation Execution Notes
1248
+
1249
+ **When validating:**
1250
+
1251
+ 1. **Load ALL documents:**
1252
+ - PRD.md (required)
1253
+ - epics.md (required)
1254
+ - product-brief.md (if exists)
1255
+ - domain-brief.md (if exists)
1256
+ - research documents (if referenced)
1257
+
1258
+ 2. **Validate in order:**
1259
+ - Check critical failures first (immediate stop if any found)
1260
+ - Verify PRD completeness
1261
+ - Verify epics completeness
1262
+ - Cross-reference FR coverage (most important)
1263
+ - Check sequencing (second most important)
1264
+ - Validate research integration
1265
+ - Check polish and quality
1266
+
1267
+ 3. **Report findings:**
1268
+ - List critical failures prominently
1269
+ - Group issues by severity
1270
+ - Provide specific line numbers/sections
1271
+ - Suggest concrete fixes
1272
+ - Highlight what's working well
1273
+
1274
+ 4. **Provide actionable next steps:**
1275
+ - If validation passes: "Ready for architecture workflow"
1276
+ - If minor issues: "Fix [X] items then re-validate"
1277
+ - If major issues: "Rework [sections] then re-validate"
1278
+ - If critical failures: "Must fix critical items before proceeding"
1279
+
1280
+ ---
1281
+
1282
+ **Remember:** This validation ensures the entire planning phase is complete and the implementation phase has everything needed to succeed. Be thorough but fair - the goal is quality, not perfection.
1283
+ ]]></file>
1284
+ <file id="bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/workflow.yaml" type="yaml"><![CDATA[name: create-epics-and-stories
1285
+ description: >-
1286
+ Transform PRD requirements into bite-sized stories organized in epics for 200k
1287
+ context dev agents
1288
+ author: BMad
1289
+ instructions: >-
1290
+ bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/instructions.md
1291
+ template: >-
1292
+ bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/epics-template.md
1293
+ web_bundle_files:
1294
+ - >-
1295
+ bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/instructions.md
1296
+ - >-
1297
+ bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/epics-template.md
1298
+ ]]></file>
1299
+ <file id="bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/instructions.md" type="md"><![CDATA[# Epic and Story Decomposition - Intent-Based Implementation Planning
1300
+
1301
+ <critical>The workflow execution engine is governed by: bmad/core/tasks/workflow.xml</critical>
1302
+ <critical>You MUST have already loaded and processed: {installed_path}/workflow.yaml</critical>
1303
+ <critical>This workflow transforms requirements into BITE-SIZED STORIES for development agents</critical>
1304
+ <critical>EVERY story must be completable by a single dev agent in one focused session</critical>
1305
+ <critical>Communicate all responses in {communication_language} and adapt to {user_skill_level}</critical>
1306
+ <critical>Generate all documents in {document_output_language}</critical>
1307
+ <critical>LIVING DOCUMENT: Write to epics.md continuously as you work - never wait until the end</critical>
1308
+ <critical>Input documents specified in workflow.yaml input_file_patterns - workflow engine handles fuzzy matching, whole vs sharded document discovery automatically</critical>
1309
+
1310
+ <workflow>
1311
+
1312
+ <step n="1" goal="Load PRD and extract requirements">
1313
+ <action>Welcome {user_name} to epic and story planning
1314
+
1315
+ Load required documents (fuzzy match, handle both whole and sharded):
1316
+
1317
+ - PRD.md (required)
1318
+ - domain-brief.md (if exists)
1319
+ - product-brief.md (if exists)
1320
+
1321
+ Extract from PRD:
1322
+
1323
+ - All functional requirements
1324
+ - Non-functional requirements
1325
+ - Domain considerations and compliance needs
1326
+ - Project type and complexity
1327
+ - MVP vs growth vs vision scope boundaries
1328
+
1329
+ Understand the context:
1330
+
1331
+ - What makes this product special (the magic)
1332
+ - Technical constraints
1333
+ - User types and their goals
1334
+ - Success criteria</action>
1335
+ </step>
1336
+
1337
+ <step n="2" goal="Propose epic structure from natural groupings">
1338
+ <action>Analyze requirements and identify natural epic boundaries
1339
+
1340
+ INTENT: Find organic groupings that make sense for THIS product
1341
+
1342
+ Look for natural patterns:
1343
+
1344
+ - Features that work together cohesively
1345
+ - User journeys that connect
1346
+ - Business capabilities that cluster
1347
+ - Domain requirements that relate (compliance, validation, security)
1348
+ - Technical systems that should be built together
1349
+
1350
+ Name epics based on VALUE, not technical layers:
1351
+
1352
+ - Good: "User Onboarding", "Content Discovery", "Compliance Framework"
1353
+ - Avoid: "Database Layer", "API Endpoints", "Frontend"
1354
+
1355
+ Each epic should:
1356
+
1357
+ - Have clear business goal and user value
1358
+ - Be independently valuable
1359
+ - Contain 3-8 related capabilities
1360
+ - Be deliverable in cohesive phase
1361
+
1362
+ For greenfield projects:
1363
+
1364
+ - First epic MUST establish foundation (project setup, core infrastructure, deployment pipeline)
1365
+ - Foundation enables all subsequent work
1366
+
1367
+ For complex domains:
1368
+
1369
+ - Consider dedicated compliance/regulatory epics
1370
+ - Group validation and safety requirements logically
1371
+ - Note expertise requirements
1372
+
1373
+ Present proposed epic structure showing:
1374
+
1375
+ - Epic titles with clear value statements
1376
+ - High-level scope of each epic
1377
+ - Suggested sequencing
1378
+ - Why this grouping makes sense</action>
1379
+
1380
+ <template-output>epics_summary</template-output>
1381
+ <invoke-task halt="true">bmad/core/tasks/adv-elicit.xml</invoke-task>
1382
+ </step>
1383
+
1384
+ <step n="3" goal="Decompose each epic into bite-sized stories" repeat="for-each-epic">
1385
+ <action>Break down Epic {{N}} into small, implementable stories
1386
+
1387
+ INTENT: Create stories sized for single dev agent completion
1388
+
1389
+ For each epic, generate:
1390
+
1391
+ - Epic title as `epic_title_{{N}}`
1392
+ - Epic goal/value as `epic_goal_{{N}}`
1393
+ - All stories as repeated pattern `story_title_{{N}}_{{M}}` for each story M
1394
+
1395
+ CRITICAL for Epic 1 (Foundation):
1396
+
1397
+ - Story 1.1 MUST be project setup/infrastructure initialization
1398
+ - Sets up: repo structure, build system, deployment pipeline basics, core dependencies
1399
+ - Creates foundation for all subsequent stories
1400
+ - Note: Architecture workflow will flesh out technical details
1401
+
1402
+ Each story should follow BDD-style acceptance criteria:
1403
+
1404
+ **Story Pattern:**
1405
+ As a [user type],
1406
+ I want [specific capability],
1407
+ So that [clear value/benefit].
1408
+
1409
+ **Acceptance Criteria using BDD:**
1410
+ Given [precondition or initial state]
1411
+ When [action or trigger]
1412
+ Then [expected outcome]
1413
+
1414
+ And [additional criteria as needed]
1415
+
1416
+ **Prerequisites:** Only previous stories (never forward dependencies)
1417
+
1418
+ **Technical Notes:** Implementation guidance, affected components, compliance requirements
1419
+
1420
+ Ensure stories are:
1421
+
1422
+ - Vertically sliced (deliver complete functionality, not just one layer)
1423
+ - Sequentially ordered (logical progression, no forward dependencies)
1424
+ - Independently valuable when possible
1425
+ - Small enough for single-session completion
1426
+ - Clear enough for autonomous implementation
1427
+
1428
+ For each story in epic {{N}}, output variables following this pattern:
1429
+
1430
+ - story*title*{{N}}_1, story_title_{{N}}\_2, etc.
1431
+ - Each containing: user story, BDD acceptance criteria, prerequisites, technical notes</action>
1432
+
1433
+ <template-output>epic*title*{{N}}</template-output>
1434
+ <template-output>epic*goal*{{N}}</template-output>
1435
+
1436
+ <action>For each story M in epic {{N}}, generate story content</action>
1437
+ <template-output>story*title*{{N}}\_{{M}}</template-output>
1438
+
1439
+ <invoke-task halt="true">bmad/core/tasks/adv-elicit.xml</invoke-task>
1440
+ </step>
1441
+
1442
+ <step n="4" goal="Review and finalize epic breakdown">
1443
+ <action>Review the complete epic breakdown for quality and completeness
1444
+
1445
+ Validate:
1446
+
1447
+ - All functional requirements from PRD are covered by stories
1448
+ - Epic 1 establishes proper foundation
1449
+ - All stories are vertically sliced
1450
+ - No forward dependencies exist
1451
+ - Story sizing is appropriate for single-session completion
1452
+ - BDD acceptance criteria are clear and testable
1453
+ - Domain/compliance requirements are properly distributed
1454
+ - Sequencing enables incremental value delivery
1455
+
1456
+ Confirm with {user_name}:
1457
+
1458
+ - Epic structure makes sense
1459
+ - Story breakdown is actionable
1460
+ - Dependencies are clear
1461
+ - BDD format provides clarity
1462
+ - Ready for architecture and implementation phases</action>
1463
+
1464
+ <template-output>epic_breakdown_summary</template-output>
1465
+ </step>
1466
+
1467
+ </workflow>
1468
+ ]]></file>
1469
+ <file id="bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/epics-template.md" type="md"><![CDATA[# {{project_name}} - Epic Breakdown
1470
+
1471
+ **Author:** {{user_name}}
1472
+ **Date:** {{date}}
1473
+ **Project Level:** {{project_level}}
1474
+ **Target Scale:** {{target_scale}}
1475
+
1476
+ ---
1477
+
1478
+ ## Overview
1479
+
1480
+ This document provides the complete epic and story breakdown for {{project_name}}, decomposing the requirements from the [PRD](./PRD.md) into implementable stories.
1481
+
1482
+ {{epics_summary}}
1483
+
1484
+ ---
1485
+
1486
+ <!-- Repeat for each epic (N = 1, 2, 3...) -->
1487
+
1488
+ ## Epic {{N}}: {{epic_title_N}}
1489
+
1490
+ {{epic_goal_N}}
1491
+
1492
+ <!-- Repeat for each story (M = 1, 2, 3...) within epic N -->
1493
+
1494
+ ### Story {{N}}.{{M}}: {{story_title_N_M}}
1495
+
1496
+ As a {{user_type}},
1497
+ I want {{capability}},
1498
+ So that {{value_benefit}}.
1499
+
1500
+ **Acceptance Criteria:**
1501
+
1502
+ **Given** {{precondition}}
1503
+ **When** {{action}}
1504
+ **Then** {{expected_outcome}}
1505
+
1506
+ **And** {{additional_criteria}}
1507
+
1508
+ **Prerequisites:** {{dependencies_on_previous_stories}}
1509
+
1510
+ **Technical Notes:** {{implementation_guidance}}
1511
+
1512
+ <!-- End story repeat -->
1513
+
1514
+ ---
1515
+
1516
+ <!-- End epic repeat -->
1517
+
1518
+ ---
1519
+
1520
+ _For implementation: Use the `create-story` workflow to generate individual story implementation plans from this epic breakdown._
1521
+ ]]></file>
1522
+ <file id="bmad/core/tasks/adv-elicit.xml" type="xml">
1523
+ <task id="bmad/core/tasks/adv-elicit.xml" name="Advanced Elicitation" standalone="true">
1524
+ <llm critical="true">
1525
+ <i>MANDATORY: Execute ALL steps in the flow section IN EXACT ORDER</i>
1526
+ <i>DO NOT skip steps or change the sequence</i>
1527
+ <i>HALT immediately when halt-conditions are met</i>
1528
+ <i>Each action xml tag within step xml tag is a REQUIRED action to complete that step</i>
1529
+ <i>Sections outside flow (validation, output, critical-context) provide essential context - review and apply throughout execution</i>
1530
+ </llm>
1531
+
1532
+ <integration description="When called from workflow">
1533
+ <desc>When called during template workflow processing:</desc>
1534
+ <i>1. Receive the current section content that was just generated</i>
1535
+ <i>2. Apply elicitation methods iteratively to enhance that specific content</i>
1536
+ <i>3. Return the enhanced version back when user selects 'x' to proceed and return back</i>
1537
+ <i>4. The enhanced content replaces the original section content in the output document</i>
1538
+ </integration>
1539
+
1540
+ <flow>
1541
+ <step n="1" title="Method Registry Loading">
1542
+ <action>Load and read core/tasks/adv-elicit-methods.csv</action>
1543
+
1544
+ <csv-structure>
1545
+ <i>category: Method grouping (core, structural, risk, etc.)</i>
1546
+ <i>method_name: Display name for the method</i>
1547
+ <i>description: Rich explanation of what the method does, when to use it, and why it's valuable</i>
1548
+ <i>output_pattern: Flexible flow guide using → arrows (e.g., "analysis → insights → action")</i>
1549
+ </csv-structure>
1550
+
1551
+ <context-analysis>
1552
+ <i>Use conversation history</i>
1553
+ <i>Analyze: content type, complexity, stakeholder needs, risk level, and creative potential</i>
1554
+ </context-analysis>
1555
+
1556
+ <smart-selection>
1557
+ <i>1. Analyze context: Content type, complexity, stakeholder needs, risk level, creative potential</i>
1558
+ <i>2. Parse descriptions: Understand each method's purpose from the rich descriptions in CSV</i>
1559
+ <i>3. Select 5 methods: Choose methods that best match the context based on their descriptions</i>
1560
+ <i>4. Balance approach: Include mix of foundational and specialized techniques as appropriate</i>
1561
+ </smart-selection>
1562
+ </step>
1563
+
1564
+ <step n="2" title="Present Options and Handle Responses">
1565
+
1566
+ <format>
1567
+ **Advanced Elicitation Options**
1568
+ Choose a number (1-5), r to shuffle, or x to proceed:
1569
+
1570
+ 1. [Method Name]
1571
+ 2. [Method Name]
1572
+ 3. [Method Name]
1573
+ 4. [Method Name]
1574
+ 5. [Method Name]
1575
+ r. Reshuffle the list with 5 new options
1576
+ x. Proceed / No Further Actions
1577
+ </format>
1578
+
1579
+ <response-handling>
1580
+ <case n="1-5">
1581
+ <i>Execute the selected method using its description from the CSV</i>
1582
+ <i>Adapt the method's complexity and output format based on the current context</i>
1583
+ <i>Apply the method creatively to the current section content being enhanced</i>
1584
+ <i>Display the enhanced version showing what the method revealed or improved</i>
1585
+ <i>CRITICAL: Ask the user if they would like to apply the changes to the doc (y/n/other) and HALT to await response.</i>
1586
+ <i>CRITICAL: ONLY if Yes, apply the changes. IF No, discard your memory of the proposed changes. If any other reply, try best to
1587
+ follow the instructions given by the user.</i>
1588
+ <i>CRITICAL: Re-present the same 1-5,r,x prompt to allow additional elicitations</i>
1589
+ </case>
1590
+ <case n="r">
1591
+ <i>Select 5 different methods from adv-elicit-methods.csv, present new list with same prompt format</i>
1592
+ </case>
1593
+ <case n="x">
1594
+ <i>Complete elicitation and proceed</i>
1595
+ <i>Return the fully enhanced content back to create-doc.md</i>
1596
+ <i>The enhanced content becomes the final version for that section</i>
1597
+ <i>Signal completion back to create-doc.md to continue with next section</i>
1598
+ </case>
1599
+ <case n="direct-feedback">
1600
+ <i>Apply changes to current section content and re-present choices</i>
1601
+ </case>
1602
+ <case n="multiple-numbers">
1603
+ <i>Execute methods in sequence on the content, then re-offer choices</i>
1604
+ </case>
1605
+ </response-handling>
1606
+ </step>
1607
+
1608
+ <step n="3" title="Execution Guidelines">
1609
+ <i>Method execution: Use the description from CSV to understand and apply each method</i>
1610
+ <i>Output pattern: Use the pattern as a flexible guide (e.g., "paths → evaluation → selection")</i>
1611
+ <i>Dynamic adaptation: Adjust complexity based on content needs (simple to sophisticated)</i>
1612
+ <i>Creative application: Interpret methods flexibly based on context while maintaining pattern consistency</i>
1613
+ <i>Be concise: Focus on actionable insights</i>
1614
+ <i>Stay relevant: Tie elicitation to specific content being analyzed (the current section from create-doc)</i>
1615
+ <i>Identify personas: For multi-persona methods, clearly identify viewpoints</i>
1616
+ <i>Critical loop behavior: Always re-offer the 1-5,r,x choices after each method execution</i>
1617
+ <i>Continue until user selects 'x' to proceed with enhanced content</i>
1618
+ <i>Each method application builds upon previous enhancements</i>
1619
+ <i>Content preservation: Track all enhancements made during elicitation</i>
1620
+ <i>Iterative enhancement: Each selected method (1-5) should:</i>
1621
+ <i> 1. Apply to the current enhanced version of the content</i>
1622
+ <i> 2. Show the improvements made</i>
1623
+ <i> 3. Return to the prompt for additional elicitations or completion</i>
1624
+ </step>
1625
+ </flow>
1626
+ </task>
1627
+ </file>
1628
+ <file id="bmad/core/tasks/adv-elicit-methods.csv" type="csv"><![CDATA[category,method_name,description,output_pattern
1629
+ advanced,Tree of Thoughts,Explore multiple reasoning paths simultaneously then evaluate and select the best - perfect for complex problems with multiple valid approaches where finding the optimal path matters,paths → evaluation → selection
1630
+ advanced,Graph of Thoughts,Model reasoning as an interconnected network of ideas to reveal hidden relationships - ideal for systems thinking and discovering emergent patterns in complex multi-factor situations,nodes → connections → patterns
1631
+ advanced,Thread of Thought,Maintain coherent reasoning across long contexts by weaving a continuous narrative thread - essential for RAG systems and maintaining consistency in lengthy analyses,context → thread → synthesis
1632
+ advanced,Self-Consistency Validation,Generate multiple independent approaches then compare for consistency - crucial for high-stakes decisions where verification and consensus building matter,approaches → comparison → consensus
1633
+ advanced,Meta-Prompting Analysis,Step back to analyze the approach structure and methodology itself - valuable for optimizing prompts and improving problem-solving strategies,current → analysis → optimization
1634
+ advanced,Reasoning via Planning,Build a reasoning tree guided by world models and goal states - excellent for strategic planning and sequential decision-making tasks,model → planning → strategy
1635
+ collaboration,Stakeholder Round Table,Convene multiple personas to contribute diverse perspectives - essential for requirements gathering and finding balanced solutions across competing interests,perspectives → synthesis → alignment
1636
+ collaboration,Expert Panel Review,Assemble domain experts for deep specialized analysis - ideal when technical depth and peer review quality are needed,expert views → consensus → recommendations
1637
+ competitive,Red Team vs Blue Team,Adversarial attack-defend analysis to find vulnerabilities - critical for security testing and building robust solutions through adversarial thinking,defense → attack → hardening
1638
+ core,Expand or Contract for Audience,Dynamically adjust detail level and technical depth for target audience - essential when content needs to match specific reader capabilities,audience → adjustments → refined content
1639
+ core,Critique and Refine,Systematic review to identify strengths and weaknesses then improve - standard quality check for drafts needing polish and enhancement,strengths/weaknesses → improvements → refined version
1640
+ core,Explain Reasoning,Walk through step-by-step thinking to show how conclusions were reached - crucial for transparency and helping others understand complex logic,steps → logic → conclusion
1641
+ core,First Principles Analysis,Strip away assumptions to rebuild from fundamental truths - breakthrough technique for innovation and solving seemingly impossible problems,assumptions → truths → new approach
1642
+ core,5 Whys Deep Dive,Repeatedly ask why to drill down to root causes - simple but powerful for understanding failures and fixing problems at their source,why chain → root cause → solution
1643
+ core,Socratic Questioning,Use targeted questions to reveal hidden assumptions and guide discovery - excellent for teaching and helping others reach insights themselves,questions → revelations → understanding
1644
+ creative,Reverse Engineering,Work backwards from desired outcome to find implementation path - powerful for goal achievement and understanding how to reach specific endpoints,end state → steps backward → path forward
1645
+ creative,What If Scenarios,Explore alternative realities to understand possibilities and implications - valuable for contingency planning and creative exploration,scenarios → implications → insights
1646
+ creative,SCAMPER Method,Apply seven creativity lenses (Substitute/Combine/Adapt/Modify/Put/Eliminate/Reverse) - systematic ideation for product innovation and improvement,S→C→A→M→P→E→R
1647
+ learning,Feynman Technique,Explain complex concepts simply as if teaching a child - the ultimate test of true understanding and excellent for knowledge transfer,complex → simple → gaps → mastery
1648
+ learning,Active Recall Testing,Test understanding without references to verify true knowledge - essential for identifying gaps and reinforcing mastery,test → gaps → reinforcement
1649
+ narrative,Unreliable Narrator Mode,Question assumptions and biases by adopting skeptical perspective - crucial for detecting hidden agendas and finding balanced truth,perspective → biases → balanced view
1650
+ optimization,Speedrun Optimization,Find the fastest most efficient path by eliminating waste - perfect when time pressure demands maximum efficiency,current → bottlenecks → optimized
1651
+ optimization,New Game Plus,Revisit challenges with enhanced capabilities from prior experience - excellent for iterative improvement and mastery building,initial → enhanced → improved
1652
+ optimization,Roguelike Permadeath,Treat decisions as irreversible to force careful high-stakes analysis - ideal for critical decisions with no second chances,decision → consequences → execution
1653
+ philosophical,Occam's Razor Application,Find the simplest sufficient explanation by eliminating unnecessary complexity - essential for debugging and theory selection,options → simplification → selection
1654
+ philosophical,Trolley Problem Variations,Explore ethical trade-offs through moral dilemmas - valuable for understanding values and making difficult ethical decisions,dilemma → analysis → decision
1655
+ quantum,Observer Effect Consideration,Analyze how the act of measurement changes what's being measured - important for understanding metrics impact and self-aware systems,unmeasured → observation → impact
1656
+ retrospective,Hindsight Reflection,Imagine looking back from the future to gain perspective - powerful for project reviews and extracting wisdom from experience,future view → insights → application
1657
+ retrospective,Lessons Learned Extraction,Systematically identify key takeaways and actionable improvements - essential for knowledge transfer and continuous improvement,experience → lessons → actions
1658
+ risk,Identify Potential Risks,Brainstorm what could go wrong across all categories - fundamental for project planning and deployment preparation,categories → risks → mitigations
1659
+ risk,Challenge from Critical Perspective,Play devil's advocate to stress-test ideas and find weaknesses - essential for overcoming groupthink and building robust solutions,assumptions → challenges → strengthening
1660
+ risk,Failure Mode Analysis,Systematically explore how each component could fail - critical for reliability engineering and safety-critical systems,components → failures → prevention
1661
+ risk,Pre-mortem Analysis,Imagine future failure then work backwards to prevent it - powerful technique for risk mitigation before major launches,failure scenario → causes → prevention
1662
+ scientific,Peer Review Simulation,Apply rigorous academic evaluation standards - ensures quality through methodology review and critical assessment,methodology → analysis → recommendations
1663
+ scientific,Reproducibility Check,Verify results can be replicated independently - fundamental for reliability and scientific validity,method → replication → validation
1664
+ structural,Dependency Mapping,Visualize interconnections to understand requirements and impacts - essential for complex systems and integration planning,components → dependencies → impacts
1665
+ structural,Information Architecture Review,Optimize organization and hierarchy for better user experience - crucial for fixing navigation and findability problems,current → pain points → restructure
1666
+ structural,Skeleton of Thought,Create structure first then expand branches in parallel - efficient for generating long content quickly with good organization,skeleton → branches → integration]]></file>
1667
+ <file id="bmad/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml" type="yaml"><![CDATA[name: tech-spec-sm
1668
+ description: >-
1669
+ Technical specification workflow for Level 0-1 projects. Creates focused tech
1670
+ spec with story generation. Level 0: tech-spec + user story. Level 1:
1671
+ tech-spec + epic/stories.
1672
+ author: BMad
1673
+ instructions: bmad/bmm/workflows/2-plan-workflows/tech-spec/instructions.md
1674
+ web_bundle_files:
1675
+ - bmad/bmm/workflows/2-plan-workflows/tech-spec/instructions.md
1676
+ - bmad/bmm/workflows/2-plan-workflows/tech-spec/instructions-level0-story.md
1677
+ - bmad/bmm/workflows/2-plan-workflows/tech-spec/instructions-level1-stories.md
1678
+ - bmad/bmm/workflows/2-plan-workflows/tech-spec/tech-spec-template.md
1679
+ - bmad/bmm/workflows/2-plan-workflows/tech-spec/user-story-template.md
1680
+ - bmad/bmm/workflows/2-plan-workflows/tech-spec/epics-template.md
1681
+ - bmad/core/tasks/workflow.xml
1682
+ - bmad/core/tasks/adv-elicit.xml
1683
+ - bmad/core/tasks/adv-elicit-methods.csv
1684
+ ]]></file>
1685
+ <file id="bmad/bmm/workflows/2-plan-workflows/tech-spec/instructions.md" type="md"><![CDATA[# Tech-Spec Workflow - Context-Aware Technical Planning (Level 0-1)
1686
+
1687
+ <workflow>
1688
+
1689
+ <critical>The workflow execution engine is governed by: bmad/core/tasks/workflow.xml</critical>
1690
+ <critical>You MUST have already loaded and processed: {installed_path}/workflow.yaml</critical>
1691
+ <critical>Communicate all responses in {communication_language} and language MUST be tailored to {user_skill_level}</critical>
1692
+ <critical>Generate all documents in {document_output_language}</critical>
1693
+ <critical>This is for Level 0-1 projects - tech-spec with context-rich story generation</critical>
1694
+ <critical>Level 0: tech-spec + single user story | Level 1: tech-spec + epic/stories</critical>
1695
+ <critical>LIVING DOCUMENT: Write to tech-spec.md continuously as you discover - never wait until the end</critical>
1696
+ <critical>CONTEXT IS KING: Gather ALL available context before generating specs</critical>
1697
+ <critical>DOCUMENT OUTPUT: Technical, precise, definitive. Specific versions only. User skill level ({user_skill_level}) affects conversation style ONLY, not document content.</critical>
1698
+ <critical>Input documents specified in workflow.yaml input_file_patterns - workflow engine handles fuzzy matching, whole vs sharded document discovery automatically</critical>
1699
+
1700
+ <step n="0" goal="Validate workflow readiness and detect project level" tag="workflow-status">
1701
+ <action>Check if {output_folder}/bmm-workflow-status.yaml exists</action>
1702
+
1703
+ <check if="status file not found">
1704
+ <output>No workflow status file found. Tech-spec workflow can run standalone or as part of BMM workflow path.</output>
1705
+ <output>**Recommended:** Run `workflow-init` first for project context tracking and workflow sequencing.</output>
1706
+ <output>**Quick Start:** Continue in standalone mode - perfect for rapid prototyping and quick changes!</output>
1707
+ <ask>Continue in standalone mode or exit to run workflow-init? (continue/exit)</ask>
1708
+ <check if="continue">
1709
+ <action>Set standalone_mode = true</action>
1710
+
1711
+ <output>Great! Let's quickly configure your project...</output>
1712
+
1713
+ <ask>What level is this project?
1714
+
1715
+ **Level 0** - Single atomic change (bug fix, small isolated feature, single file change)
1716
+ → Generates: 1 tech-spec + 1 story
1717
+ → Example: "Fix login validation bug" or "Add email field to user form"
1718
+
1719
+ **Level 1** - Coherent feature (multiple related changes, small feature set)
1720
+ → Generates: 1 tech-spec + 1 epic + 2-3 stories
1721
+ → Example: "Add OAuth integration" or "Build user profile page"
1722
+
1723
+ Enter **0** or **1**:</ask>
1724
+
1725
+ <action>Capture user response as project_level (0 or 1)</action>
1726
+ <action>Validate: If not 0 or 1, ask again</action>
1727
+
1728
+ <ask>Is this a **greenfield** (new/empty codebase) or **brownfield** (existing codebase) project?
1729
+
1730
+ **Greenfield** - Starting fresh, no existing code
1731
+ **Brownfield** - Adding to or modifying existing code
1732
+
1733
+ Enter **greenfield** or **brownfield**:</ask>
1734
+
1735
+ <action>Capture user response as field_type (greenfield or brownfield)</action>
1736
+ <action>Validate: If not greenfield or brownfield, ask again</action>
1737
+
1738
+ <output>Perfect! Running as:
1739
+
1740
+ - **Project Level:** {{project_level}}
1741
+ - **Field Type:** {{field_type}}
1742
+ - **Mode:** Standalone (no status file tracking)
1743
+
1744
+ Let's build your tech-spec!</output>
1745
+ </check>
1746
+ <check if="exit">
1747
+ <action>Exit workflow</action>
1748
+ </check>
1749
+ </check>
1750
+
1751
+ <check if="status file found">
1752
+ <action>Load the FULL file: {output_folder}/bmm-workflow-status.yaml</action>
1753
+ <action>Parse workflow_status section</action>
1754
+ <action>Check status of "tech-spec" workflow</action>
1755
+ <action>Get project_level from YAML metadata</action>
1756
+ <action>Get field_type from YAML metadata (greenfield or brownfield)</action>
1757
+ <action>Find first non-completed workflow (next expected workflow)</action>
1758
+
1759
+ <check if="project_level >= 2">
1760
+ <output>**Incorrect Workflow for Level {{project_level}}**
1761
+
1762
+ Tech-spec is for Level 0-1 projects. Level 2-4 should use PRD workflow.
1763
+
1764
+ **Correct workflow:** `create-prd` (PM agent)
1765
+ </output>
1766
+ <action>Exit and redirect to prd</action>
1767
+ </check>
1768
+
1769
+ <check if="tech-spec status is file path (already completed)">
1770
+ <output>⚠️ Tech-spec already completed: {{tech-spec status}}</output>
1771
+ <ask>Re-running will overwrite the existing tech-spec. Continue? (y/n)</ask>
1772
+ <check if="n">
1773
+ <output>Exiting. Use workflow-status to see your next step.</output>
1774
+ <action>Exit workflow</action>
1775
+ </check>
1776
+ </check>
1777
+
1778
+ <check if="tech-spec is not the next expected workflow">
1779
+ <output>⚠️ Next expected workflow: {{next_workflow}}. Tech-spec is out of sequence.</output>
1780
+ <ask>Continue with tech-spec anyway? (y/n)</ask>
1781
+ <check if="n">
1782
+ <output>Exiting. Run {{next_workflow}} instead.</output>
1783
+ <action>Exit workflow</action>
1784
+ </check>
1785
+ </check>
1786
+
1787
+ <action>Set standalone_mode = false</action>
1788
+ </check>
1789
+ </step>
1790
+
1791
+ <step n="1" goal="Comprehensive context discovery - gather everything available">
1792
+
1793
+ <action>Welcome {user_name} warmly and explain what we're about to do:
1794
+
1795
+ "I'm going to gather all available context about your project before we dive into the technical spec. This includes:
1796
+
1797
+ - Any existing documentation (product briefs, research)
1798
+ - Brownfield codebase analysis (if applicable)
1799
+ - Your project's tech stack and dependencies
1800
+ - Existing code patterns and structure
1801
+
1802
+ This ensures the tech-spec is grounded in reality and gives developers everything they need."
1803
+ </action>
1804
+
1805
+ <action>**PHASE 1: Load Existing Documents**
1806
+
1807
+ Search for and load (using dual-strategy: whole first, then sharded):
1808
+
1809
+ 1. **Product Brief:**
1810
+ - Search pattern: {output*folder}/\_brief*.md
1811
+ - Sharded: {output*folder}/\_brief*/index.md
1812
+ - If found: Load completely and extract key context
1813
+
1814
+ 2. **Research Documents:**
1815
+ - Search pattern: {output*folder}/\_research*.md
1816
+ - Sharded: {output*folder}/\_research*/index.md
1817
+ - If found: Load completely and extract insights
1818
+
1819
+ 3. **Document-Project Output (CRITICAL for brownfield):**
1820
+ - Always check: {output_folder}/docs/index.md
1821
+ - If found: This is the brownfield codebase map - load ALL shards!
1822
+ - Extract: File structure, key modules, existing patterns, naming conventions
1823
+
1824
+ Create a summary of what was found:
1825
+
1826
+ - List of loaded documents
1827
+ - Key insights from each
1828
+ - Brownfield vs greenfield determination
1829
+ </action>
1830
+
1831
+ <action>**PHASE 2: Detect Project Type from Setup Files**
1832
+
1833
+ Search for project setup files in :
1834
+
1835
+ **Node.js/JavaScript:**
1836
+
1837
+ - package.json → Parse for framework, dependencies, scripts
1838
+
1839
+ **Python:**
1840
+
1841
+ - requirements.txt → Parse for packages
1842
+ - pyproject.toml → Parse for modern Python projects
1843
+ - Pipfile → Parse for pipenv projects
1844
+
1845
+ **Ruby:**
1846
+
1847
+ - Gemfile → Parse for gems and versions
1848
+
1849
+ **Java:**
1850
+
1851
+ - pom.xml → Parse for Maven dependencies
1852
+ - build.gradle → Parse for Gradle dependencies
1853
+
1854
+ **Go:**
1855
+
1856
+ - go.mod → Parse for modules
1857
+
1858
+ **Rust:**
1859
+
1860
+ - Cargo.toml → Parse for crates
1861
+
1862
+ **PHP:**
1863
+
1864
+ - composer.json → Parse for packages
1865
+
1866
+ If setup file found, extract:
1867
+
1868
+ 1. Framework name and EXACT version (e.g., "React 18.2.0", "Django 4.2.1")
1869
+ 2. All production dependencies with versions
1870
+ 3. Dev dependencies and tools (TypeScript, Jest, ESLint, pytest, etc.)
1871
+ 4. Available scripts (npm run test, npm run build, etc.)
1872
+ 5. Project type indicators (is it an API? Web app? CLI tool?)
1873
+ 6. **Test framework** (Jest, pytest, RSpec, JUnit, Mocha, etc.)
1874
+
1875
+ **Check for Outdated Dependencies:**
1876
+ <check if="major framework version > 2 years old">
1877
+ <action>Use WebSearch to find current recommended version</action>
1878
+ <example>
1879
+ If package.json shows "react": "16.14.0" (from 2020):
1880
+ <WebSearch query="React latest stable version 2025 migration guide" />
1881
+ Note both current version AND migration complexity in stack summary
1882
+ </example>
1883
+ </check>
1884
+
1885
+ **For Greenfield Projects:**
1886
+ <check if="field_type == greenfield">
1887
+ <action>Use WebSearch for current best practices AND starter templates</action>
1888
+ <example>
1889
+ <WebSearch query="{detected_framework} best practices {current_year}" />
1890
+ <WebSearch query="{detected_framework} recommended packages {current_year}" />
1891
+ <WebSearch query="{detected_framework} official starter template {current_year}" />
1892
+ <WebSearch query="{project_type} {detected_framework} boilerplate {current_year}" />
1893
+ </example>
1894
+
1895
+ **RECOMMEND STARTER TEMPLATES:**
1896
+ Look for official or well-maintained starter templates:
1897
+
1898
+ - React: Create React App, Vite, Next.js starter
1899
+ - Vue: create-vue, Nuxt starter
1900
+ - Python: cookiecutter templates, FastAPI template
1901
+ - Node.js: express-generator, NestJS CLI
1902
+ - Ruby: Rails new, Sinatra template
1903
+ - Go: go-blueprint, standard project layout
1904
+
1905
+ Benefits of starters:
1906
+
1907
+ - ✅ Modern best practices baked in
1908
+ - ✅ Proper project structure
1909
+ - ✅ Build tooling configured
1910
+ - ✅ Testing framework set up
1911
+ - ✅ Linting/formatting included
1912
+ - ✅ Faster time to first feature
1913
+
1914
+ **Present recommendations to user:**
1915
+ "I found these starter templates for {{framework}}:
1916
+
1917
+ 1. {{official_template}} - Official, well-maintained
1918
+ 2. {{community_template}} - Popular community template
1919
+
1920
+ These provide {{benefits}}. Would you like to use one? (yes/no/show-me-more)"
1921
+
1922
+ <action>Capture user preference on starter template</action>
1923
+ <action>If yes, include starter setup in implementation stack</action>
1924
+ </check>
1925
+
1926
+ Store this as {{project_stack_summary}}
1927
+ </action>
1928
+
1929
+ <action>**PHASE 3: Brownfield Codebase Reconnaissance** (if applicable)
1930
+
1931
+ <check if="field_type == brownfield OR document-project output found">
1932
+
1933
+ Analyze the existing project structure:
1934
+
1935
+ 1. **Directory Structure:**
1936
+ - Identify main code directories (src/, lib/, app/, components/, services/)
1937
+ - Note organization patterns (feature-based, layer-based, domain-driven)
1938
+ - Identify test directories and patterns
1939
+
1940
+ 2. **Code Patterns:**
1941
+ - Look for dominant patterns (class-based, functional, MVC, microservices)
1942
+ - Identify naming conventions (camelCase, snake_case, PascalCase)
1943
+ - Note file organization patterns
1944
+
1945
+ 3. **Key Modules/Services:**
1946
+ - Identify major modules or services already in place
1947
+ - Note entry points (main.js, app.py, index.ts)
1948
+ - Document important utilities or shared code
1949
+
1950
+ 4. **Testing Patterns & Standards (CRITICAL):**
1951
+ - Identify test framework in use (from package.json/requirements.txt)
1952
+ - Note test file naming patterns (.test.js, \_test.py, .spec.ts, Test.java)
1953
+ - Document test organization (tests/, **tests**, spec/, test/)
1954
+ - Look for test configuration files (jest.config.js, pytest.ini, .rspec)
1955
+ - Check for coverage requirements (in CI config, test scripts)
1956
+ - Identify mocking/stubbing libraries (jest.mock, unittest.mock, sinon)
1957
+ - Note assertion styles (expect, assert, should)
1958
+
1959
+ 5. **Code Style & Conventions (MUST CONFORM):**
1960
+ - Check for linter config (.eslintrc, .pylintrc, rubocop.yml)
1961
+ - Check for formatter config (.prettierrc, .black, .editorconfig)
1962
+ - Identify code style:
1963
+ - Semicolons: yes/no (JavaScript/TypeScript)
1964
+ - Quotes: single/double
1965
+ - Indentation: spaces/tabs, size
1966
+ - Line length limits
1967
+ - Import/export patterns (named vs default, organization)
1968
+ - Error handling patterns (try/catch, Result types, error classes)
1969
+ - Logging patterns (console, winston, logging module, specific formats)
1970
+ - Documentation style (JSDoc, docstrings, YARD, JavaDoc)
1971
+
1972
+ Store this as {{existing_structure_summary}}
1973
+
1974
+ **CRITICAL: Confirm Conventions with User**
1975
+ <ask>I've detected these conventions in your codebase:
1976
+
1977
+ **Code Style:**
1978
+ {{detected_code_style}}
1979
+
1980
+ **Test Patterns:**
1981
+ {{detected_test_patterns}}
1982
+
1983
+ **File Organization:**
1984
+ {{detected_file_organization}}
1985
+
1986
+ Should I follow these existing conventions for the new code?
1987
+
1988
+ Enter **yes** to conform to existing patterns, or **no** if you want to establish new standards:</ask>
1989
+
1990
+ <action>Capture user response as conform_to_conventions (yes/no)</action>
1991
+
1992
+ <check if="conform_to_conventions == no">
1993
+ <ask>What conventions would you like to use instead? (Or should I suggest modern best practices?)</ask>
1994
+ <action>Capture new conventions or use WebSearch for current best practices</action>
1995
+ </check>
1996
+
1997
+ <action>Store confirmed conventions as {{existing_conventions}}</action>
1998
+
1999
+ </check>
2000
+
2001
+ <check if="field_type == greenfield">
2002
+ <action>Note: Greenfield project - no existing code to analyze</action>
2003
+ <action>Set {{existing_structure_summary}} = "Greenfield project - new codebase"</action>
2004
+ </check>
2005
+
2006
+ </action>
2007
+
2008
+ <action>**PHASE 4: Synthesize Context Summary**
2009
+
2010
+ Create {{loaded_documents_summary}} that includes:
2011
+
2012
+ - Documents found and loaded
2013
+ - Brownfield vs greenfield status
2014
+ - Tech stack detected (or "To be determined" if greenfield)
2015
+ - Existing patterns identified (or "None - greenfield" if applicable)
2016
+
2017
+ Present this summary to {user_name} conversationally:
2018
+
2019
+ "Here's what I found about your project:
2020
+
2021
+ **Documents Available:**
2022
+ [List what was found]
2023
+
2024
+ **Project Type:**
2025
+ [Brownfield with X framework Y version OR Greenfield - new project]
2026
+
2027
+ **Existing Stack:**
2028
+ [Framework and dependencies OR "To be determined"]
2029
+
2030
+ **Code Structure:**
2031
+ [Existing patterns OR "New codebase"]
2032
+
2033
+ This gives me a solid foundation for creating a context-rich tech spec!"
2034
+ </action>
2035
+
2036
+ <template-output>loaded_documents_summary</template-output>
2037
+ <template-output>project_stack_summary</template-output>
2038
+ <template-output>existing_structure_summary</template-output>
2039
+
2040
+ </step>
2041
+
2042
+ <step n="2" goal="Conversational discovery of the change/feature">
2043
+
2044
+ <action>Now engage in natural conversation to understand what needs to be built.
2045
+
2046
+ Adapt questioning based on project_level:
2047
+ </action>
2048
+
2049
+ <check if="project_level == 0">
2050
+ <action>**Level 0: Atomic Change Discovery**
2051
+
2052
+ Engage warmly and get specific details:
2053
+
2054
+ "Let's talk about this change. I need to understand it deeply so the tech-spec gives developers everything they need."
2055
+
2056
+ **Core Questions (adapt naturally, don't interrogate):**
2057
+
2058
+ 1. "What problem are you solving?"
2059
+ - Listen for: Bug fix, missing feature, technical debt, improvement
2060
+ - Capture as {{change_type}}
2061
+
2062
+ 2. "Where in the codebase should this live?"
2063
+ - If brownfield: "I see you have [existing modules]. Does this fit in any of those?"
2064
+ - If greenfield: "Let's figure out the right structure for this."
2065
+ - Capture affected areas
2066
+
2067
+ 3. <check if="brownfield">
2068
+ "Are there existing patterns or similar code I should follow?"
2069
+ - Look for consistency requirements
2070
+ - Identify reference implementations
2071
+ </check>
2072
+
2073
+ 4. "What's the expected behavior after this change?"
2074
+ - Get specific success criteria
2075
+ - Understand edge cases
2076
+
2077
+ 5. "Any constraints or gotchas I should know about?"
2078
+ - Technical limitations
2079
+ - Dependencies on other systems
2080
+ - Performance requirements
2081
+
2082
+ **Discovery Goals:**
2083
+
2084
+ - Understand the WHY (problem)
2085
+ - Understand the WHAT (solution)
2086
+ - Understand the WHERE (location in code)
2087
+ - Understand the HOW (approach and patterns)
2088
+
2089
+ Synthesize into clear problem statement and solution overview.
2090
+ </action>
2091
+ </check>
2092
+
2093
+ <check if="project_level == 1">
2094
+ <action>**Level 1: Feature Discovery**
2095
+
2096
+ Engage in deeper feature exploration:
2097
+
2098
+ "This is a Level 1 feature - coherent but focused. Let's explore what you're building."
2099
+
2100
+ **Core Questions (natural conversation):**
2101
+
2102
+ 1. "What user need are you addressing?"
2103
+ - Get to the core value
2104
+ - Understand the user's pain point
2105
+
2106
+ 2. "How should this integrate with existing code?"
2107
+ - If brownfield: "I saw [existing features]. How does this relate?"
2108
+ - Identify integration points
2109
+ - Note dependencies
2110
+
2111
+ 3. <check if="brownfield AND similar features exist">
2112
+ "Can you point me to similar features I can reference for patterns?"
2113
+ - Get example implementations
2114
+ - Understand established patterns
2115
+ </check>
2116
+
2117
+ 4. "What's IN scope vs OUT of scope for this feature?"
2118
+ - Define clear boundaries
2119
+ - Identify MVP vs future enhancements
2120
+ - Keep it focused (remind: Level 1 = 2-3 stories max)
2121
+
2122
+ 5. "Are there dependencies on other systems or services?"
2123
+ - External APIs
2124
+ - Databases
2125
+ - Third-party libraries
2126
+
2127
+ 6. "What does success look like?"
2128
+ - Measurable outcomes
2129
+ - User-facing impact
2130
+ - Technical validation
2131
+
2132
+ **Discovery Goals:**
2133
+
2134
+ - Feature purpose and value
2135
+ - Integration strategy
2136
+ - Scope boundaries
2137
+ - Success criteria
2138
+ - Dependencies
2139
+
2140
+ Synthesize into comprehensive feature description.
2141
+ </action>
2142
+ </check>
2143
+
2144
+ <template-output>problem_statement</template-output>
2145
+ <template-output>solution_overview</template-output>
2146
+ <template-output>change_type</template-output>
2147
+ <template-output>scope_in</template-output>
2148
+ <template-output>scope_out</template-output>
2149
+
2150
+ </step>
2151
+
2152
+ <step n="3" goal="Generate context-aware, definitive technical specification">
2153
+
2154
+ <critical>ALL TECHNICAL DECISIONS MUST BE DEFINITIVE - NO AMBIGUITY ALLOWED</critical>
2155
+ <critical>Use existing stack info to make SPECIFIC decisions</critical>
2156
+ <critical>Reference brownfield code to guide implementation</critical>
2157
+
2158
+ <action>Initialize tech-spec.md with the rich template</action>
2159
+
2160
+ <action>**Generate Context Section (already captured):**
2161
+
2162
+ These template variables are already populated from Step 1:
2163
+
2164
+ - {{loaded_documents_summary}}
2165
+ - {{project_stack_summary}}
2166
+ - {{existing_structure_summary}}
2167
+
2168
+ Just save them to the file.
2169
+ </action>
2170
+
2171
+ <template-output file="tech-spec.md">loaded_documents_summary</template-output>
2172
+ <template-output file="tech-spec.md">project_stack_summary</template-output>
2173
+ <template-output file="tech-spec.md">existing_structure_summary</template-output>
2174
+
2175
+ <action>**Generate The Change Section:**
2176
+
2177
+ Already captured from Step 2:
2178
+
2179
+ - {{problem_statement}}
2180
+ - {{solution_overview}}
2181
+ - {{scope_in}}
2182
+ - {{scope_out}}
2183
+
2184
+ Save to file.
2185
+ </action>
2186
+
2187
+ <template-output file="tech-spec.md">problem_statement</template-output>
2188
+ <template-output file="tech-spec.md">solution_overview</template-output>
2189
+ <template-output file="tech-spec.md">scope_in</template-output>
2190
+ <template-output file="tech-spec.md">scope_out</template-output>
2191
+
2192
+ <action>**Generate Implementation Details:**
2193
+
2194
+ Now make DEFINITIVE technical decisions using all the context gathered.
2195
+
2196
+ **Source Tree Changes - BE SPECIFIC:**
2197
+
2198
+ Bad (NEVER do this):
2199
+
2200
+ - "Update some files in the services folder"
2201
+ - "Add tests somewhere"
2202
+
2203
+ Good (ALWAYS do this):
2204
+
2205
+ - "src/services/UserService.ts - MODIFY - Add validateEmail() method at line 45"
2206
+ - "src/routes/api/users.ts - MODIFY - Add POST /users/validate endpoint"
2207
+ - "tests/services/UserService.test.ts - CREATE - Test suite for email validation"
2208
+
2209
+ Include:
2210
+
2211
+ - Exact file paths
2212
+ - Action: CREATE, MODIFY, DELETE
2213
+ - Specific what changes (methods, classes, endpoints, components)
2214
+
2215
+ **Use brownfield context:**
2216
+
2217
+ - If modifying existing files, reference current structure
2218
+ - Follow existing naming patterns
2219
+ - Place new code logically based on current organization
2220
+ </action>
2221
+
2222
+ <template-output file="tech-spec.md">source_tree_changes</template-output>
2223
+
2224
+ <action>**Technical Approach - BE DEFINITIVE:**
2225
+
2226
+ Bad (ambiguous):
2227
+
2228
+ - "Use a logging library like winston or pino"
2229
+ - "Use Python 2 or 3"
2230
+ - "Set up some kind of validation"
2231
+
2232
+ Good (definitive):
2233
+
2234
+ - "Use winston v3.8.2 (already in package.json) for logging"
2235
+ - "Implement using Python 3.11 as specified in pyproject.toml"
2236
+ - "Use Joi v17.9.0 for request validation following pattern in UserController.ts"
2237
+
2238
+ **Use detected stack:**
2239
+
2240
+ - Reference exact versions from package.json/requirements.txt
2241
+ - Specify frameworks already in use
2242
+ - Make decisions based on what's already there
2243
+
2244
+ **For greenfield:**
2245
+
2246
+ - Make definitive choices and justify them
2247
+ - Specify exact versions
2248
+ - No "or" statements allowed
2249
+ </action>
2250
+
2251
+ <template-output file="tech-spec.md">technical_approach</template-output>
2252
+
2253
+ <action>**Existing Patterns to Follow:**
2254
+
2255
+ <check if="brownfield">
2256
+ Document patterns from the existing codebase:
2257
+ - Class structure patterns
2258
+ - Function naming conventions
2259
+ - Error handling approach
2260
+ - Testing patterns
2261
+ - Documentation style
2262
+
2263
+ Example:
2264
+ "Follow the service pattern established in UserService.ts:
2265
+
2266
+ - Export class with constructor injection
2267
+ - Use async/await for all asynchronous operations
2268
+ - Throw ServiceError with error codes
2269
+ - Include JSDoc comments for all public methods"
2270
+ </check>
2271
+
2272
+ <check if="greenfield">
2273
+ "Greenfield project - establishing new patterns:
2274
+ - [Define the patterns to establish]"
2275
+ </check>
2276
+
2277
+ </action>
2278
+
2279
+ <template-output file="tech-spec.md">existing_patterns</template-output>
2280
+
2281
+ <action>**Integration Points:**
2282
+
2283
+ Identify how this change connects:
2284
+
2285
+ - Internal modules it depends on
2286
+ - External APIs or services
2287
+ - Database interactions
2288
+ - Event emitters/listeners
2289
+ - State management
2290
+
2291
+ Be specific about interfaces and contracts.
2292
+ </action>
2293
+
2294
+ <template-output file="tech-spec.md">integration_points</template-output>
2295
+
2296
+ <action>**Development Context:**
2297
+
2298
+ **Relevant Existing Code:**
2299
+ <check if="brownfield">
2300
+ Reference specific files or code sections developers should review:
2301
+
2302
+ - "See UserService.ts lines 120-150 for similar validation pattern"
2303
+ - "Reference AuthMiddleware.ts for authentication approach"
2304
+ - "Follow error handling in PaymentService.ts"
2305
+ </check>
2306
+
2307
+ **Framework/Libraries:**
2308
+ List with EXACT versions from detected stack:
2309
+
2310
+ - Express 4.18.2 (web framework)
2311
+ - winston 3.8.2 (logging)
2312
+ - Joi 17.9.0 (validation)
2313
+ - TypeScript 5.1.6 (language)
2314
+
2315
+ **Internal Modules:**
2316
+ List internal dependencies:
2317
+
2318
+ - @/services/UserService
2319
+ - @/middleware/auth
2320
+ - @/utils/validation
2321
+
2322
+ **Configuration Changes:**
2323
+ Any config files to update:
2324
+
2325
+ - Update .env with new SMTP settings
2326
+ - Add validation schema to config/schemas.ts
2327
+ - Update package.json scripts if needed
2328
+ </action>
2329
+
2330
+ <template-output file="tech-spec.md">existing_code_references</template-output>
2331
+ <template-output file="tech-spec.md">framework_dependencies</template-output>
2332
+ <template-output file="tech-spec.md">internal_dependencies</template-output>
2333
+ <template-output file="tech-spec.md">configuration_changes</template-output>
2334
+
2335
+ <check if="field_type == brownfield">
2336
+ <template-output file="tech-spec.md">existing_conventions</template-output>
2337
+ </check>
2338
+
2339
+ <check if="field_type == greenfield">
2340
+ <action>Set {{existing_conventions}} = "Greenfield project - establishing new conventions per modern best practices"</action>
2341
+ <template-output file="tech-spec.md">existing_conventions</template-output>
2342
+ </check>
2343
+
2344
+ <action>**Implementation Stack:**
2345
+
2346
+ Comprehensive stack with versions:
2347
+
2348
+ - Runtime: Node.js 20.x
2349
+ - Framework: Express 4.18.2
2350
+ - Language: TypeScript 5.1.6
2351
+ - Testing: Jest 29.5.0
2352
+ - Linting: ESLint 8.42.0
2353
+ - Validation: Joi 17.9.0
2354
+
2355
+ All from detected project setup!
2356
+ </action>
2357
+
2358
+ <template-output file="tech-spec.md">implementation_stack</template-output>
2359
+
2360
+ <action>**Technical Details:**
2361
+
2362
+ Deep technical specifics:
2363
+
2364
+ - Algorithms to implement
2365
+ - Data structures to use
2366
+ - Performance considerations
2367
+ - Security considerations
2368
+ - Error scenarios and handling
2369
+ - Edge cases
2370
+
2371
+ Be thorough - developers need details!
2372
+ </action>
2373
+
2374
+ <template-output file="tech-spec.md">technical_details</template-output>
2375
+
2376
+ <action>**Development Setup:**
2377
+
2378
+ What does a developer need to run this locally?
2379
+
2380
+ Based on detected stack and scripts:
2381
+
2382
+ ```
2383
+ 1. Clone repo (if not already)
2384
+ 2. npm install (installs all deps from package.json)
2385
+ 3. cp .env.example .env (configure environment)
2386
+ 4. npm run dev (starts development server)
2387
+ 5. npm test (runs test suite)
2388
+ ```
2389
+
2390
+ Or for Python:
2391
+
2392
+ ```
2393
+ 1. python -m venv venv
2394
+ 2. source venv/bin/activate
2395
+ 3. pip install -r requirements.txt
2396
+ 4. python manage.py runserver
2397
+ ```
2398
+
2399
+ Use the actual scripts from package.json/setup files!
2400
+ </action>
2401
+
2402
+ <template-output file="tech-spec.md">development_setup</template-output>
2403
+
2404
+ <action>**Implementation Guide:**
2405
+
2406
+ **Setup Steps:**
2407
+ Pre-implementation checklist:
2408
+
2409
+ - Create feature branch
2410
+ - Verify dev environment running
2411
+ - Review existing code references
2412
+ - Set up test data if needed
2413
+
2414
+ **Implementation Steps:**
2415
+ Step-by-step breakdown:
2416
+
2417
+ For Level 0:
2418
+
2419
+ 1. [Step 1 with specific file and action]
2420
+ 2. [Step 2 with specific file and action]
2421
+ 3. [Write tests]
2422
+ 4. [Verify acceptance criteria]
2423
+
2424
+ For Level 1:
2425
+ Organize by story/phase:
2426
+
2427
+ 1. Phase 1: [Foundation work]
2428
+ 2. Phase 2: [Core implementation]
2429
+ 3. Phase 3: [Testing and validation]
2430
+
2431
+ **Testing Strategy:**
2432
+
2433
+ - Unit tests for [specific functions]
2434
+ - Integration tests for [specific flows]
2435
+ - Manual testing checklist
2436
+ - Performance testing if applicable
2437
+
2438
+ **Acceptance Criteria:**
2439
+ Specific, measurable, testable criteria:
2440
+
2441
+ 1. Given [scenario], when [action], then [outcome]
2442
+ 2. [Metric] meets [threshold]
2443
+ 3. [Feature] works in [environment]
2444
+ </action>
2445
+
2446
+ <template-output file="tech-spec.md">setup_steps</template-output>
2447
+ <template-output file="tech-spec.md">implementation_steps</template-output>
2448
+ <template-output file="tech-spec.md">testing_strategy</template-output>
2449
+ <template-output file="tech-spec.md">acceptance_criteria</template-output>
2450
+
2451
+ <action>**Developer Resources:**
2452
+
2453
+ **File Paths Reference:**
2454
+ Complete list of all files involved:
2455
+
2456
+ - /src/services/UserService.ts
2457
+ - /src/routes/api/users.ts
2458
+ - /tests/services/UserService.test.ts
2459
+ - /src/types/user.ts
2460
+
2461
+ **Key Code Locations:**
2462
+ Important functions, classes, modules:
2463
+
2464
+ - UserService class (src/services/UserService.ts:15)
2465
+ - validateUser function (src/utils/validation.ts:42)
2466
+ - User type definition (src/types/user.ts:8)
2467
+
2468
+ **Testing Locations:**
2469
+ Where tests go:
2470
+
2471
+ - Unit: tests/services/
2472
+ - Integration: tests/integration/
2473
+ - E2E: tests/e2e/
2474
+
2475
+ **Documentation to Update:**
2476
+ Docs that need updating:
2477
+
2478
+ - README.md - Add new endpoint documentation
2479
+ - API.md - Document /users/validate endpoint
2480
+ - CHANGELOG.md - Note the new feature
2481
+ </action>
2482
+
2483
+ <template-output file="tech-spec.md">file_paths_complete</template-output>
2484
+ <template-output file="tech-spec.md">key_code_locations</template-output>
2485
+ <template-output file="tech-spec.md">testing_locations</template-output>
2486
+ <template-output file="tech-spec.md">documentation_updates</template-output>
2487
+
2488
+ <action>**UX/UI Considerations:**
2489
+
2490
+ <check if="change affects user interface OR user experience">
2491
+ **Determine if this change has UI/UX impact:**
2492
+ - Does it change what users see?
2493
+ - Does it change how users interact?
2494
+ - Does it affect user workflows?
2495
+
2496
+ If YES, document:
2497
+
2498
+ **UI Components Affected:**
2499
+
2500
+ - List specific components (buttons, forms, modals, pages)
2501
+ - Note which need creation vs modification
2502
+
2503
+ **UX Flow Changes:**
2504
+
2505
+ - Current flow vs new flow
2506
+ - User journey impact
2507
+ - Navigation changes
2508
+
2509
+ **Visual/Interaction Patterns:**
2510
+
2511
+ - Follow existing design system? (check for design tokens, component library)
2512
+ - New patterns needed?
2513
+ - Responsive design considerations (mobile, tablet, desktop)
2514
+
2515
+ **Accessibility:**
2516
+
2517
+ - Keyboard navigation requirements
2518
+ - Screen reader compatibility
2519
+ - ARIA labels needed
2520
+ - Color contrast standards
2521
+
2522
+ **User Feedback:**
2523
+
2524
+ - Loading states
2525
+ - Error messages
2526
+ - Success confirmations
2527
+ - Progress indicators
2528
+ </check>
2529
+
2530
+ <check if="no UI/UX impact">
2531
+ "No UI/UX impact - backend/API/infrastructure change only"
2532
+ </check>
2533
+ </action>
2534
+
2535
+ <template-output file="tech-spec.md">ux_ui_considerations</template-output>
2536
+
2537
+ <action>**Testing Approach:**
2538
+
2539
+ Comprehensive testing strategy using {{test_framework_info}}:
2540
+
2541
+ **CONFORM TO EXISTING TEST STANDARDS:**
2542
+ <check if="conform_to_conventions == yes">
2543
+
2544
+ - Follow existing test file naming: {{detected_test_patterns.file_naming}}
2545
+ - Use existing test organization: {{detected_test_patterns.organization}}
2546
+ - Match existing assertion style: {{detected_test_patterns.assertion_style}}
2547
+ - Meet existing coverage requirements: {{detected_test_patterns.coverage}}
2548
+ </check>
2549
+
2550
+ **Test Strategy:**
2551
+
2552
+ - Test framework: {{detected_test_framework}} (from project dependencies)
2553
+ - Unit tests for [specific functions/methods]
2554
+ - Integration tests for [specific flows/APIs]
2555
+ - E2E tests if UI changes
2556
+ - Mock/stub strategies (use existing patterns: {{detected_test_patterns.mocking}})
2557
+ - Performance benchmarks if applicable
2558
+ - Accessibility tests if UI changes
2559
+
2560
+ **Coverage:**
2561
+
2562
+ - Unit test coverage: [target %]
2563
+ - Integration coverage: [critical paths]
2564
+ - Ensure all acceptance criteria have corresponding tests
2565
+ </action>
2566
+
2567
+ <template-output file="tech-spec.md">test_framework_info</template-output>
2568
+ <template-output file="tech-spec.md">testing_approach</template-output>
2569
+
2570
+ <action>**Deployment Strategy:**
2571
+
2572
+ **Deployment Steps:**
2573
+ How to deploy this change:
2574
+
2575
+ 1. Merge to main branch
2576
+ 2. Run CI/CD pipeline
2577
+ 3. Deploy to staging
2578
+ 4. Verify in staging
2579
+ 5. Deploy to production
2580
+ 6. Monitor for issues
2581
+
2582
+ **Rollback Plan:**
2583
+ How to undo if problems:
2584
+
2585
+ 1. Revert commit [hash]
2586
+ 2. Redeploy previous version
2587
+ 3. Verify rollback successful
2588
+
2589
+ **Monitoring:**
2590
+ What to watch after deployment:
2591
+
2592
+ - Error rates in [logging service]
2593
+ - Response times for [endpoint]
2594
+ - User feedback on [feature]
2595
+ </action>
2596
+
2597
+ <template-output file="tech-spec.md">deployment_steps</template-output>
2598
+ <template-output file="tech-spec.md">rollback_plan</template-output>
2599
+ <template-output file="tech-spec.md">monitoring_approach</template-output>
2600
+
2601
+ <invoke-task halt="true">bmad/core/tasks/adv-elicit.xml</invoke-task>
2602
+
2603
+ </step>
2604
+
2605
+ <step n="4" goal="Auto-validate cohesion, completeness, and quality">
2606
+
2607
+ <critical>Always run validation - this is NOT optional!</critical>
2608
+
2609
+ <action>Tech-spec generation complete! Now running automatic validation...</action>
2610
+
2611
+ <action>Load {installed_path}/checklist.md</action>
2612
+ <action>Review tech-spec.md against ALL checklist criteria:
2613
+
2614
+ **Section 1: Output Files Exist**
2615
+
2616
+ - Verify tech-spec.md created
2617
+ - Check for unfilled template variables
2618
+
2619
+ **Section 2: Context Gathering**
2620
+
2621
+ - Validate all available documents were loaded
2622
+ - Confirm stack detection worked
2623
+ - Verify brownfield analysis (if applicable)
2624
+
2625
+ **Section 3: Tech-Spec Definitiveness**
2626
+
2627
+ - Scan for "or" statements (FAIL if found)
2628
+ - Verify all versions are specific
2629
+ - Check stack alignment
2630
+
2631
+ **Section 4: Context-Rich Content**
2632
+
2633
+ - Verify all new template sections populated
2634
+ - Check existing code references (brownfield)
2635
+ - Validate framework dependencies listed
2636
+
2637
+ **Section 5-6: Story Quality (deferred to Step 5)**
2638
+
2639
+ **Section 7: Workflow Status (if applicable)**
2640
+
2641
+ **Section 8: Implementation Readiness**
2642
+
2643
+ - Can developer start immediately?
2644
+ - Is tech-spec comprehensive enough?
2645
+ </action>
2646
+
2647
+ <action>Generate validation report with specific scores:
2648
+
2649
+ - Context Gathering: [Comprehensive/Partial/Insufficient]
2650
+ - Definitiveness: [All definitive/Some ambiguity/Major issues]
2651
+ - Brownfield Integration: [N/A/Excellent/Partial/Missing]
2652
+ - Stack Alignment: [Perfect/Good/Partial/None]
2653
+ - Implementation Readiness: [Yes/No]
2654
+ </action>
2655
+
2656
+ <check if="validation issues found">
2657
+ <output>⚠️ **Validation Issues Detected:**
2658
+
2659
+ {{list_of_issues}}
2660
+
2661
+ I can fix these automatically. Shall I proceed? (yes/no)</output>
2662
+
2663
+ <ask>Fix validation issues? (yes/no)</ask>
2664
+
2665
+ <check if="yes">
2666
+ <action>Fix each issue and re-validate</action>
2667
+ <output>✅ Issues fixed! Re-validation passed.</output>
2668
+ </check>
2669
+
2670
+ <check if="no">
2671
+ <output>⚠️ Proceeding with warnings. Issues should be addressed manually.</output>
2672
+ </check>
2673
+ </check>
2674
+
2675
+ <check if="validation passes">
2676
+ <output>✅ **Validation Passed!**
2677
+
2678
+ **Scores:**
2679
+
2680
+ - Context Gathering: {{context_score}}
2681
+ - Definitiveness: {{definitiveness_score}}
2682
+ - Brownfield Integration: {{brownfield_score}}
2683
+ - Stack Alignment: {{stack_score}}
2684
+ - Implementation Readiness: ✅ Ready
2685
+
2686
+ Tech-spec is high quality and ready for story generation!</output>
2687
+ </check>
2688
+
2689
+ </step>
2690
+
2691
+ <step n="5" goal="Generate context-rich user stories">
2692
+
2693
+ <action>Now generate stories that reference the rich tech-spec context</action>
2694
+
2695
+ <check if="project_level == 0">
2696
+ <action>Invoke {installed_path}/instructions-level0-story.md to generate single user story</action>
2697
+ <action>Story will leverage tech-spec.md as primary context</action>
2698
+ <action>Developers can skip story-context workflow since tech-spec is comprehensive</action>
2699
+ </check>
2700
+
2701
+ <check if="project_level == 1">
2702
+ <action>Invoke {installed_path}/instructions-level1-stories.md to generate epic and stories</action>
2703
+ <action>Stories will reference tech-spec.md for all technical details</action>
2704
+ <action>Epic provides organization, tech-spec provides implementation context</action>
2705
+ </check>
2706
+
2707
+ </step>
2708
+
2709
+ <step n="6" goal="Finalize and guide next steps">
2710
+
2711
+ <output>**✅ Tech-Spec Complete, {user_name}!**
2712
+
2713
+ **Deliverables Created:**
2714
+
2715
+ <check if="project_level == 0">
2716
+ - ✅ **tech-spec.md** - Context-rich technical specification
2717
+ - Includes: brownfield analysis, framework details, existing patterns
2718
+ - ✅ **story-{slug}.md** - Implementation-ready user story
2719
+ - References tech-spec as primary context
2720
+ </check>
2721
+
2722
+ <check if="project_level == 1">
2723
+ - ✅ **tech-spec.md** - Context-rich technical specification
2724
+ - ✅ **epics.md** - Epic and story organization
2725
+ - ✅ **story-{epic-slug}-1.md** - First story
2726
+ - ✅ **story-{epic-slug}-2.md** - Second story
2727
+ {{#if story_3}}
2728
+ - ✅ **story-{epic-slug}-3.md** - Third story
2729
+ {{/if}}
2730
+ </check>
2731
+
2732
+ **What Makes This Tech-Spec Special:**
2733
+
2734
+ The tech-spec is comprehensive enough to serve as the primary context document:
2735
+
2736
+ - ✨ Brownfield codebase analysis (if applicable)
2737
+ - ✨ Exact framework and library versions from your project
2738
+ - ✨ Existing patterns and code references
2739
+ - ✨ Specific file paths and integration points
2740
+ - ✨ Complete developer resources
2741
+
2742
+ **Next Steps:**
2743
+
2744
+ <check if="project_level == 0">
2745
+ **For Single Story (Level 0):**
2746
+
2747
+ **Option A - With Story Context (for complex changes):**
2748
+
2749
+ 1. Ask SM agent to run `create-story-context` for the story
2750
+ - This generates additional XML context if needed
2751
+ 2. Then ask DEV agent to run `dev-story` to implement
2752
+
2753
+ **Option B - Direct to Dev (most Level 0):**
2754
+
2755
+ 1. Ask DEV agent to run `dev-story` directly
2756
+ - Tech-spec provides all the context needed!
2757
+ - Story is ready to implement
2758
+
2759
+ 💡 **Tip:** Most Level 0 changes don't need separate story context since tech-spec is comprehensive!
2760
+ </check>
2761
+
2762
+ <check if="project_level == 1">
2763
+ **For Multiple Stories (Level 1):**
2764
+
2765
+ **Recommended: Story-by-Story Approach**
2766
+
2767
+ For the **first story** ({{first_story_name}}):
2768
+
2769
+ **Option A - With Story Context (recommended for first story):**
2770
+
2771
+ 1. Ask SM agent to run `create-story-context` for story 1
2772
+ - Generates focused context for this specific story
2773
+ 2. Then ask DEV agent to run `dev-story` to implement story 1
2774
+
2775
+ **Option B - Direct to Dev:**
2776
+
2777
+ 1. Ask DEV agent to run `dev-story` for story 1
2778
+ - Tech-spec has most context needed
2779
+
2780
+ After completing story 1, repeat for stories 2 and 3.
2781
+
2782
+ **Alternative: Sprint Planning Approach**
2783
+
2784
+ - If managing multiple stories as a sprint, ask SM agent to run `sprint-planning`
2785
+ - This organizes all stories for coordinated implementation
2786
+ </check>
2787
+
2788
+ **Your Tech-Spec:**
2789
+
2790
+ - 📄 Saved to: `{output_folder}/tech-spec.md`
2791
+ - Contains: All context, decisions, patterns, and implementation guidance
2792
+ - Ready for: Direct development or story context generation
2793
+
2794
+ The tech-spec is your single source of truth! 🚀
2795
+ </output>
2796
+
2797
+ </step>
2798
+
2799
+ </workflow>
2800
+ ]]></file>
2801
+ <file id="bmad/bmm/workflows/2-plan-workflows/tech-spec/instructions-level0-story.md" type="md"><![CDATA[# Level 0 - Minimal User Story Generation
2802
+
2803
+ <workflow>
2804
+
2805
+ <critical>This generates a single user story for Level 0 atomic changes</critical>
2806
+ <critical>Level 0 = single file change, bug fix, or small isolated task</critical>
2807
+ <critical>This workflow runs AFTER tech-spec.md has been completed</critical>
2808
+ <critical>Output format MUST match create-story template for compatibility with story-context and dev-story workflows</critical>
2809
+
2810
+ <step n="1" goal="Load tech spec and extract the change">
2811
+
2812
+ <action>Read the completed tech-spec.md file from {output_folder}/tech-spec.md</action>
2813
+ <action>Load bmm-workflow-status.yaml from {output_folder}/bmm-workflow-status.yaml (if exists)</action>
2814
+ <action>Extract dev_story_location from config (where stories are stored)</action>
2815
+
2816
+ <action>Extract from the ENHANCED tech-spec structure:
2817
+
2818
+ - Problem statement from "The Change → Problem Statement" section
2819
+ - Solution overview from "The Change → Proposed Solution" section
2820
+ - Scope from "The Change → Scope" section
2821
+ - Source tree from "Implementation Details → Source Tree Changes" section
2822
+ - Time estimate from "Implementation Guide → Implementation Steps" section
2823
+ - Acceptance criteria from "Implementation Guide → Acceptance Criteria" section
2824
+ - Framework dependencies from "Development Context → Framework/Libraries" section
2825
+ - Existing code references from "Development Context → Relevant Existing Code" section
2826
+ - File paths from "Developer Resources → File Paths Reference" section
2827
+ - Key code locations from "Developer Resources → Key Code Locations" section
2828
+ - Testing locations from "Developer Resources → Testing Locations" section
2829
+ </action>
2830
+
2831
+ </step>
2832
+
2833
+ <step n="2" goal="Generate story slug and filename">
2834
+
2835
+ <action>Derive a short URL-friendly slug from the feature/change name</action>
2836
+ <action>Max slug length: 3-5 words, kebab-case format</action>
2837
+
2838
+ <example>
2839
+ - "Migrate JS Library Icons" → "icon-migration"
2840
+ - "Fix Login Validation Bug" → "login-fix"
2841
+ - "Add OAuth Integration" → "oauth-integration"
2842
+ </example>
2843
+
2844
+ <action>Set story_filename = "story-{slug}.md"</action>
2845
+ <action>Set story_path = "{dev_story_location}/story-{slug}.md"</action>
2846
+
2847
+ </step>
2848
+
2849
+ <step n="3" goal="Create user story in standard format">
2850
+
2851
+ <action>Create 1 story that describes the technical change as a deliverable</action>
2852
+ <action>Story MUST use create-story template format for compatibility</action>
2853
+
2854
+ <guidelines>
2855
+ **Story Point Estimation:**
2856
+ - 1 point = < 1 day (2-4 hours)
2857
+ - 2 points = 1-2 days
2858
+ - 3 points = 2-3 days
2859
+ - 5 points = 3-5 days (if this high, question if truly Level 0)
2860
+
2861
+ **Story Title Best Practices:**
2862
+
2863
+ - Use active, user-focused language
2864
+ - Describe WHAT is delivered, not HOW
2865
+ - Good: "Icon Migration to Internal CDN"
2866
+ - Bad: "Run curl commands to download PNGs"
2867
+
2868
+ **Story Description Format:**
2869
+
2870
+ - As a [role] (developer, user, admin, etc.)
2871
+ - I want [capability/change]
2872
+ - So that [benefit/value]
2873
+
2874
+ **Acceptance Criteria:**
2875
+
2876
+ - Extract from tech-spec "Testing Approach" section
2877
+ - Must be specific, measurable, and testable
2878
+ - Include performance criteria if specified
2879
+
2880
+ **Tasks/Subtasks:**
2881
+
2882
+ - Map directly to tech-spec "Implementation Guide" tasks
2883
+ - Use checkboxes for tracking
2884
+ - Reference AC numbers: (AC: #1), (AC: #2)
2885
+ - Include explicit testing subtasks
2886
+
2887
+ **Dev Notes:**
2888
+
2889
+ - Extract technical constraints from tech-spec
2890
+ - Include file paths from "Developer Resources → File Paths Reference"
2891
+ - Include existing code references from "Development Context → Relevant Existing Code"
2892
+ - Reference architecture patterns if applicable
2893
+ - Cite tech-spec sections for implementation details
2894
+ - Note dependencies (internal and external)
2895
+
2896
+ **NEW: Comprehensive Context**
2897
+
2898
+ Since tech-spec is now context-rich, populate all new template fields:
2899
+
2900
+ - dependencies: Extract from "Development Context" and "Implementation Details → Integration Points"
2901
+ - existing_code_references: Extract from "Development Context → Relevant Existing Code" and "Developer Resources → Key Code Locations"
2902
+ </guidelines>
2903
+
2904
+ <action>Initialize story file using user_story_template</action>
2905
+
2906
+ <template-output file="{story_path}">story_title</template-output>
2907
+ <template-output file="{story_path}">role</template-output>
2908
+ <template-output file="{story_path}">capability</template-output>
2909
+ <template-output file="{story_path}">benefit</template-output>
2910
+ <template-output file="{story_path}">acceptance_criteria</template-output>
2911
+ <template-output file="{story_path}">tasks_subtasks</template-output>
2912
+ <template-output file="{story_path}">technical_summary</template-output>
2913
+ <template-output file="{story_path}">files_to_modify</template-output>
2914
+ <template-output file="{story_path}">test_locations</template-output>
2915
+ <template-output file="{story_path}">story_points</template-output>
2916
+ <template-output file="{story_path}">time_estimate</template-output>
2917
+ <template-output file="{story_path}">dependencies</template-output>
2918
+ <template-output file="{story_path}">existing_code_references</template-output>
2919
+ <template-output file="{story_path}">architecture_references</template-output>
2920
+
2921
+ </step>
2922
+
2923
+ <step n="4" goal="Update status - Level 0 single story">
2924
+
2925
+ <invoke-workflow path="bmad/bmm/workflows/workflow-status">
2926
+ <param>mode: update</param>
2927
+ <param>action: complete_workflow</param>
2928
+ <param>workflow_name: tech-spec</param>
2929
+ </invoke-workflow>
2930
+
2931
+ <check if="success == true">
2932
+ <output>✅ Tech-spec complete! Next: {{next_workflow}}</output>
2933
+ </check>
2934
+
2935
+ <action>Load {{status_file_path}}</action>
2936
+ <action>Set STORIES_SEQUENCE: [{slug}]</action>
2937
+ <action>Set TODO_STORY: {slug}</action>
2938
+ <action>Set TODO_TITLE: {{story_title}}</action>
2939
+ <action>Set IN_PROGRESS_STORY: (empty)</action>
2940
+ <action>Set STORIES_DONE: []</action>
2941
+ <action>Save {{status_file_path}}</action>
2942
+
2943
+ <output>Story queue initialized with single story: {slug}</output>
2944
+
2945
+ </step>
2946
+
2947
+ <step n="5" goal="Provide user guidance for next steps">
2948
+
2949
+ <action>Display completion summary</action>
2950
+
2951
+ **Level 0 Planning Complete!**
2952
+
2953
+ **Generated Artifacts:**
2954
+
2955
+ - `tech-spec.md` → Technical source of truth
2956
+ - `story-{slug}.md` → User story ready for implementation
2957
+
2958
+ **Story Location:** `{story_path}`
2959
+
2960
+ **Next Steps:**
2961
+
2962
+ **🎯 RECOMMENDED - Direct to Development (Level 0):**
2963
+
2964
+ Since the tech-spec is now CONTEXT-RICH with:
2965
+
2966
+ - ✅ Brownfield codebase analysis (if applicable)
2967
+ - ✅ Framework and library details with exact versions
2968
+ - ✅ Existing patterns and code references
2969
+ - ✅ Complete file paths and integration points
2970
+
2971
+ **You can skip story-context and go straight to dev!**
2972
+
2973
+ 1. Load DEV agent: `bmad/bmm/agents/dev.md`
2974
+ 2. Run `dev-story` workflow
2975
+ 3. Begin implementation immediately
2976
+
2977
+ **Option B - Generate Additional Context (optional):**
2978
+
2979
+ Only needed for extremely complex scenarios:
2980
+
2981
+ 1. Load SM agent: `bmad/bmm/agents/sm.md`
2982
+ 2. Run `story-context` workflow (generates additional XML context)
2983
+ 3. Then load DEV agent and run `dev-story` workflow
2984
+
2985
+ **Progress Tracking:**
2986
+
2987
+ - All decisions logged in: `bmm-workflow-status.yaml`
2988
+ - Next action clearly identified
2989
+
2990
+ <ask>Ready to proceed? Choose your path:
2991
+
2992
+ 1. Go directly to dev-story (RECOMMENDED - tech-spec has all context)
2993
+ 2. Generate additional story context (for complex edge cases)
2994
+ 3. Exit for now
2995
+
2996
+ Select option (1-3):</ask>
2997
+
2998
+ </step>
2999
+
3000
+ </workflow>
3001
+ ]]></file>
3002
+ <file id="bmad/bmm/workflows/2-plan-workflows/tech-spec/instructions-level1-stories.md" type="md"><![CDATA[# Level 1 - Epic and Stories Generation
3003
+
3004
+ <workflow>
3005
+
3006
+ <critical>This generates epic and user stories for Level 1 projects after tech-spec completion</critical>
3007
+ <critical>This is a lightweight story breakdown - not a full PRD</critical>
3008
+ <critical>Level 1 = coherent feature, 1-10 stories (prefer 2-3), 1 epic</critical>
3009
+ <critical>This workflow runs AFTER tech-spec.md has been completed</critical>
3010
+ <critical>Story format MUST match create-story template for compatibility with story-context and dev-story workflows</critical>
3011
+
3012
+ <step n="1" goal="Load tech spec and extract implementation tasks">
3013
+
3014
+ <action>Read the completed tech-spec.md file from {output_folder}/tech-spec.md</action>
3015
+ <action>Load bmm-workflow-status.yaml from {output_folder}/bmm-workflow-status.yaml (if exists)</action>
3016
+ <action>Extract dev_story_location from config (where stories are stored)</action>
3017
+
3018
+ <action>Extract from the ENHANCED tech-spec structure:
3019
+
3020
+ - Overall feature goal from "The Change → Problem Statement" and "Proposed Solution"
3021
+ - Implementation tasks from "Implementation Guide → Implementation Steps"
3022
+ - Time estimates from "Implementation Guide → Implementation Steps"
3023
+ - Dependencies from "Implementation Details → Integration Points" and "Development Context → Dependencies"
3024
+ - Source tree from "Implementation Details → Source Tree Changes"
3025
+ - Framework dependencies from "Development Context → Framework/Libraries"
3026
+ - Existing code references from "Development Context → Relevant Existing Code"
3027
+ - File paths from "Developer Resources → File Paths Reference"
3028
+ - Key code locations from "Developer Resources → Key Code Locations"
3029
+ - Testing locations from "Developer Resources → Testing Locations"
3030
+ - Acceptance criteria from "Implementation Guide → Acceptance Criteria"
3031
+ </action>
3032
+
3033
+ </step>
3034
+
3035
+ <step n="2" goal="Create single epic">
3036
+
3037
+ <action>Create 1 epic that represents the entire feature</action>
3038
+ <action>Epic title should be user-facing value statement</action>
3039
+ <action>Epic goal should describe why this matters to users</action>
3040
+
3041
+ <guidelines>
3042
+ **Epic Best Practices:**
3043
+ - Title format: User-focused outcome (not implementation detail)
3044
+ - Good: "JS Library Icon Reliability"
3045
+ - Bad: "Update recommendedLibraries.ts file"
3046
+ - Scope: Clearly define what's included/excluded
3047
+ - Success criteria: Measurable outcomes that define "done"
3048
+ </guidelines>
3049
+
3050
+ <example>
3051
+ **Epic:** JS Library Icon Reliability
3052
+
3053
+ **Goal:** Eliminate external dependencies for JS library icons to ensure consistent, reliable display and improve application performance.
3054
+
3055
+ **Scope:** Migrate all 14 recommended JS library icons from third-party CDN URLs (GitHub, jsDelivr) to internal static asset hosting.
3056
+
3057
+ **Success Criteria:**
3058
+
3059
+ - All library icons load from internal paths
3060
+ - Zero external requests for library icons
3061
+ - Icons load 50-200ms faster than baseline
3062
+ - No broken icons in production
3063
+ </example>
3064
+
3065
+ <action>Derive epic slug from epic title (kebab-case, 2-3 words max)</action>
3066
+ <example>
3067
+
3068
+ - "JS Library Icon Reliability" → "icon-reliability"
3069
+ - "OAuth Integration" → "oauth-integration"
3070
+ - "Admin Dashboard" → "admin-dashboard"
3071
+ </example>
3072
+
3073
+ <action>Initialize epics.md summary document using epics_template</action>
3074
+
3075
+ <action>Also capture project_level for the epic template</action>
3076
+
3077
+ <template-output file="{output_folder}/epics.md">project_level</template-output>
3078
+ <template-output file="{output_folder}/epics.md">epic_title</template-output>
3079
+ <template-output file="{output_folder}/epics.md">epic_slug</template-output>
3080
+ <template-output file="{output_folder}/epics.md">epic_goal</template-output>
3081
+ <template-output file="{output_folder}/epics.md">epic_scope</template-output>
3082
+ <template-output file="{output_folder}/epics.md">epic_success_criteria</template-output>
3083
+ <template-output file="{output_folder}/epics.md">epic_dependencies</template-output>
3084
+
3085
+ </step>
3086
+
3087
+ <step n="3" goal="Determine optimal story count">
3088
+
3089
+ <critical>Level 1 should have 2-3 stories maximum - prefer longer stories over more stories</critical>
3090
+
3091
+ <action>Analyze tech spec implementation tasks and time estimates</action>
3092
+ <action>Group related tasks into logical story boundaries</action>
3093
+
3094
+ <guidelines>
3095
+ **Story Count Decision Matrix:**
3096
+
3097
+ **2 Stories (preferred for most Level 1):**
3098
+
3099
+ - Use when: Feature has clear build/verify split
3100
+ - Example: Story 1 = Build feature, Story 2 = Test and deploy
3101
+ - Typical points: 3-5 points per story
3102
+
3103
+ **3 Stories (only if necessary):**
3104
+
3105
+ - Use when: Feature has distinct setup, build, verify phases
3106
+ - Example: Story 1 = Setup, Story 2 = Core implementation, Story 3 = Integration and testing
3107
+ - Typical points: 2-3 points per story
3108
+
3109
+ **Never exceed 3 stories for Level 1:**
3110
+
3111
+ - If more needed, consider if project should be Level 2
3112
+ - Better to have longer stories (5 points) than more stories (5x 1-point stories)
3113
+ </guidelines>
3114
+
3115
+ <action>Determine story_count = 2 or 3 based on tech spec complexity</action>
3116
+
3117
+ </step>
3118
+
3119
+ <step n="4" goal="Generate user stories from tech spec tasks">
3120
+
3121
+ <action>For each story (2-3 total), generate separate story file</action>
3122
+ <action>Story filename format: "story-{epic_slug}-{n}.md" where n = 1, 2, or 3</action>
3123
+
3124
+ <guidelines>
3125
+ **Story Generation Guidelines:**
3126
+ - Each story = multiple implementation tasks from tech spec
3127
+ - Story title format: User-focused deliverable (not implementation steps)
3128
+ - Include technical acceptance criteria from tech spec tasks
3129
+ - Link back to tech spec sections for implementation details
3130
+
3131
+ **CRITICAL: Acceptance Criteria Must Be:**
3132
+
3133
+ 1. **Numbered** - AC #1, AC #2, AC #3, etc.
3134
+ 2. **Specific** - No vague statements like "works well" or "is fast"
3135
+ 3. **Testable** - Can be verified objectively
3136
+ 4. **Complete** - Covers all success conditions
3137
+ 5. **Independent** - Each AC tests one thing
3138
+ 6. **Format**: Use Given/When/Then when applicable
3139
+
3140
+ **Good AC Examples:**
3141
+ ✅ AC #1: Given a valid email address, when user submits the form, then the account is created and user receives a confirmation email within 30 seconds
3142
+ ✅ AC #2: Given an invalid email format, when user submits, then form displays "Invalid email format" error message
3143
+ ✅ AC #3: All unit tests in UserService.test.ts pass with 100% coverage
3144
+
3145
+ **Bad AC Examples:**
3146
+ ❌ "User can create account" (too vague)
3147
+ ❌ "System performs well" (not measurable)
3148
+ ❌ "Works correctly" (not specific)
3149
+
3150
+ **Story Point Estimation:**
3151
+
3152
+ - 1 point = < 1 day (2-4 hours)
3153
+ - 2 points = 1-2 days
3154
+ - 3 points = 2-3 days
3155
+ - 5 points = 3-5 days
3156
+
3157
+ **Level 1 Typical Totals:**
3158
+
3159
+ - Total story points: 5-10 points
3160
+ - 2 stories: 3-5 points each
3161
+ - 3 stories: 2-3 points each
3162
+ - If total > 15 points, consider if this should be Level 2
3163
+
3164
+ **Story Structure (MUST match create-story format):**
3165
+
3166
+ - Status: Draft
3167
+ - Story: As a [role], I want [capability], so that [benefit]
3168
+ - Acceptance Criteria: Numbered list from tech spec
3169
+ - Tasks / Subtasks: Checkboxes mapped to tech spec tasks (AC: #n references)
3170
+ - Dev Notes: Technical summary, project structure notes, references
3171
+ - Dev Agent Record: Empty sections (tech-spec provides context)
3172
+
3173
+ **NEW: Comprehensive Context Fields**
3174
+
3175
+ Since tech-spec is context-rich, populate ALL template fields:
3176
+
3177
+ - dependencies: Extract from tech-spec "Development Context → Dependencies" and "Integration Points"
3178
+ - existing_code_references: Extract from "Development Context → Relevant Existing Code" and "Developer Resources → Key Code Locations"
3179
+ </guidelines>
3180
+
3181
+ <for-each story="1 to story_count">
3182
+ <action>Set story_path_{n} = "{dev_story_location}/story-{epic_slug}-{n}.md"</action>
3183
+ <action>Create story file from user_story_template with the following content:</action>
3184
+
3185
+ <template-output file="{story_path_{n}}">
3186
+ - story_title: User-focused deliverable title
3187
+ - role: User role (e.g., developer, user, admin)
3188
+ - capability: What they want to do
3189
+ - benefit: Why it matters
3190
+ - acceptance_criteria: Specific, measurable criteria from tech spec
3191
+ - tasks_subtasks: Implementation tasks with AC references
3192
+ - technical_summary: High-level approach, key decisions
3193
+ - files_to_modify: List of files that will change (from tech-spec "Developer Resources → File Paths Reference")
3194
+ - test_locations: Where tests will be added (from tech-spec "Developer Resources → Testing Locations")
3195
+ - story_points: Estimated effort (1/2/3/5)
3196
+ - time_estimate: Days/hours estimate
3197
+ - dependencies: Internal/external dependencies (from tech-spec "Development Context" and "Integration Points")
3198
+ - existing_code_references: Code to reference (from tech-spec "Development Context → Relevant Existing Code" and "Key Code Locations")
3199
+ - architecture_references: Links to tech-spec.md sections
3200
+ </template-output>
3201
+ </for-each>
3202
+
3203
+ <critical>Generate exactly {story_count} story files (2 or 3 based on Step 3 decision)</critical>
3204
+
3205
+ </step>
3206
+
3207
+ <step n="5" goal="Create story map and implementation sequence with dependency validation">
3208
+
3209
+ <critical>Stories MUST be ordered so earlier stories don't depend on later ones</critical>
3210
+ <critical>Each story must have CLEAR, TESTABLE acceptance criteria</critical>
3211
+
3212
+ <action>Analyze dependencies between stories:
3213
+
3214
+ **Dependency Rules:**
3215
+
3216
+ 1. Infrastructure/setup → Feature implementation → Testing/polish
3217
+ 2. Database changes → API changes → UI changes
3218
+ 3. Backend services → Frontend components
3219
+ 4. Core functionality → Enhancement features
3220
+ 5. No story can depend on a later story!
3221
+
3222
+ **Validate Story Sequence:**
3223
+ For each story N, check:
3224
+
3225
+ - Does it require anything from Story N+1, N+2, etc.? ❌ INVALID
3226
+ - Does it only use things from Story 1...N-1? ✅ VALID
3227
+ - Can it be implemented independently or using only prior stories? ✅ VALID
3228
+
3229
+ If invalid dependencies found, REORDER stories!
3230
+ </action>
3231
+
3232
+ <action>Generate visual story map showing epic → stories hierarchy with dependencies</action>
3233
+ <action>Calculate total story points across all stories</action>
3234
+ <action>Estimate timeline based on total points (1-2 points per day typical)</action>
3235
+ <action>Define implementation sequence with explicit dependency notes</action>
3236
+
3237
+ <example>
3238
+ ## Story Map
3239
+
3240
+ ```
3241
+ Epic: Icon Reliability
3242
+ ├── Story 1: Build Icon Infrastructure (3 points)
3243
+ │ Dependencies: None (foundational work)
3244
+
3245
+ └── Story 2: Test and Deploy Icons (2 points)
3246
+ Dependencies: Story 1 (requires infrastructure)
3247
+ ```
3248
+
3249
+ **Total Story Points:** 5
3250
+ **Estimated Timeline:** 1 sprint (1 week)
3251
+
3252
+ ## Implementation Sequence
3253
+
3254
+ 1. **Story 1** → Build icon infrastructure (setup, download, configure)
3255
+ - Dependencies: None
3256
+ - Deliverable: Icon files downloaded, organized, accessible
3257
+
3258
+ 2. **Story 2** → Test and deploy (depends on Story 1)
3259
+ - Dependencies: Story 1 must be complete
3260
+ - Deliverable: Icons verified, tested, deployed to production
3261
+
3262
+ **Dependency Validation:** ✅ Valid sequence - no forward dependencies
3263
+ </example>
3264
+
3265
+ <template-output file="{output_folder}/epics.md">story_summaries</template-output>
3266
+ <template-output file="{output_folder}/epics.md">story_map</template-output>
3267
+ <template-output file="{output_folder}/epics.md">total_points</template-output>
3268
+ <template-output file="{output_folder}/epics.md">estimated_timeline</template-output>
3269
+ <template-output file="{output_folder}/epics.md">implementation_sequence</template-output>
3270
+
3271
+ </step>
3272
+
3273
+ <step n="6" goal="Update status and populate story backlog">
3274
+
3275
+ <invoke-workflow path="bmad/bmm/workflows/workflow-status">
3276
+ <param>mode: update</param>
3277
+ <param>action: complete_workflow</param>
3278
+ <param>workflow_name: tech-spec</param>
3279
+ <param>populate_stories_from: {epics_output_file}</param>
3280
+ </invoke-workflow>
3281
+
3282
+ <check if="success == true">
3283
+ <output>✅ Status updated! Loaded {{total_stories}} stories from epics.</output>
3284
+ <output>Next: {{next_workflow}} ({{next_agent}} agent)</output>
3285
+ </check>
3286
+
3287
+ <check if="success == false">
3288
+ <output>⚠️ Status update failed: {{error}}</output>
3289
+ </check>
3290
+
3291
+ </step>
3292
+
3293
+ <step n="7" goal="Auto-validate story quality and sequence">
3294
+
3295
+ <critical>Auto-run validation - NOT optional!</critical>
3296
+
3297
+ <action>Running automatic story validation...</action>
3298
+
3299
+ <action>**Validate Story Sequence (CRITICAL):**
3300
+
3301
+ For each story, check:
3302
+
3303
+ 1. Does Story N depend on Story N+1 or later? ❌ FAIL - Reorder required!
3304
+ 2. Are dependencies clearly documented? ✅ PASS
3305
+ 3. Can stories be implemented in order 1→2→3? ✅ PASS
3306
+
3307
+ If sequence validation FAILS:
3308
+
3309
+ - Identify the problem dependencies
3310
+ - Propose new ordering
3311
+ - Ask user to confirm reordering
3312
+ </action>
3313
+
3314
+ <action>**Validate Acceptance Criteria Quality:**
3315
+
3316
+ For each story's AC, check:
3317
+
3318
+ 1. Is it numbered (AC #1, AC #2, etc.)? ✅ Required
3319
+ 2. Is it specific and testable? ✅ Required
3320
+ 3. Does it use Given/When/Then or equivalent? ✅ Recommended
3321
+ 4. Are all success conditions covered? ✅ Required
3322
+
3323
+ Count vague AC (contains "works", "good", "fast", "well"):
3324
+
3325
+ - 0 vague AC: ✅ EXCELLENT
3326
+ - 1-2 vague AC: ⚠️ WARNING - Should improve
3327
+ - 3+ vague AC: ❌ FAIL - Must improve
3328
+ </action>
3329
+
3330
+ <action>**Validate Story Completeness:**
3331
+
3332
+ 1. Do all stories map to tech spec tasks? ✅ Required
3333
+ 2. Do story points align with tech spec estimates? ✅ Recommended
3334
+ 3. Are dependencies clearly noted? ✅ Required
3335
+ 4. Does each story have testable AC? ✅ Required
3336
+ </action>
3337
+
3338
+ <action>Generate validation report</action>
3339
+
3340
+ <check if="sequence validation fails OR AC quality fails">
3341
+ <output>❌ **Story Validation Failed:**
3342
+
3343
+ {{issues_found}}
3344
+
3345
+ **Recommended Fixes:**
3346
+ {{recommended_fixes}}
3347
+
3348
+ Shall I fix these issues? (yes/no)</output>
3349
+
3350
+ <ask>Apply fixes? (yes/no)</ask>
3351
+
3352
+ <check if="yes">
3353
+ <action>Apply fixes (reorder stories, rewrite vague AC, add missing details)</action>
3354
+ <action>Re-validate</action>
3355
+ <output>✅ Validation passed after fixes!</output>
3356
+ </check>
3357
+ </check>
3358
+
3359
+ <check if="validation passes">
3360
+ <output>✅ **Story Validation Passed!**
3361
+
3362
+ **Sequence:** ✅ Valid (no forward dependencies)
3363
+ **AC Quality:** ✅ All specific and testable
3364
+ **Completeness:** ✅ All tech spec tasks covered
3365
+ **Dependencies:** ✅ Clearly documented
3366
+
3367
+ Stories are implementation-ready!</output>
3368
+ </check>
3369
+
3370
+ </step>
3371
+
3372
+ <step n="8" goal="Finalize and provide user guidance">
3373
+
3374
+ <action>Confirm all validation passed</action>
3375
+ <action>Verify total story points align with tech spec time estimates</action>
3376
+ <action>Confirm epic and stories are complete</action>
3377
+
3378
+ **Level 1 Planning Complete!**
3379
+
3380
+ **Epic:** {{epic_title}}
3381
+ **Total Stories:** {{story_count}}
3382
+ **Total Story Points:** {{total_points}}
3383
+ **Estimated Timeline:** {{estimated_timeline}}
3384
+
3385
+ **Generated Artifacts:**
3386
+
3387
+ - `tech-spec.md` → Technical source of truth
3388
+ - `epics.md` → Epic and story summary
3389
+ - `story-{epic_slug}-1.md` → First story (ready for implementation)
3390
+ - `story-{epic_slug}-2.md` → Second story
3391
+ {{#if story_3}}
3392
+ - `story-{epic_slug}-3.md` → Third story
3393
+ {{/if}}
3394
+
3395
+ **Story Location:** `{dev_story_location}/`
3396
+
3397
+ **Next Steps - Iterative Implementation:**
3398
+
3399
+ **🎯 RECOMMENDED - Direct to Development (Level 1):**
3400
+
3401
+ Since the tech-spec is now CONTEXT-RICH with:
3402
+
3403
+ - ✅ Brownfield codebase analysis (if applicable)
3404
+ - ✅ Framework and library details with exact versions
3405
+ - ✅ Existing patterns and code references
3406
+ - ✅ Complete file paths and integration points
3407
+ - ✅ Dependencies clearly mapped
3408
+
3409
+ **You can skip story-context for most Level 1 stories!**
3410
+
3411
+ **1. Start with Story 1:**
3412
+ a. Load DEV agent: `bmad/bmm/agents/dev.md`
3413
+ b. Run `dev-story` workflow (select story-{epic_slug}-1.md)
3414
+ c. Tech-spec provides all context needed
3415
+ d. Implement story 1
3416
+
3417
+ **2. After Story 1 Complete:**
3418
+
3419
+ - Repeat for story-{epic_slug}-2.md
3420
+ - Reference completed story 1 in your work
3421
+
3422
+ **3. After Story 2 Complete:**
3423
+ {{#if story_3}}
3424
+
3425
+ - Repeat for story-{epic_slug}-3.md
3426
+ {{/if}}
3427
+ - Level 1 feature complete!
3428
+
3429
+ **Option B - Generate Additional Context (optional):**
3430
+
3431
+ Only needed for extremely complex multi-story dependencies:
3432
+
3433
+ 1. Load SM agent: `bmad/bmm/agents/sm.md`
3434
+ 2. Run `story-context` workflow for complex stories
3435
+ 3. Then load DEV agent and run `dev-story`
3436
+
3437
+ **Progress Tracking:**
3438
+
3439
+ - All decisions logged in: `bmm-workflow-status.yaml`
3440
+ - Next action clearly identified
3441
+
3442
+ <ask>Ready to proceed? Choose your path:
3443
+
3444
+ 1. Go directly to dev-story for story 1 (RECOMMENDED - tech-spec has all context)
3445
+ 2. Generate additional story context first (for complex dependencies)
3446
+ 3. Exit for now
3447
+
3448
+ Select option (1-3):</ask>
3449
+
3450
+ </step>
3451
+
3452
+ </workflow>
3453
+ ]]></file>
3454
+ <file id="bmad/bmm/workflows/2-plan-workflows/tech-spec/tech-spec-template.md" type="md"><![CDATA[# {{project_name}} - Technical Specification
3455
+
3456
+ **Author:** {{user_name}}
3457
+ **Date:** {{date}}
3458
+ **Project Level:** {{project_level}}
3459
+ **Change Type:** {{change_type}}
3460
+ **Development Context:** {{development_context}}
3461
+
3462
+ ---
3463
+
3464
+ ## Context
3465
+
3466
+ ### Available Documents
3467
+
3468
+ {{loaded_documents_summary}}
3469
+
3470
+ ### Project Stack
3471
+
3472
+ {{project_stack_summary}}
3473
+
3474
+ ### Existing Codebase Structure
3475
+
3476
+ {{existing_structure_summary}}
3477
+
3478
+ ---
3479
+
3480
+ ## The Change
3481
+
3482
+ ### Problem Statement
3483
+
3484
+ {{problem_statement}}
3485
+
3486
+ ### Proposed Solution
3487
+
3488
+ {{solution_overview}}
3489
+
3490
+ ### Scope
3491
+
3492
+ **In Scope:**
3493
+
3494
+ {{scope_in}}
3495
+
3496
+ **Out of Scope:**
3497
+
3498
+ {{scope_out}}
3499
+
3500
+ ---
3501
+
3502
+ ## Implementation Details
3503
+
3504
+ ### Source Tree Changes
3505
+
3506
+ {{source_tree_changes}}
3507
+
3508
+ ### Technical Approach
3509
+
3510
+ {{technical_approach}}
3511
+
3512
+ ### Existing Patterns to Follow
3513
+
3514
+ {{existing_patterns}}
3515
+
3516
+ ### Integration Points
3517
+
3518
+ {{integration_points}}
3519
+
3520
+ ---
3521
+
3522
+ ## Development Context
3523
+
3524
+ ### Relevant Existing Code
3525
+
3526
+ {{existing_code_references}}
3527
+
3528
+ ### Dependencies
3529
+
3530
+ **Framework/Libraries:**
3531
+
3532
+ {{framework_dependencies}}
3533
+
3534
+ **Internal Modules:**
3535
+
3536
+ {{internal_dependencies}}
3537
+
3538
+ ### Configuration Changes
3539
+
3540
+ {{configuration_changes}}
3541
+
3542
+ ### Existing Conventions (Brownfield)
3543
+
3544
+ {{existing_conventions}}
3545
+
3546
+ ### Test Framework & Standards
3547
+
3548
+ {{test_framework_info}}
3549
+
3550
+ ---
3551
+
3552
+ ## Implementation Stack
3553
+
3554
+ {{implementation_stack}}
3555
+
3556
+ ---
3557
+
3558
+ ## Technical Details
3559
+
3560
+ {{technical_details}}
3561
+
3562
+ ---
3563
+
3564
+ ## Development Setup
3565
+
3566
+ {{development_setup}}
3567
+
3568
+ ---
3569
+
3570
+ ## Implementation Guide
3571
+
3572
+ ### Setup Steps
3573
+
3574
+ {{setup_steps}}
3575
+
3576
+ ### Implementation Steps
3577
+
3578
+ {{implementation_steps}}
3579
+
3580
+ ### Testing Strategy
3581
+
3582
+ {{testing_strategy}}
3583
+
3584
+ ### Acceptance Criteria
3585
+
3586
+ {{acceptance_criteria}}
3587
+
3588
+ ---
3589
+
3590
+ ## Developer Resources
3591
+
3592
+ ### File Paths Reference
3593
+
3594
+ {{file_paths_complete}}
3595
+
3596
+ ### Key Code Locations
3597
+
3598
+ {{key_code_locations}}
3599
+
3600
+ ### Testing Locations
3601
+
3602
+ {{testing_locations}}
3603
+
3604
+ ### Documentation to Update
3605
+
3606
+ {{documentation_updates}}
3607
+
3608
+ ---
3609
+
3610
+ ## UX/UI Considerations
3611
+
3612
+ {{ux_ui_considerations}}
3613
+
3614
+ ---
3615
+
3616
+ ## Testing Approach
3617
+
3618
+ {{testing_approach}}
3619
+
3620
+ ---
3621
+
3622
+ ## Deployment Strategy
3623
+
3624
+ ### Deployment Steps
3625
+
3626
+ {{deployment_steps}}
3627
+
3628
+ ### Rollback Plan
3629
+
3630
+ {{rollback_plan}}
3631
+
3632
+ ### Monitoring
3633
+
3634
+ {{monitoring_approach}}
3635
+ ]]></file>
3636
+ <file id="bmad/bmm/workflows/2-plan-workflows/tech-spec/user-story-template.md" type="md"><![CDATA[# Story {{N}}.{{M}}: {{story_title}}
3637
+
3638
+ **Status:** Draft
3639
+
3640
+ ---
3641
+
3642
+ ## User Story
3643
+
3644
+ As a {{user_type}},
3645
+ I want {{capability}},
3646
+ So that {{value_benefit}}.
3647
+
3648
+ ---
3649
+
3650
+ ## Acceptance Criteria
3651
+
3652
+ **Given** {{precondition}}
3653
+ **When** {{action}}
3654
+ **Then** {{expected_outcome}}
3655
+
3656
+ **And** {{additional_criteria}}
3657
+
3658
+ ---
3659
+
3660
+ ## Implementation Details
3661
+
3662
+ ### Tasks / Subtasks
3663
+
3664
+ {{tasks_subtasks}}
3665
+
3666
+ ### Technical Summary
3667
+
3668
+ {{technical_summary}}
3669
+
3670
+ ### Project Structure Notes
3671
+
3672
+ - **Files to modify:** {{files_to_modify}}
3673
+ - **Expected test locations:** {{test_locations}}
3674
+ - **Estimated effort:** {{story_points}} story points ({{time_estimate}})
3675
+ - **Prerequisites:** {{dependencies}}
3676
+
3677
+ ### Key Code References
3678
+
3679
+ {{existing_code_references}}
3680
+
3681
+ ---
3682
+
3683
+ ## Context References
3684
+
3685
+ **Tech-Spec:** [tech-spec.md](../tech-spec.md) - Primary context document containing:
3686
+
3687
+ - Brownfield codebase analysis (if applicable)
3688
+ - Framework and library details with versions
3689
+ - Existing patterns to follow
3690
+ - Integration points and dependencies
3691
+ - Complete implementation guidance
3692
+
3693
+ **Architecture:** {{architecture_references}}
3694
+
3695
+ <!-- Additional context XML paths will be added here if story-context workflow is run -->
3696
+
3697
+ ---
3698
+
3699
+ ## Dev Agent Record
3700
+
3701
+ ### Agent Model Used
3702
+
3703
+ <!-- Will be populated during dev-story execution -->
3704
+
3705
+ ### Debug Log References
3706
+
3707
+ <!-- Will be populated during dev-story execution -->
3708
+
3709
+ ### Completion Notes
3710
+
3711
+ <!-- Will be populated during dev-story execution -->
3712
+
3713
+ ### Files Modified
3714
+
3715
+ <!-- Will be populated during dev-story execution -->
3716
+
3717
+ ### Test Results
3718
+
3719
+ <!-- Will be populated during dev-story execution -->
3720
+
3721
+ ---
3722
+
3723
+ ## Review Notes
3724
+
3725
+ <!-- Will be populated during code review -->
3726
+ ]]></file>
3727
+ <file id="bmad/bmm/workflows/2-plan-workflows/tech-spec/epics-template.md" type="md"><![CDATA[# {{project_name}} - Epic Breakdown
3728
+
3729
+ **Date:** {{date}}
3730
+ **Project Level:** {{project_level}}
3731
+
3732
+ ---
3733
+
3734
+ <!-- Repeat for each epic (N = 1, 2, 3...) -->
3735
+
3736
+ ## Epic {{N}}: {{epic_title_N}}
3737
+
3738
+ **Slug:** {{epic_slug_N}}
3739
+
3740
+ ### Goal
3741
+
3742
+ {{epic_goal_N}}
3743
+
3744
+ ### Scope
3745
+
3746
+ {{epic_scope_N}}
3747
+
3748
+ ### Success Criteria
3749
+
3750
+ {{epic_success_criteria_N}}
3751
+
3752
+ ### Dependencies
3753
+
3754
+ {{epic_dependencies_N}}
3755
+
3756
+ ---
3757
+
3758
+ ## Story Map - Epic {{N}}
3759
+
3760
+ {{story_map_N}}
3761
+
3762
+ ---
3763
+
3764
+ ## Stories - Epic {{N}}
3765
+
3766
+ <!-- Repeat for each story (M = 1, 2, 3...) within epic N -->
3767
+
3768
+ ### Story {{N}}.{{M}}: {{story_title_N_M}}
3769
+
3770
+ As a {{user_type}},
3771
+ I want {{capability}},
3772
+ So that {{value_benefit}}.
3773
+
3774
+ **Acceptance Criteria:**
3775
+
3776
+ **Given** {{precondition}}
3777
+ **When** {{action}}
3778
+ **Then** {{expected_outcome}}
3779
+
3780
+ **And** {{additional_criteria}}
3781
+
3782
+ **Prerequisites:** {{dependencies_on_previous_stories}}
3783
+
3784
+ **Technical Notes:** {{implementation_guidance}}
3785
+
3786
+ **Estimated Effort:** {{story_points}} points ({{time_estimate}})
3787
+
3788
+ <!-- End story repeat -->
3789
+
3790
+ ---
3791
+
3792
+ ## Implementation Timeline - Epic {{N}}
3793
+
3794
+ **Total Story Points:** {{total_points_N}}
3795
+
3796
+ **Estimated Timeline:** {{estimated_timeline_N}}
3797
+
3798
+ ---
3799
+
3800
+ <!-- End epic repeat -->
3801
+
3802
+ ---
3803
+
3804
+ ## Tech-Spec Reference
3805
+
3806
+ See [tech-spec.md](../tech-spec.md) for complete technical implementation details.
3807
+ ]]></file>
3808
+ </agent-bundle>