bmad-method 6.1.1-next.9 → 6.2.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 (307) hide show
  1. package/README_CN.md +9 -9
  2. package/package.json +1 -1
  3. package/src/bmm/agents/analyst.agent.yaml +3 -3
  4. package/src/bmm/agents/architect.agent.yaml +1 -1
  5. package/src/bmm/agents/dev.agent.yaml +1 -1
  6. package/src/bmm/agents/pm.agent.yaml +6 -6
  7. package/src/bmm/agents/qa.agent.yaml +1 -1
  8. package/src/bmm/agents/quick-flow-solo-dev.agent.yaml +2 -2
  9. package/src/bmm/agents/sm.agent.yaml +3 -3
  10. package/src/bmm/agents/tech-writer/tech-writer.agent.yaml +1 -1
  11. package/src/bmm/module-help.csv +16 -16
  12. package/src/bmm/workflows/1-analysis/bmad-create-product-brief/SKILL.md +1 -1
  13. package/src/bmm/workflows/1-analysis/bmad-create-product-brief/product-brief.template.md +2 -2
  14. package/src/bmm/workflows/1-analysis/bmad-create-product-brief/steps/step-01-init.md +4 -11
  15. package/src/bmm/workflows/1-analysis/bmad-create-product-brief/steps/step-01b-continue.md +0 -3
  16. package/src/bmm/workflows/1-analysis/bmad-create-product-brief/steps/step-02-vision.md +5 -11
  17. package/src/bmm/workflows/1-analysis/bmad-create-product-brief/steps/step-03-users.md +5 -11
  18. package/src/bmm/workflows/1-analysis/bmad-create-product-brief/steps/step-04-metrics.md +5 -11
  19. package/src/bmm/workflows/1-analysis/bmad-create-product-brief/steps/step-05-scope.md +5 -11
  20. package/src/bmm/workflows/1-analysis/bmad-create-product-brief/steps/step-06-complete.md +0 -3
  21. package/src/bmm/workflows/1-analysis/bmad-create-product-brief/workflow.md +3 -0
  22. package/src/bmm/workflows/1-analysis/bmad-product-brief-preview/SKILL.md +88 -0
  23. package/src/bmm/workflows/1-analysis/bmad-product-brief-preview/agents/artifact-analyzer.md +60 -0
  24. package/src/bmm/workflows/1-analysis/bmad-product-brief-preview/agents/opportunity-reviewer.md +44 -0
  25. package/src/bmm/workflows/1-analysis/bmad-product-brief-preview/agents/skeptic-reviewer.md +44 -0
  26. package/src/bmm/workflows/1-analysis/bmad-product-brief-preview/agents/web-researcher.md +49 -0
  27. package/src/bmm/workflows/1-analysis/bmad-product-brief-preview/bmad-manifest.json +17 -0
  28. package/src/bmm/workflows/1-analysis/bmad-product-brief-preview/prompts/contextual-discovery.md +57 -0
  29. package/src/bmm/workflows/1-analysis/bmad-product-brief-preview/prompts/draft-and-review.md +86 -0
  30. package/src/bmm/workflows/1-analysis/bmad-product-brief-preview/prompts/finalize.md +75 -0
  31. package/src/bmm/workflows/1-analysis/bmad-product-brief-preview/prompts/guided-elicitation.md +70 -0
  32. package/src/bmm/workflows/1-analysis/bmad-product-brief-preview/resources/brief-template.md +60 -0
  33. package/src/bmm/workflows/1-analysis/research/bmad-domain-research/SKILL.md +1 -1
  34. package/src/bmm/workflows/1-analysis/research/bmad-market-research/SKILL.md +6 -0
  35. package/src/bmm/workflows/1-analysis/research/bmad-market-research/research.template.md +29 -0
  36. package/src/bmm/workflows/1-analysis/research/bmad-market-research/steps/step-01-init.md +184 -0
  37. package/src/bmm/workflows/1-analysis/research/bmad-market-research/steps/step-02-customer-behavior.md +239 -0
  38. package/src/bmm/workflows/1-analysis/research/bmad-market-research/steps/step-03-customer-pain-points.md +251 -0
  39. package/src/bmm/workflows/1-analysis/research/bmad-market-research/steps/step-04-customer-decisions.md +261 -0
  40. package/src/bmm/workflows/1-analysis/research/bmad-market-research/steps/step-05-competitive-analysis.md +173 -0
  41. package/src/bmm/workflows/1-analysis/research/bmad-market-research/steps/step-06-research-completion.md +478 -0
  42. package/src/bmm/workflows/1-analysis/research/{workflow-market-research.md → bmad-market-research/workflow.md} +1 -6
  43. package/src/bmm/workflows/1-analysis/research/bmad-technical-research/SKILL.md +6 -0
  44. package/src/bmm/workflows/1-analysis/research/bmad-technical-research/research.template.md +29 -0
  45. package/src/bmm/workflows/1-analysis/research/{technical-steps → bmad-technical-research/technical-steps}/step-01-init.md +2 -2
  46. package/src/bmm/workflows/1-analysis/research/{technical-steps → bmad-technical-research/technical-steps}/step-02-technical-overview.md +2 -2
  47. package/src/bmm/workflows/1-analysis/research/{technical-steps → bmad-technical-research/technical-steps}/step-03-integration-patterns.md +2 -2
  48. package/src/bmm/workflows/1-analysis/research/{technical-steps → bmad-technical-research/technical-steps}/step-04-architectural-patterns.md +2 -2
  49. package/src/bmm/workflows/1-analysis/research/{technical-steps → bmad-technical-research/technical-steps}/step-05-implementation-research.md +2 -2
  50. package/src/bmm/workflows/1-analysis/research/{workflow-technical-research.md → bmad-technical-research/workflow.md} +0 -4
  51. package/src/bmm/workflows/2-plan-workflows/bmad-create-ux-design/SKILL.md +1 -1
  52. package/src/bmm/workflows/2-plan-workflows/bmad-create-ux-design/steps/step-01-init.md +2 -2
  53. package/src/bmm/workflows/2-plan-workflows/bmad-create-ux-design/steps/step-01b-continue.md +1 -1
  54. package/src/bmm/workflows/2-plan-workflows/bmad-create-ux-design/steps/step-02-discovery.md +2 -2
  55. package/src/bmm/workflows/2-plan-workflows/bmad-create-ux-design/steps/step-03-core-experience.md +5 -4
  56. package/src/bmm/workflows/2-plan-workflows/bmad-create-ux-design/steps/step-04-emotional-response.md +5 -4
  57. package/src/bmm/workflows/2-plan-workflows/bmad-create-ux-design/steps/step-05-inspiration.md +5 -4
  58. package/src/bmm/workflows/2-plan-workflows/bmad-create-ux-design/steps/step-06-design-system.md +5 -4
  59. package/src/bmm/workflows/2-plan-workflows/bmad-create-ux-design/steps/step-07-defining-experience.md +5 -4
  60. package/src/bmm/workflows/2-plan-workflows/bmad-create-ux-design/steps/step-08-visual-foundation.md +5 -4
  61. package/src/bmm/workflows/2-plan-workflows/bmad-create-ux-design/steps/step-09-design-directions.md +5 -4
  62. package/src/bmm/workflows/2-plan-workflows/bmad-create-ux-design/steps/step-10-user-journeys.md +5 -4
  63. package/src/bmm/workflows/2-plan-workflows/bmad-create-ux-design/steps/step-11-component-strategy.md +5 -4
  64. package/src/bmm/workflows/2-plan-workflows/bmad-create-ux-design/steps/step-12-ux-patterns.md +5 -4
  65. package/src/bmm/workflows/2-plan-workflows/bmad-create-ux-design/steps/step-13-responsive-accessibility.md +5 -4
  66. package/src/bmm/workflows/2-plan-workflows/bmad-create-ux-design/steps/step-14-complete.md +2 -2
  67. package/src/bmm/workflows/2-plan-workflows/bmad-create-ux-design/workflow.md +1 -2
  68. package/src/bmm/workflows/2-plan-workflows/bmad-edit-prd/SKILL.md +6 -0
  69. package/src/bmm/workflows/2-plan-workflows/{create-prd → bmad-edit-prd}/steps-e/step-e-01-discovery.md +3 -8
  70. package/src/bmm/workflows/2-plan-workflows/{create-prd → bmad-edit-prd}/steps-e/step-e-01b-legacy-conversion.md +1 -5
  71. package/src/bmm/workflows/2-plan-workflows/{create-prd → bmad-edit-prd}/steps-e/step-e-02-review.md +5 -9
  72. package/src/bmm/workflows/2-plan-workflows/{create-prd → bmad-edit-prd}/steps-e/step-e-03-edit.md +3 -6
  73. package/src/bmm/workflows/2-plan-workflows/{create-prd → bmad-edit-prd}/steps-e/step-e-04-complete.md +2 -5
  74. package/src/bmm/workflows/2-plan-workflows/{create-prd/workflow-edit-prd.md → bmad-edit-prd/workflow.md} +2 -4
  75. package/src/bmm/workflows/2-plan-workflows/bmad-validate-prd/SKILL.md +6 -0
  76. package/src/bmm/workflows/2-plan-workflows/bmad-validate-prd/data/domain-complexity.csv +15 -0
  77. package/src/bmm/workflows/2-plan-workflows/bmad-validate-prd/data/prd-purpose.md +197 -0
  78. package/src/bmm/workflows/2-plan-workflows/bmad-validate-prd/data/project-types.csv +11 -0
  79. package/src/bmm/workflows/2-plan-workflows/bmad-validate-prd/steps-v/step-v-01-discovery.md +221 -0
  80. package/src/bmm/workflows/2-plan-workflows/bmad-validate-prd/steps-v/step-v-02-format-detection.md +188 -0
  81. package/src/bmm/workflows/2-plan-workflows/bmad-validate-prd/steps-v/step-v-02b-parity-check.md +206 -0
  82. package/src/bmm/workflows/2-plan-workflows/bmad-validate-prd/steps-v/step-v-03-density-validation.md +171 -0
  83. package/src/bmm/workflows/2-plan-workflows/bmad-validate-prd/steps-v/step-v-04-brief-coverage-validation.md +211 -0
  84. package/src/bmm/workflows/2-plan-workflows/bmad-validate-prd/steps-v/step-v-05-measurability-validation.md +225 -0
  85. package/src/bmm/workflows/2-plan-workflows/bmad-validate-prd/steps-v/step-v-06-traceability-validation.md +214 -0
  86. package/src/bmm/workflows/2-plan-workflows/bmad-validate-prd/steps-v/step-v-07-implementation-leakage-validation.md +202 -0
  87. package/src/bmm/workflows/2-plan-workflows/bmad-validate-prd/steps-v/step-v-08-domain-compliance-validation.md +240 -0
  88. package/src/bmm/workflows/2-plan-workflows/bmad-validate-prd/steps-v/step-v-09-project-type-validation.md +260 -0
  89. package/src/bmm/workflows/2-plan-workflows/bmad-validate-prd/steps-v/step-v-10-smart-validation.md +206 -0
  90. package/src/bmm/workflows/2-plan-workflows/bmad-validate-prd/steps-v/step-v-11-holistic-quality-validation.md +261 -0
  91. package/src/bmm/workflows/2-plan-workflows/bmad-validate-prd/steps-v/step-v-12-completeness-validation.md +239 -0
  92. package/src/bmm/workflows/2-plan-workflows/bmad-validate-prd/steps-v/step-v-13-report-complete.md +229 -0
  93. package/src/bmm/workflows/2-plan-workflows/bmad-validate-prd/workflow.md +62 -0
  94. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-01-discovery.md +2 -4
  95. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-10-smart-validation.md +1 -0
  96. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-11-holistic-quality-validation.md +3 -3
  97. package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-13-report-complete.md +2 -1
  98. package/src/bmm/workflows/2-plan-workflows/create-prd/workflow-validate-prd.md +2 -0
  99. package/src/bmm/workflows/3-solutioning/bmad-check-implementation-readiness/SKILL.md +6 -0
  100. package/src/bmm/workflows/3-solutioning/{check-implementation-readiness → bmad-check-implementation-readiness}/steps/step-01-document-discovery.md +3 -8
  101. package/src/bmm/workflows/3-solutioning/{check-implementation-readiness → bmad-check-implementation-readiness}/steps/step-02-prd-analysis.md +1 -5
  102. package/src/bmm/workflows/3-solutioning/{check-implementation-readiness → bmad-check-implementation-readiness}/steps/step-03-epic-coverage-validation.md +1 -5
  103. package/src/bmm/workflows/3-solutioning/{check-implementation-readiness → bmad-check-implementation-readiness}/steps/step-04-ux-alignment.md +1 -5
  104. package/src/bmm/workflows/3-solutioning/{check-implementation-readiness → bmad-check-implementation-readiness}/steps/step-05-epic-quality-review.md +2 -6
  105. package/src/bmm/workflows/3-solutioning/{check-implementation-readiness → bmad-check-implementation-readiness}/steps/step-06-final-assessment.md +0 -3
  106. package/src/bmm/workflows/3-solutioning/{check-implementation-readiness → bmad-check-implementation-readiness}/workflow.md +0 -5
  107. package/src/bmm/workflows/3-solutioning/bmad-create-architecture/SKILL.md +1 -1
  108. package/src/bmm/workflows/3-solutioning/bmad-create-architecture/steps/step-01-init.md +4 -4
  109. package/src/bmm/workflows/3-solutioning/bmad-create-architecture/steps/step-02-context.md +2 -2
  110. package/src/bmm/workflows/3-solutioning/bmad-create-architecture/steps/step-03-starter.md +4 -4
  111. package/src/bmm/workflows/3-solutioning/bmad-create-architecture/steps/step-04-decisions.md +4 -4
  112. package/src/bmm/workflows/3-solutioning/bmad-create-architecture/steps/step-05-patterns.md +4 -4
  113. package/src/bmm/workflows/3-solutioning/bmad-create-architecture/steps/step-06-structure.md +4 -4
  114. package/src/bmm/workflows/3-solutioning/bmad-create-architecture/steps/step-07-validation.md +4 -4
  115. package/src/bmm/workflows/3-solutioning/bmad-create-architecture/workflow.md +0 -6
  116. package/src/bmm/workflows/3-solutioning/bmad-create-epics-and-stories/SKILL.md +6 -0
  117. package/src/bmm/workflows/3-solutioning/{create-epics-and-stories → bmad-create-epics-and-stories}/steps/step-01-validate-prerequisites.md +7 -29
  118. package/src/bmm/workflows/3-solutioning/{create-epics-and-stories → bmad-create-epics-and-stories}/steps/step-02-design-epics.md +7 -28
  119. package/src/bmm/workflows/3-solutioning/{create-epics-and-stories → bmad-create-epics-and-stories}/steps/step-03-create-stories.md +8 -29
  120. package/src/bmm/workflows/3-solutioning/{create-epics-and-stories → bmad-create-epics-and-stories}/steps/step-04-final-validation.md +2 -20
  121. package/src/bmm/workflows/3-solutioning/{create-epics-and-stories → bmad-create-epics-and-stories}/workflow.md +1 -6
  122. package/src/bmm/workflows/4-implementation/bmad-code-review/SKILL.md +6 -0
  123. package/src/bmm/workflows/4-implementation/bmad-code-review/steps/step-01-gather-context.md +61 -0
  124. package/src/bmm/workflows/4-implementation/bmad-code-review/steps/step-02-review.md +41 -0
  125. package/src/bmm/workflows/4-implementation/bmad-code-review/steps/step-03-triage.md +50 -0
  126. package/src/bmm/workflows/4-implementation/bmad-code-review/steps/step-04-present.md +38 -0
  127. package/src/bmm/workflows/4-implementation/bmad-code-review/workflow.md +54 -0
  128. package/src/bmm/workflows/4-implementation/bmad-correct-course/SKILL.md +6 -0
  129. package/src/bmm/workflows/4-implementation/{correct-course → bmad-correct-course}/checklist.md +1 -1
  130. package/src/bmm/workflows/4-implementation/{correct-course → bmad-correct-course}/workflow.md +3 -10
  131. package/src/bmm/workflows/4-implementation/bmad-create-story/SKILL.md +1 -1
  132. package/src/bmm/workflows/4-implementation/bmad-create-story/checklist.md +2 -2
  133. package/src/bmm/workflows/4-implementation/bmad-create-story/workflow.md +3 -11
  134. package/src/bmm/workflows/4-implementation/bmad-dev-story/SKILL.md +1 -1
  135. package/src/bmm/workflows/4-implementation/bmad-dev-story/workflow.md +0 -1
  136. package/src/bmm/workflows/4-implementation/bmad-retrospective/SKILL.md +6 -0
  137. package/src/bmm/workflows/4-implementation/{retrospective → bmad-retrospective}/workflow.md +0 -6
  138. package/src/bmm/workflows/4-implementation/bmad-sprint-planning/SKILL.md +6 -0
  139. package/src/bmm/workflows/4-implementation/bmad-sprint-planning/bmad-skill-manifest.yaml +1 -0
  140. package/src/bmm/workflows/4-implementation/{sprint-planning → bmad-sprint-planning}/workflow.md +0 -8
  141. package/src/bmm/workflows/4-implementation/bmad-sprint-status/SKILL.md +6 -0
  142. package/src/bmm/workflows/4-implementation/bmad-sprint-status/bmad-skill-manifest.yaml +1 -0
  143. package/src/bmm/workflows/4-implementation/{sprint-status → bmad-sprint-status}/workflow.md +0 -6
  144. package/src/bmm/workflows/bmad-document-project/SKILL.md +6 -0
  145. package/src/bmm/workflows/bmad-document-project/bmad-skill-manifest.yaml +1 -0
  146. package/src/bmm/workflows/{document-project → bmad-document-project}/instructions.md +6 -6
  147. package/src/bmm/workflows/bmad-document-project/workflow.md +27 -0
  148. package/src/bmm/workflows/{document-project → bmad-document-project}/workflows/deep-dive-instructions.md +3 -1
  149. package/src/bmm/workflows/{document-project → bmad-document-project}/workflows/deep-dive-workflow.md +4 -12
  150. package/src/bmm/workflows/{document-project → bmad-document-project}/workflows/full-scan-instructions.md +5 -3
  151. package/src/bmm/workflows/{document-project → bmad-document-project}/workflows/full-scan-workflow.md +4 -12
  152. package/src/bmm/workflows/bmad-generate-project-context/SKILL.md +6 -0
  153. package/src/bmm/workflows/bmad-generate-project-context/bmad-skill-manifest.yaml +1 -0
  154. package/src/bmm/workflows/{generate-project-context → bmad-generate-project-context}/steps/step-01-discover.md +4 -2
  155. package/src/bmm/workflows/{generate-project-context → bmad-generate-project-context}/steps/step-02-generate.md +8 -5
  156. package/src/bmm/workflows/{generate-project-context → bmad-generate-project-context}/workflow.md +2 -8
  157. package/src/bmm/workflows/bmad-qa-generate-e2e-tests/SKILL.md +6 -0
  158. package/src/bmm/workflows/bmad-qa-generate-e2e-tests/bmad-skill-manifest.yaml +1 -0
  159. package/src/bmm/workflows/{qa-generate-e2e-tests → bmad-qa-generate-e2e-tests}/workflow.md +2 -9
  160. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev/SKILL.md +1 -1
  161. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev/steps/step-01-mode-detection.md +9 -14
  162. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev/steps/step-02-context-gathering.md +1 -5
  163. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev/steps/step-03-execute.md +1 -5
  164. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev/steps/step-04-self-check.md +1 -5
  165. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev/steps/step-05-adversarial-review.md +1 -5
  166. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev/steps/step-06-resolve-findings.md +0 -2
  167. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev/workflow.md +0 -6
  168. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/SKILL.md +1 -1
  169. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-01-clarify-and-route.md +2 -5
  170. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-02-plan.md +2 -6
  171. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-03-implement.md +1 -3
  172. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-04-review.md +3 -6
  173. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-05-present.md +0 -2
  174. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/workflow.md +0 -1
  175. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-spec/SKILL.md +6 -0
  176. package/src/bmm/workflows/bmad-quick-flow/bmad-quick-spec/bmad-skill-manifest.yaml +1 -0
  177. package/src/bmm/workflows/bmad-quick-flow/{quick-spec → bmad-quick-spec}/steps/step-01-understand.md +7 -11
  178. package/src/bmm/workflows/bmad-quick-flow/{quick-spec → bmad-quick-spec}/steps/step-02-investigate.md +3 -6
  179. package/src/bmm/workflows/bmad-quick-flow/{quick-spec → bmad-quick-spec}/steps/step-03-generate.md +1 -4
  180. package/src/bmm/workflows/bmad-quick-flow/{quick-spec → bmad-quick-spec}/steps/step-04-review.md +4 -7
  181. package/src/bmm/workflows/bmad-quick-flow/{quick-spec → bmad-quick-spec}/workflow.md +1 -6
  182. package/src/core/module-help.csv +1 -0
  183. package/src/core/skills/bmad-advanced-elicitation/SKILL.md +6 -0
  184. package/src/core/skills/bmad-advanced-elicitation/bmad-skill-manifest.yaml +1 -0
  185. package/src/core/{tasks → skills}/bmad-advanced-elicitation/workflow.md +3 -4
  186. package/src/core/{workflows → skills}/bmad-brainstorming/SKILL.md +1 -1
  187. package/src/core/skills/bmad-brainstorming/bmad-skill-manifest.yaml +1 -0
  188. package/src/core/{workflows → skills}/bmad-brainstorming/steps/step-01-session-setup.md +5 -1
  189. package/src/core/{workflows → skills}/bmad-brainstorming/steps/step-01b-continue.md +3 -1
  190. package/src/core/{workflows → skills}/bmad-brainstorming/steps/step-02a-user-selected.md +5 -1
  191. package/src/core/{workflows → skills}/bmad-brainstorming/steps/step-02b-ai-recommended.md +3 -1
  192. package/src/core/{workflows → skills}/bmad-brainstorming/steps/step-02c-random-selection.md +3 -1
  193. package/src/core/{workflows → skills}/bmad-brainstorming/steps/step-02d-progressive-flow.md +3 -1
  194. package/src/core/{workflows → skills}/bmad-brainstorming/steps/step-03-technique-execution.md +4 -2
  195. package/src/core/{workflows → skills}/bmad-brainstorming/steps/step-04-idea-organization.md +2 -0
  196. package/src/core/{workflows → skills}/bmad-brainstorming/workflow.md +1 -5
  197. package/src/core/skills/bmad-distillator/SKILL.md +178 -0
  198. package/src/core/skills/bmad-distillator/agents/distillate-compressor.md +116 -0
  199. package/src/core/skills/bmad-distillator/agents/round-trip-reconstructor.md +68 -0
  200. package/src/core/skills/bmad-distillator/bmad-skill-manifest.yaml +15 -0
  201. package/src/core/skills/bmad-distillator/resources/compression-rules.md +51 -0
  202. package/src/core/skills/bmad-distillator/resources/distillate-format-reference.md +227 -0
  203. package/src/core/skills/bmad-distillator/resources/splitting-strategy.md +78 -0
  204. package/src/core/skills/bmad-distillator/scripts/analyze_sources.py +300 -0
  205. package/src/core/skills/bmad-distillator/scripts/tests/test_analyze_sources.py +204 -0
  206. package/src/core/{tasks → skills}/bmad-editorial-review-prose/SKILL.md +1 -1
  207. package/src/core/skills/bmad-editorial-review-prose/bmad-skill-manifest.yaml +1 -0
  208. package/src/core/{tasks → skills}/bmad-editorial-review-structure/SKILL.md +1 -1
  209. package/src/core/skills/bmad-editorial-review-structure/bmad-skill-manifest.yaml +1 -0
  210. package/src/core/skills/bmad-help/SKILL.md +6 -0
  211. package/src/core/skills/bmad-help/bmad-skill-manifest.yaml +1 -0
  212. package/src/core/{tasks → skills}/bmad-index-docs/SKILL.md +1 -1
  213. package/src/core/skills/bmad-index-docs/bmad-skill-manifest.yaml +1 -0
  214. package/src/core/{workflows → skills}/bmad-party-mode/SKILL.md +1 -1
  215. package/src/core/skills/bmad-party-mode/bmad-skill-manifest.yaml +1 -0
  216. package/src/core/{tasks → skills}/bmad-review-adversarial-general/SKILL.md +1 -1
  217. package/src/core/skills/bmad-review-adversarial-general/bmad-skill-manifest.yaml +1 -0
  218. package/src/core/{tasks → skills}/bmad-review-edge-case-hunter/SKILL.md +2 -2
  219. package/src/core/skills/bmad-review-edge-case-hunter/bmad-skill-manifest.yaml +1 -0
  220. package/src/core/{tasks → skills}/bmad-shard-doc/SKILL.md +1 -1
  221. package/src/core/skills/bmad-shard-doc/bmad-skill-manifest.yaml +1 -0
  222. package/src/core/tasks/bmad-create-prd/SKILL.md +6 -0
  223. package/src/core/tasks/bmad-create-prd/bmad-skill-manifest.yaml +1 -0
  224. package/src/core/tasks/bmad-create-prd/data/domain-complexity.csv +15 -0
  225. package/src/core/tasks/bmad-create-prd/data/prd-purpose.md +197 -0
  226. package/src/core/tasks/bmad-create-prd/data/project-types.csv +11 -0
  227. package/src/{bmm/workflows/2-plan-workflows/create-prd → core/tasks/bmad-create-prd}/steps-c/step-01-init.md +7 -20
  228. package/src/{bmm/workflows/2-plan-workflows/create-prd → core/tasks/bmad-create-prd}/steps-c/step-01b-continue.md +29 -20
  229. package/src/{bmm/workflows/2-plan-workflows/create-prd → core/tasks/bmad-create-prd}/steps-c/step-02-discovery.md +7 -23
  230. package/src/{bmm/workflows/2-plan-workflows/create-prd → core/tasks/bmad-create-prd}/steps-c/step-02b-vision.md +5 -17
  231. package/src/{bmm/workflows/2-plan-workflows/create-prd → core/tasks/bmad-create-prd}/steps-c/step-02c-executive-summary.md +5 -17
  232. package/src/{bmm/workflows/2-plan-workflows/create-prd → core/tasks/bmad-create-prd}/steps-c/step-03-success.md +5 -17
  233. package/src/{bmm/workflows/2-plan-workflows/create-prd → core/tasks/bmad-create-prd}/steps-c/step-04-journeys.md +5 -17
  234. package/src/{bmm/workflows/2-plan-workflows/create-prd → core/tasks/bmad-create-prd}/steps-c/step-05-domain.md +7 -20
  235. package/src/{bmm/workflows/2-plan-workflows/create-prd → core/tasks/bmad-create-prd}/steps-c/step-06-innovation.md +8 -23
  236. package/src/{bmm/workflows/2-plan-workflows/create-prd → core/tasks/bmad-create-prd}/steps-c/step-07-project-type.md +6 -21
  237. package/src/{bmm/workflows/2-plan-workflows/create-prd → core/tasks/bmad-create-prd}/steps-c/step-08-scoping.md +5 -17
  238. package/src/{bmm/workflows/2-plan-workflows/create-prd → core/tasks/bmad-create-prd}/steps-c/step-09-functional.md +5 -17
  239. package/src/{bmm/workflows/2-plan-workflows/create-prd → core/tasks/bmad-create-prd}/steps-c/step-10-nonfunctional.md +5 -17
  240. package/src/{bmm/workflows/2-plan-workflows/create-prd → core/tasks/bmad-create-prd}/steps-c/step-11-polish.md +6 -19
  241. package/src/{bmm/workflows/2-plan-workflows/create-prd → core/tasks/bmad-create-prd}/steps-c/step-12-complete.md +3 -12
  242. package/src/{bmm/workflows/2-plan-workflows/create-prd/workflow-create-prd.md → core/tasks/bmad-create-prd/workflow.md} +3 -4
  243. package/tools/cli/external-official-modules.yaml +9 -9
  244. package/tools/cli/installers/lib/core/manifest.js +4 -2
  245. package/tools/skill-validator.md +322 -0
  246. package/src/bmm/workflows/1-analysis/research/bmad-skill-manifest.yaml +0 -9
  247. package/src/bmm/workflows/2-plan-workflows/create-prd/bmad-skill-manifest.yaml +0 -14
  248. package/src/bmm/workflows/3-solutioning/check-implementation-readiness/bmad-skill-manifest.yaml +0 -3
  249. package/src/bmm/workflows/3-solutioning/create-epics-and-stories/bmad-skill-manifest.yaml +0 -3
  250. package/src/bmm/workflows/4-implementation/code-review/bmad-skill-manifest.yaml +0 -3
  251. package/src/bmm/workflows/4-implementation/code-review/checklist.md +0 -23
  252. package/src/bmm/workflows/4-implementation/code-review/discover-inputs.md +0 -88
  253. package/src/bmm/workflows/4-implementation/code-review/workflow.md +0 -268
  254. package/src/bmm/workflows/4-implementation/correct-course/bmad-skill-manifest.yaml +0 -3
  255. package/src/bmm/workflows/4-implementation/retrospective/bmad-skill-manifest.yaml +0 -3
  256. package/src/bmm/workflows/4-implementation/sprint-planning/bmad-skill-manifest.yaml +0 -3
  257. package/src/bmm/workflows/4-implementation/sprint-status/bmad-skill-manifest.yaml +0 -3
  258. package/src/bmm/workflows/bmad-quick-flow/quick-spec/bmad-skill-manifest.yaml +0 -3
  259. package/src/bmm/workflows/document-project/bmad-skill-manifest.yaml +0 -3
  260. package/src/bmm/workflows/document-project/workflow.md +0 -39
  261. package/src/bmm/workflows/generate-project-context/bmad-skill-manifest.yaml +0 -3
  262. package/src/bmm/workflows/qa-generate-e2e-tests/bmad-skill-manifest.yaml +0 -3
  263. package/src/core/agents/bmad-master.agent.yaml +0 -30
  264. package/src/core/agents/bmad-skill-manifest.yaml +0 -3
  265. package/src/core/tasks/bmad-advanced-elicitation/SKILL.md +0 -6
  266. package/src/core/tasks/bmad-help/SKILL.md +0 -6
  267. /package/src/{core/tasks/bmad-advanced-elicitation → bmm/workflows/1-analysis/bmad-product-brief-preview}/bmad-skill-manifest.yaml +0 -0
  268. /package/src/{core/tasks/bmad-editorial-review-prose → bmm/workflows/1-analysis/research/bmad-market-research}/bmad-skill-manifest.yaml +0 -0
  269. /package/src/{core/tasks/bmad-editorial-review-structure → bmm/workflows/1-analysis/research/bmad-technical-research}/bmad-skill-manifest.yaml +0 -0
  270. /package/src/bmm/workflows/1-analysis/research/{technical-steps → bmad-technical-research/technical-steps}/step-06-research-synthesis.md +0 -0
  271. /package/src/{core/tasks/bmad-help → bmm/workflows/2-plan-workflows/bmad-edit-prd}/bmad-skill-manifest.yaml +0 -0
  272. /package/src/{core/tasks/bmad-index-docs → bmm/workflows/2-plan-workflows/bmad-validate-prd}/bmad-skill-manifest.yaml +0 -0
  273. /package/src/{core/tasks/bmad-review-adversarial-general → bmm/workflows/3-solutioning/bmad-check-implementation-readiness}/bmad-skill-manifest.yaml +0 -0
  274. /package/src/bmm/workflows/3-solutioning/{check-implementation-readiness → bmad-check-implementation-readiness}/templates/readiness-report-template.md +0 -0
  275. /package/src/{core/tasks/bmad-review-edge-case-hunter → bmm/workflows/3-solutioning/bmad-create-epics-and-stories}/bmad-skill-manifest.yaml +0 -0
  276. /package/src/bmm/workflows/3-solutioning/{create-epics-and-stories → bmad-create-epics-and-stories}/templates/epics-template.md +0 -0
  277. /package/src/{core/tasks/bmad-shard-doc → bmm/workflows/4-implementation/bmad-code-review}/bmad-skill-manifest.yaml +0 -0
  278. /package/src/{core/workflows/bmad-brainstorming → bmm/workflows/4-implementation/bmad-correct-course}/bmad-skill-manifest.yaml +0 -0
  279. /package/src/{core/workflows/bmad-party-mode → bmm/workflows/4-implementation/bmad-retrospective}/bmad-skill-manifest.yaml +0 -0
  280. /package/src/bmm/workflows/4-implementation/{sprint-planning → bmad-sprint-planning}/checklist.md +0 -0
  281. /package/src/bmm/workflows/4-implementation/{sprint-planning → bmad-sprint-planning}/sprint-status-template.yaml +0 -0
  282. /package/src/bmm/workflows/{document-project → bmad-document-project}/checklist.md +0 -0
  283. /package/src/bmm/workflows/{document-project → bmad-document-project}/documentation-requirements.csv +0 -0
  284. /package/src/bmm/workflows/{document-project → bmad-document-project}/templates/deep-dive-template.md +0 -0
  285. /package/src/bmm/workflows/{document-project → bmad-document-project}/templates/index-template.md +0 -0
  286. /package/src/bmm/workflows/{document-project → bmad-document-project}/templates/project-overview-template.md +0 -0
  287. /package/src/bmm/workflows/{document-project → bmad-document-project}/templates/project-scan-report-schema.json +0 -0
  288. /package/src/bmm/workflows/{document-project → bmad-document-project}/templates/source-tree-template.md +0 -0
  289. /package/src/bmm/workflows/{generate-project-context → bmad-generate-project-context}/project-context-template.md +0 -0
  290. /package/src/bmm/workflows/{generate-project-context → bmad-generate-project-context}/steps/step-03-complete.md +0 -0
  291. /package/src/bmm/workflows/{qa-generate-e2e-tests → bmad-qa-generate-e2e-tests}/checklist.md +0 -0
  292. /package/src/bmm/workflows/bmad-quick-flow/{quick-spec → bmad-quick-spec}/tech-spec-template.md +0 -0
  293. /package/src/core/{tasks → skills}/bmad-advanced-elicitation/methods.csv +0 -0
  294. /package/src/core/{workflows → skills}/bmad-brainstorming/brain-methods.csv +0 -0
  295. /package/src/core/{workflows → skills}/bmad-brainstorming/template.md +0 -0
  296. /package/src/core/{tasks → skills}/bmad-editorial-review-prose/workflow.md +0 -0
  297. /package/src/core/{tasks → skills}/bmad-editorial-review-structure/workflow.md +0 -0
  298. /package/src/core/{tasks → skills}/bmad-help/workflow.md +0 -0
  299. /package/src/core/{tasks → skills}/bmad-index-docs/workflow.md +0 -0
  300. /package/src/core/{workflows → skills}/bmad-party-mode/steps/step-01-agent-loading.md +0 -0
  301. /package/src/core/{workflows → skills}/bmad-party-mode/steps/step-02-discussion-orchestration.md +0 -0
  302. /package/src/core/{workflows → skills}/bmad-party-mode/steps/step-03-graceful-exit.md +0 -0
  303. /package/src/core/{workflows → skills}/bmad-party-mode/workflow.md +0 -0
  304. /package/src/core/{tasks → skills}/bmad-review-adversarial-general/workflow.md +0 -0
  305. /package/src/core/{tasks → skills}/bmad-review-edge-case-hunter/workflow.md +0 -0
  306. /package/src/core/{tasks → skills}/bmad-shard-doc/workflow.md +0 -0
  307. /package/src/{bmm/workflows/2-plan-workflows/create-prd → core/tasks/bmad-create-prd}/templates/prd-template.md +0 -0
