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

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 (540) hide show
  1. package/.claude/commands/bmad/bmm/agents/analyst.md +67 -0
  2. package/.claude/commands/bmad/bmm/agents/architect.md +72 -0
  3. package/.claude/commands/bmad/bmm/agents/dev.md +69 -0
  4. package/.claude/commands/bmad/bmm/agents/paige.md +82 -0
  5. package/.claude/commands/bmad/bmm/agents/pm.md +76 -0
  6. package/.claude/commands/bmad/bmm/agents/sm.md +85 -0
  7. package/.claude/commands/bmad/bmm/agents/tea.md +72 -0
  8. package/.claude/commands/bmad/bmm/agents/tech-writer.md +82 -0
  9. package/.claude/commands/bmad/bmm/agents/ux-designer.md +71 -0
  10. package/.claude/commands/bmad/bmm/workflows/README.md +132 -0
  11. package/.claude/commands/bmad/bmm/workflows/architecture.md +15 -0
  12. package/.claude/commands/bmad/bmm/workflows/brainstorm-project.md +15 -0
  13. package/.claude/commands/bmad/bmm/workflows/code-review.md +15 -0
  14. package/.claude/commands/bmad/bmm/workflows/correct-course.md +15 -0
  15. package/.claude/commands/bmad/bmm/workflows/create-epics-and-stories.md +15 -0
  16. package/.claude/commands/bmad/bmm/workflows/create-story.md +15 -0
  17. package/.claude/commands/bmad/bmm/workflows/create-ux-design.md +15 -0
  18. package/.claude/commands/bmad/bmm/workflows/dev-story.md +15 -0
  19. package/.claude/commands/bmad/bmm/workflows/document-project.md +15 -0
  20. package/.claude/commands/bmad/bmm/workflows/epic-tech-context.md +15 -0
  21. package/.claude/commands/bmad/bmm/workflows/narrative.md +15 -0
  22. package/.claude/commands/bmad/bmm/workflows/prd.md +15 -0
  23. package/.claude/commands/bmad/bmm/workflows/product-brief.md +15 -0
  24. package/.claude/commands/bmad/bmm/workflows/research.md +15 -0
  25. package/.claude/commands/bmad/bmm/workflows/retrospective.md +15 -0
  26. package/.claude/commands/bmad/bmm/workflows/solutioning-gate-check.md +15 -0
  27. package/.claude/commands/bmad/bmm/workflows/sprint-planning.md +15 -0
  28. package/.claude/commands/bmad/bmm/workflows/story-context.md +15 -0
  29. package/.claude/commands/bmad/bmm/workflows/story-done.md +15 -0
  30. package/.claude/commands/bmad/bmm/workflows/story-ready.md +15 -0
  31. package/.claude/commands/bmad/bmm/workflows/tech-spec-sm.md +15 -0
  32. package/.claude/commands/bmad/bmm/workflows/tech-spec.md +15 -0
  33. package/.claude/commands/bmad/bmm/workflows/workflow-init.md +15 -0
  34. package/.claude/commands/bmad/bmm/workflows/workflow-status.md +15 -0
  35. package/.claude/commands/bmad/cis/agents/README.md +104 -0
  36. package/.claude/commands/bmad/cis/agents/brainstorming-coach.md +62 -0
  37. package/.claude/commands/bmad/cis/agents/creative-problem-solver.md +62 -0
  38. package/.claude/commands/bmad/cis/agents/design-thinking-coach.md +62 -0
  39. package/.claude/commands/bmad/cis/agents/innovation-strategist.md +62 -0
  40. package/.claude/commands/bmad/cis/agents/storyteller.md +59 -0
  41. package/.claude/commands/bmad/cis/workflows/README.md +37 -0
  42. package/.claude/commands/bmad/cis/workflows/design-thinking.md +15 -0
  43. package/.claude/commands/bmad/cis/workflows/innovation-strategy.md +15 -0
  44. package/.claude/commands/bmad/cis/workflows/problem-solving.md +15 -0
  45. package/.claude/commands/bmad/cis/workflows/storytelling.md +15 -0
  46. package/.claude/commands/bmad/core/workflows/README.md +10 -0
  47. package/.claude/settings.local.json +7 -42
  48. package/CHANGELOG.md +544 -0
  49. package/README.md +266 -101
  50. package/bmad/_cfg/agent-manifest.csv +13 -3
  51. package/bmad/_cfg/agents/bmm-dev.customize.yaml +42 -0
  52. package/bmad/_cfg/agents/bmm-paige.customize.yaml +42 -0
  53. package/bmad/_cfg/agents/bmm-pm.customize.yaml +42 -0
  54. package/bmad/_cfg/agents/bmm-sm.customize.yaml +42 -0
  55. package/bmad/_cfg/agents/bmm-tea.customize.yaml +42 -0
  56. package/bmad/_cfg/agents/bmm-tech-writer.customize.yaml +42 -0
  57. package/bmad/_cfg/agents/bmm-ux-designer.customize.yaml +42 -0
  58. package/bmad/_cfg/agents/cis-brainstorming-coach.customize.yaml +42 -0
  59. package/bmad/_cfg/agents/cis-creative-problem-solver.customize.yaml +42 -0
  60. package/bmad/_cfg/agents/cis-design-thinking-coach.customize.yaml +42 -0
  61. package/bmad/_cfg/agents/cis-innovation-strategist.customize.yaml +42 -0
  62. package/bmad/_cfg/agents/cis-storyteller.customize.yaml +42 -0
  63. package/bmad/_cfg/files-manifest.csv +267 -22
  64. package/bmad/_cfg/ides/claude-code.yaml +6 -0
  65. package/bmad/_cfg/manifest.yaml +5 -5
  66. package/bmad/_cfg/task-manifest.csv +5 -0
  67. package/bmad/_cfg/tool-manifest.csv +1 -0
  68. package/bmad/_cfg/workflow-manifest.csv +37 -2
  69. package/bmad/bmb/README.md +135 -73
  70. package/bmad/bmb/agents/bmad-builder.md.bak +70 -0
  71. package/bmad/bmb/config.yaml +2 -2
  72. package/bmad/bmb/workflows/audit-workflow/instructions.md +1 -1
  73. package/bmad/bmb/workflows/audit-workflow/workflow.yaml.bak +3 -1
  74. package/bmad/bmb/workflows/create-agent/README.md +126 -243
  75. package/bmad/bmb/workflows/create-agent/instructions.md +25 -12
  76. package/bmad/bmb/workflows/create-module/README.md +163 -154
  77. package/bmad/bmb/workflows/create-module/workflow.yaml.bak +2 -0
  78. package/bmad/bmb/workflows/create-workflow/instructions.md +16 -8
  79. package/bmad/bmb/workflows/create-workflow/workflow-creation-guide.md +158 -0
  80. package/bmad/bmb/workflows/create-workflow/workflow.yaml.bak +2 -0
  81. package/bmad/bmb/workflows/edit-agent/workflow.yaml.bak +33 -0
  82. package/bmad/bmb/workflows/edit-module/workflow.yaml.bak +34 -0
  83. package/bmad/bmb/workflows/edit-workflow/workflow.yaml.bak +2 -0
  84. package/bmad/bmb/workflows/module-brief/workflow.yaml.bak +2 -0
  85. package/bmad/bmb/workflows/redoc/workflow.yaml.bak +1 -0
  86. package/bmad/bmm/README.md +128 -0
  87. package/bmad/bmm/README.md.bak +169 -0
  88. package/bmad/bmm/agents/analyst.md +67 -0
  89. package/bmad/bmm/agents/analyst.md.bak +67 -0
  90. package/bmad/bmm/agents/architect.md +72 -0
  91. package/bmad/bmm/agents/architect.md.bak +73 -0
  92. package/bmad/bmm/agents/dev.md +69 -0
  93. package/bmad/bmm/agents/dev.md.bak +69 -0
  94. package/bmad/bmm/agents/paige.md.bak +82 -0
  95. package/bmad/bmm/agents/pm.md +76 -0
  96. package/bmad/bmm/agents/pm.md.bak +76 -0
  97. package/bmad/bmm/agents/sm.md +85 -0
  98. package/bmad/bmm/agents/sm.md.bak +85 -0
  99. package/bmad/bmm/agents/tea.md +72 -0
  100. package/bmad/bmm/agents/tea.md.bak +72 -0
  101. package/bmad/bmm/agents/tech-writer.md +82 -0
  102. package/bmad/bmm/agents/ux-designer.md +71 -0
  103. package/bmad/bmm/agents/ux-designer.md.bak +71 -0
  104. package/bmad/bmm/config.yaml +17 -0
  105. package/bmad/bmm/docs/README.md +235 -0
  106. package/bmad/bmm/docs/agents-guide.md +1057 -0
  107. package/bmad/bmm/docs/brownfield-guide.md +759 -0
  108. package/bmad/bmm/docs/enterprise-agentic-development.md +680 -0
  109. package/bmad/bmm/docs/faq.md +589 -0
  110. package/bmad/bmm/docs/glossary.md +321 -0
  111. package/bmad/bmm/docs/party-mode.md +224 -0
  112. package/bmad/bmm/docs/quick-spec-flow.md +652 -0
  113. package/{docs/BMad-Method-V6-Quick-Start.md → bmad/bmm/docs/quick-start.md} +72 -47
  114. package/bmad/bmm/docs/scale-adaptive-system.md +599 -0
  115. package/bmad/bmm/docs/troubleshooting.md +680 -0
  116. package/{src/modules/bmm/workflows/3-solutioning/architecture/README.md → bmad/bmm/docs/workflow-architecture-reference.md} +130 -77
  117. package/{src/modules/bmm/workflows/document-project/README.md → bmad/bmm/docs/workflow-document-project-reference.md} +45 -2
  118. package/bmad/bmm/docs/workflows-analysis.md +670 -0
  119. package/bmad/bmm/docs/workflows-implementation.md +1758 -0
  120. package/bmad/bmm/docs/workflows-planning.md +1086 -0
  121. package/bmad/bmm/docs/workflows-solutioning.md +726 -0
  122. package/bmad/bmm/tasks/daily-standup.xml +85 -0
  123. package/bmad/bmm/teams/team-fullstack.yaml +11 -0
  124. package/bmad/bmm/teams/team-gamedev.yaml +14 -0
  125. package/bmad/bmm/testarch/knowledge/ci-burn-in.md +675 -0
  126. package/bmad/bmm/testarch/knowledge/component-tdd.md +486 -0
  127. package/bmad/bmm/testarch/knowledge/contract-testing.md +957 -0
  128. package/bmad/bmm/testarch/knowledge/data-factories.md +500 -0
  129. package/bmad/bmm/testarch/knowledge/email-auth.md +721 -0
  130. package/bmad/bmm/testarch/knowledge/error-handling.md +725 -0
  131. package/bmad/bmm/testarch/knowledge/feature-flags.md +750 -0
  132. package/bmad/bmm/testarch/knowledge/fixture-architecture.md +401 -0
  133. package/bmad/bmm/testarch/knowledge/network-first.md +486 -0
  134. package/bmad/bmm/testarch/knowledge/nfr-criteria.md +670 -0
  135. package/bmad/bmm/testarch/knowledge/playwright-config.md +730 -0
  136. package/bmad/bmm/testarch/knowledge/probability-impact.md +601 -0
  137. package/bmad/bmm/testarch/knowledge/risk-governance.md +615 -0
  138. package/bmad/bmm/testarch/knowledge/selective-testing.md +732 -0
  139. package/bmad/bmm/testarch/knowledge/selector-resilience.md +527 -0
  140. package/bmad/bmm/testarch/knowledge/test-healing-patterns.md +644 -0
  141. package/bmad/bmm/testarch/knowledge/test-levels-framework.md +473 -0
  142. package/bmad/bmm/testarch/knowledge/test-priorities-matrix.md +373 -0
  143. package/bmad/bmm/testarch/knowledge/test-quality.md +664 -0
  144. package/bmad/bmm/testarch/knowledge/timing-debugging.md +372 -0
  145. package/bmad/bmm/testarch/knowledge/visual-debugging.md +524 -0
  146. package/bmad/bmm/testarch/tea-index.csv +22 -0
  147. package/bmad/bmm/workflows/1-analysis/brainstorm-project/instructions.md +110 -0
  148. package/bmad/bmm/workflows/1-analysis/brainstorm-project/project-context.md +25 -0
  149. package/bmad/bmm/workflows/1-analysis/brainstorm-project/workflow.yaml +26 -0
  150. package/bmad/bmm/workflows/1-analysis/domain-research/instructions.md +423 -0
  151. package/bmad/bmm/workflows/1-analysis/domain-research/template.md +180 -0
  152. package/bmad/bmm/workflows/1-analysis/domain-research/workflow.yaml +36 -0
  153. package/bmad/bmm/workflows/1-analysis/product-brief/checklist.md +115 -0
  154. package/bmad/bmm/workflows/1-analysis/product-brief/instructions.md +524 -0
  155. package/bmad/bmm/workflows/1-analysis/product-brief/template.md +181 -0
  156. package/bmad/bmm/workflows/1-analysis/product-brief/workflow.yaml +45 -0
  157. package/bmad/bmm/workflows/1-analysis/research/checklist-deep-prompt.md +144 -0
  158. package/bmad/bmm/workflows/1-analysis/research/checklist-technical.md +249 -0
  159. package/bmad/bmm/workflows/1-analysis/research/checklist.md +299 -0
  160. package/bmad/bmm/workflows/1-analysis/research/claude-code/injections.yaml +114 -0
  161. package/bmad/bmm/workflows/1-analysis/research/instructions-deep-prompt.md +439 -0
  162. package/bmad/bmm/workflows/1-analysis/research/instructions-market.md +679 -0
  163. package/bmad/bmm/workflows/1-analysis/research/instructions-router.md +133 -0
  164. package/bmad/bmm/workflows/1-analysis/research/instructions-technical.md +538 -0
  165. package/bmad/bmm/workflows/1-analysis/research/template-deep-prompt.md +94 -0
  166. package/bmad/bmm/workflows/1-analysis/research/template-market.md +347 -0
  167. package/bmad/bmm/workflows/1-analysis/research/template-technical.md +245 -0
  168. package/bmad/bmm/workflows/1-analysis/research/workflow.yaml +44 -0
  169. package/bmad/bmm/workflows/2-plan-workflows/create-ux-design/checklist.md +310 -0
  170. package/bmad/bmm/workflows/2-plan-workflows/create-ux-design/instructions.md +1319 -0
  171. package/bmad/bmm/workflows/2-plan-workflows/create-ux-design/ux-design-template.md +145 -0
  172. package/bmad/bmm/workflows/2-plan-workflows/create-ux-design/workflow.yaml +64 -0
  173. package/bmad/bmm/workflows/2-plan-workflows/narrative/checklist.md +139 -0
  174. package/bmad/bmm/workflows/2-plan-workflows/narrative/instructions-narrative.md +608 -0
  175. package/bmad/bmm/workflows/2-plan-workflows/narrative/narrative-template.md +195 -0
  176. package/bmad/bmm/workflows/2-plan-workflows/narrative/workflow.yaml +29 -0
  177. package/bmad/bmm/workflows/2-plan-workflows/prd/checklist.md +349 -0
  178. package/bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/instructions.md +395 -0
  179. package/bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/workflow.yaml +33 -0
  180. package/bmad/bmm/workflows/2-plan-workflows/prd/domain-complexity.csv +13 -0
  181. package/bmad/bmm/workflows/2-plan-workflows/prd/instructions.md +423 -0
  182. package/bmad/bmm/workflows/2-plan-workflows/prd/prd-template.md +237 -0
  183. package/bmad/bmm/workflows/2-plan-workflows/prd/project-types.csv +11 -0
  184. package/bmad/bmm/workflows/2-plan-workflows/prd/workflow.yaml +46 -0
  185. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/checklist.md +214 -0
  186. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/epics-template.md +58 -0
  187. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/instructions-level0-story.md +200 -0
  188. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/instructions-level1-stories.md +451 -0
  189. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/instructions.md +1133 -0
  190. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/tech-spec-template.md +181 -0
  191. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/user-story-template.md +87 -0
  192. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml +60 -0
  193. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml.bak +60 -0
  194. package/bmad/bmm/workflows/3-solutioning/architecture/architecture-patterns.yaml +347 -0
  195. package/bmad/bmm/workflows/3-solutioning/architecture/architecture-template.md +103 -0
  196. package/bmad/bmm/workflows/3-solutioning/architecture/checklist.md +244 -0
  197. package/bmad/bmm/workflows/3-solutioning/architecture/decision-catalog.yaml +222 -0
  198. package/bmad/bmm/workflows/3-solutioning/architecture/instructions.md +715 -0
  199. package/bmad/bmm/workflows/3-solutioning/architecture/pattern-categories.csv +13 -0
  200. package/bmad/bmm/workflows/3-solutioning/architecture/workflow.yaml +67 -0
  201. package/bmad/bmm/workflows/3-solutioning/solutioning-gate-check/checklist.md +175 -0
  202. package/bmad/bmm/workflows/3-solutioning/solutioning-gate-check/instructions.md +322 -0
  203. package/bmad/bmm/workflows/3-solutioning/solutioning-gate-check/template.md +146 -0
  204. package/bmad/bmm/workflows/3-solutioning/solutioning-gate-check/validation-criteria.yaml +189 -0
  205. package/bmad/bmm/workflows/3-solutioning/solutioning-gate-check/workflow.yaml +64 -0
  206. package/bmad/bmm/workflows/4-implementation/code-review/backlog_template.md +12 -0
  207. package/bmad/bmm/workflows/4-implementation/code-review/checklist.md +22 -0
  208. package/bmad/bmm/workflows/4-implementation/code-review/instructions.md +420 -0
  209. package/bmad/bmm/workflows/4-implementation/code-review/workflow.yaml +74 -0
  210. package/bmad/bmm/workflows/4-implementation/correct-course/checklist.md +279 -0
  211. package/bmad/bmm/workflows/4-implementation/correct-course/instructions.md +201 -0
  212. package/bmad/bmm/workflows/4-implementation/correct-course/workflow.yaml +43 -0
  213. package/bmad/bmm/workflows/4-implementation/create-story/checklist.md +240 -0
  214. package/bmad/bmm/workflows/4-implementation/create-story/instructions.md +283 -0
  215. package/bmad/bmm/workflows/4-implementation/create-story/template.md +51 -0
  216. package/bmad/bmm/workflows/4-implementation/create-story/workflow.yaml +74 -0
  217. package/bmad/bmm/workflows/4-implementation/dev-story/AUDIT-REPORT.md +367 -0
  218. package/bmad/bmm/workflows/4-implementation/dev-story/checklist.md +38 -0
  219. package/bmad/bmm/workflows/4-implementation/dev-story/instructions.md +262 -0
  220. package/bmad/bmm/workflows/4-implementation/dev-story/workflow.yaml +26 -0
  221. package/bmad/bmm/workflows/4-implementation/epic-tech-context/checklist.md +17 -0
  222. package/bmad/bmm/workflows/4-implementation/epic-tech-context/instructions.md +189 -0
  223. package/bmad/bmm/workflows/4-implementation/epic-tech-context/template.md +76 -0
  224. package/bmad/bmm/workflows/4-implementation/epic-tech-context/workflow.yaml +58 -0
  225. package/bmad/bmm/workflows/4-implementation/retrospective/instructions.md +1460 -0
  226. package/bmad/bmm/workflows/4-implementation/retrospective/workflow.yaml +71 -0
  227. package/bmad/bmm/workflows/4-implementation/sprint-planning/checklist.md +33 -0
  228. package/bmad/bmm/workflows/4-implementation/sprint-planning/instructions.md +238 -0
  229. package/bmad/bmm/workflows/4-implementation/sprint-planning/sprint-status-template.yaml +55 -0
  230. package/bmad/bmm/workflows/4-implementation/sprint-planning/workflow.yaml +47 -0
  231. package/bmad/bmm/workflows/4-implementation/story-context/checklist.md +16 -0
  232. package/bmad/bmm/workflows/4-implementation/story-context/context-template.xml +34 -0
  233. package/bmad/bmm/workflows/4-implementation/story-context/instructions.md +234 -0
  234. package/bmad/bmm/workflows/4-implementation/story-context/workflow.yaml +57 -0
  235. package/bmad/bmm/workflows/4-implementation/story-done/instructions.md +111 -0
  236. package/bmad/bmm/workflows/4-implementation/story-done/workflow.yaml +25 -0
  237. package/bmad/bmm/workflows/4-implementation/story-ready/instructions.md +117 -0
  238. package/bmad/bmm/workflows/4-implementation/story-ready/workflow.yaml +25 -0
  239. package/bmad/bmm/workflows/document-project/checklist.md +245 -0
  240. package/bmad/bmm/workflows/document-project/documentation-requirements.csv +12 -0
  241. package/bmad/bmm/workflows/document-project/instructions.md +222 -0
  242. package/bmad/bmm/workflows/document-project/templates/deep-dive-template.md +345 -0
  243. package/bmad/bmm/workflows/document-project/templates/index-template.md +169 -0
  244. package/bmad/bmm/workflows/document-project/templates/project-overview-template.md +103 -0
  245. package/bmad/bmm/workflows/document-project/templates/project-scan-report-schema.json +160 -0
  246. package/bmad/bmm/workflows/document-project/templates/source-tree-template.md +135 -0
  247. package/bmad/bmm/workflows/document-project/workflow.yaml +34 -0
  248. package/bmad/bmm/workflows/document-project/workflows/deep-dive-instructions.md +298 -0
  249. package/bmad/bmm/workflows/document-project/workflows/deep-dive.yaml +31 -0
  250. package/bmad/bmm/workflows/document-project/workflows/full-scan-instructions.md +1106 -0
  251. package/bmad/bmm/workflows/document-project/workflows/full-scan.yaml +31 -0
  252. package/bmad/bmm/workflows/techdoc/documentation-standards.md +239 -0
  253. package/bmad/bmm/workflows/techdoc/documentation-standards.md.bak +238 -0
  254. package/bmad/bmm/workflows/testarch/atdd/atdd-checklist-template.md +363 -0
  255. package/bmad/bmm/workflows/testarch/atdd/checklist.md +373 -0
  256. package/bmad/bmm/workflows/testarch/atdd/instructions.md +785 -0
  257. package/bmad/bmm/workflows/testarch/atdd/workflow.yaml +52 -0
  258. package/bmad/bmm/workflows/testarch/automate/checklist.md +580 -0
  259. package/bmad/bmm/workflows/testarch/automate/instructions.md +1303 -0
  260. package/bmad/bmm/workflows/testarch/automate/workflow.yaml +61 -0
  261. package/bmad/bmm/workflows/testarch/ci/checklist.md +246 -0
  262. package/bmad/bmm/workflows/testarch/ci/github-actions-template.yaml +165 -0
  263. package/bmad/bmm/workflows/testarch/ci/gitlab-ci-template.yaml +128 -0
  264. package/bmad/bmm/workflows/testarch/ci/instructions.md +517 -0
  265. package/bmad/bmm/workflows/testarch/ci/workflow.yaml +53 -0
  266. package/bmad/bmm/workflows/testarch/framework/checklist.md +321 -0
  267. package/bmad/bmm/workflows/testarch/framework/instructions.md +455 -0
  268. package/bmad/bmm/workflows/testarch/framework/workflow.yaml +53 -0
  269. package/bmad/bmm/workflows/testarch/nfr-assess/checklist.md +405 -0
  270. package/bmad/bmm/workflows/testarch/nfr-assess/instructions.md +722 -0
  271. package/bmad/bmm/workflows/testarch/nfr-assess/nfr-report-template.md +443 -0
  272. package/bmad/bmm/workflows/testarch/nfr-assess/workflow.yaml +56 -0
  273. package/bmad/bmm/workflows/testarch/test-design/checklist.md +234 -0
  274. package/bmad/bmm/workflows/testarch/test-design/instructions.md +621 -0
  275. package/bmad/bmm/workflows/testarch/test-design/test-design-template.md +285 -0
  276. package/bmad/bmm/workflows/testarch/test-design/workflow.yaml +52 -0
  277. package/bmad/bmm/workflows/testarch/test-review/checklist.md +470 -0
  278. package/bmad/bmm/workflows/testarch/test-review/instructions.md +608 -0
  279. package/bmad/bmm/workflows/testarch/test-review/test-review-template.md +388 -0
  280. package/bmad/bmm/workflows/testarch/test-review/workflow.yaml +53 -0
  281. package/bmad/bmm/workflows/testarch/trace/checklist.md +654 -0
  282. package/bmad/bmm/workflows/testarch/trace/instructions.md +1045 -0
  283. package/bmad/bmm/workflows/testarch/trace/trace-template.md +673 -0
  284. package/bmad/bmm/workflows/testarch/trace/workflow.yaml +66 -0
  285. package/bmad/bmm/workflows/workflow-status/init/instructions.md +771 -0
  286. package/bmad/bmm/workflows/workflow-status/init/workflow.yaml +27 -0
  287. package/bmad/bmm/workflows/workflow-status/init/workflow.yaml.bak +27 -0
  288. package/bmad/bmm/workflows/workflow-status/instructions.md +386 -0
  289. package/bmad/bmm/workflows/workflow-status/paths/enterprise-brownfield.yaml +120 -0
  290. package/bmad/bmm/workflows/workflow-status/paths/enterprise-greenfield.yaml +108 -0
  291. package/bmad/bmm/workflows/workflow-status/paths/game-design.yaml +75 -0
  292. package/{src/modules/bmm/workflows/workflow-status/paths/brownfield-level-3.yaml → bmad/bmm/workflows/workflow-status/paths/method-brownfield.yaml} +33 -31
  293. package/{src/modules/bmm/workflows/workflow-status/paths/greenfield-level-2.yaml → bmad/bmm/workflows/workflow-status/paths/method-greenfield.yaml} +31 -21
  294. package/{src/modules/bmm/workflows/workflow-status/paths/brownfield-level-1.yaml → bmad/bmm/workflows/workflow-status/paths/quick-flow-brownfield.yaml} +18 -18
  295. package/{src/modules/bmm/workflows/workflow-status/paths/greenfield-level-1.yaml → bmad/bmm/workflows/workflow-status/paths/quick-flow-greenfield.yaml} +16 -18
  296. package/bmad/bmm/workflows/workflow-status/project-levels.yaml +59 -0
  297. package/bmad/bmm/workflows/workflow-status/sample-level-3-workflow.yaml +49 -0
  298. package/bmad/bmm/workflows/workflow-status/workflow-status-template.yaml +31 -0
  299. package/bmad/bmm/workflows/workflow-status/workflow.yaml +28 -0
  300. package/bmad/cis/README.md +153 -0
  301. package/bmad/cis/agents/README.md +104 -0
  302. package/bmad/cis/agents/brainstorming-coach.md +62 -0
  303. package/bmad/cis/agents/brainstorming-coach.md.bak +62 -0
  304. package/bmad/cis/agents/creative-problem-solver.md +62 -0
  305. package/bmad/cis/agents/creative-problem-solver.md.bak +62 -0
  306. package/bmad/cis/agents/design-thinking-coach.md +62 -0
  307. package/bmad/cis/agents/design-thinking-coach.md.bak +62 -0
  308. package/bmad/cis/agents/innovation-strategist.md +62 -0
  309. package/bmad/cis/agents/innovation-strategist.md.bak +62 -0
  310. package/bmad/cis/agents/storyteller.md +59 -0
  311. package/bmad/cis/agents/storyteller.md.bak +59 -0
  312. package/bmad/{bmd → cis}/config.yaml +3 -3
  313. package/bmad/cis/teams/creative-squad.yaml +6 -0
  314. package/bmad/cis/workflows/README.md +139 -0
  315. package/bmad/cis/workflows/design-thinking/README.md +56 -0
  316. package/bmad/cis/workflows/design-thinking/design-methods.csv +31 -0
  317. package/bmad/cis/workflows/design-thinking/instructions.md +200 -0
  318. package/bmad/cis/workflows/design-thinking/template.md +111 -0
  319. package/bmad/cis/workflows/design-thinking/workflow.yaml +32 -0
  320. package/bmad/cis/workflows/innovation-strategy/README.md +56 -0
  321. package/bmad/cis/workflows/innovation-strategy/innovation-frameworks.csv +31 -0
  322. package/bmad/cis/workflows/innovation-strategy/instructions.md +274 -0
  323. package/bmad/cis/workflows/innovation-strategy/template.md +189 -0
  324. package/bmad/cis/workflows/innovation-strategy/workflow.yaml +32 -0
  325. package/bmad/cis/workflows/problem-solving/README.md +56 -0
  326. package/bmad/cis/workflows/problem-solving/instructions.md +250 -0
  327. package/bmad/cis/workflows/problem-solving/solving-methods.csv +31 -0
  328. package/bmad/cis/workflows/problem-solving/template.md +165 -0
  329. package/bmad/cis/workflows/problem-solving/workflow.yaml +32 -0
  330. package/bmad/cis/workflows/storytelling/README.md +58 -0
  331. package/bmad/cis/workflows/storytelling/instructions.md +291 -0
  332. package/bmad/cis/workflows/storytelling/story-types.csv +26 -0
  333. package/bmad/cis/workflows/storytelling/template.md +113 -0
  334. package/bmad/cis/workflows/storytelling/workflow.yaml +32 -0
  335. package/bmad/core/agents/bmad-master.md.bak +71 -0
  336. package/bmad/core/config.yaml +2 -2
  337. package/bmad/core/tasks/workflow.xml +1 -19
  338. package/bmad/core/tools/shard-doc.xml +8 -43
  339. package/docs/document-sharding-guide.md +447 -0
  340. package/docs/index.md +37 -41
  341. package/package.json +1 -1
  342. package/src/core/tasks/workflow.xml +1 -11
  343. package/src/core/tools/shard-doc.xml +8 -43
  344. package/src/modules/bmb/workflows/audit-workflow/instructions.md +1 -1
  345. package/src/modules/bmb/workflows/create-workflow/workflow-creation-guide.md +158 -0
  346. package/src/modules/bmm/README.md +79 -95
  347. package/src/modules/bmm/agents/architect.agent.yaml +0 -4
  348. package/src/modules/bmm/agents/game-designer.agent.yaml +2 -2
  349. package/src/modules/bmm/agents/game-dev.agent.yaml +8 -12
  350. package/src/modules/bmm/agents/pm.agent.yaml +11 -1
  351. package/src/modules/bmm/agents/sm.agent.yaml +1 -1
  352. package/src/modules/bmm/agents/tech-writer.agent.yaml +69 -0
  353. package/src/modules/bmm/docs/README.md +235 -0
  354. package/src/modules/bmm/docs/agents-guide.md +1057 -0
  355. package/src/modules/bmm/docs/brownfield-guide.md +759 -0
  356. package/src/modules/bmm/docs/enterprise-agentic-development.md +680 -0
  357. package/src/modules/bmm/docs/faq.md +589 -0
  358. package/src/modules/bmm/docs/glossary.md +321 -0
  359. package/src/modules/bmm/docs/party-mode.md +224 -0
  360. package/src/modules/bmm/docs/quick-spec-flow.md +652 -0
  361. package/src/modules/bmm/docs/quick-start.md +366 -0
  362. package/src/modules/bmm/docs/scale-adaptive-system.md +599 -0
  363. package/src/modules/bmm/docs/troubleshooting.md +680 -0
  364. package/src/modules/bmm/docs/workflow-architecture-reference.md +371 -0
  365. package/src/modules/bmm/docs/workflow-document-project-reference.md +487 -0
  366. package/src/modules/bmm/docs/workflows-analysis.md +670 -0
  367. package/src/modules/bmm/docs/workflows-implementation.md +1758 -0
  368. package/src/modules/bmm/docs/workflows-planning.md +1086 -0
  369. package/src/modules/bmm/docs/workflows-solutioning.md +726 -0
  370. package/src/modules/bmm/tasks/daily-standup.xml +1 -1
  371. package/src/modules/bmm/workflows/1-analysis/domain-research/instructions.md +423 -0
  372. package/src/modules/bmm/workflows/1-analysis/domain-research/template.md +180 -0
  373. package/src/modules/bmm/workflows/1-analysis/domain-research/workflow.yaml +36 -0
  374. package/src/modules/bmm/workflows/1-analysis/product-brief/instructions.md +405 -213
  375. package/src/modules/bmm/workflows/1-analysis/product-brief/template.md +93 -77
  376. package/src/modules/bmm/workflows/1-analysis/product-brief/workflow.yaml +14 -0
  377. package/src/modules/bmm/workflows/1-analysis/research/checklist-deep-prompt.md +144 -0
  378. package/src/modules/bmm/workflows/1-analysis/research/checklist-technical.md +249 -0
  379. package/src/modules/bmm/workflows/1-analysis/research/checklist.md +154 -57
  380. package/src/modules/bmm/workflows/1-analysis/research/instructions-deep-prompt.md +45 -29
  381. package/src/modules/bmm/workflows/1-analysis/research/instructions-market.md +181 -104
  382. package/src/modules/bmm/workflows/1-analysis/research/instructions-router.md +24 -32
  383. package/src/modules/bmm/workflows/1-analysis/research/instructions-technical.md +94 -46
  384. package/src/modules/bmm/workflows/1-analysis/research/template-market.md +37 -1
  385. package/src/modules/bmm/workflows/1-analysis/research/template-technical.md +36 -1
  386. package/src/modules/bmm/workflows/1-analysis/research/workflow.yaml +13 -0
  387. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/instructions.md +1 -1
  388. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/workflow.yaml +22 -0
  389. package/src/modules/bmm/workflows/2-plan-workflows/gdd/instructions-gdd.md +18 -0
  390. package/src/modules/bmm/workflows/2-plan-workflows/gdd/workflow.yaml +14 -0
  391. package/src/modules/bmm/workflows/2-plan-workflows/prd/checklist.md +296 -63
  392. package/src/modules/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/epics-template.md +52 -0
  393. package/src/modules/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/instructions.md +169 -0
  394. package/src/modules/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/workflow.yaml +55 -0
  395. package/src/modules/bmm/workflows/2-plan-workflows/prd/domain-complexity.csv +13 -0
  396. package/src/modules/bmm/workflows/2-plan-workflows/prd/instructions.md +268 -291
  397. package/src/modules/bmm/workflows/2-plan-workflows/prd/prd-template.md +198 -23
  398. package/src/modules/bmm/workflows/2-plan-workflows/prd/project-types.csv +11 -0
  399. package/src/modules/bmm/workflows/2-plan-workflows/prd/workflow.yaml +26 -8
  400. package/src/modules/bmm/workflows/2-plan-workflows/tech-spec/checklist.md +138 -31
  401. package/src/modules/bmm/workflows/2-plan-workflows/tech-spec/epics-template.md +73 -4
  402. package/src/modules/bmm/workflows/2-plan-workflows/tech-spec/instructions-level0-story.md +50 -17
  403. package/src/modules/bmm/workflows/2-plan-workflows/tech-spec/instructions-level1-stories.md +199 -26
  404. package/src/modules/bmm/workflows/2-plan-workflows/tech-spec/instructions.md +971 -109
  405. package/src/modules/bmm/workflows/2-plan-workflows/tech-spec/tech-spec-template.md +132 -6
  406. package/src/modules/bmm/workflows/2-plan-workflows/tech-spec/user-story-template.md +54 -20
  407. package/src/modules/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml +23 -2
  408. package/src/modules/bmm/workflows/3-solutioning/architecture/architecture-template.md +1 -1
  409. package/src/modules/bmm/workflows/3-solutioning/architecture/instructions.md +40 -32
  410. package/src/modules/bmm/workflows/3-solutioning/architecture/workflow.yaml +17 -4
  411. package/src/modules/bmm/workflows/3-solutioning/solutioning-gate-check/instructions.md +1 -0
  412. package/src/modules/bmm/workflows/3-solutioning/solutioning-gate-check/workflow.yaml +32 -6
  413. package/src/modules/bmm/workflows/4-implementation/code-review/instructions.md +29 -0
  414. package/src/modules/bmm/workflows/4-implementation/code-review/workflow.yaml +20 -0
  415. package/src/modules/bmm/workflows/4-implementation/create-story/instructions.md +29 -0
  416. package/src/modules/bmm/workflows/4-implementation/create-story/workflow.yaml +27 -0
  417. package/src/modules/bmm/workflows/4-implementation/epic-tech-context/instructions.md +29 -0
  418. package/src/modules/bmm/workflows/4-implementation/epic-tech-context/workflow.yaml +32 -6
  419. package/src/modules/bmm/workflows/4-implementation/retrospective/instructions.md +1222 -241
  420. package/src/modules/bmm/workflows/4-implementation/retrospective/workflow.yaml +28 -0
  421. package/src/modules/bmm/workflows/4-implementation/sprint-planning/instructions.md +17 -0
  422. package/src/modules/bmm/workflows/4-implementation/sprint-planning/workflow.yaml +8 -0
  423. package/src/modules/bmm/workflows/4-implementation/story-context/instructions.md +31 -1
  424. package/src/modules/bmm/workflows/4-implementation/story-context/workflow.yaml +27 -0
  425. package/src/modules/bmm/workflows/techdoc/documentation-standards.md +239 -0
  426. package/src/modules/bmm/workflows/workflow-status/init/instructions.md +623 -242
  427. package/src/modules/bmm/workflows/workflow-status/paths/enterprise-brownfield.yaml +120 -0
  428. package/src/modules/bmm/workflows/workflow-status/paths/enterprise-greenfield.yaml +108 -0
  429. package/src/modules/bmm/workflows/workflow-status/paths/{brownfield-level-4.yaml → method-brownfield.yaml} +35 -26
  430. package/src/modules/bmm/workflows/workflow-status/paths/{greenfield-level-3.yaml → method-greenfield.yaml} +32 -17
  431. package/src/modules/bmm/workflows/workflow-status/paths/{brownfield-level-0.yaml → quick-flow-brownfield.yaml} +23 -19
  432. package/src/modules/bmm/workflows/workflow-status/paths/{greenfield-level-0.yaml → quick-flow-greenfield.yaml} +18 -16
  433. package/src/modules/bmm/workflows/workflow-status/workflow-status-template.yaml +4 -4
  434. package/tools/cli/commands/install.js +1 -1
  435. package/.claude/commands/bmad/bmd/agents/cli-chief.md +0 -108
  436. package/.claude/commands/bmad/bmd/agents/doc-keeper.md +0 -115
  437. package/.claude/commands/bmad/bmd/agents/release-chief.md +0 -109
  438. package/.claude/hooks/bmad-tts-injector.sh +0 -415
  439. package/.claude/hooks/bmad-voice-manager.sh +0 -511
  440. package/.claude/hooks/check-output-style.sh +0 -112
  441. package/.claude/hooks/download-extra-voices.sh +0 -244
  442. package/.claude/hooks/github-star-reminder.sh +0 -154
  443. package/.claude/hooks/language-manager.sh +0 -392
  444. package/.claude/hooks/learn-manager.sh +0 -475
  445. package/.claude/hooks/personality-manager.sh +0 -438
  446. package/.claude/hooks/piper-download-voices.sh +0 -165
  447. package/.claude/hooks/piper-installer.sh +0 -178
  448. package/.claude/hooks/piper-multispeaker-registry.sh +0 -165
  449. package/.claude/hooks/piper-voice-manager.sh +0 -293
  450. package/.claude/hooks/play-tts-elevenlabs.sh +0 -404
  451. package/.claude/hooks/play-tts-piper.sh +0 -338
  452. package/.claude/hooks/play-tts.sh +0 -100
  453. package/.claude/hooks/provider-commands.sh +0 -540
  454. package/.claude/hooks/provider-manager.sh +0 -298
  455. package/.claude/hooks/replay-target-audio.sh +0 -95
  456. package/.claude/hooks/sentiment-manager.sh +0 -201
  457. package/.claude/hooks/speed-manager.sh +0 -291
  458. package/.claude/hooks/voice-manager.sh +0 -594
  459. package/.claude/hooks/voices-config.sh +0 -70
  460. package/bmad/_cfg/agents/bmd-cli-chief.customize.yaml +0 -32
  461. package/bmad/bmb/workflows/create-agent/agent-architecture.md.bak +0 -412
  462. package/bmad/bmb/workflows/create-agent/agent-command-patterns.md.bak +0 -759
  463. package/bmad/bmb/workflows/create-module/README.md.bak +0 -218
  464. package/bmad/bmb/workflows/create-module/checklist.md.bak +0 -245
  465. package/bmad/bmb/workflows/create-module/installer-templates/installer.js.bak +0 -231
  466. package/bmad/bmb/workflows/create-module/instructions.md.bak +0 -521
  467. package/bmad/bmb/workflows/create-module/module-structure.md.bak +0 -310
  468. package/bmad/bmd/README.md +0 -193
  469. package/bmad/bmd/README.md.bak +0 -193
  470. package/bmad/bmd/agents/cli-chief-sidecar/instructions.md +0 -102
  471. package/bmad/bmd/agents/cli-chief-sidecar/instructions.md.bak +0 -102
  472. package/bmad/bmd/agents/cli-chief-sidecar/knowledge/README.md +0 -68
  473. package/bmad/bmd/agents/cli-chief-sidecar/knowledge/README.md.bak +0 -68
  474. package/bmad/bmd/agents/cli-chief-sidecar/knowledge/cli-reference.md +0 -123
  475. package/bmad/bmd/agents/cli-chief-sidecar/knowledge/cli-reference.md.bak +0 -123
  476. package/bmad/bmd/agents/cli-chief-sidecar/memories.md +0 -53
  477. package/bmad/bmd/agents/cli-chief-sidecar/memories.md.bak +0 -53
  478. package/bmad/bmd/agents/cli-chief.md +0 -108
  479. package/bmad/bmd/agents/cli-chief.md.bak +0 -108
  480. package/bmad/bmd/agents/doc-keeper-sidecar/instructions.md +0 -177
  481. package/bmad/bmd/agents/doc-keeper-sidecar/instructions.md.bak +0 -177
  482. package/bmad/bmd/agents/doc-keeper-sidecar/knowledge/README.md +0 -81
  483. package/bmad/bmd/agents/doc-keeper-sidecar/knowledge/README.md.bak +0 -81
  484. package/bmad/bmd/agents/doc-keeper-sidecar/memories.md +0 -88
  485. package/bmad/bmd/agents/doc-keeper-sidecar/memories.md.bak +0 -88
  486. package/bmad/bmd/agents/doc-keeper.md +0 -115
  487. package/bmad/bmd/agents/doc-keeper.md.bak +0 -115
  488. package/bmad/bmd/agents/release-chief-sidecar/instructions.md +0 -164
  489. package/bmad/bmd/agents/release-chief-sidecar/instructions.md.bak +0 -164
  490. package/bmad/bmd/agents/release-chief-sidecar/knowledge/README.md +0 -82
  491. package/bmad/bmd/agents/release-chief-sidecar/knowledge/README.md.bak +0 -82
  492. package/bmad/bmd/agents/release-chief-sidecar/memories.md +0 -73
  493. package/bmad/bmd/agents/release-chief-sidecar/memories.md.bak +0 -73
  494. package/bmad/bmd/agents/release-chief.md +0 -109
  495. package/bmad/bmd/agents/release-chief.md.bak +0 -109
  496. package/bmad/docs/codex-instructions.md +0 -21
  497. package/docs/bmad-brownfield-guide.md +0 -1260
  498. package/docs/conversion-report-shard-doc-2025-10-26.md +0 -188
  499. package/src/modules/bmm/tasks/retrospective.xml +0 -104
  500. package/src/modules/bmm/testarch/README.md +0 -311
  501. package/src/modules/bmm/workflows/1-analysis/brainstorm-game/README.md +0 -38
  502. package/src/modules/bmm/workflows/1-analysis/brainstorm-project/README.md +0 -113
  503. package/src/modules/bmm/workflows/1-analysis/game-brief/README.md +0 -221
  504. package/src/modules/bmm/workflows/1-analysis/product-brief/README.md +0 -180
  505. package/src/modules/bmm/workflows/1-analysis/research/README.md +0 -454
  506. package/src/modules/bmm/workflows/1-analysis/research/claude-code/sub-agents/bmm-competitor-analyzer.md +0 -259
  507. package/src/modules/bmm/workflows/1-analysis/research/claude-code/sub-agents/bmm-data-analyst.md +0 -190
  508. package/src/modules/bmm/workflows/1-analysis/research/claude-code/sub-agents/bmm-market-researcher.md +0 -337
  509. package/src/modules/bmm/workflows/1-analysis/research/claude-code/sub-agents/bmm-trend-spotter.md +0 -107
  510. package/src/modules/bmm/workflows/1-analysis/research/claude-code/sub-agents/bmm-user-researcher.md +0 -329
  511. package/src/modules/bmm/workflows/2-plan-workflows/README.md +0 -258
  512. package/src/modules/bmm/workflows/2-plan-workflows/gdd/README.md +0 -222
  513. package/src/modules/bmm/workflows/3-solutioning/README.md +0 -1
  514. package/src/modules/bmm/workflows/3-solutioning/solutioning-gate-check/README.md +0 -177
  515. package/src/modules/bmm/workflows/4-implementation/README.md +0 -221
  516. package/src/modules/bmm/workflows/4-implementation/code-review/README.md +0 -69
  517. package/src/modules/bmm/workflows/4-implementation/correct-course/README.md +0 -73
  518. package/src/modules/bmm/workflows/4-implementation/create-story/README.md +0 -146
  519. package/src/modules/bmm/workflows/4-implementation/dev-story/README.md +0 -206
  520. package/src/modules/bmm/workflows/4-implementation/epic-tech-context/README.md +0 -195
  521. package/src/modules/bmm/workflows/4-implementation/retrospective/README.md +0 -77
  522. package/src/modules/bmm/workflows/4-implementation/sprint-planning/README.md +0 -156
  523. package/src/modules/bmm/workflows/4-implementation/story-context/README.md +0 -234
  524. package/src/modules/bmm/workflows/README.md +0 -215
  525. package/src/modules/bmm/workflows/document-project/templates/README.md +0 -38
  526. package/src/modules/bmm/workflows/testarch/README.md +0 -26
  527. package/src/modules/bmm/workflows/testarch/atdd/README.md +0 -672
  528. package/src/modules/bmm/workflows/testarch/automate/README.md +0 -869
  529. package/src/modules/bmm/workflows/testarch/ci/README.md +0 -493
  530. package/src/modules/bmm/workflows/testarch/framework/README.md +0 -340
  531. package/src/modules/bmm/workflows/testarch/nfr-assess/README.md +0 -469
  532. package/src/modules/bmm/workflows/testarch/test-design/README.md +0 -493
  533. package/src/modules/bmm/workflows/testarch/test-review/README.md +0 -775
  534. package/src/modules/bmm/workflows/testarch/trace/README.md +0 -802
  535. package/src/modules/bmm/workflows/workflow-status/README.md +0 -260
  536. package/src/modules/bmm/workflows/workflow-status/paths/brownfield-level-2.yaml +0 -76
  537. package/src/modules/bmm/workflows/workflow-status/paths/greenfield-level-4.yaml +0 -75
  538. /package/bmad/_cfg/agents/{bmd-doc-keeper.customize.yaml → bmm-analyst.customize.yaml} +0 -0
  539. /package/bmad/_cfg/agents/{bmd-release-chief.customize.yaml → bmm-architect.customize.yaml} +0 -0
  540. /package/{src/modules/bmm/workflows/2-plan-workflows/prd → bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories}/epics-template.md +0 -0
