@cregis-dev/cckit 0.3.0 → 0.4.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/README.md +15 -3
- package/package.json +1 -1
- package/registry.json +234 -200
- package/src/commands/init.js +19 -15
- package/src/commands/update.js +9 -4
- package/src/core/plugin-installer.js +59 -13
- package/src/utils/fs.js +6 -1
- package/templates/bmad/_config/bmad-help.csv +2 -1
- package/templates/bmad/_config/files-manifest.csv +437 -431
- package/templates/bmad/_config/ides/claude-code.yaml +5 -5
- package/templates/bmad/_config/ides/trae.yaml +5 -5
- package/templates/bmad/_config/task-manifest.csv +7 -6
- package/templates/bmad/_config/workflow-manifest.csv +34 -34
- package/templates/bmad/bmm/agents/qa.md +1 -1
- package/templates/bmad/bmm/config.yaml +1 -1
- package/templates/bmad/bmm/module-help.csv +1 -1
- package/templates/bmad/bmm/workflows/1-analysis/create-product-brief/steps/step-06-complete.md +1 -1
- package/templates/bmad/bmm/workflows/1-analysis/create-product-brief/workflow.md +1 -1
- package/templates/bmad/bmm/workflows/1-analysis/research/workflow-domain-research.md +1 -1
- package/templates/bmad/bmm/workflows/1-analysis/research/workflow-market-research.md +1 -1
- package/templates/bmad/bmm/workflows/1-analysis/research/workflow-technical-research.md +1 -1
- package/templates/bmad/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-12-complete.md +1 -1
- package/templates/bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-13-report-complete.md +1 -1
- package/templates/bmad/bmm/workflows/2-plan-workflows/create-prd/workflow-create-prd.md +1 -1
- package/templates/bmad/bmm/workflows/2-plan-workflows/create-prd/workflow-edit-prd.md +1 -1
- package/templates/bmad/bmm/workflows/2-plan-workflows/create-prd/workflow-validate-prd.md +1 -1
- package/templates/bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-14-complete.md +1 -1
- package/templates/bmad/bmm/workflows/2-plan-workflows/create-ux-design/workflow.md +1 -1
- package/templates/bmad/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-06-final-assessment.md +1 -1
- package/templates/bmad/bmm/workflows/3-solutioning/check-implementation-readiness/workflow.md +1 -1
- package/templates/bmad/bmm/workflows/3-solutioning/create-architecture/steps/step-08-complete.md +1 -1
- package/templates/bmad/bmm/workflows/3-solutioning/create-architecture/workflow.md +1 -1
- package/templates/bmad/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-04-final-validation.md +1 -1
- package/templates/bmad/bmm/workflows/3-solutioning/create-epics-and-stories/workflow.md +1 -1
- package/templates/bmad/bmm/workflows/4-implementation/code-review/workflow.yaml +1 -1
- package/templates/bmad/bmm/workflows/4-implementation/correct-course/workflow.yaml +1 -1
- package/templates/bmad/bmm/workflows/4-implementation/create-story/workflow.yaml +1 -1
- package/templates/bmad/bmm/workflows/4-implementation/dev-story/workflow.yaml +1 -1
- package/templates/bmad/bmm/workflows/4-implementation/retrospective/workflow.yaml +1 -1
- package/templates/bmad/bmm/workflows/4-implementation/sprint-planning/workflow.yaml +1 -1
- package/templates/bmad/bmm/workflows/4-implementation/sprint-status/workflow.yaml +1 -1
- package/templates/bmad/bmm/workflows/bmad-quick-flow/quick-dev/workflow.md +1 -1
- package/templates/bmad/bmm/workflows/bmad-quick-flow/quick-spec/workflow.md +1 -1
- package/templates/bmad/bmm/workflows/document-project/workflow.yaml +1 -1
- package/templates/bmad/bmm/workflows/generate-project-context/workflow.md +1 -1
- package/templates/bmad/bmm/workflows/qa-generate-e2e-tests/workflow.yaml +2 -2
- package/templates/bmad/commands/bmad-bmm-check-implementation-readiness.md +2 -2
- package/templates/bmad/commands/bmad-bmm-code-review.md +4 -4
- package/templates/bmad/commands/bmad-bmm-correct-course.md +4 -4
- package/templates/bmad/commands/bmad-bmm-create-architecture.md +2 -2
- package/templates/bmad/commands/bmad-bmm-create-epics-and-stories.md +2 -2
- package/templates/bmad/commands/bmad-bmm-create-prd.md +2 -2
- package/templates/bmad/commands/bmad-bmm-create-product-brief.md +2 -2
- package/templates/bmad/commands/bmad-bmm-create-story.md +4 -4
- package/templates/bmad/commands/bmad-bmm-create-ux-design.md +2 -2
- package/templates/bmad/commands/bmad-bmm-dev-story.md +4 -4
- package/templates/bmad/commands/bmad-bmm-document-project.md +4 -4
- package/templates/bmad/commands/bmad-bmm-domain-research.md +2 -2
- package/templates/bmad/commands/bmad-bmm-edit-prd.md +2 -2
- package/templates/bmad/commands/bmad-bmm-generate-project-context.md +2 -2
- package/templates/bmad/commands/bmad-bmm-market-research.md +2 -2
- package/templates/bmad/commands/bmad-bmm-qa-generate-e2e-tests.md +4 -4
- package/templates/bmad/commands/bmad-bmm-quick-dev.md +2 -2
- package/templates/bmad/commands/bmad-bmm-quick-spec.md +2 -2
- package/templates/bmad/commands/bmad-bmm-retrospective.md +4 -4
- package/templates/bmad/commands/bmad-bmm-sprint-planning.md +4 -4
- package/templates/bmad/commands/bmad-bmm-sprint-status.md +4 -4
- package/templates/bmad/commands/bmad-bmm-technical-research.md +2 -2
- package/templates/bmad/commands/bmad-bmm-validate-prd.md +2 -2
- package/templates/bmad/commands/bmad-brainstorming.md +2 -2
- package/templates/bmad/commands/bmad-editorial-review-prose.md +1 -1
- package/templates/bmad/commands/bmad-editorial-review-structure.md +1 -1
- package/templates/bmad/commands/bmad-help.md +1 -1
- package/templates/bmad/commands/bmad-index-docs.md +1 -1
- package/templates/bmad/commands/bmad-party-mode.md +2 -2
- package/templates/bmad/commands/bmad-review-adversarial-general.md +1 -1
- package/templates/bmad/commands/bmad-review-edge-case-hunter.md +10 -0
- package/templates/bmad/commands/bmad-shard-doc.md +1 -1
- package/templates/bmad/commands/bmad-tea-teach-me-testing.md +2 -2
- package/templates/bmad/commands/bmad-tea-testarch-atdd.md +4 -4
- package/templates/bmad/commands/bmad-tea-testarch-automate.md +4 -4
- package/templates/bmad/commands/bmad-tea-testarch-ci.md +4 -4
- package/templates/bmad/commands/bmad-tea-testarch-framework.md +4 -4
- package/templates/bmad/commands/bmad-tea-testarch-nfr.md +4 -4
- package/templates/bmad/commands/bmad-tea-testarch-test-design.md +4 -4
- package/templates/bmad/commands/bmad-tea-testarch-test-review.md +4 -4
- package/templates/bmad/commands/bmad-tea-testarch-trace.md +4 -4
- package/templates/bmad/core/config.yaml +1 -1
- package/templates/bmad/core/module-help.csv +1 -0
- package/templates/bmad/core/tasks/editorial-review-prose.xml +1 -1
- package/templates/bmad/core/tasks/editorial-review-structure.xml +1 -1
- package/templates/bmad/core/tasks/help.md +1 -1
- package/templates/bmad/core/tasks/index-docs.xml +1 -1
- package/templates/bmad/core/tasks/review-adversarial-general.xml +1 -1
- package/templates/bmad/core/tasks/review-edge-case-hunter.xml +63 -0
- package/templates/bmad/core/tasks/shard-doc.xml +1 -1
- package/templates/bmad/core/workflows/advanced-elicitation/workflow.xml +1 -1
- package/templates/bmad/core/workflows/brainstorming/steps/step-01-session-setup.md +31 -18
- package/templates/bmad/core/workflows/brainstorming/steps/step-01b-continue.md +1 -1
- package/templates/bmad/core/workflows/brainstorming/steps/step-03-technique-execution.md +2 -2
- package/templates/bmad/core/workflows/brainstorming/steps/step-04-idea-organization.md +2 -2
- package/templates/bmad/core/workflows/brainstorming/workflow.md +4 -2
- package/templates/bmad/core/workflows/party-mode/workflow.md +1 -1
- package/templates/bmad/tea/config.yaml +5 -1
- package/templates/bmad/tea/testarch/knowledge/contract-testing.md +24 -2
- package/templates/bmad/tea/testarch/knowledge/pact-mcp.md +204 -0
- package/templates/bmad/tea/testarch/knowledge/pactjs-utils-consumer-helpers.md +211 -0
- package/templates/bmad/tea/testarch/knowledge/pactjs-utils-overview.md +210 -0
- package/templates/bmad/tea/testarch/knowledge/pactjs-utils-provider-verifier.md +315 -0
- package/templates/bmad/tea/testarch/knowledge/pactjs-utils-request-filter.md +224 -0
- package/templates/bmad/tea/testarch/tea-index.csv +5 -0
- package/templates/bmad/tea/workflows/testarch/README.md +1 -1
- package/templates/bmad/tea/workflows/testarch/atdd/steps-c/step-01-preflight-and-context.md +30 -0
- package/templates/bmad/tea/workflows/testarch/atdd/steps-c/step-04-generate-tests.md +159 -57
- package/templates/bmad/tea/workflows/testarch/atdd/steps-c/step-04a-subagent-api-failing.md +215 -0
- package/templates/bmad/tea/workflows/testarch/atdd/steps-c/step-04b-subagent-e2e-failing.md +244 -0
- package/templates/bmad/tea/workflows/testarch/atdd/steps-c/step-04c-aggregate.md +31 -15
- package/templates/bmad/tea/workflows/testarch/atdd/validation-report-20260127-095021.md +1 -1
- package/templates/bmad/tea/workflows/testarch/atdd/validation-report-20260127-102401.md +3 -3
- package/templates/bmad/tea/workflows/testarch/atdd/workflow.yaml +2 -2
- package/templates/bmad/tea/workflows/testarch/automate/steps-c/step-01-preflight-and-context.md +32 -0
- package/templates/bmad/tea/workflows/testarch/automate/steps-c/step-03-generate-tests.md +215 -101
- package/templates/bmad/tea/workflows/testarch/automate/steps-c/step-03a-subagent-api.md +193 -0
- package/templates/bmad/tea/workflows/testarch/automate/steps-c/step-03b-subagent-backend.md +246 -0
- package/templates/bmad/tea/workflows/testarch/automate/steps-c/step-03b-subagent-e2e.md +213 -0
- package/templates/bmad/tea/workflows/testarch/automate/steps-c/step-03c-aggregate.md +38 -22
- package/templates/bmad/tea/workflows/testarch/automate/validation-report-20260127-095021.md +1 -1
- package/templates/bmad/tea/workflows/testarch/automate/validation-report-20260127-102401.md +3 -3
- package/templates/bmad/tea/workflows/testarch/automate/workflow.yaml +2 -2
- package/templates/bmad/tea/workflows/testarch/ci/steps-c/step-02-generate-pipeline.md +124 -1
- package/templates/bmad/tea/workflows/testarch/ci/steps-c/step-03-configure-quality-gates.md +7 -0
- package/templates/bmad/tea/workflows/testarch/ci/validation-report-20260127-095021.md +1 -1
- package/templates/bmad/tea/workflows/testarch/ci/validation-report-20260127-102401.md +3 -3
- package/templates/bmad/tea/workflows/testarch/ci/workflow.yaml +2 -2
- package/templates/bmad/tea/workflows/testarch/framework/steps-c/step-03-scaffold-framework.md +126 -3
- package/templates/bmad/tea/workflows/testarch/framework/validation-report-20260127-095021.md +1 -1
- package/templates/bmad/tea/workflows/testarch/framework/validation-report-20260127-102401.md +3 -3
- package/templates/bmad/tea/workflows/testarch/framework/workflow.yaml +2 -2
- package/templates/bmad/tea/workflows/testarch/nfr-assess/steps-c/step-04-evaluate-and-score.md +150 -36
- package/templates/bmad/tea/workflows/testarch/nfr-assess/steps-c/step-04a-subagent-security.md +138 -0
- package/templates/bmad/tea/workflows/testarch/nfr-assess/steps-c/step-04b-subagent-performance.md +84 -0
- package/templates/bmad/tea/workflows/testarch/nfr-assess/steps-c/step-04c-subagent-reliability.md +85 -0
- package/templates/bmad/tea/workflows/testarch/nfr-assess/steps-c/step-04d-subagent-scalability.md +88 -0
- package/templates/bmad/tea/workflows/testarch/nfr-assess/steps-c/step-04e-aggregate-nfr.md +27 -10
- package/templates/bmad/tea/workflows/testarch/nfr-assess/validation-report-20260127-095021.md +1 -1
- package/templates/bmad/tea/workflows/testarch/nfr-assess/validation-report-20260127-102401.md +3 -3
- package/templates/bmad/tea/workflows/testarch/nfr-assess/workflow.yaml +2 -2
- package/templates/bmad/tea/workflows/testarch/teach-me-testing/data/tea-resources-index.yaml +3 -3
- package/templates/bmad/tea/workflows/testarch/teach-me-testing/workflow-plan-teach-me-testing.md +6 -6
- package/templates/bmad/tea/workflows/testarch/teach-me-testing/workflow.md +1 -1
- package/templates/bmad/tea/workflows/testarch/test-design/steps-c/step-02-load-context.md +30 -0
- package/templates/bmad/tea/workflows/testarch/test-design/steps-c/step-05-generate-output.md +72 -1
- package/templates/bmad/tea/workflows/testarch/test-design/validation-report-20260127-095021.md +1 -1
- package/templates/bmad/tea/workflows/testarch/test-design/validation-report-20260127-102401.md +3 -3
- package/templates/bmad/tea/workflows/testarch/test-design/workflow.yaml +2 -2
- package/templates/bmad/tea/workflows/testarch/test-review/steps-c/step-01-load-context.md +29 -1
- package/templates/bmad/tea/workflows/testarch/test-review/steps-c/step-03-quality-evaluation.md +147 -46
- package/templates/bmad/tea/workflows/testarch/test-review/steps-c/step-03a-subagent-determinism.md +214 -0
- package/templates/bmad/tea/workflows/testarch/test-review/steps-c/step-03b-subagent-isolation.md +125 -0
- package/templates/bmad/tea/workflows/testarch/test-review/steps-c/step-03c-subagent-maintainability.md +102 -0
- package/templates/bmad/tea/workflows/testarch/test-review/steps-c/step-03e-subagent-performance.md +117 -0
- package/templates/bmad/tea/workflows/testarch/test-review/steps-c/step-03f-aggregate-scores.md +10 -10
- package/templates/bmad/tea/workflows/testarch/test-review/validation-report-20260127-095021.md +1 -1
- package/templates/bmad/tea/workflows/testarch/test-review/validation-report-20260127-102401.md +3 -3
- package/templates/bmad/tea/workflows/testarch/test-review/workflow.yaml +2 -2
- package/templates/bmad/tea/workflows/testarch/trace/steps-c/step-04-analyze-gaps.md +92 -1
- package/templates/bmad/tea/workflows/testarch/trace/validation-report-20260127-095021.md +1 -1
- package/templates/bmad/tea/workflows/testarch/trace/validation-report-20260127-102401.md +3 -3
- package/templates/bmad/tea/workflows/testarch/trace/workflow.yaml +2 -2
- package/templates/ecc/agents/chief-of-staff.md +151 -0
- package/templates/ecc/commands/claw.md +79 -0
- package/templates/ecc/rules/README.md +23 -2
- package/templates/ecc/rules/common/development-workflow.md +37 -0
- package/templates/ecc/rules/common/git-workflow.md +2 -23
- package/templates/ecc/rules/swift/coding-style.md +47 -0
- package/templates/ecc/rules/swift/hooks.md +20 -0
- package/templates/ecc/rules/swift/patterns.md +66 -0
- package/templates/ecc/rules/swift/security.md +33 -0
- package/templates/ecc/rules/swift/testing.md +45 -0
- package/templates/ecc/skills/api-design/SKILL.md +1 -0
- package/templates/ecc/skills/article-writing/SKILL.md +85 -0
- package/templates/ecc/skills/backend-patterns/SKILL.md +1 -0
- package/templates/ecc/skills/clickhouse-io/SKILL.md +1 -0
- package/templates/ecc/skills/coding-standards/SKILL.md +1 -0
- package/templates/ecc/skills/configure-ecc/SKILL.md +32 -4
- package/templates/ecc/skills/content-engine/SKILL.md +88 -0
- package/templates/ecc/skills/content-hash-cache-pattern/SKILL.md +1 -0
- package/templates/ecc/skills/continuous-learning/SKILL.md +2 -1
- package/templates/ecc/skills/continuous-learning-v2/SKILL.md +4 -1
- package/templates/ecc/skills/continuous-learning-v2/hooks/observe.sh +14 -7
- package/templates/ecc/skills/cost-aware-llm-pipeline/SKILL.md +1 -0
- package/templates/ecc/skills/cpp-coding-standards/SKILL.md +1 -0
- package/templates/ecc/skills/cpp-testing/SKILL.md +1 -0
- package/templates/ecc/skills/database-migrations/SKILL.md +1 -0
- package/templates/ecc/skills/deployment-patterns/SKILL.md +1 -0
- package/templates/ecc/skills/django-patterns/SKILL.md +1 -0
- package/templates/ecc/skills/django-security/SKILL.md +1 -0
- package/templates/ecc/skills/django-tdd/SKILL.md +1 -0
- package/templates/ecc/skills/django-verification/SKILL.md +1 -0
- package/templates/ecc/skills/docker-patterns/SKILL.md +1 -0
- package/templates/ecc/skills/e2e-testing/SKILL.md +1 -0
- package/templates/ecc/skills/eval-harness/SKILL.md +1 -0
- package/templates/ecc/skills/foundation-models-on-device/SKILL.md +243 -0
- package/templates/ecc/skills/frontend-patterns/SKILL.md +1 -0
- package/templates/ecc/skills/frontend-slides/SKILL.md +184 -0
- package/templates/ecc/skills/frontend-slides/STYLE_PRESETS.md +330 -0
- package/templates/ecc/skills/golang-patterns/SKILL.md +1 -0
- package/templates/ecc/skills/golang-testing/SKILL.md +1 -0
- package/templates/ecc/skills/investor-materials/SKILL.md +96 -0
- package/templates/ecc/skills/investor-outreach/SKILL.md +76 -0
- package/templates/ecc/skills/iterative-retrieval/SKILL.md +1 -0
- package/templates/ecc/skills/java-coding-standards/SKILL.md +1 -0
- package/templates/ecc/skills/jpa-patterns/SKILL.md +1 -0
- package/templates/ecc/skills/liquid-glass-design/SKILL.md +279 -0
- package/templates/ecc/skills/market-research/SKILL.md +75 -0
- package/templates/ecc/skills/nutrient-document-processing/SKILL.md +1 -1
- package/templates/ecc/skills/postgres-patterns/SKILL.md +1 -0
- package/templates/ecc/skills/project-guidelines-example/SKILL.md +1 -0
- package/templates/ecc/skills/python-patterns/SKILL.md +1 -0
- package/templates/ecc/skills/python-testing/SKILL.md +1 -0
- package/templates/ecc/skills/regex-vs-llm-structured-text/SKILL.md +1 -0
- package/templates/ecc/skills/search-first/SKILL.md +3 -1
- package/templates/ecc/skills/security-review/SKILL.md +1 -0
- package/templates/ecc/skills/security-scan/SKILL.md +1 -0
- package/templates/ecc/skills/skill-stocktake/SKILL.md +176 -0
- package/templates/ecc/skills/skill-stocktake/scripts/quick-diff.sh +87 -0
- package/templates/ecc/skills/skill-stocktake/scripts/save-results.sh +56 -0
- package/templates/ecc/skills/skill-stocktake/scripts/scan.sh +170 -0
- package/templates/ecc/skills/springboot-patterns/SKILL.md +1 -0
- package/templates/ecc/skills/springboot-security/SKILL.md +1 -0
- package/templates/ecc/skills/springboot-tdd/SKILL.md +1 -0
- package/templates/ecc/skills/springboot-verification/SKILL.md +1 -0
- package/templates/ecc/skills/strategic-compact/SKILL.md +1 -0
- package/templates/ecc/skills/swift-actor-persistence/SKILL.md +1 -0
- package/templates/ecc/skills/swift-concurrency-6-2/SKILL.md +216 -0
- package/templates/ecc/skills/swift-protocol-di-testing/SKILL.md +1 -0
- package/templates/ecc/skills/swiftui-patterns/SKILL.md +259 -0
- package/templates/ecc/skills/tdd-workflow/SKILL.md +1 -0
- package/templates/ecc/skills/verification-loop/SKILL.md +1 -0
- package/templates/ecc/skills/visa-doc-translate/README.md +86 -0
- package/templates/ecc/skills/visa-doc-translate/SKILL.md +117 -0
- package/templates/ext-skills/pinchtab/SKILL.md +89 -486
- package/templates/ext-skills/pinchtab/TRUST.md +69 -0
- package/templates/ext-skills/pinchtab/references/api.md +297 -0
- package/templates/ext-skills/pinchtab/references/env.md +45 -0
- package/templates/ext-skills/pinchtab/references/profiles.md +107 -0
- package/templates/plugins/claude-code-setup/.claude-plugin/plugin.json +9 -0
- package/templates/plugins/claude-code-setup/LICENSE +202 -0
- package/templates/plugins/claude-code-setup/README.md +29 -0
- package/templates/plugins/claude-code-setup/automation-recommender-example.png +0 -0
- package/templates/plugins/claude-code-setup/skills/claude-automation-recommender/SKILL.md +288 -0
- package/templates/plugins/claude-code-setup/skills/claude-automation-recommender/references/hooks-patterns.md +226 -0
- package/templates/plugins/claude-code-setup/skills/claude-automation-recommender/references/mcp-servers.md +263 -0
- package/templates/plugins/claude-code-setup/skills/claude-automation-recommender/references/plugins-reference.md +98 -0
- package/templates/plugins/claude-code-setup/skills/claude-automation-recommender/references/skills-reference.md +408 -0
- package/templates/plugins/claude-code-setup/skills/claude-automation-recommender/references/subagent-templates.md +181 -0
- package/templates/plugins/claude-md-management/.claude-plugin/plugin.json +9 -0
- package/templates/plugins/claude-md-management/LICENSE +202 -0
- package/templates/plugins/claude-md-management/README.md +40 -0
- package/templates/plugins/claude-md-management/claude-md-improver-example.png +0 -0
- package/templates/plugins/claude-md-management/commands/revise-claude-md.md +54 -0
- package/templates/plugins/claude-md-management/revise-claude-md-example.png +0 -0
- package/templates/plugins/claude-md-management/skills/claude-md-improver/SKILL.md +179 -0
- package/templates/plugins/claude-md-management/skills/claude-md-improver/references/quality-criteria.md +109 -0
- package/templates/plugins/claude-md-management/skills/claude-md-improver/references/templates.md +253 -0
- package/templates/plugins/claude-md-management/skills/claude-md-improver/references/update-guidelines.md +150 -0
- package/templates/plugins/code-simplifier/.claude-plugin/plugin.json +9 -0
- package/templates/plugins/code-simplifier/LICENSE +202 -0
- package/templates/plugins/code-simplifier/agents/code-simplifier.md +52 -0
- package/templates/plugins/commit-commands/.claude-plugin/plugin.json +9 -0
- package/templates/plugins/commit-commands/LICENSE +202 -0
- package/templates/plugins/commit-commands/README.md +225 -0
- package/templates/plugins/commit-commands/commands/clean_gone.md +53 -0
- package/templates/plugins/commit-commands/commands/commit-push-pr.md +20 -0
- package/templates/plugins/commit-commands/commands/commit.md +17 -0
- package/templates/trae-bmad/rules/bmad-bmm-check-implementation-readiness.md +2 -2
- package/templates/trae-bmad/rules/bmad-bmm-code-review.md +4 -4
- package/templates/trae-bmad/rules/bmad-bmm-correct-course.md +4 -4
- package/templates/trae-bmad/rules/bmad-bmm-create-architecture.md +2 -2
- package/templates/trae-bmad/rules/bmad-bmm-create-epics-and-stories.md +2 -2
- package/templates/trae-bmad/rules/bmad-bmm-create-prd.md +2 -2
- package/templates/trae-bmad/rules/bmad-bmm-create-product-brief.md +2 -2
- package/templates/trae-bmad/rules/bmad-bmm-create-story.md +4 -4
- package/templates/trae-bmad/rules/bmad-bmm-create-ux-design.md +2 -2
- package/templates/trae-bmad/rules/bmad-bmm-dev-story.md +4 -4
- package/templates/trae-bmad/rules/bmad-bmm-document-project.md +4 -4
- package/templates/trae-bmad/rules/bmad-bmm-domain-research.md +2 -2
- package/templates/trae-bmad/rules/bmad-bmm-edit-prd.md +2 -2
- package/templates/trae-bmad/rules/bmad-bmm-generate-project-context.md +2 -2
- package/templates/trae-bmad/rules/bmad-bmm-market-research.md +2 -2
- package/templates/trae-bmad/rules/bmad-bmm-qa-generate-e2e-tests.md +4 -4
- package/templates/trae-bmad/rules/bmad-bmm-quick-dev.md +2 -2
- package/templates/trae-bmad/rules/bmad-bmm-quick-spec.md +2 -2
- package/templates/trae-bmad/rules/bmad-bmm-retrospective.md +4 -4
- package/templates/trae-bmad/rules/bmad-bmm-sprint-planning.md +4 -4
- package/templates/trae-bmad/rules/bmad-bmm-sprint-status.md +4 -4
- package/templates/trae-bmad/rules/bmad-bmm-technical-research.md +2 -2
- package/templates/trae-bmad/rules/bmad-bmm-validate-prd.md +2 -2
- package/templates/trae-bmad/rules/bmad-brainstorming.md +2 -2
- package/templates/trae-bmad/rules/bmad-editorial-review-prose.md +1 -1
- package/templates/trae-bmad/rules/bmad-editorial-review-structure.md +1 -1
- package/templates/trae-bmad/rules/bmad-help.md +1 -1
- package/templates/trae-bmad/rules/bmad-index-docs.md +1 -1
- package/templates/trae-bmad/rules/bmad-party-mode.md +2 -2
- package/templates/trae-bmad/rules/bmad-review-adversarial-general.md +1 -1
- package/templates/trae-bmad/rules/bmad-review-edge-case-hunter.md +10 -0
- package/templates/trae-bmad/rules/bmad-shard-doc.md +1 -1
- package/templates/trae-bmad/rules/bmad-tea-teach-me-testing.md +2 -2
- package/templates/trae-bmad/rules/bmad-tea-testarch-atdd.md +4 -4
- package/templates/trae-bmad/rules/bmad-tea-testarch-automate.md +4 -4
- package/templates/trae-bmad/rules/bmad-tea-testarch-ci.md +4 -4
- package/templates/trae-bmad/rules/bmad-tea-testarch-framework.md +4 -4
- package/templates/trae-bmad/rules/bmad-tea-testarch-nfr.md +4 -4
- package/templates/trae-bmad/rules/bmad-tea-testarch-test-design.md +4 -4
- package/templates/trae-bmad/rules/bmad-tea-testarch-test-review.md +4 -4
- package/templates/trae-bmad/rules/bmad-tea-testarch-trace.md +4 -4
|
@@ -1,39 +1,40 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: 'step-04-generate-tests'
|
|
3
|
-
description: 'Orchestrate
|
|
3
|
+
description: 'Orchestrate adaptive FAILING test generation (TDD red phase)'
|
|
4
4
|
nextStepFile: './step-04c-aggregate.md'
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Step 4: Orchestrate
|
|
7
|
+
# Step 4: Orchestrate Adaptive FAILING Test Generation
|
|
8
8
|
|
|
9
9
|
## STEP GOAL
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Select execution mode deterministically, then generate FAILING API and E2E tests (TDD RED PHASE) with consistent output contracts across agent-team, subagent, or sequential execution.
|
|
12
12
|
|
|
13
13
|
## MANDATORY EXECUTION RULES
|
|
14
14
|
|
|
15
15
|
- 📖 Read the entire step file before acting
|
|
16
16
|
- ✅ Speak in `{communication_language}`
|
|
17
|
-
- ✅
|
|
17
|
+
- ✅ Resolve execution mode from config (`tea_execution_mode`, `tea_capability_probe`)
|
|
18
|
+
- ✅ Apply fallback rules deterministically when requested mode is unsupported
|
|
18
19
|
- ✅ Generate FAILING tests only (TDD red phase)
|
|
19
|
-
- ✅ Wait for
|
|
20
|
-
- ❌ Do NOT
|
|
20
|
+
- ✅ Wait for required worker steps to complete
|
|
21
|
+
- ❌ Do NOT skip capability checks when probing is enabled
|
|
21
22
|
- ❌ Do NOT generate passing tests (this is red phase)
|
|
22
|
-
- ❌ Do NOT proceed until
|
|
23
|
+
- ❌ Do NOT proceed until required worker steps finish
|
|
23
24
|
|
|
24
25
|
---
|
|
25
26
|
|
|
26
27
|
## EXECUTION PROTOCOLS:
|
|
27
28
|
|
|
28
29
|
- 🎯 Follow the MANDATORY SEQUENCE exactly
|
|
29
|
-
- 💾 Wait for
|
|
30
|
+
- 💾 Wait for subagent outputs
|
|
30
31
|
- 📖 Load the next step only when instructed
|
|
31
32
|
|
|
32
33
|
## CONTEXT BOUNDARIES:
|
|
33
34
|
|
|
34
35
|
- Available context: config, acceptance criteria from Step 1, test strategy from Step 3
|
|
35
|
-
- Focus:
|
|
36
|
-
- Limits: do not generate tests directly (delegate to
|
|
36
|
+
- Focus: orchestration only (mode selection + worker dispatch)
|
|
37
|
+
- Limits: do not generate tests directly (delegate to worker steps)
|
|
37
38
|
- Dependencies: Steps 1-3 outputs
|
|
38
39
|
|
|
39
40
|
---
|
|
@@ -42,7 +43,7 @@ Launch parallel subprocesses to generate FAILING API and E2E tests simultaneousl
|
|
|
42
43
|
|
|
43
44
|
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
|
|
44
45
|
|
|
45
|
-
### 1. Prepare
|
|
46
|
+
### 1. Prepare Execution Context
|
|
46
47
|
|
|
47
48
|
**Generate unique timestamp** for temp file naming:
|
|
48
49
|
|
|
@@ -50,17 +51,29 @@ Launch parallel subprocesses to generate FAILING API and E2E tests simultaneousl
|
|
|
50
51
|
const timestamp = new Date().toISOString().replace(/[:.]/g, '-');
|
|
51
52
|
```
|
|
52
53
|
|
|
53
|
-
**Prepare input context for both
|
|
54
|
+
**Prepare input context for both subagents:**
|
|
54
55
|
|
|
55
56
|
```javascript
|
|
56
|
-
const
|
|
57
|
+
const parseBooleanFlag = (value, defaultValue = true) => {
|
|
58
|
+
if (typeof value === 'string') {
|
|
59
|
+
const normalized = value.trim().toLowerCase();
|
|
60
|
+
if (['false', '0', 'off', 'no'].includes(normalized)) return false;
|
|
61
|
+
if (['true', '1', 'on', 'yes'].includes(normalized)) return true;
|
|
62
|
+
}
|
|
63
|
+
if (value === undefined || value === null) return defaultValue;
|
|
64
|
+
return Boolean(value);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
const subagentContext = {
|
|
57
68
|
story_acceptance_criteria: /* from Step 1 */,
|
|
58
69
|
test_strategy: /* from Step 3 */,
|
|
59
70
|
knowledge_fragments_loaded: /* list of fragments */,
|
|
60
71
|
config: {
|
|
61
72
|
test_framework: config.test_framework,
|
|
62
73
|
use_playwright_utils: config.tea_use_playwright_utils,
|
|
63
|
-
browser_automation: config.tea_browser_automation
|
|
74
|
+
browser_automation: config.tea_browser_automation,
|
|
75
|
+
execution_mode: config.tea_execution_mode || 'auto', // "auto" | "subagent" | "agent-team" | "sequential"
|
|
76
|
+
capability_probe: parseBooleanFlag(config.tea_capability_probe, true), // supports booleans and "false"/"true" strings
|
|
64
77
|
},
|
|
65
78
|
timestamp: timestamp
|
|
66
79
|
};
|
|
@@ -68,63 +81,153 @@ const subprocessContext = {
|
|
|
68
81
|
|
|
69
82
|
---
|
|
70
83
|
|
|
71
|
-
### 2.
|
|
84
|
+
### 2. Resolve Execution Mode with Capability Probe
|
|
85
|
+
|
|
86
|
+
```javascript
|
|
87
|
+
const normalizeUserExecutionMode = (mode) => {
|
|
88
|
+
if (typeof mode !== 'string') return null;
|
|
89
|
+
const normalized = mode.trim().toLowerCase().replace(/[-_]/g, ' ').replace(/\s+/g, ' ');
|
|
90
|
+
|
|
91
|
+
if (normalized === 'auto') return 'auto';
|
|
92
|
+
if (normalized === 'sequential') return 'sequential';
|
|
93
|
+
if (normalized === 'subagent' || normalized === 'sub agent' || normalized === 'subagents' || normalized === 'sub agents') {
|
|
94
|
+
return 'subagent';
|
|
95
|
+
}
|
|
96
|
+
if (normalized === 'agent team' || normalized === 'agent teams' || normalized === 'agentteam') {
|
|
97
|
+
return 'agent-team';
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return null;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
const normalizeConfigExecutionMode = (mode) => {
|
|
104
|
+
if (mode === 'subagent') return 'subagent';
|
|
105
|
+
if (mode === 'auto' || mode === 'sequential' || mode === 'subagent' || mode === 'agent-team') {
|
|
106
|
+
return mode;
|
|
107
|
+
}
|
|
108
|
+
return null;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
// Explicit user instruction in the active run takes priority over config.
|
|
112
|
+
const explicitModeFromUser = normalizeUserExecutionMode(runtime.getExplicitExecutionModeHint?.() || null);
|
|
113
|
+
|
|
114
|
+
const requestedMode = explicitModeFromUser || normalizeConfigExecutionMode(subagentContext.config.execution_mode) || 'auto';
|
|
115
|
+
const probeEnabled = subagentContext.config.capability_probe;
|
|
116
|
+
|
|
117
|
+
const supports = {
|
|
118
|
+
subagent: runtime.canLaunchSubagents?.() === true,
|
|
119
|
+
agentTeam: runtime.canLaunchAgentTeams?.() === true,
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
let resolvedMode = requestedMode;
|
|
123
|
+
|
|
124
|
+
if (requestedMode === 'auto') {
|
|
125
|
+
if (supports.agentTeam) resolvedMode = 'agent-team';
|
|
126
|
+
else if (supports.subagent) resolvedMode = 'subagent';
|
|
127
|
+
else resolvedMode = 'sequential';
|
|
128
|
+
} else if (probeEnabled && requestedMode === 'agent-team' && !supports.agentTeam) {
|
|
129
|
+
resolvedMode = supports.subagent ? 'subagent' : 'sequential';
|
|
130
|
+
} else if (probeEnabled && requestedMode === 'subagent' && !supports.subagent) {
|
|
131
|
+
resolvedMode = 'sequential';
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
subagentContext.execution = {
|
|
135
|
+
requestedMode,
|
|
136
|
+
resolvedMode,
|
|
137
|
+
probeEnabled,
|
|
138
|
+
supports,
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
if (!probeEnabled && (requestedMode === 'agent-team' || requestedMode === 'subagent')) {
|
|
142
|
+
const unsupportedRequestedMode =
|
|
143
|
+
(requestedMode === 'agent-team' && !supports.agentTeam) || (requestedMode === 'subagent' && !supports.subagent);
|
|
144
|
+
|
|
145
|
+
if (unsupportedRequestedMode) {
|
|
146
|
+
subagentContext.execution.error = `Requested execution mode "${requestedMode}" is unavailable because capability probing is disabled.`;
|
|
147
|
+
throw new Error(subagentContext.execution.error);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Resolution precedence:
|
|
153
|
+
|
|
154
|
+
1. Explicit user request in this run (`agent team` => `agent-team`; `subagent` => `subagent`; `sequential`; `auto`)
|
|
155
|
+
2. `tea_execution_mode` from config
|
|
156
|
+
3. Runtime capability fallback (when probing enabled)
|
|
157
|
+
|
|
158
|
+
If probing is disabled, honor the requested mode strictly. If that mode cannot be executed at runtime, fail with explicit error instead of silent fallback.
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
### 3. Dispatch Worker A: Failing API Test Generation
|
|
72
163
|
|
|
73
|
-
**
|
|
164
|
+
**Dispatch worker:**
|
|
74
165
|
|
|
75
|
-
- **
|
|
166
|
+
- **Subagent File:** `./step-04a-subagent-api-failing.md`
|
|
76
167
|
- **Output File:** `/tmp/tea-atdd-api-tests-${timestamp}.json`
|
|
77
|
-
- **Context:** Pass `
|
|
78
|
-
- **Execution:**
|
|
168
|
+
- **Context:** Pass `subagentContext`
|
|
169
|
+
- **Execution:**
|
|
170
|
+
- `agent-team` or `subagent`: launch non-blocking
|
|
171
|
+
- `sequential`: run blocking and wait before next dispatch
|
|
79
172
|
- **TDD Phase:** RED (failing tests)
|
|
80
173
|
|
|
81
174
|
**System Action:**
|
|
82
175
|
|
|
83
176
|
```
|
|
84
|
-
🚀 Launching
|
|
177
|
+
🚀 Launching Subagent A: FAILING API Test Generation (RED PHASE)
|
|
85
178
|
📝 Output: /tmp/tea-atdd-api-tests-${timestamp}.json
|
|
179
|
+
⚙️ Mode: ${resolvedMode}
|
|
86
180
|
🔴 TDD Phase: RED (tests will fail until feature implemented)
|
|
87
|
-
⏳ Status: Running
|
|
181
|
+
⏳ Status: Running...
|
|
88
182
|
```
|
|
89
183
|
|
|
90
184
|
---
|
|
91
185
|
|
|
92
|
-
###
|
|
186
|
+
### 4. Dispatch Worker B: Failing E2E Test Generation
|
|
93
187
|
|
|
94
|
-
**
|
|
188
|
+
**Dispatch worker:**
|
|
95
189
|
|
|
96
|
-
- **
|
|
190
|
+
- **Subagent File:** `./step-04b-subagent-e2e-failing.md`
|
|
97
191
|
- **Output File:** `/tmp/tea-atdd-e2e-tests-${timestamp}.json`
|
|
98
|
-
- **Context:** Pass `
|
|
99
|
-
- **Execution:**
|
|
192
|
+
- **Context:** Pass `subagentContext`
|
|
193
|
+
- **Execution:**
|
|
194
|
+
- `agent-team` or `subagent`: launch non-blocking
|
|
195
|
+
- `sequential`: run blocking and wait before next dispatch
|
|
100
196
|
- **TDD Phase:** RED (failing tests)
|
|
101
197
|
|
|
102
198
|
**System Action:**
|
|
103
199
|
|
|
104
200
|
```
|
|
105
|
-
🚀 Launching
|
|
201
|
+
🚀 Launching Subagent B: FAILING E2E Test Generation (RED PHASE)
|
|
106
202
|
📝 Output: /tmp/tea-atdd-e2e-tests-${timestamp}.json
|
|
203
|
+
⚙️ Mode: ${resolvedMode}
|
|
107
204
|
🔴 TDD Phase: RED (tests will fail until feature implemented)
|
|
108
|
-
⏳ Status: Running
|
|
205
|
+
⏳ Status: Running...
|
|
109
206
|
```
|
|
110
207
|
|
|
111
208
|
---
|
|
112
209
|
|
|
113
|
-
###
|
|
210
|
+
### 5. Wait for Required Worker Completion
|
|
114
211
|
|
|
115
|
-
**
|
|
212
|
+
**If `resolvedMode` is `agent-team` or `subagent`:**
|
|
116
213
|
|
|
117
214
|
```
|
|
118
|
-
⏳ Waiting for
|
|
119
|
-
├──
|
|
120
|
-
└──
|
|
215
|
+
⏳ Waiting for subagents to complete...
|
|
216
|
+
├── Subagent A (API RED): Running... ⟳
|
|
217
|
+
└── Subagent B (E2E RED): Running... ⟳
|
|
121
218
|
|
|
122
219
|
[... time passes ...]
|
|
123
220
|
|
|
124
|
-
├──
|
|
125
|
-
└──
|
|
221
|
+
├── Subagent A (API RED): Complete ✅
|
|
222
|
+
└── Subagent B (E2E RED): Complete ✅
|
|
126
223
|
|
|
127
|
-
✅ All
|
|
224
|
+
✅ All subagents completed successfully!
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
**If `resolvedMode` is `sequential`:**
|
|
228
|
+
|
|
229
|
+
```
|
|
230
|
+
✅ Sequential mode: each worker already completed during dispatch.
|
|
128
231
|
```
|
|
129
232
|
|
|
130
233
|
**Verify both outputs exist:**
|
|
@@ -134,20 +237,20 @@ const apiOutputExists = fs.existsSync(`/tmp/tea-atdd-api-tests-${timestamp}.json
|
|
|
134
237
|
const e2eOutputExists = fs.existsSync(`/tmp/tea-atdd-e2e-tests-${timestamp}.json`);
|
|
135
238
|
|
|
136
239
|
if (!apiOutputExists || !e2eOutputExists) {
|
|
137
|
-
throw new Error('One or both
|
|
240
|
+
throw new Error('One or both subagent outputs missing!');
|
|
138
241
|
}
|
|
139
242
|
```
|
|
140
243
|
|
|
141
244
|
---
|
|
142
245
|
|
|
143
|
-
###
|
|
246
|
+
### 6. TDD Red Phase Report
|
|
144
247
|
|
|
145
248
|
**Display TDD status:**
|
|
146
249
|
|
|
147
250
|
```
|
|
148
251
|
🔴 TDD RED PHASE: Failing Tests Generated
|
|
149
252
|
|
|
150
|
-
✅ Both
|
|
253
|
+
✅ Both subagents completed:
|
|
151
254
|
- API Tests: Generated with test.skip()
|
|
152
255
|
- E2E Tests: Generated with test.skip()
|
|
153
256
|
|
|
@@ -160,30 +263,29 @@ Next: Aggregation will verify TDD compliance
|
|
|
160
263
|
|
|
161
264
|
---
|
|
162
265
|
|
|
163
|
-
###
|
|
266
|
+
### 7. Execution Report
|
|
164
267
|
|
|
165
268
|
**Display performance metrics:**
|
|
166
269
|
|
|
167
270
|
```
|
|
168
271
|
🚀 Performance Report:
|
|
169
|
-
- Execution Mode:
|
|
272
|
+
- Execution Mode: {resolvedMode}
|
|
170
273
|
- API Test Generation: ~X minutes
|
|
171
274
|
- E2E Test Generation: ~Y minutes
|
|
172
|
-
- Total Elapsed: ~
|
|
173
|
-
-
|
|
174
|
-
- Performance Gain: ~50% faster!
|
|
275
|
+
- Total Elapsed: ~mode-dependent
|
|
276
|
+
- Parallel Gain: ~50% faster when mode is subagent/agent-team
|
|
175
277
|
```
|
|
176
278
|
|
|
177
279
|
---
|
|
178
280
|
|
|
179
|
-
###
|
|
281
|
+
### 8. Proceed to Aggregation
|
|
180
282
|
|
|
181
283
|
**Load aggregation step:**
|
|
182
284
|
Load next step: `{nextStepFile}`
|
|
183
285
|
|
|
184
286
|
The aggregation step (4C) will:
|
|
185
287
|
|
|
186
|
-
- Read both
|
|
288
|
+
- Read both subagent outputs
|
|
187
289
|
- Verify TDD red phase compliance (all tests have test.skip())
|
|
188
290
|
- Write all test files to disk
|
|
189
291
|
- Generate ATDD checklist
|
|
@@ -195,16 +297,16 @@ The aggregation step (4C) will:
|
|
|
195
297
|
|
|
196
298
|
Proceed to Step 4C (Aggregation) when:
|
|
197
299
|
|
|
198
|
-
- ✅
|
|
199
|
-
- ✅
|
|
300
|
+
- ✅ Subagent A (API failing tests) completed successfully
|
|
301
|
+
- ✅ Subagent B (E2E failing tests) completed successfully
|
|
200
302
|
- ✅ Both output files exist and are valid JSON
|
|
201
303
|
- ✅ TDD red phase status reported
|
|
202
304
|
|
|
203
305
|
**Do NOT proceed if:**
|
|
204
306
|
|
|
205
|
-
- ❌ One or both
|
|
307
|
+
- ❌ One or both subagents failed
|
|
206
308
|
- ❌ Output files missing or corrupted
|
|
207
|
-
- ❌
|
|
309
|
+
- ❌ Subagent generated passing tests (wrong - must be failing)
|
|
208
310
|
|
|
209
311
|
---
|
|
210
312
|
|
|
@@ -212,18 +314,18 @@ Proceed to Step 4C (Aggregation) when:
|
|
|
212
314
|
|
|
213
315
|
### ✅ SUCCESS:
|
|
214
316
|
|
|
215
|
-
- Both
|
|
216
|
-
- Both
|
|
317
|
+
- Both subagents launched successfully
|
|
318
|
+
- Both worker steps completed without errors
|
|
217
319
|
- Output files generated and valid
|
|
218
320
|
- Tests generated with test.skip() (TDD red phase)
|
|
219
|
-
-
|
|
321
|
+
- Fallback behavior respected configuration and capability probe rules
|
|
220
322
|
|
|
221
323
|
### ❌ SYSTEM FAILURE:
|
|
222
324
|
|
|
223
|
-
- Failed to launch
|
|
224
|
-
- One or both
|
|
325
|
+
- Failed to launch subagents
|
|
326
|
+
- One or both subagents failed
|
|
225
327
|
- Output files missing or invalid
|
|
226
328
|
- Tests generated without test.skip() (wrong phase)
|
|
227
|
-
-
|
|
329
|
+
- Unsupported requested mode with probing disabled
|
|
228
330
|
|
|
229
|
-
**Master Rule:** TDD RED PHASE requires FAILING tests (with test.skip()).
|
|
331
|
+
**Master Rule:** TDD RED PHASE requires FAILING tests (with test.skip()). Mode selection changes orchestration, never red-phase requirements.
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 'step-04a-subagent-api-failing'
|
|
3
|
+
description: 'Subagent: Generate FAILING API tests (TDD red phase)'
|
|
4
|
+
subagent: true
|
|
5
|
+
outputFile: '/tmp/tea-atdd-api-tests-{{timestamp}}.json'
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Subagent 4A: Generate Failing API Tests (TDD Red Phase)
|
|
9
|
+
|
|
10
|
+
## SUBAGENT CONTEXT
|
|
11
|
+
|
|
12
|
+
This is an **isolated subagent** running in parallel with E2E failing test generation.
|
|
13
|
+
|
|
14
|
+
**What you have from parent workflow:**
|
|
15
|
+
|
|
16
|
+
- Story acceptance criteria from Step 1
|
|
17
|
+
- Test strategy and scenarios from Step 3
|
|
18
|
+
- Knowledge fragments loaded: api-request, data-factories, api-testing-patterns
|
|
19
|
+
- Config: test framework, Playwright Utils enabled/disabled
|
|
20
|
+
|
|
21
|
+
**Your task:** Generate API tests that will FAIL because the feature is not implemented yet (TDD RED PHASE).
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## MANDATORY EXECUTION RULES
|
|
26
|
+
|
|
27
|
+
- 📖 Read this entire subagent file before acting
|
|
28
|
+
- ✅ Generate FAILING API tests ONLY
|
|
29
|
+
- ✅ Tests MUST fail when run (feature not implemented yet)
|
|
30
|
+
- ✅ Output structured JSON to temp file
|
|
31
|
+
- ✅ Follow knowledge fragment patterns
|
|
32
|
+
- ❌ Do NOT generate E2E tests (that's subagent 4B)
|
|
33
|
+
- ❌ Do NOT generate passing tests (this is TDD red phase)
|
|
34
|
+
- ❌ Do NOT run tests (that's step 5)
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## SUBAGENT TASK
|
|
39
|
+
|
|
40
|
+
### 1. Identify API Endpoints from Acceptance Criteria
|
|
41
|
+
|
|
42
|
+
From the story acceptance criteria (Step 1 output), identify:
|
|
43
|
+
|
|
44
|
+
- Which API endpoints will be created for this story
|
|
45
|
+
- Expected request/response contracts
|
|
46
|
+
- Authentication requirements
|
|
47
|
+
- Expected status codes and error scenarios
|
|
48
|
+
|
|
49
|
+
**Example Acceptance Criteria:**
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
Story: User Registration
|
|
53
|
+
- As a user, I can POST to /api/users/register with email and password
|
|
54
|
+
- System returns 201 Created with user object
|
|
55
|
+
- System returns 400 Bad Request if email already exists
|
|
56
|
+
- System returns 422 Unprocessable Entity if validation fails
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### 2. Generate FAILING API Test Files
|
|
60
|
+
|
|
61
|
+
For each API endpoint, create test file in `tests/api/[feature].spec.ts`:
|
|
62
|
+
|
|
63
|
+
**Test Structure (ATDD - Red Phase):**
|
|
64
|
+
|
|
65
|
+
```typescript
|
|
66
|
+
import { test, expect } from '@playwright/test';
|
|
67
|
+
// If Playwright Utils enabled:
|
|
68
|
+
// import { apiRequest } from '@playwright-utils/api';
|
|
69
|
+
|
|
70
|
+
test.describe('[Story Name] API Tests (ATDD)', () => {
|
|
71
|
+
test.skip('[P0] should register new user successfully', async ({ request }) => {
|
|
72
|
+
// THIS TEST WILL FAIL - Endpoint not implemented yet
|
|
73
|
+
const response = await request.post('/api/users/register', {
|
|
74
|
+
data: {
|
|
75
|
+
email: 'newuser@example.com',
|
|
76
|
+
password: 'SecurePass123!',
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
// Expect 201 but will get 404 (endpoint doesn't exist)
|
|
81
|
+
expect(response.status()).toBe(201);
|
|
82
|
+
|
|
83
|
+
const user = await response.json();
|
|
84
|
+
expect(user).toMatchObject({
|
|
85
|
+
id: expect.any(Number),
|
|
86
|
+
email: 'newuser@example.com',
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
test.skip('[P1] should return 400 if email exists', async ({ request }) => {
|
|
91
|
+
// THIS TEST WILL FAIL - Endpoint not implemented yet
|
|
92
|
+
const response = await request.post('/api/users/register', {
|
|
93
|
+
data: {
|
|
94
|
+
email: 'existing@example.com',
|
|
95
|
+
password: 'SecurePass123!',
|
|
96
|
+
},
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
expect(response.status()).toBe(400);
|
|
100
|
+
const error = await response.json();
|
|
101
|
+
expect(error.message).toContain('Email already exists');
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**CRITICAL ATDD Requirements:**
|
|
107
|
+
|
|
108
|
+
- ✅ Use `test.skip()` to mark tests as intentionally failing (red phase)
|
|
109
|
+
- ✅ Write assertions for EXPECTED behavior (even though not implemented)
|
|
110
|
+
- ✅ Use realistic test data (not placeholder data)
|
|
111
|
+
- ✅ Test both happy path and error scenarios from acceptance criteria
|
|
112
|
+
- ✅ Use `apiRequest()` helper if Playwright Utils enabled
|
|
113
|
+
- ✅ Use data factories for test data (from data-factories fragment)
|
|
114
|
+
- ✅ Include priority tags [P0], [P1], [P2], [P3]
|
|
115
|
+
|
|
116
|
+
**Why test.skip():**
|
|
117
|
+
|
|
118
|
+
- Tests are written correctly for EXPECTED behavior
|
|
119
|
+
- But we know they'll fail because feature isn't implemented
|
|
120
|
+
- `test.skip()` documents this is intentional (TDD red phase)
|
|
121
|
+
- Once feature is implemented, remove `test.skip()` to verify green phase
|
|
122
|
+
|
|
123
|
+
### 3. Track Fixture Needs
|
|
124
|
+
|
|
125
|
+
Identify fixtures needed for API tests:
|
|
126
|
+
|
|
127
|
+
- Authentication fixtures (if endpoints require auth)
|
|
128
|
+
- Data factories (user data, etc.)
|
|
129
|
+
- API client configurations
|
|
130
|
+
|
|
131
|
+
**Do NOT create fixtures yet** - just track what's needed for aggregation step.
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## OUTPUT FORMAT
|
|
136
|
+
|
|
137
|
+
Write JSON to temp file: `/tmp/tea-atdd-api-tests-{{timestamp}}.json`
|
|
138
|
+
|
|
139
|
+
```json
|
|
140
|
+
{
|
|
141
|
+
"success": true,
|
|
142
|
+
"subagent": "atdd-api-tests",
|
|
143
|
+
"tests": [
|
|
144
|
+
{
|
|
145
|
+
"file": "tests/api/user-registration.spec.ts",
|
|
146
|
+
"content": "[full TypeScript test file content with test.skip()]",
|
|
147
|
+
"description": "ATDD API tests for user registration (RED PHASE)",
|
|
148
|
+
"expected_to_fail": true,
|
|
149
|
+
"acceptance_criteria_covered": [
|
|
150
|
+
"User can register with email/password",
|
|
151
|
+
"System returns 201 on success",
|
|
152
|
+
"System returns 400 if email exists"
|
|
153
|
+
],
|
|
154
|
+
"priority_coverage": {
|
|
155
|
+
"P0": 1,
|
|
156
|
+
"P1": 2,
|
|
157
|
+
"P2": 0,
|
|
158
|
+
"P3": 0
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
],
|
|
162
|
+
"fixture_needs": ["userDataFactory"],
|
|
163
|
+
"knowledge_fragments_used": ["api-request", "data-factories", "api-testing-patterns"],
|
|
164
|
+
"test_count": 3,
|
|
165
|
+
"tdd_phase": "RED",
|
|
166
|
+
"summary": "Generated 3 FAILING API tests for user registration story"
|
|
167
|
+
}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
**On Error:**
|
|
171
|
+
|
|
172
|
+
```json
|
|
173
|
+
{
|
|
174
|
+
"success": false,
|
|
175
|
+
"subagent": "atdd-api-tests",
|
|
176
|
+
"error": "Error message describing what went wrong",
|
|
177
|
+
"partial_output": {
|
|
178
|
+
/* any tests generated before error */
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## EXIT CONDITION
|
|
186
|
+
|
|
187
|
+
Subagent completes when:
|
|
188
|
+
|
|
189
|
+
- ✅ All API endpoints from acceptance criteria have test files
|
|
190
|
+
- ✅ All tests use `test.skip()` (documented failing tests)
|
|
191
|
+
- ✅ All tests assert EXPECTED behavior (not placeholder assertions)
|
|
192
|
+
- ✅ JSON output written to temp file
|
|
193
|
+
- ✅ Fixture needs to be tracked
|
|
194
|
+
|
|
195
|
+
**Subagent terminates here.** Parent workflow will read output and proceed to aggregation.
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## 🚨 SUBAGENT SUCCESS METRICS
|
|
200
|
+
|
|
201
|
+
### ✅ SUCCESS:
|
|
202
|
+
|
|
203
|
+
- All API tests generated with test.skip()
|
|
204
|
+
- Tests assert expected behavior (not placeholders)
|
|
205
|
+
- JSON output valid and complete
|
|
206
|
+
- No E2E/component/unit tests included (out of scope)
|
|
207
|
+
- Tests follow knowledge fragment patterns
|
|
208
|
+
|
|
209
|
+
### ❌ FAILURE:
|
|
210
|
+
|
|
211
|
+
- Generated passing tests (wrong - this is RED phase)
|
|
212
|
+
- Tests without test.skip() (will break CI)
|
|
213
|
+
- Placeholder assertions (expect(true).toBe(true))
|
|
214
|
+
- Did not follow knowledge fragment patterns
|
|
215
|
+
- Invalid or missing JSON output
|