@@ -0,0 +1,204 @@
1
+ """Tests for analyze_sources.py"""
2
+
3
+ import json
4
+ import os
5
+ import tempfile
6
+ from pathlib import Path
7
+ from unittest.mock import patch
8
+
9
+ import pytest
10
+
11
+ # Add parent dir to path so we can import the script
12
+ import sys
13
+ sys.path.insert(0, str(Path(__file__).parent.parent))
14
+
15
+ from analyze_sources import (
16
+ resolve_inputs,
17
+ detect_doc_type,
18
+ suggest_groups,
19
+ analyze,
20
+ INCLUDE_EXTENSIONS,
21
+ SKIP_DIRS,
22
+ )
23
+
24
+
25
+ @pytest.fixture
26
+ def temp_dir():
27
+ """Create a temp directory with sample files."""
28
+ with tempfile.TemporaryDirectory() as d:
29
+ # Create sample files
30
+ (Path(d) / "product-brief-foo.md").write_text("# Product Brief\nContent here")
31
+ (Path(d) / "product-brief-foo-discovery-notes.md").write_text("# Discovery\nNotes")
32
+ (Path(d) / "architecture-doc.md").write_text("# Architecture\nDesign here")
33
+ (Path(d) / "research-report.md").write_text("# Research\nFindings")
34
+ (Path(d) / "random.txt").write_text("Some text content")
35
+ (Path(d) / "image.png").write_bytes(b"\x89PNG")
36
+ # Create a subdirectory with more files
37
+ sub = Path(d) / "subdir"
38
+ sub.mkdir()
39
+ (sub / "prd-v2.md").write_text("# PRD\nRequirements")
40
+ # Create a skip directory
41
+ skip = Path(d) / "node_modules"
42
+ skip.mkdir()
43
+ (skip / "junk.md").write_text("Should be skipped")
44
+ yield d
45
+
46
+
47
+ class TestResolveInputs:
48
+ def test_single_file(self, temp_dir):
49
+ f = str(Path(temp_dir) / "product-brief-foo.md")
50
+ result = resolve_inputs([f])
51
+ assert len(result) == 1
52
+ assert result[0].name == "product-brief-foo.md"
53
+
54
+ def test_folder_recursion(self, temp_dir):
55
+ result = resolve_inputs([temp_dir])
56
+ names = {f.name for f in result}
57
+ assert "product-brief-foo.md" in names
58
+ assert "prd-v2.md" in names
59
+ assert "random.txt" in names
60
+
61
+ def test_folder_skips_excluded_dirs(self, temp_dir):
62
+ result = resolve_inputs([temp_dir])
63
+ names = {f.name for f in result}
64
+ assert "junk.md" not in names
65
+
66
+ def test_folder_skips_non_text_files(self, temp_dir):
67
+ result = resolve_inputs([temp_dir])
68
+ names = {f.name for f in result}
69
+ assert "image.png" not in names
70
+
71
+ def test_glob_pattern(self, temp_dir):
72
+ pattern = str(Path(temp_dir) / "product-brief-*.md")
73
+ result = resolve_inputs([pattern])
74
+ assert len(result) == 2
75
+ names = {f.name for f in result}
76
+ assert "product-brief-foo.md" in names
77
+ assert "product-brief-foo-discovery-notes.md" in names
78
+
79
+ def test_deduplication(self, temp_dir):
80
+ f = str(Path(temp_dir) / "product-brief-foo.md")
81
+ result = resolve_inputs([f, f, f])
82
+ assert len(result) == 1
83
+
84
+ def test_mixed_inputs(self, temp_dir):
85
+ file_path = str(Path(temp_dir) / "architecture-doc.md")
86
+ folder_path = str(Path(temp_dir) / "subdir")
87
+ result = resolve_inputs([file_path, folder_path])
88
+ names = {f.name for f in result}
89
+ assert "architecture-doc.md" in names
90
+ assert "prd-v2.md" in names
91
+
92
+ def test_nonexistent_path(self):
93
+ result = resolve_inputs(["/nonexistent/path/file.md"])
94
+ assert len(result) == 0
95
+
96
+
97
+ class TestDetectDocType:
98
+ @pytest.mark.parametrize("filename,expected", [
99
+ ("product-brief-foo.md", "product-brief"),
100
+ ("product_brief_bar.md", "product-brief"),
101
+ ("foo-discovery-notes.md", "discovery-notes"),
102
+ ("foo-discovery_notes.md", "discovery-notes"),
103
+ ("architecture-overview.md", "architecture-doc"),
104
+ ("my-prd.md", "prd"),
105
+ ("research-report-q4.md", "research-report"),
106
+ ("foo-distillate.md", "distillate"),
107
+ ("changelog.md", "changelog"),
108
+ ("readme.md", "readme"),
109
+ ("api-spec.md", "specification"),
110
+ ("design-doc-v2.md", "design-doc"),
111
+ ("meeting-notes-2026.md", "meeting-notes"),
112
+ ("brainstorm-session.md", "brainstorming"),
113
+ ("user-interview-notes.md", "interview-notes"),
114
+ ("random-file.md", "unknown"),
115
+ ])
116
+ def test_detection(self, filename, expected):
117
+ assert detect_doc_type(filename) == expected
118
+
119
+
120
+ class TestSuggestGroups:
121
+ def test_groups_brief_with_discovery_notes(self, temp_dir):
122
+ files = [
123
+ Path(temp_dir) / "product-brief-foo.md",
124
+ Path(temp_dir) / "product-brief-foo-discovery-notes.md",
125
+ ]
126
+ groups = suggest_groups(files)
127
+ # Should produce one group with both files
128
+ paired = [g for g in groups if len(g["files"]) > 1]
129
+ assert len(paired) == 1
130
+ filenames = {f["filename"] for f in paired[0]["files"]}
131
+ assert "product-brief-foo.md" in filenames
132
+ assert "product-brief-foo-discovery-notes.md" in filenames
133
+
134
+ def test_standalone_files(self, temp_dir):
135
+ files = [
136
+ Path(temp_dir) / "architecture-doc.md",
137
+ Path(temp_dir) / "research-report.md",
138
+ ]
139
+ groups = suggest_groups(files)
140
+ assert len(groups) == 2
141
+ for g in groups:
142
+ assert len(g["files"]) == 1
143
+
144
+ def test_mixed_grouped_and_standalone(self, temp_dir):
145
+ files = [
146
+ Path(temp_dir) / "product-brief-foo.md",
147
+ Path(temp_dir) / "product-brief-foo-discovery-notes.md",
148
+ Path(temp_dir) / "architecture-doc.md",
149
+ ]
150
+ groups = suggest_groups(files)
151
+ paired = [g for g in groups if len(g["files"]) > 1]
152
+ standalone = [g for g in groups if len(g["files"]) == 1]
153
+ assert len(paired) == 1
154
+ assert len(standalone) == 1
155
+
156
+
157
+ class TestAnalyze:
158
+ def test_basic_analysis(self, temp_dir):
159
+ f = str(Path(temp_dir) / "product-brief-foo.md")
160
+ output_file = str(Path(temp_dir) / "output.json")
161
+ analyze([f], output_file)
162
+ result = json.loads(Path(output_file).read_text())
163
+ assert result["status"] == "ok"
164
+ assert result["summary"]["total_files"] == 1
165
+ assert result["files"][0]["doc_type"] == "product-brief"
166
+ assert result["files"][0]["estimated_tokens"] > 0
167
+
168
+ def test_routing_single_small_input(self, temp_dir):
169
+ f = str(Path(temp_dir) / "product-brief-foo.md")
170
+ output_file = str(Path(temp_dir) / "output.json")
171
+ analyze([f], output_file)
172
+ result = json.loads(Path(output_file).read_text())
173
+ assert result["routing"]["recommendation"] == "single"
174
+
175
+ def test_routing_fanout_many_files(self, temp_dir):
176
+ # Create enough files to trigger fan-out (> 3 files)
177
+ for i in range(5):
178
+ (Path(temp_dir) / f"doc-{i}.md").write_text("x" * 1000)
179
+ output_file = str(Path(temp_dir) / "output.json")
180
+ analyze([temp_dir], output_file)
181
+ result = json.loads(Path(output_file).read_text())
182
+ assert result["routing"]["recommendation"] == "fan-out"
183
+
184
+ def test_folder_analysis(self, temp_dir):
185
+ output_file = str(Path(temp_dir) / "output.json")
186
+ analyze([temp_dir], output_file)
187
+ result = json.loads(Path(output_file).read_text())
188
+ assert result["status"] == "ok"
189
+ assert result["summary"]["total_files"] >= 4 # at least the base files
190
+ assert len(result["groups"]) > 0
191
+
192
+ def test_no_files_found(self):
193
+ output_file = "/tmp/test_analyze_empty.json"
194
+ analyze(["/nonexistent/path"], output_file)
195
+ result = json.loads(Path(output_file).read_text())
196
+ assert result["status"] == "error"
197
+ os.unlink(output_file)
198
+
199
+ def test_stdout_output(self, temp_dir, capsys):
200
+ f = str(Path(temp_dir) / "product-brief-foo.md")
201
+ analyze([f])
202
+ captured = capsys.readouterr()
203
+ result = json.loads(captured.out)
204
+ assert result["status"] == "ok"
@@ -3,4 +3,4 @@ name: bmad-editorial-review-prose
3
3
  description: 'Clinical copy-editor that reviews text for communication issues. Use when user says review for prose or improve the prose'