@@ -1,31 +1,67 @@
1
- # PRD Workflow - Small Projects (Level 0-1)
1
+ # Tech-Spec Workflow - Context-Aware Technical Planning (Level 0-1)
2
2
 
3
3
  <workflow>
4
4
 
5
- <critical>The workflow execution engine is governed by: {project_root}/bmad/core/tasks/workflow.xml</critical>
5
+ <critical>The workflow execution engine is governed by: {project-root}/bmad/core/tasks/workflow.xml</critical>
6
6
  <critical>You MUST have already loaded and processed: {installed_path}/workflow.yaml</critical>
7
7
  <critical>Communicate all responses in {communication_language} and language MUST be tailored to {user_skill_level}</critical>
8
8
  <critical>Generate all documents in {document_output_language}</critical>
9
- <critical>This is the SMALL instruction set for Level 0-1 projects - tech-spec with story generation</critical>
9
+ <critical>This is for Level 0-1 projects - tech-spec with context-rich story generation</critical>
10
10
  <critical>Level 0: tech-spec + single user story | Level 1: tech-spec + epic/stories</critical>
11
- <critical>Project analysis already completed - proceeding directly to technical specification</critical>
12
- <critical>NO PRD generated - uses tech_spec_template + story templates</critical>
13
-
11
+ <critical>LIVING DOCUMENT: Write to tech-spec.md continuously as you discover - never wait until the end</critical>
12
+ <critical>CONTEXT IS KING: Gather ALL available context before generating specs</critical>
14
13
  <critical>DOCUMENT OUTPUT: Technical, precise, definitive. Specific versions only. User skill level ({user_skill_level}) affects conversation style ONLY, not document content.</critical>
