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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (521) hide show
  1. package/.claude/commands/bmad/bmm/agents/analyst.md +67 -0
  2. package/.claude/commands/bmad/bmm/agents/architect.md +73 -0
  3. package/.claude/commands/bmad/bmm/agents/dev.md +69 -0
  4. package/.claude/commands/bmad/bmm/agents/paige.md +82 -0
  5. package/.claude/commands/bmad/bmm/agents/pm.md +76 -0
  6. package/.claude/commands/bmad/bmm/agents/sm.md +85 -0
  7. package/.claude/commands/bmad/bmm/agents/tea.md +72 -0
  8. package/.claude/commands/bmad/bmm/agents/ux-designer.md +71 -0
  9. package/.claude/commands/bmad/bmm/workflows/README.md +132 -0
  10. package/.claude/commands/bmad/bmm/workflows/architecture.md +15 -0
  11. package/.claude/commands/bmad/bmm/workflows/brainstorm-project.md +15 -0
  12. package/.claude/commands/bmad/bmm/workflows/code-review.md +15 -0
  13. package/.claude/commands/bmad/bmm/workflows/correct-course.md +15 -0
  14. package/.claude/commands/bmad/bmm/workflows/create-epics-and-stories.md +15 -0
  15. package/.claude/commands/bmad/bmm/workflows/create-story.md +15 -0
  16. package/.claude/commands/bmad/bmm/workflows/create-ux-design.md +15 -0
  17. package/.claude/commands/bmad/bmm/workflows/dev-story.md +15 -0
  18. package/.claude/commands/bmad/bmm/workflows/document-project.md +15 -0
  19. package/.claude/commands/bmad/bmm/workflows/narrative.md +15 -0
  20. package/.claude/commands/bmad/bmm/workflows/prd.md +15 -0
  21. package/.claude/commands/bmad/bmm/workflows/product-brief.md +15 -0
  22. package/.claude/commands/bmad/bmm/workflows/research.md +15 -0
  23. package/.claude/commands/bmad/bmm/workflows/retrospective.md +15 -0
  24. package/.claude/commands/bmad/bmm/workflows/solutioning-gate-check.md +15 -0
  25. package/.claude/commands/bmad/bmm/workflows/sprint-planning.md +15 -0
  26. package/.claude/commands/bmad/bmm/workflows/story-context.md +15 -0
  27. package/.claude/commands/bmad/bmm/workflows/story-done.md +15 -0
  28. package/.claude/commands/bmad/bmm/workflows/story-ready.md +15 -0
  29. package/.claude/commands/bmad/bmm/workflows/tech-spec-sm.md +15 -0
  30. package/.claude/commands/bmad/bmm/workflows/tech-spec.md +15 -0
  31. package/.claude/commands/bmad/bmm/workflows/workflow-init.md +15 -0
  32. package/.claude/commands/bmad/bmm/workflows/workflow-status.md +15 -0
  33. package/.claude/commands/bmad/cis/agents/README.md +104 -0
  34. package/.claude/commands/bmad/cis/agents/brainstorming-coach.md +62 -0
  35. package/.claude/commands/bmad/cis/agents/creative-problem-solver.md +62 -0
  36. package/.claude/commands/bmad/cis/agents/design-thinking-coach.md +62 -0
  37. package/.claude/commands/bmad/cis/agents/innovation-strategist.md +62 -0
  38. package/.claude/commands/bmad/cis/agents/storyteller.md +59 -0
  39. package/.claude/commands/bmad/cis/workflows/README.md +37 -0
  40. package/.claude/commands/bmad/cis/workflows/design-thinking.md +15 -0
  41. package/.claude/commands/bmad/cis/workflows/innovation-strategy.md +15 -0
  42. package/.claude/commands/bmad/cis/workflows/problem-solving.md +15 -0
  43. package/.claude/commands/bmad/cis/workflows/storytelling.md +15 -0
  44. package/.claude/settings.local.json +10 -31
  45. package/CHANGELOG.md +239 -0
  46. package/README.md +210 -146
  47. package/bmad/_cfg/agent-manifest.csv +13 -4
  48. package/bmad/_cfg/agents/bmm-dev.customize.yaml +42 -0
  49. package/bmad/_cfg/agents/bmm-paige.customize.yaml +42 -0
  50. package/bmad/_cfg/agents/bmm-pm.customize.yaml +42 -0
  51. package/bmad/_cfg/agents/bmm-sm.customize.yaml +42 -0
  52. package/bmad/_cfg/agents/bmm-tea.customize.yaml +42 -0
  53. package/bmad/_cfg/agents/bmm-ux-designer.customize.yaml +42 -0
  54. package/bmad/_cfg/agents/cis-brainstorming-coach.customize.yaml +42 -0
  55. package/bmad/_cfg/agents/cis-creative-problem-solver.customize.yaml +42 -0
  56. package/bmad/_cfg/agents/cis-design-thinking-coach.customize.yaml +42 -0
  57. package/bmad/_cfg/agents/cis-innovation-strategist.customize.yaml +42 -0
  58. package/bmad/_cfg/agents/cis-storyteller.customize.yaml +42 -0
  59. package/bmad/_cfg/files-manifest.csv +289 -22
  60. package/bmad/_cfg/ides/claude-code.yaml +6 -0
  61. package/bmad/_cfg/manifest.yaml +5 -6
  62. package/bmad/_cfg/task-manifest.csv +2 -0
  63. package/bmad/_cfg/workflow-manifest.csv +35 -2
  64. package/bmad/bmb/README.md +135 -73
  65. package/bmad/bmb/agents/bmad-builder.md.bak +70 -0
  66. package/bmad/bmb/config.yaml +2 -2
  67. package/bmad/bmb/workflows/audit-workflow/workflow.yaml.bak +3 -1
  68. package/bmad/bmb/workflows/create-agent/README.md +126 -243
  69. package/bmad/bmb/workflows/create-agent/instructions.md +25 -12
  70. package/bmad/bmb/workflows/create-module/README.md +163 -154
  71. package/bmad/bmb/workflows/create-module/workflow.yaml.bak +2 -0
  72. package/bmad/bmb/workflows/create-workflow/instructions.md +16 -8
  73. package/bmad/bmb/workflows/create-workflow/workflow-creation-guide.md +158 -0
  74. package/bmad/bmb/workflows/create-workflow/workflow.yaml.bak +2 -0
  75. package/bmad/bmb/workflows/edit-agent/workflow.yaml.bak +33 -0
  76. package/bmad/bmb/workflows/edit-module/workflow.yaml.bak +34 -0
  77. package/bmad/bmb/workflows/edit-workflow/workflow.yaml.bak +2 -0
  78. package/bmad/bmb/workflows/module-brief/workflow.yaml.bak +2 -0
  79. package/bmad/bmb/workflows/redoc/workflow.yaml.bak +1 -0
  80. package/bmad/bmm/README.md +169 -0
  81. package/bmad/bmm/agents/analyst.md +67 -0
  82. package/bmad/bmm/agents/architect.md +73 -0
  83. package/bmad/bmm/agents/dev.md +69 -0
  84. package/bmad/bmm/agents/paige.md +82 -0
  85. package/bmad/bmm/agents/pm.md +76 -0
  86. package/bmad/bmm/agents/sm.md +85 -0
  87. package/bmad/bmm/agents/tea.md +72 -0
  88. package/bmad/bmm/agents/ux-designer.md +71 -0
  89. package/bmad/bmm/config.yaml +17 -0
  90. package/bmad/bmm/docs/quick-spec-flow.md +645 -0
  91. package/bmad/bmm/docs/quick-start.md +341 -0
  92. package/bmad/bmm/docs/scale-adaptive-system.md +1045 -0
  93. package/bmad/bmm/tasks/daily-standup.xml +85 -0
  94. package/bmad/bmm/teams/team-fullstack.yaml +11 -0
  95. package/bmad/bmm/teams/team-gamedev.yaml +14 -0
  96. package/bmad/bmm/testarch/knowledge/ci-burn-in.md +675 -0
  97. package/bmad/bmm/testarch/knowledge/component-tdd.md +486 -0
  98. package/bmad/bmm/testarch/knowledge/contract-testing.md +957 -0
  99. package/bmad/bmm/testarch/knowledge/data-factories.md +500 -0
  100. package/bmad/bmm/testarch/knowledge/email-auth.md +721 -0
  101. package/bmad/bmm/testarch/knowledge/error-handling.md +725 -0
  102. package/bmad/bmm/testarch/knowledge/feature-flags.md +750 -0
  103. package/bmad/bmm/testarch/knowledge/fixture-architecture.md +401 -0
  104. package/bmad/bmm/testarch/knowledge/network-first.md +486 -0
  105. package/bmad/bmm/testarch/knowledge/nfr-criteria.md +670 -0
  106. package/bmad/bmm/testarch/knowledge/playwright-config.md +730 -0
  107. package/bmad/bmm/testarch/knowledge/probability-impact.md +601 -0
  108. package/bmad/bmm/testarch/knowledge/risk-governance.md +615 -0
  109. package/bmad/bmm/testarch/knowledge/selective-testing.md +732 -0
  110. package/bmad/bmm/testarch/knowledge/selector-resilience.md +527 -0
  111. package/bmad/bmm/testarch/knowledge/test-healing-patterns.md +644 -0
  112. package/bmad/bmm/testarch/knowledge/test-levels-framework.md +473 -0
  113. package/bmad/bmm/testarch/knowledge/test-priorities-matrix.md +373 -0
  114. package/bmad/bmm/testarch/knowledge/test-quality.md +664 -0
  115. package/bmad/bmm/testarch/knowledge/timing-debugging.md +372 -0
  116. package/bmad/bmm/testarch/knowledge/visual-debugging.md +524 -0
  117. package/bmad/bmm/testarch/tea-index.csv +22 -0
  118. package/bmad/bmm/workflows/1-analysis/brainstorm-project/README.md +113 -0
  119. package/bmad/bmm/workflows/1-analysis/brainstorm-project/instructions.md +110 -0
  120. package/bmad/bmm/workflows/1-analysis/brainstorm-project/project-context.md +25 -0
  121. package/bmad/bmm/workflows/1-analysis/brainstorm-project/workflow.yaml +26 -0
  122. package/bmad/bmm/workflows/1-analysis/domain-research/instructions.md +423 -0
  123. package/bmad/bmm/workflows/1-analysis/domain-research/template.md +180 -0
  124. package/bmad/bmm/workflows/1-analysis/domain-research/workflow.yaml +36 -0
  125. package/bmad/bmm/workflows/1-analysis/product-brief/checklist.md +115 -0
  126. package/bmad/bmm/workflows/1-analysis/product-brief/instructions.md +524 -0
  127. package/bmad/bmm/workflows/1-analysis/product-brief/template.md +181 -0
  128. package/bmad/bmm/workflows/1-analysis/product-brief/workflow.yaml +45 -0
  129. package/bmad/bmm/workflows/1-analysis/research/checklist-deep-prompt.md +144 -0
  130. package/bmad/bmm/workflows/1-analysis/research/checklist-technical.md +249 -0
  131. package/bmad/bmm/workflows/1-analysis/research/checklist.md +299 -0
  132. package/bmad/bmm/workflows/1-analysis/research/claude-code/injections.yaml +114 -0
  133. package/bmad/bmm/workflows/1-analysis/research/instructions-deep-prompt.md +439 -0
  134. package/bmad/bmm/workflows/1-analysis/research/instructions-market.md +679 -0
  135. package/bmad/bmm/workflows/1-analysis/research/instructions-router.md +133 -0
  136. package/bmad/bmm/workflows/1-analysis/research/instructions-technical.md +538 -0
  137. package/bmad/bmm/workflows/1-analysis/research/template-deep-prompt.md +94 -0
  138. package/bmad/bmm/workflows/1-analysis/research/template-market.md +347 -0
  139. package/bmad/bmm/workflows/1-analysis/research/template-technical.md +245 -0
  140. package/bmad/bmm/workflows/1-analysis/research/workflow.yaml +44 -0
  141. package/bmad/bmm/workflows/2-plan-workflows/create-ux-design/checklist.md +310 -0
  142. package/bmad/bmm/workflows/2-plan-workflows/create-ux-design/instructions.md +1319 -0
  143. package/bmad/bmm/workflows/2-plan-workflows/create-ux-design/ux-design-template.md +145 -0
  144. package/bmad/bmm/workflows/2-plan-workflows/create-ux-design/workflow.yaml +64 -0
  145. package/bmad/bmm/workflows/2-plan-workflows/narrative/checklist.md +139 -0
  146. package/bmad/bmm/workflows/2-plan-workflows/narrative/instructions-narrative.md +608 -0
  147. package/bmad/bmm/workflows/2-plan-workflows/narrative/narrative-template.md +195 -0
  148. package/bmad/bmm/workflows/2-plan-workflows/narrative/workflow.yaml +29 -0
  149. package/bmad/bmm/workflows/2-plan-workflows/prd/checklist.md +349 -0
  150. package/bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/instructions.md +395 -0
  151. package/bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/workflow.yaml +33 -0
  152. package/bmad/bmm/workflows/2-plan-workflows/prd/domain-complexity.csv +13 -0
  153. package/bmad/bmm/workflows/2-plan-workflows/prd/instructions.md +423 -0
  154. package/bmad/bmm/workflows/2-plan-workflows/prd/prd-template.md +237 -0
  155. package/bmad/bmm/workflows/2-plan-workflows/prd/project-types.csv +11 -0
  156. package/bmad/bmm/workflows/2-plan-workflows/prd/workflow.yaml +46 -0
  157. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/checklist.md +214 -0
  158. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/epics-template.md +58 -0
  159. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/instructions-level0-story.md +200 -0
  160. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/instructions-level1-stories.md +451 -0
  161. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/instructions.md +1133 -0
  162. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/tech-spec-template.md +181 -0
  163. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/user-story-template.md +87 -0
  164. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml +60 -0
  165. package/bmad/bmm/workflows/3-solutioning/architecture/architecture-patterns.yaml +347 -0
  166. package/bmad/bmm/workflows/3-solutioning/architecture/architecture-template.md +103 -0
  167. package/bmad/bmm/workflows/3-solutioning/architecture/checklist.md +244 -0
  168. package/bmad/bmm/workflows/3-solutioning/architecture/decision-catalog.yaml +222 -0
  169. package/bmad/bmm/workflows/3-solutioning/architecture/instructions.md +715 -0
  170. package/bmad/bmm/workflows/3-solutioning/architecture/pattern-categories.csv +13 -0
  171. package/bmad/bmm/workflows/3-solutioning/architecture/workflow.yaml +67 -0
  172. package/bmad/bmm/workflows/3-solutioning/solutioning-gate-check/checklist.md +175 -0
  173. package/bmad/bmm/workflows/3-solutioning/solutioning-gate-check/instructions.md +322 -0
  174. package/bmad/bmm/workflows/3-solutioning/solutioning-gate-check/template.md +146 -0
  175. package/bmad/bmm/workflows/3-solutioning/solutioning-gate-check/validation-criteria.yaml +189 -0
  176. package/bmad/bmm/workflows/3-solutioning/solutioning-gate-check/workflow.yaml +64 -0
  177. package/bmad/bmm/workflows/4-implementation/code-review/backlog_template.md +12 -0
  178. package/bmad/bmm/workflows/4-implementation/code-review/checklist.md +22 -0
  179. package/bmad/bmm/workflows/4-implementation/code-review/instructions.md +420 -0
  180. package/bmad/bmm/workflows/4-implementation/code-review/workflow.yaml +74 -0
  181. package/bmad/bmm/workflows/4-implementation/correct-course/checklist.md +279 -0
  182. package/bmad/bmm/workflows/4-implementation/correct-course/instructions.md +201 -0
  183. package/bmad/bmm/workflows/4-implementation/correct-course/workflow.yaml +43 -0
  184. package/bmad/bmm/workflows/4-implementation/create-story/README.md +146 -0
  185. package/bmad/bmm/workflows/4-implementation/create-story/checklist.md +240 -0
  186. package/bmad/bmm/workflows/4-implementation/create-story/instructions.md +283 -0
  187. package/bmad/bmm/workflows/4-implementation/create-story/template.md +51 -0
  188. package/bmad/bmm/workflows/4-implementation/create-story/workflow.yaml +74 -0
  189. package/bmad/bmm/workflows/4-implementation/dev-story/AUDIT-REPORT.md +367 -0
  190. package/bmad/bmm/workflows/4-implementation/dev-story/checklist.md +38 -0
  191. package/bmad/bmm/workflows/4-implementation/dev-story/instructions.md +262 -0
  192. package/bmad/bmm/workflows/4-implementation/dev-story/workflow.yaml +26 -0
  193. package/bmad/bmm/workflows/4-implementation/epic-tech-context/checklist.md +17 -0
  194. package/bmad/bmm/workflows/4-implementation/epic-tech-context/instructions.md +189 -0
  195. package/bmad/bmm/workflows/4-implementation/epic-tech-context/template.md +76 -0
  196. package/bmad/bmm/workflows/4-implementation/epic-tech-context/workflow.yaml +58 -0
  197. package/bmad/bmm/workflows/4-implementation/retrospective/instructions.md +1460 -0
  198. package/bmad/bmm/workflows/4-implementation/retrospective/workflow.yaml +71 -0
  199. package/bmad/bmm/workflows/4-implementation/sprint-planning/checklist.md +33 -0
  200. package/bmad/bmm/workflows/4-implementation/sprint-planning/instructions.md +238 -0
  201. package/bmad/bmm/workflows/4-implementation/sprint-planning/sprint-status-template.yaml +55 -0
  202. package/bmad/bmm/workflows/4-implementation/sprint-planning/workflow.yaml +47 -0
  203. package/bmad/bmm/workflows/4-implementation/story-context/checklist.md +16 -0
  204. package/bmad/bmm/workflows/4-implementation/story-context/context-template.xml +34 -0
  205. package/bmad/bmm/workflows/4-implementation/story-context/instructions.md +234 -0
  206. package/bmad/bmm/workflows/4-implementation/story-context/workflow.yaml +57 -0
  207. package/bmad/bmm/workflows/4-implementation/story-done/instructions.md +111 -0
  208. package/bmad/bmm/workflows/4-implementation/story-done/workflow.yaml +25 -0
  209. package/bmad/bmm/workflows/4-implementation/story-ready/instructions.md +117 -0
  210. package/bmad/bmm/workflows/4-implementation/story-ready/workflow.yaml +25 -0
  211. package/bmad/bmm/workflows/README.md +256 -0
  212. package/bmad/bmm/workflows/document-project/checklist.md +245 -0
  213. package/bmad/bmm/workflows/document-project/documentation-requirements.csv +12 -0
  214. package/bmad/bmm/workflows/document-project/instructions.md +222 -0
  215. package/bmad/bmm/workflows/document-project/templates/deep-dive-template.md +345 -0
  216. package/bmad/bmm/workflows/document-project/templates/index-template.md +169 -0
  217. package/bmad/bmm/workflows/document-project/templates/project-overview-template.md +103 -0
  218. package/bmad/bmm/workflows/document-project/templates/project-scan-report-schema.json +160 -0
  219. package/bmad/bmm/workflows/document-project/templates/source-tree-template.md +135 -0
  220. package/bmad/bmm/workflows/document-project/workflow.yaml +34 -0
  221. package/bmad/bmm/workflows/document-project/workflows/deep-dive-instructions.md +298 -0
  222. package/bmad/bmm/workflows/document-project/workflows/deep-dive.yaml +31 -0
  223. package/bmad/bmm/workflows/document-project/workflows/full-scan-instructions.md +1106 -0
  224. package/bmad/bmm/workflows/document-project/workflows/full-scan.yaml +31 -0
  225. package/bmad/bmm/workflows/techdoc/documentation-standards.md +238 -0
  226. package/bmad/bmm/workflows/testarch/atdd/atdd-checklist-template.md +363 -0
  227. package/bmad/bmm/workflows/testarch/atdd/checklist.md +373 -0
  228. package/bmad/bmm/workflows/testarch/atdd/instructions.md +785 -0
  229. package/bmad/bmm/workflows/testarch/atdd/workflow.yaml +52 -0
  230. package/bmad/bmm/workflows/testarch/automate/checklist.md +580 -0
  231. package/bmad/bmm/workflows/testarch/automate/instructions.md +1303 -0
  232. package/bmad/bmm/workflows/testarch/automate/workflow.yaml +61 -0
  233. package/bmad/bmm/workflows/testarch/ci/checklist.md +246 -0
  234. package/bmad/bmm/workflows/testarch/ci/github-actions-template.yaml +165 -0
  235. package/bmad/bmm/workflows/testarch/ci/gitlab-ci-template.yaml +128 -0
  236. package/bmad/bmm/workflows/testarch/ci/instructions.md +517 -0
  237. package/bmad/bmm/workflows/testarch/ci/workflow.yaml +53 -0
  238. package/bmad/bmm/workflows/testarch/framework/checklist.md +321 -0
  239. package/bmad/bmm/workflows/testarch/framework/instructions.md +455 -0
  240. package/bmad/bmm/workflows/testarch/framework/workflow.yaml +53 -0
  241. package/bmad/bmm/workflows/testarch/nfr-assess/checklist.md +405 -0
  242. package/bmad/bmm/workflows/testarch/nfr-assess/instructions.md +722 -0
  243. package/bmad/bmm/workflows/testarch/nfr-assess/nfr-report-template.md +443 -0
  244. package/bmad/bmm/workflows/testarch/nfr-assess/workflow.yaml +56 -0
  245. package/bmad/bmm/workflows/testarch/test-design/checklist.md +234 -0
  246. package/bmad/bmm/workflows/testarch/test-design/instructions.md +621 -0
  247. package/bmad/bmm/workflows/testarch/test-design/test-design-template.md +285 -0
  248. package/bmad/bmm/workflows/testarch/test-design/workflow.yaml +52 -0
  249. package/bmad/bmm/workflows/testarch/test-review/checklist.md +470 -0
  250. package/bmad/bmm/workflows/testarch/test-review/instructions.md +608 -0
  251. package/bmad/bmm/workflows/testarch/test-review/test-review-template.md +388 -0
  252. package/bmad/bmm/workflows/testarch/test-review/workflow.yaml +53 -0
  253. package/bmad/bmm/workflows/testarch/trace/checklist.md +654 -0
  254. package/bmad/bmm/workflows/testarch/trace/instructions.md +1045 -0
  255. package/bmad/bmm/workflows/testarch/trace/trace-template.md +673 -0
  256. package/bmad/bmm/workflows/testarch/trace/workflow.yaml +66 -0
  257. package/{src/modules → bmad}/bmm/workflows/workflow-status/README.md +38 -19
  258. package/bmad/bmm/workflows/workflow-status/init/instructions.md +390 -0
  259. package/bmad/bmm/workflows/workflow-status/init/workflow.yaml +27 -0
  260. package/bmad/bmm/workflows/workflow-status/instructions.md +386 -0
  261. package/bmad/bmm/workflows/workflow-status/paths/brownfield-level-0.yaml +54 -0
  262. package/bmad/bmm/workflows/workflow-status/paths/brownfield-level-1.yaml +58 -0
  263. package/bmad/bmm/workflows/workflow-status/paths/brownfield-level-2.yaml +76 -0
  264. package/bmad/bmm/workflows/workflow-status/paths/brownfield-level-3.yaml +95 -0
  265. package/bmad/bmm/workflows/workflow-status/paths/brownfield-level-4.yaml +88 -0
  266. package/bmad/bmm/workflows/workflow-status/paths/game-design.yaml +75 -0
  267. package/bmad/bmm/workflows/workflow-status/paths/greenfield-level-0.yaml +45 -0
  268. package/bmad/bmm/workflows/workflow-status/paths/greenfield-level-1.yaml +49 -0
  269. package/bmad/bmm/workflows/workflow-status/paths/greenfield-level-2.yaml +78 -0
  270. package/bmad/bmm/workflows/workflow-status/paths/greenfield-level-3.yaml +73 -0
  271. package/bmad/bmm/workflows/workflow-status/paths/greenfield-level-4.yaml +75 -0
  272. package/bmad/bmm/workflows/workflow-status/project-levels.yaml +59 -0
  273. package/bmad/bmm/workflows/workflow-status/sample-level-3-workflow.yaml +49 -0
  274. package/bmad/bmm/workflows/workflow-status/workflow-status-template.yaml +31 -0
  275. package/bmad/bmm/workflows/workflow-status/workflow.yaml +28 -0
  276. package/bmad/cis/README.md +153 -0
  277. package/bmad/cis/agents/README.md +104 -0
  278. package/bmad/cis/agents/brainstorming-coach.md +62 -0
  279. package/bmad/cis/agents/creative-problem-solver.md +62 -0
  280. package/bmad/cis/agents/design-thinking-coach.md +62 -0
  281. package/bmad/cis/agents/innovation-strategist.md +62 -0
  282. package/bmad/cis/agents/storyteller.md +59 -0
  283. package/bmad/{bmd → cis}/config.yaml +3 -3
  284. package/bmad/cis/teams/creative-squad.yaml +6 -0
  285. package/bmad/cis/workflows/README.md +139 -0
  286. package/bmad/cis/workflows/design-thinking/README.md +56 -0
  287. package/bmad/cis/workflows/design-thinking/design-methods.csv +31 -0
  288. package/bmad/cis/workflows/design-thinking/instructions.md +200 -0
  289. package/bmad/cis/workflows/design-thinking/template.md +111 -0
  290. package/bmad/cis/workflows/design-thinking/workflow.yaml +32 -0
  291. package/bmad/cis/workflows/innovation-strategy/README.md +56 -0
  292. package/bmad/cis/workflows/innovation-strategy/innovation-frameworks.csv +31 -0
  293. package/bmad/cis/workflows/innovation-strategy/instructions.md +274 -0
  294. package/bmad/cis/workflows/innovation-strategy/template.md +189 -0
  295. package/bmad/cis/workflows/innovation-strategy/workflow.yaml +32 -0
  296. package/bmad/cis/workflows/problem-solving/README.md +56 -0
  297. package/bmad/cis/workflows/problem-solving/instructions.md +250 -0
  298. package/bmad/cis/workflows/problem-solving/solving-methods.csv +31 -0
  299. package/bmad/cis/workflows/problem-solving/template.md +165 -0
  300. package/bmad/cis/workflows/problem-solving/workflow.yaml +32 -0
  301. package/bmad/cis/workflows/storytelling/README.md +58 -0
  302. package/bmad/cis/workflows/storytelling/instructions.md +291 -0
  303. package/bmad/cis/workflows/storytelling/story-types.csv +26 -0
  304. package/bmad/cis/workflows/storytelling/template.md +113 -0
  305. package/bmad/cis/workflows/storytelling/workflow.yaml +32 -0
  306. package/bmad/core/agents/bmad-master.md.bak +69 -0
  307. package/bmad/core/config.yaml +2 -2
  308. package/bmad/core/tasks/workflow.xml +0 -8
  309. package/bmad/core/tools/shard-doc.xml +8 -43
  310. package/docs/document-sharding-guide.md +447 -0
  311. package/docs/index.md +225 -0
  312. package/docs/v4-to-v6-upgrade.md +9 -7
  313. package/package.json +1 -1
  314. package/src/core/tools/shard-doc.xml +8 -43
  315. package/src/modules/bmb/README.md +135 -73
  316. package/src/modules/bmb/workflows/create-agent/README.md +126 -243
  317. package/src/modules/bmb/workflows/create-agent/instructions.md +25 -12
  318. package/src/modules/bmb/workflows/create-module/README.md +163 -154
  319. package/src/modules/bmb/workflows/create-workflow/instructions.md +16 -8
  320. package/src/modules/bmb/workflows/create-workflow/workflow-creation-guide.md +158 -0
  321. package/src/modules/bmm/README.md +79 -92
  322. package/src/modules/bmm/agents/game-designer.agent.yaml +2 -2
  323. package/src/modules/bmm/agents/paige.agent.yaml +69 -0
  324. package/src/modules/bmm/agents/pm.agent.yaml +11 -1
  325. package/src/modules/bmm/docs/README.md +235 -0
  326. package/src/modules/bmm/docs/agents-guide.md +1109 -0
  327. package/src/modules/bmm/docs/brownfield-guide.md +638 -0
  328. package/src/modules/bmm/docs/brownfield-guide.md.backup +1324 -0
  329. package/src/modules/bmm/docs/enterprise-agentic-development.md +1040 -0
  330. package/src/modules/bmm/docs/faq.md +589 -0
  331. package/src/modules/bmm/docs/glossary.md +327 -0
  332. package/src/modules/bmm/docs/party-mode.md +1236 -0
  333. package/src/modules/bmm/docs/quick-spec-flow.md +652 -0
  334. package/src/modules/bmm/docs/quick-start.md +366 -0
  335. package/src/modules/bmm/docs/scale-adaptive-system.md +749 -0
  336. package/src/modules/bmm/docs/troubleshooting.md +680 -0
  337. package/src/modules/bmm/docs/workflow-architecture-reference.md +371 -0
  338. package/src/modules/bmm/docs/workflow-document-project-reference.md +487 -0
  339. package/src/modules/bmm/docs/workflows-analysis.md +670 -0
  340. package/src/modules/bmm/docs/workflows-implementation.md +1759 -0
  341. package/src/modules/bmm/docs/workflows-planning.md +1086 -0
  342. package/src/modules/bmm/docs/workflows-solutioning.md +726 -0
  343. package/src/modules/bmm/docs/workflows-testing.md +1572 -0
  344. package/src/modules/bmm/workflows/1-analysis/brainstorm-game/instructions.md +45 -26
  345. package/src/modules/bmm/workflows/1-analysis/brainstorm-project/instructions.md +42 -23
  346. package/src/modules/bmm/workflows/1-analysis/domain-research/instructions.md +423 -0
  347. package/src/modules/bmm/workflows/1-analysis/domain-research/template.md +180 -0
  348. package/src/modules/bmm/workflows/1-analysis/domain-research/workflow.yaml +36 -0
  349. package/src/modules/bmm/workflows/1-analysis/game-brief/instructions.md +42 -28
  350. package/src/modules/bmm/workflows/1-analysis/product-brief/instructions.md +434 -231
  351. package/src/modules/bmm/workflows/1-analysis/product-brief/template.md +93 -77
  352. package/src/modules/bmm/workflows/1-analysis/product-brief/workflow.yaml +14 -0
  353. package/src/modules/bmm/workflows/1-analysis/research/checklist-deep-prompt.md +144 -0
  354. package/src/modules/bmm/workflows/1-analysis/research/checklist-technical.md +249 -0
  355. package/src/modules/bmm/workflows/1-analysis/research/checklist.md +154 -57
  356. package/src/modules/bmm/workflows/1-analysis/research/instructions-deep-prompt.md +68 -62
  357. package/src/modules/bmm/workflows/1-analysis/research/instructions-market.md +203 -137
  358. package/src/modules/bmm/workflows/1-analysis/research/instructions-router.md +53 -45
  359. package/src/modules/bmm/workflows/1-analysis/research/instructions-technical.md +116 -79
  360. package/src/modules/bmm/workflows/1-analysis/research/template-market.md +37 -1
  361. package/src/modules/bmm/workflows/1-analysis/research/template-technical.md +36 -1
  362. package/src/modules/bmm/workflows/1-analysis/research/workflow.yaml +13 -0
  363. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/instructions.md +58 -22
  364. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/workflow.yaml +22 -0
  365. package/src/modules/bmm/workflows/2-plan-workflows/gdd/instructions-gdd.md +52 -21
  366. package/src/modules/bmm/workflows/2-plan-workflows/gdd/workflow.yaml +14 -0
  367. package/src/modules/bmm/workflows/2-plan-workflows/narrative/instructions-narrative.md +73 -22
  368. package/src/modules/bmm/workflows/2-plan-workflows/prd/checklist.md +295 -63
  369. package/src/modules/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/epics-template.md +63 -0
  370. package/src/modules/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/instructions.md +395 -0
  371. package/src/modules/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/workflow.yaml +43 -0
  372. package/src/modules/bmm/workflows/2-plan-workflows/prd/domain-complexity.csv +13 -0
  373. package/src/modules/bmm/workflows/2-plan-workflows/prd/instructions.md +295 -321
  374. package/src/modules/bmm/workflows/2-plan-workflows/prd/prd-template.md +198 -23
  375. package/src/modules/bmm/workflows/2-plan-workflows/prd/project-types.csv +11 -0
  376. package/src/modules/bmm/workflows/2-plan-workflows/prd/workflow.yaml +24 -6
  377. package/src/modules/bmm/workflows/2-plan-workflows/tech-spec/checklist.md +138 -31
  378. package/src/modules/bmm/workflows/2-plan-workflows/tech-spec/epics-template.md +51 -4
  379. package/src/modules/bmm/workflows/2-plan-workflows/tech-spec/instructions-level0-story.md +50 -17
  380. package/src/modules/bmm/workflows/2-plan-workflows/tech-spec/instructions-level1-stories.md +199 -26
  381. package/src/modules/bmm/workflows/2-plan-workflows/tech-spec/instructions.md +1005 -141
  382. package/src/modules/bmm/workflows/2-plan-workflows/tech-spec/tech-spec-template.md +132 -6
  383. package/src/modules/bmm/workflows/2-plan-workflows/tech-spec/user-story-template.md +36 -5
  384. package/src/modules/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml +21 -0
  385. package/src/modules/bmm/workflows/3-solutioning/architecture/architecture-template.md +1 -1
  386. package/src/modules/bmm/workflows/3-solutioning/architecture/instructions.md +91 -79
  387. package/src/modules/bmm/workflows/3-solutioning/architecture/workflow.yaml +17 -4
  388. package/src/modules/bmm/workflows/3-solutioning/solutioning-gate-check/instructions.md +94 -45
  389. package/src/modules/bmm/workflows/3-solutioning/solutioning-gate-check/workflow.yaml +26 -0
  390. package/src/modules/bmm/workflows/4-implementation/code-review/instructions.md +29 -0
  391. package/src/modules/bmm/workflows/4-implementation/code-review/workflow.yaml +20 -0
  392. package/src/modules/bmm/workflows/4-implementation/create-story/instructions.md +31 -0
  393. package/src/modules/bmm/workflows/4-implementation/create-story/workflow.yaml +27 -0
  394. package/src/modules/bmm/workflows/4-implementation/epic-tech-context/instructions.md +29 -0
  395. package/src/modules/bmm/workflows/4-implementation/epic-tech-context/workflow.yaml +31 -5
  396. package/src/modules/bmm/workflows/4-implementation/retrospective/instructions.md +1222 -241
  397. package/src/modules/bmm/workflows/4-implementation/retrospective/workflow.yaml +28 -0
  398. package/src/modules/bmm/workflows/4-implementation/sprint-planning/instructions.md +17 -0
  399. package/src/modules/bmm/workflows/4-implementation/sprint-planning/workflow.yaml +8 -0
  400. package/src/modules/bmm/workflows/4-implementation/story-context/instructions.md +34 -1
  401. package/src/modules/bmm/workflows/4-implementation/story-context/workflow.yaml +27 -0
  402. package/src/modules/bmm/workflows/techdoc/documentation-standards.md +239 -0
  403. package/src/modules/bmm/workflows/workflow-status/init/instructions.md +117 -24
  404. package/src/modules/bmm/workflows/workflow-status/init/workflow.yaml +2 -2
  405. package/src/modules/bmm/workflows/workflow-status/instructions.md +173 -111
  406. package/src/modules/bmm/workflows/workflow-status/sample-level-3-workflow.yaml +49 -0
  407. package/src/modules/bmm/workflows/workflow-status/workflow-status-template.yaml +31 -0
  408. package/src/modules/bmm/workflows/workflow-status/workflow.yaml +3 -3
  409. package/src/modules/cis/README.md +153 -0
  410. package/src/modules/cis/workflows/README.md +102 -30
  411. package/src/modules/cis/workflows/storytelling/instructions.md +10 -2
  412. package/tools/cli/commands/install.js +1 -1
  413. package/tools/cli/installers/lib/core/manifest-generator.js +4 -1
  414. package/.claude/commands/bmad/bmd/agents/cli-chief.md +0 -108
  415. package/.claude/commands/bmad/bmd/agents/doc-keeper.md +0 -115
  416. package/.claude/commands/bmad/bmd/agents/release-chief.md +0 -109
  417. package/.claude/hooks/bmad-tts-injector.sh +0 -415
  418. package/.claude/hooks/bmad-voice-manager.sh +0 -511
  419. package/.claude/hooks/check-output-style.sh +0 -112
  420. package/.claude/hooks/download-extra-voices.sh +0 -244
  421. package/.claude/hooks/github-star-reminder.sh +0 -154
  422. package/.claude/hooks/language-manager.sh +0 -392
  423. package/.claude/hooks/learn-manager.sh +0 -475
  424. package/.claude/hooks/personality-manager.sh +0 -438
  425. package/.claude/hooks/piper-download-voices.sh +0 -165
  426. package/.claude/hooks/piper-installer.sh +0 -178
  427. package/.claude/hooks/piper-multispeaker-registry.sh +0 -165
  428. package/.claude/hooks/piper-voice-manager.sh +0 -293
  429. package/.claude/hooks/play-tts-elevenlabs.sh +0 -404
  430. package/.claude/hooks/play-tts-piper.sh +0 -338
  431. package/.claude/hooks/play-tts.sh +0 -100
  432. package/.claude/hooks/provider-commands.sh +0 -540
  433. package/.claude/hooks/provider-manager.sh +0 -298
  434. package/.claude/hooks/replay-target-audio.sh +0 -95
  435. package/.claude/hooks/sentiment-manager.sh +0 -201
  436. package/.claude/hooks/speed-manager.sh +0 -291
  437. package/.claude/hooks/voice-manager.sh +0 -594
  438. package/.claude/hooks/voices-config.sh +0 -70
  439. package/bmad/_cfg/agents/bmd-cli-chief.customize.yaml +0 -32
  440. package/bmad/bmb/workflows/create-agent/agent-architecture.md.bak +0 -412
  441. package/bmad/bmb/workflows/create-agent/agent-command-patterns.md.bak +0 -759
  442. package/bmad/bmb/workflows/create-module/README.md.bak +0 -218
  443. package/bmad/bmb/workflows/create-module/checklist.md.bak +0 -245
  444. package/bmad/bmb/workflows/create-module/installer-templates/installer.js.bak +0 -231
  445. package/bmad/bmb/workflows/create-module/instructions.md.bak +0 -521
  446. package/bmad/bmb/workflows/create-module/module-structure.md.bak +0 -310
  447. package/bmad/bmd/README.md +0 -193
  448. package/bmad/bmd/README.md.bak +0 -193
  449. package/bmad/bmd/agents/cli-chief-sidecar/instructions.md +0 -102
  450. package/bmad/bmd/agents/cli-chief-sidecar/instructions.md.bak +0 -102
  451. package/bmad/bmd/agents/cli-chief-sidecar/knowledge/README.md +0 -68
  452. package/bmad/bmd/agents/cli-chief-sidecar/knowledge/README.md.bak +0 -68
  453. package/bmad/bmd/agents/cli-chief-sidecar/knowledge/cli-reference.md +0 -123
  454. package/bmad/bmd/agents/cli-chief-sidecar/knowledge/cli-reference.md.bak +0 -123
  455. package/bmad/bmd/agents/cli-chief-sidecar/memories.md +0 -53
  456. package/bmad/bmd/agents/cli-chief-sidecar/memories.md.bak +0 -53
  457. package/bmad/bmd/agents/cli-chief.md +0 -108
  458. package/bmad/bmd/agents/cli-chief.md.bak +0 -108
  459. package/bmad/bmd/agents/doc-keeper-sidecar/instructions.md +0 -177
  460. package/bmad/bmd/agents/doc-keeper-sidecar/instructions.md.bak +0 -177
  461. package/bmad/bmd/agents/doc-keeper-sidecar/knowledge/README.md +0 -81
  462. package/bmad/bmd/agents/doc-keeper-sidecar/knowledge/README.md.bak +0 -81
  463. package/bmad/bmd/agents/doc-keeper-sidecar/memories.md +0 -88
  464. package/bmad/bmd/agents/doc-keeper-sidecar/memories.md.bak +0 -88
  465. package/bmad/bmd/agents/doc-keeper.md +0 -115
  466. package/bmad/bmd/agents/doc-keeper.md.bak +0 -115
  467. package/bmad/bmd/agents/release-chief-sidecar/instructions.md +0 -164
  468. package/bmad/bmd/agents/release-chief-sidecar/instructions.md.bak +0 -164
  469. package/bmad/bmd/agents/release-chief-sidecar/knowledge/README.md +0 -82
  470. package/bmad/bmd/agents/release-chief-sidecar/knowledge/README.md.bak +0 -82
  471. package/bmad/bmd/agents/release-chief-sidecar/memories.md +0 -73
  472. package/bmad/bmd/agents/release-chief-sidecar/memories.md.bak +0 -73
  473. package/bmad/bmd/agents/release-chief.md +0 -109
  474. package/bmad/bmd/agents/release-chief.md.bak +0 -109
  475. package/bmad/docs/codex-instructions.md +0 -21
  476. package/docs/conversion-report-shard-doc-2025-10-26.md +0 -188
  477. package/src/modules/bmm/workflows/1-analysis/brainstorm-game/README.md +0 -38
  478. package/src/modules/bmm/workflows/1-analysis/brainstorm-project/README.md +0 -29
  479. package/src/modules/bmm/workflows/1-analysis/game-brief/README.md +0 -221
  480. package/src/modules/bmm/workflows/1-analysis/research/claude-code/sub-agents/bmm-competitor-analyzer.md +0 -259
  481. package/src/modules/bmm/workflows/1-analysis/research/claude-code/sub-agents/bmm-data-analyst.md +0 -190
  482. package/src/modules/bmm/workflows/1-analysis/research/claude-code/sub-agents/bmm-market-researcher.md +0 -337
  483. package/src/modules/bmm/workflows/1-analysis/research/claude-code/sub-agents/bmm-trend-spotter.md +0 -107
  484. package/src/modules/bmm/workflows/1-analysis/research/claude-code/sub-agents/bmm-user-researcher.md +0 -329
  485. package/src/modules/bmm/workflows/2-plan-workflows/gdd/README.md +0 -222
  486. package/src/modules/bmm/workflows/4-implementation/create-story/README.md +0 -129
  487. package/src/modules/bmm/workflows/README.md +0 -577
  488. package/src/modules/bmm/workflows/workflow-status/workflow-status-template.md +0 -30
  489. package/src/modules/cis/readme.md +0 -86
  490. /package/bmad/_cfg/agents/{bmd-doc-keeper.customize.yaml → bmm-analyst.customize.yaml} +0 -0
  491. /package/bmad/_cfg/agents/{bmd-release-chief.customize.yaml → bmm-architect.customize.yaml} +0 -0
  492. /package/{docs/bmad-brownfield-guide.md → bmad/bmm/docs/brownfield-guide.md} +0 -0
  493. /package/{src/modules → bmad}/bmm/tasks/retrospective.xml +0 -0
  494. /package/{src/modules → bmad}/bmm/testarch/README.md +0 -0
  495. /package/{src/modules → bmad}/bmm/workflows/1-analysis/product-brief/README.md +0 -0
  496. /package/{src/modules → bmad}/bmm/workflows/1-analysis/research/README.md +0 -0
  497. /package/{src/modules → bmad}/bmm/workflows/2-plan-workflows/README.md +0 -0
  498. /package/{src/modules/bmm/workflows/2-plan-workflows/prd → bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories}/epics-template.md +0 -0
  499. /package/{src/modules → bmad}/bmm/workflows/3-solutioning/README.md +0 -0
  500. /package/{src/modules/bmm/workflows/3-solutioning/architecture/readme.md → bmad/bmm/workflows/3-solutioning/architecture/README.md} +0 -0
  501. /package/{src/modules → bmad}/bmm/workflows/3-solutioning/solutioning-gate-check/README.md +0 -0
  502. /package/{src/modules → bmad}/bmm/workflows/4-implementation/README.md +0 -0
  503. /package/{src/modules → bmad}/bmm/workflows/4-implementation/code-review/README.md +0 -0
  504. /package/{src/modules → bmad}/bmm/workflows/4-implementation/correct-course/README.md +0 -0
  505. /package/{src/modules → bmad}/bmm/workflows/4-implementation/dev-story/README.md +0 -0
  506. /package/{src/modules → bmad}/bmm/workflows/4-implementation/epic-tech-context/README.md +0 -0
  507. /package/{src/modules → bmad}/bmm/workflows/4-implementation/retrospective/README.md +0 -0
  508. /package/{src/modules → bmad}/bmm/workflows/4-implementation/sprint-planning/README.md +0 -0
  509. /package/{src/modules → bmad}/bmm/workflows/4-implementation/story-context/README.md +0 -0
  510. /package/{src/modules → bmad}/bmm/workflows/document-project/README.md +0 -0
  511. /package/{src/modules → bmad}/bmm/workflows/document-project/templates/README.md +0 -0
  512. /package/{src/modules → bmad}/bmm/workflows/testarch/README.md +0 -0
  513. /package/{src/modules → bmad}/bmm/workflows/testarch/atdd/README.md +0 -0
  514. /package/{src/modules → bmad}/bmm/workflows/testarch/automate/README.md +0 -0
  515. /package/{src/modules → bmad}/bmm/workflows/testarch/ci/README.md +0 -0
  516. /package/{src/modules → bmad}/bmm/workflows/testarch/framework/README.md +0 -0
  517. /package/{src/modules → bmad}/bmm/workflows/testarch/nfr-assess/README.md +0 -0
  518. /package/{src/modules → bmad}/bmm/workflows/testarch/test-design/README.md +0 -0
  519. /package/{src/modules → bmad}/bmm/workflows/testarch/test-review/README.md +0 -0
  520. /package/{src/modules → bmad}/bmm/workflows/testarch/trace/README.md +0 -0
  521. /package/src/modules/bmm/sub-modules/claude-code/{readme.md → README.md} +0 -0
