bmad-odoo 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (282) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/LICENSE +21 -0
  3. package/README.md +317 -0
  4. package/_config/agent-manifest.csv +10 -0
  5. package/_config/manifest.yaml +10 -0
  6. package/_config/workflow-manifest.csv +10 -0
  7. package/bmm/agents/analyst.md +93 -0
  8. package/bmm/agents/architect.md +72 -0
  9. package/bmm/agents/dev.md +85 -0
  10. package/bmm/agents/pm.md +61 -0
  11. package/bmm/agents/quick-flow-solo-dev.md +58 -0
  12. package/bmm/agents/sm.md +56 -0
  13. package/bmm/agents/tea.md +57 -0
  14. package/bmm/agents/tech-writer.md +56 -0
  15. package/bmm/agents/ux-designer.md +56 -0
  16. package/bmm/config.yaml +27 -0
  17. package/bmm/data/odoo-knowledge-base.md +90 -0
  18. package/bmm/teams/default-team.md +17 -0
  19. package/bmm/testarch/odoo-test-design/steps/step-01-init.md +44 -0
  20. package/bmm/testarch/odoo-test-design/steps/step-02-test-cases.md +82 -0
  21. package/bmm/testarch/odoo-test-design/steps/step-03-complete.md +69 -0
  22. package/bmm/testarch/odoo-test-design/workflow.md +30 -0
  23. package/bmm/testarch/odoo-testing-guide.md +30 -0
  24. package/bmm/workflows/1-analysis/analyze-process/process-analysis.template.md +80 -0
  25. package/bmm/workflows/1-analysis/analyze-process/steps/step-01-init.md +44 -0
  26. package/bmm/workflows/1-analysis/analyze-process/steps/step-02-current-state.md +55 -0
  27. package/bmm/workflows/1-analysis/analyze-process/steps/step-03-pain-points.md +67 -0
  28. package/bmm/workflows/1-analysis/analyze-process/steps/step-04-odoo-mapping.md +67 -0
  29. package/bmm/workflows/1-analysis/analyze-process/steps/step-05-recommendations.md +99 -0
  30. package/bmm/workflows/1-analysis/analyze-process/steps/step-06-complete.md +62 -0
  31. package/bmm/workflows/1-analysis/analyze-process/workflow.md +60 -0
  32. package/bmm/workflows/1-analysis/create-odoo-product-brief/steps/step-01-init.md +45 -0
  33. package/bmm/workflows/1-analysis/create-odoo-product-brief/steps/step-02-users-stakeholders.md +46 -0
  34. package/bmm/workflows/1-analysis/create-odoo-product-brief/steps/step-03-odoo-modules.md +59 -0
  35. package/bmm/workflows/1-analysis/create-odoo-product-brief/steps/step-04-scope-timeline.md +64 -0
  36. package/bmm/workflows/1-analysis/create-odoo-product-brief/steps/step-05-complete.md +32 -0
  37. package/bmm/workflows/1-analysis/create-odoo-product-brief/workflow.md +35 -0
  38. package/bmm/workflows/1-analysis/create-product-brief/product-brief.template.md +10 -0
  39. package/bmm/workflows/1-analysis/create-product-brief/steps/step-01-init.md +182 -0
  40. package/bmm/workflows/1-analysis/create-product-brief/steps/step-01b-continue.md +166 -0
  41. package/bmm/workflows/1-analysis/create-product-brief/steps/step-02-vision.md +204 -0
  42. package/bmm/workflows/1-analysis/create-product-brief/steps/step-03-users.md +207 -0
  43. package/bmm/workflows/1-analysis/create-product-brief/steps/step-04-metrics.md +210 -0
  44. package/bmm/workflows/1-analysis/create-product-brief/steps/step-05-scope.md +224 -0
  45. package/bmm/workflows/1-analysis/create-product-brief/steps/step-06-complete.md +199 -0
  46. package/bmm/workflows/1-analysis/create-product-brief/workflow.md +58 -0
  47. package/bmm/workflows/1-analysis/gap-analysis/steps/step-01-init.md +45 -0
  48. package/bmm/workflows/1-analysis/gap-analysis/steps/step-02-odoo-capabilities.md +36 -0
  49. package/bmm/workflows/1-analysis/gap-analysis/steps/step-03-gap-matrix.md +51 -0
  50. package/bmm/workflows/1-analysis/gap-analysis/workflow.md +45 -0
  51. package/bmm/workflows/1-analysis/research/domain-steps/step-01-init.md +137 -0
  52. package/bmm/workflows/1-analysis/research/domain-steps/step-02-domain-analysis.md +229 -0
  53. package/bmm/workflows/1-analysis/research/domain-steps/step-03-competitive-landscape.md +238 -0
  54. package/bmm/workflows/1-analysis/research/domain-steps/step-04-regulatory-focus.md +206 -0
  55. package/bmm/workflows/1-analysis/research/domain-steps/step-05-technical-trends.md +234 -0
  56. package/bmm/workflows/1-analysis/research/domain-steps/step-06-research-synthesis.md +443 -0
  57. package/bmm/workflows/1-analysis/research/market-steps/step-01-init.md +182 -0
  58. package/bmm/workflows/1-analysis/research/market-steps/step-02-customer-behavior.md +237 -0
  59. package/bmm/workflows/1-analysis/research/market-steps/step-02-customer-insights.md +200 -0
  60. package/bmm/workflows/1-analysis/research/market-steps/step-03-customer-pain-points.md +249 -0
  61. package/bmm/workflows/1-analysis/research/market-steps/step-04-customer-decisions.md +259 -0
  62. package/bmm/workflows/1-analysis/research/market-steps/step-05-competitive-analysis.md +177 -0
  63. package/bmm/workflows/1-analysis/research/market-steps/step-06-research-completion.md +475 -0
  64. package/bmm/workflows/1-analysis/research/research.template.md +29 -0
  65. package/bmm/workflows/1-analysis/research/technical-steps/step-01-init.md +137 -0
  66. package/bmm/workflows/1-analysis/research/technical-steps/step-02-technical-overview.md +239 -0
  67. package/bmm/workflows/1-analysis/research/technical-steps/step-03-integration-patterns.md +248 -0
  68. package/bmm/workflows/1-analysis/research/technical-steps/step-04-architectural-patterns.md +202 -0
  69. package/bmm/workflows/1-analysis/research/technical-steps/step-05-implementation-research.md +239 -0
  70. package/bmm/workflows/1-analysis/research/technical-steps/step-06-research-synthesis.md +486 -0
  71. package/bmm/workflows/1-analysis/research/workflow.md +173 -0
  72. package/bmm/workflows/2-plan-workflows/create-odoo-addon/steps/step-01-init.md +48 -0
  73. package/bmm/workflows/2-plan-workflows/create-odoo-addon/steps/step-02-technical-design.md +82 -0
  74. package/bmm/workflows/2-plan-workflows/create-odoo-addon/steps/step-03-generate.md +86 -0
  75. package/bmm/workflows/2-plan-workflows/create-odoo-addon/workflow.md +39 -0
  76. package/bmm/workflows/2-plan-workflows/create-odoo-epic/steps/step-01-init.md +55 -0
  77. package/bmm/workflows/2-plan-workflows/create-odoo-epic/steps/step-02-stories.md +53 -0
  78. package/bmm/workflows/2-plan-workflows/create-odoo-epic/steps/step-03-complete.md +39 -0
  79. package/bmm/workflows/2-plan-workflows/create-odoo-epic/workflow.md +35 -0
  80. package/bmm/workflows/2-plan-workflows/create-odoo-prd/steps/step-01-init.md +46 -0
  81. package/bmm/workflows/2-plan-workflows/create-odoo-prd/steps/step-02-functional-requirements.md +56 -0
  82. package/bmm/workflows/2-plan-workflows/create-odoo-prd/steps/step-03-technical-requirements.md +45 -0
  83. package/bmm/workflows/2-plan-workflows/create-odoo-prd/steps/step-04-complete.md +40 -0
  84. package/bmm/workflows/2-plan-workflows/create-odoo-prd/workflow.md +29 -0
  85. package/bmm/workflows/2-plan-workflows/create-odoo-ux-design/steps/step-01-init.md +52 -0
  86. package/bmm/workflows/2-plan-workflows/create-odoo-ux-design/steps/step-02-form-design.md +78 -0
  87. package/bmm/workflows/2-plan-workflows/create-odoo-ux-design/steps/step-03-tree-design.md +84 -0
  88. package/bmm/workflows/2-plan-workflows/create-odoo-ux-design/steps/step-04-complete.md +55 -0
  89. package/bmm/workflows/2-plan-workflows/create-odoo-ux-design/workflow.md +30 -0
  90. package/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-01-init.md +135 -0
  91. package/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-01b-continue.md +127 -0
  92. package/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-02-discovery.md +190 -0
  93. package/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-03-core-experience.md +216 -0
  94. package/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-04-emotional-response.md +219 -0
  95. package/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-05-inspiration.md +234 -0
  96. package/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-06-design-system.md +252 -0
  97. package/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-07-defining-experience.md +254 -0
  98. package/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-08-visual-foundation.md +224 -0
  99. package/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-09-design-directions.md +224 -0
  100. package/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-10-user-journeys.md +241 -0
  101. package/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-11-component-strategy.md +248 -0
  102. package/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-12-ux-patterns.md +237 -0
  103. package/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-13-responsive-accessibility.md +264 -0
  104. package/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-14-complete.md +228 -0
  105. package/bmm/workflows/2-plan-workflows/create-ux-design/ux-design-template.md +13 -0
  106. package/bmm/workflows/2-plan-workflows/create-ux-design/workflow.md +43 -0
  107. package/bmm/workflows/2-plan-workflows/plan-odoo-migration/steps/step-01-init.md +49 -0
  108. package/bmm/workflows/2-plan-workflows/plan-odoo-migration/steps/step-02-risk-assessment.md +51 -0
  109. package/bmm/workflows/2-plan-workflows/plan-odoo-migration/steps/step-03-roadmap.md +58 -0
  110. package/bmm/workflows/2-plan-workflows/plan-odoo-migration/workflow.md +29 -0
  111. package/bmm/workflows/2-plan-workflows/prd/domain-complexity.csv +13 -0
  112. package/bmm/workflows/2-plan-workflows/prd/prd-template.md +11 -0
  113. package/bmm/workflows/2-plan-workflows/prd/project-types.csv +11 -0
  114. package/bmm/workflows/2-plan-workflows/prd/steps/step-01-init.md +197 -0
  115. package/bmm/workflows/2-plan-workflows/prd/steps/step-01b-continue.md +166 -0
  116. package/bmm/workflows/2-plan-workflows/prd/steps/step-02-discovery.md +421 -0
  117. package/bmm/workflows/2-plan-workflows/prd/steps/step-03-success.md +290 -0
  118. package/bmm/workflows/2-plan-workflows/prd/steps/step-04-journeys.md +291 -0
  119. package/bmm/workflows/2-plan-workflows/prd/steps/step-05-domain.md +271 -0
  120. package/bmm/workflows/2-plan-workflows/prd/steps/step-06-innovation.md +262 -0
  121. package/bmm/workflows/2-plan-workflows/prd/steps/step-07-project-type.md +258 -0
  122. package/bmm/workflows/2-plan-workflows/prd/steps/step-08-scoping.md +299 -0
  123. package/bmm/workflows/2-plan-workflows/prd/steps/step-09-functional.md +270 -0
  124. package/bmm/workflows/2-plan-workflows/prd/steps/step-10-nonfunctional.md +294 -0
  125. package/bmm/workflows/2-plan-workflows/prd/steps/step-11-complete.md +186 -0
  126. package/bmm/workflows/2-plan-workflows/prd/workflow.md +63 -0
  127. package/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-01-document-discovery.md +190 -0
  128. package/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-02-prd-analysis.md +178 -0
  129. package/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-03-epic-coverage-validation.md +179 -0
  130. package/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-04-ux-alignment.md +139 -0
  131. package/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-05-epic-quality-review.md +252 -0
  132. package/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-06-final-assessment.md +133 -0
  133. package/bmm/workflows/3-solutioning/check-implementation-readiness/templates/readiness-report-template.md +4 -0
  134. package/bmm/workflows/3-solutioning/check-implementation-readiness/workflow.md +55 -0
  135. package/bmm/workflows/3-solutioning/create-architecture/architecture-decision-template.md +12 -0
  136. package/bmm/workflows/3-solutioning/create-architecture/data/domain-complexity.csv +11 -0
  137. package/bmm/workflows/3-solutioning/create-architecture/data/project-types.csv +7 -0
  138. package/bmm/workflows/3-solutioning/create-architecture/steps/step-01-init.md +153 -0
  139. package/bmm/workflows/3-solutioning/create-architecture/steps/step-01b-continue.md +164 -0
  140. package/bmm/workflows/3-solutioning/create-architecture/steps/step-02-context.md +224 -0
  141. package/bmm/workflows/3-solutioning/create-architecture/steps/step-03-starter.md +331 -0
  142. package/bmm/workflows/3-solutioning/create-architecture/steps/step-04-decisions.md +318 -0
  143. package/bmm/workflows/3-solutioning/create-architecture/steps/step-05-patterns.md +359 -0
  144. package/bmm/workflows/3-solutioning/create-architecture/steps/step-06-structure.md +379 -0
  145. package/bmm/workflows/3-solutioning/create-architecture/steps/step-07-validation.md +359 -0
  146. package/bmm/workflows/3-solutioning/create-architecture/steps/step-08-complete.md +352 -0
  147. package/bmm/workflows/3-solutioning/create-architecture/workflow.md +50 -0
  148. package/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-01-validate-prerequisites.md +259 -0
  149. package/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-02-design-epics.md +233 -0
  150. package/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-03-create-stories.md +272 -0
  151. package/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-04-final-validation.md +145 -0
  152. package/bmm/workflows/3-solutioning/create-epics-and-stories/templates/epics-template.md +57 -0
  153. package/bmm/workflows/3-solutioning/create-epics-and-stories/workflow.md +59 -0
  154. package/bmm/workflows/3-solutioning/enhance-existing-system/steps/step-01-init.md +44 -0
  155. package/bmm/workflows/3-solutioning/enhance-existing-system/steps/step-02-inheritance-strategy.md +75 -0
  156. package/bmm/workflows/3-solutioning/enhance-existing-system/steps/step-03-implementation.md +64 -0
  157. package/bmm/workflows/3-solutioning/enhance-existing-system/workflow.md +30 -0
  158. package/bmm/workflows/3-solutioning/quick-addon/workflow.md +23 -0
  159. package/bmm/workflows/4-implementation/code-review/checklist.md +23 -0
  160. package/bmm/workflows/4-implementation/code-review/instructions.xml +225 -0
  161. package/bmm/workflows/4-implementation/code-review/workflow.yaml +50 -0
  162. package/bmm/workflows/4-implementation/correct-course/checklist.md +279 -0
  163. package/bmm/workflows/4-implementation/correct-course/instructions.md +206 -0
  164. package/bmm/workflows/4-implementation/correct-course/workflow.yaml +58 -0
  165. package/bmm/workflows/4-implementation/create-next-story/steps/step-01-init.md +53 -0
  166. package/bmm/workflows/4-implementation/create-next-story/steps/step-02-acceptance-criteria.md +63 -0
  167. package/bmm/workflows/4-implementation/create-next-story/steps/step-03-tasks.md +68 -0
  168. package/bmm/workflows/4-implementation/create-next-story/steps/step-04-complete.md +70 -0
  169. package/bmm/workflows/4-implementation/create-next-story/workflow.md +30 -0
  170. package/bmm/workflows/4-implementation/dev-story/checklist.md +80 -0
  171. package/bmm/workflows/4-implementation/dev-story/instructions.xml +409 -0
  172. package/bmm/workflows/4-implementation/dev-story/workflow.yaml +25 -0
  173. package/bmm/workflows/4-implementation/rapid-brownfield/steps/step-01-quick-story.md +79 -0
  174. package/bmm/workflows/4-implementation/rapid-brownfield/workflow.md +29 -0
  175. package/bmm/workflows/4-implementation/retrospective/instructions.md +1443 -0
  176. package/bmm/workflows/4-implementation/retrospective/workflow.yaml +57 -0
  177. package/bmm/workflows/4-implementation/sprint-planning/checklist.md +33 -0
  178. package/bmm/workflows/4-implementation/sprint-planning/instructions.md +225 -0
  179. package/bmm/workflows/4-implementation/sprint-planning/sprint-status-template.yaml +55 -0
  180. package/bmm/workflows/4-implementation/sprint-planning/workflow.yaml +52 -0
  181. package/bmm/workflows/4-implementation/sprint-status/instructions.md +229 -0
  182. package/bmm/workflows/4-implementation/sprint-status/workflow.yaml +35 -0
  183. package/bmm/workflows/bmad-quick-flow/create-tech-spec/steps/step-01-understand.md +189 -0
  184. package/bmm/workflows/bmad-quick-flow/create-tech-spec/steps/step-02-investigate.md +144 -0
  185. package/bmm/workflows/bmad-quick-flow/create-tech-spec/steps/step-03-generate.md +128 -0
  186. package/bmm/workflows/bmad-quick-flow/create-tech-spec/steps/step-04-review.md +173 -0
  187. package/bmm/workflows/bmad-quick-flow/create-tech-spec/tech-spec-template.md +74 -0
  188. package/bmm/workflows/bmad-quick-flow/create-tech-spec/workflow.md +79 -0
  189. package/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-01-mode-detection.md +156 -0
  190. package/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-02-context-gathering.md +120 -0
  191. package/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-03-execute.md +113 -0
  192. package/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-04-self-check.md +113 -0
  193. package/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-05-adversarial-review.md +106 -0
  194. package/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-06-resolve-findings.md +140 -0
  195. package/bmm/workflows/bmad-quick-flow/quick-dev/workflow.md +52 -0
  196. package/bmm/workflows/document-odoo/steps/step-01-init.md +43 -0
  197. package/bmm/workflows/document-odoo/steps/step-02-readme.md +98 -0
  198. package/bmm/workflows/document-odoo/steps/step-03-user-guide.md +76 -0
  199. package/bmm/workflows/document-odoo/steps/step-04-complete.md +58 -0
  200. package/bmm/workflows/document-odoo/workflow.md +30 -0
  201. package/bmm/workflows/document-project/checklist.md +245 -0
  202. package/bmm/workflows/document-project/documentation-requirements.csv +12 -0
  203. package/bmm/workflows/document-project/instructions.md +221 -0
  204. package/bmm/workflows/document-project/templates/deep-dive-template.md +345 -0
  205. package/bmm/workflows/document-project/templates/index-template.md +169 -0
  206. package/bmm/workflows/document-project/templates/project-overview-template.md +103 -0
  207. package/bmm/workflows/document-project/templates/project-scan-report-schema.json +160 -0
  208. package/bmm/workflows/document-project/templates/source-tree-template.md +135 -0
  209. package/bmm/workflows/document-project/workflow.yaml +28 -0
  210. package/bmm/workflows/document-project/workflows/deep-dive-instructions.md +298 -0
  211. package/bmm/workflows/document-project/workflows/deep-dive.yaml +31 -0
  212. package/bmm/workflows/document-project/workflows/full-scan-instructions.md +1106 -0
  213. package/bmm/workflows/document-project/workflows/full-scan.yaml +31 -0
  214. package/bmm/workflows/excalidraw-diagrams/_shared/excalidraw-library.json +90 -0
  215. package/bmm/workflows/excalidraw-diagrams/_shared/excalidraw-templates.yaml +127 -0
  216. package/bmm/workflows/excalidraw-diagrams/create-dataflow/checklist.md +39 -0
  217. package/bmm/workflows/excalidraw-diagrams/create-dataflow/instructions.md +130 -0
  218. package/bmm/workflows/excalidraw-diagrams/create-dataflow/workflow.yaml +26 -0
  219. package/bmm/workflows/excalidraw-diagrams/create-diagram/checklist.md +43 -0
  220. package/bmm/workflows/excalidraw-diagrams/create-diagram/instructions.md +141 -0
  221. package/bmm/workflows/excalidraw-diagrams/create-diagram/workflow.yaml +26 -0
  222. package/bmm/workflows/excalidraw-diagrams/create-flowchart/checklist.md +49 -0
  223. package/bmm/workflows/excalidraw-diagrams/create-flowchart/instructions.md +241 -0
  224. package/bmm/workflows/excalidraw-diagrams/create-flowchart/workflow.yaml +26 -0
  225. package/bmm/workflows/excalidraw-diagrams/create-wireframe/checklist.md +38 -0
  226. package/bmm/workflows/excalidraw-diagrams/create-wireframe/instructions.md +133 -0
  227. package/bmm/workflows/excalidraw-diagrams/create-wireframe/workflow.yaml +26 -0
  228. package/bmm/workflows/generate-project-context/project-context-template.md +21 -0
  229. package/bmm/workflows/generate-project-context/steps/step-01-discover.md +184 -0
  230. package/bmm/workflows/generate-project-context/steps/step-02-generate.md +318 -0
  231. package/bmm/workflows/generate-project-context/steps/step-03-complete.md +278 -0
  232. package/bmm/workflows/generate-project-context/workflow.md +49 -0
  233. package/bmm/workflows/testarch/atdd/atdd-checklist-template.md +364 -0
  234. package/bmm/workflows/testarch/atdd/checklist.md +374 -0
  235. package/bmm/workflows/testarch/atdd/instructions.md +806 -0
  236. package/bmm/workflows/testarch/atdd/workflow.yaml +45 -0
  237. package/bmm/workflows/testarch/automate/checklist.md +582 -0
  238. package/bmm/workflows/testarch/automate/instructions.md +1324 -0
  239. package/bmm/workflows/testarch/automate/workflow.yaml +52 -0
  240. package/bmm/workflows/testarch/ci/checklist.md +248 -0
  241. package/bmm/workflows/testarch/ci/github-actions-template.yaml +198 -0
  242. package/bmm/workflows/testarch/ci/gitlab-ci-template.yaml +149 -0
  243. package/bmm/workflows/testarch/ci/instructions.md +536 -0
  244. package/bmm/workflows/testarch/ci/workflow.yaml +45 -0
  245. package/bmm/workflows/testarch/framework/checklist.md +321 -0
  246. package/bmm/workflows/testarch/framework/instructions.md +481 -0
  247. package/bmm/workflows/testarch/framework/workflow.yaml +47 -0
  248. package/bmm/workflows/testarch/nfr-assess/checklist.md +407 -0
  249. package/bmm/workflows/testarch/nfr-assess/instructions.md +722 -0
  250. package/bmm/workflows/testarch/nfr-assess/nfr-report-template.md +445 -0
  251. package/bmm/workflows/testarch/nfr-assess/workflow.yaml +47 -0
  252. package/bmm/workflows/testarch/test-design/checklist.md +235 -0
  253. package/bmm/workflows/testarch/test-design/instructions.md +788 -0
  254. package/bmm/workflows/testarch/test-design/test-design-template.md +294 -0
  255. package/bmm/workflows/testarch/test-design/workflow.yaml +54 -0
  256. package/bmm/workflows/testarch/test-review/checklist.md +472 -0
  257. package/bmm/workflows/testarch/test-review/instructions.md +628 -0
  258. package/bmm/workflows/testarch/test-review/test-review-template.md +390 -0
  259. package/bmm/workflows/testarch/test-review/workflow.yaml +46 -0
  260. package/bmm/workflows/testarch/trace/checklist.md +655 -0
  261. package/bmm/workflows/testarch/trace/instructions.md +1047 -0
  262. package/bmm/workflows/testarch/trace/trace-template.md +675 -0
  263. package/bmm/workflows/testarch/trace/workflow.yaml +55 -0
  264. package/bmm/workflows/workflow-status/init/instructions.md +346 -0
  265. package/bmm/workflows/workflow-status/init/workflow.yaml +29 -0
  266. package/bmm/workflows/workflow-status/instructions.md +395 -0
  267. package/bmm/workflows/workflow-status/paths/enterprise-brownfield.yaml +103 -0
  268. package/bmm/workflows/workflow-status/paths/enterprise-greenfield.yaml +100 -0
  269. package/bmm/workflows/workflow-status/paths/method-brownfield.yaml +103 -0
  270. package/bmm/workflows/workflow-status/paths/method-greenfield.yaml +100 -0
  271. package/bmm/workflows/workflow-status/project-levels.yaml +59 -0
  272. package/bmm/workflows/workflow-status/workflow-status-template.yaml +24 -0
  273. package/bmm/workflows/workflow-status/workflow.yaml +30 -0
  274. package/core/agents/bmad-odoo-master.md +61 -0
  275. package/core/config.yaml +7 -0
  276. package/core/resources/README.md +5 -0
  277. package/core/tasks/README.md +7 -0
  278. package/core/workflows/README.md +8 -0
  279. package/index.js +84 -0
  280. package/package.json +48 -0
  281. package/scripts/postinstall.js +447 -0
  282. package/scripts/setup-cli.js +17 -0