14
+ <critical>Input documents specified in workflow.yaml input_file_patterns - workflow engine handles fuzzy matching, whole vs sharded document discovery automatically</critical>
15
15
 
16
- <step n="0" goal="Validate workflow readiness" tag="workflow-status">
16
+ <step n="0" goal="Validate workflow readiness and detect project level" tag="workflow-status">
17
17
  <action>Check if {output_folder}/bmm-workflow-status.yaml exists</action>
18
18
 
19
19
  <check if="status file not found">
20
20
  <output>No workflow status file found. Tech-spec workflow can run standalone or as part of BMM workflow path.</output>
21
21
  <output>**Recommended:** Run `workflow-init` first for project context tracking and workflow sequencing.</output>
22
+ <output>**Quick Start:** Continue in standalone mode - perfect for rapid prototyping and quick changes!</output>
22
23
  <ask>Continue in standalone mode or exit to run workflow-init? (continue/exit)</ask>
23
24
  <check if="continue">
24
25
  <action>Set standalone_mode = true</action>
25
- </check>
26
- <check if="exit">
27
- <action>Exit workflow</action>
28
- </check>
26
+
27
+ <output>Great! Let's quickly configure your project...</output>
28
+
29
+ <ask>What level is this project?
30
+
31
+ **Level 0** - Single atomic change (bug fix, small isolated feature, single file change)
32
+ → Generates: 1 tech-spec + 1 story
33
+ → Example: "Fix login validation bug" or "Add email field to user form"
34
+
35
+ **Level 1** - Coherent feature (multiple related changes, small feature set)
36
+ → Generates: 1 tech-spec + 1 epic + 2-3 stories
37
+ → Example: "Add OAuth integration" or "Build user profile page"
38
+
39
+ Enter **0** or **1**:</ask>
40
+
41
+ <action>Capture user response as project_level (0 or 1)</action>
42
+ <action>Validate: If not 0 or 1, ask again</action>
43
+
44
+ <ask>Is this a **greenfield** (new/empty codebase) or **brownfield** (existing codebase) project?
45
+
46
+ **Greenfield** - Starting fresh, no existing code
47
+ **Brownfield** - Adding to or modifying existing code
48
+
49
+ Enter **greenfield** or **brownfield**:</ask>
50
+
51
+ <action>Capture user response as field_type (greenfield or brownfield)</action>
52
+ <action>Validate: If not greenfield or brownfield, ask again</action>
53
+
54
+ <output>Perfect! Running as:
55
+
56
+ - **Project Level:** {{project_level}}
57
+ - **Field Type:** {{field_type}}
58
+ - **Mode:** Standalone (no status file tracking)
59
+
60
+ Let's build your tech-spec!</output>
61
+ </check>
62
+ <check if="exit">
63
+ <action>Exit workflow</action>
64
+ </check>
29
65
  </check>
