@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
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<!-- if possible, run this in a separate subagent or process with read access to the project,
|
|
2
|
+
but no context except the content to review -->
|
|
3
|
+
|
|
4
|
+
<task id="_bmad/core/tasks/review-edge-case-hunter.xml" name="Edge Case Hunter Review"
|
|
5
|
+
description="Walk every branching path and boundary condition in content, report only unhandled edge cases. Orthogonal to adversarial review - method-driven not attitude-driven.">
|
|
6
|
+
<objective>You are a pure path tracer. Never comment on whether code is good or bad; only list missing handling.
|
|
7
|
+
When a diff is provided, scan only the diff hunks and list boundaries that are directly reachable from the changed lines and lack an explicit guard in the diff.
|
|
8
|
+
When no diff is provided (full file or function), treat the entire provided content as the scope.
|
|
9
|
+
Ignore the rest of the codebase unless the provided content explicitly references external functions.</objective>
|
|
10
|
+
|
|
11
|
+
<inputs>
|
|
12
|
+
<input name="content" desc="Content to review - diff, full file, or function" />
|
|
13
|
+
<input name="also_consider" required="false"
|
|
14
|
+
desc="Optional areas to keep in mind during review alongside normal edge-case analysis" />
|
|
15
|
+
</inputs>
|
|
16
|
+
|
|
17
|
+
<output-format>Return ONLY a valid JSON array of objects. Each object must contain exactly these four fields and nothing else:
|
|
18
|
+
{
|
|
19
|
+
"location": "file:line",
|
|
20
|
+
"trigger_condition": "one-line description (max 15 words)",
|
|
21
|
+
"guard_snippet": "minimal code sketch that closes the gap",
|
|
22
|
+
"potential_consequence": "what could actually go wrong (max 15 words)"
|
|
23
|
+
}
|
|
24
|
+
No extra text, no explanations, no markdown wrapping.</output-format>
|
|
25
|
+
|
|
26
|
+
<llm critical="true">
|
|
27
|
+
<i>MANDATORY: Execute ALL steps in the flow section IN EXACT ORDER</i>
|
|
28
|
+
<i>DO NOT skip steps or change the sequence</i>
|
|
29
|
+
<i>HALT immediately when halt-conditions are met</i>
|
|
30
|
+
<i>Each action xml tag within step xml tag is a REQUIRED action to complete that step</i>
|
|
31
|
+
|
|
32
|
+
<i>Your method is exhaustive path enumeration — mechanically walk every branch, not hunt by intuition</i>
|
|
33
|
+
<i>Trace each branching path: conditionals, switches, early returns, guard clauses, loops, error handlers</i>
|
|
34
|
+
<i>Trace each boundary condition: null, undefined, empty, zero, negative, overflow, max-length, type coercion, concurrency, timing</i>
|
|
35
|
+
<i>Report ONLY paths and conditions that lack handling — discard handled ones silently</i>
|
|
36
|
+
<i>Do NOT editorialize or add filler — findings only</i>
|
|
37
|
+
</llm>
|
|
38
|
+
|
|
39
|
+
<flow>
|
|
40
|
+
<step n="1" title="Receive Content">
|
|
41
|
+
<action>Load the content to review from provided input or context</action>
|
|
42
|
+
<action>If content to review is empty, ask for clarification and abort task</action>
|
|
43
|
+
<action>Identify content type (diff, full file, or function) to determine scope rules</action>
|
|
44
|
+
</step>
|
|
45
|
+
|
|
46
|
+
<step n="2" title="Exhaustive Path Analysis" critical="true">
|
|
47
|
+
<mandate>Walk every branching path and boundary condition within scope - report only unhandled ones</mandate>
|
|
48
|
+
<action>If also_consider input was provided, incorporate those areas into the analysis</action>
|
|
49
|
+
<action>Enumerate all branching paths and boundary conditions within scope: conditionals, switches, early returns, guard clauses, loops, error handlers, null/empty states, overflow, type edges, concurrency, timing</action>
|
|
50
|
+
<action>For each path: determine whether the content handles it</action>
|
|
51
|
+
<action>Collect only the unhandled paths as findings - discard handled ones silently</action>
|
|
52
|
+
</step>
|
|
53
|
+
|
|
54
|
+
<step n="3" title="Present Findings">
|
|
55
|
+
<action>Output findings as a JSON array following the output-format specification exactly</action>
|
|
56
|
+
</step>
|
|
57
|
+
</flow>
|
|
58
|
+
|
|
59
|
+
<halt-conditions>
|
|
60
|
+
<condition>HALT if content is empty or unreadable</condition>
|
|
61
|
+
</halt-conditions>
|
|
62
|
+
|
|
63
|
+
</task>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<task id="_bmad/core/tasks/shard-doc" name="Shard Document"
|
|
2
|
-
description="Splits large markdown documents into smaller, organized files based on level 2 (default) sections. Use if the user says
|
|
2
|
+
description="Splits large markdown documents into smaller, organized files based on level 2 (default) sections. Use if the user says perform shard document">
|
|
3
3
|
<objective>Split large markdown documents into smaller, organized files based on level 2 sections using @kayvan/markdown-tree-parser tool</objective>
|
|
4
4
|
|
|
5
5
|
<llm critical="true">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<task id="_bmad/core/workflows/advanced-elicitation/workflow.xml" name="Advanced Elicitation"
|
|
2
|
-
description="Push the LLM to reconsider refine and improve its recent output. Use when the user asks for
|
|
2
|
+
description="Push the LLM to reconsider refine and improve its recent output. Use when the user asks for advanced elicitation"
|
|
3
3
|
methods="{project-root}/_bmad/core/workflows/advanced-elicitation/methods.csv"
|
|
4
4
|
agent-party="{project-root}/_bmad/_config/agent-manifest.csv">
|
|
5
5
|
<llm critical="true">
|
|
@@ -29,23 +29,30 @@ Initialize the brainstorming workflow by detecting continuation state and settin
|
|
|
29
29
|
|
|
30
30
|
## INITIALIZATION SEQUENCE:
|
|
31
31
|
|
|
32
|
-
### 1. Check for Existing
|
|
32
|
+
### 1. Check for Existing Sessions
|
|
33
33
|
|
|
34
|
-
First, check
|
|
34
|
+
First, check the brainstorming sessions folder for existing sessions:
|
|
35
35
|
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
- If
|
|
36
|
+
- List all files in `{output_folder}/brainstorming/`
|
|
37
|
+
- **DO NOT read any file contents** - only list filenames
|
|
38
|
+
- If files exist, identify the most recent by date/time in the filename
|
|
39
|
+
- If no files exist, this is a fresh workflow
|
|
39
40
|
|
|
40
|
-
### 2. Handle
|
|
41
|
+
### 2. Handle Existing Sessions (If Files Found)
|
|
41
42
|
|
|
42
|
-
If
|
|
43
|
+
If existing session files are found:
|
|
43
44
|
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
|
|
45
|
+
- Display the most recent session filename (do NOT read its content)
|
|
46
|
+
- Ask the user: "Found existing session: `[filename]`. Would you like to:
|
|
47
|
+
**[1]** Continue this session
|
|
48
|
+
**[2]** Start a new session
|
|
49
|
+
**[3]** See all existing sessions"
|
|
47
50
|
|
|
48
|
-
|
|
51
|
+
- If user selects **[1]** (continue): Set `{brainstorming_session_output_file}` to that file path and load `./step-01b-continue.md`
|
|
52
|
+
- If user selects **[2]** (new): Generate new filename with current date/time and proceed to step 3
|
|
53
|
+
- If user selects **[3]** (see all): List all session filenames and ask which to continue or if new
|
|
54
|
+
|
|
55
|
+
### 3. Fresh Workflow Setup (If No Files or User Chooses New)
|
|
49
56
|
|
|
50
57
|
If no document exists or no `stepsCompleted` in frontmatter:
|
|
51
58
|
|
|
@@ -55,10 +62,10 @@ Create the brainstorming session document:
|
|
|
55
62
|
|
|
56
63
|
```bash
|
|
57
64
|
# Create directory if needed
|
|
58
|
-
mkdir -p "$(dirname "{
|
|
65
|
+
mkdir -p "$(dirname "{brainstorming_session_output_file}")"
|
|
59
66
|
|
|
60
67
|
# Initialize from template
|
|
61
|
-
cp "{template_path}" "{
|
|
68
|
+
cp "{template_path}" "{brainstorming_session_output_file}"
|
|
62
69
|
```
|
|
63
70
|
|
|
64
71
|
#### B. Context File Check and Loading
|
|
@@ -134,7 +141,7 @@ _[Content based on conversation about session parameters and facilitator approac
|
|
|
134
141
|
|
|
135
142
|
## APPEND TO DOCUMENT:
|
|
136
143
|
|
|
137
|
-
When user selects approach, append the session overview content directly to `{
|
|
144
|
+
When user selects approach, append the session overview content directly to `{brainstorming_session_output_file}` using the structure from above.
|
|
138
145
|
|
|
139
146
|
### E. Continue to Technique Selection
|
|
140
147
|
|
|
@@ -152,7 +159,7 @@ Which approach appeals to you most? (Enter 1-4)"
|
|
|
152
159
|
|
|
153
160
|
#### When user selects approach number:
|
|
154
161
|
|
|
155
|
-
- **Append initial session overview to `{
|
|
162
|
+
- **Append initial session overview to `{brainstorming_session_output_file}`**
|
|
156
163
|
- **Update frontmatter:** `stepsCompleted: [1]`, `selected_approach: '[selected approach]'`
|
|
157
164
|
- **Load the appropriate step-02 file** based on selection
|
|
158
165
|
|
|
@@ -167,7 +174,9 @@ After user selects approach number:
|
|
|
167
174
|
|
|
168
175
|
## SUCCESS METRICS:
|
|
169
176
|
|
|
170
|
-
✅ Existing
|
|
177
|
+
✅ Existing sessions detected without reading file contents
|
|
178
|
+
✅ User prompted to continue existing session or start new
|
|
179
|
+
✅ Correct session file selected for continuation
|
|
171
180
|
✅ Fresh workflow initialized with correct document structure
|
|
172
181
|
✅ Session context gathered and understood clearly
|
|
173
182
|
✅ User's approach selection captured and routed correctly
|
|
@@ -176,7 +185,9 @@ After user selects approach number:
|
|
|
176
185
|
|
|
177
186
|
## FAILURE MODES:
|
|
178
187
|
|
|
179
|
-
❌
|
|
188
|
+
❌ Reading file contents during session detection (wastes context)
|
|
189
|
+
❌ Not asking user before continuing existing session
|
|
190
|
+
❌ Not properly routing user's continue/new session selection
|
|
180
191
|
❌ Missing continuation detection leading to duplicate work
|
|
181
192
|
❌ Insufficient session context gathering
|
|
182
193
|
❌ Not properly routing user's approach selection
|
|
@@ -184,7 +195,9 @@ After user selects approach number:
|
|
|
184
195
|
|
|
185
196
|
## SESSION SETUP PROTOCOLS:
|
|
186
197
|
|
|
187
|
-
- Always
|
|
198
|
+
- Always list sessions folder WITHOUT reading file contents
|
|
199
|
+
- Ask user before continuing any existing session
|
|
200
|
+
- Only load continue step after user confirms
|
|
188
201
|
- Load brain techniques CSV only when needed for technique presentation
|
|
189
202
|
- Use collaborative facilitation language throughout
|
|
190
203
|
- Maintain psychological safety for creative exploration
|
|
@@ -35,7 +35,7 @@ Load existing document and analyze current state:
|
|
|
35
35
|
|
|
36
36
|
**Document Analysis:**
|
|
37
37
|
|
|
38
|
-
- Read existing `{
|
|
38
|
+
- Read existing `{brainstorming_session_output_file}`
|
|
39
39
|
- Examine frontmatter for `stepsCompleted`, `session_topic`, `session_goals`
|
|
40
40
|
- Review content to understand session progress and outcomes
|
|
41
41
|
- Identify current stage and next logical steps
|
|
@@ -296,7 +296,7 @@ After final technique element:
|
|
|
296
296
|
|
|
297
297
|
#### If 'C' (Move to organization):
|
|
298
298
|
|
|
299
|
-
- **Append the technique execution content to `{
|
|
299
|
+
- **Append the technique execution content to `{brainstorming_session_output_file}`**
|
|
300
300
|
- **Update frontmatter:** `stepsCompleted: [1, 2, 3]`
|
|
301
301
|
- **Load:** `./step-04-idea-organization.md`
|
|
302
302
|
|
|
@@ -356,7 +356,7 @@ _[Short narrative describing the user and AI collaboration journey - what made t
|
|
|
356
356
|
|
|
357
357
|
## APPEND TO DOCUMENT:
|
|
358
358
|
|
|
359
|
-
When user selects 'C', append the content directly to `{
|
|
359
|
+
When user selects 'C', append the content directly to `{brainstorming_session_output_file}` using the structure from above.
|
|
360
360
|
|
|
361
361
|
## SUCCESS METRICS:
|
|
362
362
|
|
|
@@ -253,14 +253,14 @@ Provide final session wrap-up and forward guidance:
|
|
|
253
253
|
|
|
254
254
|
#### If [C] Complete:
|
|
255
255
|
|
|
256
|
-
- **Append the final session content to `{
|
|
256
|
+
- **Append the final session content to `{brainstorming_session_output_file}`**
|
|
257
257
|
- Update frontmatter: `stepsCompleted: [1, 2, 3, 4]`
|
|
258
258
|
- Set `session_active: false` and `workflow_completed: true`
|
|
259
259
|
- Complete workflow with positive closure message
|
|
260
260
|
|
|
261
261
|
## APPEND TO DOCUMENT:
|
|
262
262
|
|
|
263
|
-
When user selects 'C', append the content directly to `{
|
|
263
|
+
When user selects 'C', append the content directly to `{brainstorming_session_output_file}` using the structure from step 7.
|
|
264
264
|
|
|
265
265
|
## SUCCESS METRICS:
|
|
266
266
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: brainstorming
|
|
3
|
-
description:
|
|
3
|
+
description: 'Facilitate interactive brainstorming sessions using diverse creative techniques and ideation methods. Use when the user says help me brainstorm or help me ideate.'
|
|
4
4
|
context_file: '' # Optional context file path for project-specific guidance
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -45,7 +45,9 @@ Load config from `{project-root}/_bmad/core/config.yaml` and resolve:
|
|
|
45
45
|
- `installed_path` = `{project-root}/_bmad/core/workflows/brainstorming`
|
|
46
46
|
- `template_path` = `{installed_path}/template.md`
|
|
47
47
|
- `brain_techniques_path` = `{installed_path}/brain-methods.csv`
|
|
48
|
-
- `
|
|
48
|
+
- `brainstorming_session_output_file` = `{output_folder}/brainstorming/brainstorming-session-{{date}}-{{time}}.md` (evaluated once at workflow start)
|
|
49
|
+
|
|
50
|
+
All steps MUST reference `{brainstorming_session_output_file}` instead of the full path pattern.
|
|
49
51
|
- `context_file` = Optional context file path from workflow invocation for project-specific guidance
|
|
50
52
|
- `advancedElicitationTask` = `{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml`
|
|
51
53
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: party-mode
|
|
3
|
-
description:
|
|
3
|
+
description: 'Orchestrates group discussions between all installed BMAD agents, enabling natural multi-agent conversations. Use when user requests party mode.'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Party Mode Workflow
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
# TEA Module Configuration
|
|
2
2
|
# Generated by BMAD installer
|
|
3
|
-
# Version: 6.0.
|
|
3
|
+
# Version: 6.0.4
|
|
4
4
|
# Date: {install_date}
|
|
5
5
|
|
|
6
6
|
test_artifacts: "{project-root}/{output_folder}/test-artifacts"
|
|
7
7
|
tea_use_playwright_utils: true
|
|
8
|
+
tea_use_pactjs_utils: true
|
|
9
|
+
tea_pact_mcp: mcp
|
|
8
10
|
tea_browser_automation: auto
|
|
11
|
+
tea_execution_mode: auto
|
|
12
|
+
tea_capability_probe: true
|
|
9
13
|
test_stack_type: auto
|
|
10
14
|
ci_platform: auto
|
|
11
15
|
test_framework: auto
|
|
@@ -4,10 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
Contract testing validates API contracts between consumer and provider services without requiring integrated end-to-end tests. Store consumer contracts alongside integration specs, version contracts semantically, and publish on every CI run. Provider verification before merge surfaces breaking changes immediately, while explicit fallback behavior (timeouts, retries, error payloads) captures resilience guarantees in contracts.
|
|
6
6
|
|
|
7
|
+
> **Pact.js Utils Note**: When `tea_use_pactjs_utils` is enabled, prefer the patterns in the `pactjs-utils-*.md` fragments over the raw Pact.js patterns shown below. The pactjs-utils library eliminates boilerplate for provider states, verifier configuration, and request filters. See `pactjs-utils-overview.md` for the decision tree.
|
|
8
|
+
|
|
7
9
|
## Rationale
|
|
8
10
|
|
|
9
11
|
Traditional integration testing requires running both consumer and provider simultaneously, creating slow, flaky tests with complex setup. Contract testing decouples services: consumers define expectations (pact files), providers verify against those expectations independently. This enables parallel development, catches breaking changes early, and documents API behavior as executable specifications. Pair contract tests with API smoke tests to validate data mapping and UI rendering in tandem.
|
|
10
12
|
|
|
13
|
+
> **Recommended**: When `tea_use_pactjs_utils` is enabled, use `@seontechnologies/pactjs-utils` utilities instead of the manual patterns below. The library handles JsonMap conversion, verifier configuration, and request filter assembly automatically. See the `pactjs-utils-overview.md`, `pactjs-utils-consumer-helpers.md`, `pactjs-utils-provider-verifier.md`, and `pactjs-utils-request-filter.md` fragments for the simplified approach.
|
|
14
|
+
|
|
11
15
|
## Pattern Examples
|
|
12
16
|
|
|
13
17
|
### Example 1: Pact Consumer Test (Frontend → Backend API)
|
|
@@ -164,7 +168,7 @@ describe('User API Contract', () => {
|
|
|
164
168
|
{
|
|
165
169
|
"scripts": {
|
|
166
170
|
"test:contract": "jest tests/contract --testTimeout=30000",
|
|
167
|
-
"pact:publish": "pact-broker publish ./pacts --consumer-app-version=$
|
|
171
|
+
"pact:publish": "pact-broker publish ./pacts --consumer-app-version=$GITHUB_SHA --broker-base-url=$PACT_BROKER_BASE_URL --broker-token=$PACT_BROKER_TOKEN"
|
|
168
172
|
}
|
|
169
173
|
}
|
|
170
174
|
```
|
|
@@ -954,4 +958,22 @@ Before implementing contract testing, verify:
|
|
|
954
958
|
- Related fragments: `test-levels-framework.md`, `ci-burn-in.md`
|
|
955
959
|
- Tools: Pact.js, Pact Broker (Pactflow or self-hosted), Pact CLI
|
|
956
960
|
|
|
957
|
-
|
|
961
|
+
---
|
|
962
|
+
|
|
963
|
+
## Pact.js Utils Accelerator
|
|
964
|
+
|
|
965
|
+
When `tea_use_pactjs_utils` is enabled, the following utilities replace manual boilerplate:
|
|
966
|
+
|
|
967
|
+
| Manual Pattern (raw Pact.js) | Pact.js Utils Equivalent | Benefit |
|
|
968
|
+
| ------------------------------------------------ | --------------------------------------------------------------------------------- | ------------------------------------------------------ |
|
|
969
|
+
| Manual `JsonMap` casting for `.given()` params | `createProviderState({ name, params })` | Type-safe, auto-conversion of Date/null/nested objects |
|
|
970
|
+
| 30+ lines of `VerifierOptions` assembly | `buildVerifierOptions({ provider, port, includeMainAndDeployed, stateHandlers })` | One-call setup, env-aware, flow auto-detection |
|
|
971
|
+
| Manual broker URL + selector logic from env vars | `handlePactBrokerUrlAndSelectors({ ..., options })` | Mutates options in-place with broker URL and selectors |
|
|
972
|
+
| DIY Express middleware for auth injection | `createRequestFilter({ tokenGenerator })` | Bearer prefix contract prevents double-prefix bugs |
|
|
973
|
+
| Manual CI branch/tag extraction | `getProviderVersionTags()` | CI-aware (GitHub Actions, GitLab CI, etc.) |
|
|
974
|
+
| Message verifier config assembly | `buildMessageVerifierOptions({ provider, messageProviders })` | Same one-call pattern for Kafka/async contracts |
|
|
975
|
+
| Inline no-op filter `(req, res, next) => next()` | `noOpRequestFilter` | Pre-built pass-through for no-auth providers |
|
|
976
|
+
|
|
977
|
+
See the `pactjs-utils-*.md` knowledge fragments for complete examples and anti-patterns.
|
|
978
|
+
|
|
979
|
+
_Source: Pact consumer/provider sample repos, Murat contract testing blog, Pact official documentation, @seontechnologies/pactjs-utils library_
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# Pact MCP Server (SmartBear)
|
|
2
|
+
|
|
3
|
+
## Principle
|
|
4
|
+
|
|
5
|
+
Use the SmartBear MCP server to enable AI agent interaction with PactFlow/Pact Broker during contract testing workflows. The MCP server provides tools for generating pact tests, fetching provider states, reviewing test quality, and checking deployment safety — all accessible through the Model Context Protocol.
|
|
6
|
+
|
|
7
|
+
## Rationale
|
|
8
|
+
|
|
9
|
+
### Why MCP for contract testing?
|
|
10
|
+
|
|
11
|
+
- **Live broker queries**: AI agents can fetch existing provider states, verification results, and deployment status directly from PactFlow
|
|
12
|
+
- **Test generation assistance**: MCP tools generate consumer and provider tests based on existing contracts, OpenAPI specs, or templates
|
|
13
|
+
- **Automated review**: MCP-powered review checks tests against best practices without manual inspection
|
|
14
|
+
- **Deployment safety**: `can-i-deploy` checks integrated into agent workflows for real-time compatibility verification
|
|
15
|
+
|
|
16
|
+
### When TEA uses it
|
|
17
|
+
|
|
18
|
+
- **test-design workflow**: Fetch existing provider states to understand current contract landscape
|
|
19
|
+
- **automate workflow**: Generate pact tests using broker knowledge and existing contracts
|
|
20
|
+
- **test-review workflow**: Review pact tests against best practices with automated feedback
|
|
21
|
+
- **ci workflow**: Reference can-i-deploy and matrix tools for pipeline guidance
|
|
22
|
+
|
|
23
|
+
## Available Tools
|
|
24
|
+
|
|
25
|
+
| # | Tool | Description | When Used |
|
|
26
|
+
| --- | ------------------------- | ----------------------------------------------------------------------- | --------------------- |
|
|
27
|
+
| 1 | **Generate Pact Tests** | Create consumer/provider tests from code, OpenAPI, or templates | automate workflow |
|
|
28
|
+
| 2 | **Fetch Provider States** | List all provider states from broker for a given consumer-provider pair | test-design, automate |
|
|
29
|
+
| 3 | **Review Pact Tests** | Analyze tests against contract testing best practices | test-review |
|
|
30
|
+
| 4 | **Can I Deploy** | Check deployment safety via broker verification matrix | ci workflow |
|
|
31
|
+
| 5 | **Matrix** | Query consumer-provider verification matrix | ci, test-design |
|
|
32
|
+
| 6 | **PactFlow AI Status** | Check AI credits and permissions (PactFlow Cloud only) | diagnostics |
|
|
33
|
+
| 7 | **Metrics - All** | Workspace-wide contract testing metrics | reporting |
|
|
34
|
+
| 8 | **Metrics - Team** | Team-level adoption statistics (PactFlow Cloud only) | reporting |
|
|
35
|
+
|
|
36
|
+
## Installation
|
|
37
|
+
|
|
38
|
+
### Config file locations
|
|
39
|
+
|
|
40
|
+
| Tool | Global Config File | Format |
|
|
41
|
+
| ----------------- | ------------------------------------- | ---------------------- |
|
|
42
|
+
| Claude Code | `~/.claude.json` | JSON (`mcpServers`) |
|
|
43
|
+
| Codex | `~/.codex/config.toml` | TOML (`[mcp_servers]`) |
|
|
44
|
+
| Gemini CLI | `~/.gemini/settings.json` | JSON (`mcpServers`) |
|
|
45
|
+
| Cursor | `~/.cursor/mcp.json` | JSON (`mcpServers`) |
|
|
46
|
+
| Windsurf | `~/.codeium/windsurf/mcp_config.json` | JSON (`mcpServers`) |
|
|
47
|
+
| VS Code (Copilot) | `.vscode/mcp.json` | JSON (`servers`) |
|
|
48
|
+
|
|
49
|
+
> **Claude Code tip**: Prefer the `claude mcp add` CLI over manual JSON editing. Use `-s user` for global (all projects) or omit for per-project (default).
|
|
50
|
+
|
|
51
|
+
### CLI shortcuts (Claude Code and Codex)
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# Claude Code — use add-json for servers with env vars (-s user = global)
|
|
55
|
+
claude mcp add-json -s user smartbear \
|
|
56
|
+
'{"type":"stdio","command":"npx","args":["-y","@smartbear/mcp@latest"],"env":{"PACT_BROKER_BASE_URL":"https://{tenant}.pactflow.io","PACT_BROKER_TOKEN":"<your-token>"}}'
|
|
57
|
+
|
|
58
|
+
# Codex
|
|
59
|
+
codex mcp add smartbear -- npx -y @smartbear/mcp@latest
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### JSON config (Gemini CLI, Cursor, Windsurf)
|
|
63
|
+
|
|
64
|
+
Add a `"smartbear"` entry to the `mcpServers` object in the config file for your tool:
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"mcpServers": {
|
|
69
|
+
"smartbear": {
|
|
70
|
+
"type": "stdio",
|
|
71
|
+
"command": "npx",
|
|
72
|
+
"args": ["-y", "@smartbear/mcp@latest"],
|
|
73
|
+
"env": {
|
|
74
|
+
"PACT_BROKER_BASE_URL": "https://{tenant}.pactflow.io",
|
|
75
|
+
"PACT_BROKER_TOKEN": "<your-api-token>"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Codex TOML config
|
|
83
|
+
|
|
84
|
+
Codex uses TOML instead of JSON. Add to `~/.codex/config.toml`:
|
|
85
|
+
|
|
86
|
+
```toml
|
|
87
|
+
[mcp_servers.smartbear]
|
|
88
|
+
command = "npx"
|
|
89
|
+
args = ["-y", "@smartbear/mcp@latest"]
|
|
90
|
+
|
|
91
|
+
[mcp_servers.smartbear.env]
|
|
92
|
+
PACT_BROKER_BASE_URL = "https://{tenant}.pactflow.io"
|
|
93
|
+
PACT_BROKER_TOKEN = "<your-api-token>"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Note the key is `mcp_servers` (underscored), not `mcpServers`.
|
|
97
|
+
|
|
98
|
+
### VS Code (GitHub Copilot)
|
|
99
|
+
|
|
100
|
+
Add to `.vscode/mcp.json` (note: uses `servers` key, not `mcpServers`):
|
|
101
|
+
|
|
102
|
+
```json
|
|
103
|
+
{
|
|
104
|
+
"servers": {
|
|
105
|
+
"smartbear": {
|
|
106
|
+
"type": "stdio",
|
|
107
|
+
"command": "npx",
|
|
108
|
+
"args": ["-y", "@smartbear/mcp@latest"],
|
|
109
|
+
"env": {
|
|
110
|
+
"PACT_BROKER_BASE_URL": "https://{tenant}.pactflow.io",
|
|
111
|
+
"PACT_BROKER_TOKEN": "${input:pactToken}"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
> **Note**: Set either `PACT_BROKER_TOKEN` (for PactFlow) or `PACT_BROKER_USERNAME`+`PACT_BROKER_PASSWORD` (for self-hosted). Leave unused vars empty.
|
|
119
|
+
|
|
120
|
+
## Required Environment Variables
|
|
121
|
+
|
|
122
|
+
| Variable | Required | Description |
|
|
123
|
+
| ---------------------- | ---------------------------- | --------------------------------------- |
|
|
124
|
+
| `PACT_BROKER_BASE_URL` | Yes (for Pact features) | PactFlow or self-hosted Pact Broker URL |
|
|
125
|
+
| `PACT_BROKER_TOKEN` | For PactFlow / token auth | API token for broker authentication |
|
|
126
|
+
| `PACT_BROKER_USERNAME` | For basic auth (self-hosted) | Username for basic authentication |
|
|
127
|
+
| `PACT_BROKER_PASSWORD` | For basic auth (self-hosted) | Password for basic authentication |
|
|
128
|
+
|
|
129
|
+
**Authentication**: Use token auth (`PACT_BROKER_TOKEN`) for PactFlow. Use basic auth (`PACT_BROKER_USERNAME` + `PACT_BROKER_PASSWORD`) for self-hosted Pact Broker instances. Only one auth method is needed.
|
|
130
|
+
|
|
131
|
+
**Requirements**: Node.js 20+
|
|
132
|
+
|
|
133
|
+
## Pattern Examples
|
|
134
|
+
|
|
135
|
+
### Example 1: Fetching Provider States During Test Design
|
|
136
|
+
|
|
137
|
+
When designing contract tests, use MCP to query existing provider states:
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
# Agent queries SmartBear MCP during test-design workflow:
|
|
141
|
+
# → Fetch Provider States for consumer="movie-web", provider="SampleMoviesAPI"
|
|
142
|
+
# ← Returns: ["movie with id 1 exists", "no movies exist", "user is authenticated"]
|
|
143
|
+
#
|
|
144
|
+
# Agent uses this to generate comprehensive consumer tests covering all states
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Example 2: Reviewing Pact Tests
|
|
148
|
+
|
|
149
|
+
During test-review workflow, use MCP to evaluate test quality:
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
# Agent submits test file to SmartBear MCP Review tool:
|
|
153
|
+
# → Review Pact Tests with test file content
|
|
154
|
+
# ← Returns: feedback on matcher usage, state coverage, interaction naming
|
|
155
|
+
#
|
|
156
|
+
# Agent incorporates feedback into review report
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Example 3: Can I Deploy Check in CI
|
|
160
|
+
|
|
161
|
+
During CI workflow design, reference the can-i-deploy tool:
|
|
162
|
+
|
|
163
|
+
```
|
|
164
|
+
# Agent generates CI pipeline with can-i-deploy gate:
|
|
165
|
+
# → Can I Deploy: pacticipant="SampleMoviesAPI", version="${GITHUB_SHA}", to="production"
|
|
166
|
+
# ← Returns: { ok: true/false, reason: "..." }
|
|
167
|
+
#
|
|
168
|
+
# Agent designs pipeline to block deployment if can-i-deploy fails
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
## Key Points
|
|
172
|
+
|
|
173
|
+
- **Per-project install recommended**: Different projects may target different PactFlow tenants — match TEA's per-project config philosophy
|
|
174
|
+
- **Env vars are project-specific**: `PACT_BROKER_BASE_URL` and `PACT_BROKER_TOKEN` vary by project/team
|
|
175
|
+
- **Node.js 20+ required**: SmartBear MCP server requires Node.js 20 or higher
|
|
176
|
+
- **PactFlow Cloud features**: Some tools (AI Status, Team Metrics) are only available with PactFlow Cloud, not self-hosted Pact Broker
|
|
177
|
+
- **Complements pactjs-utils**: MCP provides broker interaction during design/review; pactjs-utils provides runtime utilities for test code
|
|
178
|
+
|
|
179
|
+
## Related Fragments
|
|
180
|
+
|
|
181
|
+
- `pactjs-utils-overview.md` — runtime utilities that pact tests import
|
|
182
|
+
- `pactjs-utils-provider-verifier.md` — verifier options that reference broker config
|
|
183
|
+
- `contract-testing.md` — foundational contract testing patterns
|
|
184
|
+
|
|
185
|
+
## Anti-Patterns
|
|
186
|
+
|
|
187
|
+
### Wrong: Using MCP for runtime test execution
|
|
188
|
+
|
|
189
|
+
```
|
|
190
|
+
# ❌ Don't use MCP to run pact tests — use npm scripts and CI pipelines
|
|
191
|
+
# MCP is for agent-assisted design, generation, and review
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Right: Use MCP for design-time assistance
|
|
195
|
+
|
|
196
|
+
```
|
|
197
|
+
# ✅ Use MCP during planning and review:
|
|
198
|
+
# - Fetch provider states to inform test design
|
|
199
|
+
# - Generate test scaffolds from existing contracts
|
|
200
|
+
# - Review tests for best practice compliance
|
|
201
|
+
# - Check can-i-deploy during CI pipeline design
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
_Source: SmartBear MCP documentation, PactFlow developer docs_
|