bmad-method 6.0.4 → 6.0.5-next.0

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 (252) hide show
  1. package/.augment/code_review_guidelines.yaml +2 -42
  2. package/.claude/skills/bmad-os-findings-triage/SKILL.md +6 -0
  3. package/.claude/skills/bmad-os-findings-triage/prompts/agent-prompt.md +104 -0
  4. package/.claude/skills/bmad-os-findings-triage/prompts/instructions.md +286 -0
  5. package/.claude/skills/bmad-os-review-pr/SKILL.md +1 -1
  6. package/.claude/skills/bmad-os-review-pr/prompts/instructions.md +63 -6
  7. package/.claude/skills/bmad-os-review-prompt/SKILL.md +177 -0
  8. package/.github/workflows/publish.yaml +243 -0
  9. package/CONTRIBUTING.md +1 -1
  10. package/README_CN.md +121 -0
  11. package/docs/_STYLE_GUIDE.md +10 -10
  12. package/docs/explanation/brainstorming.md +1 -1
  13. package/docs/explanation/party-mode.md +1 -1
  14. package/docs/explanation/preventing-agent-conflicts.md +1 -1
  15. package/docs/explanation/project-context.md +15 -15
  16. package/docs/explanation/quick-flow.md +9 -9
  17. package/docs/how-to/established-projects.md +7 -7
  18. package/docs/how-to/get-answers-about-bmad.md +2 -2
  19. package/docs/how-to/install-bmad.md +16 -6
  20. package/docs/how-to/project-context.md +2 -2
  21. package/docs/how-to/quick-fixes.md +5 -5
  22. package/docs/how-to/shard-large-documents.md +1 -1
  23. package/docs/how-to/upgrade-to-v6.md +8 -5
  24. package/docs/index.md +1 -1
  25. package/docs/reference/agents.md +14 -14
  26. package/docs/reference/commands.md +64 -70
  27. package/docs/reference/testing.md +1 -1
  28. package/docs/reference/workflow-map.md +19 -19
  29. package/docs/tutorials/getting-started.md +34 -34
  30. package/docs/zh-cn/404.md +9 -0
  31. package/docs/zh-cn/_STYLE_GUIDE.md +370 -0
  32. package/docs/zh-cn/explanation/advanced-elicitation.md +62 -0
  33. package/docs/zh-cn/explanation/adversarial-review.md +71 -0
  34. package/docs/zh-cn/explanation/brainstorming.md +43 -0
  35. package/docs/zh-cn/explanation/established-projects-faq.md +60 -0
  36. package/docs/zh-cn/explanation/party-mode.md +79 -0
  37. package/docs/zh-cn/explanation/preventing-agent-conflicts.md +137 -0
  38. package/docs/zh-cn/explanation/project-context.md +176 -0
  39. package/docs/zh-cn/explanation/quick-flow.md +93 -0
  40. package/docs/zh-cn/explanation/why-solutioning-matters.md +90 -0
  41. package/docs/zh-cn/how-to/customize-bmad.md +182 -0
  42. package/docs/zh-cn/how-to/established-projects.md +134 -0
  43. package/docs/zh-cn/how-to/get-answers-about-bmad.md +144 -0
  44. package/docs/zh-cn/how-to/install-bmad.md +105 -0
  45. package/docs/zh-cn/how-to/non-interactive-installation.md +181 -0
  46. package/docs/zh-cn/how-to/project-context.md +152 -0
  47. package/docs/zh-cn/how-to/quick-fixes.md +140 -0
  48. package/docs/zh-cn/how-to/shard-large-documents.md +86 -0
  49. package/docs/zh-cn/how-to/upgrade-to-v6.md +120 -0
  50. package/docs/zh-cn/index.md +69 -0
  51. package/docs/zh-cn/reference/agents.md +41 -0
  52. package/docs/zh-cn/reference/commands.md +166 -0
  53. package/docs/zh-cn/reference/modules.md +94 -0
  54. package/docs/zh-cn/reference/testing.md +122 -0
  55. package/docs/zh-cn/reference/workflow-map.md +104 -0
  56. package/docs/zh-cn/roadmap.mdx +152 -0
  57. package/docs/zh-cn/tutorials/getting-started.md +300 -0
  58. package/package.json +1 -1
  59. package/src/bmm/agents/analyst.agent.yaml +1 -1
  60. package/src/bmm/agents/bmad-skill-manifest.yaml +39 -0
  61. package/src/bmm/agents/dev.agent.yaml +2 -2
  62. package/src/bmm/agents/pm.agent.yaml +1 -1
  63. package/src/bmm/agents/qa.agent.yaml +1 -1
  64. package/src/bmm/agents/quick-flow-solo-dev.agent.yaml +6 -2
  65. package/src/bmm/agents/sm.agent.yaml +4 -4
  66. package/src/bmm/agents/tech-writer/bmad-skill-manifest.yaml +3 -0
  67. package/src/bmm/agents/tech-writer/tech-writer.agent.yaml +1 -1
  68. package/src/bmm/module-help.csv +11 -10
  69. package/src/bmm/workflows/1-analysis/create-product-brief/bmad-skill-manifest.yaml +3 -0
  70. package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-02-vision.md +1 -1
  71. package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-03-users.md +1 -1
  72. package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-04-metrics.md +1 -1
  73. package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-05-scope.md +1 -1
  74. package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-06-complete.md +1 -1
  75. package/src/bmm/workflows/1-analysis/research/bmad-skill-manifest.yaml +14 -0
  76. package/src/bmm/workflows/2-plan-workflows/create-prd/bmad-skill-manifest.yaml +14 -0
  77. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-02-discovery.md +1 -1
  78. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-02b-vision.md +1 -1
  79. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-02c-executive-summary.md +1 -1
  80. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-03-success.md +1 -1
  81. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-04-journeys.md +1 -1
  82. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-05-domain.md +1 -1
  83. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-06-innovation.md +1 -1
  84. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-07-project-type.md +1 -1
  85. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-08-scoping.md +1 -1
  86. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-09-functional.md +1 -1
  87. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-10-nonfunctional.md +1 -1
  88. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-11-polish.md +1 -1
  89. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-12-complete.md +1 -1
  90. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-e/step-e-01-discovery.md +1 -1
  91. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-e/step-e-02-review.md +1 -1
  92. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-01-discovery.md +1 -1
  93. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-10-smart-validation.md +1 -1
  94. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-11-holistic-quality-validation.md +1 -1
  95. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-13-report-complete.md +1 -1
  96. package/src/bmm/workflows/2-plan-workflows/create-ux-design/bmad-skill-manifest.yaml +3 -0
  97. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-02-discovery.md +1 -1
  98. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-03-core-experience.md +2 -2
  99. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-04-emotional-response.md +2 -2
  100. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-05-inspiration.md +2 -2
  101. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-06-design-system.md +2 -2
  102. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-07-defining-experience.md +2 -2
  103. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-08-visual-foundation.md +2 -2
  104. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-09-design-directions.md +2 -2
  105. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-10-user-journeys.md +2 -2
  106. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-11-component-strategy.md +2 -2
  107. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-12-ux-patterns.md +2 -2
  108. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-13-responsive-accessibility.md +2 -2
  109. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-14-complete.md +1 -1
  110. package/src/bmm/workflows/3-solutioning/check-implementation-readiness/bmad-skill-manifest.yaml +3 -0
  111. package/src/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-06-final-assessment.md +1 -1
  112. package/src/bmm/workflows/3-solutioning/create-architecture/bmad-skill-manifest.yaml +3 -0
  113. package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-02-context.md +2 -2
  114. package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-03-starter.md +2 -2
  115. package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-04-decisions.md +2 -2
  116. package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-05-patterns.md +2 -2
  117. package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-06-structure.md +2 -2
  118. package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-07-validation.md +2 -2
  119. package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-08-complete.md +1 -1
  120. package/src/bmm/workflows/3-solutioning/create-epics-and-stories/bmad-skill-manifest.yaml +3 -0
  121. package/src/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-01-validate-prerequisites.md +1 -1
  122. package/src/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-02-design-epics.md +1 -1
  123. package/src/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-03-create-stories.md +1 -1
  124. package/src/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-04-final-validation.md +2 -2
  125. package/src/bmm/workflows/4-implementation/code-review/bmad-skill-manifest.yaml +3 -0
  126. package/src/bmm/workflows/4-implementation/code-review/discover-inputs.md +88 -0
  127. package/src/bmm/workflows/4-implementation/code-review/workflow.md +271 -0
  128. package/src/bmm/workflows/4-implementation/correct-course/bmad-skill-manifest.yaml +3 -0
  129. package/src/bmm/workflows/4-implementation/correct-course/checklist.md +1 -1
  130. package/src/bmm/workflows/4-implementation/correct-course/{instructions.md → workflow.md} +79 -12
  131. package/src/bmm/workflows/4-implementation/create-story/bmad-skill-manifest.yaml +3 -0
  132. package/src/bmm/workflows/4-implementation/create-story/checklist.md +9 -10
  133. package/src/bmm/workflows/4-implementation/create-story/discover-inputs.md +88 -0
  134. package/src/bmm/workflows/4-implementation/create-story/workflow.md +388 -0
  135. package/src/bmm/workflows/4-implementation/dev-story/bmad-skill-manifest.yaml +3 -0
  136. package/src/bmm/workflows/4-implementation/dev-story/{instructions.xml → workflow.md} +49 -2
  137. package/src/bmm/workflows/4-implementation/retrospective/bmad-skill-manifest.yaml +3 -0
  138. package/src/bmm/workflows/4-implementation/retrospective/{instructions.md → workflow.md} +64 -23
  139. package/src/bmm/workflows/4-implementation/sprint-planning/bmad-skill-manifest.yaml +3 -0
  140. package/src/bmm/workflows/4-implementation/sprint-planning/sprint-status-template.yaml +1 -0
  141. package/src/bmm/workflows/4-implementation/sprint-planning/{instructions.md → workflow.md} +55 -10
  142. package/src/bmm/workflows/4-implementation/sprint-status/bmad-skill-manifest.yaml +3 -0
  143. package/src/bmm/workflows/4-implementation/sprint-status/{instructions.md → workflow.md} +45 -8
  144. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/SKILL.md +6 -0
  145. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/bmad-skill-manifest.yaml +1 -0
  146. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-01-clarify-and-route.md +54 -0
  147. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-02-plan.md +39 -0
  148. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-03-implement.md +35 -0
  149. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-04-review.md +55 -0
  150. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-05-present.md +19 -0
  151. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/tech-spec-template.md +90 -0
  152. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/workflow.md +84 -0
  153. package/src/bmm/workflows/bmad-quick-flow/quick-dev/bmad-skill-manifest.yaml +3 -0
  154. package/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-05-adversarial-review.md +8 -14
  155. package/src/bmm/workflows/bmad-quick-flow/quick-dev/workflow.md +1 -1
  156. package/src/bmm/workflows/bmad-quick-flow/quick-spec/bmad-skill-manifest.yaml +3 -0
  157. package/src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-04-review.md +4 -6
  158. package/src/bmm/workflows/bmad-quick-flow/quick-spec/workflow.md +1 -1
  159. package/src/bmm/workflows/document-project/bmad-skill-manifest.yaml +3 -0
  160. package/src/bmm/workflows/document-project/instructions.md +5 -7
  161. package/src/bmm/workflows/document-project/workflow.md +39 -0
  162. package/src/bmm/workflows/document-project/workflows/deep-dive-instructions.md +0 -1
  163. package/src/bmm/workflows/document-project/workflows/deep-dive-workflow.md +42 -0
  164. package/src/bmm/workflows/document-project/workflows/full-scan-instructions.md +0 -1
  165. package/src/bmm/workflows/document-project/workflows/full-scan-workflow.md +42 -0
  166. package/src/bmm/workflows/generate-project-context/bmad-skill-manifest.yaml +3 -0
  167. package/src/bmm/workflows/generate-project-context/steps/step-02-generate.md +2 -2
  168. package/src/bmm/workflows/qa-generate-e2e-tests/bmad-skill-manifest.yaml +3 -0
  169. package/src/bmm/workflows/qa-generate-e2e-tests/checklist.md +1 -1
  170. package/src/bmm/workflows/qa-generate-e2e-tests/{instructions.md → workflow.md} +40 -7
  171. package/src/core/agents/bmad-master.agent.yaml +1 -1
  172. package/src/core/agents/bmad-skill-manifest.yaml +3 -0
  173. package/src/core/module-help.csv +3 -3
  174. package/src/core/module.yaml +1 -1
  175. package/src/core/tasks/bmad-help/SKILL.md +6 -0
  176. package/src/core/tasks/bmad-help/bmad-skill-manifest.yaml +1 -0
  177. package/src/core/tasks/{help.md → bmad-help/workflow.md} +6 -4
  178. package/src/core/tasks/bmad-review-adversarial-general/SKILL.md +6 -0
  179. package/src/core/tasks/bmad-review-adversarial-general/bmad-skill-manifest.yaml +1 -0
  180. package/src/core/tasks/bmad-review-adversarial-general/workflow.md +32 -0
  181. package/src/core/tasks/bmad-review-edge-case-hunter/SKILL.md +6 -0
  182. package/src/core/tasks/bmad-review-edge-case-hunter/bmad-skill-manifest.yaml +1 -0
  183. package/src/core/tasks/bmad-review-edge-case-hunter/workflow.md +62 -0
  184. package/src/core/tasks/bmad-skill-manifest.yaml +19 -0
  185. package/src/core/workflows/advanced-elicitation/bmad-skill-manifest.yaml +3 -0
  186. package/src/core/workflows/advanced-elicitation/workflow.md +138 -0
  187. package/src/core/workflows/brainstorming/bmad-skill-manifest.yaml +3 -0
  188. package/src/core/workflows/brainstorming/steps/step-03-technique-execution.md +1 -1
  189. package/src/core/workflows/brainstorming/workflow.md +1 -1
  190. package/src/core/workflows/party-mode/bmad-skill-manifest.yaml +3 -0
  191. package/src/utility/agent-components/activation-steps.txt +2 -2
  192. package/src/utility/agent-components/handler-multi.txt +1 -2
  193. package/test/adversarial-review-tests/README.md +3 -3
  194. package/test/adversarial-review-tests/test-cases.yaml +2 -2
  195. package/test/fixtures/agent-schema/valid/menu/multiple-menu-items.agent.yaml +1 -1
  196. package/test/fixtures/agent-schema/valid/menu-commands/all-command-types.agent.yaml +1 -1
  197. package/test/fixtures/agent-schema/valid/menu-commands/multiple-commands.agent.yaml +1 -2
  198. package/test/fixtures/file-refs-csv/valid/bmm-style.csv +1 -1
  199. package/test/test-file-refs-csv.js +1 -1
  200. package/test/test-install-to-bmad.js +154 -0
  201. package/test/test-installation-components.js +1586 -2
  202. package/test/test-workflow-path-regex.js +88 -0
  203. package/tools/cli/installers/lib/core/installer.js +34 -1
  204. package/tools/cli/installers/lib/core/manifest-generator.js +328 -35
  205. package/tools/cli/installers/lib/ide/_base-ide.js +24 -15
  206. package/tools/cli/installers/lib/ide/_config-driven.js +472 -53
  207. package/tools/cli/installers/lib/ide/manager.js +23 -61
  208. package/tools/cli/installers/lib/ide/platform-codes.yaml +108 -30
  209. package/tools/cli/installers/lib/ide/shared/agent-command-generator.js +1 -0
  210. package/tools/cli/installers/lib/ide/shared/bmad-artifacts.js +7 -0
  211. package/tools/cli/installers/lib/ide/shared/path-utils.js +68 -3
  212. package/tools/cli/installers/lib/ide/shared/skill-manifest.js +90 -0
  213. package/tools/cli/installers/lib/ide/shared/task-tool-command-generator.js +2 -0
  214. package/tools/cli/installers/lib/ide/shared/workflow-command-generator.js +6 -145
  215. package/tools/cli/installers/lib/modules/manager.js +9 -132
  216. package/tools/cli/lib/agent/compiler.js +1 -10
  217. package/tools/cli/lib/agent-analyzer.js +2 -14
  218. package/tools/cli/lib/yaml-xml-builder.js +1 -18
  219. package/tools/docs/native-skills-migration-checklist.md +281 -0
  220. package/tools/platform-codes.yaml +1 -1
  221. package/tools/schema/agent.js +1 -3
  222. package/tools/validate-file-refs.js +2 -0
  223. package/website/astro.config.mjs +24 -3
  224. package/website/src/content/config.ts +2 -1
  225. package/website/src/content/i18n/zh-CN.json +28 -0
  226. package/src/bmm/workflows/4-implementation/code-review/instructions.xml +0 -227
  227. package/src/bmm/workflows/4-implementation/code-review/workflow.yaml +0 -43
  228. package/src/bmm/workflows/4-implementation/correct-course/workflow.yaml +0 -53
  229. package/src/bmm/workflows/4-implementation/create-story/instructions.xml +0 -346
  230. package/src/bmm/workflows/4-implementation/create-story/workflow.yaml +0 -52
  231. package/src/bmm/workflows/4-implementation/dev-story/workflow.yaml +0 -20
  232. package/src/bmm/workflows/4-implementation/retrospective/workflow.yaml +0 -52
  233. package/src/bmm/workflows/4-implementation/sprint-planning/workflow.yaml +0 -47
  234. package/src/bmm/workflows/4-implementation/sprint-status/workflow.yaml +0 -25
  235. package/src/bmm/workflows/document-project/workflow.yaml +0 -22
  236. package/src/bmm/workflows/document-project/workflows/deep-dive.yaml +0 -31
  237. package/src/bmm/workflows/document-project/workflows/full-scan.yaml +0 -31
  238. package/src/bmm/workflows/qa-generate-e2e-tests/workflow.yaml +0 -42
  239. package/src/core/tasks/review-adversarial-general.xml +0 -49
  240. package/src/core/tasks/review-edge-case-hunter.xml +0 -63
  241. package/src/core/tasks/workflow.xml +0 -235
  242. package/src/core/workflows/advanced-elicitation/workflow.xml +0 -118
  243. package/src/utility/agent-components/handler-validate-workflow.txt +0 -7
  244. package/src/utility/agent-components/handler-workflow.txt +0 -10
  245. package/tools/cli/installers/lib/ide/codex.js +0 -440
  246. package/tools/cli/installers/lib/ide/github-copilot.js +0 -699
  247. package/tools/cli/installers/lib/ide/kilo.js +0 -269
  248. package/tools/cli/installers/lib/ide/rovodev.js +0 -257
  249. package/tools/cli/installers/lib/ide/templates/combined/default-workflow-yaml.md +0 -14
  250. package/tools/cli/installers/lib/ide/templates/combined/kiro-workflow-yaml.md +0 -15
  251. package/tools/cli/installers/lib/ide/templates/workflow-command-template.md +0 -13
  252. package/tools/cli/installers/lib/ide/templates/workflow-commander.md +0 -5