4
4
  ---
5
5
 
6
- Follow the instructions in [workflow.md](workflow.md).
6
+ Follow the instructions in ./workflow.md.
@@ -3,4 +3,4 @@ name: bmad-editorial-review-structure
3
3
  description: 'Structural editor that proposes cuts, reorganization, and simplification while preserving comprehension. Use when user requests structural review or editorial review of structure'
4
4
  ---
5
5
 
6
- Follow the instructions in [workflow.md](workflow.md).
6
+ Follow the instructions in ./workflow.md.
@@ -0,0 +1,6 @@
1
+ ---
2
+ name: bmad-help
3
+ description: 'Analyzes current state and user query to answer BMad questions or recommend the next workflow or agent. Use when user says what should I do next, what do I do now, or asks a question about BMad'
4
+ ---
5
+
6
+ Follow the instructions in ./workflow.md.
@@ -0,0 +1 @@
1
+ type: skill
@@ -3,4 +3,4 @@ name: bmad-index-docs
3
3
  description: 'Generates or updates an index.md to reference all docs in the folder. Use if user requests to create or update an index of all files in a specific folder'
4
4
  ---
5
5
 
6
- Follow the instructions in [workflow.md](workflow.md).
6
+ Follow the instructions in ./workflow.md.
@@ -3,4 +3,4 @@ name: bmad-party-mode
3
3
  description: 'Orchestrates group discussions between all installed BMAD agents, enabling natural multi-agent conversations. Use when user requests party mode.'