@@ -0,0 +1,1759 @@
1
+ # BMM Implementation Workflows (Phase 4)
2
+
3
+ **Reading Time:** ~20 minutes
4
+
5
+ ## Overview
6
+
7
+ Phase 4 (Implementation) workflows manage the iterative sprint-based development cycle. This phase uses a **story-centric workflow** where each story moves through a defined lifecycle from creation to completion.
8
+
9
+ **Key principle:** One story at a time, move it through the entire lifecycle before starting the next.
10
+
11
+ ## Quick Reference
12
+
13
+ | Workflow | Agent | Duration | Purpose |
14
+ | --------------------- | --------- | -------------- | ------------------------------------ |
15
+ | **sprint-planning** | SM | 30-60 min | Initialize sprint tracking file |
16
+ | **epic-tech-context** | Architect | 15-30 min/epic | Epic-specific technical guidance |
17
+ | **create-story** | SM | 10-20 min | Create next story from epics |
18
+ | **story-context** | PM | 10-15 min | Assemble dynamic story context |
19
+ | **dev-story** | DEV | 2-8 hours | Implement story with tests |
20
+ | **code-review** | DEV | 30-60 min | Senior dev review of completed story |
21
+ | **correct-course** | SM | 30-90 min | Handle mid-sprint changes |
22
+ | **retrospective** | SM | 60-90 min | Post-epic review and lessons |
23
+ | **workflow-status** | All | 2-5 min | Check "what should I do now?" |
24
+ | **document-project** | Analyst | 1-3 hours | Document brownfield projects |
25
+
26
+ ---
27
+
28
+ ## Understanding the Implementation Phase
29
+
30
+ ### Story Lifecycle
31
+
32
+ Every story moves through this lifecycle:
33
+
34
+ ```
35
+ 1. TODO (Not Started)
36
+ ↓ [sprint-planning creates status file]
37
+
38
+ 2. IN PROGRESS (Being Implemented)
39
+ ↓ [create-story generates story file]
40
+ ↓ [story-context assembles context]
41
+ ↓ [dev-story implements with tests]
42
+
43
+ 3. READY FOR REVIEW (Implementation Complete)
44
+ ↓ [code-review validates quality]
45
+
46
+ 4. DONE (Accepted)
47
+ ↓ [story-done marks complete]
48
+ ↓ [Repeat for next story]
49
+ ```
50
+
51
+ ### Sprint-Based Development Model
52
+
53
+ **Sprint Structure:**
54
+
55
+ - **Sprint 0 (Planning)**: Phases 1-3 complete
56
+ - **Sprint 1**: Epic 1 stories (P0/P1)
57
+ - **Sprint 2**: Epic 2 stories (P0/P1)
58
+ - **Sprint 3**: Epic 3+ stories (P0/P1)
59
+ - **Sprint N**: P2/P3 stories, polish
60
+
61
+ **Typical Sprint Timeline:**
62
+
63
+ - Week 1-2: Epic 1 implementation
64
+ - Week 3-4: Epic 2 implementation
65
+ - Week 5-6: Epic 3 implementation
66
+ - Week 7+: Refinement, P2/P3, polish
67
+
68
+ ### Multi-Agent Workflow
69
+
70
+ Phase 4 involves coordination between agents:
71
+
72
+ | Agent | Primary Workflows | Role |
73
+ | ------------- | ------------------------------------------------------------ | --------------------------- |
74
+ | **SM** | sprint-planning, create-story, correct-course, retrospective | Orchestration, tracking |
75
+ | **Architect** | epic-tech-context | Technical guidance per epic |
76
+ | **PM** | story-context | Context assembly |
77
+ | **DEV** | dev-story, code-review | Implementation, quality |
78
+ | **Analyst** | document-project | Documentation (brownfield) |
79
+
80
+ ---
81
+
82
+ ## sprint-planning
83
+
84
+ ### Purpose
85
+
86
+ Generate and manage the sprint status tracking file for Phase 4 implementation, extracting all epics and stories from epic files and tracking their status through the development lifecycle.
87
+
88
+ **Agent:** SM (Scrum Master)
89
+ **Phase:** 4 (Implementation)
90
+ **Required:** Yes (first step of Phase 4)
91
+ **Typical Duration:** 30-60 minutes
92
+
93
+ ### When to Use
94
+
95
+ Run **once at the start of Phase 4** after solutioning-gate-check passes (or after PRD for Level 0-2).
96
+
97
+ **Trigger Points:**
98
+
99
+ - solutioning-gate-check PASS (Level 3-4)
100
+ - PRD complete (Level 2)
101
+ - tech-spec complete (Level 0-1)
102
+
103
+ ### Purpose of Sprint Planning
104
+
105
+ **Creates:**
106
+
107
+ - Sprint status tracking file (`sprint-status.yaml`)
108
+ - Story queue (ordered by priority and dependencies)
109
+ - Epic-level tracking
110
+ - Sprint assignments
111
+
112
+ **Enables:**
113
+
114
+ - workflow-status to answer "what's next?"
115
+ - Progress tracking throughout implementation
116
+ - Dependency management
117
+ - Velocity measurement
118
+
119
+ ### Process Overview
120
+
121
+ **Phase 1: Context Loading (Step 1)**
122
+
123
+ - Load epics.md
124
+ - Load individual epic files
125
+ - Load architecture.md (if exists)
126
+ - Extract all stories
127
+
128
+ **Phase 2: Story Extraction (Steps 2-3)**
129
+
130
+ - Parse stories from epic files
131
+ - Extract acceptance criteria
132
+ - Identify priorities (P0/P1/P2/P3)
133
+ - Extract dependencies
134
+
135
+ **Phase 3: Sprint Assignment (Steps 4-5)**
136
+
137
+ - Group stories by epic
138
+ - Sequence by priority and dependencies
139
+ - Assign to sprints (Sprint 1, 2, 3, etc.)
140
+ - Calculate sprint capacity estimates
141
+
142
+ **Phase 4: Status File Creation (Step 6)**
143
+
144
+ - Generate sprint-status.yaml
145
+ - Initialize all stories as TODO
146
+ - Document sprint plan
147
+ - Save to output folder
148
+
149
+ ### Inputs
150
+
151
+ Required:
152
+
153
+ - epics.md
154
+ - Epic files (epic-1-_.md, epic-2-_.md, etc.)
155
+
156
+ Optional:
157
+
158
+ - architecture.md (for technical dependencies)
159
+ - Team velocity data (for sprint sizing)
160
+
161
+ ### Outputs
162
+
163
+ **Primary Output:** `sprint-status.yaml`
164
+
165
+ **File Structure:**
166
+
167
+ ```yaml
168
+ metadata:
169
+ project_name: 'E-Commerce Platform'
170
+ total_epics: 3
171
+ total_stories: 24
172
+ current_sprint: 1
173
+ sprint_start_date: '2025-11-02'
174
+
175
+ sprints:
176
+ sprint_1:
177
+ name: 'Epic 1: Authentication'
178
+ start_date: '2025-11-02'
179
+ end_date: '2025-11-15'
180
+ capacity_points: 40
181
+ stories:
182
+ - id: '1.1'
183
+ title: 'User can register with email'
184
+ status: 'TODO'
185
+ priority: 'P0'
186
+ epic: 1
187
+ estimated_hours: 8
188
+ assigned_to: null
189
+ dependencies: []
190
+ - id: '1.2'
191
+ title: 'User can login with email'
192
+ status: 'TODO'
193
+ priority: 'P0'
194
+ epic: 1
195
+ estimated_hours: 6
196
+ assigned_to: null
197
+ dependencies: ['1.1']
198
+
199
+ sprint_2:
200
+ name: 'Epic 2: Product Catalog'
201
+ # ...
202
+
203
+ story_queue:
204
+ - '1.1' # No dependencies, P0
205
+ - '1.2' # Depends on 1.1, P0
206
+ - '1.3' # Depends on 1.2, P0
207
+ # ...
208
+
209
+ epics:
210
+ - id: 1
211
+ name: 'Authentication'
212
+ total_stories: 8
213
+ completed_stories: 0
214
+ status: 'IN_PROGRESS'
215
+ - id: 2
216
+ name: 'Product Catalog'
217
+ total_stories: 10
218
+ completed_stories: 0
219
+ status: 'TODO'
220
+ - id: 3
221
+ name: 'Shopping Cart'
222
+ total_stories: 6
223
+ completed_stories: 0
224
+ status: 'TODO'
225
+ ```
226
+
227
+ ### Example Scenario
228
+
229
+ **Input:** 3 epics with 24 total stories
230
+
231
+ **Output:**
232
+
233
+ - **Sprint 1**: Epic 1 (8 stories, 2 weeks)
234
+ - **Sprint 2**: Epic 2 (10 stories, 2 weeks)
235
+ - **Sprint 3**: Epic 3 (6 stories, 1 week)
236
+
237
+ **Story Queue:**
238
+
239
+ 1. Story 1.1 (P0, no deps) → Start here
240
+ 2. Story 1.2 (P0, deps: 1.1)
241
+ 3. Story 1.3 (P0, deps: 1.2)
242
+ 4. Story 2.1 (P0, no deps) → Can parallelize with 1.x
243
+ ...
244
+
245
+ ### Related Workflows
246
+
247
+ - **solutioning-gate-check** (Phase 3) - Must PASS before sprint-planning
248
+ - **workflow-status** - Uses sprint-status.yaml to answer "what's next?"
249
+ - **create-story** - Uses story_queue to determine next story
250
+
251
+ ---
252
+
253
+ ## epic-tech-context
254
+
255
+ ### Purpose
256
+
257
+ Generate epic-specific technical context document that provides implementation guidance, patterns, and technical decisions for a single epic. Bridges architecture and story implementation.
258
+
259
+ **Agent:** Architect
260
+ **Phase:** 4 (Implementation)
261
+ **Required:** Optional (recommended for Level 3-4)
262
+ **Typical Duration:** 15-30 minutes per epic
263
+
264
+ ### When to Use
265
+
266
+ Run **once per epic** before starting epic stories.
267
+
268
+ **Trigger Points:**
269
+
270
+ - Before implementing first story of an epic
271
+ - When starting a new epic in a sprint
272
+ - When architecture guidance is needed
273
+
274
+ **Skip if:**
275
+
276
+ - Level 0-1 (no epics)
277
+ - Level 2 (simple epics, architecture is straightforward)
278
+
279
+ ### Purpose of Epic Tech Context
280
+
281
+ **Provides:**
282
+
283
+ - Epic-specific technical guidance
284
+ - Code patterns and examples
285
+ - Integration points
286
+ - Testing strategy for epic
287
+ - Epic-level architectural decisions
288
+
289
+ **Prevents:**
290
+
291
+ - Re-reading entire architecture.md for each story
292
+ - Inconsistent implementations within epic
293
+ - Missing epic-level integration patterns
294
+
295
+ ### Process Overview
296
+
297
+ **Phase 1: Context Loading (Step 1)**
298
+
299
+ - Load architecture.md
300
+ - Load epic file (epic-X-\*.md)
301
+ - Load sprint-status.yaml
302
+ - Identify epic stories
303
+
304
+ **Phase 2: Technical Extraction (Steps 2-4)**
305
+
306
+ - Extract relevant architecture sections for epic
307
+ - Identify epic-specific ADRs
308
+ - Determine code patterns
309
+ - Identify integration points
310
+
311
+ **Phase 3: Implementation Guidance (Steps 5-7)**
312
+
313
+ - Define directory structure for epic
314
+ - Specify testing approach
315
+ - Provide code examples
316
+ - Document epic-level constants/config
317
+
318
+ **Phase 4: Documentation (Step 8)**
319
+
320
+ - Generate epic-tech-context.md
321
+ - Save to output folder
322
+ - Update sprint-status.yaml with context path
323
+
324
+ ### Inputs
325
+
326
+ Required:
327
+
328
+ - architecture.md
329
+ - epic-X-\*.md (specific epic file)
330
+ - sprint-status.yaml
331
+
332
+ ### Outputs
333
+
334
+ **Primary Output:** `epic-{N}-tech-context.md`
335
+
336
+ **Document Structure:**
337
+
338
+ 1. Epic Overview
339
+ 2. Relevant Architecture Decisions
340
+ - ADRs applicable to this epic
341
+ - Technology selections
342
+ 3. Directory Structure
343
+ - Files to create/modify
344
+ - Module organization
345
+ 4. Code Patterns
346
+ - Epic-specific patterns
347
+ - Code examples
348
+ 5. Integration Points
349
+ - APIs to create/consume
350
+ - Database interactions
351
+ - Third-party services
352
+ 6. Testing Strategy
353
+ - Test levels for epic (E2E, API, Unit)
354
+ - Test fixtures needed
355
+ - Mock strategies
356
+ 7. Configuration
357
+ - Environment variables
358
+ - Feature flags
359
+ - Constants
360
+
361
+ ### Example: Epic 1 Tech Context (Authentication)
362
+
363
+ ```markdown
364
+ # Epic 1 Tech Context: Authentication
365
+
366
+ ## Architecture Decisions
367
+
368
+ **ADR-001: Use NextAuth.js**
369
+
370
+ - All stories in this epic use NextAuth.js
371
+ - Database adapter: PostgreSQL (via Prisma)
372
+ - Session strategy: Database sessions (not JWT)
373
+
374
+ **ADR-003: Password Security**
375
+
376
+ - Use bcrypt with 12 rounds
377
+ - Minimum password length: 8 characters
378
+ - Require: uppercase, lowercase, number
379
+
380
+ ## Directory Structure
381
+ ```
382
+
383
+ /pages/api/auth/
384
+ [...nextauth].ts # Story 1.1
385
+ register.ts # Story 1.2
386
+ verify-email.ts # Story 1.3
387
+
388
+ /lib/auth/
389
+ validation.ts # Story 1.2
390
+ email-service.ts # Story 1.3
391
+
392
+ /prisma/schema.prisma
393
+ User model # Story 1.1
394
+ Session model # Story 1.1
395
+
396
+ ````
397
+
398
+ ## Code Patterns
399
+
400
+ **User Registration (Story 1.2):**
401
+ ```typescript
402
+ // /lib/auth/validation.ts
403
+ export const validatePassword = (password: string) => {
404
+ const minLength = 8;
405
+ const hasUppercase = /[A-Z]/.test(password);
406
+ const hasLowercase = /[a-z]/.test(password);
407
+ const hasNumber = /\d/.test(password);
408
+
409
+ if (password.length < minLength) {
410
+ throw new Error('Password too short');
411
+ }
412
+ // ...
413
+ };
414
+ ````
415
+
416
+ ## Integration Points
417
+
418
+ **Database:**
419
+
420
+ - Create User table with Prisma migration (Story 1.1)
421
+ - Create Session table with Prisma migration (Story 1.1)
422
+
423
+ **Third-Party Services:**
424
+
425
+ - SendGrid for email verification (Story 1.3)
426
+ - API Key: SENDGRID_API_KEY env variable
427
+ - From email: no-reply@example.com
428
+
429
+ ## Testing Strategy
430
+
431
+ **E2E Tests:**
432
+
433
+ - Story 1.1: Full registration flow
434
+ - Story 1.2: Login flow
435
+ - Story 1.3: Email verification flow
436
+
437
+ **API Tests:**
438
+
439
+ - All /api/auth/\* endpoints
440
+ - Error cases: duplicate email, invalid password
441
+
442
+ **Unit Tests:**
443
+
444
+ - validation.ts functions
445
+ - email-service.ts functions
446
+
447
+ **Test Fixtures:**
448
+
449
+ - Create `tests/fixtures/auth.fixture.ts`
450
+ - Provide: createTestUser(), loginTestUser(), cleanupTestUser()
451
+
452
+ ## Configuration
453
+
454
+ **Environment Variables:**
455
+
456
+ ```
457
+ DATABASE_URL=postgresql://...
458
+ NEXTAUTH_URL=http://localhost:3000
459
+ NEXTAUTH_SECRET=<generate-random-string>
460
+ SENDGRID_API_KEY=SG.xxx
461
+ ```
462
+
463
+ **Constants:**
464
+
465
+ ```typescript
466
+ // /lib/auth/constants.ts
467
+ export const PASSWORD_MIN_LENGTH = 8;
468
+ export const BCRYPT_ROUNDS = 12;
469
+ export const EMAIL_VERIFICATION_EXPIRY_HOURS = 24;
470
+ ```
471
+
472
+ ````
473
+
474
+ ### Related Workflows
475
+ - **architecture** (Phase 3) - Source of technical guidance
476
+ - **story-context** - Uses epic-tech-context as input
477
+ - **dev-story** - References epic-tech-context during implementation
478
+
479
+ ---
480
+
481
+ ## create-story
482
+
483
+ ### Purpose
484
+ Create the next user story markdown from epics/PRD and architecture, using a standard template and saving to the stories folder.
485
+
486
+ **Agent:** SM (Scrum Master)
487
+ **Phase:** 4 (Implementation)
488
+ **Required:** Yes (for each story)
489
+ **Typical Duration:** 10-20 minutes per story
490
+
491
+ ### When to Use
492
+ Run **before implementing each story** to generate story file.
493
+
494
+ **Trigger Points:**
495
+ - Before starting work on a new story
496
+ - When story_queue identifies next story
497
+ - After completing previous story
498
+
499
+ ### Process Overview
500
+
501
+ **Phase 1: Story Selection (Step 1)**
502
+ - Load sprint-status.yaml
503
+ - Read story_queue
504
+ - Select next story (first in queue with dependencies met)
505
+
506
+ **Phase 2: Story Extraction (Steps 2-3)**
507
+ - Load epic file for selected story
508
+ - Extract story details
509
+ - Extract acceptance criteria
510
+ - Extract dependencies
511
+
512
+ **Phase 3: Context Gathering (Steps 4-5)**
513
+ - Load PRD/GDD for product context
514
+ - Load architecture for technical context
515
+ - Load epic-tech-context (if exists)
516
+
517
+ **Phase 4: Story File Creation (Step 6)**
518
+ - Generate story markdown using template
519
+ - Include acceptance criteria
520
+ - Include technical notes
521
+ - Save to stories/ folder
522
+
523
+ **Phase 5: Status Update (Step 7)**
524
+ - Update sprint-status.yaml
525
+ - Move story from TODO → IN PROGRESS
526
+ - Update workflow-status.md
527
+
528
+ ### Inputs
529
+ Required:
530
+ - sprint-status.yaml (story queue)
531
+ - epic-X-*.md (for story details)
532
+ - PRD.md or GDD.md
533
+
534
+ Optional:
535
+ - architecture.md
536
+ - epic-tech-context.md
537
+
538
+ ### Outputs
539
+
540
+ **Primary Output:** `story-{epic}.{num}-{title}.md`
541
+
542
+ **Story File Structure:**
543
+ ```markdown
544
+ # Story {Epic}.{Num}: {Title}
545
+
546
+ **Epic:** {Epic Name}
547
+ **Priority:** P0/P1/P2/P3
548
+ **Status:** IN PROGRESS
549
+ **Estimated Hours:** {Hours}
550
+ **Dependencies:** {Story IDs or "None"}
551
+
552
+ ## User Story
553
+
554
+ As a {user type},
555
+ I want to {action},
556
+ So that {benefit}.
557
+
558
+ ## Acceptance Criteria
559
+
560
+ - [ ] AC-1: {Criterion}
561
+ - [ ] AC-2: {Criterion}
562
+ - [ ] AC-3: {Criterion}
563
+
564
+ ## Technical Notes
565
+
566
+ {From architecture/epic-tech-context}
567
+
568
+ ## Implementation Checklist
569
+
570
+ - [ ] Read story-context.xml for dynamic context
571
+ - [ ] Implement feature code
572
+ - [ ] Write tests (unit, integration, E2E as needed)
573
+ - [ ] Update documentation
574
+ - [ ] Run tests locally
575
+ - [ ] Verify acceptance criteria
576
+ - [ ] Mark story as READY FOR REVIEW
577
+
578
+ ## Definition of Done
579
+
580
+ - [ ] All acceptance criteria met
581
+ - [ ] Tests written and passing
582
+ - [ ] Code reviewed
583
+ - [ ] Documentation updated
584
+ - [ ] No regressions in existing features
585
+ ````
586
+
587
+ ### Example: Story 1.2 - User Can Login
588
+
589
+ ```markdown
590
+ # Story 1.2: User Can Login with Email
591
+
592
+ **Epic:** Epic 1 - Authentication
593
+ **Priority:** P0
594
+ **Status:** IN PROGRESS
595
+ **Estimated Hours:** 6
596
+ **Dependencies:** Story 1.1 (User Registration)
597
+
598
+ ## User Story
599
+
600
+ As a registered user,
601
+ I want to login with my email and password,
602
+ So that I can access my account.
603
+
604
+ ## Acceptance Criteria
605
+
606
+ - [ ] AC-1: User can enter email and password on login page
607
+ - [ ] AC-2: Valid credentials redirect to dashboard
608
+ - [ ] AC-3: Invalid credentials show error message
609
+ - [ ] AC-4: Error message does not reveal if email exists (security)
610
+ - [ ] AC-5: Login creates session that persists across page refreshes
611
+
612
+ ## Technical Notes
613
+
614
+ **From Architecture (ADR-001):**
615
+
616
+ - Use NextAuth.js with database session strategy
617
+ - Session stored in PostgreSQL via Prisma
618
+
619
+ **From Epic Tech Context:**
620
+
621
+ - Implement /pages/api/auth/[...nextauth].ts
622
+ - Use bcrypt.compare() for password validation
623
+ - Return generic error for security (don't reveal "email not found" vs "wrong password")
624
+
625
+ ## Implementation Checklist
626
+
627
+ - [ ] Read story-context.xml
628
+ - [ ] Create /pages/login.tsx
629
+ - [ ] Configure NextAuth.js credentials provider
630
+ - [ ] Implement password comparison logic
631
+ - [ ] Write E2E test: Valid login → Dashboard
632
+ - [ ] Write E2E test: Invalid login → Error
633
+ - [ ] Write API test: POST /api/auth/callback/credentials
634
+ - [ ] Verify AC-1 through AC-5
635
+ - [ ] Mark READY FOR REVIEW
636
+
637
+ ## Definition of Done
638
+
639
+ - [ ] Login page exists and is styled
640
+ - [ ] Valid credentials authenticate successfully
641
+ - [ ] Invalid credentials show error
642
+ - [ ] Session persists across page loads
643
+ - [ ] Tests pass (2 E2E, 3 API)
644
+ - [ ] Code reviewed
645
+ ```
646
+
647
+ ### Related Workflows
648
+
649
+ - **sprint-planning** - Creates story_queue
650
+ - **story-context** - Run after create-story
651
+ - **dev-story** - Implements the story
652
+
653
+ ---
654
+
655
+ ## story-context
656
+
657
+ ### Purpose
658
+
659
+ Assemble dynamic story context XML by pulling latest documentation and existing code/library artifacts relevant to a drafted story.
660
+
661
+ **Agent:** PM (Project Manager)
662
+ **Phase:** 4 (Implementation)
663
+ **Required:** Yes (before implementing story)
664
+ **Typical Duration:** 10-15 minutes per story
665
+
666
+ ### When to Use
667
+
668
+ Run **after create-story** and **before dev-story** for each story.
669
+
670
+ **Trigger Points:**
671
+
672
+ - Immediately after create-story generates story file
673
+ - Before DEV agent starts implementation
674
+
675
+ ### Purpose of Story Context
676
+
677
+ **Problem Without Context:**
678
+
679
+ - DEV agent re-reads entire PRD, architecture, epic files (100+ pages)
680
+ - Slow context loading
681
+ - Irrelevant information clutters thinking
682
+
683
+ **Solution With Context:**
684
+
685
+ - PM assembles **only relevant** context for this story
686
+ - DEV agent receives focused, story-specific information
687
+ - Fast, targeted implementation
688
+
689
+ ### Process Overview
690
+
691
+ **Phase 1: Story Loading (Step 1)**
692
+
693
+ - Load story file (story-{epic}.{num}-{title}.md)
694
+ - Extract story ID, epic, dependencies
695
+ - Extract acceptance criteria
696
+
697
+ **Phase 2: Documentation Context (Steps 2-4)**
698
+
699
+ - Load relevant PRD/GDD sections
700
+ - Load relevant architecture sections
701
+ - Load epic-tech-context (if exists)
702
+ - Load dependent story files
703
+
704
+ **Phase 3: Code Context (Steps 5-6)**
705
+
706
+ - Identify existing code files related to story
707
+ - Load relevant library code (models, services, utils)
708
+ - Load related test files
709
+
710
+ **Phase 4: Context Assembly (Step 7)**
711
+
712
+ - Generate story-context.xml
713
+ - Organize context by type (docs, code, tests)
714
+ - Include only relevant sections
715
+ - Save to output folder
716
+
717
+ ### Inputs
718
+
719
+ Required:
720
+
721
+ - story-{epic}.{num}-{title}.md
722
+
723
+ Optional (loaded as needed):
724
+
725
+ - PRD.md or GDD.md
726
+ - architecture.md
727
+ - epic-tech-context.md
728
+ - Existing codebase files
729
+
730
+ ### Outputs
731
+
732
+ **Primary Output:** `story-{epic}.{num}-context.xml`
733
+
734
+ **XML Structure:**
735
+
736
+ ```xml
737
+ <story-context>
738
+ <story id="1.2" epic="1" title="User Can Login">
739
+ <acceptance-criteria>
740
+ <criterion id="AC-1">User can enter email and password on login page</criterion>
741
+ <criterion id="AC-2">Valid credentials redirect to dashboard</criterion>
742
+ <!-- ... -->
743
+ </acceptance-criteria>
744
+ </story>
745
+
746
+ <product-context>
747
+ <section source="PRD.md" name="Authentication Requirements">
748
+ <!-- Relevant PRD excerpt -->
749
+ </section>
750
+ </product-context>
751
+
752
+ <architecture-context>
753
+ <adr id="ADR-001" title="Use NextAuth.js">
754
+ <!-- Full ADR content -->
755
+ </adr>
756
+ <section source="architecture.md" name="Authentication Architecture">
757
+ <!-- Relevant architecture excerpt -->
758
+ </section>
759
+ </architecture-context>
760
+
761
+ <epic-context>
762
+ <section source="epic-1-tech-context.md">
763
+ <!-- Epic-specific technical guidance -->
764
+ </section>
765
+ </epic-context>
766
+
767
+ <code-context>
768
+ <file path="/prisma/schema.prisma">
769
+ <!-- Existing User model -->
770
+ </file>
771
+ <file path="/lib/auth/validation.ts">
772
+ <!-- Existing validation functions -->
773
+ </file>
774
+ </code-context>
775
+
776
+ <dependency-context>
777
+ <story id="1.1" title="User Can Register">
778
+ <!-- Story 1.1 summary for context -->
779
+ </story>
780
+ </dependency-context>
781
+ </story-context>
782
+ ```
783
+
784
+ ### Example: Story 1.2 Context Assembly
785
+
786
+ **Story 1.2: User Can Login**
787
+
788
+ **Context Assembled:**
789
+
790
+ 1. **Product Context** (from PRD):
791
+ - Authentication requirements section (2 pages)
792
+ - User personas: Primary user is buyer
793
+
794
+ 2. **Architecture Context** (from architecture.md):
795
+ - ADR-001: Use NextAuth.js (full ADR)
796
+ - Authentication Architecture section (1 page)
797
+
798
+ 3. **Epic Context** (from epic-1-tech-context.md):
799
+ - Code patterns for login
800
+ - Integration points (NextAuth.js config)
801
+ - Testing strategy
802
+
803
+ 4. **Code Context** (existing files):
804
+ - `/prisma/schema.prisma` - User and Session models
805
+ - `/lib/auth/validation.ts` - Password validation (from Story 1.1)
806
+ - `/pages/api/auth/[...nextauth].ts` - Auth config (created in Story 1.1)
807
+
808
+ 5. **Dependency Context** (Story 1.1):
809
+ - Summary: User registration creates User in DB
810
+ - Dependency: User table must exist
811
+
812
+ **Result:** DEV agent receives 8-10 pages of **focused** context instead of 100+ pages of full documentation.
813
+
814
+ ### Related Workflows
815
+
816
+ - **create-story** - Creates story file that story-context uses
817
+ - **dev-story** - Consumes story-context.xml
818
+
819
+ ---
820
+
821
+ ## dev-story
822
+
823
+ ### Purpose
824
+
825
+ Execute a story by implementing tasks/subtasks, writing tests, validating, and updating the story file per acceptance criteria.
826
+
827
+ **Agent:** DEV (Developer)
828
+ **Phase:** 4 (Implementation)
829
+ **Required:** Yes (for each story)
830
+ **Typical Duration:** 2-8 hours per story (varies by complexity)
831
+
832
+ ### When to Use
833
+
834
+ Run **after story-context** to implement the story.
835
+
836
+ **Trigger Points:**
837
+
838
+ - After story-context.xml is generated
839
+ - When story status is IN PROGRESS
840
+ - For each story in story_queue
841
+
842
+ ### Process Overview
843
+
844
+ **Phase 1: Context Loading (Step 1)**
845
+
846
+ - Load story file
847
+ - Load story-context.xml
848
+ - Review acceptance criteria
849
+ - Review technical notes
850
+
851
+ **Phase 2: Implementation Planning (Steps 2-3)**
852
+
853
+ - Break story into tasks
854
+ - Identify files to create/modify
855
+ - Plan test strategy
856
+ - Estimate implementation approach
857
+
858
+ **Phase 3: Implementation (Steps 4-6)**
859
+
860
+ - Write code to satisfy acceptance criteria
861
+ - Follow architecture decisions
862
+ - Apply code patterns from epic-tech-context
863
+ - Write tests (unit, integration, E2E as needed)
864
+
865
+ **Phase 4: Validation (Steps 7-8)**
866
+
867
+ - Run tests locally
868
+ - Verify all acceptance criteria met
869
+ - Check for regressions
870
+ - Ensure code quality
871
+
872
+ **Phase 5: Documentation (Step 9)**
873
+
874
+ - Update story file (check off AC items)
875
+ - Document any deviations
876
+ - Mark story as READY FOR REVIEW
877
+ - Update sprint-status.yaml
878
+
879
+ ### Inputs
880
+
881
+ Required:
882
+
883
+ - story-{epic}.{num}-{title}.md
884
+ - story-{epic}.{num}-context.xml
885
+
886
+ ### Outputs
887
+
888
+ - Implementation code (multiple files)
889
+ - Test files
890
+ - Updated story file (AC checked off)
891
+ - Updated sprint-status.yaml (status: READY FOR REVIEW)
892
+
893
+ ### Example: Implementing Story 1.2 (Login)
894
+
895
+ **Phase 1: Planning**
896
+ Tasks identified:
897
+
898
+ 1. Create /pages/login.tsx (UI)
899
+ 2. Configure NextAuth credentials provider
900
+ 3. Implement password verification logic
901
+ 4. Write E2E test: Valid login
902
+ 5. Write E2E test: Invalid login
903
+ 6. Write API test: /api/auth/callback/credentials
904
+
905
+ **Phase 2: Implementation**
906
+ Files created/modified:
907
+
908
+ - `/pages/login.tsx` (new)
909
+ - `/pages/api/auth/[...nextauth].ts` (modified - add credentials provider)
910
+ - `/lib/auth/password.ts` (new - password verification)
911
+ - `/tests/e2e/auth-login.spec.ts` (new)
912
+ - `/tests/api/auth-api.spec.ts` (modified - add login tests)
913
+
914
+ **Phase 3: Testing**
915
+
916
+ ```bash
917
+ npm run test:e2e
918
+ npm run test:api
919
+ npm run test:unit
920
+ ```
921
+
922
+ All tests pass ✅
923
+
924
+ **Phase 4: Verification**
925
+
926
+ - [x] AC-1: Login page exists with email/password inputs
927
+ - [x] AC-2: Valid credentials → Dashboard
928
+ - [x] AC-3: Invalid credentials → Error message
929
+ - [x] AC-4: Error message generic (security)
930
+ - [x] AC-5: Session persists across page refreshes
931
+
932
+ **Phase 5: Documentation**
933
+ Update story file:
934
+
935
+ ```markdown
936
+ ## Acceptance Criteria
937
+
938
+ - [x] AC-1: User can enter email and password on login page
939
+ - [x] AC-2: Valid credentials redirect to dashboard
940
+ - [x] AC-3: Invalid credentials show error message
941
+ - [x] AC-4: Error message does not reveal if email exists (security)
942
+ - [x] AC-5: Login creates session that persists across page refreshes
943
+
944
+ ## Implementation Summary
945
+
946
+ Files Created:
947
+
948
+ - /pages/login.tsx
949
+ - /lib/auth/password.ts
950
+ - /tests/e2e/auth-login.spec.ts
951
+
952
+ Files Modified:
953
+
954
+ - /pages/api/auth/[...nextauth].ts
955
+ - /tests/api/auth-api.spec.ts
956
+
957
+ Tests Added:
958
+
959
+ - 2 E2E tests (valid/invalid login)
960
+ - 3 API tests (credentials endpoint)
961
+
962
+ **Status:** READY FOR REVIEW
963
+ ```
964
+
965
+ ### Related Workflows
966
+
967
+ - **story-context** - Provides focused context
968
+ - **code-review** - Next step after implementation
969
+ - **correct-course** - If changes needed mid-story
970
+
971
+ ---
972
+
973
+ ## code-review
974
+
975
+ ### Purpose
976
+
977
+ Perform a Senior Developer code review on a completed story flagged Ready for Review, leveraging story-context, epic tech-spec, repo docs, MCP servers for latest best-practices, and web search as fallback.
978
+
979
+ **Agent:** DEV (Senior Developer persona)
980
+ **Phase:** 4 (Implementation)
981
+ **Required:** Recommended (especially for P0/P1 stories)
982
+ **Typical Duration:** 30-60 minutes per story
983
+
984
+ ### When to Use
985
+
986
+ Run **after dev-story** when story status is READY FOR REVIEW.
987
+
988
+ **Trigger Points:**
989
+
990
+ - Story status: READY FOR REVIEW
991
+ - Before marking story as DONE
992
+ - For P0/P1 stories (required)
993
+ - For P2/P3 stories (optional but recommended)
994
+
995
+ ### Process Overview
996
+
997
+ **Phase 1: Context Loading (Step 1)**
998
+
999
+ - Load story file
1000
+ - Load story-context.xml
1001
+ - Load implementation files
1002
+ - Load test files
1003
+
1004
+ **Phase 2: Review Criteria (Steps 2-5)**
1005
+
1006
+ - **Acceptance Criteria**: All AC met?
1007
+ - **Architecture Alignment**: Follows architecture decisions?
1008
+ - **Code Quality**: Readable, maintainable, follows conventions?
1009
+ - **Test Coverage**: Sufficient tests, tests passing?
1010
+ - **Best Practices**: Uses latest framework patterns?
1011
+
1012
+ **Phase 3: Knowledge Loading (Steps 6-7)**
1013
+
1014
+ - Load repository documentation (CONTRIBUTING.md, CODE_STYLE.md)
1015
+ - Use MCP servers for framework best practices (if available)
1016
+ - Web search for latest patterns (fallback)
1017
+
1018
+ **Phase 4: Review Execution (Steps 8-10)**
1019
+
1020
+ - Review each file changed
1021
+ - Identify issues (critical, high, medium, low)
1022
+ - Suggest improvements
1023
+ - Verify tests
1024
+
1025
+ **Phase 5: Review Report (Step 11)**
1026
+
1027
+ - Generate code-review.md
1028
+ - Append to story file
1029
+ - Update sprint-status.yaml
1030
+
1031
+ ### Review Criteria
1032
+
1033
+ **Acceptance Criteria Validation:**
1034
+
1035
+ - [ ] All AC items checked off in story file
1036
+ - [ ] AC validated through tests
1037
+ - [ ] AC validated manually (if needed)
1038
+
1039
+ **Architecture Alignment:**
1040
+
1041
+ - [ ] Follows ADRs
1042
+ - [ ] Uses specified technology choices
1043
+ - [ ] Follows directory structure conventions
1044
+ - [ ] Follows code patterns from epic-tech-context
1045
+
1046
+ **Code Quality:**
1047
+
1048
+ - [ ] Readable and maintainable
1049
+ - [ ] Follows repository conventions
1050
+ - [ ] No code smells (long functions, god classes, etc.)
1051
+ - [ ] Appropriate error handling
1052
+ - [ ] Security best practices followed
1053
+
1054
+ **Test Coverage:**
1055
+
1056
+ - [ ] Tests exist for all AC
1057
+ - [ ] Tests pass locally
1058
+ - [ ] Edge cases covered
1059
+ - [ ] Tests follow framework best practices
1060
+ - [ ] No flaky tests
1061
+
1062
+ **Best Practices:**
1063
+
1064
+ - [ ] Uses latest framework patterns
1065
+ - [ ] Avoids deprecated APIs
1066
+ - [ ] Performance considerations addressed
1067
+ - [ ] Accessibility requirements met (if applicable)
1068
+
1069
+ ### Inputs
1070
+
1071
+ Required:
1072
+
1073
+ - story-{epic}.{num}-{title}.md (with READY FOR REVIEW status)
1074
+ - story-{epic}.{num}-context.xml
1075
+ - Implementation files (code)
1076
+ - Test files
1077
+
1078
+ Optional:
1079
+
1080
+ - Repository documentation (CONTRIBUTING.md, CODE_STYLE.md)
1081
+ - MCP servers for best practices
1082
+ - Web search for latest patterns
1083
+
1084
+ ### Outputs
1085
+
1086
+ **Primary Output:** Code review appended to story file
1087
+
1088
+ **Review Structure:**
1089
+
1090
+ ````markdown
1091
+ ---
1092
+
1093
+ ## Code Review - {Date}
1094
+
1095
+ **Reviewer:** DEV (Senior Developer)
1096
+ **Status:** APPROVED / REQUEST CHANGES / APPROVED WITH COMMENTS
1097
+
1098
+ ### Summary
1099
+
1100
+ {Overall assessment}
1101
+
1102
+ ### Acceptance Criteria Validation
1103
+
1104
+ - [x] AC-1: Validated ✅
1105
+ - [x] AC-2: Validated ✅
1106
+ - [x] AC-3: Validated ✅
1107
+ - [x] AC-4: Validated ✅
1108
+ - [x] AC-5: Validated ✅
1109
+
1110
+ ### Architecture Alignment
1111
+
1112
+ ✅ Follows ADR-001 (NextAuth.js)
1113
+ ✅ Uses database session strategy
1114
+ ✅ Follows epic-tech-context patterns
1115
+
1116
+ ### Code Quality Issues
1117
+
1118
+ **Critical Issues (Must Fix):**
1119
+ None
1120
+
1121
+ **High Priority (Should Fix Before Merge):**
1122
+
1123
+ 1. /lib/auth/password.ts:15 - Use constant for bcrypt rounds instead of magic number
1124
+
1125
+ ```typescript
1126
+ // Current:
1127
+ const hash = await bcrypt.hash(password, 12);
1128
+
1129
+ // Suggested:
1130
+ import { BCRYPT_ROUNDS } from './constants';
1131
+ const hash = await bcrypt.hash(password, BCRYPT_ROUNDS);
1132
+ ```
1133
+ ````
1134
+
1135
+ **Medium Priority (Address in Follow-up):**
1136
+
1137
+ 1. /pages/login.tsx:42 - Consider extracting form validation to custom hook
1138
+ 2. Add JSDoc comments to public functions in /lib/auth/password.ts
1139
+
1140
+ **Low Priority (Nice to Have):**
1141
+
1142
+ 1. Consider using react-hook-form for login form (reduces boilerplate)
1143
+
1144
+ ### Test Coverage
1145
+
1146
+ ✅ E2E tests cover happy and sad paths
1147
+ ✅ API tests cover error cases
1148
+ ⚠️ Consider adding unit test for password validation edge cases
1149
+
1150
+ ### Best Practices
1151
+
1152
+ ✅ Uses latest Next.js 14 patterns
1153
+ ✅ Follows React best practices
1154
+ ✅ Accessibility: Form has labels and error messages
1155
+
1156
+ ### Recommendation
1157
+
1158
+ **APPROVED WITH COMMENTS** - Address high priority issue #1, then merge.
1159
+
1160
+ Medium/low priority items can be addressed in future stories.
1161
+
1162
+ ````
1163
+
1164
+ ### Review Outcomes
1165
+
1166
+ **APPROVED** ✅
1167
+ - All criteria met
1168
+ - No critical/high issues
1169
+ - Story can be marked DONE
1170
+ - **Action**: Run story-done workflow
1171
+
1172
+ **APPROVED WITH COMMENTS** ✅⚠️
1173
+ - Minor issues noted
1174
+ - Suggestions for improvement
1175
+ - Story can be marked DONE
1176
+ - **Action**: Address comments in follow-up (optional)
1177
+
1178
+ **REQUEST CHANGES** ❌
1179
+ - Critical or high-priority issues found
1180
+ - Changes required before merge
1181
+ - Story remains READY FOR REVIEW
1182
+ - **Action**: Fix issues, re-request review
1183
+
1184
+ ### Related Workflows
1185
+ - **dev-story** - Implementation that's being reviewed
1186
+ - **story-done** - Next step if approved
1187
+ - **correct-course** - If significant changes needed
1188
+
1189
+ ---
1190
+
1191
+ ## correct-course
1192
+
1193
+ ### Purpose
1194
+ Navigate significant changes during sprint execution by analyzing impact, proposing solutions, and routing for implementation.
1195
+
1196
+ **Agent:** SM (Scrum Master)
1197
+ **Phase:** 4 (Implementation)
1198
+ **Required:** As needed
1199
+ **Typical Duration:** 30-90 minutes
1200
+
1201
+ ### When to Use
1202
+ Run when **significant changes** occur mid-sprint:
1203
+
1204
+ **Trigger Scenarios:**
1205
+ - New requirements discovered during implementation
1206
+ - Architecture decision needs revision
1207
+ - Story dependencies change
1208
+ - External factors impact sprint (API changes, platform updates)
1209
+ - Critical bug discovered requiring immediate attention
1210
+
1211
+ **Don't Use For:**
1212
+ - Minor clarifications → Clarify in story file
1213
+ - Small scope adjustments → Adjust AC in story
1214
+ - Typical development blockers → Resolve within team
1215
+
1216
+ ### Process Overview
1217
+
1218
+ **Phase 1: Change Analysis (Steps 1-3)**
1219
+ - Identify change type (requirements, technical, external)
1220
+ - Assess impact (stories, epics, architecture)
1221
+ - Determine urgency (blocking, high, medium, low)
1222
+
1223
+ **Phase 2: Impact Assessment (Steps 4-6)**
1224
+ - Stories affected
1225
+ - Epics affected
1226
+ - Architecture changes needed
1227
+ - Timeline impact
1228
+
1229
+ **Phase 3: Solution Proposal (Steps 7-9)**
1230
+ - **Option A**: Adjust scope (remove stories, defer features)
1231
+ - **Option B**: Adjust architecture (revise decisions)
1232
+ - **Option C**: Adjust timeline (extend sprint)
1233
+ - **Option D**: Combination approach
1234
+
1235
+ **Phase 4: Decision and Routing (Steps 10-12)**
1236
+ - Consult stakeholders (if needed)
1237
+ - Select solution
1238
+ - Route to appropriate workflow:
1239
+ - Requirements change → Update PRD → Re-run create-story
1240
+ - Architecture change → Update architecture → Re-run epic-tech-context
1241
+ - Story change → Update story file → Continue dev-story
1242
+ - Update sprint-status.yaml
1243
+
1244
+ ### Change Types
1245
+
1246
+ **Requirements Change:**
1247
+ - New AC discovered
1248
+ - AC invalidated by new information
1249
+ - Feature scope expansion/reduction
1250
+
1251
+ **Technical Change:**
1252
+ - Architecture decision no longer viable
1253
+ - Technology choice needs revision
1254
+ - Integration approach changed
1255
+
1256
+ **External Change:**
1257
+ - Third-party API changed
1258
+ - Platform update breaks implementation
1259
+ - Regulatory requirement introduced
1260
+
1261
+ ### Inputs
1262
+ Required:
1263
+ - Description of change
1264
+ - Current story/epic affected
1265
+ - Current sprint-status.yaml
1266
+
1267
+ ### Outputs
1268
+ - Change impact analysis document
1269
+ - Updated documentation (PRD/architecture/stories)
1270
+ - Updated sprint-status.yaml
1271
+ - Routing recommendations
1272
+
1273
+ ### Example: API Change Mid-Sprint
1274
+
1275
+ **Change:** SendGrid deprecated email API, requires migration to new API
1276
+
1277
+ **Impact Analysis:**
1278
+ - **Stories Affected**: Story 1.3 (Email Verification) - IN PROGRESS
1279
+ - **Epics Affected**: Epic 1 (Authentication)
1280
+ - **Architecture Impact**: ADR-004 (Email Service) needs revision
1281
+ - **Timeline Impact**: +1 day (API migration work)
1282
+
1283
+ **Solution Options:**
1284
+
1285
+ **Option A:** Continue with deprecated API, plan migration for later
1286
+ - **Pros**: No sprint disruption
1287
+ - **Cons**: Technical debt, API sunset in 6 months
1288
+
1289
+ **Option B:** Migrate to new API now
1290
+ - **Pros**: No technical debt, future-proof
1291
+ - **Cons**: +1 day to sprint
1292
+
1293
+ **Option C:** Defer email verification to next sprint
1294
+ - **Pros**: No disruption to current sprint
1295
+ - **Cons**: Story 1.3 incomplete, Epic 1 not done
1296
+
1297
+ **Decision:** Option B (Migrate now)
1298
+
1299
+ **Actions:**
1300
+ 1. Update architecture.md (ADR-004: Use SendGrid v4 API)
1301
+ 2. Update epic-1-tech-context.md (new email patterns)
1302
+ 3. Update Story 1.3 acceptance criteria (new API endpoints)
1303
+ 4. Continue dev-story with new approach
1304
+ 5. Extend sprint by 1 day
1305
+
1306
+ ### Related Workflows
1307
+ - **architecture** - May need updates
1308
+ - **create-story** - May need to create new stories
1309
+ - **sprint-planning** - May need to re-prioritize
1310
+ - **retrospective** - Document learnings
1311
+
1312
+ ---
1313
+
1314
+ ## retrospective
1315
+
1316
+ ### Purpose
1317
+ Run after epic completion to review overall success, extract lessons learned, and explore if new information emerged that might impact the next epic.
1318
+
1319
+ **Agent:** SM (Scrum Master)
1320
+ **Phase:** 4 (Implementation)
1321
+ **Required:** Recommended (after each epic)
1322
+ **Typical Duration:** 60-90 minutes
1323
+
1324
+ ### When to Use
1325
+ Run **after completing an epic** (all stories DONE).
1326
+
1327
+ **Trigger Points:**
1328
+ - Epic status: DONE
1329
+ - All epic stories completed
1330
+ - Before starting next epic
1331
+ - Before final release (after all epics)
1332
+
1333
+ ### Process Overview
1334
+
1335
+ **Phase 1: Data Gathering (Steps 1-3)**
1336
+ - Load sprint-status.yaml
1337
+ - Load completed story files
1338
+ - Load code-review feedback
1339
+ - Gather metrics (velocity, story cycle time)
1340
+
1341
+ **Phase 2: Review Execution (Steps 4-7)**
1342
+ - **What Went Well**: Successes and wins
1343
+ - **What Didn't Go Well**: Challenges and issues
1344
+ - **Lessons Learned**: Actionable insights
1345
+ - **Process Improvements**: Changes for next epic
1346
+
1347
+ **Phase 3: Technical Insights (Steps 8-10)**
1348
+ - Architecture decisions review
1349
+ - Technology choices validation
1350
+ - Code quality assessment
1351
+ - Test coverage and quality
1352
+
1353
+ **Phase 4: Planning Insights (Steps 11-13)**
1354
+ - Estimation accuracy
1355
+ - Requirements clarity
1356
+ - Dependency management
1357
+ - Scope changes
1358
+
1359
+ **Phase 5: Action Items (Step 14)**
1360
+ - Process changes for next epic
1361
+ - Architecture updates needed
1362
+ - Documentation improvements
1363
+ - Training or knowledge gaps
1364
+
1365
+ ### Inputs
1366
+ Required:
1367
+ - sprint-status.yaml (epic completion data)
1368
+ - Completed story files
1369
+ - code-review feedback
1370
+
1371
+ Optional:
1372
+ - Team velocity data
1373
+ - CI/CD metrics
1374
+ - Bug reports
1375
+
1376
+ ### Outputs
1377
+
1378
+ **Primary Output:** `retrospective-epic-{N}-{date}.md`
1379
+
1380
+ **Document Structure:**
1381
+ 1. Epic Summary
1382
+ - Stories completed
1383
+ - Time taken
1384
+ - Velocity achieved
1385
+ 2. What Went Well
1386
+ 3. What Didn't Go Well
1387
+ 4. Lessons Learned
1388
+ 5. Technical Insights
1389
+ 6. Planning Insights
1390
+ 7. Action Items for Next Epic
1391
+ 8. Process Improvements
1392
+
1393
+ ### Example: Epic 1 Retrospective
1394
+
1395
+ ```markdown
1396
+ # Retrospective: Epic 1 - Authentication
1397
+
1398
+ **Date:** 2025-11-15
1399
+ **Duration:** 2 weeks (planned), 2.5 weeks (actual)
1400
+ **Stories Completed:** 8/8
1401
+ **Velocity:** 48 points (target: 60 points)
1402
+
1403
+ ## What Went Well
1404
+
1405
+ ✅ **Architecture decisions solid**
1406
+ - NextAuth.js choice worked well
1407
+ - Database sessions simpler than JWT
1408
+
1409
+ ✅ **Test coverage excellent**
1410
+ - All stories have E2E + API tests
1411
+ - No critical bugs in production
1412
+
1413
+ ✅ **Team collaboration strong**
1414
+ - Code reviews thorough
1415
+ - Knowledge sharing effective
1416
+
1417
+ ## What Didn't Go Well
1418
+
1419
+ ❌ **Estimation inaccurate**
1420
+ - Stories took 20% longer than estimated
1421
+ - Story 1.3 (Email Verification) took 2 days instead of 1
1422
+
1423
+ ❌ **Third-party integration surprise**
1424
+ - SendGrid API deprecation discovered mid-sprint
1425
+ - Required correct-course workflow
1426
+
1427
+ ❌ **Testing setup overhead**
1428
+ - Test fixtures took longer than expected to set up
1429
+ - Should have created fixtures earlier
1430
+
1431
+ ## Lessons Learned
1432
+
1433
+ 💡 **Buffer time for integrations**
1434
+ - Add 25% buffer to stories with third-party APIs
1435
+ - Research API stability before committing
1436
+
1437
+ 💡 **Test fixtures upfront**
1438
+ - Create test fixtures in first story of epic
1439
+ - Reuse across all stories
1440
+
1441
+ 💡 **Architecture review cadence**
1442
+ - Mid-epic architecture check-in would have caught issues earlier
1443
+
1444
+ ## Technical Insights
1445
+
1446
+ **Architecture:**
1447
+ - ADR-001 (NextAuth.js) validated ✅
1448
+ - ADR-004 (SendGrid) needed revision (v3 → v4)
1449
+
1450
+ **Code Quality:**
1451
+ - Average code-review score: 8.5/10
1452
+ - No critical issues
1453
+ - 3 high-priority issues (all addressed)
1454
+
1455
+ **Test Coverage:**
1456
+ - E2E: 95% of critical paths
1457
+ - API: 100% of endpoints
1458
+ - Unit: 85% of business logic
1459
+
1460
+ ## Planning Insights
1461
+
1462
+ **Estimation Accuracy:**
1463
+ - Estimated: 60 points
1464
+ - Actual: 72 points
1465
+ - Variance: +20%
1466
+ - **Adjustment**: Use 1.2× multiplier for next epic
1467
+
1468
+ **Requirements Clarity:**
1469
+ - PRD was clear ✅
1470
+ - Architecture was thorough ✅
1471
+ - Story AC needed refinement in 2 stories
1472
+
1473
+ **Dependency Management:**
1474
+ - Story dependencies well-sequenced
1475
+ - No blocking issues
1476
+
1477
+ ## Action Items for Epic 2
1478
+
1479
+ 1. **Create test fixtures first** (Story 2.1)
1480
+ - Owner: DEV
1481
+ - Timeline: First story of Epic 2
1482
+
1483
+ 2. **Add 25% buffer to integration stories**
1484
+ - Owner: SM
1485
+ - Apply in epic-2 estimates
1486
+
1487
+ 3. **Mid-epic architecture check-in**
1488
+ - Owner: Architect
1489
+ - Schedule after 50% epic completion
1490
+
1491
+ 4. **Research third-party API stability**
1492
+ - Owner: DEV
1493
+ - Before starting stories with external APIs
1494
+
1495
+ ## Process Improvements
1496
+
1497
+ **For Next Epic:**
1498
+ - ✅ Run architecture review mid-epic
1499
+ - ✅ Create test fixtures in first story
1500
+ - ✅ Add buffer time to estimates
1501
+ - ✅ Document third-party API versions in architecture
1502
+
1503
+ **For Future Projects:**
1504
+ - Document API stability research process
1505
+ - Create reusable test fixture templates
1506
+ ````
1507
+
1508
+ ### Related Workflows
1509
+
1510
+ - **sprint-planning** - Next epic planning
1511
+ - **architecture** - May need updates from insights
1512
+ - **create-story** - Apply lessons to story creation
1513
+
1514
+ ---
1515
+
1516
+ ## Utility Workflows
1517
+
1518
+ ### workflow-status
1519
+
1520
+ **Purpose:** Check "what should I do now?" for any agent.
1521
+
1522
+ **Agent:** All
1523
+ **Duration:** 2-5 minutes
1524
+ **When to Use:** Anytime you're unsure of next step
1525
+
1526
+ **How It Works:**
1527
+
1528
+ 1. Loads sprint-status.yaml
1529
+ 2. Determines current phase
1530
+ 3. Identifies next workflow to run
1531
+ 4. Provides clear recommendation
1532
+
1533
+ **Example Output:**
1534
+
1535
+ ```
1536
+ Current Phase: 4 (Implementation)
1537
+ Current Epic: Epic 1 (Authentication)
1538
+ Current Sprint: Sprint 1
1539
+
1540
+ Next Story: Story 1.3 (Email Verification)
1541
+ Status: TODO
1542
+ Dependencies: Story 1.2 (DONE) ✅
1543
+
1544
+ **Recommendation:** Run `create-story` to generate Story 1.3
1545
+
1546
+ After create-story:
1547
+ 1. Run story-context
1548
+ 2. Run dev-story
1549
+ 3. Run code-review
1550
+ 4. Run story-done
1551
+ ```
1552
+
1553
+ See: [workflow-status README](../workflows/workflow-status/README.md)
1554
+
1555
+ ---
1556
+
1557
+ ### document-project
1558
+
1559
+ **Purpose:** Analyze and document brownfield projects by scanning codebase, architecture, and patterns.
1560
+
1561
+ **Agent:** Analyst
1562
+ **Duration:** 1-3 hours
1563
+ **When to Use:** Brownfield projects without documentation
1564
+
1565
+ **How It Works:**
1566
+
1567
+ 1. Scans codebase structure
1568
+ 2. Identifies architecture patterns
1569
+ 3. Documents technology stack
1570
+ 4. Creates reference documentation
1571
+ 5. Generates PRD-like document from existing code
1572
+
1573
+ **Output:** `project-documentation-{date}.md`
1574
+
1575
+ **When to Run:**
1576
+
1577
+ - Before starting work on legacy project
1578
+ - When inheriting undocumented codebase
1579
+ - Creating onboarding documentation
1580
+
1581
+ See: [document-project README](../workflows/document-project/README.md)
1582
+
1583
+ ---
1584
+
1585
+ ## Story Lifecycle Visualization
1586
+
1587
+ ```
1588
+ ┌─────────────────────────────────────────────────────────────┐
1589
+ │ PHASE 4: IMPLEMENTATION (Iterative Story Lifecycle) │
1590
+ └─────────────────────────────────────────────────────────────┘
1591
+
1592
+ ┌─────────────────┐
1593
+ │ Sprint Planning │ → Creates sprint-status.yaml
1594
+ └────────┬────────┘ Defines story queue
1595
+
1596
+ ├──────────────────────────────────────────┐
1597
+ │ │
1598
+ ▼ │
1599
+ ┌─────────────────────┐ │
1600
+ │ Epic Tech Context │ → Optional per epic │
1601
+ │ (Once per epic) │ Provides technical │
1602
+ └─────────────────────┘ guidance │
1603
+ │ │
1604
+ ▼ │
1605
+ ┌─────────────────────────────────────────────────┤
1606
+ │ FOR EACH STORY IN QUEUE: │
1607
+ ├─────────────────────────────────────────────────┤
1608
+ │ │
1609
+ ▼ │
1610
+ ┌─────────────────┐ │
1611
+ │ Create Story │ → Generates story file │
1612
+ │ (TODO → IN PROGRESS) │
1613
+ └────────┬────────┘ │
1614
+ │ │
1615
+ ▼ │
1616
+ ┌─────────────────┐ │
1617
+ │ Story Context │ → Assembles focused context │
1618
+ └────────┬────────┘ │
1619
+ │ │
1620
+ ▼ │
1621
+ ┌─────────────────┐ │
1622
+ │ Dev Story │ → Implements + tests │
1623
+ │ (IN PROGRESS) │ │
1624
+ └────────┬────────┘ │
1625
+ │ │
1626
+ ▼ │
1627
+ ┌─────────────────┐ │
1628
+ │ Code Review │ → Senior dev review │
1629
+ │ (IN PROGRESS → │ │
1630
+ │ READY FOR REVIEW) │
1631
+ └────────┬────────┘ │
1632
+ │ │
1633
+ ┌────┴────┐ │
1634
+ │ Result? │ │
1635
+ └────┬────┘ │
1636
+ │ │
1637
+ ┌────┼────────────────────┐ │
1638
+ │ │ │ │
1639
+ ▼ ▼ ▼ │
1640
+ APPROVED APPROVED REQUEST │
1641
+ WITH COMMENTS CHANGES │
1642
+ │ │ │ │
1643
+ └─────────┴───────────────────┘ │
1644
+ │ │
1645
+ ▼ │
1646
+ ┌─────────────────┐ │
1647
+ │ Story Done │ → READY FOR REVIEW → DONE│
1648
+ └────────┬────────┘ │
1649
+ │ │
1650
+ ├─────────────────────────────────────┘
1651
+ │ More stories?
1652
+
1653
+
1654
+ ┌────────────────┐
1655
+ │ Epic Complete? │
1656
+ └────────┬───────┘
1657
+
1658
+ ┌────┼────┐
1659
+ │ │
1660
+ Yes No
1661
+ │ └──> Continue to next story
1662
+
1663
+
1664
+ ┌─────────────────┐
1665
+ │ Retrospective │ → Review epic, lessons learned
1666
+ └─────────────────┘
1667
+
1668
+
1669
+ All epics done?
1670
+
1671
+ Yes → PROJECT COMPLETE
1672
+ ```
1673
+
1674
+ ---
1675
+
1676
+ ## Best Practices for Phase 4
1677
+
1678
+ ### 1. One Story at a Time
1679
+
1680
+ **Focus on completing stories fully** before starting new ones. Don't parallelize stories unless you have multiple developers.
1681
+
1682
+ ### 2. Always Run story-context
1683
+
1684
+ Don't skip context assembly. DEV agent performs better with focused, relevant context.
1685
+
1686
+ ### 3. Write Tests First (ATDD)
1687
+
1688
+ For P0/P1 stories, write failing tests first (acceptance test-driven development), then implement to make them pass.
1689
+
1690
+ ### 4. Code Review P0/P1 Stories
1691
+
1692
+ Always review critical stories. P2/P3 can be optional reviews.
1693
+
1694
+ ### 5. Run Retrospectives
1695
+
1696
+ Don't skip retrospectives. They provide valuable insights that improve velocity in subsequent epics.
1697
+
1698
+ ### 6. Use workflow-status
1699
+
1700
+ When unsure what to do next, run workflow-status. It will guide you.
1701
+
1702
+ ### 7. Document Deviations
1703
+
1704
+ If you deviate from architecture or PRD, document why in story file.
1705
+
1706
+ ---
1707
+
1708
+ ## Common Anti-Patterns
1709
+
1710
+ ### ❌ Starting Multiple Stories Simultaneously
1711
+
1712
+ "Let's parallelize 5 stories to go faster."
1713
+ → **Result**: Context switching, incomplete stories, harder to track
1714
+
1715
+ ### ❌ Skipping story-context
1716
+
1717
+ "The DEV agent can just read the full PRD."
1718
+ → **Result**: Slow context loading, irrelevant info, slower implementation
1719
+
1720
+ ### ❌ No Code Reviews
1721
+
1722
+ "Code reviews slow us down, skip them."
1723
+ → **Result**: Technical debt, inconsistent quality, bugs in production
1724
+
1725
+ ### ❌ Skipping Retrospectives
1726
+
1727
+ "We're too busy shipping, no time for retros."
1728
+ → **Result**: Repeat mistakes, no process improvement, lower velocity
1729
+
1730
+ ### ✅ Correct Approach
1731
+
1732
+ - Focus on one story at a time
1733
+ - Always assemble story context
1734
+ - Review P0/P1 stories
1735
+ - Run retrospectives after epics
1736
+ - Use workflow-status for guidance
1737
+
1738
+ ---
1739
+
1740
+ ## Summary
1741
+
1742
+ Phase 4 Implementation follows a **story-centric workflow**:
1743
+
1744
+ | Workflow | Purpose | Frequency |
1745
+ | --------------------- | ------------------- | ----------------- |
1746
+ | **sprint-planning** | Initialize tracking | Once at start |
1747
+ | **epic-tech-context** | Technical guidance | Once per epic |
1748
+ | **create-story** | Generate story file | Per story |
1749
+ | **story-context** | Assemble context | Per story |
1750
+ | **dev-story** | Implement story | Per story |
1751
+ | **code-review** | Review quality | Per story (P0/P1) |
1752
+ | **correct-course** | Handle changes | As needed |
1753
+ | **retrospective** | Learn and improve | After each epic |
1754
+
1755
+ **Key Takeaway:** Implementation is iterative and incremental. Move one story through its full lifecycle before starting the next. Use retrospectives to continuously improve.
1756
+
1757
+ **Next:** Testing & QA (testarch workflows) run in parallel with implementation.
1758
+
1759
+ See: [workflows-testing.md](./workflows-testing.md)