bmad-method 6.0.3 → 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 (271) 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/.claude/skills/bmad-os-root-cause-analysis/SKILL.md +12 -0
  9. package/.claude/skills/bmad-os-root-cause-analysis/prompts/instructions.md +74 -0
  10. package/.github/ISSUE_TEMPLATE/config.yaml +1 -1
  11. package/.github/ISSUE_TEMPLATE/documentation.yaml +1 -1
  12. package/.github/workflows/publish.yaml +243 -0
  13. package/CHANGELOG.md +32 -0
  14. package/CONTRIBUTING.md +1 -1
  15. package/README.md +8 -8
  16. package/README_CN.md +121 -0
  17. package/docs/_STYLE_GUIDE.md +10 -10
  18. package/docs/explanation/brainstorming.md +1 -1
  19. package/docs/explanation/party-mode.md +1 -1
  20. package/docs/explanation/preventing-agent-conflicts.md +1 -1
  21. package/docs/explanation/project-context.md +15 -15
  22. package/docs/explanation/quick-flow.md +9 -9
  23. package/docs/how-to/established-projects.md +7 -7
  24. package/docs/how-to/get-answers-about-bmad.md +2 -2
  25. package/docs/how-to/install-bmad.md +16 -6
  26. package/docs/how-to/project-context.md +2 -2
  27. package/docs/how-to/quick-fixes.md +5 -5
  28. package/docs/how-to/shard-large-documents.md +1 -1
  29. package/docs/how-to/upgrade-to-v6.md +8 -5
  30. package/docs/index.md +2 -2
  31. package/docs/reference/agents.md +14 -14
  32. package/docs/reference/commands.md +64 -70
  33. package/docs/reference/testing.md +1 -1
  34. package/docs/reference/workflow-map.md +19 -19
  35. package/docs/tutorials/getting-started.md +34 -34
  36. package/docs/zh-cn/404.md +9 -0
  37. package/docs/zh-cn/_STYLE_GUIDE.md +370 -0
  38. package/docs/zh-cn/explanation/advanced-elicitation.md +62 -0
  39. package/docs/zh-cn/explanation/adversarial-review.md +71 -0
  40. package/docs/zh-cn/explanation/brainstorming.md +43 -0
  41. package/docs/zh-cn/explanation/established-projects-faq.md +60 -0
  42. package/docs/zh-cn/explanation/party-mode.md +79 -0
  43. package/docs/zh-cn/explanation/preventing-agent-conflicts.md +137 -0
  44. package/docs/zh-cn/explanation/project-context.md +176 -0
  45. package/docs/zh-cn/explanation/quick-flow.md +93 -0
  46. package/docs/zh-cn/explanation/why-solutioning-matters.md +90 -0
  47. package/docs/zh-cn/how-to/customize-bmad.md +182 -0
  48. package/docs/zh-cn/how-to/established-projects.md +134 -0
  49. package/docs/zh-cn/how-to/get-answers-about-bmad.md +144 -0
  50. package/docs/zh-cn/how-to/install-bmad.md +105 -0
  51. package/docs/zh-cn/how-to/non-interactive-installation.md +181 -0
  52. package/docs/zh-cn/how-to/project-context.md +152 -0
  53. package/docs/zh-cn/how-to/quick-fixes.md +140 -0
  54. package/docs/zh-cn/how-to/shard-large-documents.md +86 -0
  55. package/docs/zh-cn/how-to/upgrade-to-v6.md +120 -0
  56. package/docs/zh-cn/index.md +69 -0
  57. package/docs/zh-cn/reference/agents.md +41 -0
  58. package/docs/zh-cn/reference/commands.md +166 -0
  59. package/docs/zh-cn/reference/modules.md +94 -0
  60. package/docs/zh-cn/reference/testing.md +122 -0
  61. package/docs/zh-cn/reference/workflow-map.md +104 -0
  62. package/docs/zh-cn/roadmap.mdx +152 -0
  63. package/docs/zh-cn/tutorials/getting-started.md +300 -0
  64. package/package.json +1 -1
  65. package/src/bmm/agents/analyst.agent.yaml +1 -1
  66. package/src/bmm/agents/bmad-skill-manifest.yaml +39 -0
  67. package/src/bmm/agents/dev.agent.yaml +2 -2
  68. package/src/bmm/agents/pm.agent.yaml +1 -1
  69. package/src/bmm/agents/qa.agent.yaml +1 -1
  70. package/src/bmm/agents/quick-flow-solo-dev.agent.yaml +6 -2
  71. package/src/bmm/agents/sm.agent.yaml +4 -4
  72. package/src/bmm/agents/tech-writer/bmad-skill-manifest.yaml +3 -0
  73. package/src/bmm/agents/tech-writer/tech-writer.agent.yaml +1 -1
  74. package/src/bmm/module-help.csv +11 -10
  75. package/src/bmm/workflows/1-analysis/create-product-brief/bmad-skill-manifest.yaml +3 -0
  76. package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-02-vision.md +1 -1
  77. package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-03-users.md +1 -1
  78. package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-04-metrics.md +1 -1
  79. package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-05-scope.md +1 -1
  80. package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-06-complete.md +1 -1
  81. package/src/bmm/workflows/1-analysis/research/bmad-skill-manifest.yaml +14 -0
  82. package/src/bmm/workflows/2-plan-workflows/create-prd/bmad-skill-manifest.yaml +14 -0
  83. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-02-discovery.md +1 -1
  84. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-02b-vision.md +1 -1
  85. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-02c-executive-summary.md +1 -1
  86. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-03-success.md +1 -1
  87. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-04-journeys.md +1 -1
  88. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-05-domain.md +1 -1
  89. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-06-innovation.md +1 -1
  90. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-07-project-type.md +1 -1
  91. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-08-scoping.md +1 -1
  92. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-09-functional.md +1 -1
  93. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-10-nonfunctional.md +1 -1
  94. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-11-polish.md +1 -1
  95. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-12-complete.md +1 -1
  96. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-e/step-e-01-discovery.md +1 -1
  97. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-e/step-e-02-review.md +1 -1
  98. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-01-discovery.md +1 -1
  99. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-10-smart-validation.md +1 -1
  100. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-11-holistic-quality-validation.md +1 -1
  101. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-13-report-complete.md +1 -1
  102. package/src/bmm/workflows/2-plan-workflows/create-ux-design/bmad-skill-manifest.yaml +3 -0
  103. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-02-discovery.md +1 -1
  104. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-03-core-experience.md +2 -2
  105. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-04-emotional-response.md +2 -2
  106. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-05-inspiration.md +2 -2
  107. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-06-design-system.md +2 -2
  108. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-07-defining-experience.md +2 -2
  109. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-08-visual-foundation.md +2 -2
  110. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-09-design-directions.md +2 -2
  111. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-10-user-journeys.md +2 -2
  112. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-11-component-strategy.md +2 -2
  113. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-12-ux-patterns.md +2 -2
  114. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-13-responsive-accessibility.md +2 -2
  115. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-14-complete.md +1 -1
  116. package/src/bmm/workflows/3-solutioning/check-implementation-readiness/bmad-skill-manifest.yaml +3 -0
  117. package/src/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-06-final-assessment.md +1 -1
  118. package/src/bmm/workflows/3-solutioning/create-architecture/bmad-skill-manifest.yaml +3 -0
  119. package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-02-context.md +2 -2
  120. package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-03-starter.md +2 -2
  121. package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-04-decisions.md +2 -2
  122. package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-05-patterns.md +2 -2
  123. package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-06-structure.md +2 -2
  124. package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-07-validation.md +2 -2
  125. package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-08-complete.md +1 -1
  126. package/src/bmm/workflows/3-solutioning/create-epics-and-stories/bmad-skill-manifest.yaml +3 -0
  127. package/src/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-01-validate-prerequisites.md +1 -1
  128. package/src/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-02-design-epics.md +1 -1
  129. package/src/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-03-create-stories.md +1 -1
  130. package/src/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-04-final-validation.md +2 -2
  131. package/src/bmm/workflows/4-implementation/code-review/bmad-skill-manifest.yaml +3 -0
  132. package/src/bmm/workflows/4-implementation/code-review/discover-inputs.md +88 -0
  133. package/src/bmm/workflows/4-implementation/code-review/workflow.md +271 -0
  134. package/src/bmm/workflows/4-implementation/correct-course/bmad-skill-manifest.yaml +3 -0
  135. package/src/bmm/workflows/4-implementation/correct-course/checklist.md +1 -1
  136. package/src/bmm/workflows/4-implementation/correct-course/{instructions.md → workflow.md} +79 -12
  137. package/src/bmm/workflows/4-implementation/create-story/bmad-skill-manifest.yaml +3 -0
  138. package/src/bmm/workflows/4-implementation/create-story/checklist.md +9 -10
  139. package/src/bmm/workflows/4-implementation/create-story/discover-inputs.md +88 -0
  140. package/src/bmm/workflows/4-implementation/create-story/workflow.md +388 -0
  141. package/src/bmm/workflows/4-implementation/dev-story/bmad-skill-manifest.yaml +3 -0
  142. package/src/bmm/workflows/4-implementation/dev-story/{instructions.xml → workflow.md} +49 -2
  143. package/src/bmm/workflows/4-implementation/retrospective/bmad-skill-manifest.yaml +3 -0
  144. package/src/bmm/workflows/4-implementation/retrospective/{instructions.md → workflow.md} +64 -23
  145. package/src/bmm/workflows/4-implementation/sprint-planning/bmad-skill-manifest.yaml +3 -0
  146. package/src/bmm/workflows/4-implementation/sprint-planning/sprint-status-template.yaml +1 -0
  147. package/src/bmm/workflows/4-implementation/sprint-planning/{instructions.md → workflow.md} +55 -10
  148. package/src/bmm/workflows/4-implementation/sprint-status/bmad-skill-manifest.yaml +3 -0
  149. package/src/bmm/workflows/4-implementation/sprint-status/{instructions.md → workflow.md} +45 -8
  150. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/SKILL.md +6 -0
  151. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/bmad-skill-manifest.yaml +1 -0
  152. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-01-clarify-and-route.md +54 -0
  153. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-02-plan.md +39 -0
  154. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-03-implement.md +35 -0
  155. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-04-review.md +55 -0
  156. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-05-present.md +19 -0
  157. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/tech-spec-template.md +90 -0
  158. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/workflow.md +84 -0
  159. package/src/bmm/workflows/bmad-quick-flow/quick-dev/bmad-skill-manifest.yaml +3 -0
  160. package/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-05-adversarial-review.md +8 -14
  161. package/src/bmm/workflows/bmad-quick-flow/quick-dev/workflow.md +1 -1
  162. package/src/bmm/workflows/bmad-quick-flow/quick-spec/bmad-skill-manifest.yaml +3 -0
  163. package/src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-04-review.md +4 -6
  164. package/src/bmm/workflows/bmad-quick-flow/quick-spec/workflow.md +1 -1
  165. package/src/bmm/workflows/document-project/bmad-skill-manifest.yaml +3 -0
  166. package/src/bmm/workflows/document-project/instructions.md +5 -7
  167. package/src/bmm/workflows/document-project/workflow.md +39 -0
  168. package/src/bmm/workflows/document-project/workflows/deep-dive-instructions.md +0 -1
  169. package/src/bmm/workflows/document-project/workflows/deep-dive-workflow.md +42 -0
  170. package/src/bmm/workflows/document-project/workflows/full-scan-instructions.md +0 -1
  171. package/src/bmm/workflows/document-project/workflows/full-scan-workflow.md +42 -0
  172. package/src/bmm/workflows/generate-project-context/bmad-skill-manifest.yaml +3 -0
  173. package/src/bmm/workflows/generate-project-context/steps/step-02-generate.md +2 -2
  174. package/src/bmm/workflows/qa-generate-e2e-tests/bmad-skill-manifest.yaml +3 -0
  175. package/src/bmm/workflows/qa-generate-e2e-tests/checklist.md +1 -1
  176. package/src/bmm/workflows/qa-generate-e2e-tests/{instructions.md → workflow.md} +40 -7
  177. package/src/core/agents/bmad-master.agent.yaml +1 -1
  178. package/src/core/agents/bmad-skill-manifest.yaml +3 -0
  179. package/src/core/module-help.csv +3 -2
  180. package/src/core/module.yaml +1 -1
  181. package/src/core/tasks/bmad-help/SKILL.md +6 -0
  182. package/src/core/tasks/bmad-help/bmad-skill-manifest.yaml +1 -0
  183. package/src/core/tasks/{help.md → bmad-help/workflow.md} +6 -4
  184. package/src/core/tasks/bmad-review-adversarial-general/SKILL.md +6 -0
  185. package/src/core/tasks/bmad-review-adversarial-general/bmad-skill-manifest.yaml +1 -0
  186. package/src/core/tasks/bmad-review-adversarial-general/workflow.md +32 -0
  187. package/src/core/tasks/bmad-review-edge-case-hunter/SKILL.md +6 -0
  188. package/src/core/tasks/bmad-review-edge-case-hunter/bmad-skill-manifest.yaml +1 -0
  189. package/src/core/tasks/bmad-review-edge-case-hunter/workflow.md +62 -0
  190. package/src/core/tasks/bmad-skill-manifest.yaml +19 -0
  191. package/src/core/workflows/advanced-elicitation/bmad-skill-manifest.yaml +3 -0
  192. package/src/core/workflows/advanced-elicitation/workflow.md +138 -0
  193. package/src/core/workflows/brainstorming/bmad-skill-manifest.yaml +3 -0
  194. package/src/core/workflows/brainstorming/steps/step-01-session-setup.md +31 -18
  195. package/src/core/workflows/brainstorming/steps/step-01b-continue.md +1 -1
  196. package/src/core/workflows/brainstorming/steps/step-03-technique-execution.md +3 -3
  197. package/src/core/workflows/brainstorming/steps/step-04-idea-organization.md +2 -2
  198. package/src/core/workflows/brainstorming/workflow.md +5 -3
  199. package/src/core/workflows/party-mode/bmad-skill-manifest.yaml +3 -0
  200. package/src/core/workflows/party-mode/workflow.md +1 -1
  201. package/src/utility/agent-components/activation-steps.txt +2 -2
  202. package/src/utility/agent-components/handler-multi.txt +1 -2
  203. package/test/adversarial-review-tests/README.md +3 -3
  204. package/test/adversarial-review-tests/test-cases.yaml +2 -2
  205. package/test/fixtures/agent-schema/valid/menu/multiple-menu-items.agent.yaml +1 -1
  206. package/test/fixtures/agent-schema/valid/menu-commands/all-command-types.agent.yaml +1 -1
  207. package/test/fixtures/agent-schema/valid/menu-commands/multiple-commands.agent.yaml +1 -2
  208. package/test/fixtures/file-refs-csv/valid/bmm-style.csv +1 -1
  209. package/test/test-file-refs-csv.js +1 -1
  210. package/test/test-install-to-bmad.js +154 -0
  211. package/test/test-installation-components.js +1586 -2
  212. package/test/test-workflow-path-regex.js +88 -0
  213. package/tools/cli/installers/install-messages.yaml +1 -1
  214. package/tools/cli/installers/lib/core/installer.js +34 -1
  215. package/tools/cli/installers/lib/core/manifest-generator.js +332 -41
  216. package/tools/cli/installers/lib/ide/_base-ide.js +24 -15
  217. package/tools/cli/installers/lib/ide/_config-driven.js +547 -53
  218. package/tools/cli/installers/lib/ide/manager.js +26 -62
  219. package/tools/cli/installers/lib/ide/platform-codes.yaml +116 -29
  220. package/tools/cli/installers/lib/ide/shared/agent-command-generator.js +1 -0
  221. package/tools/cli/installers/lib/ide/shared/bmad-artifacts.js +7 -0
  222. package/tools/cli/installers/lib/ide/shared/path-utils.js +68 -3
  223. package/tools/cli/installers/lib/ide/shared/skill-manifest.js +90 -0
  224. package/tools/cli/installers/lib/ide/shared/task-tool-command-generator.js +2 -0
  225. package/tools/cli/installers/lib/ide/shared/workflow-command-generator.js +6 -145
  226. package/tools/cli/installers/lib/ide/templates/agent-command-template.md +1 -1
  227. package/tools/cli/installers/lib/ide/templates/combined/default-workflow.md +1 -1
  228. package/tools/cli/installers/lib/ide/templates/combined/gemini-workflow-yaml.toml +1 -1
  229. package/tools/cli/installers/lib/ide/templates/combined/gemini-workflow.toml +1 -1
  230. package/tools/cli/installers/lib/ide/templates/combined/opencode-agent.md +1 -1
  231. package/tools/cli/installers/lib/ide/templates/combined/opencode-task.md +0 -1
  232. package/tools/cli/installers/lib/ide/templates/combined/opencode-tool.md +0 -1
  233. package/tools/cli/installers/lib/ide/templates/combined/opencode-workflow-yaml.md +0 -1
  234. package/tools/cli/installers/lib/ide/templates/combined/opencode-workflow.md +0 -1
  235. package/tools/cli/installers/lib/modules/manager.js +9 -132
  236. package/tools/cli/lib/agent/compiler.js +1 -10
  237. package/tools/cli/lib/agent-analyzer.js +2 -14
  238. package/tools/cli/lib/yaml-xml-builder.js +1 -18
  239. package/tools/docs/native-skills-migration-checklist.md +281 -0
  240. package/tools/platform-codes.yaml +1 -1
  241. package/tools/schema/agent.js +1 -3
  242. package/tools/validate-file-refs.js +2 -0
  243. package/website/astro.config.mjs +24 -3
  244. package/website/src/content/config.ts +2 -1
  245. package/website/src/content/i18n/zh-CN.json +28 -0
  246. package/src/bmm/workflows/4-implementation/code-review/instructions.xml +0 -227
  247. package/src/bmm/workflows/4-implementation/code-review/workflow.yaml +0 -43
  248. package/src/bmm/workflows/4-implementation/correct-course/workflow.yaml +0 -53
  249. package/src/bmm/workflows/4-implementation/create-story/instructions.xml +0 -346
  250. package/src/bmm/workflows/4-implementation/create-story/workflow.yaml +0 -52
  251. package/src/bmm/workflows/4-implementation/dev-story/workflow.yaml +0 -20
  252. package/src/bmm/workflows/4-implementation/retrospective/workflow.yaml +0 -52
  253. package/src/bmm/workflows/4-implementation/sprint-planning/workflow.yaml +0 -47
  254. package/src/bmm/workflows/4-implementation/sprint-status/workflow.yaml +0 -25
  255. package/src/bmm/workflows/document-project/workflow.yaml +0 -22
  256. package/src/bmm/workflows/document-project/workflows/deep-dive.yaml +0 -31
  257. package/src/bmm/workflows/document-project/workflows/full-scan.yaml +0 -31
  258. package/src/bmm/workflows/qa-generate-e2e-tests/workflow.yaml +0 -42
  259. package/src/core/tasks/review-adversarial-general.xml +0 -49
  260. package/src/core/tasks/workflow.xml +0 -235
  261. package/src/core/workflows/advanced-elicitation/workflow.xml +0 -118
  262. package/src/utility/agent-components/handler-validate-workflow.txt +0 -7
  263. package/src/utility/agent-components/handler-workflow.txt +0 -10
  264. package/tools/cli/installers/lib/ide/codex.js +0 -440
  265. package/tools/cli/installers/lib/ide/github-copilot.js +0 -699
  266. package/tools/cli/installers/lib/ide/kilo.js +0 -269
  267. package/tools/cli/installers/lib/ide/rovodev.js +0 -257
  268. package/tools/cli/installers/lib/ide/templates/combined/default-workflow-yaml.md +0 -14
  269. package/tools/cli/installers/lib/ide/templates/combined/kiro-workflow-yaml.md +0 -15
  270. package/tools/cli/installers/lib/ide/templates/workflow-command-template.md +0 -13
  271. package/tools/cli/installers/lib/ide/templates/workflow-commander.md +0 -5