4
4
  ---
5
5
 
6
- Follow the instructions in [workflow.md](workflow.md).
6
+ Follow the instructions in ./workflow.md.
@@ -3,4 +3,4 @@ name: bmad-review-adversarial-general
3
3
  description: 'Perform a Cynical Review and produce a findings report. Use when the user requests a critical review of something'
4
4
  ---
5
5
 
6
- Follow the instructions in [workflow.md](workflow.md).
6
+ Follow the instructions in ./workflow.md.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: bmad-review-edge-case-hunter
3
- description: 'Walk every branching path and boundary condition in content, report only unhandled edge cases. Orthogonal to adversarial review - method-driven not attitude-driven.'
3
+ description: 'Walk every branching path and boundary condition in content, report only unhandled edge cases. Orthogonal to adversarial review - method-driven not attitude-driven. Use when you need exhaustive edge-case analysis of code, specs, or diffs.'
4
4
  ---
5
5
 
6
- Follow the instructions in [workflow.md](workflow.md).
6
+ Follow the instructions in ./workflow.md.
@@ -3,4 +3,4 @@ name: bmad-shard-doc
3
3
  description: 'Splits large markdown documents into smaller, organized files based on level 2 (default) sections. Use if the user says perform shard document'
4
4
  ---
5
5
 