@@ -1,11 +1,83 @@
1
- # Correct Course - Sprint Change Management Instructions
1
+ ---
2
+ name: correct-course
3
+ description: 'Manage significant changes during sprint execution. Use when the user says "correct course" or "propose sprint change"'
4
+ ---
2
5
 
3
- <critical>The workflow execution engine is governed by: {project-root}/_bmad/core/tasks/workflow.xml</critical>
4
- <critical>You MUST have already loaded and processed: {project-root}/_bmad/bmm/workflows/4-implementation/correct-course/workflow.yaml</critical>
5
- <critical>Communicate all responses in {communication_language} and language MUST be tailored to {user_skill_level}</critical>
6
- <critical>Generate all documents in {document_output_language}</critical>
6
+ # Correct Course - Sprint Change Management Workflow
7
7
 
8
- <critical>DOCUMENT OUTPUT: Updated epics, stories, or PRD sections. Clear, actionable changes. User skill level ({user_skill_level}) affects conversation style ONLY, not document updates.</critical>
8
+ **Goal:** Manage significant changes during sprint execution by analyzing impact across all project artifacts and producing a structured Sprint Change Proposal.
9
+
10
+ **Your Role:** You are a Scrum Master navigating change management. Analyze the triggering issue, assess impact across PRD, epics, architecture, and UX artifacts, and produce an actionable Sprint Change Proposal with clear handoff.
11
+
12
+ ---
13
+
14
+ ## INITIALIZATION
15
+
16
+ ### Configuration Loading
17
+
18
+ Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:
19
+
20
+ - `project_name`, `user_name`
21
+ - `communication_language`, `document_output_language`
22
+ - `user_skill_level`
23
+ - `implementation_artifacts`
24
+ - `planning_artifacts`
25
+ - `project_knowledge`
26
+ - `date` as system-generated current datetime
27
+ - YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
28
+ - Language MUST be tailored to `{user_skill_level}`
29
+ - Generate all documents in `{document_output_language}`
30
+ - DOCUMENT OUTPUT: Updated epics, stories, or PRD sections. Clear, actionable changes. User skill level (`{user_skill_level}`) affects conversation style ONLY, not document updates.
31
+
32
+ ### Paths
33
+
34
+ - `installed_path` = `{project-root}/_bmad/bmm/workflows/4-implementation/correct-course`
35
+ - `checklist` = `{installed_path}/checklist.md`
36
+ - `default_output_file` = `{planning_artifacts}/sprint-change-proposal-{date}.md`
37
+
38
+ ### Input Files
39
+
40
+ | Input | Path | Load Strategy |
41
+ |-------|------|---------------|
42
+ | PRD | `{planning_artifacts}/*prd*.md` (whole) or `{planning_artifacts}/*prd*/*.md` (sharded) | FULL_LOAD |
43
+ | Epics | `{planning_artifacts}/*epic*.md` (whole) or `{planning_artifacts}/*epic*/*.md` (sharded) | FULL_LOAD |
44
+ | Architecture | `{planning_artifacts}/*architecture*.md` (whole) or `{planning_artifacts}/*architecture*/*.md` (sharded) | FULL_LOAD |
45
+ | UX Design | `{planning_artifacts}/*ux*.md` (whole) or `{planning_artifacts}/*ux*/*.md` (sharded) | FULL_LOAD |
46
+ | Tech Spec | `{planning_artifacts}/*tech-spec*.md` (whole) | FULL_LOAD |
47
+ | Document Project | `{project_knowledge}/index.md` (sharded) | INDEX_GUIDED |
48
+
49
+ ### Context
50
+
51
+ - `project_context` = `**/project-context.md` (load if exists)
52
+
53
+ ---
54
+
55
+ ## EXECUTION
56
+
57
+ ### Document Discovery - Loading Project Artifacts
58
+
59
+ **Strategy**: Course correction needs broad project context to assess change impact accurately. Load all available planning artifacts.
60
+
61
+ **Discovery Process for FULL_LOAD documents (PRD, Epics, Architecture, UX Design, Tech Spec):**
62
+
63
+ 1. **Search for whole document first** - Look for files matching the whole-document pattern (e.g., `*prd*.md`, `*epic*.md`, `*architecture*.md`, `*ux*.md`, `*tech-spec*.md`)
64
+ 2. **Check for sharded version** - If whole document not found, look for a directory with `index.md` (e.g., `prd/index.md`, `epics/index.md`)
65
+ 3. **If sharded version found**:
66
+ - Read `index.md` to understand the document structure
67
+ - Read ALL section files listed in the index
68
+ - Process the combined content as a single document
69
+ 4. **Priority**: If both whole and sharded versions exist, use the whole document
70
+
71
+ **Discovery Process for INDEX_GUIDED documents (Document Project):**
72
+
73
+ 1. **Search for index file** - Look for `{project_knowledge}/index.md`
74
+ 2. **If found**: Read the index to understand available documentation sections
75
+ 3. **Selectively load sections** based on relevance to the change being analyzed — do NOT load everything, only sections that relate to the impacted areas
76
+ 4. **This document is optional** — skip if `{project_knowledge}` does not exist (greenfield projects)
77
+
78
+ **Fuzzy matching**: Be flexible with document names — users may use variations like `prd.md`, `bmm-prd.md`, `product-requirements.md`, etc.
79
+
80
+ **Missing documents**: Not all documents may exist. PRD and Epics are essential; Architecture, UX Design, Tech Spec, and Document Project are loaded if available. HALT if PRD or Epics cannot be found.
9
81
 
