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,578 @@
1
+ ---
2
+ title: Subprocess Architecture
3
+ description: Parallel execution pattern for TEA workflows
4
+ ---
5
+
6
+ # Subprocess Architecture for TEA Workflows
7
+
8
+ **Version**: 1.0
9
+ **Date**: 2026-01-27
10
+ **Status**: Implementation Guide
11
+
12
+ ---
13
+
14
+ ## Overview
15
+
16
+ TEA workflows use **subprocess patterns** to parallelize independent tasks, improving performance and maintaining clean separation of concerns. Five workflows benefit from this architecture:
17
+
18
+ 1. **automate** - Parallel test generation (API + E2E)
19
+ 2. **atdd** - Parallel failing test generation (API + E2E)
20
+ 3. **test-review** - Parallel quality dimension checks
21
+ 4. **nfr-assess** - Parallel NFR domain assessments
22
+ 5. **trace** - Two-phase workflow separation
23
+
24
+ ---
25
+
26
+ ## Core Subprocess Pattern
27
+
28
+ ### Architecture
29
+
30
+ ```
31
+ Main Workflow (Orchestrator)
32
+ ├── Step 1: Setup & Context Loading
33
+ ├── Step 2: Launch Subprocesses
34
+ │ ├── Subprocess A → temp-file-a.json
35
+ │ ├── Subprocess B → temp-file-b.json
36
+ │ ├── Subprocess C → temp-file-c.json
37
+ │ └── (All run in parallel, isolated 200k containers)
38
+ └── Step 3: Aggregate Results
39
+ ├── Read all temp files
40
+ ├── Merge/synthesize outputs
41
+ └── Generate final artifact
42
+ ```
43
+
44
+ ### Key Principles
45
+
46
+ 1. **Independence**: Each subprocess is completely independent (no shared state)
47
+ 2. **Isolation**: Each subprocess runs in separate 200k context container
48
+ 3. **Output Format**: All subprocesses output structured JSON to temp files
49
+ 4. **Aggregation**: Main workflow reads temp files and synthesizes final output
50
+ 5. **Error Handling**: Each subprocess reports success/failure in JSON output
51
+
52
+ ---
53
+
54
+ ## Workflow-Specific Designs
55
+
56
+ ### 1. automate - Parallel Test Generation
57
+
58
+ **Goal**: Generate API and E2E tests in parallel
59
+
60
+ #### Architecture
61
+
62
+ ```
63
+ automate workflow
64
+ ├── Step 1: Analyze codebase & identify features
65
+ ├── Step 2: Load relevant knowledge fragments
66
+ ├── Step 3: Launch parallel test generation
67
+ │ ├── Subprocess A: Generate API tests → /tmp/api-tests-{timestamp}.json
68
+ │ └── Subprocess B: Generate E2E tests → /tmp/e2e-tests-{timestamp}.json
69
+ ├── Step 4: Aggregate tests
70
+ │ ├── Read API tests JSON
71
+ │ ├── Read E2E tests JSON
72
+ │ └── Generate fixtures (if needed)
73
+ ├── Step 5: Verify all tests pass
74
+ └── Step 6: Generate DoD summary
75
+ ```
76
+
77
+ #### Subprocess A: API Tests
78
+
79
+ **Input** (passed via temp file):
80
+
81
+ ```json
82
+ {
83
+ "features": ["feature1", "feature2"],
84
+ "knowledge_fragments": ["api-request", "data-factories"],
85
+ "config": {
86
+ "use_playwright_utils": true,
87
+ "framework": "playwright"
88
+ }
89
+ }
90
+ ```
91
+
92
+ **Output** (`/tmp/api-tests-{timestamp}.json`):
93
+
94
+ ```json
95
+ {
96
+ "success": true,
97
+ "tests": [
98
+ {
99
+ "file": "tests/api/feature1.spec.ts",
100
+ "content": "import { test, expect } from '@playwright/test';\n...",
101
+ "description": "API tests for feature1"
102
+ }
103
+ ],
104
+ "fixtures": [],
105
+ "summary": "Generated 5 API test cases"
106
+ }
107
+ ```
108
+
109
+ #### Subprocess B: E2E Tests
110
+
111
+ **Input** (passed via temp file):
112
+
113
+ ```json
114
+ {
115
+ "features": ["feature1", "feature2"],
116
+ "knowledge_fragments": ["fixture-architecture", "network-first"],
117
+ "config": {
118
+ "use_playwright_utils": true,
119
+ "framework": "playwright"
120
+ }
121
+ }
122
+ ```
123
+
124
+ **Output** (`/tmp/e2e-tests-{timestamp}.json`):
125
+
126
+ ```json
127
+ {
128
+ "success": true,
129
+ "tests": [
130
+ {
131
+ "file": "tests/e2e/feature1.spec.ts",
132
+ "content": "import { test, expect } from '@playwright/test';\n...",
133
+ "description": "E2E tests for feature1 user journey"
134
+ }
135
+ ],
136
+ "fixtures": ["authFixture", "dataFixture"],
137
+ "summary": "Generated 8 E2E test cases"
138
+ }
139
+ ```
140
+
141
+ #### Step 4: Aggregation Logic
142
+
143
+ ```javascript
144
+ // Read both subprocess outputs
145
+ const apiTests = JSON.parse(fs.readFileSync('/tmp/api-tests-{timestamp}.json', 'utf8'));
146
+ const e2eTests = JSON.parse(fs.readFileSync('/tmp/e2e-tests-{timestamp}.json', 'utf8'));
147
+
148
+ // Merge test suites
149
+ const allTests = [...apiTests.tests, ...e2eTests.tests];
150
+
151
+ // Collect unique fixtures
152
+ const allFixtures = [...new Set([...apiTests.fixtures, ...e2eTests.fixtures])];
153
+
154
+ // Generate combined DoD summary
155
+ const summary = {
156
+ total_tests: allTests.length,
157
+ api_tests: apiTests.tests.length,
158
+ e2e_tests: e2eTests.tests.length,
159
+ fixtures: allFixtures,
160
+ status: apiTests.success && e2eTests.success ? 'PASS' : 'FAIL',
161
+ };
162
+ ```
163
+
164
+ ---
165
+
166
+ ### 2. atdd - Parallel Failing Test Generation
167
+
168
+ **Goal**: Generate failing API and E2E tests in parallel (TDD red phase)
169
+
170
+ #### Architecture
171
+
172
+ ```
173
+ atdd workflow
174
+ ├── Step 1: Load story acceptance criteria
175
+ ├── Step 2: Load relevant knowledge fragments
176
+ ├── Step 3: Launch parallel test generation
177
+ │ ├── Subprocess A: Generate failing API tests → /tmp/atdd-api-{timestamp}.json
178
+ │ └── Subprocess B: Generate failing E2E tests → /tmp/atdd-e2e-{timestamp}.json
179
+ ├── Step 4: Aggregate tests
180
+ ├── Step 5: Verify tests fail (red phase)
181
+ └── Step 6: Output ATDD checklist
182
+ ```
183
+
184
+ **Key Difference from automate**: Tests must be written to **fail** before implementation exists.
185
+
186
+ #### Subprocess Outputs
187
+
188
+ Same JSON structure as automate, but:
189
+
190
+ - Tests include failing assertions (e.g., `expect(response.status).toBe(200)` when endpoint doesn't exist yet)
191
+ - Summary includes: `"expected_to_fail": true`
192
+
193
+ ---
194
+
195
+ ### 3. test-review - Parallel Quality Dimension Checks
196
+
197
+ **Goal**: Run independent quality checks in parallel, aggregate into 0-100 score
198
+
199
+ #### Architecture
200
+
201
+ ```
202
+ test-review workflow
203
+ ├── Step 1: Load test files & context
204
+ ├── Step 2: Launch parallel quality checks
205
+ │ ├── Subprocess A: Determinism check → /tmp/determinism-{timestamp}.json
206
+ │ ├── Subprocess B: Isolation check → /tmp/isolation-{timestamp}.json
207
+ │ ├── Subprocess C: Maintainability check → /tmp/maintainability-{timestamp}.json
208
+ │ ├── Subprocess D: Coverage check → /tmp/coverage-{timestamp}.json
209
+ │ └── Subprocess E: Performance check → /tmp/performance-{timestamp}.json
210
+ └── Step 3: Aggregate findings
211
+ ├── Calculate weighted score (0-100)
212
+ ├── Synthesize violations
213
+ └── Generate review report with suggestions
214
+ ```
215
+
216
+ #### Subprocess Output Format
217
+
218
+ Each quality dimension subprocess outputs:
219
+
220
+ ```json
221
+ {
222
+ "dimension": "determinism",
223
+ "score": 85,
224
+ "max_score": 100,
225
+ "violations": [
226
+ {
227
+ "file": "tests/api/user.spec.ts",
228
+ "line": 42,
229
+ "severity": "HIGH",
230
+ "description": "Test uses Math.random() - non-deterministic",
231
+ "suggestion": "Use faker with fixed seed"
232
+ }
233
+ ],
234
+ "passed_checks": 12,
235
+ "failed_checks": 3,
236
+ "summary": "Tests are mostly deterministic with 3 violations"
237
+ }
238
+ ```
239
+
240
+ #### Step 3: Aggregation Logic
241
+
242
+ ```javascript
243
+ // Read all dimension outputs
244
+ const dimensions = ['determinism', 'isolation', 'maintainability', 'coverage', 'performance'];
245
+ const results = dimensions.map((d) => JSON.parse(fs.readFileSync(`/tmp/${d}-{timestamp}.json`, 'utf8')));
246
+
247
+ // Calculate weighted score
248
+ const weights = { determinism: 0.25, isolation: 0.25, maintainability: 0.2, coverage: 0.15, performance: 0.15 };
249
+ const totalScore = results.reduce((sum, r) => sum + r.score * weights[r.dimension], 0);
250
+
251
+ // Aggregate violations by severity
252
+ const allViolations = results.flatMap((r) => r.violations);
253
+ const highSeverity = allViolations.filter((v) => v.severity === 'HIGH');
254
+ const mediumSeverity = allViolations.filter((v) => v.severity === 'MEDIUM');
255
+ const lowSeverity = allViolations.filter((v) => v.severity === 'LOW');
256
+
257
+ // Generate final report
258
+ const report = {
259
+ overall_score: Math.round(totalScore),
260
+ grade: getGrade(totalScore), // A/B/C/D/F
261
+ dimensions: results,
262
+ violations_summary: {
263
+ high: highSeverity.length,
264
+ medium: mediumSeverity.length,
265
+ low: lowSeverity.length,
266
+ total: allViolations.length,
267
+ },
268
+ top_suggestions: prioritizeSuggestions(allViolations),
269
+ };
270
+ ```
271
+
272
+ ---
273
+
274
+ ### 4. nfr-assess - Parallel NFR Domain Assessments
275
+
276
+ **Goal**: Assess independent NFR domains in parallel
277
+
278
+ #### Architecture
279
+
280
+ ```
281
+ nfr-assess workflow
282
+ ├── Step 1: Load system context
283
+ ├── Step 2: Launch parallel NFR assessments
284
+ │ ├── Subprocess A: Security assessment → /tmp/nfr-security-{timestamp}.json
285
+ │ ├── Subprocess B: Performance assessment → /tmp/nfr-performance-{timestamp}.json
286
+ │ ├── Subprocess C: Reliability assessment → /tmp/nfr-reliability-{timestamp}.json
287
+ │ └── Subprocess D: Scalability assessment → /tmp/nfr-scalability-{timestamp}.json
288
+ └── Step 3: Aggregate NFR report
289
+ ├── Synthesize domain assessments
290
+ ├── Identify cross-domain risks
291
+ └── Generate compliance documentation
292
+ ```
293
+
294
+ #### Subprocess Output Format
295
+
296
+ Each NFR domain subprocess outputs:
297
+
298
+ ```json
299
+ {
300
+ "domain": "security",
301
+ "risk_level": "MEDIUM",
302
+ "findings": [
303
+ {
304
+ "category": "Authentication",
305
+ "status": "PASS",
306
+ "description": "OAuth2 with JWT tokens implemented",
307
+ "recommendations": []
308
+ },
309
+ {
310
+ "category": "Data Encryption",
311
+ "status": "CONCERN",
312
+ "description": "Database encryption at rest not enabled",
313
+ "recommendations": ["Enable database encryption", "Use AWS KMS for key management"]
314
+ }
315
+ ],
316
+ "compliance": {
317
+ "SOC2": "PARTIAL",
318
+ "GDPR": "PASS",
319
+ "HIPAA": "N/A"
320
+ },
321
+ "priority_actions": ["Enable database encryption within 30 days"]
322
+ }
323
+ ```
324
+
325
+ #### Step 3: Aggregation Logic
326
+
327
+ ```javascript
328
+ // Read all NFR domain outputs
329
+ const domains = ['security', 'performance', 'reliability', 'scalability'];
330
+ const assessments = domains.map((d) => JSON.parse(fs.readFileSync(`/tmp/nfr-${d}-{timestamp}.json`, 'utf8')));
331
+
332
+ // Calculate overall risk
333
+ const riskLevels = { HIGH: 3, MEDIUM: 2, LOW: 1, NONE: 0 };
334
+ const maxRiskLevel = Math.max(...assessments.map((a) => riskLevels[a.risk_level]));
335
+ const overallRisk = Object.keys(riskLevels).find((k) => riskLevels[k] === maxRiskLevel);
336
+
337
+ // Aggregate compliance status
338
+ const allCompliance = assessments.flatMap((a) => Object.entries(a.compliance));
339
+ const complianceSummary = {};
340
+ allCompliance.forEach(([std, status]) => {
341
+ if (!complianceSummary[std]) complianceSummary[std] = [];
342
+ complianceSummary[std].push(status);
343
+ });
344
+
345
+ // Synthesize cross-domain risks
346
+ const crossDomainRisks = identifyCrossDomainRisks(assessments); // e.g., "Performance + scalability concern"
347
+
348
+ // Generate final report
349
+ const report = {
350
+ overall_risk: overallRisk,
351
+ domains: assessments,
352
+ compliance_summary: complianceSummary,
353
+ cross_domain_risks: crossDomainRisks,
354
+ priority_actions: assessments.flatMap((a) => a.priority_actions),
355
+ executive_summary: generateExecutiveSummary(assessments),
356
+ };
357
+ ```
358
+
359
+ ---
360
+
361
+ ### 5. trace - Two-Phase Workflow Separation
362
+
363
+ **Goal**: Clean separation of coverage matrix generation and gate decision
364
+
365
+ #### Architecture
366
+
367
+ ```
368
+ trace workflow
369
+ ├── Phase 1: Coverage Matrix
370
+ │ ├── Step 1: Load requirements
371
+ │ ├── Step 2: Analyze test suite
372
+ │ └── Step 3: Generate traceability matrix → /tmp/trace-matrix-{timestamp}.json
373
+ └── Phase 2: Gate Decision (depends on Phase 1 output)
374
+ ├── Step 4: Read coverage matrix
375
+ ├── Step 5: Apply decision tree logic
376
+ ├── Step 6: Calculate coverage percentages
377
+ └── Step 7: Generate gate decision (PASS/CONCERNS/FAIL/WAIVED)
378
+ ```
379
+
380
+ **Note**: This isn't parallel subprocesses, but subprocess-like **phase separation** where Phase 2 depends on Phase 1 output.
381
+
382
+ #### Phase 1 Output Format
383
+
384
+ ```json
385
+ {
386
+ "requirements": [
387
+ {
388
+ "id": "REQ-001",
389
+ "description": "User can login with email/password",
390
+ "priority": "P0",
391
+ "tests": ["tests/auth/login.spec.ts::should login with valid credentials"],
392
+ "coverage": "FULL"
393
+ },
394
+ {
395
+ "id": "REQ-002",
396
+ "description": "User can reset password",
397
+ "priority": "P1",
398
+ "tests": [],
399
+ "coverage": "NONE"
400
+ }
401
+ ],
402
+ "total_requirements": 50,
403
+ "covered_requirements": 42,
404
+ "coverage_percentage": 84
405
+ }
406
+ ```
407
+
408
+ #### Phase 2: Gate Decision Logic
409
+
410
+ ```javascript
411
+ // Read Phase 1 output
412
+ const matrix = JSON.parse(fs.readFileSync('/tmp/trace-matrix-{timestamp}.json', 'utf8'));
413
+
414
+ // Apply decision tree
415
+ const p0Coverage = matrix.requirements.filter((r) => r.priority === 'P0' && r.coverage === 'FULL').length;
416
+ const totalP0 = matrix.requirements.filter((r) => r.priority === 'P0').length;
417
+
418
+ let gateDecision;
419
+ if (p0Coverage === totalP0 && matrix.coverage_percentage >= 90) {
420
+ gateDecision = 'PASS';
421
+ } else if (p0Coverage === totalP0 && matrix.coverage_percentage >= 75) {
422
+ gateDecision = 'CONCERNS';
423
+ } else if (p0Coverage < totalP0) {
424
+ gateDecision = 'FAIL';
425
+ } else {
426
+ gateDecision = 'WAIVED'; // Manual review required
427
+ }
428
+
429
+ // Generate gate report
430
+ const report = {
431
+ decision: gateDecision,
432
+ coverage_matrix: matrix,
433
+ p0_coverage: `${p0Coverage}/${totalP0}`,
434
+ overall_coverage: `${matrix.coverage_percentage}%`,
435
+ recommendations: generateRecommendations(matrix, gateDecision),
436
+ uncovered_requirements: matrix.requirements.filter((r) => r.coverage === 'NONE'),
437
+ };
438
+ ```
439
+
440
+ ---
441
+
442
+ ## Implementation Guidelines
443
+
444
+ ### Temp File Management
445
+
446
+ **Naming Convention**:
447
+
448
+ ```
449
+ /tmp/{workflow}-{subprocess-name}-{timestamp}.json
450
+ ```
451
+
452
+ **Examples**:
453
+
454
+ - `/tmp/automate-api-tests-20260127-143022.json`
455
+ - `/tmp/test-review-determinism-20260127-143022.json`
456
+ - `/tmp/nfr-security-20260127-143022.json`
457
+
458
+ **Cleanup**:
459
+
460
+ - Temp files should be cleaned up after successful aggregation
461
+ - Keep temp files on error for debugging
462
+ - Implement retry logic for temp file reads (race conditions)
463
+
464
+ ### Error Handling
465
+
466
+ Each subprocess JSON output must include:
467
+
468
+ ```json
469
+ {
470
+ "success": true|false,
471
+ "error": "Error message if failed",
472
+ "data": { ... }
473
+ }
474
+ ```
475
+
476
+ Main workflow aggregation step must:
477
+
478
+ 1. Check `success` field for each subprocess
479
+ 2. If any subprocess failed, aggregate error messages
480
+ 3. Decide whether to continue (partial success) or fail (critical subprocess failed)
481
+
482
+ ### Performance Considerations
483
+
484
+ **Subprocess Isolation**:
485
+
486
+ - Each subprocess runs in separate 200k context container
487
+ - No shared memory or state
488
+ - Communication only via JSON files
489
+
490
+ **Parallelization**:
491
+
492
+ - Use Claude Code's subprocess/agent launching capabilities
493
+ - Ensure temp file paths are unique (timestamp-based)
494
+ - Implement proper synchronization (wait for all subprocesses to complete)
495
+
496
+ ---
497
+
498
+ ## Testing Subprocess Workflows
499
+
500
+ ### Test Checklist
501
+
502
+ For each workflow with subprocesses:
503
+
504
+ - [ ] **Unit Test**: Test each subprocess in isolation
505
+ - Provide mock input JSON
506
+ - Verify output JSON structure
507
+ - Test error scenarios
508
+
509
+ - [ ] **Integration Test**: Test full workflow
510
+ - Launch all subprocesses
511
+ - Verify parallel execution
512
+ - Verify aggregation logic
513
+ - Test with real project data
514
+
515
+ - [ ] **Performance Test**: Measure speedup
516
+ - Benchmark sequential vs parallel
517
+ - Measure subprocess overhead
518
+ - Verify memory usage acceptable
519
+
520
+ - [ ] **Error Handling Test**: Test failure scenarios
521
+ - One subprocess fails
522
+ - Multiple subprocesses fail
523
+ - Temp file read/write errors
524
+ - Timeout scenarios
525
+
526
+ ### Expected Performance Gains
527
+
528
+ **automate**:
529
+
530
+ - Sequential: ~5-10 minutes (API then E2E)
531
+ - Parallel: ~3-6 minutes (both at once)
532
+ - **Speedup: ~40-50%**
533
+
534
+ **test-review**:
535
+
536
+ - Sequential: ~3-5 minutes (5 quality checks)
537
+ - Parallel: ~1-2 minutes (all checks at once)
538
+ - **Speedup: ~60-70%**
539
+
540
+ **nfr-assess**:
541
+
542
+ - Sequential: ~8-12 minutes (4 NFR domains)
543
+ - Parallel: ~3-5 minutes (all domains at once)
544
+ - **Speedup: ~60-70%**
545
+
546
+ ---
547
+
548
+ ## Documentation for Users
549
+
550
+ Users don't need to know about subprocess implementation details, but they should know:
551
+
552
+ 1. **Performance**: Certain workflows are optimized for parallel execution
553
+ 2. **Temp Files**: Workflows create temporary files during execution (cleaned up automatically)
554
+ 3. **Progress**: When running workflows, they may see multiple "subprocess" indicators
555
+ 4. **Debugging**: If workflow fails, temp files may be preserved for troubleshooting
556
+
557
+ ---
558
+
559
+ ## Future Enhancements
560
+
561
+ 1. **Subprocess Pooling**: Reuse subprocess containers for multiple operations
562
+ 2. **Adaptive Parallelization**: Dynamically decide whether to parallelize based on workload
563
+ 3. **Progress Reporting**: Real-time progress updates from each subprocess
564
+ 4. **Caching**: Cache subprocess outputs for identical inputs (idempotent operations)
565
+ 5. **Distributed Execution**: Run subprocesses on different machines for massive parallelization
566
+
567
+ ---
568
+
569
+ ## References
570
+
571
+ - BMad Builder subprocess examples: `_bmad/bmb/workflows/*/subprocess-*.md`
572
+ - Claude Code agent/subprocess documentation
573
+ - TEA Workflow validation reports (proof of 100% compliance)
574
+
575
+ ---
576
+
577
+ **Status**: Ready for implementation across 5 workflows
578
+ **Next Steps**: Implement subprocess patterns in workflow step files, test, document