30
66
 
31
67
  <check if="status file found">
@@ -33,6 +69,7 @@
33
69
  <action>Parse workflow_status section</action>
34
70
  <action>Check status of "tech-spec" workflow</action>
35
71
  <action>Get project_level from YAML metadata</action>
72
+ <action>Get field_type from YAML metadata (greenfield or brownfield)</action>
36
73
  <action>Find first non-completed workflow (next expected workflow)</action>
37
74
 
38
75
  <check if="project_level >= 2">
@@ -40,7 +77,7 @@
40
77
 
41
78
  Tech-spec is for Level 0-1 projects. Level 2-4 should use PRD workflow.
42
79
 
43
- **Correct workflow:** `prd` (PM agent)
80
+ **Correct workflow:** `create-prd` (PM agent)
44
81
  </output>
45
82
  <action>Exit and redirect to prd</action>
46
83
  </check>
@@ -67,185 +104,1010 @@ Tech-spec is for Level 0-1 projects. Level 2-4 should use PRD workflow.
67
104
  </check>
68
105
  </step>
69
106
 
70
- <step n="1" goal="Confirm project scope and update tracking">
107
+ <step n="1" goal="Comprehensive context discovery - gather everything available">
71
108
 
72
- <action>Use {{project_level}} from status data</action>
109
+ <action>Welcome {user_name} warmly and explain what we're about to do:
73
110
 