10
82
  <workflow>
11
83
 
@@ -28,11 +100,6 @@
28
100
  <action if="core documents are unavailable">HALT: "Need access to project documents (PRD, Epics, Architecture, UI/UX) to assess change impact. Please ensure these documents are accessible."</action>
29
101
  </step>
30
102
 
31
- <step n="0.5" goal="Discover and load project documents">
32
- <invoke-protocol name="discover_inputs" />
33
- <note>After discovery, these content variables are available: {prd_content}, {epics_content}, {architecture_content}, {ux_design_content}, {tech_spec_content}, {document_project_content}</note>
34
- </step>
35
-
36
103
  <step n="2" goal="Execute Change Analysis Checklist">
37
104
  <action>Read fully and follow the systematic analysis from: {checklist}</action>
38
105
  <action>Work through each checklist section interactively with the user</action>
@@ -200,7 +267,7 @@
200
267
  - Specific edit proposals with before/after
201
268
  - Implementation handoff plan
202
269
 
203
- <action>Report workflow completion to user with personalized message: "Correct Course workflow complete, {user_name}!"</action>
270
+ <action>Report workflow completion to user with personalized message: "Correct Course workflow complete, {user_name}!"</action>
204
271
  <action>Remind user of success criteria and next steps for implementation team</action>
