bmad-method-test-architecture-enterprise 0.1.1-beta.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 (320) hide show
  1. package/.github/CODE_OF_CONDUCT.md +128 -0
  2. package/.github/FUNDING.yaml +15 -0
  3. package/.github/ISSUE_TEMPLATE/config.yaml +11 -0
  4. package/.github/ISSUE_TEMPLATE/feature_request.md +70 -0
  5. package/.github/ISSUE_TEMPLATE/issue.md +61 -0
  6. package/.github/workflows/docs.yaml +66 -0
  7. package/.github/workflows/manual-release.yaml +195 -0
  8. package/.github/workflows/quality.yaml +114 -0
  9. package/.husky/pre-commit +20 -0
  10. package/.markdownlint-cli2.yaml +36 -0
  11. package/.nvmrc +1 -0
  12. package/.prettierignore +9 -0
  13. package/.vscode/settings.json +47 -0
  14. package/CHANGELOG.md +217 -0
  15. package/CONTRIBUTING.md +268 -0
  16. package/LICENSE +26 -0
  17. package/README.md +300 -0
  18. package/SECURITY.md +85 -0
  19. package/TEA-MODULE-MIGRATION-PLAN.md +3788 -0
  20. package/docs/404.md +20 -0
  21. package/docs/MIGRATION.md +447 -0
  22. package/docs/explanation/engagement-models.md +767 -0
  23. package/docs/explanation/fixture-architecture.md +484 -0
  24. package/docs/explanation/knowledge-base-system.md +599 -0
  25. package/docs/explanation/network-first-patterns.md +884 -0
  26. package/docs/explanation/risk-based-testing.md +628 -0
  27. package/docs/explanation/step-file-architecture.md +609 -0
  28. package/docs/explanation/subprocess-architecture.md +578 -0
  29. package/docs/explanation/subprocess-implementation-status.md +327 -0
  30. package/docs/explanation/tea-overview.md +425 -0
  31. package/docs/explanation/test-quality-standards.md +965 -0
  32. package/docs/explanation/testing-as-engineering.md +111 -0
  33. package/docs/glossary/index.md +160 -0
  34. package/docs/how-to/brownfield/use-tea-for-enterprise.md +571 -0
  35. package/docs/how-to/brownfield/use-tea-with-existing-tests.md +631 -0
  36. package/docs/how-to/customization/enable-tea-mcp-enhancements.md +455 -0
  37. package/docs/how-to/customization/integrate-playwright-utils.md +846 -0
  38. package/docs/how-to/workflows/run-atdd.md +460 -0
  39. package/docs/how-to/workflows/run-automate.md +690 -0
  40. package/docs/how-to/workflows/run-nfr-assess.md +731 -0
  41. package/docs/how-to/workflows/run-test-design.md +144 -0
  42. package/docs/how-to/workflows/run-test-review.md +638 -0
  43. package/docs/how-to/workflows/run-trace.md +951 -0
  44. package/docs/how-to/workflows/setup-ci.md +761 -0
  45. package/docs/how-to/workflows/setup-test-framework.md +99 -0
  46. package/docs/index.md +122 -0
  47. package/docs/reference/commands.md +300 -0
  48. package/docs/reference/configuration.md +729 -0
  49. package/docs/reference/knowledge-base.md +365 -0
  50. package/docs/reference/troubleshooting.md +717 -0
  51. package/docs/tutorials/tea-lite-quickstart.md +465 -0
  52. package/eslint.config.mjs +152 -0
  53. package/package.json +117 -0
  54. package/prettier.config.mjs +32 -0
  55. package/release_notes.md +28 -0
  56. package/src/_module-installer/installer.js +92 -0
  57. package/src/agents/tea.agent.yaml +63 -0
  58. package/src/module-help.csv +9 -0
  59. package/src/module.yaml +91 -0
  60. package/src/testarch/knowledge/adr-quality-readiness-checklist.md +377 -0
  61. package/src/testarch/knowledge/api-request.md +442 -0
  62. package/src/testarch/knowledge/api-testing-patterns.md +851 -0
  63. package/src/testarch/knowledge/auth-session.md +548 -0
  64. package/src/testarch/knowledge/burn-in.md +273 -0
  65. package/src/testarch/knowledge/ci-burn-in.md +675 -0
  66. package/src/testarch/knowledge/component-tdd.md +486 -0
  67. package/src/testarch/knowledge/contract-testing.md +957 -0
  68. package/src/testarch/knowledge/data-factories.md +500 -0
  69. package/src/testarch/knowledge/email-auth.md +721 -0
  70. package/src/testarch/knowledge/error-handling.md +725 -0
  71. package/src/testarch/knowledge/feature-flags.md +750 -0
  72. package/src/testarch/knowledge/file-utils.md +456 -0
  73. package/src/testarch/knowledge/fixture-architecture.md +401 -0
  74. package/src/testarch/knowledge/fixtures-composition.md +382 -0
  75. package/src/testarch/knowledge/intercept-network-call.md +426 -0
  76. package/src/testarch/knowledge/log.md +426 -0
  77. package/src/testarch/knowledge/network-error-monitor.md +401 -0
  78. package/src/testarch/knowledge/network-first.md +486 -0
  79. package/src/testarch/knowledge/network-recorder.md +527 -0
  80. package/src/testarch/knowledge/nfr-criteria.md +670 -0
  81. package/src/testarch/knowledge/overview.md +286 -0
  82. package/src/testarch/knowledge/playwright-config.md +730 -0
  83. package/src/testarch/knowledge/probability-impact.md +601 -0
  84. package/src/testarch/knowledge/recurse.md +421 -0
  85. package/src/testarch/knowledge/risk-governance.md +615 -0
  86. package/src/testarch/knowledge/selective-testing.md +732 -0
  87. package/src/testarch/knowledge/selector-resilience.md +527 -0
  88. package/src/testarch/knowledge/test-healing-patterns.md +644 -0
  89. package/src/testarch/knowledge/test-levels-framework.md +473 -0
  90. package/src/testarch/knowledge/test-priorities-matrix.md +373 -0
  91. package/src/testarch/knowledge/test-quality.md +664 -0
  92. package/src/testarch/knowledge/timing-debugging.md +372 -0
  93. package/src/testarch/knowledge/visual-debugging.md +524 -0
  94. package/src/testarch/tea-index.csv +35 -0
  95. package/src/workflows/testarch/README.md +74 -0
  96. package/src/workflows/testarch/atdd/atdd-checklist-template.md +363 -0
  97. package/src/workflows/testarch/atdd/checklist.md +374 -0
  98. package/src/workflows/testarch/atdd/instructions.md +38 -0
  99. package/src/workflows/testarch/atdd/steps-c/step-01-preflight-and-context.md +110 -0
  100. package/src/workflows/testarch/atdd/steps-c/step-02-generation-mode.md +79 -0
  101. package/src/workflows/testarch/atdd/steps-c/step-03-test-strategy.md +76 -0
  102. package/src/workflows/testarch/atdd/steps-c/step-04-generate-tests.md +228 -0
  103. package/src/workflows/testarch/atdd/steps-c/step-04a-subprocess-api-failing.md +215 -0
  104. package/src/workflows/testarch/atdd/steps-c/step-04b-subprocess-e2e-failing.md +212 -0
  105. package/src/workflows/testarch/atdd/steps-c/step-04c-aggregate.md +329 -0
  106. package/src/workflows/testarch/atdd/steps-c/step-05-validate-and-complete.md +68 -0
  107. package/src/workflows/testarch/atdd/steps-e/step-01-assess.md +65 -0
  108. package/src/workflows/testarch/atdd/steps-e/step-02-apply-edit.md +60 -0
  109. package/src/workflows/testarch/atdd/steps-v/step-01-validate.md +67 -0
  110. package/src/workflows/testarch/atdd/validation-report-20260127-095021.md +73 -0
  111. package/src/workflows/testarch/atdd/validation-report-20260127-102401.md +116 -0
  112. package/src/workflows/testarch/atdd/workflow-plan.md +21 -0
  113. package/src/workflows/testarch/atdd/workflow.md +39 -0
  114. package/src/workflows/testarch/atdd/workflow.yaml +47 -0
  115. package/src/workflows/testarch/automate/checklist.md +582 -0
  116. package/src/workflows/testarch/automate/instructions.md +43 -0
  117. package/src/workflows/testarch/automate/steps-c/step-01-preflight-and-context.md +127 -0
  118. package/src/workflows/testarch/automate/steps-c/step-02-identify-targets.md +95 -0
  119. package/src/workflows/testarch/automate/steps-c/step-03-generate-tests.md +199 -0
  120. package/src/workflows/testarch/automate/steps-c/step-03a-subprocess-api.md +183 -0
  121. package/src/workflows/testarch/automate/steps-c/step-03b-subprocess-e2e.md +181 -0
  122. package/src/workflows/testarch/automate/steps-c/step-03c-aggregate.md +300 -0
  123. package/src/workflows/testarch/automate/steps-c/step-04-validate-and-summarize.md +69 -0
  124. package/src/workflows/testarch/automate/steps-e/step-01-assess.md +65 -0
  125. package/src/workflows/testarch/automate/steps-e/step-02-apply-edit.md +60 -0
  126. package/src/workflows/testarch/automate/steps-v/step-01-validate.md +67 -0
  127. package/src/workflows/testarch/automate/validation-report-20260127-095021.md +72 -0
  128. package/src/workflows/testarch/automate/validation-report-20260127-102401.md +114 -0
  129. package/src/workflows/testarch/automate/workflow-plan.md +20 -0
  130. package/src/workflows/testarch/automate/workflow.md +39 -0
  131. package/src/workflows/testarch/automate/workflow.yaml +54 -0
  132. package/src/workflows/testarch/ci/checklist.md +247 -0
  133. package/src/workflows/testarch/ci/github-actions-template.yaml +198 -0
  134. package/src/workflows/testarch/ci/gitlab-ci-template.yaml +149 -0
  135. package/src/workflows/testarch/ci/instructions.md +38 -0
  136. package/src/workflows/testarch/ci/steps-c/step-01-preflight.md +92 -0
  137. package/src/workflows/testarch/ci/steps-c/step-02-generate-pipeline.md +82 -0
  138. package/src/workflows/testarch/ci/steps-c/step-03-configure-quality-gates.md +75 -0
  139. package/src/workflows/testarch/ci/steps-c/step-04-validate-and-summary.md +67 -0
  140. package/src/workflows/testarch/ci/steps-e/step-01-assess.md +65 -0
  141. package/src/workflows/testarch/ci/steps-e/step-02-apply-edit.md +60 -0
  142. package/src/workflows/testarch/ci/steps-v/step-01-validate.md +67 -0
  143. package/src/workflows/testarch/ci/validation-report-20260127-095021.md +72 -0
  144. package/src/workflows/testarch/ci/validation-report-20260127-102401.md +114 -0
  145. package/src/workflows/testarch/ci/workflow-plan.md +20 -0
  146. package/src/workflows/testarch/ci/workflow.md +39 -0
  147. package/src/workflows/testarch/ci/workflow.yaml +47 -0
  148. package/src/workflows/testarch/framework/checklist.md +320 -0
  149. package/src/workflows/testarch/framework/instructions.md +38 -0
  150. package/src/workflows/testarch/framework/steps-c/step-01-preflight.md +75 -0
  151. package/src/workflows/testarch/framework/steps-c/step-02-select-framework.md +73 -0
  152. package/src/workflows/testarch/framework/steps-c/step-03-scaffold-framework.md +120 -0
  153. package/src/workflows/testarch/framework/steps-c/step-04-docs-and-scripts.md +70 -0
  154. package/src/workflows/testarch/framework/steps-c/step-05-validate-and-summary.md +68 -0
  155. package/src/workflows/testarch/framework/steps-e/step-01-assess.md +65 -0
  156. package/src/workflows/testarch/framework/steps-e/step-02-apply-edit.md +60 -0
  157. package/src/workflows/testarch/framework/steps-v/step-01-validate.md +67 -0
  158. package/src/workflows/testarch/framework/validation-report-20260127-095021.md +73 -0
  159. package/src/workflows/testarch/framework/validation-report-20260127-102401.md +116 -0
  160. package/src/workflows/testarch/framework/workflow-plan.md +22 -0
  161. package/src/workflows/testarch/framework/workflow.md +39 -0
  162. package/src/workflows/testarch/framework/workflow.yaml +49 -0
  163. package/src/workflows/testarch/nfr-assess/checklist.md +407 -0
  164. package/src/workflows/testarch/nfr-assess/instructions.md +36 -0
  165. package/src/workflows/testarch/nfr-assess/nfr-report-template.md +462 -0
  166. package/src/workflows/testarch/nfr-assess/steps-c/step-01-load-context.md +85 -0
  167. package/src/workflows/testarch/nfr-assess/steps-c/step-02-define-thresholds.md +82 -0
  168. package/src/workflows/testarch/nfr-assess/steps-c/step-03-gather-evidence.md +64 -0
  169. package/src/workflows/testarch/nfr-assess/steps-c/step-04-evaluate-and-score.md +140 -0
  170. package/src/workflows/testarch/nfr-assess/steps-c/step-04a-subprocess-security.md +138 -0
  171. package/src/workflows/testarch/nfr-assess/steps-c/step-04b-subprocess-performance.md +84 -0
  172. package/src/workflows/testarch/nfr-assess/steps-c/step-04c-subprocess-reliability.md +85 -0
  173. package/src/workflows/testarch/nfr-assess/steps-c/step-04d-subprocess-scalability.md +88 -0
  174. package/src/workflows/testarch/nfr-assess/steps-c/step-04e-aggregate-nfr.md +219 -0
  175. package/src/workflows/testarch/nfr-assess/steps-c/step-05-generate-report.md +71 -0
  176. package/src/workflows/testarch/nfr-assess/steps-e/step-01-assess.md +65 -0
  177. package/src/workflows/testarch/nfr-assess/steps-e/step-02-apply-edit.md +60 -0
  178. package/src/workflows/testarch/nfr-assess/steps-v/step-01-validate.md +67 -0
  179. package/src/workflows/testarch/nfr-assess/validation-report-20260127-095021.md +73 -0
  180. package/src/workflows/testarch/nfr-assess/validation-report-20260127-102401.md +116 -0
  181. package/src/workflows/testarch/nfr-assess/workflow-plan.md +19 -0
  182. package/src/workflows/testarch/nfr-assess/workflow.md +39 -0
  183. package/src/workflows/testarch/nfr-assess/workflow.yaml +49 -0
  184. package/src/workflows/testarch/test-design/checklist.md +410 -0
  185. package/src/workflows/testarch/test-design/instructions.md +52 -0
  186. package/src/workflows/testarch/test-design/steps-c/step-01-detect-mode.md +109 -0
  187. package/src/workflows/testarch/test-design/steps-c/step-02-load-context.md +127 -0
  188. package/src/workflows/testarch/test-design/steps-c/step-03-risk-and-testability.md +85 -0
  189. package/src/workflows/testarch/test-design/steps-c/step-04-coverage-plan.md +98 -0
  190. package/src/workflows/testarch/test-design/steps-c/step-05-generate-output.md +97 -0
  191. package/src/workflows/testarch/test-design/steps-e/step-01-assess.md +65 -0
  192. package/src/workflows/testarch/test-design/steps-e/step-02-apply-edit.md +60 -0
  193. package/src/workflows/testarch/test-design/steps-v/step-01-validate.md +67 -0
  194. package/src/workflows/testarch/test-design/test-design-architecture-template.md +222 -0
  195. package/src/workflows/testarch/test-design/test-design-qa-template.md +296 -0
  196. package/src/workflows/testarch/test-design/test-design-template.md +294 -0
  197. package/src/workflows/testarch/test-design/validation-report-20260127-095021.md +73 -0
  198. package/src/workflows/testarch/test-design/validation-report-20260127-102401.md +116 -0
  199. package/src/workflows/testarch/test-design/workflow-plan.md +22 -0
  200. package/src/workflows/testarch/test-design/workflow.md +39 -0
  201. package/src/workflows/testarch/test-design/workflow.yaml +71 -0
  202. package/src/workflows/testarch/test-review/checklist.md +472 -0
  203. package/src/workflows/testarch/test-review/instructions.md +36 -0
  204. package/src/workflows/testarch/test-review/steps-c/step-01-load-context.md +101 -0
  205. package/src/workflows/testarch/test-review/steps-c/step-02-discover-tests.md +69 -0
  206. package/src/workflows/testarch/test-review/steps-c/step-03-quality-evaluation.md +184 -0
  207. package/src/workflows/testarch/test-review/steps-c/step-03a-subprocess-determinism.md +214 -0
  208. package/src/workflows/testarch/test-review/steps-c/step-03b-subprocess-isolation.md +125 -0
  209. package/src/workflows/testarch/test-review/steps-c/step-03c-subprocess-maintainability.md +102 -0
  210. package/src/workflows/testarch/test-review/steps-c/step-03d-subprocess-coverage.md +111 -0
  211. package/src/workflows/testarch/test-review/steps-c/step-03e-subprocess-performance.md +117 -0
  212. package/src/workflows/testarch/test-review/steps-c/step-03f-aggregate-scores.md +246 -0
  213. package/src/workflows/testarch/test-review/steps-c/step-04-generate-report.md +72 -0
  214. package/src/workflows/testarch/test-review/steps-e/step-01-assess.md +65 -0
  215. package/src/workflows/testarch/test-review/steps-e/step-02-apply-edit.md +60 -0
  216. package/src/workflows/testarch/test-review/steps-v/step-01-validate.md +67 -0
  217. package/src/workflows/testarch/test-review/test-review-template.md +390 -0
  218. package/src/workflows/testarch/test-review/validation-report-20260127-095021.md +72 -0
  219. package/src/workflows/testarch/test-review/validation-report-20260127-102401.md +114 -0
  220. package/src/workflows/testarch/test-review/workflow-plan.md +18 -0
  221. package/src/workflows/testarch/test-review/workflow.md +39 -0
  222. package/src/workflows/testarch/test-review/workflow.yaml +48 -0
  223. package/src/workflows/testarch/trace/checklist.md +642 -0
  224. package/src/workflows/testarch/trace/instructions.md +36 -0
  225. package/src/workflows/testarch/trace/steps-c/step-01-load-context.md +80 -0
  226. package/src/workflows/testarch/trace/steps-c/step-02-discover-tests.md +69 -0
  227. package/src/workflows/testarch/trace/steps-c/step-03-map-criteria.md +65 -0
  228. package/src/workflows/testarch/trace/steps-c/step-04-analyze-gaps.md +244 -0
  229. package/src/workflows/testarch/trace/steps-c/step-05-gate-decision.md +232 -0
  230. package/src/workflows/testarch/trace/steps-e/step-01-assess.md +65 -0
  231. package/src/workflows/testarch/trace/steps-e/step-02-apply-edit.md +60 -0
  232. package/src/workflows/testarch/trace/steps-v/step-01-validate.md +67 -0
  233. package/src/workflows/testarch/trace/trace-template.md +675 -0
  234. package/src/workflows/testarch/trace/validation-report-20260127-095021.md +73 -0
  235. package/src/workflows/testarch/trace/validation-report-20260127-102401.md +116 -0
  236. package/src/workflows/testarch/trace/workflow-plan.md +21 -0
  237. package/src/workflows/testarch/trace/workflow.md +39 -0
  238. package/src/workflows/testarch/trace/workflow.yaml +57 -0
  239. package/test/README.md +23 -0
  240. package/test/fixtures/agent-schema/invalid/critical-actions/actions-as-string.agent.yaml +27 -0
  241. package/test/fixtures/agent-schema/invalid/critical-actions/empty-string-in-actions.agent.yaml +30 -0
  242. package/test/fixtures/agent-schema/invalid/menu/empty-menu.agent.yaml +22 -0
  243. package/test/fixtures/agent-schema/invalid/menu/missing-menu.agent.yaml +20 -0
  244. package/test/fixtures/agent-schema/invalid/menu-commands/empty-command-target.agent.yaml +25 -0
  245. package/test/fixtures/agent-schema/invalid/menu-commands/no-command-target.agent.yaml +24 -0
  246. package/test/fixtures/agent-schema/invalid/menu-triggers/camel-case.agent.yaml +25 -0
  247. package/test/fixtures/agent-schema/invalid/menu-triggers/compound-invalid-format.agent.yaml +25 -0
  248. package/test/fixtures/agent-schema/invalid/menu-triggers/compound-mismatched-kebab.agent.yaml +25 -0
  249. package/test/fixtures/agent-schema/invalid/menu-triggers/duplicate-triggers.agent.yaml +31 -0
  250. package/test/fixtures/agent-schema/invalid/menu-triggers/empty-trigger.agent.yaml +25 -0
  251. package/test/fixtures/agent-schema/invalid/menu-triggers/leading-asterisk.agent.yaml +25 -0
  252. package/test/fixtures/agent-schema/invalid/menu-triggers/snake-case.agent.yaml +25 -0
  253. package/test/fixtures/agent-schema/invalid/menu-triggers/trigger-with-spaces.agent.yaml +25 -0
  254. package/test/fixtures/agent-schema/invalid/metadata/empty-module-string.agent.yaml +26 -0
  255. package/test/fixtures/agent-schema/invalid/metadata/empty-name.agent.yaml +24 -0
  256. package/test/fixtures/agent-schema/invalid/metadata/extra-metadata-fields.agent.yaml +27 -0
  257. package/test/fixtures/agent-schema/invalid/metadata/missing-id.agent.yaml +23 -0
  258. package/test/fixtures/agent-schema/invalid/persona/empty-principles-array.agent.yaml +24 -0
  259. package/test/fixtures/agent-schema/invalid/persona/empty-string-in-principles.agent.yaml +27 -0
  260. package/test/fixtures/agent-schema/invalid/persona/extra-persona-fields.agent.yaml +27 -0
  261. package/test/fixtures/agent-schema/invalid/persona/missing-role.agent.yaml +24 -0
  262. package/test/fixtures/agent-schema/invalid/prompts/empty-content.agent.yaml +29 -0
  263. package/test/fixtures/agent-schema/invalid/prompts/extra-prompt-fields.agent.yaml +31 -0
  264. package/test/fixtures/agent-schema/invalid/prompts/missing-content.agent.yaml +28 -0
  265. package/test/fixtures/agent-schema/invalid/prompts/missing-id.agent.yaml +28 -0
  266. package/test/fixtures/agent-schema/invalid/top-level/empty-file.agent.yaml +5 -0
  267. package/test/fixtures/agent-schema/invalid/top-level/extra-top-level-keys.agent.yaml +28 -0
  268. package/test/fixtures/agent-schema/invalid/top-level/missing-agent-key.agent.yaml +11 -0
  269. package/test/fixtures/agent-schema/invalid/yaml-errors/invalid-indentation.agent.yaml +19 -0
  270. package/test/fixtures/agent-schema/invalid/yaml-errors/malformed-yaml.agent.yaml +18 -0
  271. package/test/fixtures/agent-schema/valid/critical-actions/empty-critical-actions.agent.yaml +24 -0
  272. package/test/fixtures/agent-schema/valid/critical-actions/no-critical-actions.agent.yaml +22 -0
  273. package/test/fixtures/agent-schema/valid/critical-actions/valid-critical-actions.agent.yaml +27 -0
  274. package/test/fixtures/agent-schema/valid/menu/multiple-menu-items.agent.yaml +31 -0
  275. package/test/fixtures/agent-schema/valid/menu/single-menu-item.agent.yaml +22 -0
  276. package/test/fixtures/agent-schema/valid/menu-commands/all-command-types.agent.yaml +38 -0
  277. package/test/fixtures/agent-schema/valid/menu-commands/multiple-commands.agent.yaml +24 -0
  278. package/test/fixtures/agent-schema/valid/menu-triggers/compound-triggers.agent.yaml +31 -0
  279. package/test/fixtures/agent-schema/valid/menu-triggers/kebab-case-triggers.agent.yaml +34 -0
  280. package/test/fixtures/agent-schema/valid/metadata/core-agent-with-module.agent.yaml +24 -0
  281. package/test/fixtures/agent-schema/valid/metadata/empty-module-name-in-path.agent.yaml +24 -0
  282. package/test/fixtures/agent-schema/valid/metadata/malformed-path-treated-as-core.agent.yaml +24 -0
  283. package/test/fixtures/agent-schema/valid/metadata/module-agent-correct.agent.yaml +24 -0
  284. package/test/fixtures/agent-schema/valid/metadata/module-agent-missing-module.agent.yaml +23 -0
  285. package/test/fixtures/agent-schema/valid/metadata/wrong-module-value.agent.yaml +24 -0
  286. package/test/fixtures/agent-schema/valid/persona/complete-persona.agent.yaml +24 -0
  287. package/test/fixtures/agent-schema/valid/prompts/empty-prompts.agent.yaml +24 -0
  288. package/test/fixtures/agent-schema/valid/prompts/no-prompts.agent.yaml +22 -0
  289. package/test/fixtures/agent-schema/valid/prompts/valid-prompts-minimal.agent.yaml +28 -0
  290. package/test/fixtures/agent-schema/valid/prompts/valid-prompts-with-description.agent.yaml +30 -0
  291. package/test/fixtures/agent-schema/valid/top-level/minimal-core-agent.agent.yaml +24 -0
  292. package/test/schema/agent.js +491 -0
  293. package/test/test-agent-schema.js +387 -0
  294. package/test/test-installation-components.js +183 -0
  295. package/test/test-knowledge-base.js +199 -0
  296. package/test/unit-test-schema.js +133 -0
  297. package/test/validate-agent-schema.js +110 -0
  298. package/tools/build-docs.js +575 -0
  299. package/tools/fix-doc-links.js +288 -0
  300. package/tools/schema/agent.js +491 -0
  301. package/tools/validate-agent-schema.js +111 -0
  302. package/tools/validate-doc-links.js +371 -0
  303. package/tools/verify-paths.js +100 -0
  304. package/website/README.md +137 -0
  305. package/website/astro.config.mjs +158 -0
  306. package/website/package-lock.json +6856 -0
  307. package/website/package.json +23 -0
  308. package/website/public/favicon.ico +0 -0
  309. package/website/public/img/tea-logo.svg +7 -0
  310. package/website/public/robots.txt +37 -0
  311. package/website/src/components/Banner.astro +59 -0
  312. package/website/src/components/Header.astro +121 -0
  313. package/website/src/components/MobileMenuFooter.astro +53 -0
  314. package/website/src/content/config.ts +6 -0
  315. package/website/src/lib/site-url.js +25 -0
  316. package/website/src/pages/404.astro +11 -0
  317. package/website/src/rehype-base-paths.js +89 -0
  318. package/website/src/rehype-markdown-links.js +117 -0
  319. package/website/src/styles/custom.css +499 -0
  320. package/website/tsconfig.json +9 -0
