observer-ggboy-bmad-method 6.0.0-alpha.23

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 (604) hide show
  1. package/.coderabbit.yaml +40 -0
  2. package/.github/CODE_OF_CONDUCT.md +128 -0
  3. package/.github/FUNDING.yaml +15 -0
  4. package/.github/ISSUE_TEMPLATE/config.yaml +8 -0
  5. package/.github/ISSUE_TEMPLATE/feature_request.md +22 -0
  6. package/.github/ISSUE_TEMPLATE/issue.md +32 -0
  7. package/.github/scripts/discord-helpers.sh +34 -0
  8. package/.github/workflows/bundle-latest.yaml +330 -0
  9. package/.github/workflows/discord.yaml +90 -0
  10. package/.github/workflows/docs.yaml +63 -0
  11. package/.github/workflows/manual-release.yaml +190 -0
  12. package/.github/workflows/quality.yaml +115 -0
  13. package/.health-status.json +7 -0
  14. package/.husky/pre-commit +20 -0
  15. package/.markdownlint-cli2.yaml +41 -0
  16. package/.nvmrc +1 -0
  17. package/.prettierignore +9 -0
  18. package/.vscode/settings.json +97 -0
  19. package/CHANGELOG.md +1394 -0
  20. package/CNAME +1 -0
  21. package/CONTRIBUTING.md +167 -0
  22. package/CONTRIBUTORS.md +32 -0
  23. package/LICENSE +30 -0
  24. package/README.md +100 -0
  25. package/SECURITY.md +85 -0
  26. package/TRADEMARK.md +55 -0
  27. package/Wordmark.png +0 -0
  28. package/banner-bmad-method.png +0 -0
  29. package/bmad-method-6.0.0-alpha.23.tgz +0 -0
  30. package/docs/404.md +9 -0
  31. package/docs/_README_WORKFLOW_DIAGRAMS.md +40 -0
  32. package/docs/_STYLE_GUIDE.md +367 -0
  33. package/docs/_archive/customize-workflows.md +30 -0
  34. package/docs/_archive/getting-started-bmadv4.md +247 -0
  35. package/docs/_archive/vendor-workflows.md +52 -0
  36. package/docs/downloads.md +72 -0
  37. package/docs/explanation/agents/barry-quick-flow.md +328 -0
  38. package/docs/explanation/agents/index.md +19 -0
  39. package/docs/explanation/architecture/four-phases.md +107 -0
  40. package/docs/explanation/architecture/preventing-agent-conflicts.md +111 -0
  41. package/docs/explanation/architecture/why-solutioning-matters.md +75 -0
  42. package/docs/explanation/bmm/index.md +131 -0
  43. package/docs/explanation/core/index.md +18 -0
  44. package/docs/explanation/core-concepts/agent-roles.md +179 -0
  45. package/docs/explanation/core-concepts/index.md +35 -0
  46. package/docs/explanation/core-concepts/what-are-agents.md +97 -0
  47. package/docs/explanation/core-concepts/what-are-modules.md +85 -0
  48. package/docs/explanation/core-concepts/what-are-workflows.md +204 -0
  49. package/docs/explanation/faq/brownfield-faq.md +73 -0
  50. package/docs/explanation/faq/getting-started-faq.md +67 -0
  51. package/docs/explanation/faq/implementation-faq.md +52 -0
  52. package/docs/explanation/faq/index.md +16 -0
  53. package/docs/explanation/faq/levels-and-tracks-faq.md +52 -0
  54. package/docs/explanation/faq/planning-faq.md +41 -0
  55. package/docs/explanation/faq/tools-faq.md +277 -0
  56. package/docs/explanation/faq/workflows-faq.md +61 -0
  57. package/docs/explanation/features/advanced-elicitation.md +95 -0
  58. package/docs/explanation/features/brainstorming-techniques.md +92 -0
  59. package/docs/explanation/features/party-mode.md +95 -0
  60. package/docs/explanation/features/quick-flow.md +149 -0
  61. package/docs/explanation/features/tea-overview.md +410 -0
  62. package/docs/explanation/features/web-bundles.md +34 -0
  63. package/docs/explanation/philosophy/facilitation-over-generation.md +333 -0
  64. package/docs/explanation/philosophy/testing-as-engineering.md +112 -0
  65. package/docs/explanation/tea/engagement-models.md +710 -0
  66. package/docs/explanation/tea/fixture-architecture.md +457 -0
  67. package/docs/explanation/tea/knowledge-base-system.md +554 -0
  68. package/docs/explanation/tea/network-first-patterns.md +853 -0
  69. package/docs/explanation/tea/risk-based-testing.md +586 -0
  70. package/docs/explanation/tea/test-quality-standards.md +907 -0
  71. package/docs/how-to/brownfield/add-feature-to-existing.md +74 -0
  72. package/docs/how-to/brownfield/document-existing-project.md +66 -0
  73. package/docs/how-to/brownfield/index.md +84 -0
  74. package/docs/how-to/brownfield/quick-fix-in-brownfield.md +77 -0
  75. package/docs/how-to/brownfield/use-tea-for-enterprise.md +525 -0
  76. package/docs/how-to/brownfield/use-tea-with-existing-tests.md +577 -0
  77. package/docs/how-to/customization/customize-agents.md +212 -0
  78. package/docs/how-to/customization/enable-tea-mcp-enhancements.md +424 -0
  79. package/docs/how-to/customization/index.md +23 -0
  80. package/docs/how-to/customization/integrate-playwright-utils.md +813 -0
  81. package/docs/how-to/customization/shard-large-documents.md +101 -0
  82. package/docs/how-to/get-answers-about-bmad.md +102 -0
  83. package/docs/how-to/installation/index.md +12 -0
  84. package/docs/how-to/installation/install-bmad.md +111 -0
  85. package/docs/how-to/installation/install-custom-modules.md +118 -0
  86. package/docs/how-to/installation/upgrade-to-v6.md +131 -0
  87. package/docs/how-to/workflows/bmgd-quick-flow.md +156 -0
  88. package/docs/how-to/workflows/conduct-research.md +97 -0
  89. package/docs/how-to/workflows/create-architecture.md +119 -0
  90. package/docs/how-to/workflows/create-epics-and-stories.md +109 -0
  91. package/docs/how-to/workflows/create-prd.md +91 -0
  92. package/docs/how-to/workflows/create-product-brief.md +94 -0
  93. package/docs/how-to/workflows/create-story.md +102 -0
  94. package/docs/how-to/workflows/create-ux-design.md +100 -0
  95. package/docs/how-to/workflows/implement-story.md +97 -0
  96. package/docs/how-to/workflows/quick-spec.md +122 -0
  97. package/docs/how-to/workflows/run-atdd.md +436 -0
  98. package/docs/how-to/workflows/run-automate.md +653 -0
  99. package/docs/how-to/workflows/run-brainstorming-session.md +73 -0
  100. package/docs/how-to/workflows/run-code-review.md +89 -0
  101. package/docs/how-to/workflows/run-implementation-readiness.md +125 -0
  102. package/docs/how-to/workflows/run-nfr-assess.md +679 -0
  103. package/docs/how-to/workflows/run-sprint-planning.md +94 -0
  104. package/docs/how-to/workflows/run-test-design.md +135 -0
  105. package/docs/how-to/workflows/run-test-review.md +605 -0
  106. package/docs/how-to/workflows/run-trace.md +883 -0
  107. package/docs/how-to/workflows/setup-ci.md +712 -0
  108. package/docs/how-to/workflows/setup-party-mode.md +89 -0
  109. package/docs/how-to/workflows/setup-test-framework.md +98 -0
  110. package/docs/index.md +63 -0
  111. package/docs/reference/agents/index.md +109 -0
  112. package/docs/reference/configuration/core-tasks.md +67 -0
  113. package/docs/reference/configuration/global-config.md +28 -0
  114. package/docs/reference/glossary/index.md +159 -0
  115. package/docs/reference/tea/commands.md +276 -0
  116. package/docs/reference/tea/configuration.md +678 -0
  117. package/docs/reference/tea/knowledge-base.md +340 -0
  118. package/docs/reference/workflows/core-workflows.md +32 -0
  119. package/docs/reference/workflows/document-project.md +73 -0
  120. package/docs/reference/workflows/index.md +12 -0
  121. package/docs/tutorials/getting-started/getting-started-bmadv6.md +246 -0
  122. package/docs/tutorials/getting-started/images/workflow-method-greenfield.excalidraw +5034 -0
  123. package/docs/tutorials/getting-started/images/workflow-method-greenfield.svg +4 -0
  124. package/docs/tutorials/getting-started/images/workflow-overview.jpg +0 -0
  125. package/docs/tutorials/getting-started/tea-lite-quickstart.md +444 -0
  126. package/docs/tutorials/getting-started/workflow-overview.jpg +0 -0
  127. package/eslint.config.mjs +152 -0
  128. package/package.json +117 -0
  129. package/prettier.config.mjs +32 -0
  130. package/src/bmm/_module-installer/installer.js +48 -0
  131. package/src/bmm/_module-installer/platform-specifics/claude-code.js +35 -0
  132. package/src/bmm/_module-installer/platform-specifics/windsurf.js +32 -0
  133. package/src/bmm/agents/analyst.agent.yaml +36 -0
  134. package/src/bmm/agents/architect.agent.yaml +28 -0
  135. package/src/bmm/agents/dev.agent.yaml +38 -0
  136. package/src/bmm/agents/pm.agent.yaml +46 -0
  137. package/src/bmm/agents/quick-flow-solo-dev.agent.yaml +32 -0
  138. package/src/bmm/agents/sm.agent.yaml +36 -0
  139. package/src/bmm/agents/tea.agent.yaml +63 -0
  140. package/src/bmm/agents/tech-writer/tech-writer-sidecar/documentation-standards.md +224 -0
  141. package/src/bmm/agents/tech-writer/tech-writer.agent.yaml +45 -0
  142. package/src/bmm/agents/ux-designer.agent.yaml +26 -0
  143. package/src/bmm/data/project-context-template.md +26 -0
  144. package/src/bmm/module-help.csv +32 -0
  145. package/src/bmm/module.yaml +44 -0
  146. package/src/bmm/sub-modules/claude-code/config.yaml +4 -0
  147. package/src/bmm/sub-modules/claude-code/injections.yaml +242 -0
  148. package/src/bmm/sub-modules/claude-code/readme.md +87 -0
  149. package/src/bmm/teams/default-party.csv +21 -0
  150. package/src/bmm/teams/team-fullstack.yaml +12 -0
  151. package/src/bmm/testarch/knowledge/adr-quality-readiness-checklist.md +350 -0
  152. package/src/bmm/testarch/knowledge/api-request.md +442 -0
  153. package/src/bmm/testarch/knowledge/api-testing-patterns.md +843 -0
  154. package/src/bmm/testarch/knowledge/auth-session.md +552 -0
  155. package/src/bmm/testarch/knowledge/burn-in.md +273 -0
  156. package/src/bmm/testarch/knowledge/ci-burn-in.md +675 -0
  157. package/src/bmm/testarch/knowledge/component-tdd.md +486 -0
  158. package/src/bmm/testarch/knowledge/contract-testing.md +957 -0
  159. package/src/bmm/testarch/knowledge/data-factories.md +500 -0
  160. package/src/bmm/testarch/knowledge/email-auth.md +721 -0
  161. package/src/bmm/testarch/knowledge/error-handling.md +725 -0
  162. package/src/bmm/testarch/knowledge/feature-flags.md +750 -0
  163. package/src/bmm/testarch/knowledge/file-utils.md +463 -0
  164. package/src/bmm/testarch/knowledge/fixture-architecture.md +401 -0
  165. package/src/bmm/testarch/knowledge/fixtures-composition.md +382 -0
  166. package/src/bmm/testarch/knowledge/intercept-network-call.md +430 -0
  167. package/src/bmm/testarch/knowledge/log.md +429 -0
  168. package/src/bmm/testarch/knowledge/network-error-monitor.md +405 -0
  169. package/src/bmm/testarch/knowledge/network-first.md +486 -0
  170. package/src/bmm/testarch/knowledge/network-recorder.md +527 -0
  171. package/src/bmm/testarch/knowledge/nfr-criteria.md +670 -0
  172. package/src/bmm/testarch/knowledge/overview.md +286 -0
  173. package/src/bmm/testarch/knowledge/playwright-config.md +730 -0
  174. package/src/bmm/testarch/knowledge/probability-impact.md +601 -0
  175. package/src/bmm/testarch/knowledge/recurse.md +421 -0
  176. package/src/bmm/testarch/knowledge/risk-governance.md +615 -0
  177. package/src/bmm/testarch/knowledge/selective-testing.md +732 -0
  178. package/src/bmm/testarch/knowledge/selector-resilience.md +527 -0
  179. package/src/bmm/testarch/knowledge/test-healing-patterns.md +644 -0
  180. package/src/bmm/testarch/knowledge/test-levels-framework.md +473 -0
  181. package/src/bmm/testarch/knowledge/test-priorities-matrix.md +373 -0
  182. package/src/bmm/testarch/knowledge/test-quality.md +664 -0
  183. package/src/bmm/testarch/knowledge/timing-debugging.md +372 -0
  184. package/src/bmm/testarch/knowledge/visual-debugging.md +524 -0
  185. package/src/bmm/testarch/tea-index.csv +35 -0
  186. package/src/bmm/workflows/1-analysis/create-product-brief/product-brief.template.md +10 -0
  187. package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-01-init.md +177 -0
  188. package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-01b-continue.md +161 -0
  189. package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-02-vision.md +199 -0
  190. package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-03-users.md +202 -0
  191. package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-04-metrics.md +205 -0
  192. package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-05-scope.md +219 -0
  193. package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-06-complete.md +162 -0
  194. package/src/bmm/workflows/1-analysis/create-product-brief/workflow.md +58 -0
  195. package/src/bmm/workflows/1-analysis/research/domain-steps/step-01-init.md +137 -0
  196. package/src/bmm/workflows/1-analysis/research/domain-steps/step-02-domain-analysis.md +229 -0
  197. package/src/bmm/workflows/1-analysis/research/domain-steps/step-03-competitive-landscape.md +238 -0
  198. package/src/bmm/workflows/1-analysis/research/domain-steps/step-04-regulatory-focus.md +206 -0
  199. package/src/bmm/workflows/1-analysis/research/domain-steps/step-05-technical-trends.md +234 -0
  200. package/src/bmm/workflows/1-analysis/research/domain-steps/step-06-research-synthesis.md +443 -0
  201. package/src/bmm/workflows/1-analysis/research/market-steps/step-01-init.md +182 -0
  202. package/src/bmm/workflows/1-analysis/research/market-steps/step-02-customer-behavior.md +237 -0
  203. package/src/bmm/workflows/1-analysis/research/market-steps/step-02-customer-insights.md +200 -0
  204. package/src/bmm/workflows/1-analysis/research/market-steps/step-03-customer-pain-points.md +249 -0
  205. package/src/bmm/workflows/1-analysis/research/market-steps/step-04-customer-decisions.md +259 -0
  206. package/src/bmm/workflows/1-analysis/research/market-steps/step-05-competitive-analysis.md +177 -0
  207. package/src/bmm/workflows/1-analysis/research/market-steps/step-06-research-completion.md +475 -0
  208. package/src/bmm/workflows/1-analysis/research/research.template.md +29 -0
  209. package/src/bmm/workflows/1-analysis/research/technical-steps/step-01-init.md +137 -0
  210. package/src/bmm/workflows/1-analysis/research/technical-steps/step-02-technical-overview.md +239 -0
  211. package/src/bmm/workflows/1-analysis/research/technical-steps/step-03-integration-patterns.md +248 -0
  212. package/src/bmm/workflows/1-analysis/research/technical-steps/step-04-architectural-patterns.md +202 -0
  213. package/src/bmm/workflows/1-analysis/research/technical-steps/step-05-implementation-research.md +239 -0
  214. package/src/bmm/workflows/1-analysis/research/technical-steps/step-06-research-synthesis.md +486 -0
  215. package/src/bmm/workflows/1-analysis/research/workflow.md +173 -0
  216. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-01-init.md +135 -0
  217. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-01b-continue.md +127 -0
  218. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-02-discovery.md +190 -0
  219. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-03-core-experience.md +216 -0
  220. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-04-emotional-response.md +219 -0
  221. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-05-inspiration.md +234 -0
  222. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-06-design-system.md +252 -0
  223. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-07-defining-experience.md +254 -0
  224. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-08-visual-foundation.md +224 -0
  225. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-09-design-directions.md +224 -0
  226. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-10-user-journeys.md +241 -0
  227. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-11-component-strategy.md +248 -0
  228. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-12-ux-patterns.md +237 -0
  229. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-13-responsive-accessibility.md +264 -0
  230. package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-14-complete.md +171 -0
  231. package/src/bmm/workflows/2-plan-workflows/create-ux-design/ux-design-template.md +13 -0
  232. package/src/bmm/workflows/2-plan-workflows/create-ux-design/workflow.md +43 -0
  233. package/src/bmm/workflows/2-plan-workflows/prd/data/domain-complexity.csv +13 -0
  234. package/src/bmm/workflows/2-plan-workflows/prd/data/prd-purpose.md +197 -0
  235. package/src/bmm/workflows/2-plan-workflows/prd/data/project-types.csv +11 -0
  236. package/src/bmm/workflows/2-plan-workflows/prd/steps-c/step-01-init.md +191 -0
  237. package/src/bmm/workflows/2-plan-workflows/prd/steps-c/step-01b-continue.md +153 -0
  238. package/src/bmm/workflows/2-plan-workflows/prd/steps-c/step-02-discovery.md +224 -0
  239. package/src/bmm/workflows/2-plan-workflows/prd/steps-c/step-03-success.md +226 -0
  240. package/src/bmm/workflows/2-plan-workflows/prd/steps-c/step-04-journeys.md +213 -0
  241. package/src/bmm/workflows/2-plan-workflows/prd/steps-c/step-05-domain.md +207 -0
  242. package/src/bmm/workflows/2-plan-workflows/prd/steps-c/step-06-innovation.md +226 -0
  243. package/src/bmm/workflows/2-plan-workflows/prd/steps-c/step-07-project-type.md +237 -0
  244. package/src/bmm/workflows/2-plan-workflows/prd/steps-c/step-08-scoping.md +228 -0
  245. package/src/bmm/workflows/2-plan-workflows/prd/steps-c/step-09-functional.md +231 -0
  246. package/src/bmm/workflows/2-plan-workflows/prd/steps-c/step-10-nonfunctional.md +242 -0
  247. package/src/bmm/workflows/2-plan-workflows/prd/steps-c/step-11-polish.md +217 -0
  248. package/src/bmm/workflows/2-plan-workflows/prd/steps-c/step-12-complete.md +124 -0
  249. package/src/bmm/workflows/2-plan-workflows/prd/steps-e/step-e-01-discovery.md +247 -0
  250. package/src/bmm/workflows/2-plan-workflows/prd/steps-e/step-e-01b-legacy-conversion.md +208 -0
  251. package/src/bmm/workflows/2-plan-workflows/prd/steps-e/step-e-02-review.md +249 -0
  252. package/src/bmm/workflows/2-plan-workflows/prd/steps-e/step-e-03-edit.md +253 -0
  253. package/src/bmm/workflows/2-plan-workflows/prd/steps-e/step-e-04-complete.md +168 -0
  254. package/src/bmm/workflows/2-plan-workflows/prd/steps-v/step-v-01-discovery.md +218 -0
  255. package/src/bmm/workflows/2-plan-workflows/prd/steps-v/step-v-02-format-detection.md +191 -0
  256. package/src/bmm/workflows/2-plan-workflows/prd/steps-v/step-v-02b-parity-check.md +209 -0
  257. package/src/bmm/workflows/2-plan-workflows/prd/steps-v/step-v-03-density-validation.md +174 -0
  258. package/src/bmm/workflows/2-plan-workflows/prd/steps-v/step-v-04-brief-coverage-validation.md +214 -0
  259. package/src/bmm/workflows/2-plan-workflows/prd/steps-v/step-v-05-measurability-validation.md +228 -0
  260. package/src/bmm/workflows/2-plan-workflows/prd/steps-v/step-v-06-traceability-validation.md +217 -0
  261. package/src/bmm/workflows/2-plan-workflows/prd/steps-v/step-v-07-implementation-leakage-validation.md +205 -0
  262. package/src/bmm/workflows/2-plan-workflows/prd/steps-v/step-v-08-domain-compliance-validation.md +243 -0
  263. package/src/bmm/workflows/2-plan-workflows/prd/steps-v/step-v-09-project-type-validation.md +263 -0
  264. package/src/bmm/workflows/2-plan-workflows/prd/steps-v/step-v-10-smart-validation.md +209 -0
  265. package/src/bmm/workflows/2-plan-workflows/prd/steps-v/step-v-11-holistic-quality-validation.md +264 -0
  266. package/src/bmm/workflows/2-plan-workflows/prd/steps-v/step-v-12-completeness-validation.md +242 -0
  267. package/src/bmm/workflows/2-plan-workflows/prd/steps-v/step-v-13-report-complete.md +231 -0
  268. package/src/bmm/workflows/2-plan-workflows/prd/templates/prd-template.md +10 -0
  269. package/src/bmm/workflows/2-plan-workflows/prd/validation-report-prd-workflow.md +433 -0
  270. package/src/bmm/workflows/2-plan-workflows/prd/workflow.md +150 -0
  271. package/src/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-01-document-discovery.md +190 -0
  272. package/src/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-02-prd-analysis.md +178 -0
  273. package/src/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-03-epic-coverage-validation.md +179 -0
  274. package/src/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-04-ux-alignment.md +139 -0
  275. package/src/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-05-epic-quality-review.md +252 -0
  276. package/src/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-06-final-assessment.md +135 -0
  277. package/src/bmm/workflows/3-solutioning/check-implementation-readiness/templates/readiness-report-template.md +4 -0
  278. package/src/bmm/workflows/3-solutioning/check-implementation-readiness/workflow.md +55 -0
  279. package/src/bmm/workflows/3-solutioning/create-architecture/architecture-decision-template.md +12 -0
  280. package/src/bmm/workflows/3-solutioning/create-architecture/data/domain-complexity.csv +11 -0
  281. package/src/bmm/workflows/3-solutioning/create-architecture/data/project-types.csv +7 -0
  282. package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-01-init.md +153 -0
  283. package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-01b-continue.md +164 -0
  284. package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-02-context.md +224 -0
  285. package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-03-starter.md +331 -0
  286. package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-04-decisions.md +318 -0
  287. package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-05-patterns.md +359 -0
  288. package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-06-structure.md +379 -0
  289. package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-07-validation.md +359 -0
  290. package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-08-complete.md +76 -0
  291. package/src/bmm/workflows/3-solutioning/create-architecture/workflow.md +50 -0
  292. package/src/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-01-validate-prerequisites.md +259 -0
  293. package/src/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-02-design-epics.md +233 -0
  294. package/src/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-03-create-stories.md +272 -0
  295. package/src/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-04-final-validation.md +149 -0
  296. package/src/bmm/workflows/3-solutioning/create-epics-and-stories/templates/epics-template.md +57 -0
  297. package/src/bmm/workflows/3-solutioning/create-epics-and-stories/workflow.md +59 -0
  298. package/src/bmm/workflows/4-implementation/code-review/checklist.md +23 -0
  299. package/src/bmm/workflows/4-implementation/code-review/instructions.xml +227 -0
  300. package/src/bmm/workflows/4-implementation/code-review/workflow.yaml +51 -0
  301. package/src/bmm/workflows/4-implementation/correct-course/checklist.md +288 -0
  302. package/src/bmm/workflows/4-implementation/correct-course/instructions.md +206 -0
  303. package/src/bmm/workflows/4-implementation/correct-course/workflow.yaml +60 -0
  304. package/src/bmm/workflows/4-implementation/create-story/checklist.md +358 -0
  305. package/src/bmm/workflows/4-implementation/create-story/instructions.xml +345 -0
  306. package/src/bmm/workflows/4-implementation/create-story/template.md +49 -0
  307. package/src/bmm/workflows/4-implementation/create-story/workflow.yaml +61 -0
  308. package/src/bmm/workflows/4-implementation/dev-story/checklist.md +80 -0
  309. package/src/bmm/workflows/4-implementation/dev-story/instructions.xml +410 -0
  310. package/src/bmm/workflows/4-implementation/dev-story/workflow.yaml +27 -0
  311. package/src/bmm/workflows/4-implementation/retrospective/instructions.md +1443 -0
  312. package/src/bmm/workflows/4-implementation/retrospective/workflow.yaml +58 -0
  313. package/src/bmm/workflows/4-implementation/sprint-planning/checklist.md +33 -0
  314. package/src/bmm/workflows/4-implementation/sprint-planning/instructions.md +225 -0
  315. package/src/bmm/workflows/4-implementation/sprint-planning/sprint-status-template.yaml +55 -0
  316. package/src/bmm/workflows/4-implementation/sprint-planning/workflow.yaml +54 -0
  317. package/src/bmm/workflows/4-implementation/sprint-status/instructions.md +229 -0
  318. package/src/bmm/workflows/4-implementation/sprint-status/workflow.yaml +36 -0
  319. package/src/bmm/workflows/bmad-quick-flow/quick-dev/data/project-levels.yaml +59 -0
  320. package/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-01-mode-detection.md +156 -0
  321. package/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-02-context-gathering.md +120 -0
  322. package/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-03-execute.md +113 -0
  323. package/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-04-self-check.md +113 -0
  324. package/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-05-adversarial-review.md +106 -0
  325. package/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-06-resolve-findings.md +140 -0
  326. package/src/bmm/workflows/bmad-quick-flow/quick-dev/workflow.md +50 -0
  327. package/src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-01-understand.md +189 -0
  328. package/src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-02-investigate.md +144 -0
  329. package/src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-03-generate.md +128 -0
  330. package/src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-04-review.md +191 -0
  331. package/src/bmm/workflows/bmad-quick-flow/quick-spec/tech-spec-template.md +74 -0
  332. package/src/bmm/workflows/bmad-quick-flow/quick-spec/workflow.md +79 -0
  333. package/src/bmm/workflows/document-project/checklist.md +245 -0
  334. package/src/bmm/workflows/document-project/documentation-requirements.csv +12 -0
  335. package/src/bmm/workflows/document-project/instructions.md +221 -0
  336. package/src/bmm/workflows/document-project/templates/deep-dive-template.md +345 -0
  337. package/src/bmm/workflows/document-project/templates/index-template.md +169 -0
  338. package/src/bmm/workflows/document-project/templates/project-overview-template.md +103 -0
  339. package/src/bmm/workflows/document-project/templates/project-scan-report-schema.json +160 -0
  340. package/src/bmm/workflows/document-project/templates/source-tree-template.md +135 -0
  341. package/src/bmm/workflows/document-project/workflow.yaml +30 -0
  342. package/src/bmm/workflows/document-project/workflows/deep-dive-instructions.md +298 -0
  343. package/src/bmm/workflows/document-project/workflows/deep-dive.yaml +31 -0
  344. package/src/bmm/workflows/document-project/workflows/full-scan-instructions.md +1106 -0
  345. package/src/bmm/workflows/document-project/workflows/full-scan.yaml +31 -0
  346. package/src/bmm/workflows/excalidraw-diagrams/_shared/excalidraw-library.json +90 -0
  347. package/src/bmm/workflows/excalidraw-diagrams/_shared/excalidraw-templates.yaml +127 -0
  348. package/src/bmm/workflows/excalidraw-diagrams/create-dataflow/checklist.md +39 -0
  349. package/src/bmm/workflows/excalidraw-diagrams/create-dataflow/instructions.md +130 -0
  350. package/src/bmm/workflows/excalidraw-diagrams/create-dataflow/workflow.yaml +27 -0
  351. package/src/bmm/workflows/excalidraw-diagrams/create-diagram/checklist.md +43 -0
  352. package/src/bmm/workflows/excalidraw-diagrams/create-diagram/instructions.md +141 -0
  353. package/src/bmm/workflows/excalidraw-diagrams/create-diagram/workflow.yaml +27 -0
  354. package/src/bmm/workflows/excalidraw-diagrams/create-flowchart/checklist.md +49 -0
  355. package/src/bmm/workflows/excalidraw-diagrams/create-flowchart/instructions.md +241 -0
  356. package/src/bmm/workflows/excalidraw-diagrams/create-flowchart/workflow.yaml +27 -0
  357. package/src/bmm/workflows/excalidraw-diagrams/create-wireframe/checklist.md +38 -0
  358. package/src/bmm/workflows/excalidraw-diagrams/create-wireframe/instructions.md +133 -0
  359. package/src/bmm/workflows/excalidraw-diagrams/create-wireframe/workflow.yaml +27 -0
  360. package/src/bmm/workflows/testarch/atdd/atdd-checklist-template.md +363 -0
  361. package/src/bmm/workflows/testarch/atdd/checklist.md +374 -0
  362. package/src/bmm/workflows/testarch/atdd/instructions.md +806 -0
  363. package/src/bmm/workflows/testarch/atdd/workflow.yaml +47 -0
  364. package/src/bmm/workflows/testarch/automate/checklist.md +582 -0
  365. package/src/bmm/workflows/testarch/automate/instructions.md +1324 -0
  366. package/src/bmm/workflows/testarch/automate/workflow.yaml +54 -0
  367. package/src/bmm/workflows/testarch/ci/checklist.md +247 -0
  368. package/src/bmm/workflows/testarch/ci/github-actions-template.yaml +198 -0
  369. package/src/bmm/workflows/testarch/ci/gitlab-ci-template.yaml +149 -0
  370. package/src/bmm/workflows/testarch/ci/instructions.md +536 -0
  371. package/src/bmm/workflows/testarch/ci/workflow.yaml +47 -0
  372. package/src/bmm/workflows/testarch/framework/checklist.md +320 -0
  373. package/src/bmm/workflows/testarch/framework/instructions.md +481 -0
  374. package/src/bmm/workflows/testarch/framework/workflow.yaml +49 -0
  375. package/src/bmm/workflows/testarch/nfr-assess/checklist.md +407 -0
  376. package/src/bmm/workflows/testarch/nfr-assess/instructions.md +726 -0
  377. package/src/bmm/workflows/testarch/nfr-assess/nfr-report-template.md +461 -0
  378. package/src/bmm/workflows/testarch/nfr-assess/workflow.yaml +49 -0
  379. package/src/bmm/workflows/testarch/test-design/checklist.md +407 -0
  380. package/src/bmm/workflows/testarch/test-design/instructions.md +1158 -0
  381. package/src/bmm/workflows/testarch/test-design/test-design-architecture-template.md +213 -0
  382. package/src/bmm/workflows/testarch/test-design/test-design-qa-template.md +286 -0
  383. package/src/bmm/workflows/testarch/test-design/test-design-template.md +294 -0
  384. package/src/bmm/workflows/testarch/test-design/workflow.yaml +71 -0
  385. package/src/bmm/workflows/testarch/test-review/checklist.md +472 -0
  386. package/src/bmm/workflows/testarch/test-review/instructions.md +628 -0
  387. package/src/bmm/workflows/testarch/test-review/test-review-template.md +390 -0
  388. package/src/bmm/workflows/testarch/test-review/workflow.yaml +48 -0
  389. package/src/bmm/workflows/testarch/trace/checklist.md +642 -0
  390. package/src/bmm/workflows/testarch/trace/instructions.md +1030 -0
  391. package/src/bmm/workflows/testarch/trace/trace-template.md +675 -0
  392. package/src/bmm/workflows/testarch/trace/workflow.yaml +57 -0
  393. package/src/core/_module-installer/installer.js +60 -0
  394. package/src/core/agents/bmad-master.agent.yaml +29 -0
  395. package/src/core/module-help.csv +9 -0
  396. package/src/core/module.yaml +25 -0
  397. package/src/core/resources/excalidraw/README.md +160 -0
  398. package/src/core/resources/excalidraw/excalidraw-helpers.md +127 -0
  399. package/src/core/resources/excalidraw/library-loader.md +50 -0
  400. package/src/core/resources/excalidraw/validate-json-instructions.md +79 -0
  401. package/src/core/tasks/editorial-review-prose.xml +100 -0
  402. package/src/core/tasks/editorial-review-structure.xml +209 -0
  403. package/src/core/tasks/help.md +62 -0
  404. package/src/core/tasks/index-docs.xml +65 -0
  405. package/src/core/tasks/review-adversarial-general.xml +48 -0
  406. package/src/core/tasks/shard-doc.xml +109 -0
  407. package/src/core/tasks/workflow.xml +235 -0
  408. package/src/core/workflows/advanced-elicitation/methods.csv +51 -0
  409. package/src/core/workflows/advanced-elicitation/workflow.xml +117 -0
  410. package/src/core/workflows/brainstorming/brain-methods.csv +62 -0
  411. package/src/core/workflows/brainstorming/steps/step-01-session-setup.md +197 -0
  412. package/src/core/workflows/brainstorming/steps/step-01b-continue.md +122 -0
  413. package/src/core/workflows/brainstorming/steps/step-02a-user-selected.md +225 -0
  414. package/src/core/workflows/brainstorming/steps/step-02b-ai-recommended.md +237 -0
  415. package/src/core/workflows/brainstorming/steps/step-02c-random-selection.md +209 -0
  416. package/src/core/workflows/brainstorming/steps/step-02d-progressive-flow.md +264 -0
  417. package/src/core/workflows/brainstorming/steps/step-03-technique-execution.md +399 -0
  418. package/src/core/workflows/brainstorming/steps/step-04-idea-organization.md +303 -0
  419. package/src/core/workflows/brainstorming/template.md +15 -0
  420. package/src/core/workflows/brainstorming/workflow.md +58 -0
  421. package/src/core/workflows/party-mode/steps/step-01-agent-loading.md +138 -0
  422. package/src/core/workflows/party-mode/steps/step-02-discussion-orchestration.md +187 -0
  423. package/src/core/workflows/party-mode/steps/step-03-graceful-exit.md +157 -0
  424. package/src/core/workflows/party-mode/workflow.md +194 -0
  425. package/src/utility/agent-components/activation-rules.txt +6 -0
  426. package/src/utility/agent-components/activation-steps.txt +14 -0
  427. package/src/utility/agent-components/agent-command-header.md +1 -0
  428. package/src/utility/agent-components/agent.customize.template.yaml +41 -0
  429. package/src/utility/agent-components/handler-action.txt +4 -0
  430. package/src/utility/agent-components/handler-data.txt +5 -0
  431. package/src/utility/agent-components/handler-exec.txt +6 -0
  432. package/src/utility/agent-components/handler-multi.txt +14 -0
  433. package/src/utility/agent-components/handler-tmpl.txt +5 -0
  434. package/src/utility/agent-components/handler-validate-workflow.txt +7 -0
  435. package/src/utility/agent-components/handler-workflow.txt +10 -0
  436. package/src/utility/agent-components/menu-handlers.txt +6 -0
  437. package/test/README.md +295 -0
  438. package/test/adversarial-review-tests/README.md +56 -0
  439. package/test/adversarial-review-tests/sample-content.md +46 -0
  440. package/test/adversarial-review-tests/test-cases.yaml +103 -0
  441. package/test/fixtures/agent-schema/invalid/critical-actions/actions-as-string.agent.yaml +27 -0
  442. package/test/fixtures/agent-schema/invalid/critical-actions/empty-string-in-actions.agent.yaml +30 -0
  443. package/test/fixtures/agent-schema/invalid/menu/empty-menu.agent.yaml +22 -0
  444. package/test/fixtures/agent-schema/invalid/menu/missing-menu.agent.yaml +20 -0
  445. package/test/fixtures/agent-schema/invalid/menu-commands/empty-command-target.agent.yaml +25 -0
  446. package/test/fixtures/agent-schema/invalid/menu-commands/no-command-target.agent.yaml +24 -0
  447. package/test/fixtures/agent-schema/invalid/menu-triggers/camel-case.agent.yaml +25 -0
  448. package/test/fixtures/agent-schema/invalid/menu-triggers/compound-invalid-format.agent.yaml +25 -0
  449. package/test/fixtures/agent-schema/invalid/menu-triggers/compound-mismatched-kebab.agent.yaml +25 -0
  450. package/test/fixtures/agent-schema/invalid/menu-triggers/duplicate-triggers.agent.yaml +31 -0
  451. package/test/fixtures/agent-schema/invalid/menu-triggers/empty-trigger.agent.yaml +25 -0
  452. package/test/fixtures/agent-schema/invalid/menu-triggers/leading-asterisk.agent.yaml +25 -0
  453. package/test/fixtures/agent-schema/invalid/menu-triggers/snake-case.agent.yaml +25 -0
  454. package/test/fixtures/agent-schema/invalid/menu-triggers/trigger-with-spaces.agent.yaml +25 -0
  455. package/test/fixtures/agent-schema/invalid/metadata/empty-module-string.agent.yaml +26 -0
  456. package/test/fixtures/agent-schema/invalid/metadata/empty-name.agent.yaml +24 -0
  457. package/test/fixtures/agent-schema/invalid/metadata/extra-metadata-fields.agent.yaml +27 -0
  458. package/test/fixtures/agent-schema/invalid/metadata/missing-id.agent.yaml +23 -0
  459. package/test/fixtures/agent-schema/invalid/persona/empty-principles-array.agent.yaml +24 -0
  460. package/test/fixtures/agent-schema/invalid/persona/empty-string-in-principles.agent.yaml +27 -0
  461. package/test/fixtures/agent-schema/invalid/persona/extra-persona-fields.agent.yaml +27 -0
  462. package/test/fixtures/agent-schema/invalid/persona/missing-role.agent.yaml +24 -0
  463. package/test/fixtures/agent-schema/invalid/prompts/empty-content.agent.yaml +29 -0
  464. package/test/fixtures/agent-schema/invalid/prompts/extra-prompt-fields.agent.yaml +31 -0
  465. package/test/fixtures/agent-schema/invalid/prompts/missing-content.agent.yaml +28 -0
  466. package/test/fixtures/agent-schema/invalid/prompts/missing-id.agent.yaml +28 -0
  467. package/test/fixtures/agent-schema/invalid/top-level/empty-file.agent.yaml +5 -0
  468. package/test/fixtures/agent-schema/invalid/top-level/extra-top-level-keys.agent.yaml +28 -0
  469. package/test/fixtures/agent-schema/invalid/top-level/missing-agent-key.agent.yaml +11 -0
  470. package/test/fixtures/agent-schema/invalid/yaml-errors/invalid-indentation.agent.yaml +19 -0
  471. package/test/fixtures/agent-schema/invalid/yaml-errors/malformed-yaml.agent.yaml +18 -0
  472. package/test/fixtures/agent-schema/valid/critical-actions/empty-critical-actions.agent.yaml +24 -0
  473. package/test/fixtures/agent-schema/valid/critical-actions/no-critical-actions.agent.yaml +22 -0
  474. package/test/fixtures/agent-schema/valid/critical-actions/valid-critical-actions.agent.yaml +27 -0
  475. package/test/fixtures/agent-schema/valid/menu/multiple-menu-items.agent.yaml +31 -0
  476. package/test/fixtures/agent-schema/valid/menu/single-menu-item.agent.yaml +22 -0
  477. package/test/fixtures/agent-schema/valid/menu-commands/all-command-types.agent.yaml +38 -0
  478. package/test/fixtures/agent-schema/valid/menu-commands/multiple-commands.agent.yaml +24 -0
  479. package/test/fixtures/agent-schema/valid/menu-triggers/compound-triggers.agent.yaml +31 -0
  480. package/test/fixtures/agent-schema/valid/menu-triggers/kebab-case-triggers.agent.yaml +34 -0
  481. package/test/fixtures/agent-schema/valid/metadata/core-agent-with-module.agent.yaml +24 -0
  482. package/test/fixtures/agent-schema/valid/metadata/empty-module-name-in-path.agent.yaml +24 -0
  483. package/test/fixtures/agent-schema/valid/metadata/malformed-path-treated-as-core.agent.yaml +24 -0
  484. package/test/fixtures/agent-schema/valid/metadata/module-agent-correct.agent.yaml +24 -0
  485. package/test/fixtures/agent-schema/valid/metadata/module-agent-missing-module.agent.yaml +23 -0
  486. package/test/fixtures/agent-schema/valid/metadata/wrong-module-value.agent.yaml +24 -0
  487. package/test/fixtures/agent-schema/valid/persona/complete-persona.agent.yaml +24 -0
  488. package/test/fixtures/agent-schema/valid/prompts/empty-prompts.agent.yaml +24 -0
  489. package/test/fixtures/agent-schema/valid/prompts/no-prompts.agent.yaml +22 -0
  490. package/test/fixtures/agent-schema/valid/prompts/valid-prompts-minimal.agent.yaml +28 -0
  491. package/test/fixtures/agent-schema/valid/prompts/valid-prompts-with-description.agent.yaml +30 -0
  492. package/test/fixtures/agent-schema/valid/top-level/minimal-core-agent.agent.yaml +24 -0
  493. package/test/test-agent-schema.js +387 -0
  494. package/test/test-cli-integration.sh +159 -0
  495. package/test/test-installation-components.js +214 -0
  496. package/test/unit-test-schema.js +133 -0
  497. package/tools/bmad-npx-wrapper.js +38 -0
  498. package/tools/build-docs.js +577 -0
  499. package/tools/cli/README.md +7 -0
  500. package/tools/cli/bmad-cli.js +58 -0
  501. package/tools/cli/commands/install.js +87 -0
  502. package/tools/cli/commands/status.js +65 -0
  503. package/tools/cli/external-official-modules.yaml +56 -0
  504. package/tools/cli/installers/install-messages.yaml +58 -0
  505. package/tools/cli/installers/lib/core/config-collector.js +1079 -0
  506. package/tools/cli/installers/lib/core/custom-module-cache.js +259 -0
  507. package/tools/cli/installers/lib/core/dependency-resolver.js +739 -0
  508. package/tools/cli/installers/lib/core/detector.js +223 -0
  509. package/tools/cli/installers/lib/core/ide-config-manager.js +156 -0
  510. package/tools/cli/installers/lib/core/installer.js +2826 -0
  511. package/tools/cli/installers/lib/core/manifest-generator.js +1054 -0
  512. package/tools/cli/installers/lib/core/manifest.js +1036 -0
  513. package/tools/cli/installers/lib/custom/handler.js +363 -0
  514. package/tools/cli/installers/lib/ide/STANDARDIZATION_PLAN.md +208 -0
  515. package/tools/cli/installers/lib/ide/_base-ide.js +655 -0
  516. package/tools/cli/installers/lib/ide/antigravity.js +474 -0
  517. package/tools/cli/installers/lib/ide/auggie.js +244 -0
  518. package/tools/cli/installers/lib/ide/claude-code.js +506 -0
  519. package/tools/cli/installers/lib/ide/cline.js +272 -0
  520. package/tools/cli/installers/lib/ide/codex.js +412 -0
  521. package/tools/cli/installers/lib/ide/crush.js +149 -0
  522. package/tools/cli/installers/lib/ide/cursor.js +160 -0
  523. package/tools/cli/installers/lib/ide/gemini.js +301 -0
  524. package/tools/cli/installers/lib/ide/github-copilot.js +383 -0
  525. package/tools/cli/installers/lib/ide/iflow.js +191 -0
  526. package/tools/cli/installers/lib/ide/kilo.js +250 -0
  527. package/tools/cli/installers/lib/ide/kiro-cli.js +326 -0
  528. package/tools/cli/installers/lib/ide/manager.js +244 -0
  529. package/tools/cli/installers/lib/ide/opencode.js +257 -0
  530. package/tools/cli/installers/lib/ide/qwen.js +372 -0
  531. package/tools/cli/installers/lib/ide/roo.js +273 -0
  532. package/tools/cli/installers/lib/ide/rovo-dev.js +290 -0
  533. package/tools/cli/installers/lib/ide/shared/agent-command-generator.js +165 -0
  534. package/tools/cli/installers/lib/ide/shared/bmad-artifacts.js +158 -0
  535. package/tools/cli/installers/lib/ide/shared/module-injections.js +136 -0
  536. package/tools/cli/installers/lib/ide/shared/path-utils.js +165 -0
  537. package/tools/cli/installers/lib/ide/shared/task-tool-command-generator.js +268 -0
  538. package/tools/cli/installers/lib/ide/shared/workflow-command-generator.js +293 -0
  539. package/tools/cli/installers/lib/ide/templates/agent-command-template.md +14 -0
  540. package/tools/cli/installers/lib/ide/templates/gemini-agent-command.toml +14 -0
  541. package/tools/cli/installers/lib/ide/templates/gemini-task-command.toml +12 -0
  542. package/tools/cli/installers/lib/ide/templates/workflow-command-template.md +13 -0
  543. package/tools/cli/installers/lib/ide/templates/workflow-commander.md +5 -0
  544. package/tools/cli/installers/lib/ide/trae.js +313 -0
  545. package/tools/cli/installers/lib/ide/windsurf.js +258 -0
  546. package/tools/cli/installers/lib/message-loader.js +85 -0
  547. package/tools/cli/installers/lib/modules/external-manager.js +135 -0
  548. package/tools/cli/installers/lib/modules/manager.js +1375 -0
  549. package/tools/cli/lib/activation-builder.js +163 -0
  550. package/tools/cli/lib/agent/compiler.js +522 -0
  551. package/tools/cli/lib/agent/installer.js +716 -0
  552. package/tools/cli/lib/agent/template-engine.js +152 -0
  553. package/tools/cli/lib/agent-analyzer.js +109 -0
  554. package/tools/cli/lib/agent-party-generator.js +194 -0
  555. package/tools/cli/lib/cli-utils.js +227 -0
  556. package/tools/cli/lib/config.js +213 -0
  557. package/tools/cli/lib/file-ops.js +204 -0
  558. package/tools/cli/lib/platform-codes.js +116 -0
  559. package/tools/cli/lib/project-root.js +77 -0
  560. package/tools/cli/lib/prompts.js +433 -0
  561. package/tools/cli/lib/ui.js +1716 -0
  562. package/tools/cli/lib/xml-handler.js +177 -0
  563. package/tools/cli/lib/xml-to-markdown.js +82 -0
  564. package/tools/cli/lib/yaml-format.js +245 -0
  565. package/tools/cli/lib/yaml-xml-builder.js +587 -0
  566. package/tools/docs/BUNDLE_DISTRIBUTION_SETUP.md +95 -0
  567. package/tools/docs/index.md +2 -0
  568. package/tools/fix-doc-links.js +288 -0
  569. package/tools/flattener/aggregate.js +76 -0
  570. package/tools/flattener/binary.js +80 -0
  571. package/tools/flattener/discovery.js +71 -0
  572. package/tools/flattener/files.js +35 -0
  573. package/tools/flattener/ignoreRules.js +172 -0
  574. package/tools/flattener/main.js +483 -0
  575. package/tools/flattener/projectRoot.js +201 -0
  576. package/tools/flattener/prompts.js +44 -0
  577. package/tools/flattener/stats.helpers.js +368 -0
  578. package/tools/flattener/stats.js +75 -0
  579. package/tools/flattener/test-matrix.js +409 -0
  580. package/tools/flattener/xml.js +82 -0
  581. package/tools/format-workflow-md.js +263 -0
  582. package/tools/lib/xml-utils.js +13 -0
  583. package/tools/maintainer/review-pr-README.md +55 -0
  584. package/tools/maintainer/review-pr.md +242 -0
  585. package/tools/migrate-custom-module-paths.js +124 -0
  586. package/tools/platform-codes.yaml +157 -0
  587. package/tools/schema/agent.js +491 -0
  588. package/tools/validate-agent-schema.js +110 -0
  589. package/tools/validate-doc-links.js +363 -0
  590. package/tools/validate-svg-changes.sh +356 -0
  591. package/website/README.md +76 -0
  592. package/website/astro.config.mjs +228 -0
  593. package/website/public/favicon.ico +0 -0
  594. package/website/public/img/bmad-dark.png +0 -0
  595. package/website/public/img/bmad-light.png +0 -0
  596. package/website/public/img/logo.svg +4 -0
  597. package/website/public/robots.txt +37 -0
  598. package/website/src/components/Banner.astro +59 -0
  599. package/website/src/components/Header.astro +121 -0
  600. package/website/src/components/MobileMenuFooter.astro +53 -0
  601. package/website/src/content/config.ts +6 -0
  602. package/website/src/lib/site-url.js +25 -0
  603. package/website/src/rehype-markdown-links.js +102 -0
  604. package/website/src/styles/custom.css +485 -0