205
272
  </step>
206
273
 
@@ -0,0 +1,3 @@
1
+ canonicalId: bmad-create-story
2
+ type: workflow
3
+ description: "Creates a dedicated story file with all the context needed for implementation"
@@ -33,25 +33,25 @@ This is a COMPETITION to create the **ULTIMATE story context** that makes LLM de
33
33
 
34
34
  ### **When Running from Create-Story Workflow:**
35
35
 
36
- - The `{project-root}/_bmad/core/tasks/workflow.xml` framework will automatically:
36
+ - The workflow framework will automatically:
37
37
  - Load this checklist file
38
38
  - Load the newly created story file (`{story_file_path}`)
39
- - Load workflow variables from `{installed_path}/workflow.yaml`
39
+ - Load workflow variables from `{installed_path}/workflow.md`
40
40
  - Execute the validation process
41
41
 
42
42
  ### **When Running in Fresh Context:**
43
43
 
44
44
  - User should provide the story file path being reviewed
45
45
  - Load the story file directly
46
- - Load the corresponding workflow.yaml for variable context
46
+ - Load the corresponding workflow.md for variable context
47
47
  - Proceed with systematic analysis
48
48
 
49
49
  ### **Required Inputs:**
50
50
 
51
51
  - **Story file**: The story file to review and improve
52
- - **Workflow variables**: From workflow.yaml (implementation_artifacts, epics_file, etc.)
52
+ - **Workflow variables**: From workflow.md (implementation_artifacts, epics_file, etc.)
53
53
  - **Source documents**: Epics, architecture, etc. (discovered or provided)
54
- - **Validation framework**: `validate-workflow.xml` (handles checklist execution)
54
+ - **Validation framework**: The workflow's checklist execution system
55
55
 
56
56
  ---
57
57
 