74
- <action>Update Workflow Status:</action>
75
- <template-output file="{{status_file_path}}">current_workflow</template-output>
76
- <check if="project_level == 0">
77
- <action>Set to: "tech-spec (Level 0 - generating tech spec)"</action>
111
+ "I'm going to gather all available context about your project before we dive into the technical spec. This includes:
112
+
113
+ - Any existing documentation (product briefs, research)
114
+ - Brownfield codebase analysis (if applicable)
115
+ - Your project's tech stack and dependencies
116
+ - Existing code patterns and structure
117
+
118
+ This ensures the tech-spec is grounded in reality and gives developers everything they need."
119
+ </action>
120
+
121
+ <action>**PHASE 1: Load Existing Documents**
122
+
123
+ Search for and load (using dual-strategy: whole first, then sharded):
124
+
125
+ 1. **Product Brief:**
126
+ - Search pattern: {output*folder}/\_brief*.md
127
+ - Sharded: {output*folder}/\_brief*/index.md
128
+ - If found: Load completely and extract key context
129
+
130
+ 2. **Research Documents:**
131
+ - Search pattern: {output*folder}/\_research*.md
132
+ - Sharded: {output*folder}/\_research*/index.md
133
+ - If found: Load completely and extract insights
134
+
135
+ 3. **Document-Project Output (CRITICAL for brownfield):**
136
+ - Always check: {output_folder}/docs/index.md
137
+ - If found: This is the brownfield codebase map - load ALL shards!
138
+ - Extract: File structure, key modules, existing patterns, naming conventions
139
+
140
+ Create a summary of what was found:
141
+
142
+ - List of loaded documents
143
+ - Key insights from each
144
+ - Brownfield vs greenfield determination
145
+ </action>
146
+
147
+ <action>**PHASE 2: Detect Project Type from Setup Files**
148
+
149
+ Search for project setup files in {project-root}:
150
+
151
+ **Node.js/JavaScript:**
152
+
153
+ - package.json → Parse for framework, dependencies, scripts
154
+
155
+ **Python:**
156
+
157
+ - requirements.txt → Parse for packages
158
+ - pyproject.toml → Parse for modern Python projects
159
+ - Pipfile → Parse for pipenv projects
160
+
161
+ **Ruby:**
162
+
163
+ - Gemfile → Parse for gems and versions
164
+
165
+ **Java:**
166
+
167
+ - pom.xml → Parse for Maven dependencies
168
+ - build.gradle → Parse for Gradle dependencies
169
+
170
+ **Go:**
171
+
172
+ - go.mod → Parse for modules
173
+
174
+ **Rust:**
175
+
176
+ - Cargo.toml → Parse for crates
177
+
178
+ **PHP:**
179
+
180
+ - composer.json → Parse for packages
181
+
182
+ If setup file found, extract:
183
+
184
+ 1. Framework name and EXACT version (e.g., "React 18.2.0", "Django 4.2.1")
185
+ 2. All production dependencies with versions
186
+ 3. Dev dependencies and tools (TypeScript, Jest, ESLint, pytest, etc.)
187
+ 4. Available scripts (npm run test, npm run build, etc.)
188
+ 5. Project type indicators (is it an API? Web app? CLI tool?)
189
+ 6. **Test framework** (Jest, pytest, RSpec, JUnit, Mocha, etc.)
190
+
191
+ **Check for Outdated Dependencies:**
192
+ <check if="major framework version > 2 years old">
193
+ <action>Use WebSearch to find current recommended version</action>
194
+ <example>
195
+ If package.json shows "react": "16.14.0" (from 2020):
196
+ <WebSearch query="React latest stable version 2025 migration guide" />
197
+ Note both current version AND migration complexity in stack summary
198
+ </example>
78
199
  </check>
79
- <check if="project_level == 1">
80
- <action>Set to: "tech-spec (Level 1 - generating tech spec)"</action>
200
+
201
+ **For Greenfield Projects:**
202
+ <check if="field_type == greenfield">
203
+ <action>Use WebSearch for current best practices AND starter templates</action>
204
+ <example>
205
+ <WebSearch query="{detected_framework} best practices {current_year}" />
206
+ <WebSearch query="{detected_framework} recommended packages {current_year}" />
207
+ <WebSearch query="{detected_framework} official starter template {current_year}" />
208
+ <WebSearch query="{project_type} {detected_framework} boilerplate {current_year}" />
209
+ </example>
210
+
211
+ **RECOMMEND STARTER TEMPLATES:**
212
+ Look for official or well-maintained starter templates:
213
+
214
+ - React: Create React App, Vite, Next.js starter
215
+ - Vue: create-vue, Nuxt starter
216
+ - Python: cookiecutter templates, FastAPI template
217
+ - Node.js: express-generator, NestJS CLI
218
+ - Ruby: Rails new, Sinatra template
219
+ - Go: go-blueprint, standard project layout
220
+
221
+ Benefits of starters:
222
+
223
+ - ✅ Modern best practices baked in
224
+ - ✅ Proper project structure
225
+ - ✅ Build tooling configured
226
+ - ✅ Testing framework set up
227
+ - ✅ Linting/formatting included
228
+ - ✅ Faster time to first feature
229
+
230
+ **Present recommendations to user:**
231
+ "I found these starter templates for {{framework}}:
232
+
233
+ 1. {{official_template}} - Official, well-maintained
234
+ 2. {{community_template}} - Popular community template
235
+
236
+ These provide {{benefits}}. Would you like to use one? (yes/no/show-me-more)"
237
+
238
+ <action>Capture user preference on starter template</action>
239
+ <action>If yes, include starter setup in implementation stack</action>
240
+ </check>
241
+
242
+ Store this as {{project_stack_summary}}
243
+ </action>
244
+
245
+ <action>**PHASE 3: Brownfield Codebase Reconnaissance** (if applicable)
246
+
247
+ <check if="field_type == brownfield OR document-project output found">
248
+
249
+ Analyze the existing project structure:
250
+
251
+ 1. **Directory Structure:**
252
+ - Identify main code directories (src/, lib/, app/, components/, services/)
253
+ - Note organization patterns (feature-based, layer-based, domain-driven)
254
+ - Identify test directories and patterns
255
+
256
+ 2. **Code Patterns:**
257
+ - Look for dominant patterns (class-based, functional, MVC, microservices)
258
+ - Identify naming conventions (camelCase, snake_case, PascalCase)
259
+ - Note file organization patterns
260
+
261
+ 3. **Key Modules/Services:**
262
+ - Identify major modules or services already in place
263
+ - Note entry points (main.js, app.py, index.ts)
264
+ - Document important utilities or shared code
265
+
266
+ 4. **Testing Patterns & Standards (CRITICAL):**
267
+ - Identify test framework in use (from package.json/requirements.txt)
268
+ - Note test file naming patterns (.test.js, \_test.py, .spec.ts, Test.java)
269
+ - Document test organization (tests/, **tests**, spec/, test/)
270
+ - Look for test configuration files (jest.config.js, pytest.ini, .rspec)
271
+ - Check for coverage requirements (in CI config, test scripts)
272
+ - Identify mocking/stubbing libraries (jest.mock, unittest.mock, sinon)
273
+ - Note assertion styles (expect, assert, should)
274
+
275
+ 5. **Code Style & Conventions (MUST CONFORM):**
276
+ - Check for linter config (.eslintrc, .pylintrc, rubocop.yml)
277
+ - Check for formatter config (.prettierrc, .black, .editorconfig)
278
+ - Identify code style:
279
+ - Semicolons: yes/no (JavaScript/TypeScript)
280
+ - Quotes: single/double
281
+ - Indentation: spaces/tabs, size
282
+ - Line length limits
283
+ - Import/export patterns (named vs default, organization)
284
+ - Error handling patterns (try/catch, Result types, error classes)
285
+ - Logging patterns (console, winston, logging module, specific formats)
286
+ - Documentation style (JSDoc, docstrings, YARD, JavaDoc)
287
+
288
+ Store this as {{existing_structure_summary}}
289
+
290
+ **CRITICAL: Confirm Conventions with User**
291
+ <ask>I've detected these conventions in your codebase:
292
+
293
+ **Code Style:**
294
+ {{detected_code_style}}
295
+
296
+ **Test Patterns:**
297
+ {{detected_test_patterns}}
298
+
299
+ **File Organization:**
300
+ {{detected_file_organization}}
301
+
302
+ Should I follow these existing conventions for the new code?
303
+
304
+ Enter **yes** to conform to existing patterns, or **no** if you want to establish new standards:</ask>
305
+
306
+ <action>Capture user response as conform_to_conventions (yes/no)</action>
307
+
308
+ <check if="conform_to_conventions == no">
309
+ <ask>What conventions would you like to use instead? (Or should I suggest modern best practices?)</ask>
310
+ <action>Capture new conventions or use WebSearch for current best practices</action>
81
311
  </check>
