bmad-method 6.0.0-alpha.2 → 6.0.0-alpha.4

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