@@ -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,271 @@
1
+ ---
2
+ name: code-review
3
+ description: 'Perform adversarial code review finding specific issues. Use when the user says "run code review" or "review this code"'
4
+ ---
5
+
6
+ # Code Review Workflow
7
+
8
+ **Goal:** Perform adversarial code review finding specific issues.
9
+
10
+ **Your Role:** Adversarial Code Reviewer.
11
+ - YOU ARE AN ADVERSARIAL CODE REVIEWER - Find what's wrong or missing!
12
+ - Communicate all responses in {communication_language} and language MUST be tailored to {user_skill_level}
13
+ - Generate all documents in {document_output_language}
14
+ - Your purpose: Validate story file claims against actual implementation
15
+ - Challenge everything: Are tasks marked [x] actually done? Are ACs really implemented?
16
+ - Find 3-10 specific issues in every review minimum - no lazy "looks good" reviews - YOU are so much better than the dev agent that wrote this slop
17
+ - Read EVERY file in the File List - verify implementation against story requirements
18
+ - Tasks marked complete but not done = CRITICAL finding
19
+ - Acceptance Criteria not implemented = HIGH severity finding
20
+ - Do not review files that are not part of the application's source code. Always exclude the `_bmad/` and `_bmad-output/` folders from the review. Always exclude IDE and CLI configuration folders like `.cursor/` and `.windsurf/` and `.claude/`
21
+
22
+ ---
23
+
24
+ ## INITIALIZATION
25
+
26
+ ### Configuration Loading
27
+
28
+ Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:
29
+
30
+ - `project_name`, `user_name`
31
+ - `communication_language`, `document_output_language`
32
+ - `user_skill_level`
33
+ - `planning_artifacts`, `implementation_artifacts`
34
+ - `date` as system-generated current datetime
35
+
36
+ ### Paths
37
+
38
+ - `installed_path` = `{project-root}/_bmad/bmm/workflows/4-implementation/code-review`
39
+ - `sprint_status` = `{implementation_artifacts}/sprint-status.yaml`
40
+ - `validation` = `{installed_path}/checklist.md`
41
+
42
+ ### Input Files
43
+
44
+ | Input | Description | Path Pattern(s) | Load Strategy |
45
+ |-------|-------------|------------------|---------------|
46
+ | architecture | System architecture for review context | whole: `{planning_artifacts}/*architecture*.md`, sharded: `{planning_artifacts}/*architecture*/*.md` | FULL_LOAD |
47
+ | ux_design | UX design specification (if UI review) | whole: `{planning_artifacts}/*ux*.md`, sharded: `{planning_artifacts}/*ux*/*.md` | FULL_LOAD |
48
+ | epics | Epic containing story being reviewed | whole: `{planning_artifacts}/*epic*.md`, sharded_index: `{planning_artifacts}/*epic*/index.md`, sharded_single: `{planning_artifacts}/*epic*/epic-{{epic_num}}.md` | SELECTIVE_LOAD |
49
+
50
+ ### Context
51
+
52
+ - `project_context` = `**/project-context.md` (load if exists)
53
+
54
+ ---
55
+
56
+ ## EXECUTION
57
+
58
+ <workflow>
59
+
60
+ <step n="1" goal="Load story and discover changes">
61
+ <action>Use provided {{story_path}} or ask user which story file to review</action>
62
+ <action>Read COMPLETE story file</action>
63
+ <action>Set {{story_key}} = extracted key from filename (e.g., "1-2-user-authentication.md" → "1-2-user-authentication") or story
64
+ metadata</action>
65
+ <action>Parse sections: Story, Acceptance Criteria, Tasks/Subtasks, Dev Agent Record → File List, Change Log</action>
66
+
67
+ <!-- Discover actual changes via git -->
68
+ <action>Check if git repository detected in current directory</action>
69
+ <check if="git repository exists">
70
+ <action>Run `git status --porcelain` to find uncommitted changes</action>
71
+ <action>Run `git diff --name-only` to see modified files</action>
72
+ <action>Run `git diff --cached --name-only` to see staged files</action>
73
+ <action>Compile list of actually changed files from git output</action>
74
+ </check>
75
+
76
+ <!-- Cross-reference story File List vs git reality -->
77
+ <action>Compare story's Dev Agent Record → File List with actual git changes</action>
78
+ <action>Note discrepancies:
79
+ - Files in git but not in story File List
80
+ - Files in story File List but no git changes
81
+ - Missing documentation of what was actually changed
82
+ </action>
83
+
84
+ <action>Read fully and follow `{installed_path}/discover-inputs.md` to load all input files</action>
85
+ <action>Load {project_context} for coding standards (if exists)</action>
86
+ </step>
87
+
88
+ <step n="2" goal="Build review attack plan">
89
+ <action>Extract ALL Acceptance Criteria from story</action>
90
+ <action>Extract ALL Tasks/Subtasks with completion status ([x] vs [ ])</action>
91
+ <action>From Dev Agent Record → File List, compile list of claimed changes</action>
92
+
93
+ <action>Create review plan:
94
+ 1. **AC Validation**: Verify each AC is actually implemented
95
+ 2. **Task Audit**: Verify each [x] task is really done
96
+ 3. **Code Quality**: Security, performance, maintainability
97
+ 4. **Test Quality**: Real tests vs placeholder bullshit
98
+ </action>
99
+ </step>
100
+
101
+ <step n="3" goal="Execute adversarial review">
102
+ <critical>VALIDATE EVERY CLAIM - Check git reality vs story claims</critical>
103
+
104
+ <!-- Git vs Story Discrepancies -->
105
+ <action>Review git vs story File List discrepancies:
106
+ 1. **Files changed but not in story File List** → MEDIUM finding (incomplete documentation)
107
+ 2. **Story lists files but no git changes** → HIGH finding (false claims)
108
+ 3. **Uncommitted changes not documented** → MEDIUM finding (transparency issue)
109
+ </action>
110
+
111
+ <!-- Use combined file list: story File List + git discovered files -->
112
+ <action>Create comprehensive review file list from story File List and git changes</action>
113
+
114
+ <!-- AC Validation -->
115
+ <action>For EACH Acceptance Criterion:
116
+ 1. Read the AC requirement
117
+ 2. Search implementation files for evidence
118
+ 3. Determine: IMPLEMENTED, PARTIAL, or MISSING
119
+ 4. If MISSING/PARTIAL → HIGH SEVERITY finding
120
+ </action>
121
+
122
+ <!-- Task Completion Audit -->
123
+ <action>For EACH task marked [x]:
124
+ 1. Read the task description
125
+ 2. Search files for evidence it was actually done
126
+ 3. **CRITICAL**: If marked [x] but NOT DONE → CRITICAL finding
127
+ 4. Record specific proof (file:line)
128
+ </action>
129
+
130
+ <!-- Code Quality Deep Dive -->
131
+ <action>For EACH file in comprehensive review list:
132
+ 1. **Security**: Look for injection risks, missing validation, auth issues
133
+ 2. **Performance**: N+1 queries, inefficient loops, missing caching
134
+ 3. **Error Handling**: Missing try/catch, poor error messages
135
+ 4. **Code Quality**: Complex functions, magic numbers, poor naming
136
+ 5. **Test Quality**: Are tests real assertions or placeholders?
137
+ </action>
138
+
139
+ <check if="total_issues_found lt 3">
140
+ <critical>NOT LOOKING HARD ENOUGH - Find more problems!</critical>
141
+ <action>Re-examine code for:
142
+ - Edge cases and null handling
143
+ - Architecture violations
144
+ - Documentation gaps
145
+ - Integration issues
146
+ - Dependency problems
147
+ - Git commit message quality (if applicable)
148
+ </action>
149
+ <action>Find at least 3 more specific, actionable issues</action>
150
+ </check>
151
+ </step>
152
+
153
+ <step n="4" goal="Present findings and fix them">
154
+ <action>Categorize findings: HIGH (must fix), MEDIUM (should fix), LOW (nice to fix)</action>
155
+ <action>Set {{fixed_count}} = 0</action>
156
+ <action>Set {{action_count}} = 0</action>
157
+
158
+ <output>**🔥 CODE REVIEW FINDINGS, {user_name}!**
159
+
160
+ **Story:** {{story_file}}
161
+ **Git vs Story Discrepancies:** {{git_discrepancy_count}} found
162
+ **Issues Found:** {{high_count}} High, {{medium_count}} Medium, {{low_count}} Low
163
+
164
+ ## 🔴 CRITICAL ISSUES
165
+ - Tasks marked [x] but not actually implemented
166
+ - Acceptance Criteria not implemented
167
+ - Story claims files changed but no git evidence
168
+ - Security vulnerabilities
169
+
170
+ ## 🟡 MEDIUM ISSUES
171
+ - Files changed but not documented in story File List
172
+ - Uncommitted changes not tracked
173
+ - Performance problems
174
+ - Poor test coverage/quality
175
+ - Code maintainability issues
176
+
177
+ ## 🟢 LOW ISSUES
178
+ - Code style improvements
179
+ - Documentation gaps
180
+ - Git commit message quality
181
+ </output>
182
+
183
+ <ask>What should I do with these issues?
184
+
185
+ 1. **Fix them automatically** - I'll update the code and tests
186
+ 2. **Create action items** - Add to story Tasks/Subtasks for later
187
+ 3. **Show me details** - Deep dive into specific issues
188
+
189
+ Choose [1], [2], or specify which issue to examine:</ask>
190
+
191
+ <check if="user chooses 1">
192
+ <action>Fix all HIGH and MEDIUM issues in the code</action>
193
+ <action>Add/update tests as needed</action>
194
+ <action>Update File List in story if files changed</action>
195
+ <action>Update story Dev Agent Record with fixes applied</action>
196
+ <action>Set {{fixed_count}} = number of HIGH and MEDIUM issues fixed</action>
197
+ <action>Set {{action_count}} = 0</action>
198
+ </check>
199
+
200
+ <check if="user chooses 2">
201
+ <action>Add "Review Follow-ups (AI)" subsection to Tasks/Subtasks</action>
202
+ <action>For each issue: `- [ ] [AI-Review][Severity] Description [file:line]`</action>
203
+ <action>Set {{action_count}} = number of action items created</action>
204
+ <action>Set {{fixed_count}} = 0</action>
205
+ </check>
206
+
207
+ <check if="user chooses 3">
208
+ <action>Show detailed explanation with code examples</action>
209
+ <action>Return to fix decision</action>
210
+ </check>
211
+ </step>
212
+
213
+ <step n="5" goal="Update story status and sync sprint tracking">
214
+ <!-- Determine new status based on review outcome -->
215
+ <check if="all HIGH and MEDIUM issues fixed AND all ACs implemented">
216
+ <action>Set {{new_status}} = "done"</action>
217
+ <action>Update story Status field to "done"</action>
218
+ </check>
219
+ <check if="HIGH or MEDIUM issues remain OR ACs not fully implemented">
220
+ <action>Set {{new_status}} = "in-progress"</action>
221
+ <action>Update story Status field to "in-progress"</action>
222
+ </check>
223
+ <action>Save story file</action>
224
+
225
+ <!-- Determine sprint tracking status -->
226
+ <check if="{sprint_status} file exists">
227
+ <action>Set {{current_sprint_status}} = "enabled"</action>
228
+ </check>
229
+ <check if="{sprint_status} file does NOT exist">
230
+ <action>Set {{current_sprint_status}} = "no-sprint-tracking"</action>
231
+ </check>
232
+
233
+ <!-- Sync sprint-status.yaml when story status changes (only if sprint tracking enabled) -->
234
+ <check if="{{current_sprint_status}} != 'no-sprint-tracking'">
235
+ <action>Load the FULL file: {sprint_status}</action>
236
+ <action>Find development_status key matching {{story_key}}</action>
237
+
238
+ <check if="{{new_status}} == 'done'">
239
+ <action>Update development_status[{{story_key}}] = "done"</action>
240
+ <action>Update last_updated field to current date</action>
241
+ <action>Save file, preserving ALL comments and structure</action>
242
+ <output>✅ Sprint status synced: {{story_key}} → done</output>
243
+ </check>
244
+
245
+ <check if="{{new_status}} == 'in-progress'">
246
+ <action>Update development_status[{{story_key}}] = "in-progress"</action>
247
+ <action>Update last_updated field to current date</action>
248
+ <action>Save file, preserving ALL comments and structure</action>
249
+ <output>🔄 Sprint status synced: {{story_key}} → in-progress</output>
250
+ </check>
251
+
252
+ <check if="story key not found in sprint status">
253
+ <output>⚠️ Story file updated, but sprint-status sync failed: {{story_key}} not found in sprint-status.yaml</output>
254
+ </check>
255
+ </check>
256
+
257
+ <check if="{{current_sprint_status}} == 'no-sprint-tracking'">
258
+ <output>ℹ️ Story status updated (no sprint tracking configured)</output>
259
+ </check>
260
+
261
+ <output>**✅ Review Complete!**
262
+
263
+ **Story Status:** {{new_status}}
264
+ **Issues Fixed:** {{fixed_count}}
265
+ **Action Items Created:** {{action_count}}
266
+
267
+ {{#if new_status == "done"}}Code review complete!{{else}}Address the action items and continue development.{{/if}}
268
+ </output>
269
+ </step>
270
+
271
+ </workflow>
@@ -0,0 +1,3 @@
1
+ canonicalId: bmad-correct-course
2
+ type: workflow
3
+ description: "Manage significant changes during sprint execution"
@@ -1,6 +1,6 @@
1
1
  # Change Navigation Checklist
2
2
 
3
- <critical>This checklist is executed as part of: {project-root}/_bmad/bmm/workflows/4-implementation/correct-course/workflow.yaml</critical>
3
+ <critical>This checklist is executed as part of: {project-root}/_bmad/bmm/workflows/4-implementation/correct-course/workflow.md</critical>
4
4
  <critical>Work through each section systematically with the user, recording findings and impacts</critical>
5
5
 
6
6
  <checklist>
@@ -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.