claude-flow-novice 1.3.6 → 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 +208 -550
- package/.claude/agents/architect.md +136 -469
- package/.claude/agents/architecture/system-architect.md +20 -1
- 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 +87 -303
- 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 +22 -11
- 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 +134 -402
- 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 +1 -1
- package/.claude/agents/optimization/performance-monitor.md +1 -1
- package/.claude/agents/planner.md +135 -0
- package/.claude/agents/researcher.md +22 -9
- package/.claude/agents/reviewer.md +291 -0
- package/.claude/agents/security/security-specialist.md +1 -1
- 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/tester.md +21 -11
- 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/base-template-generator.md +65 -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.md +135 -0
- package/.claude-flow-novice/.claude/agents/researcher.md +185 -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/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.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 +1029 -68
- package/README.md +0 -1
- package/config/build/babel.config.cjs +19 -11
- package/config/typescript/tsconfig.json +1 -1
- 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/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 +5 -97
- 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/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/backend-dev.json +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/code-analyzer.json +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/coder.json +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/planner.json +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/researcher.json +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/reviewer.json +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/swarm/README.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/system-architect.json +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/tester.json +0 -0
|
@@ -0,0 +1,829 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Iterative Build-Test-Fix Cycle Workflow
|
|
3
|
+
*
|
|
4
|
+
* Coordinates frontend and backend development with continuous testing and intelligent
|
|
5
|
+
* fix cycles. Manages the complete iteration loop until convergence.
|
|
6
|
+
*
|
|
7
|
+
* Key Features:
|
|
8
|
+
* - Parallel frontend/backend development
|
|
9
|
+
* - Continuous test execution
|
|
10
|
+
* - Intelligent fix coordination
|
|
11
|
+
* - Convergence detection
|
|
12
|
+
* - Regression prevention
|
|
13
|
+
* - Real-time progress tracking
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { EventEmitter } from 'events';
|
|
17
|
+
import { SwarmMemoryManager } from '../../memory/swarm-memory.js';
|
|
18
|
+
import { ILogger } from '../../core/logger.js';
|
|
19
|
+
import {
|
|
20
|
+
FullStackAgentMessage,
|
|
21
|
+
FullStackAgentType,
|
|
22
|
+
SwarmTeamComposition,
|
|
23
|
+
} from '../types/index.js';
|
|
24
|
+
import { FixCoordinator } from './fix-coordinator.js';
|
|
25
|
+
import { ConvergenceDetector } from './convergence-detector.js';
|
|
26
|
+
import { WorkflowMetrics } from './workflow-metrics.js';
|
|
27
|
+
import { TestResultAnalyzer } from './test-result-analyzer.js';
|
|
28
|
+
import { RegressionTestManager } from './regression-test-manager.js';
|
|
29
|
+
|
|
30
|
+
export interface IterationConfig {
|
|
31
|
+
maxIterations: number;
|
|
32
|
+
maxIterationDuration: number; // milliseconds
|
|
33
|
+
convergenceThreshold: number; // 0-1, percentage of passing tests
|
|
34
|
+
minTestCoverage: number; // 0-100
|
|
35
|
+
parallelExecution: boolean;
|
|
36
|
+
enableRegressionTesting: boolean;
|
|
37
|
+
enableProgressiveValidation: boolean;
|
|
38
|
+
maxParallelFixes: number;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface FeatureIteration {
|
|
42
|
+
id: string;
|
|
43
|
+
featureId: string;
|
|
44
|
+
iterationNumber: number;
|
|
45
|
+
startTime: string;
|
|
46
|
+
endTime?: string;
|
|
47
|
+
status: 'planning' | 'coding' | 'testing' | 'fixing' | 'validating' | 'completed' | 'failed';
|
|
48
|
+
phase: IterationPhase;
|
|
49
|
+
activities: IterationActivity[];
|
|
50
|
+
testResults: TestExecutionResult;
|
|
51
|
+
fixResults: FixExecutionResult[];
|
|
52
|
+
metrics: IterationMetrics;
|
|
53
|
+
convergenceScore: number;
|
|
54
|
+
nextActions: string[];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface IterationPhase {
|
|
58
|
+
name: string;
|
|
59
|
+
startTime: string;
|
|
60
|
+
endTime?: string;
|
|
61
|
+
status: 'active' | 'completed' | 'failed';
|
|
62
|
+
tasks: string[];
|
|
63
|
+
agents: FullStackAgentType[];
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface IterationActivity {
|
|
67
|
+
id: string;
|
|
68
|
+
type: 'code' | 'test' | 'fix' | 'review' | 'validation';
|
|
69
|
+
agentId: string;
|
|
70
|
+
agentType: FullStackAgentType;
|
|
71
|
+
description: string;
|
|
72
|
+
startTime: string;
|
|
73
|
+
endTime?: string;
|
|
74
|
+
status: 'pending' | 'active' | 'completed' | 'failed';
|
|
75
|
+
output?: any;
|
|
76
|
+
error?: string;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface TestExecutionResult {
|
|
80
|
+
id: string;
|
|
81
|
+
timestamp: string;
|
|
82
|
+
totalTests: number;
|
|
83
|
+
passed: number;
|
|
84
|
+
failed: number;
|
|
85
|
+
skipped: number;
|
|
86
|
+
duration: number;
|
|
87
|
+
coverage: {
|
|
88
|
+
lines: number;
|
|
89
|
+
functions: number;
|
|
90
|
+
branches: number;
|
|
91
|
+
statements: number;
|
|
92
|
+
};
|
|
93
|
+
failures: TestFailure[];
|
|
94
|
+
warnings: TestWarning[];
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export interface TestFailure {
|
|
98
|
+
id: string;
|
|
99
|
+
testName: string;
|
|
100
|
+
category: 'unit' | 'integration' | 'e2e' | 'visual' | 'performance';
|
|
101
|
+
layer: 'frontend' | 'backend' | 'integration';
|
|
102
|
+
severity: 'critical' | 'high' | 'medium' | 'low';
|
|
103
|
+
error: string;
|
|
104
|
+
stackTrace: string;
|
|
105
|
+
affectedComponents: string[];
|
|
106
|
+
suggestedFix?: string;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export interface TestWarning {
|
|
110
|
+
id: string;
|
|
111
|
+
type: 'coverage' | 'performance' | 'style' | 'security' | 'accessibility';
|
|
112
|
+
message: string;
|
|
113
|
+
location: string;
|
|
114
|
+
severity: 'low' | 'medium' | 'high';
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export interface FixExecutionResult {
|
|
118
|
+
id: string;
|
|
119
|
+
failureId: string;
|
|
120
|
+
assignedAgent: FullStackAgentType;
|
|
121
|
+
strategy: string;
|
|
122
|
+
startTime: string;
|
|
123
|
+
endTime?: string;
|
|
124
|
+
status: 'pending' | 'active' | 'completed' | 'failed';
|
|
125
|
+
changes: CodeChange[];
|
|
126
|
+
validation: ValidationResult;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export interface CodeChange {
|
|
130
|
+
file: string;
|
|
131
|
+
type: 'add' | 'modify' | 'delete';
|
|
132
|
+
linesChanged: number;
|
|
133
|
+
description: string;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export interface ValidationResult {
|
|
137
|
+
passed: boolean;
|
|
138
|
+
testsPassed: number;
|
|
139
|
+
testsFailed: number;
|
|
140
|
+
regressionDetected: boolean;
|
|
141
|
+
issues: string[];
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export interface IterationMetrics {
|
|
145
|
+
duration: number;
|
|
146
|
+
testsExecuted: number;
|
|
147
|
+
testPassRate: number;
|
|
148
|
+
fixesApplied: number;
|
|
149
|
+
fixSuccessRate: number;
|
|
150
|
+
codeChurn: number; // lines changed
|
|
151
|
+
convergenceRate: number;
|
|
152
|
+
efficiency: number; // 0-1
|
|
153
|
+
qualityScore: number; // 0-100
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export interface WorkflowProgress {
|
|
157
|
+
currentIteration: number;
|
|
158
|
+
totalIterations: number;
|
|
159
|
+
overallProgress: number; // 0-100
|
|
160
|
+
currentPhase: string;
|
|
161
|
+
estimatedCompletion: string;
|
|
162
|
+
convergenceScore: number;
|
|
163
|
+
testPassRate: number;
|
|
164
|
+
blockers: string[];
|
|
165
|
+
recentActivities: IterationActivity[];
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export class IterativeBuildTestWorkflow extends EventEmitter {
|
|
169
|
+
private config: IterationConfig;
|
|
170
|
+
private memory: SwarmMemoryManager;
|
|
171
|
+
private fixCoordinator: FixCoordinator;
|
|
172
|
+
private convergenceDetector: ConvergenceDetector;
|
|
173
|
+
private metricsTracker: WorkflowMetrics;
|
|
174
|
+
private testAnalyzer: TestResultAnalyzer;
|
|
175
|
+
private regressionManager: RegressionTestManager;
|
|
176
|
+
|
|
177
|
+
private activeIterations = new Map<string, FeatureIteration>();
|
|
178
|
+
private iterationHistory = new Map<string, FeatureIteration[]>();
|
|
179
|
+
private baselineTests = new Map<string, TestExecutionResult>();
|
|
180
|
+
|
|
181
|
+
constructor(
|
|
182
|
+
config: Partial<IterationConfig>,
|
|
183
|
+
memory: SwarmMemoryManager,
|
|
184
|
+
private logger: ILogger,
|
|
185
|
+
) {
|
|
186
|
+
super();
|
|
187
|
+
|
|
188
|
+
this.config = {
|
|
189
|
+
maxIterations: 10,
|
|
190
|
+
maxIterationDuration: 1800000, // 30 minutes
|
|
191
|
+
convergenceThreshold: 0.95, // 95% tests passing
|
|
192
|
+
minTestCoverage: 80,
|
|
193
|
+
parallelExecution: true,
|
|
194
|
+
enableRegressionTesting: true,
|
|
195
|
+
enableProgressiveValidation: true,
|
|
196
|
+
maxParallelFixes: 5,
|
|
197
|
+
...config,
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
this.memory = memory;
|
|
201
|
+
this.fixCoordinator = new FixCoordinator(memory, logger);
|
|
202
|
+
this.convergenceDetector = new ConvergenceDetector(logger);
|
|
203
|
+
this.metricsTracker = new WorkflowMetrics(logger);
|
|
204
|
+
this.testAnalyzer = new TestResultAnalyzer(logger);
|
|
205
|
+
this.regressionManager = new RegressionTestManager(logger);
|
|
206
|
+
|
|
207
|
+
this.setupEventHandlers();
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Start iterative development workflow for a feature
|
|
212
|
+
*/
|
|
213
|
+
async startIterativeWorkflow(
|
|
214
|
+
featureId: string,
|
|
215
|
+
team: SwarmTeamComposition,
|
|
216
|
+
initialRequirements: any,
|
|
217
|
+
): Promise<FeatureIteration> {
|
|
218
|
+
try {
|
|
219
|
+
this.logger.info('Starting iterative workflow', { featureId, teamSize: team.agents.length });
|
|
220
|
+
|
|
221
|
+
// Initialize iteration history
|
|
222
|
+
if (!this.iterationHistory.has(featureId)) {
|
|
223
|
+
this.iterationHistory.set(featureId, []);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
// Create first iteration
|
|
227
|
+
const iteration = await this.createIteration(featureId, 1, team, initialRequirements);
|
|
228
|
+
this.activeIterations.set(featureId, iteration);
|
|
229
|
+
|
|
230
|
+
// Store in memory
|
|
231
|
+
await this.memory.remember('workflow-coordinator', 'state', iteration, {
|
|
232
|
+
tags: ['iteration', 'workflow', featureId],
|
|
233
|
+
shareLevel: 'team',
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
// Emit event
|
|
237
|
+
this.emit('workflow:started', { featureId, iteration });
|
|
238
|
+
|
|
239
|
+
// Execute iteration cycle
|
|
240
|
+
await this.executeIterationCycle(featureId);
|
|
241
|
+
|
|
242
|
+
return iteration;
|
|
243
|
+
} catch (error) {
|
|
244
|
+
this.logger.error('Failed to start iterative workflow', { error, featureId });
|
|
245
|
+
throw error;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Execute complete iteration cycle: code -> test -> fix -> validate
|
|
251
|
+
*/
|
|
252
|
+
private async executeIterationCycle(featureId: string): Promise<void> {
|
|
253
|
+
let iteration = this.activeIterations.get(featureId);
|
|
254
|
+
if (!iteration) throw new Error('Iteration not found');
|
|
255
|
+
|
|
256
|
+
try {
|
|
257
|
+
while (
|
|
258
|
+
iteration.iterationNumber <= this.config.maxIterations &&
|
|
259
|
+
!this.isConverged(iteration)
|
|
260
|
+
) {
|
|
261
|
+
this.logger.info('Executing iteration cycle', {
|
|
262
|
+
featureId,
|
|
263
|
+
iteration: iteration.iterationNumber,
|
|
264
|
+
});
|
|
265
|
+
|
|
266
|
+
// Phase 1: Coding
|
|
267
|
+
await this.executeCodingPhase(iteration);
|
|
268
|
+
|
|
269
|
+
// Phase 2: Testing
|
|
270
|
+
await this.executeTestingPhase(iteration);
|
|
271
|
+
|
|
272
|
+
// Check convergence
|
|
273
|
+
const convergenceResult = await this.convergenceDetector.checkConvergence({
|
|
274
|
+
testResults: iteration.testResults,
|
|
275
|
+
threshold: this.config.convergenceThreshold,
|
|
276
|
+
minCoverage: this.config.minTestCoverage,
|
|
277
|
+
iterationNumber: iteration.iterationNumber,
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
iteration.convergenceScore = convergenceResult.score;
|
|
281
|
+
|
|
282
|
+
if (convergenceResult.converged) {
|
|
283
|
+
this.logger.info('Convergence achieved', {
|
|
284
|
+
featureId,
|
|
285
|
+
iteration: iteration.iterationNumber,
|
|
286
|
+
score: convergenceResult.score,
|
|
287
|
+
});
|
|
288
|
+
break;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
// Phase 3: Fix Coordination
|
|
292
|
+
await this.executeFixPhase(iteration);
|
|
293
|
+
|
|
294
|
+
// Phase 4: Validation
|
|
295
|
+
await this.executeValidationPhase(iteration);
|
|
296
|
+
|
|
297
|
+
// Complete current iteration
|
|
298
|
+
await this.completeIteration(iteration);
|
|
299
|
+
|
|
300
|
+
// Check if we should continue
|
|
301
|
+
if (iteration.iterationNumber >= this.config.maxIterations) {
|
|
302
|
+
this.logger.warn('Maximum iterations reached', { featureId });
|
|
303
|
+
break;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
// Create next iteration
|
|
307
|
+
const nextIteration = await this.createNextIteration(featureId, iteration);
|
|
308
|
+
this.activeIterations.set(featureId, nextIteration);
|
|
309
|
+
iteration = nextIteration;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
// Final validation and completion
|
|
313
|
+
await this.completeWorkflow(featureId);
|
|
314
|
+
} catch (error) {
|
|
315
|
+
this.logger.error('Iteration cycle failed', { error, featureId });
|
|
316
|
+
iteration.status = 'failed';
|
|
317
|
+
this.emit('workflow:failed', { featureId, iteration, error });
|
|
318
|
+
throw error;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Phase 1: Code Generation (Frontend + Backend)
|
|
324
|
+
*/
|
|
325
|
+
private async executeCodingPhase(iteration: FeatureIteration): Promise<void> {
|
|
326
|
+
this.logger.info('Executing coding phase', {
|
|
327
|
+
featureId: iteration.featureId,
|
|
328
|
+
iteration: iteration.iterationNumber,
|
|
329
|
+
});
|
|
330
|
+
|
|
331
|
+
iteration.status = 'coding';
|
|
332
|
+
iteration.phase = {
|
|
333
|
+
name: 'Coding',
|
|
334
|
+
startTime: new Date().toISOString(),
|
|
335
|
+
status: 'active',
|
|
336
|
+
tasks: [],
|
|
337
|
+
agents: [],
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
try {
|
|
341
|
+
const codingActivities: IterationActivity[] = [];
|
|
342
|
+
|
|
343
|
+
// Create coding activities for frontend and backend
|
|
344
|
+
const frontendActivity = this.createActivity(
|
|
345
|
+
'code',
|
|
346
|
+
'frontend-developer',
|
|
347
|
+
'Implement frontend features',
|
|
348
|
+
);
|
|
349
|
+
const backendActivity = this.createActivity(
|
|
350
|
+
'code',
|
|
351
|
+
'backend-developer',
|
|
352
|
+
'Implement backend APIs',
|
|
353
|
+
);
|
|
354
|
+
|
|
355
|
+
codingActivities.push(frontendActivity, backendActivity);
|
|
356
|
+
|
|
357
|
+
// Execute in parallel if enabled
|
|
358
|
+
if (this.config.parallelExecution) {
|
|
359
|
+
await Promise.all([
|
|
360
|
+
this.executeActivity(frontendActivity, iteration),
|
|
361
|
+
this.executeActivity(backendActivity, iteration),
|
|
362
|
+
]);
|
|
363
|
+
} else {
|
|
364
|
+
await this.executeActivity(backendActivity, iteration);
|
|
365
|
+
await this.executeActivity(frontendActivity, iteration);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
iteration.activities.push(...codingActivities);
|
|
369
|
+
iteration.phase.status = 'completed';
|
|
370
|
+
iteration.phase.endTime = new Date().toISOString();
|
|
371
|
+
|
|
372
|
+
this.emit('phase:completed', { featureId: iteration.featureId, phase: 'coding' });
|
|
373
|
+
} catch (error) {
|
|
374
|
+
iteration.phase.status = 'failed';
|
|
375
|
+
throw error;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Phase 2: Testing (Parallel Test Execution)
|
|
381
|
+
*/
|
|
382
|
+
private async executeTestingPhase(iteration: FeatureIteration): Promise<void> {
|
|
383
|
+
this.logger.info('Executing testing phase', {
|
|
384
|
+
featureId: iteration.featureId,
|
|
385
|
+
iteration: iteration.iterationNumber,
|
|
386
|
+
});
|
|
387
|
+
|
|
388
|
+
iteration.status = 'testing';
|
|
389
|
+
iteration.phase = {
|
|
390
|
+
name: 'Testing',
|
|
391
|
+
startTime: new Date().toISOString(),
|
|
392
|
+
status: 'active',
|
|
393
|
+
tasks: [],
|
|
394
|
+
agents: [],
|
|
395
|
+
};
|
|
396
|
+
|
|
397
|
+
try {
|
|
398
|
+
// Create test activities
|
|
399
|
+
const testActivities = [
|
|
400
|
+
this.createActivity('test', 'qa-engineer', 'Execute unit tests'),
|
|
401
|
+
this.createActivity('test', 'e2e-tester', 'Execute integration tests'),
|
|
402
|
+
this.createActivity('test', 'performance-tester', 'Execute performance tests'),
|
|
403
|
+
];
|
|
404
|
+
|
|
405
|
+
// Execute tests in parallel
|
|
406
|
+
const testResults = await Promise.all(
|
|
407
|
+
testActivities.map((activity) => this.executeActivity(activity, iteration)),
|
|
408
|
+
);
|
|
409
|
+
|
|
410
|
+
iteration.activities.push(...testActivities);
|
|
411
|
+
|
|
412
|
+
// Aggregate test results
|
|
413
|
+
iteration.testResults = await this.aggregateTestResults(testResults);
|
|
414
|
+
|
|
415
|
+
// Analyze failures
|
|
416
|
+
const analysis = await this.testAnalyzer.analyzeFailures(iteration.testResults);
|
|
417
|
+
|
|
418
|
+
// Store analysis in memory
|
|
419
|
+
await this.memory.remember('test-analyzer', 'result', analysis, {
|
|
420
|
+
tags: ['test-analysis', iteration.featureId, `iteration-${iteration.iterationNumber}`],
|
|
421
|
+
shareLevel: 'team',
|
|
422
|
+
});
|
|
423
|
+
|
|
424
|
+
iteration.phase.status = 'completed';
|
|
425
|
+
iteration.phase.endTime = new Date().toISOString();
|
|
426
|
+
|
|
427
|
+
this.emit('phase:completed', {
|
|
428
|
+
featureId: iteration.featureId,
|
|
429
|
+
phase: 'testing',
|
|
430
|
+
results: iteration.testResults,
|
|
431
|
+
});
|
|
432
|
+
} catch (error) {
|
|
433
|
+
iteration.phase.status = 'failed';
|
|
434
|
+
throw error;
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* Phase 3: Fix Coordination (Intelligent Fix Assignment)
|
|
440
|
+
*/
|
|
441
|
+
private async executeFixPhase(iteration: FeatureIteration): Promise<void> {
|
|
442
|
+
if (iteration.testResults.failed === 0) {
|
|
443
|
+
this.logger.info('No failures to fix, skipping fix phase');
|
|
444
|
+
return;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
this.logger.info('Executing fix phase', {
|
|
448
|
+
featureId: iteration.featureId,
|
|
449
|
+
failures: iteration.testResults.failed,
|
|
450
|
+
});
|
|
451
|
+
|
|
452
|
+
iteration.status = 'fixing';
|
|
453
|
+
iteration.phase = {
|
|
454
|
+
name: 'Fixing',
|
|
455
|
+
startTime: new Date().toISOString(),
|
|
456
|
+
status: 'active',
|
|
457
|
+
tasks: [],
|
|
458
|
+
agents: [],
|
|
459
|
+
};
|
|
460
|
+
|
|
461
|
+
try {
|
|
462
|
+
// Coordinate fixes through fix coordinator
|
|
463
|
+
const fixPlan = await this.fixCoordinator.createFixPlan(
|
|
464
|
+
iteration.testResults.failures,
|
|
465
|
+
iteration.featureId,
|
|
466
|
+
);
|
|
467
|
+
|
|
468
|
+
// Execute fixes (with parallel limit)
|
|
469
|
+
const fixResults = await this.fixCoordinator.executeFixes(
|
|
470
|
+
fixPlan,
|
|
471
|
+
this.config.maxParallelFixes,
|
|
472
|
+
);
|
|
473
|
+
|
|
474
|
+
iteration.fixResults = fixResults;
|
|
475
|
+
|
|
476
|
+
// Track fix activities
|
|
477
|
+
for (const fix of fixResults) {
|
|
478
|
+
const fixActivity = this.createActivity(
|
|
479
|
+
'fix',
|
|
480
|
+
fix.assignedAgent,
|
|
481
|
+
`Fix failure: ${fix.failureId}`,
|
|
482
|
+
);
|
|
483
|
+
fixActivity.status = fix.status;
|
|
484
|
+
iteration.activities.push(fixActivity);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
iteration.phase.status = 'completed';
|
|
488
|
+
iteration.phase.endTime = new Date().toISOString();
|
|
489
|
+
|
|
490
|
+
this.emit('phase:completed', {
|
|
491
|
+
featureId: iteration.featureId,
|
|
492
|
+
phase: 'fixing',
|
|
493
|
+
fixes: fixResults.length,
|
|
494
|
+
});
|
|
495
|
+
} catch (error) {
|
|
496
|
+
iteration.phase.status = 'failed';
|
|
497
|
+
throw error;
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* Phase 4: Validation (Regression Testing)
|
|
503
|
+
*/
|
|
504
|
+
private async executeValidationPhase(iteration: FeatureIteration): Promise<void> {
|
|
505
|
+
this.logger.info('Executing validation phase', {
|
|
506
|
+
featureId: iteration.featureId,
|
|
507
|
+
});
|
|
508
|
+
|
|
509
|
+
iteration.status = 'validating';
|
|
510
|
+
iteration.phase = {
|
|
511
|
+
name: 'Validation',
|
|
512
|
+
startTime: new Date().toISOString(),
|
|
513
|
+
status: 'active',
|
|
514
|
+
tasks: [],
|
|
515
|
+
agents: [],
|
|
516
|
+
};
|
|
517
|
+
|
|
518
|
+
try {
|
|
519
|
+
// Run regression tests if enabled
|
|
520
|
+
if (this.config.enableRegressionTesting) {
|
|
521
|
+
const regressionResult = await this.regressionManager.runRegressionTests({
|
|
522
|
+
featureId: iteration.featureId,
|
|
523
|
+
baseline: this.baselineTests.get(iteration.featureId),
|
|
524
|
+
current: iteration.testResults,
|
|
525
|
+
});
|
|
526
|
+
|
|
527
|
+
if (regressionResult.regressionDetected) {
|
|
528
|
+
this.logger.warn('Regression detected', {
|
|
529
|
+
featureId: iteration.featureId,
|
|
530
|
+
regressions: regressionResult.regressions.length,
|
|
531
|
+
});
|
|
532
|
+
|
|
533
|
+
iteration.nextActions.push('Address regression issues before continuing');
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
// Progressive validation
|
|
538
|
+
if (this.config.enableProgressiveValidation) {
|
|
539
|
+
await this.validateProgressiveImprovement(iteration);
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
iteration.phase.status = 'completed';
|
|
543
|
+
iteration.phase.endTime = new Date().toISOString();
|
|
544
|
+
|
|
545
|
+
this.emit('phase:completed', {
|
|
546
|
+
featureId: iteration.featureId,
|
|
547
|
+
phase: 'validation',
|
|
548
|
+
});
|
|
549
|
+
} catch (error) {
|
|
550
|
+
iteration.phase.status = 'failed';
|
|
551
|
+
throw error;
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* Get real-time workflow progress
|
|
557
|
+
*/
|
|
558
|
+
getWorkflowProgress(featureId: string): WorkflowProgress | null {
|
|
559
|
+
const iteration = this.activeIterations.get(featureId);
|
|
560
|
+
if (!iteration) return null;
|
|
561
|
+
|
|
562
|
+
const history = this.iterationHistory.get(featureId) || [];
|
|
563
|
+
const totalIterations = this.config.maxIterations;
|
|
564
|
+
|
|
565
|
+
return {
|
|
566
|
+
currentIteration: iteration.iterationNumber,
|
|
567
|
+
totalIterations,
|
|
568
|
+
overallProgress: (iteration.iterationNumber / totalIterations) * 100,
|
|
569
|
+
currentPhase: iteration.phase.name,
|
|
570
|
+
estimatedCompletion: this.estimateCompletion(iteration),
|
|
571
|
+
convergenceScore: iteration.convergenceScore,
|
|
572
|
+
testPassRate: iteration.testResults.passed / iteration.testResults.totalTests || 0,
|
|
573
|
+
blockers: this.identifyBlockers(iteration),
|
|
574
|
+
recentActivities: iteration.activities.slice(-5),
|
|
575
|
+
};
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
* Helper methods
|
|
580
|
+
*/
|
|
581
|
+
|
|
582
|
+
private async createIteration(
|
|
583
|
+
featureId: string,
|
|
584
|
+
iterationNumber: number,
|
|
585
|
+
team: SwarmTeamComposition,
|
|
586
|
+
requirements: any,
|
|
587
|
+
): Promise<FeatureIteration> {
|
|
588
|
+
const iteration: FeatureIteration = {
|
|
589
|
+
id: `${featureId}_iteration_${iterationNumber}`,
|
|
590
|
+
featureId,
|
|
591
|
+
iterationNumber,
|
|
592
|
+
startTime: new Date().toISOString(),
|
|
593
|
+
status: 'planning',
|
|
594
|
+
phase: {
|
|
595
|
+
name: 'Planning',
|
|
596
|
+
startTime: new Date().toISOString(),
|
|
597
|
+
status: 'active',
|
|
598
|
+
tasks: [],
|
|
599
|
+
agents: [],
|
|
600
|
+
},
|
|
601
|
+
activities: [],
|
|
602
|
+
testResults: {
|
|
603
|
+
id: '',
|
|
604
|
+
timestamp: '',
|
|
605
|
+
totalTests: 0,
|
|
606
|
+
passed: 0,
|
|
607
|
+
failed: 0,
|
|
608
|
+
skipped: 0,
|
|
609
|
+
duration: 0,
|
|
610
|
+
coverage: { lines: 0, functions: 0, branches: 0, statements: 0 },
|
|
611
|
+
failures: [],
|
|
612
|
+
warnings: [],
|
|
613
|
+
},
|
|
614
|
+
fixResults: [],
|
|
615
|
+
metrics: {
|
|
616
|
+
duration: 0,
|
|
617
|
+
testsExecuted: 0,
|
|
618
|
+
testPassRate: 0,
|
|
619
|
+
fixesApplied: 0,
|
|
620
|
+
fixSuccessRate: 0,
|
|
621
|
+
codeChurn: 0,
|
|
622
|
+
convergenceRate: 0,
|
|
623
|
+
efficiency: 0,
|
|
624
|
+
qualityScore: 0,
|
|
625
|
+
},
|
|
626
|
+
convergenceScore: 0,
|
|
627
|
+
nextActions: [],
|
|
628
|
+
};
|
|
629
|
+
|
|
630
|
+
return iteration;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
private createActivity(
|
|
634
|
+
type: IterationActivity['type'],
|
|
635
|
+
agentType: FullStackAgentType,
|
|
636
|
+
description: string,
|
|
637
|
+
): IterationActivity {
|
|
638
|
+
return {
|
|
639
|
+
id: `activity_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`,
|
|
640
|
+
type,
|
|
641
|
+
agentId: `agent_${agentType}`,
|
|
642
|
+
agentType,
|
|
643
|
+
description,
|
|
644
|
+
startTime: new Date().toISOString(),
|
|
645
|
+
status: 'pending',
|
|
646
|
+
};
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
private async executeActivity(
|
|
650
|
+
activity: IterationActivity,
|
|
651
|
+
iteration: FeatureIteration,
|
|
652
|
+
): Promise<any> {
|
|
653
|
+
activity.status = 'active';
|
|
654
|
+
activity.startTime = new Date().toISOString();
|
|
655
|
+
|
|
656
|
+
try {
|
|
657
|
+
// Simulate activity execution (in real implementation, delegate to agents)
|
|
658
|
+
const result = await this.simulateAgentWork(activity, iteration);
|
|
659
|
+
|
|
660
|
+
activity.status = 'completed';
|
|
661
|
+
activity.endTime = new Date().toISOString();
|
|
662
|
+
activity.output = result;
|
|
663
|
+
|
|
664
|
+
return result;
|
|
665
|
+
} catch (error) {
|
|
666
|
+
activity.status = 'failed';
|
|
667
|
+
activity.endTime = new Date().toISOString();
|
|
668
|
+
activity.error = error.message;
|
|
669
|
+
throw error;
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
private async simulateAgentWork(
|
|
674
|
+
activity: IterationActivity,
|
|
675
|
+
iteration: FeatureIteration,
|
|
676
|
+
): Promise<any> {
|
|
677
|
+
// Placeholder for real agent work delegation
|
|
678
|
+
// In production, this would send messages to actual agents via message router
|
|
679
|
+
return {
|
|
680
|
+
success: true,
|
|
681
|
+
output: `${activity.type} completed by ${activity.agentType}`,
|
|
682
|
+
};
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
private async aggregateTestResults(results: any[]): Promise<TestExecutionResult> {
|
|
686
|
+
// Aggregate test results from multiple test activities
|
|
687
|
+
return {
|
|
688
|
+
id: `test_${Date.now()}`,
|
|
689
|
+
timestamp: new Date().toISOString(),
|
|
690
|
+
totalTests: 100,
|
|
691
|
+
passed: 85,
|
|
692
|
+
failed: 15,
|
|
693
|
+
skipped: 0,
|
|
694
|
+
duration: 5000,
|
|
695
|
+
coverage: {
|
|
696
|
+
lines: 82,
|
|
697
|
+
functions: 78,
|
|
698
|
+
branches: 75,
|
|
699
|
+
statements: 80,
|
|
700
|
+
},
|
|
701
|
+
failures: [],
|
|
702
|
+
warnings: [],
|
|
703
|
+
};
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
private isConverged(iteration: FeatureIteration): boolean {
|
|
707
|
+
const passRate = iteration.testResults.passed / iteration.testResults.totalTests || 0;
|
|
708
|
+
return passRate >= this.config.convergenceThreshold;
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
private async completeIteration(iteration: FeatureIteration): Promise<void> {
|
|
712
|
+
iteration.endTime = new Date().toISOString();
|
|
713
|
+
iteration.status = 'completed';
|
|
714
|
+
|
|
715
|
+
// Calculate metrics
|
|
716
|
+
iteration.metrics = await this.metricsTracker.calculateIterationMetrics(iteration);
|
|
717
|
+
|
|
718
|
+
// Store in history
|
|
719
|
+
const history = this.iterationHistory.get(iteration.featureId) || [];
|
|
720
|
+
history.push(iteration);
|
|
721
|
+
this.iterationHistory.set(iteration.featureId, history);
|
|
722
|
+
|
|
723
|
+
// Store in memory
|
|
724
|
+
await this.memory.remember('workflow-coordinator', 'result', iteration, {
|
|
725
|
+
tags: ['iteration-complete', iteration.featureId],
|
|
726
|
+
shareLevel: 'team',
|
|
727
|
+
});
|
|
728
|
+
|
|
729
|
+
this.emit('iteration:completed', { iteration });
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
private async createNextIteration(
|
|
733
|
+
featureId: string,
|
|
734
|
+
previousIteration: FeatureIteration,
|
|
735
|
+
): Promise<FeatureIteration> {
|
|
736
|
+
const nextNumber = previousIteration.iterationNumber + 1;
|
|
737
|
+
const history = this.iterationHistory.get(featureId) || [];
|
|
738
|
+
|
|
739
|
+
// Learn from previous iteration
|
|
740
|
+
const learnings = await this.extractLearnings(previousIteration);
|
|
741
|
+
|
|
742
|
+
return this.createIteration(featureId, nextNumber, {} as any, { learnings });
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
private async extractLearnings(iteration: FeatureIteration): Promise<any> {
|
|
746
|
+
return {
|
|
747
|
+
successfulFixes: iteration.fixResults.filter((f) => f.status === 'completed'),
|
|
748
|
+
persistentFailures: iteration.testResults.failures.filter((f) => f.severity === 'critical'),
|
|
749
|
+
performanceIssues: iteration.testResults.warnings.filter((w) => w.type === 'performance'),
|
|
750
|
+
};
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
private async validateProgressiveImprovement(iteration: FeatureIteration): Promise<void> {
|
|
754
|
+
const history = this.iterationHistory.get(iteration.featureId) || [];
|
|
755
|
+
if (history.length === 0) return;
|
|
756
|
+
|
|
757
|
+
const previousIteration = history[history.length - 1];
|
|
758
|
+
const currentPassRate = iteration.testResults.passed / iteration.testResults.totalTests;
|
|
759
|
+
const previousPassRate = previousIteration.testResults.passed / previousIteration.testResults.totalTests;
|
|
760
|
+
|
|
761
|
+
if (currentPassRate < previousPassRate) {
|
|
762
|
+
this.logger.warn('Test pass rate decreased', {
|
|
763
|
+
featureId: iteration.featureId,
|
|
764
|
+
current: currentPassRate,
|
|
765
|
+
previous: previousPassRate,
|
|
766
|
+
});
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
private async completeWorkflow(featureId: string): Promise<void> {
|
|
771
|
+
const iteration = this.activeIterations.get(featureId);
|
|
772
|
+
if (!iteration) return;
|
|
773
|
+
|
|
774
|
+
this.logger.info('Workflow completed', {
|
|
775
|
+
featureId,
|
|
776
|
+
iterations: iteration.iterationNumber,
|
|
777
|
+
convergenceScore: iteration.convergenceScore,
|
|
778
|
+
});
|
|
779
|
+
|
|
780
|
+
this.emit('workflow:completed', { featureId, iteration });
|
|
781
|
+
this.activeIterations.delete(featureId);
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
private estimateCompletion(iteration: FeatureIteration): string {
|
|
785
|
+
const history = this.iterationHistory.get(iteration.featureId) || [];
|
|
786
|
+
const avgIterationTime = history.length > 0
|
|
787
|
+
? history.reduce((sum, i) => sum + i.metrics.duration, 0) / history.length
|
|
788
|
+
: this.config.maxIterationDuration;
|
|
789
|
+
|
|
790
|
+
const remainingIterations = this.config.maxIterations - iteration.iterationNumber;
|
|
791
|
+
const estimatedMs = remainingIterations * avgIterationTime;
|
|
792
|
+
|
|
793
|
+
return new Date(Date.now() + estimatedMs).toISOString();
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
private identifyBlockers(iteration: FeatureIteration): string[] {
|
|
797
|
+
const blockers: string[] = [];
|
|
798
|
+
|
|
799
|
+
// Critical test failures
|
|
800
|
+
const criticalFailures = iteration.testResults.failures.filter(
|
|
801
|
+
(f) => f.severity === 'critical',
|
|
802
|
+
);
|
|
803
|
+
if (criticalFailures.length > 0) {
|
|
804
|
+
blockers.push(`${criticalFailures.length} critical test failures`);
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
// Failed fixes
|
|
808
|
+
const failedFixes = iteration.fixResults.filter((f) => f.status === 'failed');
|
|
809
|
+
if (failedFixes.length > 0) {
|
|
810
|
+
blockers.push(`${failedFixes.length} failed fix attempts`);
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
return blockers;
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
private setupEventHandlers(): void {
|
|
817
|
+
this.fixCoordinator.on('fix:completed', (event) => {
|
|
818
|
+
this.emit('fix:completed', event);
|
|
819
|
+
});
|
|
820
|
+
|
|
821
|
+
this.convergenceDetector.on('convergence:achieved', (event) => {
|
|
822
|
+
this.emit('convergence:achieved', event);
|
|
823
|
+
});
|
|
824
|
+
|
|
825
|
+
this.metricsTracker.on('metrics:updated', (event) => {
|
|
826
|
+
this.emit('metrics:updated', event);
|
|
827
|
+
});
|
|
828
|
+
}
|
|
829
|
+
}
|