@@ -0,0 +1,1047 @@
1
+ # Test Architect Workflow: Requirements Traceability & Quality Gate Decision
2
+
3
+ **Workflow:** `testarch-trace`
4
+ **Purpose:** Generate requirements-to-tests traceability matrix, analyze coverage gaps, and make quality gate decisions (PASS/CONCERNS/FAIL/WAIVED)
5
+ **Agent:** Test Architect (TEA)
6
+ **Format:** Pure Markdown v4.0 (no XML blocks)
7
+
8
+ ---
9
+
10
+ ## Overview
11
+
12
+ This workflow operates in two sequential phases to validate test coverage and deployment readiness:
13
+
14
+ **PHASE 1 - REQUIREMENTS TRACEABILITY:** Create comprehensive traceability matrix mapping acceptance criteria to implemented tests, identify coverage gaps, and provide actionable recommendations.
15
+
16
+ **PHASE 2 - QUALITY GATE DECISION:** Use traceability results combined with test execution evidence to make gate decisions (PASS/CONCERNS/FAIL/WAIVED) that determine deployment readiness.
17
+
18
+ **Key Capabilities:**
19
+
20
+ - Map acceptance criteria to specific test cases across all levels (E2E, API, Component, Unit)
21
+ - Classify coverage status (FULL, PARTIAL, NONE, UNIT-ONLY, INTEGRATION-ONLY)
22
+ - Prioritize gaps by risk level (P0/P1/P2/P3) using test-priorities framework
23
+ - Apply deterministic decision rules based on coverage and test execution results
24
+ - Generate gate decisions with evidence and rationale
25
+ - Support waivers for business-approved exceptions
26
+ - Update workflow status and notify stakeholders
27
+
28
+ ---
29
+
30
+ ## Prerequisites
31
+
32
+ **Required (Phase 1):**
33
+
34
+ - Acceptance criteria (from story file OR provided inline)
35
+ - Implemented test suite (or acknowledge gaps to be addressed)
36
+
37
+ **Required (Phase 2 - if `enable_gate_decision: true`):**
38
+
39
+ - Test execution results (CI/CD test reports, pass/fail rates)
40
+ - Test design with risk priorities (P0/P1/P2/P3)
41
+
42
+ **Recommended:**
43
+
44
+ - `test-design.md` (for risk assessment and priority context)
45
+ - `nfr-assessment.md` (for release-level gates)
46
+ - `tech-spec.md` (for technical implementation context)
47
+ - Test framework configuration (playwright.config.ts, jest.config.js, etc.)
48
+
49
+ **Halt Conditions:**
50
+
51
+ - If story lacks any implemented tests AND no gaps are acknowledged, recommend running `*atdd` workflow first
52
+ - If acceptance criteria are completely missing, halt and request them
53
+ - If Phase 2 enabled but test execution results missing, warn and skip gate decision
54
+
55
+ Note: `*trace` never runs `*atdd` automatically; it only recommends running it when tests are missing.
56
+
57
+ ---
58
+
59
+ ## PHASE 1: REQUIREMENTS TRACEABILITY
60
+
61
+ This phase focuses on mapping requirements to tests, analyzing coverage, and identifying gaps.
62
+
63
+ ---
64
+
65
+ ### Step 1: Load Context and Knowledge Base
66
+
67
+ **Actions:**
68
+
69
+ 1. Load relevant knowledge fragments from `{project-root}/_bmad/bmm/testarch/tea-index.csv`:
70
+ - `test-priorities-matrix.md` - P0/P1/P2/P3 risk framework with automated priority calculation, risk-based mapping, tagging strategy (389 lines, 2 examples)
71
+ - `risk-governance.md` - Risk-based testing approach: 6 categories (TECH, SEC, PERF, DATA, BUS, OPS), automated scoring, gate decision engine, coverage traceability (625 lines, 4 examples)
72
+ - `probability-impact.md` - Risk scoring methodology: probability × impact matrix, automated classification, dynamic re-assessment, gate integration (604 lines, 4 examples)
73
+ - `test-quality.md` - Definition of Done for tests: deterministic, isolated with cleanup, explicit assertions, length/time limits (658 lines, 5 examples)
74
+ - `selective-testing.md` - Duplicate coverage patterns: tag-based, spec filters, diff-based selection, promotion rules (727 lines, 4 examples)
75
+
76
+ 2. Read story file (if provided):
77
+ - Extract acceptance criteria
78
+ - Identify story ID (e.g., 1.3)
79
+ - Note any existing test design or priority information
80
+
81
+ 3. Read related BMad artifacts (if available):
82
+ - `test-design.md` - Risk assessment and test priorities
83
+ - `tech-spec.md` - Technical implementation details
84
+ - `PRD.md` - Product requirements context
85
+
86
+ **Output:** Complete understanding of requirements, priorities, and existing context
87
+
88
+ ---
89
+
90
+ ### Step 2: Discover and Catalog Tests
91
+
92
+ **Actions:**
93
+
94
+ 1. Auto-discover test files related to the story:
95
+ - Search for test IDs (e.g., `1.3-E2E-001`, `1.3-UNIT-005`)
96
+ - Search for describe blocks mentioning feature name
97
+ - Search for file paths matching feature directory
98
+ - Use `glob` to find test files in `{test_dir}`
99
+
100
+ 2. Categorize tests by level:
101
+ - **E2E Tests**: Full user journeys through UI
102
+ - **API Tests**: HTTP contract and integration tests
103
+ - **Component Tests**: UI component behavior in isolation
104
+ - **Unit Tests**: Business logic and pure functions
105
+
106
+ 3. Extract test metadata:
107
+ - Test ID (if present)
108
+ - Describe/context blocks
109
+ - It blocks (individual test cases)
110
+ - Given-When-Then structure (if BDD)
111
+ - Assertions used
112
+ - Priority markers (P0/P1/P2/P3)
113
+
114
+ **Output:** Complete catalog of all tests for this feature
115
+
116
+ ---
117
+
118
+ ### Step 3: Map Criteria to Tests
119
+
120
+ **Actions:**
121
+
122
+ 1. For each acceptance criterion:
123
+ - Search for explicit references (test IDs, describe blocks mentioning criterion)
124
+ - Map to specific test files and it blocks
125
+ - Use Given-When-Then narrative to verify alignment
126
+ - Document test level (E2E, API, Component, Unit)
127
+
128
+ 2. Build traceability matrix:
129
+
130
+ ```
131
+ | Criterion ID | Description | Test ID | Test File | Test Level | Coverage Status |
132
+ | ------------ | ----------- | ----------- | ---------------- | ---------- | --------------- |
133
+ | AC-1 | User can... | 1.3-E2E-001 | e2e/auth.spec.ts | E2E | FULL |
134
+ ```
135
+
136
+ 3. Classify coverage status for each criterion:
137
+ - **FULL**: All scenarios validated at appropriate level(s)
138
+ - **PARTIAL**: Some coverage but missing edge cases or levels
139
+ - **NONE**: No test coverage at any level
140
+ - **UNIT-ONLY**: Only unit tests (missing integration/E2E validation)
141
+ - **INTEGRATION-ONLY**: Only API/Component tests (missing unit confidence)
142
+
143
+ 4. Check for duplicate coverage:
144
+ - Same behavior tested at multiple levels unnecessarily
145
+ - Flag violations of selective testing principles
146
+ - Recommend consolidation where appropriate
147
+
148
+ **Output:** Complete traceability matrix with coverage classifications
149
+
150
+ ---
151
+
152
+ ### Step 4: Analyze Gaps and Prioritize
153
+
154
+ **Actions:**
155
+
156
+ 1. Identify coverage gaps:
157
+ - List criteria with NONE, PARTIAL, UNIT-ONLY, or INTEGRATION-ONLY status
158
+ - Assign severity based on test-priorities framework:
159
+ - **CRITICAL**: P0 criteria without FULL coverage (blocks release)
160
+ - **HIGH**: P1 criteria without FULL coverage (PR blocker)
161
+ - **MEDIUM**: P2 criteria without FULL coverage (nightly test gap)
162
+ - **LOW**: P3 criteria without FULL coverage (acceptable gap)
163
+
164
+ 2. Recommend specific tests to add:
165
+ - Suggest test level (E2E, API, Component, Unit)
166
+ - Provide test description (Given-When-Then)
167
+ - Recommend test ID (e.g., `1.3-E2E-004`)
168
+ - Explain why this test is needed
169
+
170
+ 3. Calculate coverage metrics:
171
+ - Overall coverage percentage (criteria with FULL coverage / total criteria)
172
+ - P0 coverage percentage (critical paths)
173
+ - P1 coverage percentage (high priority)
174
+ - Coverage by level (E2E%, API%, Component%, Unit%)
175
+
176
+ 4. Check against quality gates:
177
+ - P0 coverage >= 100% (required)
178
+ - P1 coverage >= 90% (recommended)
179
+ - Overall coverage >= 80% (recommended)
180
+
181
+ **Output:** Prioritized gap analysis with actionable recommendations and coverage metrics
182
+
183
+ ---
184
+
185
+ ### Step 5: Verify Test Quality
186
+
187
+ **Actions:**
188
+
189
+ 1. For each mapped test, verify:
190
+ - Explicit assertions are present (not hidden in helpers)
191
+ - Test follows Given-When-Then structure
192
+ - No hard waits or sleeps
193
+ - Self-cleaning (test cleans up its data)
194
+ - File size < 300 lines
195
+ - Test duration < 90 seconds
196
+
197
+ 2. Flag quality issues:
198
+ - **BLOCKER**: Missing assertions, hard waits, flaky patterns
199
+ - **WARNING**: Large files, slow tests, unclear structure
200
+ - **INFO**: Style inconsistencies, missing documentation
201
+
202
+ 3. Reference knowledge fragments:
203
+ - `test-quality.md` for Definition of Done
204
+ - `fixture-architecture.md` for self-cleaning patterns
205
+ - `network-first.md` for Playwright best practices
206
+ - `data-factories.md` for test data patterns
207
+
208
+ **Output:** Quality assessment for each test with improvement recommendations
209
+
210
+ ---
211
+
212
+ ### Step 6: Generate Deliverables (Phase 1)
213
+
214
+ **Actions:**
215
+
216
+ 1. Create traceability matrix markdown file:
217
+ - Use template from `trace-template.md`
218
+ - Include full mapping table
219
+ - Add coverage status section
220
+ - Add gap analysis section
221
+ - Add quality assessment section
222
+ - Add recommendations section
223
+ - Save to `{output_folder}/traceability-matrix.md`
224
+
225
+ 2. Generate gate YAML snippet (if enabled):
226
+
227
+ ```yaml
228
+ traceability:
229
+ story_id: '1.3'
230
+ coverage:
231
+ overall: 85%
232
+ p0: 100%
233
+ p1: 90%
234
+ p2: 75%
235
+ gaps:
236
+ critical: 0
237
+ high: 1
238
+ medium: 2
239
+ status: 'PASS' # or "FAIL" if P0 < 100%
240
+ ```
241
+
242
+ 3. Create coverage badge/metric (if enabled):
243
+ - Generate badge markdown: `![Coverage](https://img.shields.io/badge/coverage-85%25-green)`
244
+ - Export metrics to JSON for CI/CD integration
245
+
246
+ 4. Update story file (if enabled):
247
+ - Add "Traceability" section to story markdown
248
+ - Link to traceability matrix
249
+ - Include coverage summary
250
+ - Add gate status
251
+
252
+ **Output:** Complete Phase 1 traceability deliverables
253
+
254
+ **Next:** If `enable_gate_decision: true`, proceed to Phase 2. Otherwise, workflow complete.
255
+
256
+ ---
257
+
258
+ ## PHASE 2: QUALITY GATE DECISION
259
+
260
+ This phase uses traceability results to make a quality gate decision (PASS/CONCERNS/FAIL/WAIVED) based on evidence and decision rules.
261
+
262
+ **When Phase 2 Runs:** Automatically after Phase 1 if `enable_gate_decision: true` (default: true)
263
+
264
+ **Skip Conditions:** If test execution results (`test_results`) not provided, warn and skip Phase 2.
265
+
266
+ ---
267
+
268
+ ### Step 7: Gather Quality Evidence
269
+
270
+ **Actions:**
271
+
272
+ 1. **Load Phase 1 traceability results** (inherited context):
273
+ - Coverage metrics (P0/P1/overall percentages)
274
+ - Gap analysis (missing/partial tests)
275
+ - Quality concerns (test quality flags)
276
+ - Traceability matrix
277
+
278
+ 2. **Load test execution results** (if `test_results` provided):
279
+ - Read CI/CD test reports (JUnit XML, TAP, JSON)
280
+ - Extract pass/fail counts by priority
281
+ - Calculate pass rates:
282
+ - **P0 pass rate**: `(P0 passed / P0 total) * 100`
283
+ - **P1 pass rate**: `(P1 passed / P1 total) * 100`
284
+ - **Overall pass rate**: `(All passed / All total) * 100`
285
+ - Identify failing tests and map to criteria
286
+
287
+ 3. **Load NFR assessment** (if `nfr_file` provided):
288
+ - Read `nfr-assessment.md` or similar
289
+ - Check critical NFR status (performance, security, scalability)
290
+ - Flag any critical NFR failures
291
+
292
+ 4. **Load supporting artifacts**:
293
+ - `test-design.md` → Risk priorities, DoD checklist
294
+ - `story-*.md` or `Epics.md` → Requirements context
295
+ - `bmm-workflow-status.md` → Workflow completion status (if `check_all_workflows_complete: true`)
296
+
297
+ 5. **Validate evidence freshness** (if `validate_evidence_freshness: true`):
298
+ - Check timestamps of test-design, traceability, NFR assessments
299
+ - Warn if artifacts are >7 days old
300
+
301
+ 6. **Check prerequisite workflows** (if `check_all_workflows_complete: true`):
302
+ - Verify test-design workflow complete
303
+ - Verify trace workflow complete (Phase 1)
304
+ - Verify nfr-assess workflow complete (if release-level gate)
305
+
306
+ **Output:** Consolidated evidence bundle with all quality signals
307
+
308
+ ---
309
+
310
+ ### Step 8: Apply Decision Rules
311
+
312
+ **If `decision_mode: "deterministic"`** (rule-based - default):
313
+
314
+ **Decision rules** (based on `workflow.yaml` thresholds):
315
+
316
+ 1. **PASS** if ALL of the following are true:
317
+ - P0 coverage ≥ `min_p0_coverage` (default: 100%)
318
+ - P1 coverage ≥ `min_p1_coverage` (default: 90%)
319
+ - Overall coverage ≥ `min_overall_coverage` (default: 80%)
320
+ - P0 test pass rate = `min_p0_pass_rate` (default: 100%)
321
+ - P1 test pass rate ≥ `min_p1_pass_rate` (default: 95%)
322
+ - Overall test pass rate ≥ `min_overall_pass_rate` (default: 90%)
323
+ - Critical NFRs passed (if `nfr_file` provided)
324
+ - No unresolved security issues ≤ `max_security_issues` (default: 0)
325
+ - No test quality red flags (hard waits, no assertions)
326
+
327
+ 2. **CONCERNS** if ANY of the following are true:
328
+ - P1 coverage 80-89% (below threshold but not critical)
329
+ - P1 test pass rate 90-94% (below threshold but not critical)
330
+ - Overall pass rate 85-89%
331
+ - P2 coverage <50% (informational)
332
+ - Some non-critical NFRs failing
333
+ - Minor test quality concerns (large test files, inferred mappings)
334
+ - **Note**: CONCERNS does NOT block deployment but requires acknowledgment
335
+
336
+ 3. **FAIL** if ANY of the following are true:
337
+ - P0 coverage <100% (missing critical tests)
338
+ - P0 test pass rate <100% (failing critical tests)
339
+ - P1 coverage <80% (significant gap)
340
+ - P1 test pass rate <90% (significant failures)
341
+ - Overall coverage <80%
342
+ - Overall pass rate <85%
343
+ - Critical NFRs failing (`max_critical_nfrs_fail` exceeded)
344
+ - Unresolved security issues (`max_security_issues` exceeded)
345
+ - Major test quality issues (tests with no assertions, pervasive hard waits)
346
+
347
+ 4. **WAIVED** (only if `allow_waivers: true`):
348
+ - Decision would be FAIL based on rules above
349
+ - Business stakeholder has approved waiver
350
+ - Waiver documented with:
351
+ - Justification (time constraint, known limitation, acceptable risk)
352
+ - Approver name and date
353
+ - Mitigation plan (follow-up stories, manual testing)
354
+ - Waiver evidence linked (email, Slack thread, ticket)
355
+
356
+ **Risk tolerance adjustments:**
357
+
358
+ - If `allow_p2_failures: true` → P2 test failures do NOT affect gate decision
359
+ - If `allow_p3_failures: true` → P3 test failures do NOT affect gate decision
360
+ - If `escalate_p1_failures: true` → P1 failures require explicit manager/lead approval
361
+
362
+ **If `decision_mode: "manual"`:**
363
+
364
+ - Present evidence summary to team
365
+ - Recommend decision based on rules above
366
+ - Team makes final call in meeting/chat
367
+ - Document decision with approver names
368
+
369
+ **Output:** Gate decision (PASS/CONCERNS/FAIL/WAIVED) with rule-based rationale
370
+
371
+ ---
372
+
373
+ ### Step 9: Document Decision and Evidence
374
+
375
+ **Actions:**
376
+
377
+ 1. **Create gate decision document**:
378
+ - Save to `gate_output_file` (default: `{output_folder}/gate-decision-{gate_type}-{story_id}.md`)
379
+ - Use structure below
380
+
381
+ 2. **Document structure**:
382
+
383
+ ```markdown
384
+ # Quality Gate Decision: {gate_type} {story_id/epic_num/release_version}
385
+
386
+ **Decision**: [PASS / CONCERNS / FAIL / WAIVED]
387
+ **Date**: {date}
388
+ **Decider**: {decision_mode} (deterministic | manual)
389
+ **Evidence Date**: {test_results_date}
390
+
391
+ ---
392
+
393
+ ## Summary
394
+
395
+ [1-2 sentence summary of decision and key factors]
396
+
397
+ ---
398
+
399
+ ## Decision Criteria
400
+
401
+ | Criterion | Threshold | Actual | Status |
402
+ | ----------------- | --------- | -------- | ------- |
403
+ | P0 Coverage | ≥100% | 100% | ✅ PASS |
404
+ | P1 Coverage | ≥90% | 88% | ⚠️ FAIL |
405
+ | Overall Coverage | ≥80% | 92% | ✅ PASS |
406
+ | P0 Pass Rate | 100% | 100% | ✅ PASS |
407
+ | P1 Pass Rate | ≥95% | 98% | ✅ PASS |
408
+ | Overall Pass Rate | ≥90% | 96% | ✅ PASS |
409
+ | Critical NFRs | All Pass | All Pass | ✅ PASS |
410
+ | Security Issues | 0 | 0 | ✅ PASS |
411
+
412
+ **Overall Status**: 7/8 criteria met → Decision: **CONCERNS**
413
+
414
+ ---
415
+
416
+ ## Evidence Summary
417
+
418
+ ### Test Coverage (from Phase 1 Traceability)
419
+
420
+ - **P0 Coverage**: 100% (5/5 criteria fully covered)
421
+ - **P1 Coverage**: 88% (7/8 criteria fully covered)
422
+ - **Overall Coverage**: 92% (12/13 criteria covered)
423
+ - **Gap**: AC-5 (P1) missing E2E test
424
+
425
+ ### Test Execution Results
426
+
427
+ - **P0 Pass Rate**: 100% (12/12 tests passed)
428
+ - **P1 Pass Rate**: 98% (45/46 tests passed)
429
+ - **Overall Pass Rate**: 96% (67/70 tests passed)
430
+ - **Failures**: 3 P2 tests (non-blocking)
431
+
432
+ ### Non-Functional Requirements
433
+
434
+ - Performance: ✅ PASS (response time <500ms)
435
+ - Security: ✅ PASS (no vulnerabilities)
436
+ - Scalability: ✅ PASS (handles 10K users)
437
+
438
+ ### Test Quality
439
+
440
+ - All tests have explicit assertions ✅
441
+ - No hard waits detected ✅
442
+ - Test files <300 lines ✅
443
+ - Test IDs follow convention ✅
444
+
445
+ ---
446
+
447
+ ## Decision Rationale
448
+
449
+ **Why CONCERNS (not PASS)**:
450
+
451
+ - P1 coverage at 88% is below 90% threshold
452
+ - AC-5 (P1 priority) missing E2E test for error handling scenario
453
+ - This is a known gap from test-design phase
454
+
455
+ **Why CONCERNS (not FAIL)**:
456
+
457
+ - P0 coverage is 100% (critical paths validated)
458
+ - Overall coverage is 92% (above 80% threshold)
459
+ - Test pass rate is excellent (96% overall)
460
+ - Gap is isolated to one P1 criterion (not systemic)
461
+
462
+ **Recommendation**:
463
+
464
+ - Acknowledge gap and proceed with deployment
465
+ - Add missing AC-5 E2E test in next sprint
466
+ - Create follow-up story: "Add E2E test for AC-5 error handling"
467
+
468
+ ---
469
+
470
+ ## Next Steps
471
+
472
+ - [ ] Create follow-up story for AC-5 E2E test
473
+ - [ ] Deploy to staging environment
474
+ - [ ] Monitor production for edge cases related to AC-5
475
+ - [ ] Update traceability matrix after follow-up test added
476
+
477
+ ---
478
+
479
+ ## References
480
+
481
+ - Traceability Matrix: `_bmad/output/traceability-matrix.md`
482
+ - Test Design: `_bmad/output/test-design-epic-2.md`
483
+ - Test Results: `ci-artifacts/test-report-2025-01-15.xml`
484
+ - NFR Assessment: `_bmad/output/nfr-assessment-release-1.2.md`
485
+ ```
486
+
487
+ 3. **Include evidence links** (if `require_evidence: true`):
488
+ - Link to traceability matrix
489
+ - Link to test execution reports (CI artifacts)
490
+ - Link to NFR assessment
491
+ - Link to test-design document
492
+ - Link to relevant PRs, commits, deployments
493
+
494
+ 4. **Waiver documentation** (if decision is WAIVED):
495
+ - Approver name and role (e.g., "Jane Doe, Engineering Manager")
496
+ - Approval date and method (e.g., "2025-01-15, Slack thread")
497
+ - Justification (e.g., "Time-boxed MVP, missing tests will be added in v1.1")
498
+ - Mitigation plan (e.g., "Manual testing by QA, follow-up stories created")
499
+ - Evidence link (e.g., "Slack: #engineering 2025-01-15 3:42pm")
500
+
501
+ **Output:** Complete gate decision document with evidence and rationale
502
+
503
+ ---
504
+
505
+ ### Step 10: Update Status Tracking and Notify
506
+
507
+ **Actions:**
508
+
509
+ 1. **Update workflow status** (if `append_to_history: true`):
510
+ - Append gate decision to `bmm-workflow-status.md` under "Gate History" section
511
+ - Format:
512
+
513
+ ```markdown
514
+ ## Gate History
515
+
516
+ ### Story 1.3 - User Login (2025-01-15)
517
+
518
+ - **Decision**: CONCERNS
519
+ - **Reason**: P1 coverage 88% (below 90%)
520
+ - **Document**: [gate-decision-story-1.3.md](_bmad/output/gate-decision-story-1.3.md)
521
+ - **Action**: Deploy with follow-up story for AC-5
522
+ ```
523
+
524
+ 2. **Generate stakeholder notification** (if `notify_stakeholders: true`):
525
+ - Create concise summary message for team communication
526
+ - Include: Decision, key metrics, action items
527
+ - Format for Slack/email/chat:
528
+
529
+ ```
530
+ 🚦 Quality Gate Decision: Story 1.3 - User Login
531
+
532
+ Decision: ⚠️ CONCERNS
533
+ - P0 Coverage: ✅ 100%
534
+ - P1 Coverage: ⚠️ 88% (below 90%)
535
+ - Test Pass Rate: ✅ 96%
536
+
537
+ Action Required:
538
+ - Create follow-up story for AC-5 E2E test
539
+ - Deploy to staging for validation
540
+
541
+ Full Report: _bmad/output/gate-decision-story-1.3.md
542
+ ```
543
+
544
+ 3. **Request sign-off** (if `require_sign_off: true`):
545
+ - Prompt for named approver (tech lead, QA lead, PM)
546
+ - Document approver name and timestamp in gate decision
547
+ - Block until sign-off received (interactive prompt)
548
+
549
+ **Output:** Status tracking updated, stakeholders notified, sign-off obtained (if required)
550
+
551
+ **Workflow Complete**: Both Phase 1 (traceability) and Phase 2 (gate decision) deliverables generated.
552
+
553
+ ---
554
+
555
+ ## Decision Matrix (Quick Reference)
556
+
557
+ | Scenario | P0 Cov | P1 Cov | Overall Cov | P0 Pass | P1 Pass | Overall Pass | NFRs | Decision |
558
+ | --------------- | ----------------- | ------ | ----------- | ------- | ------- | ------------ | ---- | ------------ |
559
+ | All green | 100% | ≥90% | ≥80% | 100% | ≥95% | ≥90% | Pass | **PASS** |
560
+ | Minor gap | 100% | 80-89% | ≥80% | 100% | 90-94% | 85-89% | Pass | **CONCERNS** |
561
+ | Missing P0 | <100% | - | - | - | - | - | - | **FAIL** |
562
+ | P0 test fail | 100% | - | - | <100% | - | - | - | **FAIL** |
563
+ | P1 gap | 100% | <80% | - | 100% | - | - | - | **FAIL** |
564
+ | NFR fail | 100% | ≥90% | ≥80% | 100% | ≥95% | ≥90% | Fail | **FAIL** |
565
+ | Security issue | - | - | - | - | - | - | Yes | **FAIL** |
566
+ | Business waiver | [FAIL conditions] | - | - | - | - | - | - | **WAIVED** |
567
+
568
+ ---
569
+
570
+ ## Waiver Management
571
+
572
+ **When to use waivers:**
573
+
574
+ - Time-boxed MVP releases (known gaps, follow-up planned)
575
+ - Low-risk P1 gaps with mitigation (manual testing, monitoring)
576
+ - Technical debt acknowledged by product/engineering leadership
577
+ - External dependencies blocking test automation
578
+
579
+ **Waiver approval process:**
580
+
581
+ 1. Document gap and risk in gate decision
582
+ 2. Propose mitigation plan (manual testing, follow-up stories, monitoring)
583
+ 3. Request approval from stakeholder (EM, PM, QA lead)
584
+ 4. Link approval evidence (email, chat thread, meeting notes)
585
+ 5. Add waiver to gate decision document
586
+ 6. Create follow-up stories to close gaps
587
+
588
+ **Waiver does NOT apply to:**
589
+
590
+ - P0 gaps (always blocking)
591
+ - Critical security issues (always blocking)
592
+ - Critical NFR failures (performance, data integrity)
593
+
594
+ ---
595
+
596
+ ## Example Gate Decisions
597
+
598
+ ### Example 1: PASS (All Criteria Met)
599
+
600
+ ```
601
+ Decision: ✅ PASS
602
+
603
+ Summary: All quality criteria met. Story 1.3 is ready for production deployment.
604
+
605
+ Evidence:
606
+ - P0 Coverage: 100% (5/5 criteria)
607
+ - P1 Coverage: 95% (19/20 criteria)
608
+ - Overall Coverage: 92% (24/26 criteria)
609
+ - P0 Pass Rate: 100% (12/12 tests)
610
+ - P1 Pass Rate: 98% (45/46 tests)
611
+ - Overall Pass Rate: 96% (67/70 tests)
612
+ - NFRs: All pass (performance, security, scalability)
613
+
614
+ Action: Deploy to production ✅
615
+ ```
616
+
617
+ ### Example 2: CONCERNS (Minor Gap, Non-Blocking)
618
+
619
+ ```
620
+ Decision: ⚠️ CONCERNS
621
+
622
+ Summary: P1 coverage slightly below threshold (88% vs 90%). Recommend deploying with follow-up story.
623
+
624
+ Evidence:
625
+ - P0 Coverage: 100% ✅
626
+ - P1 Coverage: 88% ⚠️ (below 90%)
627
+ - Overall Coverage: 92% ✅
628
+ - Test Pass Rate: 96% ✅
629
+ - Gap: AC-5 (P1) missing E2E test
630
+
631
+ Action:
632
+ - Deploy to staging for validation
633
+ - Create follow-up story for AC-5 E2E test
634
+ - Monitor production for edge cases related to AC-5
635
+ ```
636
+
637
+ ### Example 3: FAIL (P0 Gap, Blocking)
638
+
639
+ ```
640
+ Decision: ❌ FAIL
641
+
642
+ Summary: P0 coverage incomplete. Missing critical validation test. BLOCKING deployment.
643
+
644
+ Evidence:
645
+ - P0 Coverage: 80% ❌ (4/5 criteria, AC-2 missing)
646
+ - AC-2: "User cannot login with invalid credentials" (P0 priority)
647
+ - No tests validate login security for invalid credentials
648
+ - This is a critical security gap
649
+
650
+ Action:
651
+ - Add P0 test for AC-2: 1.3-E2E-004 (invalid credentials)
652
+ - Re-run traceability after test added
653
+ - Re-evaluate gate decision after P0 coverage = 100%
654
+
655
+ Deployment BLOCKED until P0 gap resolved ❌
656
+ ```
657
+
658
+ ### Example 4: WAIVED (Business Decision)
659
+
660
+ ```
661
+ Decision: ⚠️ WAIVED
662
+
663
+ Summary: P1 coverage below threshold (75% vs 90%), but waived for MVP launch.
664
+
665
+ Evidence:
666
+ - P0 Coverage: 100% ✅
667
+ - P1 Coverage: 75% ❌ (below 90%)
668
+ - Gap: 5 P1 criteria missing E2E tests (error handling, edge cases)
669
+
670
+ Waiver:
671
+ - Approver: Jane Doe, Engineering Manager
672
+ - Date: 2025-01-15
673
+ - Justification: Time-boxed MVP for investor demo. Core functionality (P0) fully validated. P1 gaps are low-risk edge cases.
674
+ - Mitigation: Manual QA testing for P1 scenarios, follow-up stories created for automated tests in v1.1
675
+ - Evidence: Slack #engineering 2025-01-15 3:42pm
676
+
677
+ Action:
678
+ - Deploy to production with manual QA validation ✅
679
+ - Add 5 E2E tests for P1 gaps in v1.1 sprint
680
+ - Monitor production logs for edge case occurrences
681
+ ```
682
+
683
+ ---
684
+
685
+ ## Non-Prescriptive Approach
686
+
687
+ **Minimal Examples:** This workflow provides principles and patterns, not rigid templates. Teams should adapt the traceability and gate decision formats to their needs.
688
+
689
+ **Key Patterns to Follow:**
690
+
691
+ - Map criteria to tests explicitly (don't rely on inference alone)
692
+ - Prioritize by risk (P0 gaps are critical, P3 gaps are acceptable)
693
+ - Check coverage at appropriate levels (E2E for journeys, Unit for logic)
694
+ - Verify test quality (explicit assertions, no flakiness)
695
+ - Apply deterministic gate rules for consistency
696
+ - Document gate decisions with clear evidence
697
+ - Use waivers judiciously (business approved, mitigation planned)
698
+
699
+ **Extend as Needed:**
700
+
701
+ - Add custom coverage classifications
702
+ - Integrate with code coverage tools (Istanbul, NYC)
703
+ - Link to external traceability systems (JIRA, Azure DevOps)
704
+ - Add compliance or regulatory requirements
705
+ - Customize gate decision thresholds per project
706
+ - Add manual approval workflows for gate decisions
707
+
708
+ ---
709
+
710
+ ## Coverage Classification Details
711
+
712
+ ### FULL Coverage
713
+
714
+ - All scenarios validated at appropriate test level(s)
715
+ - Edge cases considered
716
+ - Both happy path and error paths tested
717
+ - Assertions are explicit and complete
718
+
719
+ ### PARTIAL Coverage
720
+
721
+ - Some scenarios validated but missing edge cases
722
+ - Only happy path tested (missing error paths)
723
+ - Assertions present but incomplete
724
+ - Coverage exists but needs enhancement
725
+
726
+ ### NONE Coverage
727
+
728
+ - No tests found for this criterion
729
+ - Complete gap requiring new tests
730
+ - Critical if P0/P1, acceptable if P3
731
+
732
+ ### UNIT-ONLY Coverage
733
+
734
+ - Only unit tests exist (business logic validated)
735
+ - Missing integration or E2E validation
736
+ - Risk: Implementation may not work end-to-end
737
+ - Recommendation: Add integration or E2E tests for critical paths
738
+
739
+ ### INTEGRATION-ONLY Coverage
740
+
741
+ - Only API or Component tests exist
742
+ - Missing unit test confidence for business logic
743
+ - Risk: Logic errors may not be caught quickly
744
+ - Recommendation: Add unit tests for complex algorithms or state machines
745
+
746
+ ---
747
+
748
+ ## Duplicate Coverage Detection
749
+
750
+ Use selective testing principles from `selective-testing.md`:
751
+
752
+ **Acceptable Overlap:**
753
+
754
+ - Unit tests for business logic + E2E tests for user journey (different aspects)
755
+ - API tests for contract + E2E tests for full workflow (defense in depth for critical paths)
756
+
757
+ **Unacceptable Duplication:**
758
+
759
+ - Same validation at multiple levels (e.g., E2E testing math logic better suited for unit tests)
760
+ - Multiple E2E tests covering identical user path
761
+ - Component tests duplicating unit test logic
762
+
763
+ **Recommendation Pattern:**
764
+
765
+ - Test logic at unit level
766
+ - Test integration at API/Component level
767
+ - Test user experience at E2E level
768
+ - Avoid testing framework behavior at any level
769
+
770
+ ---
771
+
772
+ ## Integration with BMad Artifacts
773
+
774
+ ### With test-design.md
775
+
776
+ - Use risk assessment to prioritize gap remediation
777
+ - Reference test priorities (P0/P1/P2/P3) for severity classification and gate decision
778
+ - Align traceability with originally planned test coverage
779
+
780
+ ### With tech-spec.md
781
+
782
+ - Understand technical implementation details
783
+ - Map criteria to specific code modules
784
+ - Verify tests cover technical edge cases
785
+
786
+ ### With PRD.md
787
+
788
+ - Understand full product context
789
+ - Verify acceptance criteria align with product goals
790
+ - Check for unstated requirements that need coverage
791
+
792
+ ### With nfr-assessment.md
793
+
794
+ - Load non-functional validation results for gate decision
795
+ - Check critical NFR status (performance, security, scalability)
796
+ - Include NFR pass/fail in gate decision criteria
797
+
798
+ ---
799
+
800
+ ## Quality Gates (Phase 1 Recommendations)
801
+
802
+ ### P0 Coverage (Critical Paths)
803
+
804
+ - **Requirement:** 100% FULL coverage
805
+ - **Severity:** BLOCKER if not met
806
+ - **Action:** Do not release until P0 coverage is complete
807
+
808
+ ### P1 Coverage (High Priority)
809
+
810
+ - **Requirement:** 90% FULL coverage
811
+ - **Severity:** HIGH if not met
812
+ - **Action:** Block PR merge until addressed
813
+
814
+ ### P2 Coverage (Medium Priority)
815
+
816
+ - **Requirement:** No strict requirement (recommended 80%)
817
+ - **Severity:** MEDIUM if gaps exist
818
+ - **Action:** Address in nightly test improvements
819
+
820
+ ### P3 Coverage (Low Priority)
821
+
822
+ - **Requirement:** No requirement
823
+ - **Severity:** LOW if gaps exist
824
+ - **Action:** Optional - add if time permits
825
+
826
+ ---
827
+
828
+ ## Example Traceability Matrix
829
+
830
+ ````markdown
831
+ # Traceability Matrix - Story 1.3
832
+
833
+ **Story:** User Authentication
834
+ **Date:** 2025-10-14
835
+ **Status:** 85% Coverage (1 HIGH gap)
836
+
837
+ ## Coverage Summary
838
+
839
+ | Priority | Total Criteria | FULL Coverage | Coverage % | Status |
840
+ | --------- | -------------- | ------------- | ---------- | ------- |
841
+ | P0 | 3 | 3 | 100% | ✅ PASS |
842
+ | P1 | 5 | 4 | 80% | ⚠️ WARN |
843
+ | P2 | 4 | 3 | 75% | ✅ PASS |
844
+ | P3 | 2 | 1 | 50% | ✅ PASS |
845
+ | **Total** | **14** | **11** | **79%** | ⚠️ WARN |
846
+
847
+ ## Detailed Mapping
848
+
849
+ ### AC-1: User can login with email and password (P0)
850
+
851
+ - **Coverage:** FULL ✅
852
+ - **Tests:**
853
+ - `1.3-E2E-001` - tests/e2e/auth.spec.ts:12
854
+ - Given: User has valid credentials
855
+ - When: User submits login form
856
+ - Then: User is redirected to dashboard
857
+ - `1.3-UNIT-001` - tests/unit/auth-service.spec.ts:8
858
+ - Given: Valid email and password hash
859
+ - When: validateCredentials is called
860
+ - Then: Returns user object
861
+
862
+ ### AC-2: User sees error for invalid credentials (P0)
863
+
864
+ - **Coverage:** FULL ✅
865
+ - **Tests:**
866
+ - `1.3-E2E-002` - tests/e2e/auth.spec.ts:28
867
+ - Given: User has invalid password
868
+ - When: User submits login form
869
+ - Then: Error message is displayed
870
+ - `1.3-UNIT-002` - tests/unit/auth-service.spec.ts:18
871
+ - Given: Invalid password hash
872
+ - When: validateCredentials is called
873
+ - Then: Throws AuthenticationError
874
+
875
+ ### AC-3: User can reset password via email (P1)
876
+
877
+ - **Coverage:** PARTIAL ⚠️
878
+ - **Tests:**
879
+ - `1.3-E2E-003` - tests/e2e/auth.spec.ts:44
880
+ - Given: User requests password reset
881
+ - When: User clicks reset link
882
+ - Then: User can set new password
883
+ - **Gaps:**
884
+ - Missing: Email delivery validation
885
+ - Missing: Expired token handling
886
+ - Missing: Unit test for token generation
887
+ - **Recommendation:** Add `1.3-API-001` for email service integration and `1.3-UNIT-003` for token logic
888
+
889
+ ## Gap Analysis
890
+
891
+ ### Critical Gaps (BLOCKER)
892
+
893
+ - None ✅
894
+
895
+ ### High Priority Gaps (PR BLOCKER)
896
+
897
+ 1. **AC-3: Password reset email edge cases**
898
+ - Missing tests for expired tokens, invalid tokens, email failures
899
+ - Recommend: `1.3-API-001` (email service integration) and `1.3-E2E-004` (error paths)
900
+ - Impact: Users may not be able to recover accounts in error scenarios
901
+
902
+ ### Medium Priority Gaps (Nightly)
903
+
904
+ 1. **AC-7: Session timeout handling** - UNIT-ONLY coverage (missing E2E validation)
905
+
906
+ ## Quality Assessment
907
+
908
+ ### Tests with Issues
909
+
910
+ - `1.3-E2E-001` ⚠️ - 145 seconds (exceeds 90s target) - Optimize fixture setup
911
+ - `1.3-UNIT-005` ⚠️ - 320 lines (exceeds 300 line limit) - Split into multiple test files
912
+
913
+ ### Tests Passing Quality Gates
914
+
915
+ - 11/13 tests (85%) meet all quality criteria ✅
916
+
917
+ ## Gate YAML Snippet
918
+
919
+ ```yaml
920
+ traceability:
921
+ story_id: '1.3'
922
+ coverage:
923
+ overall: 79%
924
+ p0: 100%
925
+ p1: 80%
926
+ p2: 75%
927
+ p3: 50%
928
+ gaps:
929
+ critical: 0
930
+ high: 1
931
+ medium: 1
932
+ low: 1
933
+ status: 'WARN' # P1 coverage below 90% threshold
934
+ recommendations:
935
+ - 'Add 1.3-API-001 for email service integration'
936
+ - 'Add 1.3-E2E-004 for password reset error paths'
937
+ - 'Optimize 1.3-E2E-001 performance (145s → <90s)'
938
+ ```
939
+ ````
940
+
941
+ ## Recommendations
942
+
943
+ 1. **Address High Priority Gap:** Add password reset edge case tests before PR merge
944
+ 2. **Optimize Slow Test:** Refactor `1.3-E2E-001` to use faster fixture setup
945
+ 3. **Split Large Test:** Break `1.3-UNIT-005` into focused test files
946
+ 4. **Enhance P2 Coverage:** Add E2E validation for session timeout (currently UNIT-ONLY)
947
+
948
+ ```
949
+
950
+ ---
951
+
952
+ ## Validation Checklist
953
+
954
+ Before completing this workflow, verify:
955
+
956
+ **Phase 1 (Traceability):**
957
+ - ✅ All acceptance criteria are mapped to tests (or gaps are documented)
958
+ - ✅ Coverage status is classified (FULL, PARTIAL, NONE, UNIT-ONLY, INTEGRATION-ONLY)
959
+ - ✅ Gaps are prioritized by risk level (P0/P1/P2/P3)
960
+ - ✅ P0 coverage is 100% or blockers are documented
961
+ - ✅ Duplicate coverage is identified and flagged
962
+ - ✅ Test quality is assessed (assertions, structure, performance)
963
+ - ✅ Traceability matrix is generated and saved
964
+
965
+ **Phase 2 (Gate Decision - if enabled):**
966
+ - ✅ Test execution results loaded and pass rates calculated
967
+ - ✅ NFR assessment results loaded (if applicable)
968
+ - ✅ Decision rules applied consistently (PASS/CONCERNS/FAIL/WAIVED)
969
+ - ✅ Gate decision document created with evidence
970
+ - ✅ Waiver documented if decision is WAIVED (approver, justification, mitigation)
971
+ - ✅ Workflow status updated (bmm-workflow-status.md)
972
+ - ✅ Stakeholders notified (if enabled)
973
+
974
+ ---
975
+
976
+ ## Notes
977
+
978
+ **Phase 1 (Traceability):**
979
+ - **Explicit Mapping:** Require tests to reference criteria explicitly (test IDs, describe blocks) for maintainability
980
+ - **Risk-Based Prioritization:** Use test-priorities framework (P0/P1/P2/P3) to determine gap severity
981
+ - **Quality Over Quantity:** Better to have fewer high-quality tests with FULL coverage than many low-quality tests with PARTIAL coverage
982
+ - **Selective Testing:** Avoid duplicate coverage - test each behavior at the appropriate level only
983
+
984
+ **Phase 2 (Gate Decision):**
985
+ - **Deterministic Rules:** Use consistent thresholds (P0=100%, P1≥90%, overall≥80%) for objectivity
986
+ - **Evidence-Based:** Every decision must cite specific metrics (coverage %, pass rates, NFRs)
987
+ - **Waiver Discipline:** Waivers require approver name, justification, mitigation plan, and evidence link
988
+ - **Non-Blocking CONCERNS:** Use CONCERNS for minor gaps that don't justify blocking deployment (e.g., P1 at 88% vs 90%)
989
+ - **Automate in CI/CD:** Generate YAML snippets that can be consumed by CI/CD pipelines for automated quality gates
990
+
991
+ ---
992
+
993
+ ## Troubleshooting
994
+
995
+ ### "No tests found for this story"
996
+ - Run `*atdd` workflow first to generate failing acceptance tests
997
+ - Check test file naming conventions (may not match story ID pattern)
998
+ - Verify test directory path is correct
999
+
1000
+ ### "Cannot determine coverage status"
1001
+ - Tests may lack explicit mapping to criteria (no test IDs, unclear describe blocks)
1002
+ - Review test structure and add Given-When-Then narrative
1003
+ - Add test IDs in format: `{STORY_ID}-{LEVEL}-{SEQ}` (e.g., 1.3-E2E-001)
1004
+
1005
+ ### "P0 coverage below 100%"
1006
+ - This is a **BLOCKER** - do not release
1007
+ - Identify missing P0 tests in gap analysis
1008
+ - Run `*atdd` workflow to generate missing tests
1009
+ - Verify with stakeholders that P0 classification is correct
1010
+
1011
+ ### "Duplicate coverage detected"
1012
+ - Review selective testing principles in `selective-testing.md`
1013
+ - Determine if overlap is acceptable (defense in depth) or wasteful (same validation at multiple levels)
1014
+ - Consolidate tests at appropriate level (logic → unit, integration → API, journey → E2E)
1015
+
1016
+ ### "Test execution results missing" (Phase 2)
1017
+ - Phase 2 gate decision requires `test_results` (CI/CD test reports)
1018
+ - If missing, Phase 2 will be skipped with warning
1019
+ - Provide JUnit XML, TAP, or JSON test report path via `test_results` variable
1020
+
1021
+ ### "Gate decision is FAIL but deployment needed urgently"
1022
+ - Request business waiver (if `allow_waivers: true`)
1023
+ - Document approver, justification, mitigation plan
1024
+ - Create follow-up stories to address gaps
1025
+ - Use WAIVED decision only for non-P0 gaps
1026
+
1027
+ ---
1028
+
1029
+ ## Related Workflows
1030
+
1031
+ **Prerequisites:**
1032
+ - `testarch-test-design` - Define test priorities (P0/P1/P2/P3) before tracing (required for Phase 2)
1033
+ - `testarch-atdd` or `testarch-automate` - Generate tests before tracing coverage
1034
+
1035
+ **Complements:**
1036
+ - `testarch-nfr-assess` - Non-functional requirements validation (recommended for release gates)
1037
+ - `testarch-test-review` - Review test quality issues flagged in traceability
1038
+
1039
+ **Next Steps:**
1040
+ - If gate decision is PASS/CONCERNS → Deploy and monitor
1041
+ - If gate decision is FAIL → Add missing tests, re-run trace workflow
1042
+ - If gate decision is WAIVED → Deploy with mitigation, create follow-up stories
1043
+
1044
+ ---
1045
+
1046
+ <!-- Powered by BMAD-CORE™ -->
1047
+ ```