agentic-qe 1.4.4 → 1.5.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/.claude/agents/qe-api-contract-validator.md +133 -27
- package/.claude/agents/qe-api-contract-validator.md.backup +1148 -0
- package/.claude/agents/qe-api-contract-validator.md.backup-20251107-134747 +1148 -0
- package/.claude/agents/qe-api-contract-validator.md.backup-phase2-20251107-140039 +1123 -0
- package/.claude/agents/qe-chaos-engineer.md +142 -23
- package/.claude/agents/qe-chaos-engineer.md.backup +808 -0
- package/.claude/agents/qe-chaos-engineer.md.backup-20251107-134747 +808 -0
- package/.claude/agents/qe-chaos-engineer.md.backup-phase2-20251107-140039 +787 -0
- package/.claude/agents/qe-code-complexity.md +111 -23
- package/.claude/agents/qe-code-complexity.md.backup +291 -0
- package/.claude/agents/qe-code-complexity.md.backup-20251107-134747 +291 -0
- package/.claude/agents/qe-code-complexity.md.backup-phase2-20251107-140039 +286 -0
- package/.claude/agents/qe-coverage-analyzer.md +306 -30
- package/.claude/agents/qe-coverage-analyzer.md.backup +467 -0
- package/.claude/agents/qe-coverage-analyzer.md.backup-20251107-134747 +467 -0
- package/.claude/agents/qe-coverage-analyzer.md.backup-phase2-20251107-140039 +438 -0
- package/.claude/agents/qe-deployment-readiness.md +84 -28
- package/.claude/agents/qe-deployment-readiness.md.backup +1166 -0
- package/.claude/agents/qe-deployment-readiness.md.backup-20251107-134747 +1166 -0
- package/.claude/agents/qe-deployment-readiness.md.backup-phase2-20251107-140039 +1140 -0
- package/.claude/agents/qe-flaky-test-hunter.md +277 -35
- package/.claude/agents/qe-flaky-test-hunter.md.backup +1195 -0
- package/.claude/agents/qe-flaky-test-hunter.md.backup-20251107-134747 +1195 -0
- package/.claude/agents/qe-flaky-test-hunter.md.backup-phase2-20251107-140039 +1162 -0
- package/.claude/agents/qe-fleet-commander.md +126 -23
- package/.claude/agents/qe-fleet-commander.md.backup +718 -0
- package/.claude/agents/qe-fleet-commander.md.backup-20251107-134747 +718 -0
- package/.claude/agents/qe-fleet-commander.md.backup-phase2-20251107-140039 +697 -0
- package/.claude/agents/qe-performance-tester.md +314 -57
- package/.claude/agents/qe-performance-tester.md.backup +428 -0
- package/.claude/agents/qe-performance-tester.md.backup-20251107-134747 +428 -0
- package/.claude/agents/qe-performance-tester.md.backup-phase2-20251107-140039 +372 -0
- package/.claude/agents/qe-production-intelligence.md +126 -27
- package/.claude/agents/qe-production-intelligence.md.backup +1219 -0
- package/.claude/agents/qe-production-intelligence.md.backup-20251107-134747 +1219 -0
- package/.claude/agents/qe-production-intelligence.md.backup-phase2-20251107-140039 +1194 -0
- package/.claude/agents/qe-quality-analyzer.md +127 -32
- package/.claude/agents/qe-quality-analyzer.md.backup +425 -0
- package/.claude/agents/qe-quality-analyzer.md.backup-20251107-134747 +425 -0
- package/.claude/agents/qe-quality-analyzer.md.backup-phase2-20251107-140039 +394 -0
- package/.claude/agents/qe-quality-gate.md +148 -33
- package/.claude/agents/qe-quality-gate.md.backup +446 -0
- package/.claude/agents/qe-quality-gate.md.backup-20251107-134747 +446 -0
- package/.claude/agents/qe-quality-gate.md.backup-phase2-20251107-140039 +415 -0
- package/.claude/agents/qe-regression-risk-analyzer.md +78 -27
- package/.claude/agents/qe-regression-risk-analyzer.md.backup +1009 -0
- package/.claude/agents/qe-regression-risk-analyzer.md.backup-20251107-134747 +1009 -0
- package/.claude/agents/qe-regression-risk-analyzer.md.backup-phase2-20251107-140039 +984 -0
- package/.claude/agents/qe-requirements-validator.md +131 -27
- package/.claude/agents/qe-requirements-validator.md.backup +748 -0
- package/.claude/agents/qe-requirements-validator.md.backup-20251107-134747 +748 -0
- package/.claude/agents/qe-requirements-validator.md.backup-phase2-20251107-140039 +723 -0
- package/.claude/agents/qe-security-scanner.md +137 -62
- package/.claude/agents/qe-security-scanner.md.backup +634 -0
- package/.claude/agents/qe-security-scanner.md.backup-20251107-134747 +634 -0
- package/.claude/agents/qe-security-scanner.md.backup-phase2-20251107-140039 +573 -0
- package/.claude/agents/qe-test-data-architect.md +129 -26
- package/.claude/agents/qe-test-data-architect.md.backup +1064 -0
- package/.claude/agents/qe-test-data-architect.md.backup-20251107-134747 +1064 -0
- package/.claude/agents/qe-test-data-architect.md.backup-phase2-20251107-140039 +1040 -0
- package/.claude/agents/qe-test-executor.md +165 -21
- package/.claude/agents/qe-test-executor.md.backup +389 -0
- package/.claude/agents/qe-test-executor.md.backup-20251107-134747 +389 -0
- package/.claude/agents/qe-test-executor.md.backup-phase2-20251107-140039 +369 -0
- package/.claude/agents/qe-test-generator.md +379 -34
- package/.claude/agents/qe-test-generator.md.backup +997 -0
- package/.claude/agents/qe-test-generator.md.backup-20251107-134747 +997 -0
- package/.claude/agents/qe-visual-tester.md +236 -23
- package/.claude/agents/qe-visual-tester.md.backup +777 -0
- package/.claude/agents/qe-visual-tester.md.backup-20251107-134747 +777 -0
- package/.claude/agents/qe-visual-tester.md.backup-phase2-20251107-140039 +756 -0
- package/.claude/agents/subagents/qe-code-reviewer.md +59 -0
- package/.claude/agents/subagents/qe-data-generator.md +60 -0
- package/.claude/agents/subagents/qe-integration-tester.md +77 -0
- package/.claude/agents/subagents/qe-performance-validator.md +55 -0
- package/.claude/agents/subagents/qe-security-auditor.md +51 -0
- package/.claude/agents/subagents/qe-test-implementer.md +371 -0
- package/.claude/agents/subagents/qe-test-refactorer.md +510 -0
- package/.claude/agents/subagents/qe-test-writer.md +603 -0
- package/.claude/skills/accessibility-testing/SKILL.md +764 -777
- package/.claude/skills/agentic-quality-engineering/SKILL.md +0 -6
- package/.claude/skills/api-testing-patterns/SKILL.md +0 -12
- package/.claude/skills/bug-reporting-excellence/SKILL.md +0 -6
- package/.claude/skills/chaos-engineering-resilience/SKILL.md +0 -6
- package/.claude/skills/code-review-quality/SKILL.md +0 -6
- package/.claude/skills/compatibility-testing/SKILL.md +0 -6
- package/.claude/skills/compliance-testing/SKILL.md +0 -6
- package/.claude/skills/consultancy-practices/SKILL.md +0 -6
- package/.claude/skills/context-driven-testing/SKILL.md +0 -6
- package/.claude/skills/contract-testing/SKILL.md +0 -6
- package/.claude/skills/database-testing/SKILL.md +0 -6
- package/.claude/skills/exploratory-testing-advanced/SKILL.md +0 -6
- package/.claude/skills/holistic-testing-pact/SKILL.md +0 -6
- package/.claude/skills/localization-testing/SKILL.md +0 -6
- package/.claude/skills/mobile-testing/SKILL.md +535 -548
- package/.claude/skills/mutation-testing/SKILL.md +0 -6
- package/.claude/skills/performance-testing/SKILL.md +0 -6
- package/.claude/skills/quality-metrics/SKILL.md +0 -12
- package/.claude/skills/refactoring-patterns/SKILL.md +0 -6
- package/.claude/skills/regression-testing/SKILL.md +1033 -1045
- package/.claude/skills/risk-based-testing/SKILL.md +0 -12
- package/.claude/skills/security-testing/SKILL.md +0 -6
- package/.claude/skills/shift-left-testing/SKILL.md +529 -535
- package/.claude/skills/shift-right-testing/SKILL.md +585 -591
- package/.claude/skills/tdd-london-chicago/SKILL.md +0 -6
- package/.claude/skills/technical-writing/SKILL.md +0 -6
- package/.claude/skills/test-automation-strategy/SKILL.md +0 -6
- package/.claude/skills/test-data-management/SKILL.md +1054 -1067
- package/.claude/skills/test-design-techniques/SKILL.md +0 -6
- package/.claude/skills/test-environment-management/SKILL.md +0 -6
- package/.claude/skills/test-reporting-analytics/SKILL.md +0 -6
- package/.claude/skills/visual-testing-advanced/SKILL.md +0 -6
- package/.claude/skills/xp-practices/SKILL.md +0 -6
- package/CHANGELOG.md +397 -5
- package/README.md +24 -19
- package/dist/cli/commands/init.d.ts +4 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +97 -44
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/mcp/handlers/coordination/index.d.ts +14 -14
- package/dist/mcp/handlers/coordination/index.d.ts.map +1 -1
- package/dist/mcp/handlers/coordination/index.js +14 -14
- package/dist/mcp/handlers/coordination/index.js.map +1 -1
- package/dist/mcp/handlers/phase2/Phase2Tools.d.ts.map +1 -1
- package/dist/mcp/handlers/phase2/Phase2Tools.js +39 -10
- package/dist/mcp/handlers/phase2/Phase2Tools.js.map +1 -1
- package/dist/mcp/handlers/phase3/Phase3DomainTools.d.ts +63 -0
- package/dist/mcp/handlers/phase3/Phase3DomainTools.d.ts.map +1 -0
- package/dist/mcp/handlers/phase3/Phase3DomainTools.js +885 -0
- package/dist/mcp/handlers/phase3/Phase3DomainTools.js.map +1 -0
- package/dist/mcp/handlers/phase3/index.d.ts +6 -0
- package/dist/mcp/handlers/phase3/index.d.ts.map +1 -0
- package/dist/mcp/handlers/phase3/index.js +10 -0
- package/dist/mcp/handlers/phase3/index.js.map +1 -0
- package/dist/mcp/handlers/prediction/index.d.ts +10 -10
- package/dist/mcp/handlers/prediction/index.d.ts.map +1 -1
- package/dist/mcp/handlers/prediction/index.js +10 -10
- package/dist/mcp/handlers/prediction/index.js.map +1 -1
- package/dist/mcp/handlers/security/check-authz.d.ts +152 -0
- package/dist/mcp/handlers/security/check-authz.d.ts.map +1 -0
- package/dist/mcp/handlers/security/check-authz.js +434 -0
- package/dist/mcp/handlers/security/check-authz.js.map +1 -0
- package/dist/mcp/handlers/security/generate-report.d.ts +156 -0
- package/dist/mcp/handlers/security/generate-report.d.ts.map +1 -0
- package/dist/mcp/handlers/security/generate-report.js +469 -0
- package/dist/mcp/handlers/security/generate-report.js.map +1 -0
- package/dist/mcp/handlers/security/index.d.ts +80 -0
- package/dist/mcp/handlers/security/index.d.ts.map +1 -0
- package/dist/mcp/handlers/security/index.js +91 -0
- package/dist/mcp/handlers/security/index.js.map +1 -0
- package/dist/mcp/handlers/security/scan-comprehensive.d.ts +66 -0
- package/dist/mcp/handlers/security/scan-comprehensive.d.ts.map +1 -0
- package/dist/mcp/handlers/security/scan-comprehensive.js +296 -0
- package/dist/mcp/handlers/security/scan-comprehensive.js.map +1 -0
- package/dist/mcp/handlers/security/scan-dependencies.d.ts +148 -0
- package/dist/mcp/handlers/security/scan-dependencies.d.ts.map +1 -0
- package/dist/mcp/handlers/security/scan-dependencies.js +354 -0
- package/dist/mcp/handlers/security/scan-dependencies.js.map +1 -0
- package/dist/mcp/handlers/security/validate-auth.d.ts +128 -0
- package/dist/mcp/handlers/security/validate-auth.d.ts.map +1 -0
- package/dist/mcp/handlers/security/validate-auth.js +294 -0
- package/dist/mcp/handlers/security/validate-auth.js.map +1 -0
- package/dist/mcp/handlers/test/generate-integration-tests.d.ts +95 -0
- package/dist/mcp/handlers/test/generate-integration-tests.d.ts.map +1 -0
- package/dist/mcp/handlers/test/generate-integration-tests.js +286 -0
- package/dist/mcp/handlers/test/generate-integration-tests.js.map +1 -0
- package/dist/mcp/handlers/test/generate-unit-tests.d.ts +89 -0
- package/dist/mcp/handlers/test/generate-unit-tests.d.ts.map +1 -0
- package/dist/mcp/handlers/test/generate-unit-tests.js +273 -0
- package/dist/mcp/handlers/test/generate-unit-tests.js.map +1 -0
- package/dist/mcp/handlers/test/optimize-test-suite.d.ts +97 -0
- package/dist/mcp/handlers/test/optimize-test-suite.d.ts.map +1 -0
- package/dist/mcp/handlers/test/optimize-test-suite.js +282 -0
- package/dist/mcp/handlers/test/optimize-test-suite.js.map +1 -0
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +211 -0
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tools/deprecated.d.ts +1390 -0
- package/dist/mcp/tools/deprecated.d.ts.map +1 -0
- package/dist/mcp/tools/deprecated.js +859 -0
- package/dist/mcp/tools/deprecated.js.map +1 -0
- package/dist/mcp/tools/qe/api-contract/index.d.ts +138 -0
- package/dist/mcp/tools/qe/api-contract/index.d.ts.map +1 -0
- package/dist/mcp/tools/qe/api-contract/index.js +572 -0
- package/dist/mcp/tools/qe/api-contract/index.js.map +1 -0
- package/dist/mcp/tools/qe/code-quality/analyze-complexity.d.ts +110 -0
- package/dist/mcp/tools/qe/code-quality/analyze-complexity.d.ts.map +1 -0
- package/dist/mcp/tools/qe/code-quality/analyze-complexity.js +381 -0
- package/dist/mcp/tools/qe/code-quality/analyze-complexity.js.map +1 -0
- package/dist/mcp/tools/qe/code-quality/calculate-quality-metrics.d.ts +115 -0
- package/dist/mcp/tools/qe/code-quality/calculate-quality-metrics.d.ts.map +1 -0
- package/dist/mcp/tools/qe/code-quality/calculate-quality-metrics.js +461 -0
- package/dist/mcp/tools/qe/code-quality/calculate-quality-metrics.js.map +1 -0
- package/dist/mcp/tools/qe/code-quality/index.d.ts +12 -0
- package/dist/mcp/tools/qe/code-quality/index.d.ts.map +1 -0
- package/dist/mcp/tools/qe/code-quality/index.js +30 -0
- package/dist/mcp/tools/qe/code-quality/index.js.map +1 -0
- package/dist/mcp/tools/qe/coverage/analyze-with-risk-scoring.d.ts +58 -0
- package/dist/mcp/tools/qe/coverage/analyze-with-risk-scoring.d.ts.map +1 -0
- package/dist/mcp/tools/qe/coverage/analyze-with-risk-scoring.js +172 -0
- package/dist/mcp/tools/qe/coverage/analyze-with-risk-scoring.js.map +1 -0
- package/dist/mcp/tools/qe/coverage/calculate-trends.d.ts +73 -0
- package/dist/mcp/tools/qe/coverage/calculate-trends.d.ts.map +1 -0
- package/dist/mcp/tools/qe/coverage/calculate-trends.js +240 -0
- package/dist/mcp/tools/qe/coverage/calculate-trends.js.map +1 -0
- package/dist/mcp/tools/qe/coverage/detect-gaps-ml.d.ts +38 -0
- package/dist/mcp/tools/qe/coverage/detect-gaps-ml.d.ts.map +1 -0
- package/dist/mcp/tools/qe/coverage/detect-gaps-ml.js +204 -0
- package/dist/mcp/tools/qe/coverage/detect-gaps-ml.js.map +1 -0
- package/dist/mcp/tools/qe/coverage/index.d.ts +12 -0
- package/dist/mcp/tools/qe/coverage/index.d.ts.map +1 -0
- package/dist/mcp/tools/qe/coverage/index.js +23 -0
- package/dist/mcp/tools/qe/coverage/index.js.map +1 -0
- package/dist/mcp/tools/qe/coverage/recommend-tests.d.ts +46 -0
- package/dist/mcp/tools/qe/coverage/recommend-tests.d.ts.map +1 -0
- package/dist/mcp/tools/qe/coverage/recommend-tests.js +248 -0
- package/dist/mcp/tools/qe/coverage/recommend-tests.js.map +1 -0
- package/dist/mcp/tools/qe/flaky-detection/analyze-patterns.d.ts +179 -0
- package/dist/mcp/tools/qe/flaky-detection/analyze-patterns.d.ts.map +1 -0
- package/dist/mcp/tools/qe/flaky-detection/analyze-patterns.js +554 -0
- package/dist/mcp/tools/qe/flaky-detection/analyze-patterns.js.map +1 -0
- package/dist/mcp/tools/qe/flaky-detection/detect-statistical.d.ts +172 -0
- package/dist/mcp/tools/qe/flaky-detection/detect-statistical.d.ts.map +1 -0
- package/dist/mcp/tools/qe/flaky-detection/detect-statistical.js +498 -0
- package/dist/mcp/tools/qe/flaky-detection/detect-statistical.js.map +1 -0
- package/dist/mcp/tools/qe/flaky-detection/index.d.ts +35 -0
- package/dist/mcp/tools/qe/flaky-detection/index.d.ts.map +1 -0
- package/dist/mcp/tools/qe/flaky-detection/index.js +66 -0
- package/dist/mcp/tools/qe/flaky-detection/index.js.map +1 -0
- package/dist/mcp/tools/qe/flaky-detection/stabilize-auto.d.ts +159 -0
- package/dist/mcp/tools/qe/flaky-detection/stabilize-auto.d.ts.map +1 -0
- package/dist/mcp/tools/qe/flaky-detection/stabilize-auto.js +462 -0
- package/dist/mcp/tools/qe/flaky-detection/stabilize-auto.js.map +1 -0
- package/dist/mcp/tools/qe/fleet/index.d.ts +422 -0
- package/dist/mcp/tools/qe/fleet/index.d.ts.map +1 -0
- package/dist/mcp/tools/qe/fleet/index.js +652 -0
- package/dist/mcp/tools/qe/fleet/index.js.map +1 -0
- package/dist/mcp/tools/qe/performance/analyze-bottlenecks.d.ts +180 -0
- package/dist/mcp/tools/qe/performance/analyze-bottlenecks.d.ts.map +1 -0
- package/dist/mcp/tools/qe/performance/analyze-bottlenecks.js +347 -0
- package/dist/mcp/tools/qe/performance/analyze-bottlenecks.js.map +1 -0
- package/dist/mcp/tools/qe/performance/generate-report.d.ts +146 -0
- package/dist/mcp/tools/qe/performance/generate-report.d.ts.map +1 -0
- package/dist/mcp/tools/qe/performance/generate-report.js +354 -0
- package/dist/mcp/tools/qe/performance/generate-report.js.map +1 -0
- package/dist/mcp/tools/qe/performance/index.d.ts +13 -0
- package/dist/mcp/tools/qe/performance/index.d.ts.map +1 -0
- package/dist/mcp/tools/qe/performance/index.js +24 -0
- package/dist/mcp/tools/qe/performance/index.js.map +1 -0
- package/dist/mcp/tools/qe/performance/monitor-realtime.d.ts +120 -0
- package/dist/mcp/tools/qe/performance/monitor-realtime.d.ts.map +1 -0
- package/dist/mcp/tools/qe/performance/monitor-realtime.js +215 -0
- package/dist/mcp/tools/qe/performance/monitor-realtime.js.map +1 -0
- package/dist/mcp/tools/qe/performance/run-benchmark.d.ts +68 -0
- package/dist/mcp/tools/qe/performance/run-benchmark.d.ts.map +1 -0
- package/dist/mcp/tools/qe/performance/run-benchmark.js +120 -0
- package/dist/mcp/tools/qe/performance/run-benchmark.js.map +1 -0
- package/dist/mcp/tools/qe/quality-gates/assess-deployment-risk.d.ts +239 -0
- package/dist/mcp/tools/qe/quality-gates/assess-deployment-risk.d.ts.map +1 -0
- package/dist/mcp/tools/qe/quality-gates/assess-deployment-risk.js +671 -0
- package/dist/mcp/tools/qe/quality-gates/assess-deployment-risk.js.map +1 -0
- package/dist/mcp/tools/qe/quality-gates/evaluate-quality-gate.d.ts +219 -0
- package/dist/mcp/tools/qe/quality-gates/evaluate-quality-gate.d.ts.map +1 -0
- package/dist/mcp/tools/qe/quality-gates/evaluate-quality-gate.js +732 -0
- package/dist/mcp/tools/qe/quality-gates/evaluate-quality-gate.js.map +1 -0
- package/dist/mcp/tools/qe/quality-gates/generate-quality-report.d.ts +447 -0
- package/dist/mcp/tools/qe/quality-gates/generate-quality-report.d.ts.map +1 -0
- package/dist/mcp/tools/qe/quality-gates/generate-quality-report.js +551 -0
- package/dist/mcp/tools/qe/quality-gates/generate-quality-report.js.map +1 -0
- package/dist/mcp/tools/qe/quality-gates/index.d.ts +40 -0
- package/dist/mcp/tools/qe/quality-gates/index.d.ts.map +1 -0
- package/dist/mcp/tools/qe/quality-gates/index.js +56 -0
- package/dist/mcp/tools/qe/quality-gates/index.js.map +1 -0
- package/dist/mcp/tools/qe/quality-gates/validate-quality-metrics.d.ts +226 -0
- package/dist/mcp/tools/qe/quality-gates/validate-quality-metrics.d.ts.map +1 -0
- package/dist/mcp/tools/qe/quality-gates/validate-quality-metrics.js +603 -0
- package/dist/mcp/tools/qe/quality-gates/validate-quality-metrics.js.map +1 -0
- package/dist/mcp/tools/qe/regression/analyze-risk.d.ts +212 -0
- package/dist/mcp/tools/qe/regression/analyze-risk.d.ts.map +1 -0
- package/dist/mcp/tools/qe/regression/analyze-risk.js +617 -0
- package/dist/mcp/tools/qe/regression/analyze-risk.js.map +1 -0
- package/dist/mcp/tools/qe/regression/index.d.ts +36 -0
- package/dist/mcp/tools/qe/regression/index.d.ts.map +1 -0
- package/dist/mcp/tools/qe/regression/index.js +63 -0
- package/dist/mcp/tools/qe/regression/index.js.map +1 -0
- package/dist/mcp/tools/qe/regression/select-tests.d.ts +241 -0
- package/dist/mcp/tools/qe/regression/select-tests.d.ts.map +1 -0
- package/dist/mcp/tools/qe/regression/select-tests.js +601 -0
- package/dist/mcp/tools/qe/regression/select-tests.js.map +1 -0
- package/dist/mcp/tools/qe/requirements/generate-bdd-scenarios.d.ts +134 -0
- package/dist/mcp/tools/qe/requirements/generate-bdd-scenarios.d.ts.map +1 -0
- package/dist/mcp/tools/qe/requirements/generate-bdd-scenarios.js +737 -0
- package/dist/mcp/tools/qe/requirements/generate-bdd-scenarios.js.map +1 -0
- package/dist/mcp/tools/qe/requirements/index.d.ts +40 -0
- package/dist/mcp/tools/qe/requirements/index.d.ts.map +1 -0
- package/dist/mcp/tools/qe/requirements/index.js +84 -0
- package/dist/mcp/tools/qe/requirements/index.js.map +1 -0
- package/dist/mcp/tools/qe/requirements/validate-requirements.d.ts +196 -0
- package/dist/mcp/tools/qe/requirements/validate-requirements.d.ts.map +1 -0
- package/dist/mcp/tools/qe/requirements/validate-requirements.js +740 -0
- package/dist/mcp/tools/qe/requirements/validate-requirements.js.map +1 -0
- package/dist/mcp/tools/qe/security/detect-vulnerabilities.d.ts +300 -0
- package/dist/mcp/tools/qe/security/detect-vulnerabilities.d.ts.map +1 -0
- package/dist/mcp/tools/qe/security/detect-vulnerabilities.js +492 -0
- package/dist/mcp/tools/qe/security/detect-vulnerabilities.js.map +1 -0
- package/dist/mcp/tools/qe/security/index.d.ts +34 -0
- package/dist/mcp/tools/qe/security/index.d.ts.map +1 -0
- package/dist/mcp/tools/qe/security/index.js +44 -0
- package/dist/mcp/tools/qe/security/index.js.map +1 -0
- package/dist/mcp/tools/qe/security/scan-comprehensive.d.ts +240 -0
- package/dist/mcp/tools/qe/security/scan-comprehensive.d.ts.map +1 -0
- package/dist/mcp/tools/qe/security/scan-comprehensive.js +535 -0
- package/dist/mcp/tools/qe/security/scan-comprehensive.js.map +1 -0
- package/dist/mcp/tools/qe/security/validate-compliance.d.ts +299 -0
- package/dist/mcp/tools/qe/security/validate-compliance.d.ts.map +1 -0
- package/dist/mcp/tools/qe/security/validate-compliance.js +517 -0
- package/dist/mcp/tools/qe/security/validate-compliance.js.map +1 -0
- package/dist/mcp/tools/qe/shared/types.d.ts +840 -0
- package/dist/mcp/tools/qe/shared/types.d.ts.map +1 -0
- package/dist/mcp/tools/qe/shared/types.js +13 -0
- package/dist/mcp/tools/qe/shared/types.js.map +1 -0
- package/dist/mcp/tools/qe/test-data/analyze-schema.d.ts +264 -0
- package/dist/mcp/tools/qe/test-data/analyze-schema.d.ts.map +1 -0
- package/dist/mcp/tools/qe/test-data/analyze-schema.js +553 -0
- package/dist/mcp/tools/qe/test-data/analyze-schema.js.map +1 -0
- package/dist/mcp/tools/qe/test-data/generate-test-data.d.ts +167 -0
- package/dist/mcp/tools/qe/test-data/generate-test-data.d.ts.map +1 -0
- package/dist/mcp/tools/qe/test-data/generate-test-data.js +336 -0
- package/dist/mcp/tools/qe/test-data/generate-test-data.js.map +1 -0
- package/dist/mcp/tools/qe/test-data/index.d.ts +44 -0
- package/dist/mcp/tools/qe/test-data/index.d.ts.map +1 -0
- package/dist/mcp/tools/qe/test-data/index.js +90 -0
- package/dist/mcp/tools/qe/test-data/index.js.map +1 -0
- package/dist/mcp/tools/qe/test-data/mask-sensitive-data.d.ts +165 -0
- package/dist/mcp/tools/qe/test-data/mask-sensitive-data.d.ts.map +1 -0
- package/dist/mcp/tools/qe/test-data/mask-sensitive-data.js +342 -0
- package/dist/mcp/tools/qe/test-data/mask-sensitive-data.js.map +1 -0
- package/dist/mcp/tools/qe/test-generation/analyze-test-quality.d.ts +144 -0
- package/dist/mcp/tools/qe/test-generation/analyze-test-quality.d.ts.map +1 -0
- package/dist/mcp/tools/qe/test-generation/analyze-test-quality.js +432 -0
- package/dist/mcp/tools/qe/test-generation/analyze-test-quality.js.map +1 -0
- package/dist/mcp/tools/qe/test-generation/generate-integration-tests.d.ts +98 -0
- package/dist/mcp/tools/qe/test-generation/generate-integration-tests.d.ts.map +1 -0
- package/dist/mcp/tools/qe/test-generation/generate-integration-tests.js +459 -0
- package/dist/mcp/tools/qe/test-generation/generate-integration-tests.js.map +1 -0
- package/dist/mcp/tools/qe/test-generation/generate-unit-tests.d.ts +83 -0
- package/dist/mcp/tools/qe/test-generation/generate-unit-tests.d.ts.map +1 -0
- package/dist/mcp/tools/qe/test-generation/generate-unit-tests.js +483 -0
- package/dist/mcp/tools/qe/test-generation/generate-unit-tests.js.map +1 -0
- package/dist/mcp/tools/qe/test-generation/index.d.ts +56 -0
- package/dist/mcp/tools/qe/test-generation/index.d.ts.map +1 -0
- package/dist/mcp/tools/qe/test-generation/index.js +97 -0
- package/dist/mcp/tools/qe/test-generation/index.js.map +1 -0
- package/dist/mcp/tools/qe/test-generation/optimize-test-suite.d.ts +124 -0
- package/dist/mcp/tools/qe/test-generation/optimize-test-suite.d.ts.map +1 -0
- package/dist/mcp/tools/qe/test-generation/optimize-test-suite.js +362 -0
- package/dist/mcp/tools/qe/test-generation/optimize-test-suite.js.map +1 -0
- package/dist/mcp/tools/qe/visual/compare-screenshots.d.ts +119 -0
- package/dist/mcp/tools/qe/visual/compare-screenshots.d.ts.map +1 -0
- package/dist/mcp/tools/qe/visual/compare-screenshots.js +280 -0
- package/dist/mcp/tools/qe/visual/compare-screenshots.js.map +1 -0
- package/dist/mcp/tools/qe/visual/detect-regression.d.ts +138 -0
- package/dist/mcp/tools/qe/visual/detect-regression.d.ts.map +1 -0
- package/dist/mcp/tools/qe/visual/detect-regression.js +271 -0
- package/dist/mcp/tools/qe/visual/detect-regression.js.map +1 -0
- package/dist/mcp/tools/qe/visual/index.d.ts +16 -0
- package/dist/mcp/tools/qe/visual/index.d.ts.map +1 -0
- package/dist/mcp/tools/qe/visual/index.js +22 -0
- package/dist/mcp/tools/qe/visual/index.js.map +1 -0
- package/dist/mcp/tools/qe/visual/validate-accessibility.d.ts +276 -0
- package/dist/mcp/tools/qe/visual/validate-accessibility.d.ts.map +1 -0
- package/dist/mcp/tools/qe/visual/validate-accessibility.js +413 -0
- package/dist/mcp/tools/qe/visual/validate-accessibility.js.map +1 -0
- package/dist/mcp/tools.d.ts +44 -0
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +1980 -1
- package/dist/mcp/tools.js.map +1 -1
- package/package.json +2 -2
- package/dist/learning/__mocks__/LearningEngine.d.ts +0 -39
- package/dist/learning/__mocks__/LearningEngine.d.ts.map +0 -1
- package/dist/learning/__mocks__/LearningEngine.js +0 -116
- package/dist/learning/__mocks__/LearningEngine.js.map +0 -1
- package/dist/utils/__mocks__/Database.d.ts +0 -85
- package/dist/utils/__mocks__/Database.d.ts.map +0 -1
- package/dist/utils/__mocks__/Database.js +0 -125
- package/dist/utils/__mocks__/Database.js.map +0 -1
- package/dist/utils/__mocks__/Logger.d.ts +0 -26
- package/dist/utils/__mocks__/Logger.d.ts.map +0 -1
- package/dist/utils/__mocks__/Logger.js +0 -44
- package/dist/utils/__mocks__/Logger.js.map +0 -1
|
@@ -0,0 +1,603 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: qe-test-writer
|
|
3
|
+
role: specialized-subagent
|
|
4
|
+
parent_agent: qe-test-generator
|
|
5
|
+
phase: RED
|
|
6
|
+
color: red
|
|
7
|
+
priority: critical
|
|
8
|
+
description: "Specialized subagent for writing failing tests in TDD RED phase - generates comprehensive test cases that define expected behavior before implementation"
|
|
9
|
+
capabilities:
|
|
10
|
+
- failing-test-generation
|
|
11
|
+
- behavior-specification
|
|
12
|
+
- test-case-design
|
|
13
|
+
- assertion-definition
|
|
14
|
+
- boundary-analysis
|
|
15
|
+
coordination:
|
|
16
|
+
protocol: aqe-hooks
|
|
17
|
+
parent_delegation: true
|
|
18
|
+
metadata:
|
|
19
|
+
version: "1.0.0"
|
|
20
|
+
tdd_phase: "RED"
|
|
21
|
+
frameworks: ["jest", "mocha", "vitest", "playwright"]
|
|
22
|
+
parent_agents: ["qe-test-generator", "qe-quality-gate"]
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
# Test Writer Subagent - TDD RED Phase
|
|
26
|
+
|
|
27
|
+
## Mission Statement
|
|
28
|
+
|
|
29
|
+
The **Test Writer** subagent specializes in the RED phase of Test-Driven Development, crafting precise, failing tests that define expected behavior before implementation. This subagent transforms requirements into executable specifications, creating comprehensive test cases that guide development through clear assertions and boundary conditions.
|
|
30
|
+
|
|
31
|
+
## Role in TDD Workflow
|
|
32
|
+
|
|
33
|
+
### RED Phase Focus
|
|
34
|
+
|
|
35
|
+
**Primary Responsibility**: Write tests that FAIL initially, defining expected behavior.
|
|
36
|
+
|
|
37
|
+
**Workflow Position**:
|
|
38
|
+
```
|
|
39
|
+
┌─────────────────────────────────────────────────────────┐
|
|
40
|
+
│ TDD Cycle │
|
|
41
|
+
├─────────────────────────────────────────────────────────┤
|
|
42
|
+
│ │
|
|
43
|
+
│ ┌──────────┐ ┌──────────┐ ┌──────────────┐ │
|
|
44
|
+
│ │ RED │ --> │ GREEN │ --> │ REFACTOR │ │
|
|
45
|
+
│ │ (Write │ │ (Make │ │ (Improve │ │
|
|
46
|
+
│ │ Test) │ │ Pass) │ │ Code) │ │
|
|
47
|
+
│ └──────────┘ └──────────┘ └──────────────┘ │
|
|
48
|
+
│ ▲ │
|
|
49
|
+
│ │ │
|
|
50
|
+
│ qe-test-writer (YOU ARE HERE) │
|
|
51
|
+
│ │
|
|
52
|
+
└─────────────────────────────────────────────────────────┘
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Parent Agent Delegation
|
|
56
|
+
|
|
57
|
+
### Invoked By Parent Agents
|
|
58
|
+
|
|
59
|
+
**Primary Parent**: `qe-test-generator`
|
|
60
|
+
- Delegates test case generation
|
|
61
|
+
- Provides requirements and specifications
|
|
62
|
+
- Receives failing test suite
|
|
63
|
+
|
|
64
|
+
**Secondary Parent**: `qe-quality-gate`
|
|
65
|
+
- Requests coverage improvement
|
|
66
|
+
- Validates test quality standards
|
|
67
|
+
|
|
68
|
+
### Delegation Protocol
|
|
69
|
+
|
|
70
|
+
```typescript
|
|
71
|
+
// Parent agent delegates to test-writer subagent
|
|
72
|
+
interface TestWriterDelegation {
|
|
73
|
+
type: 'write-failing-tests';
|
|
74
|
+
requirements: {
|
|
75
|
+
module: string;
|
|
76
|
+
functionality: string;
|
|
77
|
+
acceptance_criteria: string[];
|
|
78
|
+
edge_cases: string[];
|
|
79
|
+
};
|
|
80
|
+
constraints: {
|
|
81
|
+
framework: 'jest' | 'mocha' | 'vitest' | 'playwright';
|
|
82
|
+
coverage_target: number;
|
|
83
|
+
test_types: ('unit' | 'integration' | 'e2e')[];
|
|
84
|
+
};
|
|
85
|
+
coordination: {
|
|
86
|
+
memory_key: string; // Where to store results
|
|
87
|
+
callback_event: string; // Event to emit on completion
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// Example delegation from parent
|
|
92
|
+
await this.delegateToSubagent('qe-test-writer', {
|
|
93
|
+
type: 'write-failing-tests',
|
|
94
|
+
requirements: {
|
|
95
|
+
module: 'src/services/user-authentication.ts',
|
|
96
|
+
functionality: 'User login with OAuth2',
|
|
97
|
+
acceptance_criteria: [
|
|
98
|
+
'Should authenticate user with valid OAuth2 token',
|
|
99
|
+
'Should reject expired tokens',
|
|
100
|
+
'Should handle network failures gracefully'
|
|
101
|
+
],
|
|
102
|
+
edge_cases: [
|
|
103
|
+
'Token expires during authentication',
|
|
104
|
+
'Multiple simultaneous login attempts',
|
|
105
|
+
'Malformed token format'
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
constraints: {
|
|
109
|
+
framework: 'jest',
|
|
110
|
+
coverage_target: 0.95,
|
|
111
|
+
test_types: ['unit', 'integration']
|
|
112
|
+
},
|
|
113
|
+
coordination: {
|
|
114
|
+
memory_key: 'aqe/test-writer/authentication-tests',
|
|
115
|
+
callback_event: 'test-writer:tests-generated'
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Core Capabilities
|
|
121
|
+
|
|
122
|
+
### 1. Failing Test Generation
|
|
123
|
+
|
|
124
|
+
Generate tests that MUST fail initially (RED phase requirement).
|
|
125
|
+
|
|
126
|
+
**Test Generation Strategy**:
|
|
127
|
+
```javascript
|
|
128
|
+
class TestWriterSubagent {
|
|
129
|
+
async generateFailingTests(requirements) {
|
|
130
|
+
// Step 1: Analyze requirements
|
|
131
|
+
const testCases = this.analyzeRequirements(requirements);
|
|
132
|
+
|
|
133
|
+
// Step 2: Design test structure
|
|
134
|
+
const testSuite = this.designTestSuite(testCases);
|
|
135
|
+
|
|
136
|
+
// Step 3: Generate failing tests
|
|
137
|
+
const tests = this.generateTests(testSuite, { expectFailure: true });
|
|
138
|
+
|
|
139
|
+
// Step 4: Validate tests fail correctly
|
|
140
|
+
await this.validateRedPhase(tests);
|
|
141
|
+
|
|
142
|
+
return tests;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
generateTests(testSuite, options) {
|
|
146
|
+
return testSuite.map(testCase => {
|
|
147
|
+
// Generate test that calls non-existent implementation
|
|
148
|
+
return this.createFailingTest({
|
|
149
|
+
name: testCase.name,
|
|
150
|
+
given: testCase.preconditions,
|
|
151
|
+
when: testCase.action,
|
|
152
|
+
then: testCase.expectedOutcome,
|
|
153
|
+
// Implementation doesn't exist yet - test WILL fail
|
|
154
|
+
implementation: undefined
|
|
155
|
+
});
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
async validateRedPhase(tests) {
|
|
160
|
+
// Critical: Tests MUST fail in RED phase
|
|
161
|
+
const results = await this.runTests(tests);
|
|
162
|
+
|
|
163
|
+
if (results.some(r => r.passed)) {
|
|
164
|
+
throw new Error(
|
|
165
|
+
'RED phase violation: Tests must fail initially. ' +
|
|
166
|
+
'Found passing tests - implementation may already exist.'
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
return {
|
|
171
|
+
redPhaseValid: true,
|
|
172
|
+
failingTests: results.length,
|
|
173
|
+
message: 'All tests failing as expected (RED phase complete)'
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### 2. Behavior Specification
|
|
180
|
+
|
|
181
|
+
Translate requirements into precise test specifications using Given-When-Then.
|
|
182
|
+
|
|
183
|
+
**Specification Pattern**:
|
|
184
|
+
```javascript
|
|
185
|
+
// Generate behavior-driven test specifications
|
|
186
|
+
function generateBehaviorSpec(requirement) {
|
|
187
|
+
return {
|
|
188
|
+
feature: requirement.functionality,
|
|
189
|
+
scenario: requirement.acceptance_criteria,
|
|
190
|
+
|
|
191
|
+
// Given-When-Then pattern
|
|
192
|
+
given: `Given a ${requirement.context}`,
|
|
193
|
+
when: `When ${requirement.action}`,
|
|
194
|
+
then: `Then ${requirement.expected_outcome}`,
|
|
195
|
+
|
|
196
|
+
// Test structure
|
|
197
|
+
test: `
|
|
198
|
+
describe('${requirement.functionality}', () => {
|
|
199
|
+
test('${requirement.scenario}', async () => {
|
|
200
|
+
// GIVEN: Setup preconditions
|
|
201
|
+
${generateSetupCode(requirement.context)}
|
|
202
|
+
|
|
203
|
+
// WHEN: Execute action
|
|
204
|
+
${generateActionCode(requirement.action)}
|
|
205
|
+
|
|
206
|
+
// THEN: Verify outcome
|
|
207
|
+
${generateAssertionCode(requirement.expected_outcome)}
|
|
208
|
+
});
|
|
209
|
+
});
|
|
210
|
+
`
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
**Example Output** (Jest):
|
|
216
|
+
```javascript
|
|
217
|
+
describe('User Authentication - OAuth2 Login', () => {
|
|
218
|
+
test('should authenticate user with valid OAuth2 token', async () => {
|
|
219
|
+
// GIVEN: A valid OAuth2 token
|
|
220
|
+
const validToken = generateValidOAuth2Token({
|
|
221
|
+
userId: 'user-123',
|
|
222
|
+
expiresIn: 3600,
|
|
223
|
+
scope: ['read', 'write']
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
// WHEN: User attempts to authenticate
|
|
227
|
+
const result = await authService.authenticateWithOAuth2(validToken);
|
|
228
|
+
|
|
229
|
+
// THEN: Authentication succeeds with user session
|
|
230
|
+
expect(result).toMatchObject({
|
|
231
|
+
success: true,
|
|
232
|
+
sessionId: expect.any(String),
|
|
233
|
+
userId: 'user-123',
|
|
234
|
+
expiresAt: expect.any(Date)
|
|
235
|
+
});
|
|
236
|
+
expect(result.sessionId).toHaveLength(64); // UUID format
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
test('should reject expired OAuth2 token', async () => {
|
|
240
|
+
// GIVEN: An expired OAuth2 token
|
|
241
|
+
const expiredToken = generateExpiredOAuth2Token({
|
|
242
|
+
userId: 'user-123',
|
|
243
|
+
expiredSince: -3600 // Expired 1 hour ago
|
|
244
|
+
});
|
|
245
|
+
|
|
246
|
+
// WHEN: User attempts to authenticate
|
|
247
|
+
const result = await authService.authenticateWithOAuth2(expiredToken);
|
|
248
|
+
|
|
249
|
+
// THEN: Authentication fails with expiration error
|
|
250
|
+
expect(result).toMatchObject({
|
|
251
|
+
success: false,
|
|
252
|
+
error: 'TOKEN_EXPIRED',
|
|
253
|
+
message: expect.stringContaining('expired')
|
|
254
|
+
});
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
test('should handle network failures gracefully', async () => {
|
|
258
|
+
// GIVEN: Network connection will fail during OAuth2 validation
|
|
259
|
+
mockNetworkFailure({
|
|
260
|
+
endpoint: '/oauth2/validate',
|
|
261
|
+
error: 'ECONNREFUSED'
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
// WHEN: User attempts to authenticate
|
|
265
|
+
const result = await authService.authenticateWithOAuth2(validToken);
|
|
266
|
+
|
|
267
|
+
// THEN: Returns network error without crashing
|
|
268
|
+
expect(result).toMatchObject({
|
|
269
|
+
success: false,
|
|
270
|
+
error: 'NETWORK_ERROR',
|
|
271
|
+
retryable: true
|
|
272
|
+
});
|
|
273
|
+
expect(result.message).toContain('network');
|
|
274
|
+
});
|
|
275
|
+
});
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
### 3. Assertion Definition
|
|
279
|
+
|
|
280
|
+
Define precise assertions that verify expected behavior.
|
|
281
|
+
|
|
282
|
+
**Assertion Strategies**:
|
|
283
|
+
```javascript
|
|
284
|
+
class AssertionDefiner {
|
|
285
|
+
defineAssertions(expectedOutcome) {
|
|
286
|
+
return {
|
|
287
|
+
// Value assertions
|
|
288
|
+
exact: this.exactValueAssertion(expectedOutcome),
|
|
289
|
+
|
|
290
|
+
// Type assertions
|
|
291
|
+
type: this.typeAssertion(expectedOutcome),
|
|
292
|
+
|
|
293
|
+
// Structure assertions
|
|
294
|
+
structure: this.structureAssertion(expectedOutcome),
|
|
295
|
+
|
|
296
|
+
// Behavior assertions
|
|
297
|
+
behavior: this.behaviorAssertion(expectedOutcome),
|
|
298
|
+
|
|
299
|
+
// Boundary assertions
|
|
300
|
+
boundaries: this.boundaryAssertion(expectedOutcome)
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
exactValueAssertion(outcome) {
|
|
305
|
+
return `expect(result).toBe(${JSON.stringify(outcome)});`;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
typeAssertion(outcome) {
|
|
309
|
+
const type = typeof outcome;
|
|
310
|
+
return `expect(result).toEqual(expect.any(${capitalize(type)}));`;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
structureAssertion(outcome) {
|
|
314
|
+
if (typeof outcome === 'object') {
|
|
315
|
+
return `expect(result).toMatchObject(${JSON.stringify(outcome, null, 2)});`;
|
|
316
|
+
}
|
|
317
|
+
return null;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
behaviorAssertion(outcome) {
|
|
321
|
+
return {
|
|
322
|
+
called: `expect(mockFn).toHaveBeenCalled();`,
|
|
323
|
+
calledWith: `expect(mockFn).toHaveBeenCalledWith(${outcome.args});`,
|
|
324
|
+
callCount: `expect(mockFn).toHaveBeenCalledTimes(${outcome.count});`
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
boundaryAssertion(outcome) {
|
|
329
|
+
return {
|
|
330
|
+
min: `expect(result).toBeGreaterThanOrEqual(${outcome.min});`,
|
|
331
|
+
max: `expect(result).toBeLessThanOrEqual(${outcome.max});`,
|
|
332
|
+
range: `expect(result).toBeInRange(${outcome.min}, ${outcome.max});`
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
### 4. Boundary Analysis
|
|
339
|
+
|
|
340
|
+
Identify and test boundary conditions and edge cases.
|
|
341
|
+
|
|
342
|
+
**Boundary Test Generation**:
|
|
343
|
+
```javascript
|
|
344
|
+
class BoundaryAnalyzer {
|
|
345
|
+
generateBoundaryTests(parameter) {
|
|
346
|
+
const boundaries = this.identifyBoundaries(parameter);
|
|
347
|
+
|
|
348
|
+
return boundaries.map(boundary => ({
|
|
349
|
+
name: `should handle ${boundary.description}`,
|
|
350
|
+
input: boundary.value,
|
|
351
|
+
expected: boundary.expectedBehavior,
|
|
352
|
+
category: boundary.category
|
|
353
|
+
}));
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
identifyBoundaries(parameter) {
|
|
357
|
+
const boundaries = [];
|
|
358
|
+
|
|
359
|
+
if (parameter.type === 'number') {
|
|
360
|
+
boundaries.push(
|
|
361
|
+
{ value: parameter.min - 1, description: 'below minimum', category: 'invalid' },
|
|
362
|
+
{ value: parameter.min, description: 'minimum value', category: 'boundary' },
|
|
363
|
+
{ value: parameter.min + 1, description: 'above minimum', category: 'valid' },
|
|
364
|
+
{ value: parameter.max - 1, description: 'below maximum', category: 'valid' },
|
|
365
|
+
{ value: parameter.max, description: 'maximum value', category: 'boundary' },
|
|
366
|
+
{ value: parameter.max + 1, description: 'above maximum', category: 'invalid' }
|
|
367
|
+
);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
if (parameter.type === 'string') {
|
|
371
|
+
boundaries.push(
|
|
372
|
+
{ value: '', description: 'empty string', category: 'boundary' },
|
|
373
|
+
{ value: 'a', description: 'single character', category: 'valid' },
|
|
374
|
+
{ value: 'a'.repeat(parameter.maxLength), description: 'maximum length', category: 'boundary' },
|
|
375
|
+
{ value: 'a'.repeat(parameter.maxLength + 1), description: 'exceeds maximum', category: 'invalid' }
|
|
376
|
+
);
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
if (parameter.type === 'array') {
|
|
380
|
+
boundaries.push(
|
|
381
|
+
{ value: [], description: 'empty array', category: 'boundary' },
|
|
382
|
+
{ value: [1], description: 'single element', category: 'valid' },
|
|
383
|
+
{ value: Array(parameter.maxItems).fill(1), description: 'maximum items', category: 'boundary' }
|
|
384
|
+
);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
return boundaries;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
**Example Boundary Tests**:
|
|
393
|
+
```javascript
|
|
394
|
+
describe('Pagination - Boundary Tests', () => {
|
|
395
|
+
test('should reject page number below minimum (0)', async () => {
|
|
396
|
+
const result = await paginate({ page: 0, size: 10 });
|
|
397
|
+
expect(result.error).toBe('INVALID_PAGE');
|
|
398
|
+
});
|
|
399
|
+
|
|
400
|
+
test('should accept minimum page number (1)', async () => {
|
|
401
|
+
const result = await paginate({ page: 1, size: 10 });
|
|
402
|
+
expect(result.success).toBe(true);
|
|
403
|
+
});
|
|
404
|
+
|
|
405
|
+
test('should accept page size at minimum (1)', async () => {
|
|
406
|
+
const result = await paginate({ page: 1, size: 1 });
|
|
407
|
+
expect(result.success).toBe(true);
|
|
408
|
+
expect(result.items).toHaveLength(1);
|
|
409
|
+
});
|
|
410
|
+
|
|
411
|
+
test('should accept page size at maximum (100)', async () => {
|
|
412
|
+
const result = await paginate({ page: 1, size: 100 });
|
|
413
|
+
expect(result.success).toBe(true);
|
|
414
|
+
expect(result.items).toHaveLength(expect.toBeWithinRange(1, 100));
|
|
415
|
+
});
|
|
416
|
+
|
|
417
|
+
test('should reject page size above maximum (101)', async () => {
|
|
418
|
+
const result = await paginate({ page: 1, size: 101 });
|
|
419
|
+
expect(result.error).toBe('INVALID_PAGE_SIZE');
|
|
420
|
+
});
|
|
421
|
+
});
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
## Integration with Parent Agents
|
|
425
|
+
|
|
426
|
+
### Memory Coordination
|
|
427
|
+
|
|
428
|
+
**Input from Parent** (Read):
|
|
429
|
+
```typescript
|
|
430
|
+
// Parent stores requirements
|
|
431
|
+
await this.memoryStore.store('aqe/test-writer/task', {
|
|
432
|
+
module: 'src/services/payment.ts',
|
|
433
|
+
requirements: [...],
|
|
434
|
+
framework: 'jest'
|
|
435
|
+
}, { partition: 'coordination' });
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
**Output to Parent** (Write):
|
|
439
|
+
```typescript
|
|
440
|
+
// Subagent stores generated tests
|
|
441
|
+
await this.memoryStore.store('aqe/test-writer/results', {
|
|
442
|
+
testsGenerated: 15,
|
|
443
|
+
testFiles: [
|
|
444
|
+
{ path: 'tests/payment.test.ts', content: '...' }
|
|
445
|
+
],
|
|
446
|
+
redPhaseValidated: true,
|
|
447
|
+
allTestsFailing: true
|
|
448
|
+
}, { partition: 'coordination' });
|
|
449
|
+
|
|
450
|
+
// Emit completion event
|
|
451
|
+
this.eventBus.emit('test-writer:completed', {
|
|
452
|
+
agentId: this.agentId,
|
|
453
|
+
testsGenerated: 15,
|
|
454
|
+
nextPhase: 'GREEN'
|
|
455
|
+
});
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
### Lifecycle Hooks
|
|
459
|
+
|
|
460
|
+
```typescript
|
|
461
|
+
protected async onPreTask(data: { assignment: TaskAssignment }): Promise<void> {
|
|
462
|
+
// Load requirements from parent
|
|
463
|
+
const task = await this.memoryStore.retrieve('aqe/test-writer/task', {
|
|
464
|
+
partition: 'coordination'
|
|
465
|
+
});
|
|
466
|
+
|
|
467
|
+
this.logger.info('Test Writer starting RED phase', {
|
|
468
|
+
module: task.module,
|
|
469
|
+
framework: task.framework
|
|
470
|
+
});
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
protected async onPostTask(data: { assignment: TaskAssignment; result: any }): Promise<void> {
|
|
474
|
+
// Store results for parent agent
|
|
475
|
+
await this.memoryStore.store('aqe/test-writer/results', data.result, {
|
|
476
|
+
partition: 'coordination',
|
|
477
|
+
ttl: 86400
|
|
478
|
+
});
|
|
479
|
+
|
|
480
|
+
// Validate RED phase completion
|
|
481
|
+
if (!data.result.allTestsFailing) {
|
|
482
|
+
this.logger.error('RED phase validation failed - some tests passing');
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
this.logger.info('Test Writer completed', {
|
|
486
|
+
testsGenerated: data.result.testsGenerated,
|
|
487
|
+
redPhaseValid: data.result.redPhaseValidated
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
## Success Criteria
|
|
493
|
+
|
|
494
|
+
### RED Phase Validation
|
|
495
|
+
|
|
496
|
+
**Tests MUST**:
|
|
497
|
+
- ✅ All fail initially (no passing tests)
|
|
498
|
+
- ✅ Have clear, descriptive names
|
|
499
|
+
- ✅ Follow Given-When-Then structure
|
|
500
|
+
- ✅ Include boundary tests
|
|
501
|
+
- ✅ Cover all acceptance criteria
|
|
502
|
+
|
|
503
|
+
**Tests MUST NOT**:
|
|
504
|
+
- ❌ Pass before implementation exists
|
|
505
|
+
- ❌ Have vague assertions (e.g., `expect(result).toBeTruthy()`)
|
|
506
|
+
- ❌ Test implementation details
|
|
507
|
+
- ❌ Have external dependencies without mocks
|
|
508
|
+
|
|
509
|
+
## Example Complete Output
|
|
510
|
+
|
|
511
|
+
```javascript
|
|
512
|
+
// Generated by qe-test-writer subagent
|
|
513
|
+
// TDD RED Phase - All tests MUST fail initially
|
|
514
|
+
// Module: src/services/payment.ts
|
|
515
|
+
|
|
516
|
+
describe('Payment Service - Process Payment', () => {
|
|
517
|
+
beforeEach(() => {
|
|
518
|
+
// Setup test fixtures
|
|
519
|
+
jest.clearAllMocks();
|
|
520
|
+
});
|
|
521
|
+
|
|
522
|
+
// Acceptance Criteria 1: Process valid payment
|
|
523
|
+
test('should process payment with valid card', async () => {
|
|
524
|
+
// GIVEN: Valid payment details
|
|
525
|
+
const payment = {
|
|
526
|
+
amount: 99.99,
|
|
527
|
+
currency: 'USD',
|
|
528
|
+
card: {
|
|
529
|
+
number: '4111111111111111',
|
|
530
|
+
expiry: '12/25',
|
|
531
|
+
cvv: '123'
|
|
532
|
+
}
|
|
533
|
+
};
|
|
534
|
+
|
|
535
|
+
// WHEN: Processing payment
|
|
536
|
+
const result = await paymentService.processPayment(payment);
|
|
537
|
+
|
|
538
|
+
// THEN: Payment succeeds with transaction ID
|
|
539
|
+
expect(result).toMatchObject({
|
|
540
|
+
success: true,
|
|
541
|
+
transactionId: expect.any(String),
|
|
542
|
+
amount: 99.99,
|
|
543
|
+
status: 'COMPLETED'
|
|
544
|
+
});
|
|
545
|
+
});
|
|
546
|
+
|
|
547
|
+
// Boundary Test: Minimum amount
|
|
548
|
+
test('should accept minimum payment amount (0.01)', async () => {
|
|
549
|
+
const payment = createPayment({ amount: 0.01 });
|
|
550
|
+
const result = await paymentService.processPayment(payment);
|
|
551
|
+
expect(result.success).toBe(true);
|
|
552
|
+
});
|
|
553
|
+
|
|
554
|
+
// Boundary Test: Zero amount (invalid)
|
|
555
|
+
test('should reject zero amount payment', async () => {
|
|
556
|
+
const payment = createPayment({ amount: 0 });
|
|
557
|
+
const result = await paymentService.processPayment(payment);
|
|
558
|
+
expect(result.error).toBe('INVALID_AMOUNT');
|
|
559
|
+
});
|
|
560
|
+
|
|
561
|
+
// Edge Case: Network timeout
|
|
562
|
+
test('should handle payment gateway timeout', async () => {
|
|
563
|
+
mockPaymentGatewayTimeout();
|
|
564
|
+
const payment = createPayment({ amount: 50.00 });
|
|
565
|
+
|
|
566
|
+
const result = await paymentService.processPayment(payment);
|
|
567
|
+
|
|
568
|
+
expect(result).toMatchObject({
|
|
569
|
+
success: false,
|
|
570
|
+
error: 'GATEWAY_TIMEOUT',
|
|
571
|
+
retryable: true
|
|
572
|
+
});
|
|
573
|
+
});
|
|
574
|
+
});
|
|
575
|
+
|
|
576
|
+
// Expected Result: ALL TESTS FAIL (implementation doesn't exist yet)
|
|
577
|
+
// Next Step: qe-test-implementer will make these tests pass (GREEN phase)
|
|
578
|
+
```
|
|
579
|
+
|
|
580
|
+
## Commands
|
|
581
|
+
|
|
582
|
+
```bash
|
|
583
|
+
# Parent agent delegates to subagent
|
|
584
|
+
aqe subagent delegate qe-test-writer \
|
|
585
|
+
--task write-failing-tests \
|
|
586
|
+
--module src/services/authentication.ts \
|
|
587
|
+
--framework jest
|
|
588
|
+
|
|
589
|
+
# Validate RED phase
|
|
590
|
+
aqe subagent validate qe-test-writer \
|
|
591
|
+
--phase RED \
|
|
592
|
+
--expect-failures all
|
|
593
|
+
|
|
594
|
+
# Check subagent status
|
|
595
|
+
aqe subagent status qe-test-writer
|
|
596
|
+
```
|
|
597
|
+
|
|
598
|
+
---
|
|
599
|
+
|
|
600
|
+
**Subagent Status**: Active
|
|
601
|
+
**Parent Agents**: qe-test-generator, qe-quality-gate
|
|
602
|
+
**TDD Phase**: RED (Write Failing Tests)
|
|
603
|
+
**Version**: 1.0.0
|