82
312
 
83
- <template-output file="{{status_file_path}}">progress_percentage</template-output>
84
- <action>Set to: 20%</action>
313
+ <action>Store confirmed conventions as {{existing_conventions}}</action>
314
+
315
+ </check>
316
+
317
+ <check if="field_type == greenfield">
318
+ <action>Note: Greenfield project - no existing code to analyze</action>
319
+ <action>Set {{existing_structure_summary}} = "Greenfield project - new codebase"</action>
320
+ </check>
85
321
 
86
- <action>Save {{status_file_path}}</action>
322
+ </action>
323
+
324
+ <action>**PHASE 4: Synthesize Context Summary**
325
+
326
+ Create {{loaded_documents_summary}} that includes:
327
+
328
+ - Documents found and loaded
329
+ - Brownfield vs greenfield status
330
+ - Tech stack detected (or "To be determined" if greenfield)
331
+ - Existing patterns identified (or "None - greenfield" if applicable)
332
+
333
+ Present this summary to {user_name} conversationally:
334
+
335
+ "Here's what I found about your project:
336
+
337
+ **Documents Available:**
338
+ [List what was found]
339
+
340
+ **Project Type:**
341
+ [Brownfield with X framework Y version OR Greenfield - new project]
342
+
343
+ **Existing Stack:**
344
+ [Framework and dependencies OR "To be determined"]
345
+
346
+ **Code Structure:**
347
+ [Existing patterns OR "New codebase"]
348
+
349
+ This gives me a solid foundation for creating a context-rich tech spec!"
350
+ </action>
351
+
352
+ <template-output>loaded_documents_summary</template-output>
353
+ <template-output>project_stack_summary</template-output>
354
+ <template-output>existing_structure_summary</template-output>
355
+
356
+ </step>
357
+
358
+ <step n="2" goal="Conversational discovery of the change/feature">
359
+
360
+ <action>Now engage in natural conversation to understand what needs to be built.
361
+
362
+ Adapt questioning based on project_level:
363
+ </action>
87
364
 
88
365
  <check if="project_level == 0">
