claude-flow-novice 1.3.5 → 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/analysis/code-analyzer.md +3 -20
- package/.claude/agents/analysis/code-review/analyze-code-quality.md +1 -1
- package/.claude/agents/analyst.md +300 -0
- package/.claude/agents/architect.md +557 -0
- package/.claude/agents/architecture/system-architect.md +630 -0
- package/.claude/agents/architecture/system-design/arch-system-design.md +1 -1
- package/.claude/agents/base-template-generator.md +24 -1
- package/.claude/agents/coder.md +180 -0
- package/.claude/agents/consensus/byzantine-coordinator.md +4 -21
- package/.claude/agents/consensus/consensus-builder.md +3 -20
- package/.claude/agents/consensus/crdt-synchronizer.md +4 -21
- package/.claude/agents/consensus/gossip-coordinator.md +4 -21
- package/.claude/agents/consensus/performance-benchmarker.md +4 -21
- package/.claude/agents/consensus/quorum-manager.md +4 -21
- package/.claude/agents/consensus/raft-manager.md +4 -21
- package/.claude/agents/consensus/security-manager.md +4 -21
- package/.claude/agents/coordinator.md +842 -0
- package/.claude/agents/data/ml/data-ml-model.md +2 -2
- package/.claude/agents/development/backend/dev-backend-api.md +2 -2
- package/.claude/agents/devops/ci-cd/ops-cicd-github.md +2 -2
- package/.claude/agents/devops/devops-engineer.md +638 -0
- package/.claude/agents/documentation/api-docs/docs-api-openapi.md +2 -2
- package/.claude/agents/github/code-review-swarm.md +1 -1
- package/.claude/agents/github/github-specialist.md +856 -0
- package/.claude/agents/github/pr-manager.md +1 -1
- package/.claude/agents/github/release-manager.md +1 -1
- package/.claude/agents/neural/neural-pattern-agent.md +762 -0
- package/.claude/agents/optimization/benchmark-suite.md +1 -1
- package/.claude/agents/optimization/perf-analyzer.md +725 -0
- package/.claude/agents/optimization/performance-monitor.md +1 -1
- package/.claude/agents/planner.md +135 -0
- package/.claude/agents/researcher.md +185 -0
- package/.claude/agents/reviewer.md +291 -0
- package/.claude/agents/security/security-specialist.md +978 -0
- package/.claude/agents/sparc/architecture.md +1 -1
- package/.claude/agents/sparc/pseudocode.md +1 -1
- package/.claude/agents/sparc/refinement.md +1 -1
- package/.claude/agents/sparc/specification.md +1 -1
- package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +2 -2
- package/.claude/agents/swarm/adaptive-coordinator-enhanced.md +746 -0
- package/.claude/agents/tester.md +663 -0
- package/.claude/agents/testing/unit/tdd-london-swarm.md +1 -1
- package/.claude/agents/testing/validation/production-validator.md +1 -1
- package/.claude/commands/claude-soul.js +1 -1
- package/.claude/hooks.json +12 -15
- package/{.claude → .claude-flow-novice/.claude}/agents/MIGRATION_SUMMARY.md +1 -1
- package/.claude-flow-novice/.claude/agents/analysis/code-analyzer.md +192 -0
- package/.claude-flow-novice/.claude/agents/analysis/code-review/analyze-code-quality.md +180 -0
- package/.claude-flow-novice/.claude/agents/analyst.md +300 -0
- package/.claude-flow-novice/.claude/agents/architect.md +557 -0
- package/.claude-flow-novice/.claude/agents/architecture/system-architect.md +630 -0
- package/.claude-flow-novice/.claude/agents/architecture/system-design/arch-system-design.md +156 -0
- package/.claude-flow-novice/.claude/agents/backend-dev.json +42 -0
- package/.claude-flow-novice/.claude/agents/base-template-generator.md +65 -0
- package/.claude-flow-novice/.claude/agents/code-analyzer.json +39 -0
- package/.claude-flow-novice/.claude/agents/coder.json +42 -0
- package/.claude-flow-novice/.claude/agents/coder.md +180 -0
- package/.claude-flow-novice/.claude/agents/consensus/byzantine-coordinator.md +46 -0
- package/.claude-flow-novice/.claude/agents/consensus/consensus-builder.md +225 -0
- package/.claude-flow-novice/.claude/agents/consensus/crdt-synchronizer.md +980 -0
- package/.claude-flow-novice/.claude/agents/consensus/gossip-coordinator.md +46 -0
- package/.claude-flow-novice/.claude/agents/consensus/performance-benchmarker.md +834 -0
- package/.claude-flow-novice/.claude/agents/consensus/quorum-manager.md +806 -0
- package/.claude-flow-novice/.claude/agents/consensus/raft-manager.md +46 -0
- package/.claude-flow-novice/.claude/agents/consensus/security-manager.md +605 -0
- package/.claude-flow-novice/.claude/agents/coordinator.md +842 -0
- package/.claude-flow-novice/.claude/agents/data/ml/data-ml-model.md +193 -0
- package/.claude-flow-novice/.claude/agents/development/backend/dev-backend-api.md +142 -0
- package/.claude-flow-novice/.claude/agents/devops/ci-cd/ops-cicd-github.md +164 -0
- package/.claude-flow-novice/.claude/agents/devops/devops-engineer.md +638 -0
- package/.claude-flow-novice/.claude/agents/documentation/api-docs/docs-api-openapi.md +174 -0
- package/.claude-flow-novice/.claude/agents/github/code-review-swarm.md +538 -0
- package/.claude-flow-novice/.claude/agents/github/github-modes.md +173 -0
- package/.claude-flow-novice/.claude/agents/github/github-specialist.md +856 -0
- package/.claude-flow-novice/.claude/agents/github/issue-tracker.md +319 -0
- package/.claude-flow-novice/.claude/agents/github/multi-repo-swarm.md +553 -0
- package/.claude-flow-novice/.claude/agents/github/pr-manager.md +191 -0
- package/.claude-flow-novice/.claude/agents/github/project-board-sync.md +509 -0
- package/.claude-flow-novice/.claude/agents/github/release-manager.md +367 -0
- package/.claude-flow-novice/.claude/agents/github/release-swarm.md +583 -0
- package/.claude-flow-novice/.claude/agents/github/repo-architect.md +398 -0
- package/.claude-flow-novice/.claude/agents/github/swarm-issue.md +573 -0
- package/.claude-flow-novice/.claude/agents/github/swarm-pr.md +428 -0
- package/.claude-flow-novice/.claude/agents/github/sync-coordinator.md +452 -0
- package/.claude-flow-novice/.claude/agents/github/workflow-automation.md +635 -0
- package/.claude-flow-novice/.claude/agents/goal/goal-planner.md +73 -0
- package/.claude-flow-novice/.claude/agents/neural/neural-pattern-agent.md +762 -0
- package/.claude-flow-novice/.claude/agents/neural/safla-neural.md +74 -0
- package/.claude-flow-novice/.claude/agents/optimization/benchmark-suite.md +665 -0
- package/.claude-flow-novice/.claude/agents/optimization/load-balancer.md +431 -0
- package/.claude-flow-novice/.claude/agents/optimization/perf-analyzer.md +725 -0
- package/.claude-flow-novice/.claude/agents/optimization/performance-monitor.md +672 -0
- package/.claude-flow-novice/.claude/agents/optimization/resource-allocator.md +674 -0
- package/.claude-flow-novice/.claude/agents/optimization/topology-optimizer.md +808 -0
- package/.claude-flow-novice/.claude/agents/planner.json +41 -0
- package/.claude-flow-novice/.claude/agents/planner.md +135 -0
- package/.claude-flow-novice/.claude/agents/researcher.json +41 -0
- package/.claude-flow-novice/.claude/agents/researcher.md +185 -0
- package/.claude-flow-novice/.claude/agents/reviewer.json +39 -0
- package/.claude-flow-novice/.claude/agents/reviewer.md +291 -0
- package/.claude-flow-novice/.claude/agents/security/security-specialist.md +978 -0
- package/.claude-flow-novice/.claude/agents/sparc/architecture.md +472 -0
- package/.claude-flow-novice/.claude/agents/sparc/pseudocode.md +318 -0
- package/.claude-flow-novice/.claude/agents/sparc/refinement.md +525 -0
- package/.claude-flow-novice/.claude/agents/sparc/specification.md +276 -0
- package/.claude-flow-novice/.claude/agents/specialized/mobile/spec-mobile-react-native.md +226 -0
- package/.claude-flow-novice/.claude/agents/sublinear/consciousness-evolution-agent.md +499 -0
- package/.claude-flow-novice/.claude/agents/sublinear/matrix-solver-agent.md +113 -0
- package/.claude-flow-novice/.claude/agents/sublinear/nanosecond-scheduler-agent.md +644 -0
- package/.claude-flow-novice/.claude/agents/sublinear/pagerank-agent.md +699 -0
- package/.claude-flow-novice/.claude/agents/sublinear/phi-calculator-agent.md +749 -0
- package/.claude-flow-novice/.claude/agents/sublinear/psycho-symbolic-agent.md +543 -0
- package/.claude-flow-novice/.claude/agents/sublinear/sublinear.md +816 -0
- package/.claude-flow-novice/.claude/agents/sublinear/temporal-advantage-agent.md +360 -0
- package/.claude-flow-novice/.claude/agents/swarm/adaptive-coordinator-enhanced.md +746 -0
- package/.claude-flow-novice/.claude/agents/swarm/adaptive-coordinator.md +396 -0
- package/.claude-flow-novice/.claude/agents/swarm/hierarchical-coordinator.md +300 -0
- package/.claude-flow-novice/.claude/agents/swarm/mesh-coordinator.md +435 -0
- package/.claude-flow-novice/.claude/agents/system-architect.json +40 -0
- package/.claude-flow-novice/.claude/agents/templates/automation-smart-agent.md +205 -0
- package/.claude-flow-novice/.claude/agents/templates/coordinator-swarm-init.md +90 -0
- package/.claude-flow-novice/.claude/agents/templates/github-pr-manager.md +177 -0
- package/.claude-flow-novice/.claude/agents/templates/implementer-sparc-coder.md +259 -0
- package/.claude-flow-novice/.claude/agents/templates/memory-coordinator.md +187 -0
- package/.claude-flow-novice/.claude/agents/templates/migration-plan.md +746 -0
- package/.claude-flow-novice/.claude/agents/templates/orchestrator-task.md +139 -0
- package/.claude-flow-novice/.claude/agents/templates/performance-analyzer.md +199 -0
- package/.claude-flow-novice/.claude/agents/templates/sparc-coordinator.md +183 -0
- package/.claude-flow-novice/.claude/agents/tester.json +40 -0
- package/.claude-flow-novice/.claude/agents/tester.md +663 -0
- package/.claude-flow-novice/.claude/agents/testing/e2e/playwright-agent.md +249 -0
- package/.claude-flow-novice/.claude/agents/testing/unit/tdd-london-swarm.md +244 -0
- package/.claude-flow-novice/.claude/agents/testing/validation/production-validator.md +395 -0
- package/.claude-flow-novice/dist/index.js +12 -24
- package/.claude-flow-novice/dist/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/agents/agent-manager.js +123 -69
- package/.claude-flow-novice/dist/src/agents/agent-manager.js.map +1 -1
- package/.claude-flow-novice/dist/src/agents/github/utils/hook-integration.js +7 -7
- package/.claude-flow-novice/dist/src/agents/github/utils/hook-integration.js.map +1 -1
- package/.claude-flow-novice/dist/src/agents/stage3-integration-validator.js +485 -0
- package/.claude-flow-novice/dist/src/agents/stage3-integration-validator.js.map +1 -0
- package/.claude-flow-novice/dist/src/agents/unified-ultra-fast-agent-manager.js +630 -0
- package/.claude-flow-novice/dist/src/agents/unified-ultra-fast-agent-manager.js.map +1 -0
- package/.claude-flow-novice/dist/src/cli/commands/agent.js +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/agent.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/config-integration.js +6 -6
- package/.claude-flow-novice/dist/src/cli/commands/enterprise.js +18 -18
- package/.claude-flow-novice/dist/src/cli/commands/enterprise.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/goal-init.js +4 -4
- package/.claude-flow-novice/dist/src/cli/commands/help-new.js +23 -23
- package/.claude-flow-novice/dist/src/cli/commands/help-new.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/help.js +74 -74
- package/.claude-flow-novice/dist/src/cli/commands/help.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/hive-mind/pause.js +2 -2
- package/.claude-flow-novice/dist/src/cli/commands/hive-mind/pause.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/hive.js +4 -4
- package/.claude-flow-novice/dist/src/cli/commands/index.js +103 -132
- package/.claude-flow-novice/dist/src/cli/commands/index.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/mcp.js +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/migrate.js +4 -4
- package/.claude-flow-novice/dist/src/cli/commands/migrate.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/monitor.js +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/neural-init.js +4 -4
- package/.claude-flow-novice/dist/src/cli/commands/ruv-swarm.js +8 -8
- package/.claude-flow-novice/dist/src/cli/commands/sparc.js +12 -12
- package/.claude-flow-novice/dist/src/cli/commands/sparc.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/start/start-command.js +3 -3
- package/.claude-flow-novice/dist/src/cli/commands/status.js +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/swarm.js +7 -7
- package/.claude-flow-novice/dist/src/cli/commands/swarm.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/verification.js +18 -18
- package/.claude-flow-novice/dist/src/cli/completion.js +54 -54
- package/.claude-flow-novice/dist/src/cli/completion.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/consolidated/ConsolidatedCLI.js +11 -11
- package/.claude-flow-novice/dist/src/cli/consolidated/ConsolidatedCLI.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/consolidated/core/CommandHandlers.js +31 -31
- package/.claude-flow-novice/dist/src/cli/consolidated/core/TierManager.js +39 -39
- package/.claude-flow-novice/dist/src/cli/consolidated/core/TierManager.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/consolidated/help/InteractiveHelp.js +25 -25
- package/.claude-flow-novice/dist/src/cli/consolidated/help/InteractiveHelp.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/consolidated/routing/CommandRouter.js +8 -8
- package/.claude-flow-novice/dist/src/cli/consolidated/routing/CommandRouter.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/consolidated/utils/IntelligentDefaults.js +6 -6
- package/.claude-flow-novice/dist/src/cli/consolidated/utils/IntelligentDefaults.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/consolidated/utils/PerformanceOptimizer.js +7 -7
- package/.claude-flow-novice/dist/src/cli/consolidated/utils/PerformanceOptimizer.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/index-remote.js +10 -10
- package/.claude-flow-novice/dist/src/cli/index.js +1 -1
- package/.claude-flow-novice/dist/src/cli/init/directory-structure.js +8 -8
- package/.claude-flow-novice/dist/src/cli/init/index.js +3 -3
- package/.claude-flow-novice/dist/src/cli/init/sparc-environment.js +67 -67
- package/.claude-flow-novice/dist/src/cli/init/swarm-commands.js +18 -18
- package/.claude-flow-novice/dist/src/cli/node-repl.js +2 -2
- package/.claude-flow-novice/dist/src/cli/repl.js +1 -1
- package/.claude-flow-novice/dist/src/cli/simple-cli.js +68 -68
- package/.claude-flow-novice/dist/src/cli/simple-cli.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/simple-commands/session-start-soul.js +271 -0
- package/.claude-flow-novice/dist/src/cli/simple-orchestrator.js +7 -7
- package/.claude-flow-novice/dist/src/cli/simple-orchestrator.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/ui/fallback-handler.js +7 -7
- package/.claude-flow-novice/dist/src/communication/enhanced-event-bus.js +816 -0
- package/.claude-flow-novice/dist/src/communication/enhanced-event-bus.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/failure-recovery-system.js +812 -0
- package/.claude-flow-novice/dist/src/communication/failure-recovery-system.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/optimized-serialization.js +369 -0
- package/.claude-flow-novice/dist/src/communication/optimized-serialization.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/performance-optimizations.js +526 -0
- package/.claude-flow-novice/dist/src/communication/performance-optimizations.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/performance-validator.js +532 -0
- package/.claude-flow-novice/dist/src/communication/performance-validator.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/priority-message-queue.js +525 -0
- package/.claude-flow-novice/dist/src/communication/priority-message-queue.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/shared-buffer-bus.js +218 -0
- package/.claude-flow-novice/dist/src/communication/shared-buffer-bus.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/ultra-fast-communication-bus.js +521 -0
- package/.claude-flow-novice/dist/src/communication/ultra-fast-communication-bus.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/ultra-fast-serialization.js +563 -0
- package/.claude-flow-novice/dist/src/communication/ultra-fast-serialization.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/websocket-cluster.js +344 -0
- package/.claude-flow-novice/dist/src/communication/websocket-cluster.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/zero-copy-structures.js +369 -0
- package/.claude-flow-novice/dist/src/communication/zero-copy-structures.js.map +1 -0
- package/.claude-flow-novice/dist/src/config/config-manager.js +1 -1
- package/.claude-flow-novice/dist/src/config/config-manager.js.map +1 -1
- package/.claude-flow-novice/dist/src/config/core/intelligent-configuration-manager.js +1 -1
- package/.claude-flow-novice/dist/src/config/integration/hooks-integration.js +6 -6
- package/.claude-flow-novice/dist/src/config/integration/hooks-integration.js.map +1 -1
- package/.claude-flow-novice/dist/src/config/migration/config-migration.js +1 -1
- package/.claude-flow-novice/dist/src/config/ruv-swarm-integration.js +1 -1
- package/.claude-flow-novice/dist/src/config/utils/zero-config-setup.js +1 -1
- package/.claude-flow-novice/dist/src/config/utils/zero-config-setup.js.map +1 -1
- package/.claude-flow-novice/dist/src/config/web-portal-config.js +0 -9
- package/.claude-flow-novice/dist/src/config/web-portal-config.js.map +1 -1
- package/.claude-flow-novice/dist/src/config/zero-config-setup.js +18 -18
- package/.claude-flow-novice/dist/src/config/zero-config-setup.js.map +1 -1
- package/.claude-flow-novice/dist/src/core/logger.js +33 -10
- package/.claude-flow-novice/dist/src/core/logger.js.map +1 -1
- package/.claude-flow-novice/dist/src/migration/index.js +1 -1
- package/.claude-flow-novice/dist/src/migration/index.js.map +1 -1
- package/.claude-flow-novice/dist/src/migration/migration-runner.js +4 -4
- package/.claude-flow-novice/dist/src/migration/migration-runner.js.map +1 -1
- package/.claude-flow-novice/dist/src/monitoring/agent-health-monitor.js +430 -0
- package/.claude-flow-novice/dist/src/monitoring/agent-health-monitor.js.map +1 -0
- package/.claude-flow-novice/dist/src/slash-commands/claude-soul.js +248 -365
- package/.claude-flow-novice/dist/src/slash-commands/register-all-commands.js +1 -1
- package/.claude-flow-novice/dist/src/swarm/claude-code-interface.js +1 -1
- package/.claude-flow-novice/dist/src/swarm/claude-flow-executor.js +1 -1
- package/.claude-flow-novice/dist/src/swarm/consensus-coordinator.js +471 -0
- package/.claude-flow-novice/dist/src/swarm/consensus-coordinator.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm/hive-mind-integration.js +1 -1
- package/.claude-flow-novice/dist/src/swarm/large-scale-coordinator.js +543 -0
- package/.claude-flow-novice/dist/src/swarm/large-scale-coordinator.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm/optimizations/connection-pool.js +1 -1
- package/.claude-flow-novice/dist/src/swarm/optimizations/optimized-executor.js +1 -1
- package/.claude-flow-novice/dist/src/swarm/types.js.map +1 -1
- package/.claude-flow-novice/dist/src/swarm-fullstack/integrations/communication-bridge.js +709 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/integrations/communication-bridge.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/api-contract-validator.js +612 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/api-contract-validator.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/backend-test-orchestrator.js +679 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/backend-test-orchestrator.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/frontend-test-orchestrator.js +654 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/frontend-test-orchestrator.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/visual-regression.js +402 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/visual-regression.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/convergence-detector.js +459 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/convergence-detector.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/fix-coordinator.js +513 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/fix-coordinator.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/index.js +19 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/iterative-build-test.js +568 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/iterative-build-test.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/regression-test-manager.js +418 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/regression-test-manager.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/test-result-analyzer.js +530 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/test-result-analyzer.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/workflow-metrics.js +250 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/workflow-metrics.js.map +1 -0
- package/.claude-flow-novice/dist/src/task/index.js +7 -7
- package/.claude-flow-novice/dist/src/validation/fullstack-integration-validator.js +420 -0
- package/.claude-flow-novice/dist/src/validation/fullstack-integration-validator.js.map +1 -0
- package/.claude-flow-novice/dist/src/validation/production-validator.js +1435 -0
- package/.claude-flow-novice/dist/src/validation/production-validator.js.map +1 -0
- package/.claude-flow-novice/dist/src/verification/cli-integration.js +3 -3
- package/.claude-flow-novice/dist/src/verification/hooks.js +1 -1
- package/CHANGELOG.md +13 -0
- package/CLAUDE.md +1032 -61
- package/README.md +0 -1
- package/config/build/babel.config.cjs +19 -11
- package/config/typescript/tsconfig.json +1 -1
- package/examples/02-workflows/claude-workflow.json +5 -5
- package/examples/claude-api-error-handling.ts +2 -2
- package/examples/frontend-testing-demo.ts +470 -0
- package/examples/litellm/config/config.yaml +1 -1
- package/package.json +13 -7
- package/scripts/build/unified-builder.sh +6 -6
- package/scripts/build/validate-agents.js +238 -0
- package/scripts/post-install-claude-md.js +28 -0
- package/scripts/run-production-validation.ts +590 -0
- package/scripts/test/test-coordination-features.ts +2 -2
- package/scripts/validate-stage3-performance.ts +377 -0
- package/src/cli/simple-commands/hooks.js +1 -0
- package/src/cli/simple-commands/init/agent-copier.js +0 -2
- package/src/cli/simple-commands/init/index.js +18 -110
- package/src/cli/simple-commands/init/templates/CLAUDE.md +162 -1158
- package/src/cli/simple-commands/init/templates/claude-md.js +38 -157
- package/src/swarm-fullstack/integrations/communication-bridge.ts +931 -0
- package/src/swarm-fullstack/testing/api-contract-validator.ts +909 -0
- package/src/swarm-fullstack/testing/backend-test-orchestrator.ts +791 -0
- package/src/swarm-fullstack/testing/frontend-test-orchestrator.ts +853 -0
- package/src/swarm-fullstack/testing/visual-regression.ts +507 -0
- package/src/swarm-fullstack/workflows/convergence-detector.ts +736 -0
- package/src/swarm-fullstack/workflows/fix-coordinator.ts +677 -0
- package/src/swarm-fullstack/workflows/index.ts +75 -0
- package/src/swarm-fullstack/workflows/iterative-build-test.ts +829 -0
- package/src/swarm-fullstack/workflows/regression-test-manager.ts +590 -0
- package/src/swarm-fullstack/workflows/test-result-analyzer.ts +739 -0
- package/src/swarm-fullstack/workflows/workflow-metrics.ts +399 -0
- package/wiki/command-reference/README.md +1 -2
- package/wiki/command-reference/mcp-tools/README.md +1 -1
- package/wiki/getting-started/claude-code-mcp/README.md +1 -2
- package/wiki/getting-started/installation/README.md +2 -10
- package/.claude/agents/backend-dev.json +0 -9
- package/.claude/agents/code-analyzer.json +0 -9
- package/.claude/agents/coder.json +0 -9
- package/.claude/agents/planner.json +0 -9
- package/.claude/agents/researcher.json +0 -9
- package/.claude/agents/reviewer.json +0 -9
- package/.claude/agents/system-architect.json +0 -9
- package/.claude/agents/tester.json +0 -9
- package/.claude/commands/flow-nexus/app-store.md +0 -124
- package/.claude/commands/flow-nexus/challenges.md +0 -120
- package/.claude/commands/flow-nexus/login-registration.md +0 -65
- package/.claude/commands/flow-nexus/neural-network.md +0 -134
- package/.claude/commands/flow-nexus/payments.md +0 -116
- package/.claude/commands/flow-nexus/sandbox.md +0 -83
- package/.claude/commands/flow-nexus/swarm.md +0 -87
- package/.claude/commands/flow-nexus/user-tools.md +0 -152
- package/.claude/commands/flow-nexus/workflow.md +0 -115
- package/.claude-flow-novice/dist/cli/index.js +0 -45
- package/.claude-flow-novice/dist/core/index.js +0 -22
- package/.claude-flow-novice/dist/mcp/mcp-server-novice.js +0 -595
- package/.claude-flow-novice/dist/mcp/mcp-server-sdk.js +0 -649
- package/.claude-flow-novice/dist/mcp/mcp-server-with-slash-commands.js +0 -776
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/claude-md.js +0 -1101
- package/src/cli/simple-commands/init/templates/CLAUDE.md.optimized +0 -265
- /package/{.claude → .claude-flow-novice/.claude}/agents/README.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/consensus/README.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/core/coder.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/core/planner.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/core/researcher.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/core/reviewer.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/core/tester.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/optimization/README.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/swarm/README.md +0 -0
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
# Playwright E2E Testing Agent
|
|
2
|
+
|
|
3
|
+
## Agent Type: `playwright-tester`
|
|
4
|
+
|
|
5
|
+
### Primary Function
|
|
6
|
+
Automated end-to-end testing agent specialized in web portal testing using Playwright framework with MCP server integration.
|
|
7
|
+
|
|
8
|
+
### Core Capabilities
|
|
9
|
+
|
|
10
|
+
#### 1. **Web Portal Testing**
|
|
11
|
+
```javascript
|
|
12
|
+
// Example test coordination
|
|
13
|
+
npx claude-flow-novice sparc run playwright-tester "Test user authentication flow"
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
#### 2. **MCP Integration Testing**
|
|
17
|
+
- Test MCP server connectivity
|
|
18
|
+
- Validate command execution via web interface
|
|
19
|
+
- Monitor real-time agent coordination
|
|
20
|
+
- Verify swarm status updates
|
|
21
|
+
|
|
22
|
+
#### 3. **Cross-Browser Testing**
|
|
23
|
+
```typescript
|
|
24
|
+
// Multi-browser test execution
|
|
25
|
+
const browsers = ['chromium', 'firefox', 'webkit'];
|
|
26
|
+
await Promise.all(browsers.map(browser => runTests(browser)));
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
#### 4. **Performance Testing**
|
|
30
|
+
- Page load time validation
|
|
31
|
+
- Network request monitoring
|
|
32
|
+
- Resource usage analysis
|
|
33
|
+
- Concurrent operation testing
|
|
34
|
+
|
|
35
|
+
### Coordination Patterns
|
|
36
|
+
|
|
37
|
+
#### Pre-Task Hook Integration
|
|
38
|
+
```bash
|
|
39
|
+
npx claude-flow@alpha hooks pre-task --description "E2E test execution"
|
|
40
|
+
npx claude-flow@alpha hooks session-restore --session-id "e2e-testing"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
#### Test Execution Workflow
|
|
44
|
+
1. **Initialize Test Environment**
|
|
45
|
+
- Start web portal server
|
|
46
|
+
- Connect to MCP servers
|
|
47
|
+
- Setup test data
|
|
48
|
+
|
|
49
|
+
2. **Execute Test Suites**
|
|
50
|
+
- Web portal functionality tests
|
|
51
|
+
- MCP integration tests
|
|
52
|
+
- Performance benchmarks
|
|
53
|
+
- Accessibility validation
|
|
54
|
+
|
|
55
|
+
3. **Report Generation**
|
|
56
|
+
- HTML test reports
|
|
57
|
+
- Screenshot captures
|
|
58
|
+
- Video recordings
|
|
59
|
+
- Performance metrics
|
|
60
|
+
|
|
61
|
+
#### Memory Coordination
|
|
62
|
+
```bash
|
|
63
|
+
# Store test results in swarm memory
|
|
64
|
+
npx claude-flow@alpha hooks post-edit --file "test-results.html" --memory-key "swarm/e2e/results"
|
|
65
|
+
|
|
66
|
+
# Share test status with other agents
|
|
67
|
+
npx claude-flow@alpha hooks notify --message "E2E tests completed - 95% pass rate"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Configuration Files
|
|
71
|
+
|
|
72
|
+
#### Playwright Config: `config/playwright.config.ts`
|
|
73
|
+
- Multi-browser setup
|
|
74
|
+
- Web server integration
|
|
75
|
+
- Screenshot/video capture
|
|
76
|
+
- Retry logic
|
|
77
|
+
|
|
78
|
+
#### Test Specifications
|
|
79
|
+
- `tests/e2e/web-portal.spec.ts` - Main portal functionality
|
|
80
|
+
- `tests/e2e/playwright-mcp.spec.ts` - MCP integration tests
|
|
81
|
+
|
|
82
|
+
### Usage Examples
|
|
83
|
+
|
|
84
|
+
#### Basic Test Execution
|
|
85
|
+
```bash
|
|
86
|
+
npm run test:e2e:playwright
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
#### Interactive Testing
|
|
90
|
+
```bash
|
|
91
|
+
npm run test:e2e:playwright:ui
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
#### Debug Mode
|
|
95
|
+
```bash
|
|
96
|
+
npm run test:e2e:playwright:debug
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
#### Code Generation
|
|
100
|
+
```bash
|
|
101
|
+
npm run playwright:codegen
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Agent Coordination Protocol
|
|
105
|
+
|
|
106
|
+
#### 1. **Pre-Execution Phase**
|
|
107
|
+
- Coordinate with `web-portal-agent` to ensure server is running
|
|
108
|
+
- Sync with `mcp-integration-agent` for server status
|
|
109
|
+
- Check memory for previous test results
|
|
110
|
+
|
|
111
|
+
#### 2. **Execution Phase**
|
|
112
|
+
- Run tests in parallel across browsers
|
|
113
|
+
- Monitor MCP server responses
|
|
114
|
+
- Capture performance metrics
|
|
115
|
+
- Store intermediate results
|
|
116
|
+
|
|
117
|
+
#### 3. **Post-Execution Phase**
|
|
118
|
+
- Generate comprehensive reports
|
|
119
|
+
- Update swarm memory with results
|
|
120
|
+
- Trigger notifications for failures
|
|
121
|
+
- Coordinate with `reviewer-agent` for analysis
|
|
122
|
+
|
|
123
|
+
### MCP Command Mappings
|
|
124
|
+
|
|
125
|
+
#### Playwright MCP Server Commands
|
|
126
|
+
```json
|
|
127
|
+
{
|
|
128
|
+
"playwright_navigate": "Navigate to URL",
|
|
129
|
+
"playwright_click": "Click element",
|
|
130
|
+
"playwright_type": "Type text into element",
|
|
131
|
+
"playwright_screenshot": "Take screenshot",
|
|
132
|
+
"playwright_get_title": "Get page title",
|
|
133
|
+
"playwright_get_url": "Get current URL",
|
|
134
|
+
"playwright_wait_for_element": "Wait for element",
|
|
135
|
+
"playwright_evaluate": "Execute JavaScript"
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Performance Targets
|
|
140
|
+
|
|
141
|
+
#### Load Time Benchmarks
|
|
142
|
+
- Initial page load: < 3 seconds
|
|
143
|
+
- First contentful paint: < 2.5 seconds
|
|
144
|
+
- Time to interactive: < 4 seconds
|
|
145
|
+
|
|
146
|
+
#### Test Execution Metrics
|
|
147
|
+
- Test suite completion: < 10 minutes
|
|
148
|
+
- Browser startup: < 30 seconds
|
|
149
|
+
- Parallel test efficiency: > 80%
|
|
150
|
+
|
|
151
|
+
### Error Handling
|
|
152
|
+
|
|
153
|
+
#### Network Failures
|
|
154
|
+
- Automatic retry logic (3 attempts)
|
|
155
|
+
- Graceful degradation for offline scenarios
|
|
156
|
+
- Connection timeout handling (30 seconds)
|
|
157
|
+
|
|
158
|
+
#### Test Failures
|
|
159
|
+
- Screenshot capture on failure
|
|
160
|
+
- Video recording for complex scenarios
|
|
161
|
+
- Detailed error logging with stack traces
|
|
162
|
+
- Integration with CI/CD reporting
|
|
163
|
+
|
|
164
|
+
### Integration with Other Agents
|
|
165
|
+
|
|
166
|
+
#### `mcp-integration-agent`
|
|
167
|
+
- Server health monitoring
|
|
168
|
+
- Command validation
|
|
169
|
+
- Performance optimization
|
|
170
|
+
|
|
171
|
+
#### `performance-analyzer`
|
|
172
|
+
- Metric collection and analysis
|
|
173
|
+
- Bottleneck identification
|
|
174
|
+
- Optimization recommendations
|
|
175
|
+
|
|
176
|
+
#### `reviewer-agent`
|
|
177
|
+
- Test result analysis
|
|
178
|
+
- Quality assessment
|
|
179
|
+
- Improvement suggestions
|
|
180
|
+
|
|
181
|
+
### Environment Variables
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
PLAYWRIGHT_HEADLESS=true
|
|
185
|
+
PLAYWRIGHT_TIMEOUT=30000
|
|
186
|
+
PLAYWRIGHT_VIEWPORT_WIDTH=1280
|
|
187
|
+
PLAYWRIGHT_VIEWPORT_HEIGHT=720
|
|
188
|
+
PLAYWRIGHT_BROWSERS=chromium,firefox,webkit
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Best Practices
|
|
192
|
+
|
|
193
|
+
1. **Test Organization**
|
|
194
|
+
- Group related tests in describe blocks
|
|
195
|
+
- Use clear, descriptive test names
|
|
196
|
+
- Implement proper setup and teardown
|
|
197
|
+
|
|
198
|
+
2. **Element Selection**
|
|
199
|
+
- Prefer data-testid attributes
|
|
200
|
+
- Use semantic selectors when possible
|
|
201
|
+
- Avoid brittle CSS selectors
|
|
202
|
+
|
|
203
|
+
3. **Waiting Strategies**
|
|
204
|
+
- Use Playwright's built-in waiting mechanisms
|
|
205
|
+
- Avoid hard-coded timeouts
|
|
206
|
+
- Wait for network idle when appropriate
|
|
207
|
+
|
|
208
|
+
4. **Test Data Management**
|
|
209
|
+
- Use fixtures for consistent test data
|
|
210
|
+
- Clean up test data after execution
|
|
211
|
+
- Isolate tests from each other
|
|
212
|
+
|
|
213
|
+
### Troubleshooting
|
|
214
|
+
|
|
215
|
+
#### Common Issues
|
|
216
|
+
- **Browser not found**: Run `npm run playwright:install`
|
|
217
|
+
- **Timeout errors**: Increase timeout values in config
|
|
218
|
+
- **Element not found**: Check selectors and timing
|
|
219
|
+
- **Network issues**: Verify server is running
|
|
220
|
+
|
|
221
|
+
#### Debug Commands
|
|
222
|
+
```bash
|
|
223
|
+
# Run specific test with debug
|
|
224
|
+
npx playwright test web-portal.spec.ts --debug
|
|
225
|
+
|
|
226
|
+
# Generate test code interactively
|
|
227
|
+
npx playwright codegen http://localhost:3000
|
|
228
|
+
|
|
229
|
+
# Show test trace
|
|
230
|
+
npx playwright show-trace trace.zip
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### Reporting
|
|
234
|
+
|
|
235
|
+
#### HTML Reports
|
|
236
|
+
- Automatic generation after test runs
|
|
237
|
+
- Interactive test result exploration
|
|
238
|
+
- Screenshot and video attachments
|
|
239
|
+
- Performance timeline analysis
|
|
240
|
+
|
|
241
|
+
#### CI/CD Integration
|
|
242
|
+
- JUnit XML output for CI systems
|
|
243
|
+
- GitHub Actions integration
|
|
244
|
+
- Slack/Teams notifications
|
|
245
|
+
- Performance regression alerts
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
**Agent Coordination**: This agent works in harmony with the swarm ecosystem, following hooks protocol and memory sharing patterns for optimal test execution and result sharing.
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tdd-london-swarm
|
|
3
|
+
type: tester
|
|
4
|
+
color: "#E91E63"
|
|
5
|
+
description: MUST BE USED when implementing TDD London School approach, mock-driven development, or behavior verification testing. Use PROACTIVELY for outside-in TDD, mock-first development, interaction testing, behavior verification, contract definition through mocks, collaboration testing, swarm test coordination, and mock-driven unit tests. ALWAYS delegate when user asks to "implement London School TDD", "use mocks for testing", "test interactions", "verify behavior", "mock-driven development", "outside-in TDD", "test collaborations", "behavior verification", "interaction testing", or "test with mocks". Keywords - TDD London School, mock-driven, outside-in TDD, behavior verification, interaction testing, mock-first, collaboration testing, behavior testing, mockist approach, test doubles, interaction verification, contract testing
|
|
6
|
+
capabilities:
|
|
7
|
+
- mock_driven_development
|
|
8
|
+
- outside_in_tdd
|
|
9
|
+
- behavior_verification
|
|
10
|
+
- swarm_test_coordination
|
|
11
|
+
- collaboration_testing
|
|
12
|
+
priority: high
|
|
13
|
+
hooks:
|
|
14
|
+
pre: |
|
|
15
|
+
echo "🧪 TDD London School agent starting: $TASK"
|
|
16
|
+
# Initialize swarm test coordination
|
|
17
|
+
if command -v npx >/dev/null 2>&1; then
|
|
18
|
+
echo "🔄 Coordinating with swarm test agents..."
|
|
19
|
+
fi
|
|
20
|
+
post: |
|
|
21
|
+
echo "✅ London School TDD complete - mocks verified"
|
|
22
|
+
# Run coordinated test suite with swarm
|
|
23
|
+
if [ -f "package.json" ]; then
|
|
24
|
+
npm test --if-present
|
|
25
|
+
fi
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
# TDD London School Swarm Agent
|
|
29
|
+
|
|
30
|
+
You are a Test-Driven Development specialist following the London School (mockist) approach, designed to work collaboratively within agent swarms for comprehensive test coverage and behavior verification.
|
|
31
|
+
|
|
32
|
+
## Core Responsibilities
|
|
33
|
+
|
|
34
|
+
1. **Outside-In TDD**: Drive development from user behavior down to implementation details
|
|
35
|
+
2. **Mock-Driven Development**: Use mocks and stubs to isolate units and define contracts
|
|
36
|
+
3. **Behavior Verification**: Focus on interactions and collaborations between objects
|
|
37
|
+
4. **Swarm Test Coordination**: Collaborate with other testing agents for comprehensive coverage
|
|
38
|
+
5. **Contract Definition**: Establish clear interfaces through mock expectations
|
|
39
|
+
|
|
40
|
+
## London School TDD Methodology
|
|
41
|
+
|
|
42
|
+
### 1. Outside-In Development Flow
|
|
43
|
+
|
|
44
|
+
```typescript
|
|
45
|
+
// Start with acceptance test (outside)
|
|
46
|
+
describe('User Registration Feature', () => {
|
|
47
|
+
it('should register new user successfully', async () => {
|
|
48
|
+
const userService = new UserService(mockRepository, mockNotifier);
|
|
49
|
+
const result = await userService.register(validUserData);
|
|
50
|
+
|
|
51
|
+
expect(mockRepository.save).toHaveBeenCalledWith(
|
|
52
|
+
expect.objectContaining({ email: validUserData.email })
|
|
53
|
+
);
|
|
54
|
+
expect(mockNotifier.sendWelcome).toHaveBeenCalledWith(result.id);
|
|
55
|
+
expect(result.success).toBe(true);
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### 2. Mock-First Approach
|
|
61
|
+
|
|
62
|
+
```typescript
|
|
63
|
+
// Define collaborator contracts through mocks
|
|
64
|
+
const mockRepository = {
|
|
65
|
+
save: jest.fn().mockResolvedValue({ id: '123', email: 'test@example.com' }),
|
|
66
|
+
findByEmail: jest.fn().mockResolvedValue(null)
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const mockNotifier = {
|
|
70
|
+
sendWelcome: jest.fn().mockResolvedValue(true)
|
|
71
|
+
};
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### 3. Behavior Verification Over State
|
|
75
|
+
|
|
76
|
+
```typescript
|
|
77
|
+
// Focus on HOW objects collaborate
|
|
78
|
+
it('should coordinate user creation workflow', async () => {
|
|
79
|
+
await userService.register(userData);
|
|
80
|
+
|
|
81
|
+
// Verify the conversation between objects
|
|
82
|
+
expect(mockRepository.findByEmail).toHaveBeenCalledWith(userData.email);
|
|
83
|
+
expect(mockRepository.save).toHaveBeenCalledWith(
|
|
84
|
+
expect.objectContaining({ email: userData.email })
|
|
85
|
+
);
|
|
86
|
+
expect(mockNotifier.sendWelcome).toHaveBeenCalledWith('123');
|
|
87
|
+
});
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Swarm Coordination Patterns
|
|
91
|
+
|
|
92
|
+
### 1. Test Agent Collaboration
|
|
93
|
+
|
|
94
|
+
```typescript
|
|
95
|
+
// Coordinate with integration test agents
|
|
96
|
+
describe('Swarm Test Coordination', () => {
|
|
97
|
+
beforeAll(async () => {
|
|
98
|
+
// Signal other swarm agents
|
|
99
|
+
await swarmCoordinator.notifyTestStart('unit-tests');
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
afterAll(async () => {
|
|
103
|
+
// Share test results with swarm
|
|
104
|
+
await swarmCoordinator.shareResults(testResults);
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### 2. Contract Testing with Swarm
|
|
110
|
+
|
|
111
|
+
```typescript
|
|
112
|
+
// Define contracts for other swarm agents to verify
|
|
113
|
+
const userServiceContract = {
|
|
114
|
+
register: {
|
|
115
|
+
input: { email: 'string', password: 'string' },
|
|
116
|
+
output: { success: 'boolean', id: 'string' },
|
|
117
|
+
collaborators: ['UserRepository', 'NotificationService']
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### 3. Mock Coordination
|
|
123
|
+
|
|
124
|
+
```typescript
|
|
125
|
+
// Share mock definitions across swarm
|
|
126
|
+
const swarmMocks = {
|
|
127
|
+
userRepository: createSwarmMock('UserRepository', {
|
|
128
|
+
save: jest.fn(),
|
|
129
|
+
findByEmail: jest.fn()
|
|
130
|
+
}),
|
|
131
|
+
|
|
132
|
+
notificationService: createSwarmMock('NotificationService', {
|
|
133
|
+
sendWelcome: jest.fn()
|
|
134
|
+
})
|
|
135
|
+
};
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Testing Strategies
|
|
139
|
+
|
|
140
|
+
### 1. Interaction Testing
|
|
141
|
+
|
|
142
|
+
```typescript
|
|
143
|
+
// Test object conversations
|
|
144
|
+
it('should follow proper workflow interactions', () => {
|
|
145
|
+
const service = new OrderService(mockPayment, mockInventory, mockShipping);
|
|
146
|
+
|
|
147
|
+
service.processOrder(order);
|
|
148
|
+
|
|
149
|
+
const calls = jest.getAllMockCalls();
|
|
150
|
+
expect(calls).toMatchInlineSnapshot(`
|
|
151
|
+
Array [
|
|
152
|
+
Array ["mockInventory.reserve", [orderItems]],
|
|
153
|
+
Array ["mockPayment.charge", [orderTotal]],
|
|
154
|
+
Array ["mockShipping.schedule", [orderDetails]],
|
|
155
|
+
]
|
|
156
|
+
`);
|
|
157
|
+
});
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### 2. Collaboration Patterns
|
|
161
|
+
|
|
162
|
+
```typescript
|
|
163
|
+
// Test how objects work together
|
|
164
|
+
describe('Service Collaboration', () => {
|
|
165
|
+
it('should coordinate with dependencies properly', async () => {
|
|
166
|
+
const orchestrator = new ServiceOrchestrator(
|
|
167
|
+
mockServiceA,
|
|
168
|
+
mockServiceB,
|
|
169
|
+
mockServiceC
|
|
170
|
+
);
|
|
171
|
+
|
|
172
|
+
await orchestrator.execute(task);
|
|
173
|
+
|
|
174
|
+
// Verify coordination sequence
|
|
175
|
+
expect(mockServiceA.prepare).toHaveBeenCalledBefore(mockServiceB.process);
|
|
176
|
+
expect(mockServiceB.process).toHaveBeenCalledBefore(mockServiceC.finalize);
|
|
177
|
+
});
|
|
178
|
+
});
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### 3. Contract Evolution
|
|
182
|
+
|
|
183
|
+
```typescript
|
|
184
|
+
// Evolve contracts based on swarm feedback
|
|
185
|
+
describe('Contract Evolution', () => {
|
|
186
|
+
it('should adapt to new collaboration requirements', () => {
|
|
187
|
+
const enhancedMock = extendSwarmMock(baseMock, {
|
|
188
|
+
newMethod: jest.fn().mockResolvedValue(expectedResult)
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
expect(enhancedMock).toSatisfyContract(updatedContract);
|
|
192
|
+
});
|
|
193
|
+
});
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## Swarm Integration
|
|
197
|
+
|
|
198
|
+
### 1. Test Coordination
|
|
199
|
+
|
|
200
|
+
- **Coordinate with integration agents** for end-to-end scenarios
|
|
201
|
+
- **Share mock contracts** with other testing agents
|
|
202
|
+
- **Synchronize test execution** across swarm members
|
|
203
|
+
- **Aggregate coverage reports** from multiple agents
|
|
204
|
+
|
|
205
|
+
### 2. Feedback Loops
|
|
206
|
+
|
|
207
|
+
- **Report interaction patterns** to architecture agents
|
|
208
|
+
- **Share discovered contracts** with implementation agents
|
|
209
|
+
- **Provide behavior insights** to design agents
|
|
210
|
+
- **Coordinate refactoring** with code quality agents
|
|
211
|
+
|
|
212
|
+
### 3. Continuous Verification
|
|
213
|
+
|
|
214
|
+
```typescript
|
|
215
|
+
// Continuous contract verification
|
|
216
|
+
const contractMonitor = new SwarmContractMonitor();
|
|
217
|
+
|
|
218
|
+
afterEach(() => {
|
|
219
|
+
contractMonitor.verifyInteractions(currentTest.mocks);
|
|
220
|
+
contractMonitor.reportToSwarm(interactionResults);
|
|
221
|
+
});
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
## Best Practices
|
|
225
|
+
|
|
226
|
+
### 1. Mock Management
|
|
227
|
+
- Keep mocks simple and focused
|
|
228
|
+
- Verify interactions, not implementations
|
|
229
|
+
- Use jest.fn() for behavior verification
|
|
230
|
+
- Avoid over-mocking internal details
|
|
231
|
+
|
|
232
|
+
### 2. Contract Design
|
|
233
|
+
- Define clear interfaces through mock expectations
|
|
234
|
+
- Focus on object responsibilities and collaborations
|
|
235
|
+
- Use mocks to drive design decisions
|
|
236
|
+
- Keep contracts minimal and cohesive
|
|
237
|
+
|
|
238
|
+
### 3. Swarm Collaboration
|
|
239
|
+
- Share test insights with other agents
|
|
240
|
+
- Coordinate test execution timing
|
|
241
|
+
- Maintain consistent mock contracts
|
|
242
|
+
- Provide feedback for continuous improvement
|
|
243
|
+
|
|
244
|
+
Remember: The London School emphasizes **how objects collaborate** rather than **what they contain**. Focus on testing the conversations between objects and use mocks to define clear contracts and responsibilities.
|