@@ -0,0 +1,1158 @@
1
+ <!-- Powered by BMAD-CORE™ -->
2
+
3
+ # Test Design and Risk Assessment
4
+
5
+ **Workflow ID**: `_bmad/bmm/testarch/test-design`
6
+ **Version**: 4.0 (BMad v6)
7
+
8
+ ---
9
+
10
+ ## Overview
11
+
12
+ Plans comprehensive test coverage strategy with risk assessment, priority classification, and execution ordering. This workflow operates in **two modes**:
13
+
14
+ - **System-Level Mode (Phase 3)**: Testability review of architecture before solutioning gate check
15
+ - **Epic-Level Mode (Phase 4)**: Per-epic test planning with risk assessment (current behavior)
16
+
17
+ The workflow auto-detects which mode to use based on project phase.
18
+
19
+ ---
20
+
21
+ ## Preflight: Detect Mode and Load Context
22
+
23
+ **Critical:** Determine mode before proceeding.
24
+
25
+ ### Mode Detection (Flexible for Standalone Use)
26
+
27
+ TEA test-design workflow supports TWO modes, detected automatically:
28
+
29
+ 1. **Check User Intent Explicitly (Priority 1)**
30
+
31
+ **Deterministic Rules:**
32
+ - User provided **PRD+ADR only** (no Epic+Stories) → **System-Level Mode**
33
+ - User provided **Epic+Stories only** (no PRD+ADR) → **Epic-Level Mode**
34
+ - User provided **BOTH PRD+ADR AND Epic+Stories** → **Prefer System-Level Mode** (architecture review comes first in Phase 3, then epic planning in Phase 4). If mode preference is unclear, ask user: "Should I create (A) System-level test design (PRD + ADR → Architecture doc + QA doc) or (B) Epic-level test design (Epic → Single test plan)?"
35
+ - If user intent is clear from context, use that mode regardless of file structure
36
+
37
+ 2. **Fallback to File-Based Detection (Priority 2 - BMad-Integrated)**
38
+ - Check for `{implementation_artifacts}/sprint-status.yaml`
39
+ - If exists → **Epic-Level Mode** (Phase 4, single document output)
40
+ - If NOT exists → **System-Level Mode** (Phase 3, TWO document outputs)
41
+
42
+ 3. **If Ambiguous, ASK USER (Priority 3)**
43
+ - "I see you have [PRD/ADR/Epic/Stories]. Should I create:
44
+ - (A) System-level test design (PRD + ADR → Architecture doc + QA doc)?
45
+ - (B) Epic-level test design (Epic → Single test plan)?"
46
+
47
+ **Mode Descriptions:**
48
+
49
+ **System-Level Mode (PRD + ADR Input)**
50
+ - **When to use:** Early in project (Phase 3 Solutioning), architecture being designed
51
+ - **Input:** PRD, ADR, architecture.md (optional)
52
+ - **Output:** TWO documents
53
+ - `test-design-architecture.md` (for Architecture/Dev teams)
54
+ - `test-design-qa.md` (for QA team)
55
+ - **Focus:** Testability assessment, ASRs, NFR requirements, Sprint 0 setup
56
+
57
+ **Epic-Level Mode (Epic + Stories Input)**
58
+ - **When to use:** During implementation (Phase 4), per-epic planning
59
+ - **Input:** Epic, Stories, tech-specs (optional)
60
+ - **Output:** ONE document
61
+ - `test-design-epic-{N}.md` (combined risk assessment + test plan)
62
+ - **Focus:** Risk assessment, coverage plan, execution order, quality gates
63
+
64
+ **Key Insight: TEA Works Standalone OR Integrated**
65
+
66
+ **Standalone (No BMad artifacts):**
67
+ - User provides PRD + ADR → System-Level Mode
68
+ - User provides Epic description → Epic-Level Mode
69
+ - TEA doesn't mandate full BMad workflow
70
+
71
+ **BMad-Integrated (Full workflow):**
72
+ - BMad creates `sprint-status.yaml` → Automatic Epic-Level detection
73
+ - BMad creates PRD, ADR, architecture.md → Automatic System-Level detection
74
+ - TEA leverages BMad artifacts for richer context
75
+
76
+ **Message to User:**
77
+ > You don't need to follow full BMad methodology to use TEA test-design.
78
+ > Just provide PRD + ADR for system-level, or Epic for epic-level.
79
+ > TEA will auto-detect and produce appropriate documents.
80
+
81
+ **Halt Condition:** If mode cannot be determined AND user intent unclear AND required files missing, HALT and notify user:
82
+ - "Please provide either: (A) PRD + ADR for system-level test design, OR (B) Epic + Stories for epic-level test design"
83
+
84
+ ---
85
+
86
+ ## Step 1: Load Context (Mode-Aware)
87
+
88
+ **Mode-Specific Loading:**
89
+
90
+ ### System-Level Mode (Phase 3)
91
+
92
+ 1. **Read Architecture Documentation**
93
+ - Load architecture.md or tech-spec (REQUIRED)
94
+ - Load PRD.md for functional and non-functional requirements
95
+ - Load epics.md for feature scope
96
+ - Identify technology stack decisions (frameworks, databases, deployment targets)
97
+ - Note integration points and external system dependencies
98
+ - Extract NFR requirements (performance SLOs, security requirements, etc.)
99
+
100
+ 2. **Check Playwright Utils Flag**
101
+
102
+ Read `{config_source}` and check `config.tea_use_playwright_utils`.
103
+
104
+ If true, note that `@seontechnologies/playwright-utils` provides utilities for test implementation. Reference in test design where relevant.
105
+
106
+ 3. **Load Knowledge Base Fragments (System-Level)**
107
+
108
+ **Critical:** Consult `src/bmm/testarch/tea-index.csv` to load:
109
+ - `adr-quality-readiness-checklist.md` - 8-category 29-criteria NFR framework (testability, security, scalability, DR, QoS, deployability, etc.)
110
+ - `test-levels-framework.md` - Test levels strategy guidance
111
+ - `risk-governance.md` - Testability risk identification
112
+ - `test-quality.md` - Quality standards and Definition of Done
113
+
114
+ 4. **Analyze Existing Test Setup (if brownfield)**
115
+ - Search for existing test directories
116
+ - Identify current test framework (if any)
117
+ - Note testability concerns in existing codebase
118
+
119
+ ### Epic-Level Mode (Phase 4)
120
+
121
+ 1. **Read Requirements Documentation**
122
+ - Load PRD.md for high-level product requirements
123
+ - Read epics.md or specific epic for feature scope
124
+ - Read story markdown for detailed acceptance criteria
125
+ - Identify all testable requirements
126
+
127
+ 2. **Load Architecture Context**
128
+ - Read architecture.md for system design
129
+ - Read tech-spec for implementation details
130
+ - Read test-design-architecture.md and test-design-qa.md (if exist from Phase 3 system-level test design)
131
+ - Identify technical constraints and dependencies
132
+ - Note integration points and external systems
133
+
134
+ 3. **Analyze Existing Test Coverage**
135
+ - Search for existing test files in `{test_dir}`
136
+ - Identify coverage gaps
137
+ - Note areas with insufficient testing
138
+ - Check for flaky or outdated tests
139
+
140
+ 4. **Load Knowledge Base Fragments (Epic-Level)**
141
+
142
+ **Critical:** Consult `src/bmm/testarch/tea-index.csv` to load:
143
+ - `risk-governance.md` - Risk classification framework (6 categories: TECH, SEC, PERF, DATA, BUS, OPS), automated scoring, gate decision engine, owner tracking (625 lines, 4 examples)
144
+ - `probability-impact.md` - Risk scoring methodology (probability × impact matrix, automated classification, dynamic re-assessment, gate integration, 604 lines, 4 examples)
145
+ - `test-levels-framework.md` - Test level selection guidance (E2E vs API vs Component vs Unit with decision matrix, characteristics, when to use each, 467 lines, 4 examples)
146
+ - `test-priorities-matrix.md` - P0-P3 prioritization criteria (automated priority calculation, risk-based mapping, tagging strategy, time budgets, 389 lines, 2 examples)
147
+
148
+ **Halt Condition (Epic-Level only):** If story data or acceptance criteria are missing, check if brownfield exploration is needed. If neither requirements NOR exploration possible, HALT with message: "Epic-level test design requires clear requirements, acceptance criteria, or brownfield app URL for exploration"
149
+
150
+ ---
151
+
152
+ ## Step 1.5: System-Level Testability Review (Phase 3 Only)
153
+
154
+ **Skip this step if Epic-Level Mode.** This step only executes in System-Level Mode.
155
+
156
+ ### Actions
157
+
158
+ 1. **Review Architecture for Testability**
159
+
160
+ **STRUCTURE PRINCIPLE: CONCERNS FIRST, PASSING ITEMS LAST**
161
+
162
+ Evaluate architecture against these criteria and structure output as:
163
+ 1. **Testability Concerns** (ACTIONABLE - what's broken/missing)
164
+ 2. **Testability Assessment Summary** (FYI - what works well)
165
+
166
+ **Testability Criteria:**
167
+
168
+ **Controllability:**
169
+ - Can we control system state for testing? (API seeding, factories, database reset)
170
+ - Are external dependencies mockable? (interfaces, dependency injection)
171
+ - Can we trigger error conditions? (chaos engineering, fault injection)
172
+
173
+ **Observability:**
174
+ - Can we inspect system state? (logging, metrics, traces)
175
+ - Are test results deterministic? (no race conditions, clear success/failure)
176
+ - Can we validate NFRs? (performance metrics, security audit logs)
177
+
178
+ **Reliability:**
179
+ - Are tests isolated? (parallel-safe, stateless, cleanup discipline)
180
+ - Can we reproduce failures? (deterministic waits, HAR capture, seed data)
181
+ - Are components loosely coupled? (mockable, testable boundaries)
182
+
183
+ **In Architecture Doc Output:**
184
+ - **Section A: Testability Concerns** (TOP) - List what's BROKEN or MISSING
185
+ - Example: "No API for test data seeding → Cannot parallelize tests"
186
+ - Example: "Hardcoded DB connection → Cannot test in CI"
187
+ - **Section B: Testability Assessment Summary** (BOTTOM) - List what PASSES
188
+ - Example: "✅ API-first design supports test isolation"
189
+ - Only include if worth mentioning; otherwise omit this section entirely
190
+
191
+ 2. **Identify Architecturally Significant Requirements (ASRs)**
192
+
193
+ **CRITICAL: ASRs must indicate if ACTIONABLE or FYI**
194
+
195
+ From PRD NFRs and architecture decisions, identify quality requirements that:
196
+ - Drive architecture decisions (e.g., "Must handle 10K concurrent users" → caching architecture)
197
+ - Pose testability challenges (e.g., "Sub-second response time" → performance test infrastructure)
198
+ - Require special test environments (e.g., "Multi-region deployment" → regional test instances)
199
+
200
+ Score each ASR using risk matrix (probability × impact).
201
+
202
+ **In Architecture Doc, categorize ASRs:**
203
+ - **ACTIONABLE ASRs** (require architecture changes): Include in "Quick Guide" 🚨 or ⚠️ sections
204
+ - **FYI ASRs** (already satisfied by architecture): Include in "Quick Guide" 📋 section OR omit if obvious
205
+
206
+ **Example:**
207
+ - ASR-001 (Score 9): "Multi-region deployment requires region-specific test infrastructure" → **ACTIONABLE** (goes in 🚨 BLOCKERS)
208
+ - ASR-002 (Score 4): "OAuth 2.1 authentication already implemented in ADR-5" → **FYI** (goes in 📋 INFO ONLY or omit)
209
+
210
+ **Structure Principle:** Actionable ASRs at TOP, FYI ASRs at BOTTOM (or omit)
211
+
212
+ 3. **Define Test Levels Strategy**
213
+
214
+ **IMPORTANT: This section goes in QA doc ONLY, NOT in Architecture doc**
215
+
216
+ Based on architecture (mobile, web, API, microservices, monolith):
217
+ - Recommend unit/integration/E2E split (e.g., 70/20/10 for API-heavy, 40/30/30 for UI-heavy)
218
+ - Identify test environment needs (local, staging, ephemeral, production-like)
219
+ - Define testing approach per technology (Playwright for web, Maestro for mobile, k6 for performance)
220
+
221
+ **In Architecture doc:** Only mention test level split if it's an ACTIONABLE concern
222
+ - Example: "API response time <100ms requires load testing infrastructure" (concern)
223
+ - DO NOT include full test level strategy table in Architecture doc
224
+
225
+ 4. **Assess NFR Requirements (MINIMAL in Architecture Doc)**
226
+
227
+ **CRITICAL: NFR testing approach is a RECIPE - belongs in QA doc ONLY**
228
+
229
+ **In Architecture Doc:**
230
+ - Only mention NFRs if they create testability CONCERNS
231
+ - Focus on WHAT architecture must provide, not HOW to test
232
+ - Keep it brief - 1-2 sentences per NFR category at most
233
+
234
+ **Example - Security NFR in Architecture doc (if there's a concern):**
235
+ ✅ CORRECT (concern-focused, brief, WHAT/WHY only):
236
+ - "System must prevent cross-customer data access (GDPR requirement). Requires test infrastructure for multi-tenant isolation in Sprint 0."
237
+ - "OAuth tokens must expire after 1 hour (ADR-5). Requires test harness for token expiration validation."
238
+
239
+ ❌ INCORRECT (too detailed, belongs in QA doc):
240
+ - Full table of security test scenarios
241
+ - Test scripts with code examples
242
+ - Detailed test procedures
243
+ - Tool selection (e.g., "use Playwright E2E + OWASP ZAP")
244
+ - Specific test approaches (e.g., "Test approach: Playwright E2E for auth/authz")
245
+
246
+ **In QA Doc (full NFR testing approach):**
247
+ - **Security**: Full test scenarios, tooling (Playwright + OWASP ZAP), test procedures
248
+ - **Performance**: Load/stress/spike test scenarios, k6 scripts, SLO thresholds
249
+ - **Reliability**: Error handling tests, retry logic validation, circuit breaker tests
250
+ - **Maintainability**: Coverage targets, code quality gates, observability validation
251
+
252
+ **Rule of Thumb:**
253
+ - Architecture doc: "What NFRs exist and what concerns they create" (1-2 sentences)
254
+ - QA doc: "How to test those NFRs" (full sections with tables, code, procedures)
255
+
256
+ 5. **Flag Testability Concerns**
257
+
258
+ Identify architecture decisions that harm testability:
259
+ - ❌ Tight coupling (no interfaces, hard dependencies)
260
+ - ❌ No dependency injection (can't mock external services)
261
+ - ❌ Hardcoded configurations (can't test different envs)
262
+ - ❌ Missing observability (can't validate NFRs)
263
+ - ❌ Stateful designs (can't parallelize tests)
264
+
265
+ **Critical:** If testability concerns are blockers (e.g., "Architecture makes performance testing impossible"), document as CONCERNS or FAIL recommendation for gate check.
266
+
267
+ 6. **Output System-Level Test Design (TWO Documents)**
268
+
269
+ **IMPORTANT:** System-level mode produces TWO documents instead of one:
270
+
271
+ **Document 1: test-design-architecture.md** (for Architecture/Dev teams)
272
+ - Purpose: Architectural concerns, testability gaps, NFR requirements
273
+ - Audience: Architects, Backend Devs, Frontend Devs, DevOps, Security Engineers
274
+ - Focus: What architecture must deliver for testability
275
+ - Template: `test-design-architecture-template.md`
276
+
277
+ **Document 2: test-design-qa.md** (for QA team)
278
+ - Purpose: Test execution recipe, coverage plan, Sprint 0 setup
279
+ - Audience: QA Engineers, Test Automation Engineers, QA Leads
280
+ - Focus: How QA will execute tests
281
+ - Template: `test-design-qa-template.md`
282
+
283
+ **Standard Structures (REQUIRED):**
284
+
285
+ **test-design-architecture.md sections (in this order):**
286
+
287
+ **STRUCTURE PRINCIPLE: Actionable items FIRST, FYI items LAST**
288
+
289
+ 1. Executive Summary (scope, business context, architecture, risk summary)
290
+ 2. Quick Guide (🚨 BLOCKERS / ⚠️ HIGH PRIORITY / 📋 INFO ONLY)
291
+ 3. Risk Assessment (high/medium/low-priority risks with scoring) - **ACTIONABLE**
292
+ 4. Testability Concerns and Architectural Gaps - **ACTIONABLE** (what arch team must do)
293
+ - Sub-section: Blockers to Fast Feedback (ACTIONABLE - concerns FIRST)
294
+ - Sub-section: Architectural Improvements Needed (ACTIONABLE)
295
+ - Sub-section: Testability Assessment Summary (FYI - passing items LAST, only if worth mentioning)
296
+ 5. Risk Mitigation Plans (detailed for high-priority risks ≥6) - **ACTIONABLE**
297
+ 6. Assumptions and Dependencies - **FYI**
298
+
299
+ **SECTIONS THAT DO NOT BELONG IN ARCHITECTURE DOC:**
300
+ - ❌ Test Levels Strategy (unit/integration/E2E split) - This is a RECIPE, belongs in QA doc ONLY
301
+ - ❌ NFR Testing Approach with test examples - This is a RECIPE, belongs in QA doc ONLY
302
+ - ❌ Test Environment Requirements - This is a RECIPE, belongs in QA doc ONLY
303
+ - ❌ Recommendations for Sprint 0 (test framework setup, factories) - This is a RECIPE, belongs in QA doc ONLY
304
+ - ❌ Quality Gate Criteria (pass rates, coverage targets) - This is a RECIPE, belongs in QA doc ONLY
305
+ - ❌ Tool Selection (Playwright, k6, etc.) - This is a RECIPE, belongs in QA doc ONLY
306
+
307
+ **WHAT BELONGS IN ARCHITECTURE DOC:**
308
+ - ✅ Testability CONCERNS (what makes it hard to test)
309
+ - ✅ Architecture GAPS (what's missing for testability)
310
+ - ✅ What architecture team must DO (blockers, improvements)
311
+ - ✅ Risks and mitigation plans
312
+ - ✅ ASRs (Architecturally Significant Requirements) - but clarify if FYI or actionable
313
+
314
+ **test-design-qa.md sections (in this order):**
315
+ 1. Executive Summary (risk summary, coverage summary)
316
+ 2. **Dependencies & Test Blockers** (CRITICAL: RIGHT AFTER SUMMARY - what QA needs from other teams)
317
+ 3. Risk Assessment (scored risks with categories - reference Arch doc, don't duplicate)
318
+ 4. Test Coverage Plan (P0/P1/P2/P3 with detailed scenarios + checkboxes)
319
+ 5. **Execution Strategy** (SIMPLE: Organized by TOOL TYPE: PR (Playwright) / Nightly (k6) / Weekly (chaos/manual))
320
+ 6. QA Effort Estimate (QA effort ONLY - no DevOps, Data Eng, Finance, Backend)
321
+ 7. Appendices (code examples with playwright-utils, tagging strategy, knowledge base refs)
322
+
323
+ **SECTIONS TO EXCLUDE FROM QA DOC:**
324
+ - ❌ Quality Gate Criteria (pass/fail thresholds - teams decide for themselves)
325
+ - ❌ Follow-on Workflows (bloat - BMAD commands are self-explanatory)
326
+ - ❌ Approval section (unnecessary formality)
327
+ - ❌ Test Environment Requirements (remove as separate section - integrate into Dependencies if needed)
328
+ - ❌ NFR Readiness Summary (bloat - covered in Risk Assessment)
329
+ - ❌ Testability Assessment (bloat - covered in Dependencies)
330
+ - ❌ Test Levels Strategy (bloat - obvious from test scenarios)
331
+ - ❌ Sprint breakdowns (too prescriptive)
332
+ - ❌ Infrastructure/DevOps/Data Eng effort tables (out of scope)
333
+ - ❌ Mitigation plans for non-QA work (belongs in Arch doc)
334
+
335
+ **Content Guidelines:**
336
+
337
+ **Architecture doc (DO):**
338
+ - ✅ Risk scoring visible (Probability × Impact = Score)
339
+ - ✅ Clear ownership (each blocker/ASR has owner + timeline)
340
+ - ✅ Testability requirements (what architecture must support)
341
+ - ✅ Mitigation plans (for each high-risk item ≥6)
342
+ - ✅ Brief conceptual examples ONLY if needed to clarify architecture concerns (5-10 lines max)
343
+ - ✅ **Target length**: ~150-200 lines max (focus on actionable concerns only)
344
+ - ✅ **Professional tone**: Avoid AI slop (excessive ✅/❌ emojis, "absolutely", "excellent", overly enthusiastic language)
345
+
346
+ **Architecture doc (DON'T) - CRITICAL:**
347
+ - ❌ NO test scripts or test implementation code AT ALL - This is a communication doc for architects, not a testing guide
348
+ - ❌ NO Playwright test examples (e.g., test('...', async ({ request }) => ...))
349
+ - ❌ NO assertion logic (e.g., expect(...).toBe(...))
350
+ - ❌ NO test scenario checklists with checkboxes (belongs in QA doc)
351
+ - ❌ NO implementation details about HOW QA will test
352
+ - ❌ Focus on CONCERNS, not IMPLEMENTATION
353
+
354
+ **QA doc (DO):**
355
+ - ✅ Test scenario recipes (clear P0/P1/P2/P3 with checkboxes)
356
+ - ✅ Full test implementation code samples when helpful
357
+ - ✅ **IMPORTANT: If config.tea_use_playwright_utils is true, ALL code samples MUST use @seontechnologies/playwright-utils fixtures and utilities**
358
+ - ✅ Import test fixtures from '@seontechnologies/playwright-utils/api-request/fixtures'
359
+ - ✅ Import expect from '@playwright/test' (playwright-utils does not re-export expect)
360
+ - ✅ Use apiRequest fixture with schema validation, retry logic, and structured responses
361
+ - ✅ Dependencies & Test Blockers section RIGHT AFTER Executive Summary (what QA needs from other teams)
362
+ - ✅ **QA effort estimates ONLY** (no DevOps, Data Eng, Finance, Backend effort - out of scope)
363
+ - ✅ Cross-references to Architecture doc (not duplication)
364
+ - ✅ **Professional tone**: Avoid AI slop (excessive ✅/❌ emojis, "absolutely", "excellent", overly enthusiastic language)
365
+
366
+ **QA doc (DON'T):**
367
+ - ❌ NO architectural theory (just reference Architecture doc)
368
+ - ❌ NO ASR explanations (link to Architecture doc instead)
369
+ - ❌ NO duplicate risk assessments (reference Architecture doc)
370
+ - ❌ NO Quality Gate Criteria section (teams decide pass/fail thresholds for themselves)
371
+ - ❌ NO Follow-on Workflows section (bloat - BMAD commands are self-explanatory)
372
+ - ❌ NO Approval section (unnecessary formality)
373
+ - ❌ NO effort estimates for other teams (DevOps, Backend, Data Eng, Finance - out of scope, QA effort only)
374
+ - ❌ NO Sprint breakdowns (too prescriptive - e.g., "Sprint 0: 40 hours, Sprint 1: 48 hours")
375
+ - ❌ NO mitigation plans for Backend/Arch/DevOps work (those belong in Architecture doc)
376
+ - ❌ NO architectural assumptions or debates (those belong in Architecture doc)
377
+
378
+ **Anti-Patterns to Avoid (Cross-Document Redundancy):**
379
+
380
+ **CRITICAL: NO BLOAT, NO REPETITION, NO OVERINFO**
381
+
382
+ ❌ **DON'T duplicate OAuth requirements:**
383
+ - Architecture doc: Explain OAuth 2.1 flow in detail
384
+ - QA doc: Re-explain why OAuth 2.1 is required
385
+
386
+ ✅ **DO cross-reference instead:**
387
+ - Architecture doc: "ASR-1: OAuth 2.1 required (see QA doc for 12 test scenarios)"
388
+ - QA doc: "OAuth tests: 12 P0 scenarios (see Architecture doc R-001 for risk details)"
389
+
390
+ ❌ **DON'T repeat the same note 10+ times:**
391
+ - Example: "Timing is pessimistic until R-005 is fixed" repeated on every P0, P1, P2 section
392
+ - This creates bloat and makes docs hard to read
393
+
394
+ ✅ **DO consolidate repeated information:**
395
+ - Write once at the top: "**Note**: All timing estimates are pessimistic pending R-005 resolution"
396
+ - Reference briefly if needed: "(pessimistic timing)"
397
+
398
+ ❌ **DON'T include excessive detail that doesn't add value:**
399
+ - Long explanations of obvious concepts
400
+ - Redundant examples showing the same pattern
401
+ - Over-documentation of standard practices
402
+
403
+ ✅ **DO focus on what's unique or critical:**
404
+ - Document only what's different from standard practice
405
+ - Highlight critical decisions and risks
406
+ - Keep explanations concise and actionable
407
+
408
+ **Markdown Cross-Reference Syntax Examples:**
409
+
410
+ ```markdown
411
+ # In test-design-architecture.md
412
+
413
+ ### 🚨 R-001: Multi-Tenant Isolation (Score: 9)
414
+
415
+ **Test Coverage:** 8 P0 tests (see [QA doc - Multi-Tenant Isolation](test-design-qa.md#multi-tenant-isolation-8-tests-security-critical) for detailed scenarios)
416
+
417
+ ---
418
+
419
+ # In test-design-qa.md
420
+
421
+ ## Testability Assessment
422
+
423
+ **Prerequisites from Architecture Doc:**
424
+ - [ ] R-001: Multi-tenant isolation validated (see [Architecture doc R-001](test-design-architecture.md#r-001-multi-tenant-isolation-score-9) for mitigation plan)
425
+ - [ ] R-002: Test customer provisioned (see [Architecture doc 🚨 BLOCKERS](test-design-architecture.md#blockers---team-must-decide-cant-proceed-without))
426
+
427
+ ## Sprint 0 Setup Requirements
428
+
429
+ **Source:** See [Architecture doc "Quick Guide"](test-design-architecture.md#quick-guide) for detailed mitigation plans
430
+ ```
431
+
432
+ **Key Points:**
433
+ - Use relative links: `[Link Text](test-design-qa.md#section-anchor)`
434
+ - Anchor format: lowercase, hyphens for spaces, remove emojis/special chars
435
+ - Example anchor: `### 🚨 R-001: Title` → `#r-001-title`
436
+
437
+ ❌ **DON'T put long code examples in Architecture doc:**
438
+ - Example: 50+ lines of test implementation
439
+
440
+ ✅ **DO keep examples SHORT in Architecture doc:**
441
+ - Example: 5-10 lines max showing what architecture must support
442
+ - Full implementation goes in QA doc
443
+
444
+ ❌ **DON'T repeat same note 10+ times:**
445
+ - Example: "Pessimistic timing until R-005 fixed" on every P0/P1/P2 section
446
+
447
+ ✅ **DO consolidate repeated notes:**
448
+ - Single timing note at top
449
+ - Reference briefly throughout: "(pessimistic)"
450
+
451
+ **Write Both Documents:**
452
+ - Use `test-design-architecture-template.md` for Architecture doc
453
+ - Use `test-design-qa-template.md` for QA doc
454
+ - Follow standard structures defined above
455
+ - Cross-reference between docs (no duplication)
456
+ - Validate against checklist.md (System-Level Mode section)
457
+
458
+ **Common Over-Engineering to Avoid:**
459
+
460
+ **In QA Doc:**
461
+ 1. ❌ Quality gate thresholds ("P0 must be 100%, P1 ≥95%") - Let teams decide for themselves
462
+ 2. ❌ Effort estimates for other teams - QA doc should only estimate QA effort
463
+ 3. ❌ Sprint breakdowns ("Sprint 0: 40 hours, Sprint 1: 48 hours") - Too prescriptive
464
+ 4. ❌ Approval sections - Unnecessary formality
465
+ 5. ❌ Assumptions about architecture (SLO targets, replication lag) - These are architectural concerns, belong in Arch doc
466
+ 6. ❌ Mitigation plans for Backend/Arch/DevOps - Those belong in Arch doc
467
+ 7. ❌ Follow-on workflows section - Bloat, BMAD commands are self-explanatory
468
+ 8. ❌ NFR Readiness Summary - Bloat, covered in Risk Assessment
469
+
470
+ **Test Coverage Numbers Reality Check:**
471
+ - With Playwright parallelization, running ALL Playwright tests is as fast as running just P0
472
+ - Don't split Playwright tests by priority into different CI gates - it adds no value
473
+ - Tool type matters, not priority labels
474
+ - Defer based on infrastructure cost, not importance
475
+
476
+ **After System-Level Mode:** Workflow COMPLETE. System-level outputs (test-design-architecture.md + test-design-qa.md) are written in this step. Steps 2-4 are epic-level only - do NOT execute them in system-level mode.
477
+
478
+ ---
479
+
480
+ ## Step 1.6: Exploratory Mode Selection (Epic-Level Only)
481
+
482
+ ### Actions
483
+
484
+ 1. **Detect Planning Mode**
485
+
486
+ Determine mode based on context:
487
+
488
+ **Requirements-Based Mode (DEFAULT)**:
489
+ - Have clear story/PRD with acceptance criteria
490
+ - Uses: Existing workflow (Steps 2-4)
491
+ - Appropriate for: Documented features, greenfield projects
492
+
493
+ **Exploratory Mode (OPTIONAL - Brownfield)**:
494
+ - Missing/incomplete requirements AND brownfield application exists
495
+ - Uses: UI exploration to discover functionality
496
+ - Appropriate for: Undocumented brownfield apps, legacy systems
497
+
498
+ 2. **Requirements-Based Mode (DEFAULT - Skip to Step 2)**
499
+
500
+ If requirements are clear:
501
+ - Continue with existing workflow (Step 2: Assess and Classify Risks)
502
+ - Use loaded requirements from Step 1
503
+ - Proceed with risk assessment based on documented requirements
504
+
505
+ 3. **Exploratory Mode (OPTIONAL - Brownfield Apps)**
506
+
507
+ If exploring brownfield application:
508
+
509
+ **A. Check MCP Availability**
510
+
511
+ If config.tea_use_mcp_enhancements is true AND Playwright MCP tools available:
512
+ - Use MCP-assisted exploration (Step 3.B)
513
+
514
+ If MCP unavailable OR config.tea_use_mcp_enhancements is false:
515
+ - Use manual exploration fallback (Step 3.C)
516
+
517
+ **B. MCP-Assisted Exploration (If MCP Tools Available)**
518
+
519
+ Use Playwright MCP browser tools to explore UI:
520
+
521
+ **Setup:**
522
+
523
+ ```
524
+ 1. Use planner_setup_page to initialize browser
525
+ 2. Navigate to {exploration_url}
526
+ 3. Capture initial state with browser_snapshot
527
+ ```
528
+
529
+ **Exploration Process:**
530
+
531
+ ```
532
+ 4. Use browser_navigate to explore different pages
533
+ 5. Use browser_click to interact with buttons, links, forms
534
+ 6. Use browser_hover to reveal hidden menus/tooltips
535
+ 7. Capture browser_snapshot at each significant state
536
+ 8. Take browser_screenshot for documentation
537
+ 9. Monitor browser_console_messages for JavaScript errors
538
+ 10. Track browser_network_requests to identify API calls
539
+ 11. Map user flows and interactive elements
540
+ 12. Document discovered functionality
541
+ ```
542
+
543
+ **Discovery Documentation:**
544
+ - Create list of discovered features (pages, workflows, forms)
545
+ - Identify user journeys (navigation paths)
546
+ - Map API endpoints (from network requests)
547
+ - Note error states (from console messages)
548
+ - Capture screenshots for visual reference
549
+
550
+ **Convert to Test Scenarios:**
551
+ - Transform discoveries into testable requirements
552
+ - Prioritize based on user flow criticality
553
+ - Identify risks from discovered functionality
554
+ - Continue with Step 2 (Assess and Classify Risks) using discovered requirements
555
+
556
+ **C. Manual Exploration Fallback (If MCP Unavailable)**
557
+
558
+ If Playwright MCP is not available:
559
+
560
+ **Notify User:**
561
+
562
+ ```markdown
563
+ Exploratory mode enabled but Playwright MCP unavailable.
564
+
565
+ **Manual exploration required:**
566
+
567
+ 1. Open application at: {exploration_url}
568
+ 2. Explore all pages, workflows, and features
569
+ 3. Document findings in markdown:
570
+ - List of pages/features discovered
571
+ - User journeys identified
572
+ - API endpoints observed (DevTools Network tab)
573
+ - JavaScript errors noted (DevTools Console)
574
+ - Critical workflows mapped
575
+
576
+ 4. Provide exploration findings to continue workflow
577
+
578
+ **Alternative:** Disable exploratory_mode and provide requirements documentation
579
+ ```
580
+
581
+ Wait for user to provide exploration findings, then:
582
+ - Parse user-provided discovery documentation
583
+ - Convert to testable requirements
584
+ - Continue with Step 2 (risk assessment)
585
+
586
+ 4. **Proceed to Risk Assessment**
587
+
588
+ After mode selection (Requirements-Based OR Exploratory):
589
+ - Continue to Step 2: Assess and Classify Risks
590
+ - Use requirements from documentation (Requirements-Based) OR discoveries (Exploratory)
591
+
592
+ ---
593
+
594
+ ## Step 2: Assess and Classify Risks
595
+
596
+ ### Actions
597
+
598
+ 1. **Identify Genuine Risks**
599
+
600
+ Filter requirements to isolate actual risks (not just features):
601
+ - Unresolved technical gaps
602
+ - Security vulnerabilities
603
+ - Performance bottlenecks
604
+ - Data loss or corruption potential
605
+ - Business impact failures
606
+ - Operational deployment issues
607
+
608
+ 2. **Classify Risks by Category**
609
+
610
+ Use these standard risk categories:
611
+
612
+ **TECH** (Technical/Architecture):
613
+ - Architecture flaws
614
+ - Integration failures
615
+ - Scalability issues
616
+ - Technical debt
617
+
618
+ **SEC** (Security):
619
+ - Missing access controls
620
+ - Authentication bypass
621
+ - Data exposure
622
+ - Injection vulnerabilities
623
+
624
+ **PERF** (Performance):
625
+ - SLA violations
626
+ - Response time degradation
627
+ - Resource exhaustion
628
+ - Scalability limits
629
+
630
+ **DATA** (Data Integrity):
631
+ - Data loss
632
+ - Data corruption
633
+ - Inconsistent state
634
+ - Migration failures
635
+
636
+ **BUS** (Business Impact):
637
+ - User experience degradation
638
+ - Business logic errors
639
+ - Revenue impact
640
+ - Compliance violations
641
+
642
+ **OPS** (Operations):
643
+ - Deployment failures
644
+ - Configuration errors
645
+ - Monitoring gaps
646
+ - Rollback issues
647
+
648
+ 3. **Score Risk Probability**
649
+
650
+ Rate likelihood (1-3):
651
+ - **1 (Unlikely)**: <10% chance, edge case
652
+ - **2 (Possible)**: 10-50% chance, known scenario
653
+ - **3 (Likely)**: >50% chance, common occurrence
654
+
655
+ 4. **Score Risk Impact**
656
+
657
+ Rate severity (1-3):
658
+ - **1 (Minor)**: Cosmetic, workaround exists, limited users
659
+ - **2 (Degraded)**: Feature impaired, workaround difficult, affects many users
660
+ - **3 (Critical)**: System failure, data loss, no workaround, blocks usage
661
+
662
+ 5. **Calculate Risk Score**
663
+
664
+ ```
665
+ Risk Score = Probability × Impact
666
+
667
+ Scores:
668
+ 1-2: Low risk (monitor)
669
+ 3-4: Medium risk (plan mitigation)
670
+ 6-9: High risk (immediate mitigation required)
671
+ ```
672
+
673
+ 6. **Highlight High-Priority Risks**
674
+
675
+ Flag all risks with score ≥6 for immediate attention.
676
+
677
+ 7. **Request Clarification**
678
+
679
+ If evidence is missing or assumptions required:
680
+ - Document assumptions clearly
681
+ - Request user clarification
682
+ - Do NOT speculate on business impact
683
+
684
+ 8. **Plan Mitigations**
685
+
686
+ **CRITICAL: Mitigation placement depends on WHO does the work**
687
+
688
+ For each high-priority risk:
689
+ - Define mitigation strategy
690
+ - Assign owner (dev, QA, ops)
691
+ - Set timeline
692
+ - Update residual risk expectation
693
+
694
+ **Mitigation Plan Placement:**
695
+
696
+ **Architecture Doc:**
697
+ - Mitigations owned by Backend, DevOps, Architecture, Security, Data Eng
698
+ - Example: "Add authorization layer for customer-scoped access" (Backend work)
699
+ - Example: "Configure AWS Fault Injection Simulator" (DevOps work)
700
+ - Example: "Define CloudWatch log schema for backfill events" (Architecture work)
701
+
702
+ **QA Doc:**
703
+ - Mitigations owned by QA (test development work)
704
+ - Example: "Create factories for test data with randomization" (QA work)
705
+ - Example: "Implement polling with retry for async validation" (QA test code)
706
+ - Brief reference to Architecture doc mitigations (don't duplicate)
707
+
708
+ **Rule of Thumb:**
709
+ - If mitigation requires production code changes → Architecture doc
710
+ - If mitigation is test infrastructure/code → QA doc
711
+ - If mitigation involves multiple teams → Architecture doc with QA validation approach
712
+
713
+ **Assumptions Placement:**
714
+
715
+ **Architecture Doc:**
716
+ - Architectural assumptions (SLO targets, replication lag, system design assumptions)
717
+ - Example: "P95 <500ms inferred from <2s timeout (requires Product approval)"
718
+ - Example: "Multi-region replication lag <1s assumed (ADR doesn't specify SLA)"
719
+ - Example: "Recent Cache hit ratio >80% assumed (not in PRD/ADR)"
720
+
721
+ **QA Doc:**
722
+ - Test execution assumptions (test infrastructure readiness, test data availability)
723
+ - Example: "Assumes test factories already created"
724
+ - Example: "Assumes CI/CD pipeline configured"
725
+ - Brief reference to Architecture doc for architectural assumptions
726
+
727
+ **Rule of Thumb:**
728
+ - If assumption is about system architecture/design → Architecture doc
729
+ - If assumption is about test infrastructure/execution → QA doc
730
+
731
+ ---
732
+
733
+ ## Step 3: Design Test Coverage
734
+
735
+ ### Actions
736
+
737
+ 1. **Break Down Acceptance Criteria**
738
+
739
+ Convert each acceptance criterion into atomic test scenarios:
740
+ - One scenario per testable behavior
741
+ - Scenarios are independent
742
+ - Scenarios are repeatable
743
+ - Scenarios tie back to risk mitigations
744
+
745
+ 2. **Select Appropriate Test Levels**
746
+
747
+ **Knowledge Base Reference**: `test-levels-framework.md`
748
+
749
+ Map requirements to optimal test levels (avoid duplication):
750
+
751
+ **E2E (End-to-End)**:
752
+ - Critical user journeys
753
+ - Multi-system integration
754
+ - Production-like environment
755
+ - Highest confidence, slowest execution
756
+
757
+ **API (Integration)**:
758
+ - Service contracts
759
+ - Business logic validation
760
+ - Fast feedback
761
+ - Good for complex scenarios
762
+
763
+ **Component**:
764
+ - UI component behavior
765
+ - Interaction testing
766
+ - Visual regression
767
+ - Fast, isolated
768
+
769
+ **Unit**:
770
+ - Business logic
771
+ - Edge cases
772
+ - Error handling
773
+ - Fastest, most granular
774
+
775
+ **Avoid duplicate coverage**: Don't test same behavior at multiple levels unless necessary.
776
+
777
+ 3. **Assign Priority Levels**
778
+
779
+ **CRITICAL: P0/P1/P2/P3 indicates priority and risk level, NOT execution timing**
780
+
781
+ **Knowledge Base Reference**: `test-priorities-matrix.md`
782
+
783
+ **P0 (Critical)**:
784
+ - Blocks core user journey
785
+ - High-risk areas (score ≥6)
786
+ - Revenue-impacting
787
+ - Security-critical
788
+ - No workaround exists
789
+ - Affects majority of users
790
+
791
+ **P1 (High)**:
792
+ - Important user features
793
+ - Medium-risk areas (score 3-4)
794
+ - Common workflows
795
+ - Workaround exists but difficult
796
+
797
+ **P2 (Medium)**:
798
+ - Secondary features
799
+ - Low-risk areas (score 1-2)
800
+ - Edge cases
801
+ - Regression prevention
802
+
803
+ **P3 (Low)**:
804
+ - Nice-to-have
805
+ - Exploratory
806
+ - Performance benchmarks
807
+ - Documentation validation
808
+
809
+ **NOTE:** Priority classification is separate from execution timing. A P1 test might run in PRs if it's fast, or nightly if it requires expensive infrastructure (e.g., k6 performance test). See "Execution Strategy" section for timing guidance.
810
+
811
+ 4. **Outline Data and Tooling Prerequisites**
812
+
813
+ For each test scenario, identify:
814
+ - Test data requirements (factories, fixtures)
815
+ - External services (mocks, stubs)
816
+ - Environment setup
817
+ - Tools and dependencies
818
+
819
+ 5. **Define Execution Strategy** (Keep It Simple)
820
+
821
+ **IMPORTANT: Avoid over-engineering execution order**
822
+
823
+ **Default Philosophy:**
824
+ - Run **everything** in PRs if total duration <15 minutes
825
+ - Playwright is fast with parallelization (100s of tests in ~10-15 min)
826
+ - Only defer to nightly/weekly if there's significant overhead:
827
+ - Performance tests (k6, load testing) - expensive infrastructure
828
+ - Chaos engineering - requires special setup (AWS FIS)
829
+ - Long-running tests - endurance (4+ hours), disaster recovery
830
+ - Manual tests - require human intervention
831
+
832
+ **Simple Execution Strategy (Organized by TOOL TYPE):**
833
+
834
+ ```markdown
835
+ ## Execution Strategy
836
+
837
+ **Philosophy**: Run everything in PRs unless significant infrastructure overhead.
838
+ Playwright with parallelization is extremely fast (100s of tests in ~10-15 min).
839
+
840
+ **Organized by TOOL TYPE:**
841
+
842
+ ### Every PR: Playwright Tests (~10-15 min)
843
+ All functional tests (from any priority level):
844
+ - All E2E, API, integration, unit tests using Playwright
845
+ - Parallelized across {N} shards
846
+ - Total: ~{N} tests (includes P0, P1, P2, P3)
847
+
848
+ ### Nightly: k6 Performance Tests (~30-60 min)
849
+ All performance tests (from any priority level):
850
+ - Load, stress, spike, endurance
851
+ - Reason: Expensive infrastructure, long-running (10-40 min per test)
852
+
853
+ ### Weekly: Chaos & Long-Running (~hours)
854
+ Special infrastructure tests (from any priority level):
855
+ - Multi-region failover, disaster recovery, endurance
856
+ - Reason: Very expensive, very long (4+ hours)
857
+ ```
858
+
859
+ **KEY INSIGHT: Organize by TOOL TYPE, not priority**
860
+ - Playwright (fast, cheap) → PR
861
+ - k6 (expensive, long) → Nightly
862
+ - Chaos/Manual (very expensive, very long) → Weekly
863
+
864
+ **Avoid:**
865
+ - ❌ Don't organize by priority (smoke → P0 → P1 → P2 → P3)
866
+ - ❌ Don't say "P1 runs on PR to main" (some P1 are Playwright/PR, some are k6/Nightly)
867
+ - ❌ Don't create artificial tiers - organize by tool type and infrastructure overhead
868
+
869
+ ---
870
+
871
+ ## Step 4: Generate Deliverables
872
+
873
+ ### Actions
874
+
875
+ 1. **Create Risk Assessment Matrix**
876
+
877
+ Use template structure:
878
+
879
+ ```markdown
880
+ | Risk ID | Category | Description | Probability | Impact | Score | Mitigation |
881
+ | ------- | -------- | ----------- | ----------- | ------ | ----- | --------------- |
882
+ | R-001 | SEC | Auth bypass | 2 | 3 | 6 | Add authz check |
883
+ ```
884
+
885
+ 2. **Create Coverage Matrix**
886
+
887
+ ```markdown
888
+ | Requirement | Test Level | Priority | Risk Link | Test Count | Owner |
889
+ | ----------- | ---------- | -------- | --------- | ---------- | ----- |
890
+ | Login flow | E2E | P0 | R-001 | 3 | QA |
891
+ ```
892
+
893
+ 3. **Document Execution Strategy** (Simple, Not Redundant)
894
+
895
+ **IMPORTANT: Keep execution strategy simple and avoid redundancy**
896
+
897
+ ```markdown
898
+ ## Execution Strategy
899
+
900
+ **Default: Run all functional tests in PRs (~10-15 min)**
901
+ - All Playwright tests (parallelized across 4 shards)
902
+ - Includes E2E, API, integration, unit tests
903
+ - Total: ~{N} tests
904
+
905
+ **Nightly: Performance & Infrastructure tests**
906
+ - k6 load/stress/spike tests (~30-60 min)
907
+ - Reason: Expensive infrastructure, long-running
908
+
909
+ **Weekly: Chaos & Disaster Recovery**
910
+ - Endurance tests (4+ hours)
911
+ - Multi-region failover (requires AWS FIS)
912
+ - Backup restore validation
913
+ - Reason: Special infrastructure, very long-running
914
+ ```
915
+
916
+ **DO NOT:**
917
+ - ❌ Create redundant smoke/P0/P1/P2/P3 tier structure
918
+ - ❌ List all tests again in execution order (already in coverage plan)
919
+ - ❌ Split tests by priority unless there's infrastructure overhead
920
+
921
+ 4. **Include Resource Estimates**
922
+
923
+ **IMPORTANT: Use intervals/ranges, not exact numbers**
924
+
925
+ Provide rough estimates with intervals to avoid false precision:
926
+
927
+ ```markdown
928
+ ### Test Effort Estimates
929
+
930
+ - P0 scenarios: 15 tests (~1.5-2.5 hours each) = **~25-40 hours**
931
+ - P1 scenarios: 25 tests (~0.75-1.5 hours each) = **~20-35 hours**
932
+ - P2 scenarios: 40 tests (~0.25-0.75 hours each) = **~10-30 hours**
933
+ - **Total:** **~55-105 hours** (~1.5-3 weeks with 1 QA engineer)
934
+ ```
935
+
936
+ **Why intervals:**
937
+ - Avoids false precision (estimates are never exact)
938
+ - Provides flexibility for complexity variations
939
+ - Accounts for unknowns and dependencies
940
+ - More realistic and less prescriptive
941
+
942
+ **Guidelines:**
943
+ - P0 tests: 1.5-2.5 hours each (complex setup, security, performance)
944
+ - P1 tests: 0.75-1.5 hours each (standard integration, API tests)
945
+ - P2 tests: 0.25-0.75 hours each (edge cases, simple validation)
946
+ - P3 tests: 0.1-0.5 hours each (exploratory, documentation)
947
+
948
+ **Express totals as:**
949
+ - Hour ranges: "~55-105 hours"
950
+ - Week ranges: "~1.5-3 weeks"
951
+ - Avoid: Exact numbers like "75 hours" or "11 days"
952
+
953
+ 5. **Add Gate Criteria**
954
+
955
+ ```markdown
956
+ ### Quality Gate Criteria
957
+
958
+ - All P0 tests pass (100%)
959
+ - P1 tests pass rate ≥95%
960
+ - No high-risk (score ≥6) items unmitigated
961
+ - Test coverage ≥80% for critical paths
962
+ ```
963
+
964
+ 6. **Write to Output File**
965
+
966
+ Save to `{output_folder}/test-design-epic-{epic_num}.md` using template structure.
967
+
968
+ ---
969
+
970
+ ## Important Notes
971
+
972
+ ### Risk Category Definitions
973
+
974
+ **TECH** (Technical/Architecture):
975
+
976
+ - Architecture flaws or technical debt
977
+ - Integration complexity
978
+ - Scalability concerns
979
+
980
+ **SEC** (Security):
981
+
982
+ - Missing security controls
983
+ - Authentication/authorization gaps
984
+ - Data exposure risks
985
+
986
+ **PERF** (Performance):
987
+
988
+ - SLA risk or performance degradation
989
+ - Resource constraints
990
+ - Scalability bottlenecks
991
+
992
+ **DATA** (Data Integrity):
993
+
994
+ - Data loss or corruption potential
995
+ - State consistency issues
996
+ - Migration risks
997
+
998
+ **BUS** (Business Impact):
999
+
1000
+ - User experience harm
1001
+ - Business logic errors
1002
+ - Revenue or compliance impact
1003
+
1004
+ **OPS** (Operations):
1005
+
1006
+ - Deployment or runtime failures
1007
+ - Configuration issues
1008
+ - Monitoring/observability gaps
1009
+
1010
+ ### Risk Scoring Methodology
1011
+
1012
+ **Probability × Impact = Risk Score**
1013
+
1014
+ Examples:
1015
+
1016
+ - High likelihood (3) × Critical impact (3) = **Score 9** (highest priority)
1017
+ - Possible (2) × Critical (3) = **Score 6** (high priority threshold)
1018
+ - Unlikely (1) × Minor (1) = **Score 1** (low priority)
1019
+
1020
+ **Threshold**: Scores ≥6 require immediate mitigation.
1021
+
1022
+ ### Test Level Selection Strategy
1023
+
1024
+ **Avoid duplication:**
1025
+
1026
+ - Don't test same behavior at E2E and API level
1027
+ - Use E2E for critical paths only
1028
+ - Use API tests for complex business logic
1029
+ - Use unit tests for edge cases
1030
+
1031
+ **Tradeoffs:**
1032
+
1033
+ - E2E: High confidence, slow execution, brittle
1034
+ - API: Good balance, fast, stable
1035
+ - Unit: Fastest feedback, narrow scope
1036
+
1037
+ ### Priority Assignment Guidelines
1038
+
1039
+ **P0 criteria** (all must be true):
1040
+
1041
+ - Blocks core functionality
1042
+ - High-risk (score ≥6)
1043
+ - No workaround exists
1044
+ - Affects majority of users
1045
+
1046
+ **P1 criteria**:
1047
+
1048
+ - Important feature
1049
+ - Medium risk (score 3-5)
1050
+ - Workaround exists but difficult
1051
+
1052
+ **P2/P3**: Everything else, prioritized by value
1053
+
1054
+ ### Knowledge Base Integration
1055
+
1056
+ **Core Fragments (Auto-loaded in Step 1):**
1057
+
1058
+ - `risk-governance.md` - Risk classification (6 categories), automated scoring, gate decision engine, coverage traceability, owner tracking (625 lines, 4 examples)
1059
+ - `probability-impact.md` - Probability × impact matrix, automated classification thresholds, dynamic re-assessment, gate integration (604 lines, 4 examples)
1060
+ - `test-levels-framework.md` - E2E vs API vs Component vs Unit decision framework with characteristics matrix (467 lines, 4 examples)
1061
+ - `test-priorities-matrix.md` - P0-P3 automated priority calculation, risk-based mapping, tagging strategy, time budgets (389 lines, 2 examples)
1062
+
1063
+ **Reference for Test Planning:**
1064
+
1065
+ - `selective-testing.md` - Execution strategy: tag-based, spec filters, diff-based selection, promotion rules (727 lines, 4 examples)
1066
+ - `fixture-architecture.md` - Data setup patterns: pure function → fixture → mergeTests, auto-cleanup (406 lines, 5 examples)
1067
+
1068
+ **Manual Reference (Optional):**
1069
+
1070
+ - Use `tea-index.csv` to find additional specialized fragments as needed
1071
+
1072
+ ### Evidence-Based Assessment
1073
+
1074
+ **Critical principle:** Base risk assessment on evidence, not speculation.
1075
+
1076
+ **Evidence sources:**
1077
+
1078
+ - PRD and user research
1079
+ - Architecture documentation
1080
+ - Historical bug data
1081
+ - User feedback
1082
+ - Security audit results
1083
+
1084
+ **Avoid:**
1085
+
1086
+ - Guessing business impact
1087
+ - Assuming user behavior
1088
+ - Inventing requirements
1089
+
1090
+ **When uncertain:** Document assumptions and request clarification from user.
1091
+
1092
+ ---
1093
+
1094
+ ## Output Summary
1095
+
1096
+ After completing this workflow, provide a summary:
1097
+
1098
+ ```markdown
1099
+ ## Test Design Complete
1100
+
1101
+ **Epic**: {epic_num}
1102
+ **Scope**: {design_level}
1103
+
1104
+ **Risk Assessment**:
1105
+
1106
+ - Total risks identified: {count}
1107
+ - High-priority risks (≥6): {high_count}
1108
+ - Categories: {categories}
1109
+
1110
+ **Coverage Plan**:
1111
+
1112
+ - P0 scenarios: {p0_count} ({p0_hours} hours)
1113
+ - P1 scenarios: {p1_count} ({p1_hours} hours)
1114
+ - P2/P3 scenarios: {p2p3_count} ({p2p3_hours} hours)
1115
+ - **Total effort**: {total_hours} hours (~{total_days} days)
1116
+
1117
+ **Test Levels**:
1118
+
1119
+ - E2E: {e2e_count}
1120
+ - API: {api_count}
1121
+ - Component: {component_count}
1122
+ - Unit: {unit_count}
1123
+
1124
+ **Quality Gate Criteria**:
1125
+
1126
+ - P0 pass rate: 100%
1127
+ - P1 pass rate: ≥95%
1128
+ - High-risk mitigations: 100%
1129
+ - Coverage: ≥80%
1130
+
1131
+ **Output File**: {output_file}
1132
+
1133
+ **Next Steps**:
1134
+
1135
+ 1. Review risk assessment with team
1136
+ 2. Prioritize mitigation for high-risk items (score ≥6)
1137
+ 3. Run `*atdd` to generate failing tests for P0 scenarios (separate workflow; not auto-run by `*test-design`)
1138
+ 4. Allocate resources per effort estimates
1139
+ 5. Set up test data factories and fixtures
1140
+ ```
1141
+
1142
+ ---
1143
+
1144
+ ## Validation
1145
+
1146
+ After completing all steps, verify:
1147
+
1148
+ - [ ] Risk assessment complete with all categories
1149
+ - [ ] All risks scored (probability × impact)
1150
+ - [ ] High-priority risks (≥6) flagged
1151
+ - [ ] Coverage matrix maps requirements to test levels
1152
+ - [ ] Priority levels assigned (P0-P3)
1153
+ - [ ] Execution order defined
1154
+ - [ ] Resource estimates provided
1155
+ - [ ] Quality gate criteria defined
1156
+ - [ ] Output file created and formatted correctly
1157
+
1158
+ Refer to `checklist.md` for comprehensive validation criteria.