89
- <action>Confirm Level 0 - Single atomic change</action>
90
- <ask>Please describe the specific change/fix you need to implement:</ask>
366
+ <action>**Level 0: Atomic Change Discovery**
367
+
368
+ Engage warmly and get specific details:
369
+
370
+ "Let's talk about this change. I need to understand it deeply so the tech-spec gives developers everything they need."
371
+
372
+ **Core Questions (adapt naturally, don't interrogate):**
373
+
374
+ 1. "What problem are you solving?"
375
+ - Listen for: Bug fix, missing feature, technical debt, improvement
376
+ - Capture as {{change_type}}
377
+
378
+ 2. "Where in the codebase should this live?"
379
+ - If brownfield: "I see you have [existing modules]. Does this fit in any of those?"
380
+ - If greenfield: "Let's figure out the right structure for this."
381
+ - Capture affected areas
382
+
383
+ 3. <check if="brownfield">
384
+ "Are there existing patterns or similar code I should follow?"
385
+ - Look for consistency requirements
386
+ - Identify reference implementations
387
+ </check>
388
+
389
+ 4. "What's the expected behavior after this change?"
390
+ - Get specific success criteria
391
+ - Understand edge cases
392
+
393
+ 5. "Any constraints or gotchas I should know about?"
394
+ - Technical limitations
395
+ - Dependencies on other systems
396
+ - Performance requirements
397
+
398
+ **Discovery Goals:**
399
+
400
+ - Understand the WHY (problem)
401
+ - Understand the WHAT (solution)
402
+ - Understand the WHERE (location in code)
403
+ - Understand the HOW (approach and patterns)
404
+
405
+ Synthesize into clear problem statement and solution overview.
406
+ </action>
91
407
  </check>
92
408
 
93
409
  <check if="project_level == 1">
94
- <action>Confirm Level 1 - Coherent feature</action>
95
- <ask>Please describe the feature you need to implement:</ask>
410
+ <action>**Level 1: Feature Discovery**
411
+
412
+ Engage in deeper feature exploration:
413
+
414
+ "This is a Level 1 feature - coherent but focused. Let's explore what you're building."
415
+
416
+ **Core Questions (natural conversation):**
417
+
418
+ 1. "What user need are you addressing?"
419
+ - Get to the core value
420
+ - Understand the user's pain point
421
+
422
+ 2. "How should this integrate with existing code?"
423
+ - If brownfield: "I saw [existing features]. How does this relate?"
424
+ - Identify integration points
425
+ - Note dependencies
426
+
427
+ 3. <check if="brownfield AND similar features exist">
428
+ "Can you point me to similar features I can reference for patterns?"
429
+ - Get example implementations
430
+ - Understand established patterns
431
+ </check>
432
+
433
+ 4. "What's IN scope vs OUT of scope for this feature?"
434
+ - Define clear boundaries
435
+ - Identify MVP vs future enhancements
436
+ - Keep it focused (remind: Level 1 = 2-3 stories max)
437
+
438
+ 5. "Are there dependencies on other systems or services?"
439
+ - External APIs
440
+ - Databases
441
+ - Third-party libraries
442
+
443
+ 6. "What does success look like?"
444
+ - Measurable outcomes
445
+ - User-facing impact
446
+ - Technical validation
447
+
448
+ **Discovery Goals:**
449
+
450
+ - Feature purpose and value
451
+ - Integration strategy
452
+ - Scope boundaries
453
+ - Success criteria
454
+ - Dependencies
455
+
456
+ Synthesize into comprehensive feature description.
457
+ </action>
96
458
  </check>
97
459
 
460
+ <template-output>problem_statement</template-output>
461
+ <template-output>solution_overview</template-output>
462
+ <template-output>change_type</template-output>
463
+ <template-output>scope_in</template-output>
464
+ <template-output>scope_out</template-output>
465
+
98
466
  </step>
99
467
 
100
- <step n="2" goal="Generate DEFINITIVE tech spec">
468
+ <step n="3" goal="Generate context-aware, definitive technical specification">
101
469
 
102
- <critical>Generate tech-spec.md - this is the TECHNICAL SOURCE OF TRUTH</critical>
103
470
  <critical>ALL TECHNICAL DECISIONS MUST BE DEFINITIVE - NO AMBIGUITY ALLOWED</critical>
471
+ <critical>Use existing stack info to make SPECIFIC decisions</critical>
472
+ <critical>Reference brownfield code to guide implementation</critical>
473
+
474
+ <action>Initialize tech-spec.md with the rich template</action>
475
+
476
+ <action>**Generate Context Section (already captured):**
477
+
478
+ These template variables are already populated from Step 1:
479
+
480
+ - {{loaded_documents_summary}}
481
+ - {{project_stack_summary}}
482
+ - {{existing_structure_summary}}
483
+
484
+ Just save them to the file.
485
+ </action>
486
+
487
+ <template-output file="tech-spec.md">loaded_documents_summary</template-output>
488
+ <template-output file="tech-spec.md">project_stack_summary</template-output>
489
+ <template-output file="tech-spec.md">existing_structure_summary</template-output>
490
+
491
+ <action>**Generate The Change Section:**
492
+
493
+ Already captured from Step 2:
494
+
495
+ - {{problem_statement}}
496
+ - {{solution_overview}}
497
+ - {{scope_in}}
498
+ - {{scope_out}}
499
+
500
+ Save to file.
501
+ </action>
502
+
503
+ <template-output file="tech-spec.md">problem_statement</template-output>
504
+ <template-output file="tech-spec.md">solution_overview</template-output>
505
+ <template-output file="tech-spec.md">scope_in</template-output>
506
+ <template-output file="tech-spec.md">scope_out</template-output>
507
+
508
+ <action>**Generate Implementation Details:**
509
+
510
+ Now make DEFINITIVE technical decisions using all the context gathered.
511
+
512
+ **Source Tree Changes - BE SPECIFIC:**
104
513
 
105
- <action>Update progress:</action>
106
- <template-output file="{{status_file_path}}">progress_percentage</template-output>
107
- <action>Set to: 40%</action>
108
- <action>Save {{status_file_path}}</action>
514
+ Bad (NEVER do this):
109
515
 
110
- <action>Initialize and write out tech-spec.md using tech_spec_template</action>
516
+ - "Update some files in the services folder"
517
+ - "Add tests somewhere"
111
518
 
112
- <critical>DEFINITIVE DECISIONS REQUIRED:</critical>
519
+ Good (ALWAYS do this):
113
520
 
114
- **BAD Examples (NEVER DO THIS):**
521
+ - "src/services/UserService.ts - MODIFY - Add validateEmail() method at line 45"
522
+ - "src/routes/api/users.ts - MODIFY - Add POST /users/validate endpoint"
523
+ - "tests/services/UserService.test.ts - CREATE - Test suite for email validation"
115
524
 
116
- - "Python 2 or 3" ❌
117
- - "Use a logger like pino or winston" ❌
525
+ Include:
118
526
 
119
- **GOOD Examples (ALWAYS DO THIS):**
527
+ - Exact file paths
528
+ - Action: CREATE, MODIFY, DELETE
529
+ - Specific what changes (methods, classes, endpoints, components)
120
530
 
121
- - "Python 3.11" ✅
122
- - "winston v3.8.2 for logging" ✅
531
+ **Use brownfield context:**
123
532
 
124
- **Source Tree Structure**: EXACT file changes needed
125
- <template-output file="tech-spec.md">source_tree</template-output>
533
+ - If modifying existing files, reference current structure
534
+ - Follow existing naming patterns
535
+ - Place new code logically based on current organization
536
+ </action>
537
+
538
+ <template-output file="tech-spec.md">source_tree_changes</template-output>
539
+
540
+ <action>**Technical Approach - BE DEFINITIVE:**
541
+
542
+ Bad (ambiguous):
543
+
544
+ - "Use a logging library like winston or pino"
545
+ - "Use Python 2 or 3"
546
+ - "Set up some kind of validation"
547
+
548
+ Good (definitive):
549
+
550
+ - "Use winston v3.8.2 (already in package.json) for logging"
551
+ - "Implement using Python 3.11 as specified in pyproject.toml"
552
+ - "Use Joi v17.9.0 for request validation following pattern in UserController.ts"
553
+
554
+ **Use detected stack:**
555
+
556
+ - Reference exact versions from package.json/requirements.txt
557
+ - Specify frameworks already in use
558
+ - Make decisions based on what's already there
559
+
560
+ **For greenfield:**
561
+
562
+ - Make definitive choices and justify them
563
+ - Specify exact versions
564
+ - No "or" statements allowed
565
+ </action>
126
566
 
127
- **Technical Approach**: SPECIFIC implementation for the change
128
567
  <template-output file="tech-spec.md">technical_approach</template-output>
129
568
 
130
- **Implementation Stack**: DEFINITIVE tools and versions
569
+ <action>**Existing Patterns to Follow:**
570
+
571
+ <check if="brownfield">
572
+ Document patterns from the existing codebase:
573
+ - Class structure patterns
574
+ - Function naming conventions
575
+ - Error handling approach
576
+ - Testing patterns
577
+ - Documentation style
578
+
579
+ Example:
580
+ "Follow the service pattern established in UserService.ts:
581
+
582
+ - Export class with constructor injection
583
+ - Use async/await for all asynchronous operations
584
+ - Throw ServiceError with error codes
585
+ - Include JSDoc comments for all public methods"
586
+ </check>
587
+
588
+ <check if="greenfield">
589
+ "Greenfield project - establishing new patterns:
590
+ - [Define the patterns to establish]"
591
+ </check>
592
+
593
+ </action>
594
+
595
+ <template-output file="tech-spec.md">existing_patterns</template-output>
596
+
597
+ <action>**Integration Points:**
598
+
599
+ Identify how this change connects:
600
+
601
+ - Internal modules it depends on
602
+ - External APIs or services
603
+ - Database interactions
604
+ - Event emitters/listeners
605
+ - State management
606
+
607
+ Be specific about interfaces and contracts.
608
+ </action>
609
+
610
+ <template-output file="tech-spec.md">integration_points</template-output>
611
+
612
+ <action>**Development Context:**
613
+
614
+ **Relevant Existing Code:**
615
+ <check if="brownfield">
616
+ Reference specific files or code sections developers should review:
617
+
618
+ - "See UserService.ts lines 120-150 for similar validation pattern"
619
+ - "Reference AuthMiddleware.ts for authentication approach"
620
+ - "Follow error handling in PaymentService.ts"
621
+ </check>
622
+
623
+ **Framework/Libraries:**
624
+ List with EXACT versions from detected stack:
625
+
626
+ - Express 4.18.2 (web framework)
627
+ - winston 3.8.2 (logging)
628
+ - Joi 17.9.0 (validation)
629
+ - TypeScript 5.1.6 (language)
630
+
631
+ **Internal Modules:**
632
+ List internal dependencies:
633
+
634
+ - @/services/UserService
635
+ - @/middleware/auth
636
+ - @/utils/validation
637
+
638
+ **Configuration Changes:**
639
+ Any config files to update:
640
+
641
+ - Update .env with new SMTP settings
642
+ - Add validation schema to config/schemas.ts
643
+ - Update package.json scripts if needed
644
+ </action>
645
+
646
+ <template-output file="tech-spec.md">existing_code_references</template-output>
647
+ <template-output file="tech-spec.md">framework_dependencies</template-output>
648
+ <template-output file="tech-spec.md">internal_dependencies</template-output>
649
+ <template-output file="tech-spec.md">configuration_changes</template-output>
650
+
651
+ <check if="field_type == brownfield">
652
+ <template-output file="tech-spec.md">existing_conventions</template-output>
653
+ </check>
654
+
655
+ <check if="field_type == greenfield">
656
+ <action>Set {{existing_conventions}} = "Greenfield project - establishing new conventions per modern best practices"</action>
657
+ <template-output file="tech-spec.md">existing_conventions</template-output>
658
+ </check>
659
+
660
+ <action>**Implementation Stack:**
661
+
662
+ Comprehensive stack with versions:
663
+
664
+ - Runtime: Node.js 20.x
665
+ - Framework: Express 4.18.2
666
+ - Language: TypeScript 5.1.6
667
+ - Testing: Jest 29.5.0
668
+ - Linting: ESLint 8.42.0
669
+ - Validation: Joi 17.9.0
670
+
671
+ All from detected project setup!
672
+ </action>
673
+
131
674
  <template-output file="tech-spec.md">implementation_stack</template-output>
132
675
 
133
- **Technical Details**: PRECISE change details
676
+ <action>**Technical Details:**
677
+
678
+ Deep technical specifics:
679
+
680
+ - Algorithms to implement
681
+ - Data structures to use
682
+ - Performance considerations
683
+ - Security considerations
684
+ - Error scenarios and handling
685
+ - Edge cases
686
+
687
+ Be thorough - developers need details!
688
+ </action>
689
+
134
690
  <template-output file="tech-spec.md">technical_details</template-output>
135
691
 
136
- **Testing Approach**: How to verify the change
692
+ <action>**Development Setup:**
693
+
694
+ What does a developer need to run this locally?
695
+
696
+ Based on detected stack and scripts:
697
+
698
+ ```
699
+ 1. Clone repo (if not already)
700
+ 2. npm install (installs all deps from package.json)
701
+ 3. cp .env.example .env (configure environment)
702
+ 4. npm run dev (starts development server)
703
+ 5. npm test (runs test suite)
704
+ ```
705
+
706
+ Or for Python:
707
+
708
+ ```
709
+ 1. python -m venv venv
710
+ 2. source venv/bin/activate
711
+ 3. pip install -r requirements.txt
712
+ 4. python manage.py runserver
713
+ ```
714
+
715
+ Use the actual scripts from package.json/setup files!
716
+ </action>
717
+
718
+ <template-output file="tech-spec.md">development_setup</template-output>
719
+
720
+ <action>**Implementation Guide:**
721
+
722
+ **Setup Steps:**
723
+ Pre-implementation checklist:
724
+
725
+ - Create feature branch
726
+ - Verify dev environment running
727
+ - Review existing code references
728
+ - Set up test data if needed
729
+
730
+ **Implementation Steps:**
731
+ Step-by-step breakdown:
732
+
733
+ For Level 0:
734
+
735
+ 1. [Step 1 with specific file and action]
736
+ 2. [Step 2 with specific file and action]
737
+ 3. [Write tests]
738
+ 4. [Verify acceptance criteria]
739
+
740
+ For Level 1:
741
+ Organize by story/phase:
742
+
743
+ 1. Phase 1: [Foundation work]
744
+ 2. Phase 2: [Core implementation]
745
+ 3. Phase 3: [Testing and validation]
746
+
747
+ **Testing Strategy:**
748
+
749
+ - Unit tests for [specific functions]
750
+ - Integration tests for [specific flows]
751
+ - Manual testing checklist
752
+ - Performance testing if applicable
753
+
754
+ **Acceptance Criteria:**
755
+ Specific, measurable, testable criteria:
756
+
757
+ 1. Given [scenario], when [action], then [outcome]
758
+ 2. [Metric] meets [threshold]
759
+ 3. [Feature] works in [environment]
760
+ </action>
761
+
762
+ <template-output file="tech-spec.md">setup_steps</template-output>
763
+ <template-output file="tech-spec.md">implementation_steps</template-output>
764
+ <template-output file="tech-spec.md">testing_strategy</template-output>
765
+ <template-output file="tech-spec.md">acceptance_criteria</template-output>
766
+
767
+ <action>**Developer Resources:**
768
+
769
+ **File Paths Reference:**
770
+ Complete list of all files involved:
771
+
772
+ - /src/services/UserService.ts
773
+ - /src/routes/api/users.ts
774
+ - /tests/services/UserService.test.ts
775
+ - /src/types/user.ts
776
+
777
+ **Key Code Locations:**
778
+ Important functions, classes, modules:
779
+
780
+ - UserService class (src/services/UserService.ts:15)
781
+ - validateUser function (src/utils/validation.ts:42)
782
+ - User type definition (src/types/user.ts:8)
783
+
784
+ **Testing Locations:**
785
+ Where tests go:
786
+
787
+ - Unit: tests/services/
788
+ - Integration: tests/integration/
789
+ - E2E: tests/e2e/
790
+
791
+ **Documentation to Update:**
792
+ Docs that need updating:
793
+
794
+ - README.md - Add new endpoint documentation
795
+ - API.md - Document /users/validate endpoint
796
+ - CHANGELOG.md - Note the new feature
797
+ </action>
798
+
799
+ <template-output file="tech-spec.md">file_paths_complete</template-output>
800
+ <template-output file="tech-spec.md">key_code_locations</template-output>
801
+ <template-output file="tech-spec.md">testing_locations</template-output>
802
+ <template-output file="tech-spec.md">documentation_updates</template-output>
803
+
804
+ <action>**UX/UI Considerations:**
805
+
806
+ <check if="change affects user interface OR user experience">
807
+ **Determine if this change has UI/UX impact:**
808
+ - Does it change what users see?
809
+ - Does it change how users interact?
810
+ - Does it affect user workflows?
811
+
812
+ If YES, document:
813
+
814
+ **UI Components Affected:**
815
+
816
+ - List specific components (buttons, forms, modals, pages)
817
+ - Note which need creation vs modification
818
+
819
+ **UX Flow Changes:**
820
+
821
+ - Current flow vs new flow
822
+ - User journey impact
823
+ - Navigation changes
824
+
825
+ **Visual/Interaction Patterns:**
826
+
827
+ - Follow existing design system? (check for design tokens, component library)
828
+ - New patterns needed?
829
+ - Responsive design considerations (mobile, tablet, desktop)
830
+
831
+ **Accessibility:**
832
+
833
+ - Keyboard navigation requirements
834
+ - Screen reader compatibility
835
+ - ARIA labels needed
836
+ - Color contrast standards
837
+
838
+ **User Feedback:**
839
+
840
+ - Loading states
841
+ - Error messages
842
+ - Success confirmations
843
+ - Progress indicators
844
+ </check>
845
+
846
+ <check if="no UI/UX impact">
847
+ "No UI/UX impact - backend/API/infrastructure change only"
848
+ </check>
849
+ </action>
850
+
851
+ <template-output file="tech-spec.md">ux_ui_considerations</template-output>
852
+
853
+ <action>**Testing Approach:**
854
+
855
+ Comprehensive testing strategy using {{test_framework_info}}:
856
+
857
+ **CONFORM TO EXISTING TEST STANDARDS:**
858
+ <check if="conform_to_conventions == yes">
859
+
860
+ - Follow existing test file naming: {{detected_test_patterns.file_naming}}
861
+ - Use existing test organization: {{detected_test_patterns.organization}}
862
+ - Match existing assertion style: {{detected_test_patterns.assertion_style}}
863
+ - Meet existing coverage requirements: {{detected_test_patterns.coverage}}
864
+ </check>
865
+
866
+ **Test Strategy:**
867
+
868
+ - Test framework: {{detected_test_framework}} (from project dependencies)
869
+ - Unit tests for [specific functions/methods]
870
+ - Integration tests for [specific flows/APIs]
871
+ - E2E tests if UI changes
872
+ - Mock/stub strategies (use existing patterns: {{detected_test_patterns.mocking}})
873
+ - Performance benchmarks if applicable
874
+ - Accessibility tests if UI changes
875
+
876
+ **Coverage:**
877
+
878
+ - Unit test coverage: [target %]
879
+ - Integration coverage: [critical paths]
880
+ - Ensure all acceptance criteria have corresponding tests
881
+ </action>
882
+
883
+ <template-output file="tech-spec.md">test_framework_info</template-output>
137
884
  <template-output file="tech-spec.md">testing_approach</template-output>
138
885
 
139
- **Deployment Strategy**: How to deploy the change
140
- <template-output file="tech-spec.md">deployment_strategy</template-output>
886
+ <action>**Deployment Strategy:**
887
+
888
+ **Deployment Steps:**
889
+ How to deploy this change:
890
+
891
+ 1. Merge to main branch
892
+ 2. Run CI/CD pipeline
893
+ 3. Deploy to staging
894
+ 4. Verify in staging
895
+ 5. Deploy to production
896
+ 6. Monitor for issues
897
+
898
+ **Rollback Plan:**
899
+ How to undo if problems:
900
+
901
+ 1. Revert commit [hash]
902
+ 2. Redeploy previous version
903
+ 3. Verify rollback successful
904
+
905
+ **Monitoring:**
906
+ What to watch after deployment:
907
+
908
+ - Error rates in [logging service]
909
+ - Response times for [endpoint]
910
+ - User feedback on [feature]
911
+ </action>
912
+
913
+ <template-output file="tech-spec.md">deployment_steps</template-output>
914
+ <template-output file="tech-spec.md">rollback_plan</template-output>
915
+ <template-output file="tech-spec.md">monitoring_approach</template-output>
141
916
 
142
917
  <invoke-task halt="true">{project-root}/bmad/core/tasks/adv-elicit.xml</invoke-task>
143
918
 
144
919
  </step>
145
920
 
146
- <step n="3" goal="Validate cohesion" optional="true">
921
+ <step n="4" goal="Auto-validate cohesion, completeness, and quality">
922
+
923
+ <critical>Always run validation - this is NOT optional!</critical>
924
+
925
+ <action>Tech-spec generation complete! Now running automatic validation...</action>
926
+
927
+ <action>Load {installed_path}/checklist.md</action>
928
+ <action>Review tech-spec.md against ALL checklist criteria:
929
+
930
+ **Section 1: Output Files Exist**
931
+
932
+ - Verify tech-spec.md created
933
+ - Check for unfilled template variables
934
+
935
+ **Section 2: Context Gathering**
936
+
937
+ - Validate all available documents were loaded
938
+ - Confirm stack detection worked
939
+ - Verify brownfield analysis (if applicable)
940
+
941
+ **Section 3: Tech-Spec Definitiveness**
942
+
943
+ - Scan for "or" statements (FAIL if found)
944
+ - Verify all versions are specific
945
+ - Check stack alignment
946
+
947
+ **Section 4: Context-Rich Content**
948
+
949
+ - Verify all new template sections populated
950
+ - Check existing code references (brownfield)
951
+ - Validate framework dependencies listed
952
+
953
+ **Section 5-6: Story Quality (deferred to Step 5)**
954
+
955
+ **Section 7: Workflow Status (if applicable)**
956
+
957
+ **Section 8: Implementation Readiness**
147
958
 
148
- <action>Offer to run cohesion validation</action>
959
+ - Can developer start immediately?
960
+ - Is tech-spec comprehensive enough?
961
+ </action>
149
962
 
150
- <ask>Tech-spec complete! Before proceeding to implementation, would you like to validate project cohesion?
963
+ <action>Generate validation report with specific scores:
151
964
 
152
- **Cohesion Validation** checks:
965
+ - Context Gathering: [Comprehensive/Partial/Insufficient]
966
+ - Definitiveness: [All definitive/Some ambiguity/Major issues]
967
+ - Brownfield Integration: [N/A/Excellent/Partial/Missing]
968
+ - Stack Alignment: [Perfect/Good/Partial/None]
969
+ - Implementation Readiness: [Yes/No]
970
+ </action>
153
971
 
154
- - Tech spec completeness and definitiveness
155
- - Feature sequencing and dependencies
156
- - External dependencies properly planned
157
- - User/agent responsibilities clear
158
- - Greenfield/brownfield-specific considerations
972
+ <check if="validation issues found">
973
+ <output>⚠️ **Validation Issues Detected:**
159
974
 
160
- Run cohesion validation? (y/n)</ask>
975
+ {{list_of_issues}}
161
976
 
162
- <check if="yes">
163
- <action>Load {installed_path}/checklist.md</action>
164
- <action>Review tech-spec.md against "Cohesion Validation (All Levels)" section</action>
165
- <action>Focus on Section A (Tech Spec), Section D (Feature Sequencing)</action>
166
- <action>Apply Section B (Greenfield) or Section C (Brownfield) based on field_type</action>
167
- <action>Generate validation report with findings</action>
977
+ I can fix these automatically. Shall I proceed? (yes/no)</output>
978
+
979
+ <ask>Fix validation issues? (yes/no)</ask>
980
+
981
+ <check if="yes">
982
+ <action>Fix each issue and re-validate</action>
983
+ <output>✅ Issues fixed! Re-validation passed.</output>
984
+ </check>
985
+
986
+ <check if="no">
987
+ <output>⚠️ Proceeding with warnings. Issues should be addressed manually.</output>
988
+ </check>
989
+ </check>
990
+
991
+ <check if="validation passes">
992
+ <output>✅ **Validation Passed!**
993
+
994
+ **Scores:**
995
+
996
+ - Context Gathering: {{context_score}}
997
+ - Definitiveness: {{definitiveness_score}}
998
+ - Brownfield Integration: {{brownfield_score}}
999
+ - Stack Alignment: {{stack_score}}
1000
+ - Implementation Readiness: ✅ Ready
1001
+
1002
+ Tech-spec is high quality and ready for story generation!</output>
168
1003
  </check>
169
1004
 
170
1005
  </step>
171
1006
 
172
- <step n="4" goal="Generate user stories based on project level">
1007
+ <step n="5" goal="Generate context-rich user stories">
173
1008
 
174
- <action>Use {{project_level}} from status data</action>
1009
+ <action>Now generate stories that reference the rich tech-spec context</action>
175
1010
 
176
1011
  <check if="project_level == 0">
177
- <action>Invoke instructions-level0-story.md to generate single user story</action>
178
- <action>Story will be saved to user-story.md</action>
179
- <action>Story links to tech-spec.md for technical implementation details</action>
1012
+ <action>Invoke {installed_path}/instructions-level0-story.md to generate single user story</action>
1013
+ <action>Story will leverage tech-spec.md as primary context</action>
1014
+ <action>Developers can skip story-context workflow since tech-spec is comprehensive</action>
180
1015
  </check>
181
1016
 
182
1017
  <check if="project_level == 1">
183
- <action>Invoke instructions-level1-stories.md to generate epic and stories</action>
184
- <action>Epic and stories will be saved to epics.md
185
- <action>Stories link to tech-spec.md implementation tasks</action>
1018
+ <action>Invoke {installed_path}/instructions-level1-stories.md to generate epic and stories</action>
1019
+ <action>Stories will reference tech-spec.md for all technical details</action>
1020
+ <action>Epic provides organization, tech-spec provides implementation context</action>
186
1021
  </check>
187
1022
 
188
1023
  </step>
189
1024
 
190
- <step n="5" goal="Finalize and determine next steps">
1025
+ <step n="6" goal="Finalize and guide next steps">
191
1026
 
192
- <action>Confirm tech-spec is complete and definitive</action>
1027
+ <output>**✅ Tech-Spec Complete, {user_name}!**
1028
+
1029
+ **Deliverables Created:**
193
1030
 
194
1031
  <check if="project_level == 0">
195
- <action>Confirm user-story.md generated successfully</action>
1032
+ - ✅ **tech-spec.md** - Context-rich technical specification
1033
+ - Includes: brownfield analysis, framework details, existing patterns
1034
+ - ✅ **story-{slug}.md** - Implementation-ready user story
1035
+ - References tech-spec as primary context
196
1036
  </check>
197
1037
 
198
1038
  <check if="project_level == 1">
199
- <action>Confirm epics.md generated successfully</action>
1039
+ - ✅ **tech-spec.md** - Context-rich technical specification
1040
+ - ✅ **epics.md** - Epic and story organization
1041
+ - ✅ **story-{epic-slug}-1.md** - First story
1042
+ - ✅ **story-{epic-slug}-2.md** - Second story
1043
+ {{#if story_3}}
1044
+ - ✅ **story-{epic-slug}-3.md** - Third story
1045
+ {{/if}}
200
1046
  </check>
201
1047
 
202
- ## Summary
1048
+ **What Makes This Tech-Spec Special:**
1049
+
1050
+ The tech-spec is comprehensive enough to serve as the primary context document:
1051
+
1052
+ - ✨ Brownfield codebase analysis (if applicable)
1053
+ - ✨ Exact framework and library versions from your project
1054
+ - ✨ Existing patterns and code references
1055
+ - ✨ Specific file paths and integration points
1056
+ - ✨ Complete developer resources
1057
+
1058
+ **Next Steps:**
203
1059
 
204
1060
  <check if="project_level == 0">
205
- - **Level 0 Output**: tech-spec.md + user-story.md
206
- - **No PRD required**
207
- - **Direct to implementation with story tracking**
1061
+ **For Single Story (Level 0):**
1062
+
1063
+ **Option A - With Story Context (for complex changes):**
1064
+
1065
+ 1. Ask SM agent to run `create-story-context` for the story
1066
+ - This generates additional XML context if needed
1067
+ 2. Then ask DEV agent to run `dev-story` to implement
1068
+
1069
+ **Option B - Direct to Dev (most Level 0):**
1070
+
1071
+ 1. Ask DEV agent to run `dev-story` directly
1072
+ - Tech-spec provides all the context needed!
1073
+ - Story is ready to implement
1074
+
1075
+ 💡 **Tip:** Most Level 0 changes don't need separate story context since tech-spec is comprehensive!
208
1076
  </check>
209
1077
 
210
1078
  <check if="project_level == 1">
211
- - **Level 1 Output**: tech-spec.md + epics.md
212
- - **No PRD required**
213
- - **Ready for sprint planning with epic/story breakdown**
214
- </check>
1079
+ **For Multiple Stories (Level 1):**
215
1080
 
216
- ## Next Steps
1081
+ **Recommended: Story-by-Story Approach**
217
1082
 
218
- <check if="standalone_mode != true">
219
- <action>Load the FULL file: {output_folder}/bmm-workflow-status.yaml</action>
220
- <action>Find workflow_status key "tech-spec"</action>
221
- <critical>ONLY write the file path as the status value - no other text, notes, or metadata</critical>
222
- <action>Update workflow_status["tech-spec"] = "{output_folder}/bmm-tech-spec-{{date}}.md"</action>
223
- <action>Save file, preserving ALL comments and structure including STATUS DEFINITIONS</action>
1083
+ For the **first story** ({{first_story_name}}):
224
1084
 
225
- <action>Find first non-completed workflow in workflow_status (next workflow to do)</action>
226
- <action>Determine next agent from path file based on next workflow</action>
227
- </check>
1085
+ **Option A - With Story Context (recommended for first story):**
228
1086
 
229
- <output>**✅ Tech-Spec Complete, {user_name}!**
1087
+ 1. Ask SM agent to run `create-story-context` for story 1
1088
+ - Generates focused context for this specific story
1089
+ 2. Then ask DEV agent to run `dev-story` to implement story 1
230
1090
 
231
- **Deliverables Created:**
1091
+ **Option B - Direct to Dev:**
232
1092
 
233
- <check if="project_level == 0">
234
- - ✅ tech-spec.md - Technical specification
235
- - ✅ user-story.md - Single user story
236
- </check>
1093
+ 1. Ask DEV agent to run `dev-story` for story 1
1094
+ - Tech-spec has most context needed
237
1095
 
238
- <check if="project_level == 1">
239
- - ✅ tech-spec.md - Technical specification
240
- - ✅ epics.md - Epic and story breakdown
241
- </check>
1096
+ After completing story 1, repeat for stories 2 and 3.
242
1097
 
243
- **Next Steps:**
1098
+ **Alternative: Sprint Planning Approach**
1099
+
1100
+ - If managing multiple stories as a sprint, ask SM agent to run `sprint-planning`
1101
+ - This organizes all stories for coordinated implementation
1102
+ </check>
1103
+
1104
+ **Your Tech-Spec:**
244
1105
 
245
- - **Next required:** {{next_workflow}} ({{next_agent}} agent)
246
- - **Optional:** Create test plan or document UI changes if applicable
1106
+ - 📄 Saved to: `{output_folder}/tech-spec.md`
1107
+ - Contains: All context, decisions, patterns, and implementation guidance
1108
+ - Ready for: Direct development or story context generation
247
1109
 
248
- Check status anytime with: `workflow-status`
1110
+ The tech-spec is your single source of truth! 🚀
249
1111
  </output>
250
1112
 
251
1113
  </step>