6
- Follow the instructions in [workflow.md](workflow.md).
6
+ Follow the instructions in ./workflow.md.
@@ -0,0 +1,6 @@
1
+ ---
2
+ name: bmad-create-prd
3
+ description: 'Create a PRD from scratch. Use when the user says "lets create a product requirements document" or "I want to create a new PRD"'
4
+ ---
5
+
6
+ Follow the instructions in ./workflow.md.
@@ -0,0 +1,15 @@
1
+ domain,signals,complexity,key_concerns,required_knowledge,suggested_workflow,web_searches,special_sections
2
+ healthcare,"medical,diagnostic,clinical,FDA,patient,treatment,HIPAA,therapy,pharma,drug",high,"FDA approval;Clinical validation;HIPAA compliance;Patient safety;Medical device classification;Liability","Regulatory pathways;Clinical trial design;Medical standards;Data privacy;Integration requirements","domain-research","FDA software medical device guidance {date};HIPAA compliance software requirements;Medical software standards {date};Clinical validation software","clinical_requirements;regulatory_pathway;validation_methodology;safety_measures"
3
+ fintech,"payment,banking,trading,investment,crypto,wallet,transaction,KYC,AML,funds,fintech",high,"Regional compliance;Security standards;Audit requirements;Fraud prevention;Data protection","KYC/AML requirements;PCI DSS;Open banking;Regional laws (US/EU/APAC);Crypto regulations","domain-research","fintech regulations {date};payment processing compliance {date};open banking API standards;cryptocurrency regulations {date}","compliance_matrix;security_architecture;audit_requirements;fraud_prevention"
4
+ govtech,"government,federal,civic,public sector,citizen,municipal,voting",high,"Procurement rules;Security clearance;Accessibility (508);FedRAMP;Privacy;Transparency","Government procurement;Security frameworks;Accessibility standards;Privacy laws;Open data requirements","domain-research","government software procurement {date};FedRAMP compliance requirements;section 508 accessibility;government security standards","procurement_compliance;security_clearance;accessibility_standards;transparency_requirements"
5
+ edtech,"education,learning,student,teacher,curriculum,assessment,K-12,university,LMS",medium,"Student privacy (COPPA/FERPA);Accessibility;Content moderation;Age verification;Curriculum standards","Educational privacy laws;Learning standards;Accessibility requirements;Content guidelines;Assessment validity","domain-research","educational software privacy {date};COPPA FERPA compliance;WCAG education requirements;learning management standards","privacy_compliance;content_guidelines;accessibility_features;curriculum_alignment"
6
+ aerospace,"aircraft,spacecraft,aviation,drone,satellite,propulsion,flight,radar,navigation",high,"Safety certification;DO-178C compliance;Performance validation;Simulation accuracy;Export controls","Aviation standards;Safety analysis;Simulation validation;ITAR/export controls;Performance requirements","domain-research + technical-model","DO-178C software certification;aerospace simulation standards {date};ITAR export controls software;aviation safety requirements","safety_certification;simulation_validation;performance_requirements;export_compliance"
7
+ automotive,"vehicle,car,autonomous,ADAS,automotive,driving,EV,charging",high,"Safety standards;ISO 26262;V2X communication;Real-time requirements;Certification","Automotive standards;Functional safety;V2X protocols;Real-time systems;Testing requirements","domain-research","ISO 26262 automotive software;automotive safety standards {date};V2X communication protocols;EV charging standards","safety_standards;functional_safety;communication_protocols;certification_requirements"
8
+ scientific,"research,algorithm,simulation,modeling,computational,analysis,data science,ML,AI",medium,"Reproducibility;Validation methodology;Peer review;Performance;Accuracy;Computational resources","Scientific method;Statistical validity;Computational requirements;Domain expertise;Publication standards","technical-model","scientific computing best practices {date};research reproducibility standards;computational modeling validation;peer review software","validation_methodology;accuracy_metrics;reproducibility_plan;computational_requirements"
9
+ legaltech,"legal,law,contract,compliance,litigation,patent,attorney,court",high,"Legal ethics;Bar regulations;Data retention;Attorney-client privilege;Court system integration","Legal practice rules;Ethics requirements;Court filing systems;Document standards;Confidentiality","domain-research","legal technology ethics {date};law practice management software requirements;court filing system standards;attorney client privilege technology","ethics_compliance;data_retention;confidentiality_measures;court_integration"
10
+ insuretech,"insurance,claims,underwriting,actuarial,policy,risk,premium",high,"Insurance regulations;Actuarial standards;Data privacy;Fraud detection;State compliance","Insurance regulations by state;Actuarial methods;Risk modeling;Claims processing;Regulatory reporting","domain-research","insurance software regulations {date};actuarial standards software;insurance fraud detection;state insurance compliance","regulatory_requirements;risk_modeling;fraud_detection;reporting_compliance"
11
+ energy,"energy,utility,grid,solar,wind,power,electricity,oil,gas",high,"Grid compliance;NERC standards;Environmental regulations;Safety requirements;Real-time operations","Energy regulations;Grid standards;Environmental compliance;Safety protocols;SCADA systems","domain-research","energy sector software compliance {date};NERC CIP standards;smart grid requirements;renewable energy software standards","grid_compliance;safety_protocols;environmental_compliance;operational_requirements"
12
+ process_control,"industrial automation,process control,PLC,SCADA,DCS,HMI,operational technology,OT,control system,cyberphysical,MES,historian,instrumentation,I&C,P&ID",high,"Functional safety;OT cybersecurity;Real-time control requirements;Legacy system integration;Process safety and hazard analysis;Environmental compliance and permitting;Engineering authority and PE requirements","Functional safety standards;OT security frameworks;Industrial protocols;Process control architecture;Plant reliability and maintainability","domain-research + technical-model","IEC 62443 OT cybersecurity requirements {date};functional safety software requirements {date};industrial process control architecture;ISA-95 manufacturing integration","functional_safety;ot_security;process_requirements;engineering_authority"
13
+ building_automation,"building automation,BAS,BMS,HVAC,smart building,lighting control,fire alarm,fire protection,fire suppression,life safety,elevator,access control,DDC,energy management,sequence of operations,commissioning",high,"Life safety codes;Building energy standards;Multi-trade coordination and interoperability;Commissioning and ongoing operational performance;Indoor environmental quality and occupant comfort;Engineering authority and PE requirements","Building automation protocols;HVAC and mechanical controls;Fire alarm, fire protection, and life safety design;Commissioning process and sequence of operations;Building codes and energy standards","domain-research","smart building software architecture {date};BACnet integration best practices;building automation cybersecurity {date};ASHRAE building standards","life_safety;energy_compliance;commissioning_requirements;engineering_authority"
14
+ gaming,"game,player,gameplay,level,character,multiplayer,quest",redirect,"REDIRECT TO GAME WORKFLOWS","Game design","game-brief","NA","NA"
15
+ general,"",low,"Standard requirements;Basic security;User experience;Performance","General software practices","continue","software development best practices {date}","standard_requirements"
@@ -0,0 +1,197 @@
1
+ # BMAD PRD Purpose
2
+
3
+ **The PRD is the top of the required funnel that feeds all subsequent product development work in rhw BMad Method.**
4
+
5
+ ---
6
+
7
+ ## What is a BMAD PRD?
8
+
9
+ A dual-audience document serving:
10
+ 1. **Human Product Managers and builders** - Vision, strategy, stakeholder communication
11
+ 2. **LLM Downstream Consumption** - UX Design → Architecture → Epics → Development AI Agents
12
+
13
+ Each successive document becomes more AI-tailored and granular.
14
+
15
+ ---
16
+
17
+ ## Core Philosophy: Information Density
18
+
19
+ **High Signal-to-Noise Ratio**
20
+
21
+ Every sentence must carry information weight. LLMs consume precise, dense content efficiently.
22
+
23
+ **Anti-Patterns (Eliminate These):**
24
+ - ❌ "The system will allow users to..." → ✅ "Users can..."
25
+ - ❌ "It is important to note that..." → ✅ State the fact directly
26
+ - ❌ "In order to..." → ✅ "To..."
27
+ - ❌ Conversational filler and padding → ✅ Direct, concise statements
28
+
29
+ **Goal:** Maximum information per word. Zero fluff.
30
+
31
+ ---
32
+
33
+ ## The Traceability Chain
34
+
35
+ **PRD starts the chain:**
36
+ ```
37
+ Vision → Success Criteria → User Journeys → Functional Requirements → (future: User Stories)
38
+ ```
39
+
40
+ **In the PRD, establish:**
41
+ - Vision → Success Criteria alignment
42
+ - Success Criteria → User Journey coverage
43
+ - User Journey → Functional Requirement mapping
44
+ - All requirements traceable to user needs
45
+
46
+ **Why:** Each downstream artifact (UX, Architecture, Epics, Stories) must trace back to documented user needs and business objectives. This chain ensures we build the right thing.
47
+
48
+ ---
49
+
50
+ ## What Makes Great Functional Requirements?
51
+
52
+ ### FRs are Capabilities, Not Implementation
53
+
54
+ **Good FR:** "Users can reset their password via email link"
55
+ **Bad FR:** "System sends JWT via email and validates with database" (implementation leakage)
56
+
57
+ **Good FR:** "Dashboard loads in under 2 seconds for 95th percentile"
58
+ **Bad FR:** "Fast loading time" (subjective, unmeasurable)
59
+
60
+ ### SMART Quality Criteria
61
+
62
+ **Specific:** Clear, precisely defined capability
63
+ **Measurable:** Quantifiable with test criteria
64
+ **Attainable:** Realistic within constraints
65
+ **Relevant:** Aligns with business objectives
66
+ **Traceable:** Links to source (executive summary or user journey)
67
+
68
+ ### FR Anti-Patterns
69
+
70
+ **Subjective Adjectives:**
71
+ - ❌ "easy to use", "intuitive", "user-friendly", "fast", "responsive"
72
+ - ✅ Use metrics: "completes task in under 3 clicks", "loads in under 2 seconds"
73
+
74
+ **Implementation Leakage:**
75
+ - ❌ Technology names, specific libraries, implementation details
76
+ - ✅ Focus on capability and measurable outcomes
77
+
78
+ **Vague Quantifiers:**
79
+ - ❌ "multiple users", "several options", "various formats"
80
+ - ✅ "up to 100 concurrent users", "3-5 options", "PDF, DOCX, TXT formats"
81
+
82
+ **Missing Test Criteria:**
83
+ - ❌ "The system shall provide notifications"
84
+ - ✅ "The system shall send email notifications within 30 seconds of trigger event"
85
+
86
+ ---
87
+
88
+ ## What Makes Great Non-Functional Requirements?
89
+
90
+ ### NFRs Must Be Measurable
91
+
92
+ **Template:**
93
+ ```
94
+ "The system shall [metric] [condition] [measurement method]"
95
+ ```
96
+
97
+ **Examples:**
98
+ - ✅ "The system shall respond to API requests in under 200ms for 95th percentile as measured by APM monitoring"
99
+ - ✅ "The system shall maintain 99.9% uptime during business hours as measured by cloud provider SLA"
100
+ - ✅ "The system shall support 10,000 concurrent users as measured by load testing"
101
+
102
+ ### NFR Anti-Patterns
103
+
104
+ **Unmeasurable Claims:**
105
+ - ❌ "The system shall be scalable" → ✅ "The system shall handle 10x load growth through horizontal scaling"
106
+ - ❌ "High availability required" → ✅ "99.9% uptime as measured by cloud provider SLA"
107
+
108
+ **Missing Context:**
109
+ - ❌ "Response time under 1 second" → ✅ "API response time under 1 second for 95th percentile under normal load"
110
+
111
+ ---
112
+
113
+ ## Domain-Specific Requirements
114
+
115
+ **Auto-Detect and Enforce Based on Project Context**
116
+
117
+ Certain industries have mandatory requirements that must be present:
118
+
119
+ - **Healthcare:** HIPAA Privacy & Security Rules, PHI encryption, audit logging, MFA
120
+ - **Fintech:** PCI-DSS Level 1, AML/KYC compliance, SOX controls, financial audit trails
121
+ - **GovTech:** NIST framework, Section 508 accessibility (WCAG 2.1 AA), FedRAMP, data residency
122
+ - **E-Commerce:** PCI-DSS for payments, inventory accuracy, tax calculation by jurisdiction
123
+
124
+ **Why:** Missing these requirements in the PRD means they'll be missed in architecture and implementation, creating expensive rework. During PRD creation there is a step to cover this - during validation we want to make sure it was covered. For this purpose steps will utilize a domain-complexity.csv and project-types.csv.
125
+
126
+ ---
127
+
128
+ ## Document Structure (Markdown, Human-Readable)
129
+
130
+ ### Required Sections
131
+ 1. **Executive Summary** - Vision, differentiator, target users
132
+ 2. **Success Criteria** - Measurable outcomes (SMART)
133
+ 3. **Product Scope** - MVP, Growth, Vision phases
134
+ 4. **User Journeys** - Comprehensive coverage
135
+ 5. **Domain Requirements** - Industry-specific compliance (if applicable)
136
+ 6. **Innovation Analysis** - Competitive differentiation (if applicable)
137
+ 7. **Project-Type Requirements** - Platform-specific needs
138
+ 8. **Functional Requirements** - Capability contract (FRs)
139
+ 9. **Non-Functional Requirements** - Quality attributes (NFRs)
140
+
141
+ ### Formatting for Dual Consumption
142
+
143
+ **For Humans:**
144
+ - Clear, professional language
145
+ - Logical flow from vision to requirements
146
+ - Easy for stakeholders to review and approve
147
+
148
+ **For LLMs:**
149
+ - ## Level 2 headers for all main sections (enables extraction)
150
+ - Consistent structure and patterns
151
+ - Precise, testable language
152
+ - High information density
153
+
154
+ ---
155
+
156
+ ## Downstream Impact
157
+
158
+ **How the PRD Feeds Next Artifacts:**
159
+
160
+ **UX Design:**
161
+ - User journeys → interaction flows
162
+ - FRs → design requirements
163
+ - Success criteria → UX metrics
164
+
165
+ **Architecture:**
166
+ - FRs → system capabilities
167
+ - NFRs → architecture decisions
168
+ - Domain requirements → compliance architecture
169
+ - Project-type requirements → platform choices
170
+
171
+ **Epics & Stories (created after architecture):**
172
+ - FRs → user stories (1 FR could map to 1-3 stories potentially)
173
+ - Acceptance criteria → story acceptance tests
174
+ - Priority → sprint sequencing
175
+ - Traceability → stories map back to vision
176
+
177
+ **Development AI Agents:**
178
+ - Precise requirements → implementation clarity
179
+ - Test criteria → automated test generation
180
+ - Domain requirements → compliance enforcement
181
+ - Measurable NFRs → performance targets
182
+
183
+ ---
184
+
185
+ ## Summary: What Makes a Great BMAD PRD?
186
+
187
+ ✅ **High Information Density** - Every sentence carries weight, zero fluff
188
+ ✅ **Measurable Requirements** - All FRs and NFRs are testable with specific criteria
189
+ ✅ **Clear Traceability** - Each requirement links to user need and business objective
190
+ ✅ **Domain Awareness** - Industry-specific requirements auto-detected and included
191
+ ✅ **Zero Anti-Patterns** - No subjective adjectives, implementation leakage, or vague quantifiers
192
+ ✅ **Dual Audience Optimized** - Human-readable AND LLM-consumable
193
+ ✅ **Markdown Format** - Professional, clean, accessible to all stakeholders
194
+
195
+ ---
196
+
197
+ **Remember:** The PRD is the foundation. Quality here ripples through every subsequent phase. A dense, precise, well-traced PRD makes UX design, architecture, epic breakdown, and AI development dramatically more effective.
@@ -0,0 +1,11 @@
1
+ project_type,detection_signals,key_questions,required_sections,skip_sections,web_search_triggers,innovation_signals
2
+ api_backend,"API,REST,GraphQL,backend,service,endpoints","Endpoints needed?;Authentication method?;Data formats?;Rate limits?;Versioning?;SDK needed?","endpoint_specs;auth_model;data_schemas;error_codes;rate_limits;api_docs","ux_ui;visual_design;user_journeys","framework best practices;OpenAPI standards","API composition;New protocol"
3
+ mobile_app,"iOS,Android,app,mobile,iPhone,iPad","Native or cross-platform?;Offline needed?;Push notifications?;Device features?;Store compliance?","platform_reqs;device_permissions;offline_mode;push_strategy;store_compliance","desktop_features;cli_commands","app store guidelines;platform requirements","Gesture innovation;AR/VR features"
4
+ saas_b2b,"SaaS,B2B,platform,dashboard,teams,enterprise","Multi-tenant?;Permission model?;Subscription tiers?;Integrations?;Compliance?","tenant_model;rbac_matrix;subscription_tiers;integration_list;compliance_reqs","cli_interface;mobile_first","compliance requirements;integration guides","Workflow automation;AI agents"
5
+ developer_tool,"SDK,library,package,npm,pip,framework","Language support?;Package managers?;IDE integration?;Documentation?;Examples?","language_matrix;installation_methods;api_surface;code_examples;migration_guide","visual_design;store_compliance","package manager best practices;API design patterns","New paradigm;DSL creation"
6
+ cli_tool,"CLI,command,terminal,bash,script","Interactive or scriptable?;Output formats?;Config method?;Shell completion?","command_structure;output_formats;config_schema;scripting_support","visual_design;ux_principles;touch_interactions","CLI design patterns;shell integration","Natural language CLI;AI commands"
7
+ web_app,"website,webapp,browser,SPA,PWA","SPA or MPA?;Browser support?;SEO needed?;Real-time?;Accessibility?","browser_matrix;responsive_design;performance_targets;seo_strategy;accessibility_level","native_features;cli_commands","web standards;WCAG guidelines","New interaction;WebAssembly use"
8
+ game,"game,player,gameplay,level,character","REDIRECT TO USE THE BMad Method Game Module Agent and Workflows - HALT","game-brief;GDD","most_sections","game design patterns","Novel mechanics;Genre mixing"
9
+ desktop_app,"desktop,Windows,Mac,Linux,native","Cross-platform?;Auto-update?;System integration?;Offline?","platform_support;system_integration;update_strategy;offline_capabilities","web_seo;mobile_features","desktop guidelines;platform requirements","Desktop AI;System automation"
10
+ iot_embedded,"IoT,embedded,device,sensor,hardware","Hardware specs?;Connectivity?;Power constraints?;Security?;OTA updates?","hardware_reqs;connectivity_protocol;power_profile;security_model;update_mechanism","visual_ui;browser_support","IoT standards;protocol specs","Edge AI;New sensors"
11
+ blockchain_web3,"blockchain,crypto,DeFi,NFT,smart contract","Chain selection?;Wallet integration?;Gas optimization?;Security audit?","chain_specs;wallet_support;smart_contracts;security_audit;gas_optimization","traditional_auth;centralized_db","blockchain standards;security patterns","Novel tokenomics;DAO structure"
@@ -1,16 +1,3 @@
1
- ---
2
- name: 'step-01-init'
3
- description: 'Initialize the PRD workflow by detecting continuation state and setting up the document'
4
-
5
- # File References
6
- nextStepFile: './step-02-discovery.md'
7
- continueStepFile: './step-01b-continue.md'
8
- outputFile: '{planning_artifacts}/prd.md'
9
-
10
- # Template Reference
11
- prdTemplate: '../templates/prd-template.md'
12
- ---
13
-
14
1
  # Step 1: Workflow Initialization
