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.
- package/.github/CODE_OF_CONDUCT.md +128 -0
- package/.github/FUNDING.yaml +15 -0
- package/.github/ISSUE_TEMPLATE/config.yaml +11 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +70 -0
- package/.github/ISSUE_TEMPLATE/issue.md +61 -0
- package/.github/workflows/docs.yaml +66 -0
- package/.github/workflows/manual-release.yaml +195 -0
- package/.github/workflows/quality.yaml +114 -0
- package/.husky/pre-commit +20 -0
- package/.markdownlint-cli2.yaml +36 -0
- package/.nvmrc +1 -0
- package/.prettierignore +9 -0
- package/.vscode/settings.json +47 -0
- package/CHANGELOG.md +217 -0
- package/CONTRIBUTING.md +268 -0
- package/LICENSE +26 -0
- package/README.md +300 -0
- package/SECURITY.md +85 -0
- package/TEA-MODULE-MIGRATION-PLAN.md +3788 -0
- package/docs/404.md +20 -0
- package/docs/MIGRATION.md +447 -0
- package/docs/explanation/engagement-models.md +767 -0
- package/docs/explanation/fixture-architecture.md +484 -0
- package/docs/explanation/knowledge-base-system.md +599 -0
- package/docs/explanation/network-first-patterns.md +884 -0
- package/docs/explanation/risk-based-testing.md +628 -0
- package/docs/explanation/step-file-architecture.md +609 -0
- package/docs/explanation/subprocess-architecture.md +578 -0
- package/docs/explanation/subprocess-implementation-status.md +327 -0
- package/docs/explanation/tea-overview.md +425 -0
- package/docs/explanation/test-quality-standards.md +965 -0
- package/docs/explanation/testing-as-engineering.md +111 -0
- package/docs/glossary/index.md +160 -0
- package/docs/how-to/brownfield/use-tea-for-enterprise.md +571 -0
- package/docs/how-to/brownfield/use-tea-with-existing-tests.md +631 -0
- package/docs/how-to/customization/enable-tea-mcp-enhancements.md +455 -0
- package/docs/how-to/customization/integrate-playwright-utils.md +846 -0
- package/docs/how-to/workflows/run-atdd.md +460 -0
- package/docs/how-to/workflows/run-automate.md +690 -0
- package/docs/how-to/workflows/run-nfr-assess.md +731 -0
- package/docs/how-to/workflows/run-test-design.md +144 -0
- package/docs/how-to/workflows/run-test-review.md +638 -0
- package/docs/how-to/workflows/run-trace.md +951 -0
- package/docs/how-to/workflows/setup-ci.md +761 -0
- package/docs/how-to/workflows/setup-test-framework.md +99 -0
- package/docs/index.md +122 -0
- package/docs/reference/commands.md +300 -0
- package/docs/reference/configuration.md +729 -0
- package/docs/reference/knowledge-base.md +365 -0
- package/docs/reference/troubleshooting.md +717 -0
- package/docs/tutorials/tea-lite-quickstart.md +465 -0
- package/eslint.config.mjs +152 -0
- package/package.json +117 -0
- package/prettier.config.mjs +32 -0
- package/release_notes.md +28 -0
- package/src/_module-installer/installer.js +92 -0
- package/src/agents/tea.agent.yaml +63 -0
- package/src/module-help.csv +9 -0
- package/src/module.yaml +91 -0
- package/src/testarch/knowledge/adr-quality-readiness-checklist.md +377 -0
- package/src/testarch/knowledge/api-request.md +442 -0
- package/src/testarch/knowledge/api-testing-patterns.md +851 -0
- package/src/testarch/knowledge/auth-session.md +548 -0
- package/src/testarch/knowledge/burn-in.md +273 -0
- package/src/testarch/knowledge/ci-burn-in.md +675 -0
- package/src/testarch/knowledge/component-tdd.md +486 -0
- package/src/testarch/knowledge/contract-testing.md +957 -0
- package/src/testarch/knowledge/data-factories.md +500 -0
- package/src/testarch/knowledge/email-auth.md +721 -0
- package/src/testarch/knowledge/error-handling.md +725 -0
- package/src/testarch/knowledge/feature-flags.md +750 -0
- package/src/testarch/knowledge/file-utils.md +456 -0
- package/src/testarch/knowledge/fixture-architecture.md +401 -0
- package/src/testarch/knowledge/fixtures-composition.md +382 -0
- package/src/testarch/knowledge/intercept-network-call.md +426 -0
- package/src/testarch/knowledge/log.md +426 -0
- package/src/testarch/knowledge/network-error-monitor.md +401 -0
- package/src/testarch/knowledge/network-first.md +486 -0
- package/src/testarch/knowledge/network-recorder.md +527 -0
- package/src/testarch/knowledge/nfr-criteria.md +670 -0
- package/src/testarch/knowledge/overview.md +286 -0
- package/src/testarch/knowledge/playwright-config.md +730 -0
- package/src/testarch/knowledge/probability-impact.md +601 -0
- package/src/testarch/knowledge/recurse.md +421 -0
- package/src/testarch/knowledge/risk-governance.md +615 -0
- package/src/testarch/knowledge/selective-testing.md +732 -0
- package/src/testarch/knowledge/selector-resilience.md +527 -0
- package/src/testarch/knowledge/test-healing-patterns.md +644 -0
- package/src/testarch/knowledge/test-levels-framework.md +473 -0
- package/src/testarch/knowledge/test-priorities-matrix.md +373 -0
- package/src/testarch/knowledge/test-quality.md +664 -0
- package/src/testarch/knowledge/timing-debugging.md +372 -0
- package/src/testarch/knowledge/visual-debugging.md +524 -0
- package/src/testarch/tea-index.csv +35 -0
- package/src/workflows/testarch/README.md +74 -0
- package/src/workflows/testarch/atdd/atdd-checklist-template.md +363 -0
- package/src/workflows/testarch/atdd/checklist.md +374 -0
- package/src/workflows/testarch/atdd/instructions.md +38 -0
- package/src/workflows/testarch/atdd/steps-c/step-01-preflight-and-context.md +110 -0
- package/src/workflows/testarch/atdd/steps-c/step-02-generation-mode.md +79 -0
- package/src/workflows/testarch/atdd/steps-c/step-03-test-strategy.md +76 -0
- package/src/workflows/testarch/atdd/steps-c/step-04-generate-tests.md +228 -0
- package/src/workflows/testarch/atdd/steps-c/step-04a-subprocess-api-failing.md +215 -0
- package/src/workflows/testarch/atdd/steps-c/step-04b-subprocess-e2e-failing.md +212 -0
- package/src/workflows/testarch/atdd/steps-c/step-04c-aggregate.md +329 -0
- package/src/workflows/testarch/atdd/steps-c/step-05-validate-and-complete.md +68 -0
- package/src/workflows/testarch/atdd/steps-e/step-01-assess.md +65 -0
- package/src/workflows/testarch/atdd/steps-e/step-02-apply-edit.md +60 -0
- package/src/workflows/testarch/atdd/steps-v/step-01-validate.md +67 -0
- package/src/workflows/testarch/atdd/validation-report-20260127-095021.md +73 -0
- package/src/workflows/testarch/atdd/validation-report-20260127-102401.md +116 -0
- package/src/workflows/testarch/atdd/workflow-plan.md +21 -0
- package/src/workflows/testarch/atdd/workflow.md +39 -0
- package/src/workflows/testarch/atdd/workflow.yaml +47 -0
- package/src/workflows/testarch/automate/checklist.md +582 -0
- package/src/workflows/testarch/automate/instructions.md +43 -0
- package/src/workflows/testarch/automate/steps-c/step-01-preflight-and-context.md +127 -0
- package/src/workflows/testarch/automate/steps-c/step-02-identify-targets.md +95 -0
- package/src/workflows/testarch/automate/steps-c/step-03-generate-tests.md +199 -0
- package/src/workflows/testarch/automate/steps-c/step-03a-subprocess-api.md +183 -0
- package/src/workflows/testarch/automate/steps-c/step-03b-subprocess-e2e.md +181 -0
- package/src/workflows/testarch/automate/steps-c/step-03c-aggregate.md +300 -0
- package/src/workflows/testarch/automate/steps-c/step-04-validate-and-summarize.md +69 -0
- package/src/workflows/testarch/automate/steps-e/step-01-assess.md +65 -0
- package/src/workflows/testarch/automate/steps-e/step-02-apply-edit.md +60 -0
- package/src/workflows/testarch/automate/steps-v/step-01-validate.md +67 -0
- package/src/workflows/testarch/automate/validation-report-20260127-095021.md +72 -0
- package/src/workflows/testarch/automate/validation-report-20260127-102401.md +114 -0
- package/src/workflows/testarch/automate/workflow-plan.md +20 -0
- package/src/workflows/testarch/automate/workflow.md +39 -0
- package/src/workflows/testarch/automate/workflow.yaml +54 -0
- package/src/workflows/testarch/ci/checklist.md +247 -0
- package/src/workflows/testarch/ci/github-actions-template.yaml +198 -0
- package/src/workflows/testarch/ci/gitlab-ci-template.yaml +149 -0
- package/src/workflows/testarch/ci/instructions.md +38 -0
- package/src/workflows/testarch/ci/steps-c/step-01-preflight.md +92 -0
- package/src/workflows/testarch/ci/steps-c/step-02-generate-pipeline.md +82 -0
- package/src/workflows/testarch/ci/steps-c/step-03-configure-quality-gates.md +75 -0
- package/src/workflows/testarch/ci/steps-c/step-04-validate-and-summary.md +67 -0
- package/src/workflows/testarch/ci/steps-e/step-01-assess.md +65 -0
- package/src/workflows/testarch/ci/steps-e/step-02-apply-edit.md +60 -0
- package/src/workflows/testarch/ci/steps-v/step-01-validate.md +67 -0
- package/src/workflows/testarch/ci/validation-report-20260127-095021.md +72 -0
- package/src/workflows/testarch/ci/validation-report-20260127-102401.md +114 -0
- package/src/workflows/testarch/ci/workflow-plan.md +20 -0
- package/src/workflows/testarch/ci/workflow.md +39 -0
- package/src/workflows/testarch/ci/workflow.yaml +47 -0
- package/src/workflows/testarch/framework/checklist.md +320 -0
- package/src/workflows/testarch/framework/instructions.md +38 -0
- package/src/workflows/testarch/framework/steps-c/step-01-preflight.md +75 -0
- package/src/workflows/testarch/framework/steps-c/step-02-select-framework.md +73 -0
- package/src/workflows/testarch/framework/steps-c/step-03-scaffold-framework.md +120 -0
- package/src/workflows/testarch/framework/steps-c/step-04-docs-and-scripts.md +70 -0
- package/src/workflows/testarch/framework/steps-c/step-05-validate-and-summary.md +68 -0
- package/src/workflows/testarch/framework/steps-e/step-01-assess.md +65 -0
- package/src/workflows/testarch/framework/steps-e/step-02-apply-edit.md +60 -0
- package/src/workflows/testarch/framework/steps-v/step-01-validate.md +67 -0
- package/src/workflows/testarch/framework/validation-report-20260127-095021.md +73 -0
- package/src/workflows/testarch/framework/validation-report-20260127-102401.md +116 -0
- package/src/workflows/testarch/framework/workflow-plan.md +22 -0
- package/src/workflows/testarch/framework/workflow.md +39 -0
- package/src/workflows/testarch/framework/workflow.yaml +49 -0
- package/src/workflows/testarch/nfr-assess/checklist.md +407 -0
- package/src/workflows/testarch/nfr-assess/instructions.md +36 -0
- package/src/workflows/testarch/nfr-assess/nfr-report-template.md +462 -0
- package/src/workflows/testarch/nfr-assess/steps-c/step-01-load-context.md +85 -0
- package/src/workflows/testarch/nfr-assess/steps-c/step-02-define-thresholds.md +82 -0
- package/src/workflows/testarch/nfr-assess/steps-c/step-03-gather-evidence.md +64 -0
- package/src/workflows/testarch/nfr-assess/steps-c/step-04-evaluate-and-score.md +140 -0
- package/src/workflows/testarch/nfr-assess/steps-c/step-04a-subprocess-security.md +138 -0
- package/src/workflows/testarch/nfr-assess/steps-c/step-04b-subprocess-performance.md +84 -0
- package/src/workflows/testarch/nfr-assess/steps-c/step-04c-subprocess-reliability.md +85 -0
- package/src/workflows/testarch/nfr-assess/steps-c/step-04d-subprocess-scalability.md +88 -0
- package/src/workflows/testarch/nfr-assess/steps-c/step-04e-aggregate-nfr.md +219 -0
- package/src/workflows/testarch/nfr-assess/steps-c/step-05-generate-report.md +71 -0
- package/src/workflows/testarch/nfr-assess/steps-e/step-01-assess.md +65 -0
- package/src/workflows/testarch/nfr-assess/steps-e/step-02-apply-edit.md +60 -0
- package/src/workflows/testarch/nfr-assess/steps-v/step-01-validate.md +67 -0
- package/src/workflows/testarch/nfr-assess/validation-report-20260127-095021.md +73 -0
- package/src/workflows/testarch/nfr-assess/validation-report-20260127-102401.md +116 -0
- package/src/workflows/testarch/nfr-assess/workflow-plan.md +19 -0
- package/src/workflows/testarch/nfr-assess/workflow.md +39 -0
- package/src/workflows/testarch/nfr-assess/workflow.yaml +49 -0
- package/src/workflows/testarch/test-design/checklist.md +410 -0
- package/src/workflows/testarch/test-design/instructions.md +52 -0
- package/src/workflows/testarch/test-design/steps-c/step-01-detect-mode.md +109 -0
- package/src/workflows/testarch/test-design/steps-c/step-02-load-context.md +127 -0
- package/src/workflows/testarch/test-design/steps-c/step-03-risk-and-testability.md +85 -0
- package/src/workflows/testarch/test-design/steps-c/step-04-coverage-plan.md +98 -0
- package/src/workflows/testarch/test-design/steps-c/step-05-generate-output.md +97 -0
- package/src/workflows/testarch/test-design/steps-e/step-01-assess.md +65 -0
- package/src/workflows/testarch/test-design/steps-e/step-02-apply-edit.md +60 -0
- package/src/workflows/testarch/test-design/steps-v/step-01-validate.md +67 -0
- package/src/workflows/testarch/test-design/test-design-architecture-template.md +222 -0
- package/src/workflows/testarch/test-design/test-design-qa-template.md +296 -0
- package/src/workflows/testarch/test-design/test-design-template.md +294 -0
- package/src/workflows/testarch/test-design/validation-report-20260127-095021.md +73 -0
- package/src/workflows/testarch/test-design/validation-report-20260127-102401.md +116 -0
- package/src/workflows/testarch/test-design/workflow-plan.md +22 -0
- package/src/workflows/testarch/test-design/workflow.md +39 -0
- package/src/workflows/testarch/test-design/workflow.yaml +71 -0
- package/src/workflows/testarch/test-review/checklist.md +472 -0
- package/src/workflows/testarch/test-review/instructions.md +36 -0
- package/src/workflows/testarch/test-review/steps-c/step-01-load-context.md +101 -0
- package/src/workflows/testarch/test-review/steps-c/step-02-discover-tests.md +69 -0
- package/src/workflows/testarch/test-review/steps-c/step-03-quality-evaluation.md +184 -0
- package/src/workflows/testarch/test-review/steps-c/step-03a-subprocess-determinism.md +214 -0
- package/src/workflows/testarch/test-review/steps-c/step-03b-subprocess-isolation.md +125 -0
- package/src/workflows/testarch/test-review/steps-c/step-03c-subprocess-maintainability.md +102 -0
- package/src/workflows/testarch/test-review/steps-c/step-03d-subprocess-coverage.md +111 -0
- package/src/workflows/testarch/test-review/steps-c/step-03e-subprocess-performance.md +117 -0
- package/src/workflows/testarch/test-review/steps-c/step-03f-aggregate-scores.md +246 -0
- package/src/workflows/testarch/test-review/steps-c/step-04-generate-report.md +72 -0
- package/src/workflows/testarch/test-review/steps-e/step-01-assess.md +65 -0
- package/src/workflows/testarch/test-review/steps-e/step-02-apply-edit.md +60 -0
- package/src/workflows/testarch/test-review/steps-v/step-01-validate.md +67 -0
- package/src/workflows/testarch/test-review/test-review-template.md +390 -0
- package/src/workflows/testarch/test-review/validation-report-20260127-095021.md +72 -0
- package/src/workflows/testarch/test-review/validation-report-20260127-102401.md +114 -0
- package/src/workflows/testarch/test-review/workflow-plan.md +18 -0
- package/src/workflows/testarch/test-review/workflow.md +39 -0
- package/src/workflows/testarch/test-review/workflow.yaml +48 -0
- package/src/workflows/testarch/trace/checklist.md +642 -0
- package/src/workflows/testarch/trace/instructions.md +36 -0
- package/src/workflows/testarch/trace/steps-c/step-01-load-context.md +80 -0
- package/src/workflows/testarch/trace/steps-c/step-02-discover-tests.md +69 -0
- package/src/workflows/testarch/trace/steps-c/step-03-map-criteria.md +65 -0
- package/src/workflows/testarch/trace/steps-c/step-04-analyze-gaps.md +244 -0
- package/src/workflows/testarch/trace/steps-c/step-05-gate-decision.md +232 -0
- package/src/workflows/testarch/trace/steps-e/step-01-assess.md +65 -0
- package/src/workflows/testarch/trace/steps-e/step-02-apply-edit.md +60 -0
- package/src/workflows/testarch/trace/steps-v/step-01-validate.md +67 -0
- package/src/workflows/testarch/trace/trace-template.md +675 -0
- package/src/workflows/testarch/trace/validation-report-20260127-095021.md +73 -0
- package/src/workflows/testarch/trace/validation-report-20260127-102401.md +116 -0
- package/src/workflows/testarch/trace/workflow-plan.md +21 -0
- package/src/workflows/testarch/trace/workflow.md +39 -0
- package/src/workflows/testarch/trace/workflow.yaml +57 -0
- package/test/README.md +23 -0
- package/test/fixtures/agent-schema/invalid/critical-actions/actions-as-string.agent.yaml +27 -0
- package/test/fixtures/agent-schema/invalid/critical-actions/empty-string-in-actions.agent.yaml +30 -0
- package/test/fixtures/agent-schema/invalid/menu/empty-menu.agent.yaml +22 -0
- package/test/fixtures/agent-schema/invalid/menu/missing-menu.agent.yaml +20 -0
- package/test/fixtures/agent-schema/invalid/menu-commands/empty-command-target.agent.yaml +25 -0
- package/test/fixtures/agent-schema/invalid/menu-commands/no-command-target.agent.yaml +24 -0
- package/test/fixtures/agent-schema/invalid/menu-triggers/camel-case.agent.yaml +25 -0
- package/test/fixtures/agent-schema/invalid/menu-triggers/compound-invalid-format.agent.yaml +25 -0
- package/test/fixtures/agent-schema/invalid/menu-triggers/compound-mismatched-kebab.agent.yaml +25 -0
- package/test/fixtures/agent-schema/invalid/menu-triggers/duplicate-triggers.agent.yaml +31 -0
- package/test/fixtures/agent-schema/invalid/menu-triggers/empty-trigger.agent.yaml +25 -0
- package/test/fixtures/agent-schema/invalid/menu-triggers/leading-asterisk.agent.yaml +25 -0
- package/test/fixtures/agent-schema/invalid/menu-triggers/snake-case.agent.yaml +25 -0
- package/test/fixtures/agent-schema/invalid/menu-triggers/trigger-with-spaces.agent.yaml +25 -0
- package/test/fixtures/agent-schema/invalid/metadata/empty-module-string.agent.yaml +26 -0
- package/test/fixtures/agent-schema/invalid/metadata/empty-name.agent.yaml +24 -0
- package/test/fixtures/agent-schema/invalid/metadata/extra-metadata-fields.agent.yaml +27 -0
- package/test/fixtures/agent-schema/invalid/metadata/missing-id.agent.yaml +23 -0
- package/test/fixtures/agent-schema/invalid/persona/empty-principles-array.agent.yaml +24 -0
- package/test/fixtures/agent-schema/invalid/persona/empty-string-in-principles.agent.yaml +27 -0
- package/test/fixtures/agent-schema/invalid/persona/extra-persona-fields.agent.yaml +27 -0
- package/test/fixtures/agent-schema/invalid/persona/missing-role.agent.yaml +24 -0
- package/test/fixtures/agent-schema/invalid/prompts/empty-content.agent.yaml +29 -0
- package/test/fixtures/agent-schema/invalid/prompts/extra-prompt-fields.agent.yaml +31 -0
- package/test/fixtures/agent-schema/invalid/prompts/missing-content.agent.yaml +28 -0
- package/test/fixtures/agent-schema/invalid/prompts/missing-id.agent.yaml +28 -0
- package/test/fixtures/agent-schema/invalid/top-level/empty-file.agent.yaml +5 -0
- package/test/fixtures/agent-schema/invalid/top-level/extra-top-level-keys.agent.yaml +28 -0
- package/test/fixtures/agent-schema/invalid/top-level/missing-agent-key.agent.yaml +11 -0
- package/test/fixtures/agent-schema/invalid/yaml-errors/invalid-indentation.agent.yaml +19 -0
- package/test/fixtures/agent-schema/invalid/yaml-errors/malformed-yaml.agent.yaml +18 -0
- package/test/fixtures/agent-schema/valid/critical-actions/empty-critical-actions.agent.yaml +24 -0
- package/test/fixtures/agent-schema/valid/critical-actions/no-critical-actions.agent.yaml +22 -0
- package/test/fixtures/agent-schema/valid/critical-actions/valid-critical-actions.agent.yaml +27 -0
- package/test/fixtures/agent-schema/valid/menu/multiple-menu-items.agent.yaml +31 -0
- package/test/fixtures/agent-schema/valid/menu/single-menu-item.agent.yaml +22 -0
- package/test/fixtures/agent-schema/valid/menu-commands/all-command-types.agent.yaml +38 -0
- package/test/fixtures/agent-schema/valid/menu-commands/multiple-commands.agent.yaml +24 -0
- package/test/fixtures/agent-schema/valid/menu-triggers/compound-triggers.agent.yaml +31 -0
- package/test/fixtures/agent-schema/valid/menu-triggers/kebab-case-triggers.agent.yaml +34 -0
- package/test/fixtures/agent-schema/valid/metadata/core-agent-with-module.agent.yaml +24 -0
- package/test/fixtures/agent-schema/valid/metadata/empty-module-name-in-path.agent.yaml +24 -0
- package/test/fixtures/agent-schema/valid/metadata/malformed-path-treated-as-core.agent.yaml +24 -0
- package/test/fixtures/agent-schema/valid/metadata/module-agent-correct.agent.yaml +24 -0
- package/test/fixtures/agent-schema/valid/metadata/module-agent-missing-module.agent.yaml +23 -0
- package/test/fixtures/agent-schema/valid/metadata/wrong-module-value.agent.yaml +24 -0
- package/test/fixtures/agent-schema/valid/persona/complete-persona.agent.yaml +24 -0
- package/test/fixtures/agent-schema/valid/prompts/empty-prompts.agent.yaml +24 -0
- package/test/fixtures/agent-schema/valid/prompts/no-prompts.agent.yaml +22 -0
- package/test/fixtures/agent-schema/valid/prompts/valid-prompts-minimal.agent.yaml +28 -0
- package/test/fixtures/agent-schema/valid/prompts/valid-prompts-with-description.agent.yaml +30 -0
- package/test/fixtures/agent-schema/valid/top-level/minimal-core-agent.agent.yaml +24 -0
- package/test/schema/agent.js +491 -0
- package/test/test-agent-schema.js +387 -0
- package/test/test-installation-components.js +183 -0
- package/test/test-knowledge-base.js +199 -0
- package/test/unit-test-schema.js +133 -0
- package/test/validate-agent-schema.js +110 -0
- package/tools/build-docs.js +575 -0
- package/tools/fix-doc-links.js +288 -0
- package/tools/schema/agent.js +491 -0
- package/tools/validate-agent-schema.js +111 -0
- package/tools/validate-doc-links.js +371 -0
- package/tools/verify-paths.js +100 -0
- package/website/README.md +137 -0
- package/website/astro.config.mjs +158 -0
- package/website/package-lock.json +6856 -0
- package/website/package.json +23 -0
- package/website/public/favicon.ico +0 -0
- package/website/public/img/tea-logo.svg +7 -0
- package/website/public/robots.txt +37 -0
- package/website/src/components/Banner.astro +59 -0
- package/website/src/components/Header.astro +121 -0
- package/website/src/components/MobileMenuFooter.astro +53 -0
- package/website/src/content/config.ts +6 -0
- package/website/src/lib/site-url.js +25 -0
- package/website/src/pages/404.astro +11 -0
- package/website/src/rehype-base-paths.js +89 -0
- package/website/src/rehype-markdown-links.js +117 -0
- package/website/src/styles/custom.css +499 -0
- package/website/tsconfig.json +9 -0
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Base Validation Tests - TEA Module
|
|
3
|
+
*
|
|
4
|
+
* Tests tea-index.csv parsing, fragment existence, tag selection,
|
|
5
|
+
* and cross-fragment link references.
|
|
6
|
+
*
|
|
7
|
+
* Usage: node test/test-knowledge-base.js
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
const fs = require('node:fs');
|
|
11
|
+
const path = require('node:path');
|
|
12
|
+
const { parse } = require('csv-parse/sync');
|
|
13
|
+
|
|
14
|
+
// ANSI colors
|
|
15
|
+
const colors = {
|
|
16
|
+
reset: '\u001B[0m',
|
|
17
|
+
green: '\u001B[32m',
|
|
18
|
+
red: '\u001B[31m',
|
|
19
|
+
yellow: '\u001B[33m',
|
|
20
|
+
cyan: '\u001B[36m',
|
|
21
|
+
dim: '\u001B[2m',
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
let passed = 0;
|
|
25
|
+
let failed = 0;
|
|
26
|
+
let warned = 0;
|
|
27
|
+
|
|
28
|
+
function assert(condition, testName, errorMessage = '') {
|
|
29
|
+
if (condition) {
|
|
30
|
+
console.log(`${colors.green}✓${colors.reset} ${testName}`);
|
|
31
|
+
passed++;
|
|
32
|
+
} else {
|
|
33
|
+
console.log(`${colors.red}✗${colors.reset} ${testName}`);
|
|
34
|
+
if (errorMessage) {
|
|
35
|
+
console.log(` ${colors.dim}${errorMessage}${colors.reset}`);
|
|
36
|
+
}
|
|
37
|
+
failed++;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function warn(message) {
|
|
42
|
+
console.log(`${colors.yellow}•${colors.reset} ${message}`);
|
|
43
|
+
warned++;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function parseTags(tagString) {
|
|
47
|
+
if (!tagString) return [];
|
|
48
|
+
return tagString
|
|
49
|
+
.split(',')
|
|
50
|
+
.map((tag) => tag.trim())
|
|
51
|
+
.filter(Boolean);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function isExternalLink(href) {
|
|
55
|
+
return href.startsWith('http://') || href.startsWith('https://');
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function resolveFragmentLink(baseDir, href) {
|
|
59
|
+
if (href.startsWith('knowledge/')) {
|
|
60
|
+
return path.join(baseDir, href);
|
|
61
|
+
}
|
|
62
|
+
if (href.startsWith('./') || href.startsWith('../')) {
|
|
63
|
+
return path.join(baseDir, href);
|
|
64
|
+
}
|
|
65
|
+
// If only a filename is provided, assume knowledge dir
|
|
66
|
+
if (href.endsWith('.md') && !href.includes('/')) {
|
|
67
|
+
return path.join(baseDir, 'knowledge', href);
|
|
68
|
+
}
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function runTests() {
|
|
73
|
+
console.log(`${colors.cyan}========================================`);
|
|
74
|
+
console.log('TEA Knowledge Base Tests');
|
|
75
|
+
console.log(`========================================${colors.reset}\n`);
|
|
76
|
+
|
|
77
|
+
const projectRoot = path.join(__dirname, '..');
|
|
78
|
+
const kbRoot = path.join(projectRoot, 'src', 'testarch');
|
|
79
|
+
const indexPath = path.join(kbRoot, 'tea-index.csv');
|
|
80
|
+
|
|
81
|
+
// ============================================================
|
|
82
|
+
// Test 1: Parse CSV and validate structure
|
|
83
|
+
// ============================================================
|
|
84
|
+
console.log(`${colors.yellow}Test Suite 1: CSV Structure${colors.reset}\n`);
|
|
85
|
+
|
|
86
|
+
let records = [];
|
|
87
|
+
try {
|
|
88
|
+
const csv = fs.readFileSync(indexPath, 'utf8');
|
|
89
|
+
records = parse(csv, { columns: true, skip_empty_lines: true });
|
|
90
|
+
|
|
91
|
+
assert(records.length === 34, 'tea-index.csv has 34 fragment records', `Found ${records.length}`);
|
|
92
|
+
|
|
93
|
+
const requiredFields = ['id', 'name', 'description', 'tags', 'fragment_file'];
|
|
94
|
+
const missingFields = requiredFields.filter((field) => !Object.prototype.hasOwnProperty.call(records[0] || {}, field));
|
|
95
|
+
assert(missingFields.length === 0, 'tea-index.csv has required columns', missingFields.join(', '));
|
|
96
|
+
} catch (error) {
|
|
97
|
+
assert(false, 'tea-index.csv parsed successfully', error.message);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
console.log('');
|
|
101
|
+
|
|
102
|
+
// ============================================================
|
|
103
|
+
// Test 2: Fragment file existence
|
|
104
|
+
// ============================================================
|
|
105
|
+
console.log(`${colors.yellow}Test Suite 2: Fragment Existence${colors.reset}\n`);
|
|
106
|
+
|
|
107
|
+
if (records.length > 0) {
|
|
108
|
+
let missingCount = 0;
|
|
109
|
+
for (const record of records) {
|
|
110
|
+
const fragmentPath = path.join(kbRoot, record.fragment_file);
|
|
111
|
+
const exists = fs.existsSync(fragmentPath);
|
|
112
|
+
if (!exists) missingCount++;
|
|
113
|
+
assert(exists, `fragment exists: ${record.fragment_file}`);
|
|
114
|
+
}
|
|
115
|
+
assert(missingCount === 0, 'all fragments exist');
|
|
116
|
+
} else {
|
|
117
|
+
assert(false, 'fragment records loaded', 'No records found in tea-index.csv');
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
console.log('');
|
|
121
|
+
|
|
122
|
+
// ============================================================
|
|
123
|
+
// Test 3: Tag selection logic
|
|
124
|
+
// ============================================================
|
|
125
|
+
console.log(`${colors.yellow}Test Suite 3: Tag Selection${colors.reset}\n`);
|
|
126
|
+
|
|
127
|
+
if (records.length > 0) {
|
|
128
|
+
const firstTag = parseTags(records[0].tags)[0];
|
|
129
|
+
const selected = records.filter((record) => parseTags(record.tags).includes(firstTag));
|
|
130
|
+
assert(Boolean(firstTag), 'first record has at least one tag');
|
|
131
|
+
assert(selected.length > 0, `tag filter returns results for '${firstTag}'`);
|
|
132
|
+
|
|
133
|
+
const none = records.filter((record) => parseTags(record.tags).includes('__no_such_tag__'));
|
|
134
|
+
assert(none.length === 0, 'unknown tag returns no results');
|
|
135
|
+
} else {
|
|
136
|
+
assert(false, 'tag selection tested', 'No records to test');
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
console.log('');
|
|
140
|
+
|
|
141
|
+
// ============================================================
|
|
142
|
+
// Test 4: Cross-fragment references
|
|
143
|
+
// ============================================================
|
|
144
|
+
console.log(`${colors.yellow}Test Suite 4: Cross-Fragment Links${colors.reset}\n`);
|
|
145
|
+
|
|
146
|
+
const knowledgeDir = path.join(kbRoot, 'knowledge');
|
|
147
|
+
const mdFiles = fs.readdirSync(knowledgeDir).filter((name) => name.endsWith('.md'));
|
|
148
|
+
|
|
149
|
+
let linkCount = 0;
|
|
150
|
+
let brokenLinks = 0;
|
|
151
|
+
|
|
152
|
+
for (const fileName of mdFiles) {
|
|
153
|
+
const filePath = path.join(knowledgeDir, fileName);
|
|
154
|
+
const content = fs.readFileSync(filePath, 'utf8');
|
|
155
|
+
|
|
156
|
+
const linkMatches = content.matchAll(/\]\(([^)]+)\)/g);
|
|
157
|
+
for (const match of linkMatches) {
|
|
158
|
+
const href = match[1].trim();
|
|
159
|
+
if (!href.endsWith('.md') || isExternalLink(href)) continue;
|
|
160
|
+
|
|
161
|
+
const resolved = resolveFragmentLink(kbRoot, href);
|
|
162
|
+
if (!resolved) continue;
|
|
163
|
+
|
|
164
|
+
linkCount++;
|
|
165
|
+
const exists = fs.existsSync(resolved);
|
|
166
|
+
if (!exists) brokenLinks++;
|
|
167
|
+
assert(exists, `link resolves: ${fileName} -> ${href}`);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
if (linkCount === 0) {
|
|
172
|
+
warn('no cross-fragment links detected (informational)');
|
|
173
|
+
} else {
|
|
174
|
+
assert(linkCount > 0, 'cross-fragment links detected (at least one)');
|
|
175
|
+
}
|
|
176
|
+
assert(brokenLinks === 0, 'no broken cross-fragment links');
|
|
177
|
+
|
|
178
|
+
console.log('');
|
|
179
|
+
|
|
180
|
+
// ============================================================
|
|
181
|
+
// Summary
|
|
182
|
+
// ============================================================
|
|
183
|
+
console.log(`${colors.cyan}========================================`);
|
|
184
|
+
console.log('Test Results:');
|
|
185
|
+
console.log(` Passed: ${colors.green}${passed}${colors.reset}`);
|
|
186
|
+
console.log(` Warnings: ${colors.yellow}${warned}${colors.reset}`);
|
|
187
|
+
console.log(` Failed: ${colors.red}${failed}${colors.reset}`);
|
|
188
|
+
console.log(`========================================${colors.reset}\n`);
|
|
189
|
+
|
|
190
|
+
if (failed === 0) {
|
|
191
|
+
console.log(`${colors.green}✨ Knowledge base tests passed!${colors.reset}\n`);
|
|
192
|
+
process.exit(0);
|
|
193
|
+
} else {
|
|
194
|
+
console.log(`${colors.red}❌ Knowledge base tests failed${colors.reset}\n`);
|
|
195
|
+
process.exit(1);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
runTests();
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unit Tests for Agent Schema Edge Cases
|
|
3
|
+
*
|
|
4
|
+
* Tests internal functions to achieve 100% branch coverage
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
const { validateAgentFile } = require('./schema/agent.js');
|
|
8
|
+
|
|
9
|
+
console.log('Running edge case unit tests...\n');
|
|
10
|
+
|
|
11
|
+
let passed = 0;
|
|
12
|
+
let failed = 0;
|
|
13
|
+
|
|
14
|
+
// Test 1: Path with malformed module structure (no slash after module name)
|
|
15
|
+
// This tests line 213: slashIndex === -1
|
|
16
|
+
console.log('Test 1: Malformed module path (no slash after module name)');
|
|
17
|
+
try {
|
|
18
|
+
const result = validateAgentFile('src/modules/bmm', {
|
|
19
|
+
agent: {
|
|
20
|
+
metadata: {
|
|
21
|
+
id: 'test',
|
|
22
|
+
name: 'Test',
|
|
23
|
+
title: 'Test',
|
|
24
|
+
icon: '🧪',
|
|
25
|
+
},
|
|
26
|
+
persona: {
|
|
27
|
+
role: 'Test',
|
|
28
|
+
identity: 'Test',
|
|
29
|
+
communication_style: 'Test',
|
|
30
|
+
principles: ['Test'],
|
|
31
|
+
},
|
|
32
|
+
menu: [{ trigger: 'help', description: 'Help', action: 'help' }],
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
if (result.success) {
|
|
37
|
+
console.log('✗ Should have failed - missing module field');
|
|
38
|
+
failed++;
|
|
39
|
+
} else {
|
|
40
|
+
console.log('✓ Correctly handled malformed path (treated as core agent)');
|
|
41
|
+
passed++;
|
|
42
|
+
}
|
|
43
|
+
} catch (error) {
|
|
44
|
+
console.log('✗ Unexpected error:', error.message);
|
|
45
|
+
failed++;
|
|
46
|
+
}
|
|
47
|
+
console.log('');
|
|
48
|
+
|
|
49
|
+
// Test 2: Module option with empty string
|
|
50
|
+
// This tests line 222: trimmed.length > 0
|
|
51
|
+
console.log('Test 2: Module agent with empty string in module field');
|
|
52
|
+
try {
|
|
53
|
+
const result = validateAgentFile('src/modules/bmm/agents/test.agent.yaml', {
|
|
54
|
+
agent: {
|
|
55
|
+
metadata: {
|
|
56
|
+
id: 'test',
|
|
57
|
+
name: 'Test',
|
|
58
|
+
title: 'Test',
|
|
59
|
+
icon: '🧪',
|
|
60
|
+
module: ' ', // Empty after trimming
|
|
61
|
+
},
|
|
62
|
+
persona: {
|
|
63
|
+
role: 'Test',
|
|
64
|
+
identity: 'Test',
|
|
65
|
+
communication_style: 'Test',
|
|
66
|
+
principles: ['Test'],
|
|
67
|
+
},
|
|
68
|
+
menu: [{ trigger: 'help', description: 'Help', action: 'help' }],
|
|
69
|
+
},
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
if (result.success) {
|
|
73
|
+
console.log('✗ Should have failed - empty module string');
|
|
74
|
+
failed++;
|
|
75
|
+
} else {
|
|
76
|
+
console.log('✓ Correctly rejected empty module string');
|
|
77
|
+
passed++;
|
|
78
|
+
}
|
|
79
|
+
} catch (error) {
|
|
80
|
+
console.log('✗ Unexpected error:', error.message);
|
|
81
|
+
failed++;
|
|
82
|
+
}
|
|
83
|
+
console.log('');
|
|
84
|
+
|
|
85
|
+
// Test 3: Core agent path (src/core/agents/...) - tests the !filePath.startsWith(marker) branch
|
|
86
|
+
console.log('Test 3: Core agent path returns null for module');
|
|
87
|
+
try {
|
|
88
|
+
const result = validateAgentFile('src/core/agents/test.agent.yaml', {
|
|
89
|
+
agent: {
|
|
90
|
+
metadata: {
|
|
91
|
+
id: 'test',
|
|
92
|
+
name: 'Test',
|
|
93
|
+
title: 'Test',
|
|
94
|
+
icon: '🧪',
|
|
95
|
+
// No module field - correct for core agent
|
|
96
|
+
},
|
|
97
|
+
persona: {
|
|
98
|
+
role: 'Test',
|
|
99
|
+
identity: 'Test',
|
|
100
|
+
communication_style: 'Test',
|
|
101
|
+
principles: ['Test'],
|
|
102
|
+
},
|
|
103
|
+
menu: [{ trigger: 'help', description: 'Help', action: 'help' }],
|
|
104
|
+
},
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
if (result.success) {
|
|
108
|
+
console.log('✓ Core agent validated correctly (no module required)');
|
|
109
|
+
passed++;
|
|
110
|
+
} else {
|
|
111
|
+
console.log('✗ Core agent should pass without module field');
|
|
112
|
+
failed++;
|
|
113
|
+
}
|
|
114
|
+
} catch (error) {
|
|
115
|
+
console.log('✗ Unexpected error:', error.message);
|
|
116
|
+
failed++;
|
|
117
|
+
}
|
|
118
|
+
console.log('');
|
|
119
|
+
|
|
120
|
+
// Summary
|
|
121
|
+
console.log('═══════════════════════════════════════');
|
|
122
|
+
console.log('Edge Case Unit Test Results:');
|
|
123
|
+
console.log(` Passed: ${passed}`);
|
|
124
|
+
console.log(` Failed: ${failed}`);
|
|
125
|
+
console.log('═══════════════════════════════════════\n');
|
|
126
|
+
|
|
127
|
+
if (failed === 0) {
|
|
128
|
+
console.log('✨ All edge case tests passed!\n');
|
|
129
|
+
process.exit(0);
|
|
130
|
+
} else {
|
|
131
|
+
console.log('❌ Some edge case tests failed\n');
|
|
132
|
+
process.exit(1);
|
|
133
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Schema Validator CLI
|
|
3
|
+
*
|
|
4
|
+
* Scans all *.agent.yaml files in src/{core,modules/*}/agents/
|
|
5
|
+
* and validates them against the Zod schema.
|
|
6
|
+
*
|
|
7
|
+
* Usage: node tools/validate-agent-schema.js [project_root]
|
|
8
|
+
* Exit codes: 0 = success, 1 = validation failures
|
|
9
|
+
*
|
|
10
|
+
* Optional argument:
|
|
11
|
+
* project_root - Directory to scan (defaults to BMAD repo root)
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
const { glob } = require('glob');
|
|
15
|
+
const yaml = require('yaml');
|
|
16
|
+
const fs = require('node:fs');
|
|
17
|
+
const path = require('node:path');
|
|
18
|
+
const { validateAgentFile } = require('./schema/agent.js');
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Main validation routine
|
|
22
|
+
* @param {string} [customProjectRoot] - Optional project root to scan (for testing)
|
|
23
|
+
*/
|
|
24
|
+
async function main(customProjectRoot) {
|
|
25
|
+
console.log('🔍 Scanning for agent files...\n');
|
|
26
|
+
|
|
27
|
+
// Determine project root: use custom path if provided, otherwise default to repo root
|
|
28
|
+
const project_root = customProjectRoot || path.join(__dirname, '..');
|
|
29
|
+
|
|
30
|
+
// Find all agent files
|
|
31
|
+
const agentFiles = await glob('src/**/*.agent.yaml', {
|
|
32
|
+
cwd: project_root,
|
|
33
|
+
absolute: true,
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
if (agentFiles.length === 0) {
|
|
37
|
+
console.log('❌ No agent files found. This likely indicates a configuration error.');
|
|
38
|
+
console.log(' Expected to find *.agent.yaml files in src/{core,modules/*}/agents/');
|
|
39
|
+
process.exit(1);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
console.log(`Found ${agentFiles.length} agent file(s)\n`);
|
|
43
|
+
|
|
44
|
+
const errors = [];
|
|
45
|
+
|
|
46
|
+
// Validate each file
|
|
47
|
+
for (const filePath of agentFiles) {
|
|
48
|
+
const relativePath = path.relative(process.cwd(), filePath);
|
|
49
|
+
|
|
50
|
+
try {
|
|
51
|
+
const fileContent = fs.readFileSync(filePath, 'utf8');
|
|
52
|
+
const agentData = yaml.parse(fileContent);
|
|
53
|
+
|
|
54
|
+
// Convert absolute path to relative src/ path for module detection
|
|
55
|
+
const srcRelativePath = relativePath.startsWith('src/') ? relativePath : path.relative(project_root, filePath).replaceAll('\\', '/');
|
|
56
|
+
|
|
57
|
+
const result = validateAgentFile(srcRelativePath, agentData);
|
|
58
|
+
|
|
59
|
+
if (result.success) {
|
|
60
|
+
console.log(`✅ ${relativePath}`);
|
|
61
|
+
} else {
|
|
62
|
+
errors.push({
|
|
63
|
+
file: relativePath,
|
|
64
|
+
issues: result.error.issues,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
} catch (error) {
|
|
68
|
+
errors.push({
|
|
69
|
+
file: relativePath,
|
|
70
|
+
issues: [
|
|
71
|
+
{
|
|
72
|
+
code: 'parse_error',
|
|
73
|
+
message: `Failed to parse YAML: ${error.message}`,
|
|
74
|
+
path: [],
|
|
75
|
+
},
|
|
76
|
+
],
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Report errors
|
|
82
|
+
if (errors.length > 0) {
|
|
83
|
+
console.log('\n❌ Validation failed for the following files:\n');
|
|
84
|
+
|
|
85
|
+
for (const { file, issues } of errors) {
|
|
86
|
+
console.log(`\n📄 ${file}`);
|
|
87
|
+
for (const issue of issues) {
|
|
88
|
+
const pathString = issue.path.length > 0 ? issue.path.join('.') : '(root)';
|
|
89
|
+
console.log(` Path: ${pathString}`);
|
|
90
|
+
console.log(` Error: ${issue.message}`);
|
|
91
|
+
if (issue.code) {
|
|
92
|
+
console.log(` Code: ${issue.code}`);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
console.log(`\n\n💥 ${errors.length} file(s) failed validation`);
|
|
98
|
+
process.exit(1);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
console.log(`\n✨ All ${agentFiles.length} agent file(s) passed validation!\n`);
|
|
102
|
+
process.exit(0);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// Run with optional command-line argument for project root
|
|
106
|
+
const customProjectRoot = process.argv[2];
|
|
107
|
+
main(customProjectRoot).catch((error) => {
|
|
108
|
+
console.error('Fatal error:', error);
|
|
109
|
+
process.exit(1);
|
|
110
|
+
});
|