bmad-method 6.0.0-alpha.0 → 6.0.0-alpha.10

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