@@ -61,12 +61,11 @@ You will systematically re-do the entire story creation process, but with a crit
61
61
 
62
62
  ### **Step 1: Load and Understand the Target**
63
63
 
64
- 1. **Load the workflow configuration**: `{installed_path}/workflow.yaml` for variable inclusion
64
+ 1. **Load the workflow configuration**: `{installed_path}/workflow.md` for variable inclusion
65
65
  2. **Load the story file**: `{story_file_path}` (provided by user or discovered)
66
- 3. **Load validation framework**: `{project-root}/_bmad/core/tasks/workflow.xml`
67
- 4. **Extract metadata**: epic_num, story_num, story_key, story_title from story file
68
- 5. **Resolve all workflow variables**: implementation_artifacts, epics_file, architecture_file, etc.
69
- 6. **Understand current status**: What story implementation guidance is currently provided?
66
+ 3. **Extract metadata**: epic_num, story_num, story_key, story_title from story file
67
+ 4. **Resolve all workflow variables**: implementation_artifacts, epics_file, architecture_file, etc.
68
+ 5. **Understand current status**: What story implementation guidance is currently provided?
70
69
 
71
70
  **Note:** If running in fresh context, user should provide the story file path being reviewed. If running from create-story workflow, the validation framework will automatically discover the checklist and story file.
72
71
 