@@ -0,0 +1,599 @@
1
+ ---
2
+ title: 'Knowledge Base System Explained'
3
+ description: Understanding how TEA uses tea-index.csv for context engineering and consistent test quality
4
+ ---
5
+
6
+ # Knowledge Base System Explained
7
+
8
+ TEA's knowledge base system is how context engineering works - automatically loading domain-specific standards into AI context so tests are consistently high-quality regardless of prompt variation.
9
+
10
+ ## Overview
11
+
12
+ **The Problem:** AI without context produces inconsistent results.
13
+
14
+ **Traditional approach:**
15
+
16
+ ```
17
+ User: "Write tests for login"
18
+ AI: [Generates tests with random quality]
19
+ - Sometimes uses hard waits
20
+ - Sometimes uses good patterns
21
+ - Inconsistent across sessions
22
+ - Quality depends on prompt
23
+ ```
24
+
25
+ **TEA with knowledge base:**
26
+
27
+ ```
28
+ User: "Write tests for login"
29
+ TEA: [Loads test-quality.md, network-first.md, auth-session.md]
30
+ TEA: [Generates tests following established patterns]
31
+ - Always uses network-first patterns
32
+ - Always uses proper fixtures
33
+ - Consistent across all sessions
34
+ - Quality independent of prompt
35
+ ```
36
+
37
+ **Result:** Systematic quality, not random chance.
38
+
39
+ ## The Problem
40
+
41
+ ### Prompt-Driven Testing = Inconsistency
42
+
43
+ **Session 1:**
44
+
45
+ ```
46
+ User: "Write tests for profile editing"
47
+
48
+ AI: [No context loaded]
49
+ // Generates test with hard waits
50
+ await page.waitForTimeout(3000);
51
+ ```
52
+
53
+ **Session 2:**
54
+
55
+ ```
56
+ User: "Write comprehensive tests for profile editing with best practices"
57
+
58
+ AI: [Still no systematic context]
59
+ // Generates test with some improvements, but still issues
60
+ await page.waitForSelector('.success', { timeout: 10000 });
61
+ ```
62
+
63
+ **Session 3:**
64
+
65
+ ```
66
+ User: "Write tests using network-first patterns and proper fixtures"
67
+
68
+ AI: [Better prompt, but still reinventing patterns]
69
+ // Generates test with network-first, but inconsistent with other tests
70
+ ```
71
+
72
+ **Problem:** Quality depends on prompt engineering skill, no consistency.
73
+
74
+ ### Knowledge Drift
75
+
76
+ Without a knowledge base:
77
+
78
+ - Team A uses pattern X
79
+ - Team B uses pattern Y
80
+ - Both work, but inconsistent
81
+ - No single source of truth
82
+ - Patterns drift over time
83
+
84
+ ## The Solution: tea-index.csv Manifest
85
+
86
+ ### How It Works
87
+
88
+ **1. Manifest Defines Fragments**
89
+
90
+ `src/bmm/testarch/tea-index.csv`:
91
+
92
+ ```csv
93
+ id,name,description,tags,fragment_file
94
+ test-quality,Test Quality,Execution limits and isolation rules,quality;standards,knowledge/test-quality.md
95
+ network-first,Network-First Safeguards,Intercept-before-navigate workflow,network;stability,knowledge/network-first.md
96
+ fixture-architecture,Fixture Architecture,Composable fixture patterns,fixtures;architecture,knowledge/fixture-architecture.md
97
+ ```
98
+
99
+ **2. Workflow Loads Relevant Fragments**
100
+
101
+ When user runs `atdd`:
102
+
103
+ ```
104
+ TEA reads tea-index.csv
105
+ Identifies fragments needed for ATDD:
106
+ - test-quality.md (quality standards)
107
+ - network-first.md (avoid flakiness)
108
+ - component-tdd.md (TDD patterns)
109
+ - fixture-architecture.md (reusable fixtures)
110
+ - data-factories.md (test data)
111
+
112
+ Loads only these 5 fragments (not all 33)
113
+ Generates tests following these patterns
114
+ ```
115
+
116
+ **3. Consistent Output**
117
+
118
+ Every time `atdd` runs:
119
+
120
+ - Same fragments loaded
121
+ - Same patterns applied
122
+ - Same quality standards
123
+ - Consistent test structure
124
+
125
+ **Result:** Tests look like they were written by the same expert, every time.
126
+
127
+ ### Knowledge Base Loading Diagram
128
+
129
+ ```mermaid
130
+ %%{init: {'theme':'base', 'themeVariables': { 'fontSize':'14px'}}}%%
131
+ flowchart TD
132
+ User([User: atdd]) --> Workflow[TEA Workflow<br/>Triggered]
133
+ Workflow --> Read[Read Manifest<br/>tea-index.csv]
134
+
135
+ Read --> Identify{Identify Relevant<br/>Fragments for ATDD}
136
+
137
+ Identify -->|Needed| L1[✓ test-quality.md]
138
+ Identify -->|Needed| L2[✓ network-first.md]
139
+ Identify -->|Needed| L3[✓ component-tdd.md]
140
+ Identify -->|Needed| L4[✓ data-factories.md]
141
+ Identify -->|Needed| L5[✓ fixture-architecture.md]
142
+
143
+ Identify -.->|Skip| S1[✗ contract-testing.md]
144
+ Identify -.->|Skip| S2[✗ burn-in.md]
145
+ Identify -.->|Skip| S3[+ 26 other fragments]
146
+
147
+ L1 --> Context[AI Context<br/>5 fragments loaded]
148
+ L2 --> Context
149
+ L3 --> Context
150
+ L4 --> Context
151
+ L5 --> Context
152
+
153
+ Context --> Gen[Generate Tests<br/>Following patterns]
154
+ Gen --> Out([Consistent Output<br/>Same quality every time])
155
+
156
+ style User fill:#e3f2fd,stroke:#1565c0,stroke-width:2px
157
+ style Read fill:#fff3e0,stroke:#e65100,stroke-width:2px
158
+ style L1 fill:#c8e6c9,stroke:#2e7d32,stroke-width:2px
159
+ style L2 fill:#c8e6c9,stroke:#2e7d32,stroke-width:2px
160
+ style L3 fill:#c8e6c9,stroke:#2e7d32,stroke-width:2px
161
+ style L4 fill:#c8e6c9,stroke:#2e7d32,stroke-width:2px
162
+ style L5 fill:#c8e6c9,stroke:#2e7d32,stroke-width:2px
163
+ style S1 fill:#e0e0e0,stroke:#616161,stroke-width:1px
164
+ style S2 fill:#e0e0e0,stroke:#616161,stroke-width:1px
165
+ style S3 fill:#e0e0e0,stroke:#616161,stroke-width:1px
166
+ style Context fill:#f3e5f5,stroke:#6a1b9a,stroke-width:3px
167
+ style Out fill:#4caf50,stroke:#1b5e20,stroke-width:3px,color:#fff
168
+ ```
169
+
170
+ ## Fragment Structure
171
+
172
+ ### Anatomy of a Fragment
173
+
174
+ Each fragment follows this structure:
175
+
176
+ ````markdown
177
+ # Fragment Name
178
+
179
+ ## Principle
180
+
181
+ [One sentence - what is this pattern?]
182
+
183
+ ## Rationale
184
+
185
+ [Why use this instead of alternatives?]
186
+ Why this pattern exists
187
+ Problems it solves
188
+ Benefits it provides
189
+
190
+ ## Pattern Examples
191
+
192
+ ### Example 1: Basic Usage
193
+
194
+ ```code
195
+ [Runnable code example]
196
+ ```
197
+ ````
198
+
199
+ [Explanation of example]
200
+
201
+ ### Example 2: Advanced Pattern
202
+
203
+ ```code
204
+ [More complex example]
205
+ ```
206
+
207
+ [Explanation]
208
+
209
+ ## Anti-Patterns
210
+
211
+ ### Don't Do This
212
+
213
+ ```code
214
+ [Bad code example]
215
+ ```
216
+
217
+ [Why it's bad]
218
+ [What breaks]
219
+
220
+ ## Related Patterns
221
+
222
+ - [Link to related fragment]
223
+
224
+ ````
225
+
226
+ <!-- markdownlint-disable MD024 -->
227
+ ### Example: test-quality.md Fragment
228
+
229
+ ```markdown
230
+ # Test Quality
231
+
232
+ ## Principle
233
+ Tests must be deterministic, isolated, explicit, focused, and fast.
234
+
235
+ ## Rationale
236
+ Tests that fail randomly, depend on each other, or take too long lose team trust.
237
+ [... detailed explanation ...]
238
+
239
+ ## Pattern Examples
240
+
241
+ ### Example 1: Deterministic Test
242
+ ```typescript
243
+ // ✅ Wait for actual response, not timeout
244
+ const promise = page.waitForResponse(matcher);
245
+ await page.click('button');
246
+ await promise;
247
+ ````
248
+
249
+ ### Example 2: Isolated Test
250
+
251
+ ```typescript
252
+ // ✅ Self-cleaning test
253
+ test('test', async ({ page }) => {
254
+ const userId = await createTestUser();
255
+ // ... test logic ...
256
+ await deleteTestUser(userId); // Cleanup
257
+ });
258
+ ```
259
+
260
+ ## Anti-Patterns
261
+
262
+ ### Hard Waits
263
+
264
+ ```typescript
265
+ // ❌ Non-deterministic
266
+ await page.waitForTimeout(3000);
267
+ ```
268
+
269
+ [Why this causes flakiness]
270
+
271
+ ```
272
+
273
+ **Total:** 24.5 KB, 12 code examples
274
+ <!-- markdownlint-enable MD024 -->
275
+
276
+ ## How TEA Uses the Knowledge Base
277
+
278
+ ### Workflow-Specific Loading
279
+
280
+ **Different workflows load different fragments:**
281
+
282
+ | Workflow | Fragments Loaded | Purpose |
283
+ |----------|-----------------|---------|
284
+ | `framework` | fixture-architecture, playwright-config, fixtures-composition | Infrastructure patterns |
285
+ | `test-design` | test-quality, test-priorities-matrix, risk-governance | Planning standards |
286
+ | `atdd` | test-quality, component-tdd, network-first, data-factories | TDD patterns |
287
+ | `automate` | test-quality, test-levels-framework, selector-resilience | Comprehensive generation |
288
+ | `test-review` | All quality/resilience/debugging fragments | Full audit patterns |
289
+ | `ci` | ci-burn-in, burn-in, selective-testing | CI/CD optimization |
290
+
291
+ **Benefit:** Only load what's needed (focused context, no bloat).
292
+
293
+ ### Dynamic Fragment Selection
294
+
295
+ TEA doesn't load all 33 fragments at once:
296
+
297
+ ```
298
+
299
+ User runs: atdd for authentication feature
300
+
301
+ TEA analyzes context:
302
+
303
+ - Feature type: Authentication
304
+ - Relevant fragments:
305
+ - test-quality.md (always loaded)
306
+ - auth-session.md (auth patterns)
307
+ - network-first.md (avoid flakiness)
308
+ - email-auth.md (if email-based auth)
309
+ - data-factories.md (test users)
310
+
311
+ Skips:
312
+
313
+ - contract-testing.md (not relevant)
314
+ - feature-flags.md (not relevant)
315
+ - file-utils.md (not relevant)
316
+
317
+ Result: 5 relevant fragments loaded, 28 skipped
318
+
319
+ ```
320
+
321
+ **Benefit:** Focused context = better results, lower token usage.
322
+
323
+ ## Context Engineering in Practice
324
+
325
+ ### Example: Consistent Test Generation
326
+
327
+ **Without Knowledge Base (Vanilla Playwright, Random Quality):**
328
+ ```
329
+
330
+ Session 1: User runs atdd
331
+ AI: [Guesses patterns from general knowledge]
332
+
333
+ Generated:
334
+ test('api test', async ({ request }) => {
335
+ const response = await request.get('/api/users');
336
+ await page.waitForTimeout(2000); // Hard wait
337
+ const users = await response.json();
338
+ // Random quality
339
+ });
340
+
341
+ Session 2: User runs atdd (different day)
342
+ AI: [Different random patterns]
343
+
344
+ Generated:
345
+ test('api test', async ({ request }) => {
346
+ const response = await request.get('/api/users');
347
+ const users = await response.json();
348
+ // Better but inconsistent
349
+ });
350
+
351
+ Result: Inconsistent quality, random patterns
352
+
353
+ ```
354
+
355
+ **With Knowledge Base (TEA + Playwright Utils):**
356
+ ```
357
+
358
+ Session 1: User runs atdd
359
+ TEA: [Loads test-quality.md, network-first.md, api-request.md from tea-index.csv]
360
+
361
+ Generated:
362
+ import { test } from '@seontechnologies/playwright-utils/api-request/fixtures';
363
+
364
+ test('should fetch users', async ({ apiRequest }) => {
365
+ const { status, body } = await apiRequest({
366
+ method: 'GET',
367
+ path: '/api/users'
368
+ }).validateSchema(UsersSchema); // Chained validation
369
+
370
+ expect(status).toBe(200);
371
+ expect(body).toBeInstanceOf(Array);
372
+ });
373
+
374
+ Session 2: User runs atdd (different day)
375
+ TEA: [Loads same fragments from tea-index.csv]
376
+
377
+ Generated: Identical pattern, same quality
378
+
379
+ Result: Systematic quality, established patterns (ALWAYS uses apiRequest utility when playwright-utils enabled)
380
+
381
+ ```
382
+
383
+ **Key Difference:**
384
+ - **Without KB:** Random patterns, inconsistent APIs
385
+ - **With KB:** Always uses `apiRequest` utility, always validates schemas, always returns `{ status, body }`
386
+
387
+ ### Example: Test Review Consistency
388
+
389
+ **Without Knowledge Base:**
390
+ ```
391
+
392
+ test-review session 1:
393
+ "This test looks okay" [50 issues missed]
394
+
395
+ test-review session 2:
396
+ "This test has some issues" [Different issues flagged]
397
+
398
+ Result: Inconsistent feedback
399
+
400
+ ```
401
+
402
+ **With Knowledge Base:**
403
+ ```
404
+
405
+ test-review session 1:
406
+ [Loads all quality fragments]
407
+ Flags: 12 hard waits, 5 conditionals (based on test-quality.md)
408
+
409
+ test-review session 2:
410
+ [Loads same fragments]
411
+ Flags: Same issues with same explanations
412
+
413
+ Result: Consistent, reliable feedback
414
+
415
+ ````
416
+
417
+ ## Maintaining the Knowledge Base
418
+
419
+ ### When to Add a Fragment
420
+
421
+ **Good reasons:**
422
+ - Pattern is used across multiple workflows
423
+ - Standard is non-obvious (needs documentation)
424
+ - Team asks "how should we handle X?" repeatedly
425
+ - New tool integration (e.g., new testing library)
426
+
427
+ **Bad reasons:**
428
+ - One-off pattern (document in test file instead)
429
+ - Obvious pattern (everyone knows this)
430
+ - Experimental (not proven yet)
431
+
432
+ ### Fragment Quality Standards
433
+
434
+ **Good fragment:**
435
+ - Principle stated in one sentence
436
+ - Rationale explains why clearly
437
+ - 3+ pattern examples with code
438
+ - Anti-patterns shown (what not to do)
439
+ - Self-contained (minimal dependencies)
440
+
441
+ **Example size:** 10-30 KB optimal
442
+
443
+ ### Updating Existing Fragments
444
+
445
+ **When to update:**
446
+ - Pattern evolved (better approach discovered)
447
+ - Tool updated (new Playwright API)
448
+ - Team feedback (pattern unclear)
449
+ - Bug in example code
450
+
451
+ **How to update:**
452
+ 1. Edit fragment markdown file
453
+ 2. Update examples
454
+ 3. Test with affected workflows
455
+ 4. Ensure no breaking changes
456
+
457
+ **No need to update tea-index.csv** unless description/tags change.
458
+
459
+ ## Benefits of Knowledge Base System
460
+
461
+ ### 1. Consistency
462
+
463
+ **Before:** Test quality varies by who wrote it
464
+ **After:** All tests follow same patterns (TEA-generated or reviewed)
465
+
466
+ ### 2. Onboarding
467
+
468
+ **Before:** New team member reads 20 documents, asks 50 questions
469
+ **After:** New team member runs `atdd`, sees patterns in generated code, learns by example
470
+
471
+ ### 3. Quality Gates
472
+
473
+ **Before:** "Is this test good?" → subjective opinion
474
+ **After:** `test-review` → objective score against knowledge base
475
+
476
+ ### 4. Pattern Evolution
477
+
478
+ **Before:** Update tests manually across 100 files
479
+ **After:** Update fragment once, all new tests use new pattern
480
+
481
+ ### 5. Cross-Project Reuse
482
+
483
+ **Before:** Reinvent patterns for each project
484
+ **After:** Same fragments across all BMad projects (consistency at scale)
485
+
486
+ ## Comparison: With vs Without Knowledge Base
487
+
488
+ ### Scenario: Testing Async Background Job
489
+
490
+ **Without Knowledge Base:**
491
+
492
+ Developer 1:
493
+ ```typescript
494
+ // Uses hard wait
495
+ await page.click('button');
496
+ await page.waitForTimeout(10000); // Hope job finishes
497
+ ````
498
+
499
+ Developer 2:
500
+
501
+ ```typescript
502
+ // Uses polling
503
+ await page.click('button');
504
+ for (let i = 0; i < 10; i++) {
505
+ const status = await page.locator('.status').textContent();
506
+ if (status === 'complete') break;
507
+ await page.waitForTimeout(1000);
508
+ }
509
+ ```
510
+
511
+ Developer 3:
512
+
513
+ ```typescript
514
+ // Uses waitForSelector
515
+ await page.click('button');
516
+ await page.waitForSelector('.success', { timeout: 30000 });
517
+ ```
518
+
519
+ **Result:** 3 different patterns, all suboptimal.
520
+
521
+ **With Knowledge Base (recurse.md fragment):**
522
+
523
+ All developers:
524
+
525
+ ```typescript
526
+ import { test } from '@seontechnologies/playwright-utils/fixtures';
527
+
528
+ test('job completion', async ({ apiRequest, recurse }) => {
529
+ // Start async job
530
+ const { body: job } = await apiRequest({
531
+ method: 'POST',
532
+ path: '/api/jobs',
533
+ });
534
+
535
+ // Poll until complete (correct API: command, predicate, options)
536
+ const result = await recurse(
537
+ () => apiRequest({ method: 'GET', path: `/api/jobs/${job.id}` }),
538
+ (response) => response.body.status === 'completed', // response.body from apiRequest
539
+ {
540
+ timeout: 30000,
541
+ interval: 2000,
542
+ log: 'Waiting for job to complete',
543
+ },
544
+ );
545
+
546
+ expect(result.body.status).toBe('completed');
547
+ });
548
+ ```
549
+
550
+ **Result:** Consistent pattern using correct playwright-utils API (command, predicate, options).
551
+
552
+ ## Technical Implementation
553
+
554
+ For details on the knowledge base index, see:
555
+
556
+ - [Knowledge Base Index](/docs/reference/knowledge-base.md)
557
+ - [TEA Configuration](/docs/reference/configuration.md)
558
+
559
+ ## Related Concepts
560
+
561
+ **Core TEA Concepts:**
562
+
563
+ - [Test Quality Standards](/docs/explanation/test-quality-standards.md) - Standards in knowledge base
564
+ - [Risk-Based Testing](/docs/explanation/risk-based-testing.md) - Risk patterns in knowledge base
565
+ - [Engagement Models](/docs/explanation/engagement-models.md) - Knowledge base across all models
566
+
567
+ **Technical Patterns:**
568
+
569
+ - [Fixture Architecture](/docs/explanation/fixture-architecture.md) - Fixture patterns in knowledge base
570
+ - [Network-First Patterns](/docs/explanation/network-first-patterns.md) - Network patterns in knowledge base
571
+
572
+ **Overview:**
573
+
574
+ - [TEA Overview](/docs/explanation/tea-overview.md) - Knowledge base in workflows
575
+ - [Testing as Engineering](/docs/explanation/testing-as-engineering.md) - **Foundation: Context engineering philosophy** (why knowledge base solves AI test problems)
576
+
577
+ ## Practical Guides
578
+
579
+ **All Workflow Guides Use Knowledge Base:**
580
+
581
+ - [How to Run Test Design](/docs/how-to/workflows/run-test-design.md)
582
+ - [How to Run ATDD](/docs/how-to/workflows/run-atdd.md)
583
+ - [How to Run Automate](/docs/how-to/workflows/run-automate.md)
584
+ - [How to Run Test Review](/docs/how-to/workflows/run-test-review.md)
585
+
586
+ **Integration:**
587
+
588
+ - [Integrate Playwright Utils](/docs/how-to/customization/integrate-playwright-utils.md) - PW-Utils in knowledge base
589
+
590
+ ## Reference
591
+
592
+ - [Knowledge Base Index](/docs/reference/knowledge-base.md) - Complete fragment index
593
+ - [TEA Command Reference](/docs/reference/commands.md) - Which workflows load which fragments
594
+ - [TEA Configuration](/docs/reference/configuration.md) - Config affects fragment loading
595
+ - [Glossary](/docs/glossary/index.md#test-architect-tea-concepts) - Context engineering, knowledge fragment terms
596
+
597
+ ---
598
+
599
+ Generated with [BMad Method](https://bmad-method.org) - TEA (Test Architect)