15
2
 
16
3
  **Progress: Step 1 of 11** - Next: Project Discovery
@@ -71,11 +58,11 @@ First, check if the output document already exists:
71
58
 
72
59
  ### 2. Handle Continuation (If Document Exists)
73
60
 
74
- If the document exists and has frontmatter with `stepsCompleted` BUT `step-11-complete` is NOT in the list, follow the Continuation Protocol since the document is incomplete:
61
+ If the document exists and has frontmatter with `stepsCompleted` BUT `step-12-complete` is NOT in the list, follow the Continuation Protocol since the document is incomplete:
75
62
 
76
63
  **Continuation Protocol:**
77
64
 
78
- - **STOP immediately** and load `{continueStepFile}`
65
+ - **STOP immediately** and load `./step-01b-continue.md`
79
66
  - Do not proceed with any initialization tasks
80
67
  - Let step-01b handle all continuation logic
81
68
  - This is an auto-proceed situation - no user choice needed
@@ -89,7 +76,7 @@ If no document exists or no `stepsCompleted` in frontmatter:
89
76
  Discover and load context documents using smart discovery. Documents can be in the following locations:
90
77
  - {planning_artifacts}/**
91
78
  - {output_folder}/**
92
- - {product_knowledge}/**
79
+ - {project_knowledge}/**
93
80
  - docs/**
94
81
 
95
82
  Also - when searching - documents can be a single markdown file, or a folder with an index and multiple files. For Example, if searching for `*foo*.md` and not found, also search for a folder called *foo*/index.md (which indicates sharded content)