@@ -0,0 +1,88 @@
1
+ # Discover Inputs Protocol
2
+
3
+ **Objective:** Intelligently load project files (whole or sharded) based on the workflow's Input Files configuration.
4
+
5
+ **Prerequisite:** Only execute this protocol if the workflow defines an Input Files section. If no input file patterns are configured, skip this entirely.
6
+
7
+ ---
8
+
9
+ ## Step 1: Parse Input File Patterns
10
+
11
+ - Read the Input Files table from the workflow configuration.
12
+ - For each input group (prd, architecture, epics, ux, etc.), note the **load strategy** if specified.
13
+
14
+ ## Step 2: Load Files Using Smart Strategies
15
+
16
+ For each pattern in the Input Files table, work through the following substeps in order:
17
+
18
+ ### 2a: Try Sharded Documents First
19
+
20
+ If a sharded pattern exists for this input, determine the load strategy (defaults to **FULL_LOAD** if not specified), then apply the matching strategy:
21
+
22
+ #### FULL_LOAD Strategy
23
+
24
+ Load ALL files in the sharded directory. Use this for PRD, Architecture, UX, brownfield docs, or whenever the full picture is needed.
25
+
26
+ 1. Use the glob pattern to find ALL `.md` files (e.g., `{planning_artifacts}/*architecture*/*.md`).
27
+ 2. Load EVERY matching file completely.
28
+ 3. Concatenate content in logical order: `index.md` first if it exists, then alphabetical.
29
+ 4. Store the combined result in a variable named `{pattern_name_content}` (e.g., `{architecture_content}`).
30
+
31
+ #### SELECTIVE_LOAD Strategy
32
+
33
+ Load a specific shard using a template variable. Example: used for epics with `{{epic_num}}`.
34
+
35
+ 1. Check for template variables in the sharded pattern (e.g., `{{epic_num}}`).
36
+ 2. If the variable is undefined, ask the user for the value OR infer it from context.
37
+ 3. Resolve the template to a specific file path.
38
+ 4. Load that specific file.
39
+ 5. Store in variable: `{pattern_name_content}`.
40
+
41
+ #### INDEX_GUIDED Strategy
42
+
43
+ Load index.md, analyze the structure and description of each doc in the index, then intelligently load relevant docs.
44
+
45
+ **DO NOT BE LAZY** -- use best judgment to load documents that might have relevant information, even if there is only a 5% chance of relevance.
46
+
47
+ 1. Load `index.md` from the sharded directory.
48
+ 2. Parse the table of contents, links, and section headers.
49
+ 3. Analyze the workflow's purpose and objective.
50
+ 4. Identify which linked/referenced documents are likely relevant.
51
+ - *Example:* If the workflow is about authentication and the index shows "Auth Overview", "Payment Setup", "Deployment" -- load the auth docs, consider deployment docs, skip payment.
52
+ 5. Load all identified relevant documents.
53
+ 6. Store combined content in variable: `{pattern_name_content}`.
54
+
55
+ **When in doubt, LOAD IT** -- context is valuable, and being thorough is better than missing critical info.
56
+
57
+ ---
58
+
59
+ After applying the matching strategy, mark the pattern as **RESOLVED** and move to the next pattern.
60
+
61
+ ### 2b: Try Whole Document if No Sharded Found
62
+
63
+ If no sharded matches were found OR no sharded pattern exists for this input:
64
+
65
+ 1. Attempt a glob match on the "whole" pattern (e.g., `{planning_artifacts}/*prd*.md`).
66
+ 2. If matches are found, load ALL matching files completely (no offset/limit).
67
+ 3. Store content in variable: `{pattern_name_content}` (e.g., `{prd_content}`).
68
+ 4. Mark pattern as **RESOLVED** and move to the next pattern.
69
+
70
+ ### 2c: Handle Not Found
71
+
72
+ If no matches were found for either sharded or whole patterns:
73
+
74
+ 1. Set `{pattern_name_content}` to empty string.
75
+ 2. Note in session: "No {pattern_name} files found" -- this is not an error, just unavailable. Offer the user a chance to provide the file.
76
+
77
+ ## Step 3: Report Discovery Results
78
+
79
+ List all loaded content variables with file counts. Example:
80
+
81
+ ```
82
+ OK Loaded {prd_content} from 5 sharded files: prd/index.md, prd/requirements.md, ...
83
+ OK Loaded {architecture_content} from 1 file: Architecture.md
84
+ OK Loaded {epics_content} from selective load: epics/epic-3.md
85
+ -- No ux_design files found
86
+ ```
87
+
88
+ This gives the workflow transparency into what context is available.
@@ -0,0 +1,388 @@
1
+ ---
2
+ name: create-story
3
+ description: 'Creates a dedicated story file with all the context the agent will need to implement it later. Use when the user says "create the next story" or "create story [story identifier]"'
4
+ ---
5
+
6
+ # Create Story Workflow
7
+
8
+ **Goal:** Create a comprehensive story file that gives the dev agent everything needed for flawless implementation.
9
+
10
+ **Your Role:** Story context engine that prevents LLM developer mistakes, omissions, or disasters.
11
+ - Communicate all responses in {communication_language} and generate all documents in {document_output_language}
12
+ - Your purpose is NOT to copy from epics - it's to create a comprehensive, optimized story file that gives the DEV agent EVERYTHING needed for flawless implementation
13
+ - COMMON LLM MISTAKES TO PREVENT: reinventing wheels, wrong libraries, wrong file locations, breaking regressions, ignoring UX, vague implementations, lying about completion, not learning from past work
14
+ - EXHAUSTIVE ANALYSIS REQUIRED: You must thoroughly analyze ALL artifacts to extract critical context - do NOT be lazy or skim! This is the most important function in the entire development process!
15
+ - UTILIZE SUBPROCESSES AND SUBAGENTS: Use research subagents, subprocesses or parallel processing if available to thoroughly analyze different artifacts simultaneously and thoroughly
16
+ - SAVE QUESTIONS: If you think of questions or clarifications during analysis, save them for the end after the complete story is written
17
+ - ZERO USER INTERVENTION: Process should be fully automated except for initial epic/story selection or missing documents
18
+
19
+ ---
20
+
21
+ ## INITIALIZATION
22
+
23
+ ### Configuration Loading
24
+
25
+ Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:
26
+
27
+ - `project_name`, `user_name`
28
+ - `communication_language`, `document_output_language`
29
+ - `user_skill_level`
30
+ - `planning_artifacts`, `implementation_artifacts`
31
+ - `date` as system-generated current datetime
32
+
33
+ ### Paths
34
+
35
+ - `installed_path` = `{project-root}/_bmad/bmm/workflows/4-implementation/create-story`
36
+ - `template` = `{installed_path}/template.md`
37
+ - `validation` = `{installed_path}/checklist.md`
38
+ - `sprint_status` = `{implementation_artifacts}/sprint-status.yaml`
39
+ - `epics_file` = `{planning_artifacts}/epics.md`
40
+ - `prd_file` = `{planning_artifacts}/prd.md`
41
+ - `architecture_file` = `{planning_artifacts}/architecture.md`
42
+ - `ux_file` = `{planning_artifacts}/*ux*.md`
43
+ - `story_title` = "" (will be elicited if not derivable)
44
+ - `project_context` = `**/project-context.md` (load if exists)
45
+ - `default_output_file` = `{implementation_artifacts}/{{story_key}}.md`
46
+
47
+ ### Input Files
48
+
49
+ | Input | Description | Path Pattern(s) | Load Strategy |
50
+ |-------|-------------|------------------|---------------|
51
+ | prd | PRD (fallback - epics file should have most content) | whole: `{planning_artifacts}/*prd*.md`, sharded: `{planning_artifacts}/*prd*/*.md` | SELECTIVE_LOAD |
52
+ | architecture | Architecture (fallback - epics file should have relevant sections) | whole: `{planning_artifacts}/*architecture*.md`, sharded: `{planning_artifacts}/*architecture*/*.md` | SELECTIVE_LOAD |
53
+ | ux | UX design (fallback - epics file should have relevant sections) | whole: `{planning_artifacts}/*ux*.md`, sharded: `{planning_artifacts}/*ux*/*.md` | SELECTIVE_LOAD |
54
+ | epics | Enhanced epics+stories file with BDD and source hints | whole: `{planning_artifacts}/*epic*.md`, sharded: `{planning_artifacts}/*epic*/*.md` | SELECTIVE_LOAD |
55
+
56
+ ---
57
+
58
+ ## EXECUTION
59
+
60
+ <workflow>
61
+
62
+ <step n="1" goal="Determine target story">
63
+ <check if="{{story_path}} is provided by user or user provided the epic and story number such as 2-4 or 1.6 or epic 1 story 5">
64
+ <action>Parse user-provided story path: extract epic_num, story_num, story_title from format like "1-2-user-auth"</action>
65
+ <action>Set {{epic_num}}, {{story_num}}, {{story_key}} from user input</action>
66
+ <action>GOTO step 2a</action>
67
+ </check>
68
+
69
+ <action>Check if {{sprint_status}} file exists for auto discover</action>
70
+ <check if="sprint status file does NOT exist">
71
+ <output>🚫 No sprint status file found and no story specified</output>
72
+ <output>
73
+ **Required Options:**
74
+ 1. Run `sprint-planning` to initialize sprint tracking (recommended)
75
+ 2. Provide specific epic-story number to create (e.g., "1-2-user-auth")
76
+ 3. Provide path to story documents if sprint status doesn't exist yet
77
+ </output>
78
+ <ask>Choose option [1], provide epic-story number, path to story docs, or [q] to quit:</ask>
79
+
80
+ <check if="user chooses 'q'">
81
+ <action>HALT - No work needed</action>
82
+ </check>
83
+
84
+ <check if="user chooses '1'">
85
+ <output>Run sprint-planning workflow first to create sprint-status.yaml</output>
86
+ <action>HALT - User needs to run sprint-planning</action>
87
+ </check>
88
+
89
+ <check if="user provides epic-story number">
90
+ <action>Parse user input: extract epic_num, story_num, story_title</action>
91
+ <action>Set {{epic_num}}, {{story_num}}, {{story_key}} from user input</action>
92
+ <action>GOTO step 2a</action>
93
+ </check>
94
+
95
+ <check if="user provides story docs path">
96
+ <action>Use user-provided path for story documents</action>
97
+ <action>GOTO step 2a</action>
98
+ </check>
99
+ </check>
100
+
101
+ <!-- Auto-discover from sprint status only if no user input -->
102
+ <check if="no user input provided">
103
+ <critical>MUST read COMPLETE {sprint_status} file from start to end to preserve order</critical>
104
+ <action>Load the FULL file: {{sprint_status}}</action>
105
+ <action>Read ALL lines from beginning to end - do not skip any content</action>
106
+ <action>Parse the development_status section completely</action>
107
+
108
+ <action>Find the FIRST story (by reading in order from top to bottom) where:
109
+ - Key matches pattern: number-number-name (e.g., "1-2-user-auth")
110
+ - NOT an epic key (epic-X) or retrospective (epic-X-retrospective)
111
+ - Status value equals "backlog"
112
+ </action>
113
+
114
+ <check if="no backlog story found">
115
+ <output>📋 No backlog stories found in sprint-status.yaml
116
+
117
+ All stories are either already created, in progress, or done.
118
+
119
+ **Options:**
120
+ 1. Run sprint-planning to refresh story tracking
121
+ 2. Load PM agent and run correct-course to add more stories
122
+ 3. Check if current sprint is complete and run retrospective
123
+ </output>
124
+ <action>HALT</action>
125
+ </check>
126
+
127
+ <action>Extract from found story key (e.g., "1-2-user-authentication"):
128
+ - epic_num: first number before dash (e.g., "1")
129
+ - story_num: second number after first dash (e.g., "2")
130
+ - story_title: remainder after second dash (e.g., "user-authentication")
131
+ </action>
132
+ <action>Set {{story_id}} = "{{epic_num}}.{{story_num}}"</action>
133
+ <action>Store story_key for later use (e.g., "1-2-user-authentication")</action>
134
+
135
+ <!-- Mark epic as in-progress if this is first story -->
136
+ <action>Check if this is the first story in epic {{epic_num}} by looking for {{epic_num}}-1-* pattern</action>
137
+ <check if="this is first story in epic {{epic_num}}">
138
+ <action>Load {{sprint_status}} and check epic-{{epic_num}} status</action>
139
+ <action>If epic status is "backlog" → update to "in-progress"</action>
140
+ <action>If epic status is "contexted" (legacy status) → update to "in-progress" (backward compatibility)</action>
141
+ <action>If epic status is "in-progress" → no change needed</action>
142
+ <check if="epic status is 'done'">
143
+ <output>🚫 ERROR: Cannot create story in completed epic</output>
144
+ <output>Epic {{epic_num}} is marked as 'done'. All stories are complete.</output>
145
+ <output>If you need to add more work, either:</output>
146
+ <output>1. Manually change epic status back to 'in-progress' in sprint-status.yaml</output>
147
+ <output>2. Create a new epic for additional work</output>
148
+ <action>HALT - Cannot proceed</action>
149
+ </check>
150
+ <check if="epic status is not one of: backlog, contexted, in-progress, done">
151
+ <output>🚫 ERROR: Invalid epic status '{{epic_status}}'</output>
152
+ <output>Epic {{epic_num}} has invalid status. Expected: backlog, in-progress, or done</output>
153
+ <output>Please fix sprint-status.yaml manually or run sprint-planning to regenerate</output>
154
+ <action>HALT - Cannot proceed</action>
155
+ </check>
156
+ <output>📊 Epic {{epic_num}} status updated to in-progress</output>
157
+ </check>
158
+
159
+ <action>GOTO step 2a</action>
160
+ </check>
161
+ <action>Load the FULL file: {{sprint_status}}</action>
162
+ <action>Read ALL lines from beginning to end - do not skip any content</action>
163
+ <action>Parse the development_status section completely</action>
164
+
165
+ <action>Find the FIRST story (by reading in order from top to bottom) where:
166
+ - Key matches pattern: number-number-name (e.g., "1-2-user-auth")
167
+ - NOT an epic key (epic-X) or retrospective (epic-X-retrospective)
168
+ - Status value equals "backlog"
169
+ </action>
170
+
171
+ <check if="no backlog story found">
172
+ <output>No backlog stories found in sprint-status.yaml
173
+
174
+ All stories are either already created, in progress, or done.
175
+
176
+ **Options:**
177
+ 1. Run sprint-planning to refresh story tracking
178
+ 2. Load PM agent and run correct-course to add more stories
179
+ 3. Check if current sprint is complete and run retrospective
180
+ </output>
181
+ <action>HALT</action>
182
+ </check>
183
+
184
+ <action>Extract from found story key (e.g., "1-2-user-authentication"):
185
+ - epic_num: first number before dash (e.g., "1")
186
+ - story_num: second number after first dash (e.g., "2")
187
+ - story_title: remainder after second dash (e.g., "user-authentication")
188
+ </action>
189
+ <action>Set {{story_id}} = "{{epic_num}}.{{story_num}}"</action>
190
+ <action>Store story_key for later use (e.g., "1-2-user-authentication")</action>
191
+
192
+ <!-- Mark epic as in-progress if this is first story -->
193
+ <action>Check if this is the first story in epic {{epic_num}} by looking for {{epic_num}}-1-* pattern</action>
194
+ <check if="this is first story in epic {{epic_num}}">
195
+ <action>Load {{sprint_status}} and check epic-{{epic_num}} status</action>
196
+ <action>If epic status is "backlog" → update to "in-progress"</action>
197
+ <action>If epic status is "contexted" (legacy status) → update to "in-progress" (backward compatibility)</action>
198
+ <action>If epic status is "in-progress" → no change needed</action>
199
+ <check if="epic status is 'done'">
200
+ <output>ERROR: Cannot create story in completed epic</output>
201
+ <output>Epic {{epic_num}} is marked as 'done'. All stories are complete.</output>
202
+ <output>If you need to add more work, either:</output>
203
+ <output>1. Manually change epic status back to 'in-progress' in sprint-status.yaml</output>
204
+ <output>2. Create a new epic for additional work</output>
205
+ <action>HALT - Cannot proceed</action>
206
+ </check>
207
+ <check if="epic status is not one of: backlog, contexted, in-progress, done">
208
+ <output>ERROR: Invalid epic status '{{epic_status}}'</output>
209
+ <output>Epic {{epic_num}} has invalid status. Expected: backlog, in-progress, or done</output>
210
+ <output>Please fix sprint-status.yaml manually or run sprint-planning to regenerate</output>
211
+ <action>HALT - Cannot proceed</action>
212
+ </check>
213
+ <output>Epic {{epic_num}} status updated to in-progress</output>
214
+ </check>
215
+
216
+ <action>GOTO step 2a</action>
217
+ </step>
218
+
219
+ <step n="2" goal="Load and analyze core artifacts">
220
+ <critical>🔬 EXHAUSTIVE ARTIFACT ANALYSIS - This is where you prevent future developer fuckups!</critical>
221
+
222
+ <!-- Load all available content through discovery protocol -->
223
+ <action>Read fully and follow `{installed_path}/discover-inputs.md` to load all input files</action>
224
+ <note>Available content: {epics_content}, {prd_content}, {architecture_content}, {ux_content},
225
+ {project_context}</note>
226
+
227
+ <!-- Analyze epics file for story foundation -->
228
+ <action>From {epics_content}, extract Epic {{epic_num}} complete context:</action> **EPIC ANALYSIS:** - Epic
229
+ objectives and business value - ALL stories in this epic for cross-story context - Our specific story's requirements, user story
230
+ statement, acceptance criteria - Technical requirements and constraints - Dependencies on other stories/epics - Source hints pointing to
231
+ original documents <!-- Extract specific story requirements -->
232
+ <action>Extract our story ({{epic_num}}-{{story_num}}) details:</action> **STORY FOUNDATION:** - User story statement
233
+ (As a, I want, so that) - Detailed acceptance criteria (already BDD formatted) - Technical requirements specific to this story -
234
+ Business context and value - Success criteria <!-- Previous story analysis for context continuity -->
235
+ <check if="story_num > 1">
236
+ <action>Find {{previous_story_num}}: scan {implementation_artifacts} for the story file in epic {{epic_num}} with the highest story number less than {{story_num}}</action>
237
+ <action>Load previous story file: {implementation_artifacts}/{{epic_num}}-{{previous_story_num}}-*.md</action> **PREVIOUS STORY INTELLIGENCE:** -
238
+ Dev notes and learnings from previous story - Review feedback and corrections needed - Files that were created/modified and their
239
+ patterns - Testing approaches that worked/didn't work - Problems encountered and solutions found - Code patterns established <action>Extract
240
+ all learnings that could impact current story implementation</action>
241
+ </check>
242
+
243
+ <!-- Git intelligence for previous work patterns -->
244
+ <check
245
+ if="previous story exists AND git repository detected">
246
+ <action>Get last 5 commit titles to understand recent work patterns</action>
247
+ <action>Analyze 1-5 most recent commits for relevance to current story:
248
+ - Files created/modified
249
+ - Code patterns and conventions used
250
+ - Library dependencies added/changed
251
+ - Architecture decisions implemented
252
+ - Testing approaches used
253
+ </action>
254
+ <action>Extract actionable insights for current story implementation</action>
255
+ </check>
256
+ </step>
257
+
258
+ <step n="3" goal="Architecture analysis for developer guardrails">
259
+ <critical>🏗️ ARCHITECTURE INTELLIGENCE - Extract everything the developer MUST follow!</critical> **ARCHITECTURE DOCUMENT ANALYSIS:** <action>Systematically
260
+ analyze architecture content for story-relevant requirements:</action>
261
+
262
+ <!-- Load architecture - single file or sharded -->
263
+ <check if="architecture file is single file">
264
+ <action>Load complete {architecture_content}</action>
265
+ </check>
266
+ <check if="architecture is sharded to folder">
267
+ <action>Load architecture index and scan all architecture files</action>
268
+ </check> **CRITICAL ARCHITECTURE EXTRACTION:** <action>For
269
+ each architecture section, determine if relevant to this story:</action> - **Technical Stack:** Languages, frameworks, libraries with
270
+ versions - **Code Structure:** Folder organization, naming conventions, file patterns - **API Patterns:** Service structure, endpoint
271
+ patterns, data contracts - **Database Schemas:** Tables, relationships, constraints relevant to story - **Security Requirements:**
272
+ Authentication patterns, authorization rules - **Performance Requirements:** Caching strategies, optimization patterns - **Testing
273
+ Standards:** Testing frameworks, coverage expectations, test patterns - **Deployment Patterns:** Environment configurations, build
274
+ processes - **Integration Patterns:** External service integrations, data flows <action>Extract any story-specific requirements that the
275
+ developer MUST follow</action>
276
+ <action>Identify any architectural decisions that override previous patterns</action>
277
+ </step>
278
+
279
+ <step n="4" goal="Web research for latest technical specifics">
280
+ <critical>🌐 ENSURE LATEST TECH KNOWLEDGE - Prevent outdated implementations!</critical> **WEB INTELLIGENCE:** <action>Identify specific
281
+ technical areas that require latest version knowledge:</action>
282
+
283
+ <!-- Check for libraries/frameworks mentioned in architecture -->
284
+ <action>From architecture analysis, identify specific libraries, APIs, or
285
+ frameworks</action>
286
+ <action>For each critical technology, research latest stable version and key changes:
287
+ - Latest API documentation and breaking changes
288
+ - Security vulnerabilities or updates
289
+ - Performance improvements or deprecations
290
+ - Best practices for current version
291
+ </action>
292
+ **EXTERNAL CONTEXT INCLUSION:** <action>Include in story any critical latest information the developer needs:
293
+ - Specific library versions and why chosen
294
+ - API endpoints with parameters and authentication
295
+ - Recent security patches or considerations
296
+ - Performance optimization techniques
297
+ - Migration considerations if upgrading
298
+ </action>
299
+ </step>
300
+
301
+ <step n="5" goal="Create comprehensive story file">
302
+ <critical>📝 CREATE ULTIMATE STORY FILE - The developer's master implementation guide!</critical>
303
+
304
+ <action>Initialize from template.md:
305
+ {default_output_file}</action>
306
+ <template-output file="{default_output_file}">story_header</template-output>
307
+
308
+ <!-- Story foundation from epics analysis -->
309
+ <template-output
310
+ file="{default_output_file}">story_requirements</template-output>
311
+
312
+ <!-- Developer context section - MOST IMPORTANT PART -->
313
+ <template-output file="{default_output_file}">
314
+ developer_context_section</template-output> **DEV AGENT GUARDRAILS:** <template-output file="{default_output_file}">
315
+ technical_requirements</template-output>
316
+ <template-output file="{default_output_file}">architecture_compliance</template-output>
317
+ <template-output
318
+ file="{default_output_file}">library_framework_requirements</template-output>
319
+ <template-output file="{default_output_file}">
320
+ file_structure_requirements</template-output>
321
+ <template-output file="{default_output_file}">testing_requirements</template-output>
322
+
323
+ <!-- Previous story intelligence -->
324
+ <check
325
+ if="previous story learnings available">
326
+ <template-output file="{default_output_file}">previous_story_intelligence</template-output>
327
+ </check>
328
+
329
+ <!-- Git intelligence -->
330
+ <check
331
+ if="git analysis completed">
332
+ <template-output file="{default_output_file}">git_intelligence_summary</template-output>
333
+ </check>
334
+
335
+ <!-- Latest technical specifics -->
336
+ <check if="web research completed">
337
+ <template-output file="{default_output_file}">latest_tech_information</template-output>
338
+ </check>
339
+
340
+ <!-- Project context reference -->
341
+ <template-output
342
+ file="{default_output_file}">project_context_reference</template-output>
343
+
344
+ <!-- Final status update -->
345
+ <template-output file="{default_output_file}">
346
+ story_completion_status</template-output>
347
+
348
+ <!-- CRITICAL: Set status to ready-for-dev -->
349
+ <action>Set story Status to: "ready-for-dev"</action>
350
+ <action>Add completion note: "Ultimate
351
+ context engine analysis completed - comprehensive developer guide created"</action>
352
+ </step>
353
+
354
+ <step n="6" goal="Update sprint status and finalize">
355
+ <action>Validate the newly created story file {story_file} against {installed_path}/checklist.md and apply any required fixes before finalizing</action>
356
+ <action>Save story document unconditionally</action>
357
+
358
+ <!-- Update sprint status -->
359
+ <check if="sprint status file exists">
360
+ <action>Update {{sprint_status}}</action>
361
+ <action>Load the FULL file and read all development_status entries</action>
362
+ <action>Find development_status key matching {{story_key}}</action>
363
+ <action>Verify current status is "backlog" (expected previous state)</action>
364
+ <action>Update development_status[{{story_key}}] = "ready-for-dev"</action>
365
+ <action>Update last_updated field to current date</action>
366
+ <action>Save file, preserving ALL comments and structure including STATUS DEFINITIONS</action>
367
+ </check>
368
+
369
+ <action>Report completion</action>
370
+ <output>**🎯 ULTIMATE BMad Method STORY CONTEXT CREATED, {user_name}!**
371
+
372
+ **Story Details:**
373
+ - Story ID: {{story_id}}
374
+ - Story Key: {{story_key}}
375
+ - File: {{story_file}}
376
+ - Status: ready-for-dev
377
+
378
+ **Next Steps:**
379
+ 1. Review the comprehensive story in {{story_file}}
380
+ 2. Run dev agents `dev-story` for optimized implementation
381
+ 3. Run `code-review` when complete (auto-marks done)
382
+ 4. Optional: If Test Architect module installed, run `/bmad:tea:automate` after `dev-story` to generate guardrail tests
383
+
384
+ **The developer now has everything needed for flawless implementation!**
385
+ </output>
386
+ </step>
387
+
388
+ </workflow>
@@ -0,0 +1,3 @@
1
+ canonicalId: bmad-dev-story
2
+ type: workflow
3
+ description: "Execute story implementation following a context-filled story spec file"