@@ -97,7 +84,7 @@ Also - when searching - documents can be a single markdown file, or a folder wit
97
84
  Try to discover the following:
98
85
  - Product Brief (`*brief*.md`)
99
86
  - Research Documents (`/*research*.md`)
100
- - Project Documentation (generally multiple documents might be found for this in the `{product_knowledge}` or `docs` folder.)
87
+ - Project Documentation (generally multiple documents might be found for this in the `{project_knowledge}` or `docs` folder.)
101
88
  - Project Context (`**/project-context.md`)
102
89
 
103
90
  <critical>Confirm what you have found with the user, along with asking if the user wants to provide anything else. Only after this confirmation will you proceed to follow the loading rules</critical>
@@ -114,7 +101,7 @@ Try to discover the following:
114
101
 
115
102
  **Document Setup:**
116
103
 
117
- - Copy the template from `{prdTemplate}` to `{outputFile}`
104
+ - Copy the template from `../templates/prd-template.md` to `{outputFile}`
118
105
  - Initialize frontmatter with proper structure including inputDocuments array.
119
106
 
120
107
  #### C. Present Initialization Results
@@ -151,7 +138,7 @@ Display menu after setup report:
151
138
 
152
139
  #### Menu Handling Logic:
153
140
 
154
- - IF C: Update output file frontmatter, adding this step name to the end of the list of stepsCompleted, then read fully and follow: {nextStepFile}
141
+ - IF C: Update output file frontmatter, adding this step name to the end of the list of stepsCompleted, then read fully and follow: ./step-02-discovery.md
155
142
  - IF user provides additional files: Load them, update inputDocuments and documentCounts, redisplay report
156
143
  - IF user asks questions: Answer and redisplay menu
157
144
 
@@ -162,7 +149,7 @@ Display menu after setup report:
162
149
 
163
150
  ## CRITICAL STEP COMPLETION NOTE
164
151
 
165
- ONLY WHEN [C continue option] is selected and [frontmatter properly updated with this step added to stepsCompleted and documentCounts], will you then read fully and follow: `{nextStepFile}` to begin project discovery.
152
+ ONLY WHEN [C continue option] is selected and [frontmatter properly updated with this step added to stepsCompleted and documentCounts], will you then read fully and follow: `./step-02-discovery.md` to begin project discovery.
166
153
 
167
154
  ---
168
155