agentic-qe 1.0.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 +209 -0
- package/.claude/agents/analysis/code-review/analyze-code-quality.md +180 -0
- package/.claude/agents/architecture/system-design/arch-system-design.md +156 -0
- package/.claude/agents/base-template-generator.md +42 -0
- package/.claude/agents/consensus/byzantine-coordinator.md +63 -0
- package/.claude/agents/consensus/crdt-synchronizer.md +997 -0
- package/.claude/agents/consensus/gossip-coordinator.md +63 -0
- package/.claude/agents/consensus/performance-benchmarker.md +851 -0
- package/.claude/agents/consensus/quorum-manager.md +823 -0
- package/.claude/agents/consensus/raft-manager.md +63 -0
- package/.claude/agents/consensus/security-manager.md +622 -0
- package/.claude/agents/core/coder.md +266 -0
- package/.claude/agents/core/planner.md +168 -0
- package/.claude/agents/core/researcher.md +190 -0
- package/.claude/agents/core/reviewer.md +326 -0
- package/.claude/agents/core/tester.md +319 -0
- package/.claude/agents/data/ml/data-ml-model.md +193 -0
- package/.claude/agents/development/backend/dev-backend-api.md +142 -0
- package/.claude/agents/devops/ci-cd/ops-cicd-github.md +164 -0
- package/.claude/agents/documentation/api-docs/docs-api-openapi.md +174 -0
- package/.claude/agents/flow-nexus/app-store.md +88 -0
- package/.claude/agents/flow-nexus/authentication.md +69 -0
- package/.claude/agents/flow-nexus/challenges.md +81 -0
- package/.claude/agents/flow-nexus/neural-network.md +88 -0
- package/.claude/agents/flow-nexus/payments.md +83 -0
- package/.claude/agents/flow-nexus/sandbox.md +76 -0
- package/.claude/agents/flow-nexus/swarm.md +76 -0
- package/.claude/agents/flow-nexus/user-tools.md +96 -0
- package/.claude/agents/flow-nexus/workflow.md +84 -0
- package/.claude/agents/github/code-review-swarm.md +538 -0
- package/.claude/agents/github/github-modes.md +173 -0
- package/.claude/agents/github/issue-tracker.md +319 -0
- package/.claude/agents/github/multi-repo-swarm.md +553 -0
- package/.claude/agents/github/pr-manager.md +191 -0
- package/.claude/agents/github/project-board-sync.md +509 -0
- package/.claude/agents/github/release-manager.md +367 -0
- package/.claude/agents/github/release-swarm.md +583 -0
- package/.claude/agents/github/repo-architect.md +398 -0
- package/.claude/agents/github/swarm-issue.md +573 -0
- package/.claude/agents/github/swarm-pr.md +428 -0
- package/.claude/agents/github/sync-coordinator.md +452 -0
- package/.claude/agents/github/workflow-automation.md +635 -0
- package/.claude/agents/goal/code-goal-planner.md +446 -0
- package/.claude/agents/goal/goal-planner.md +168 -0
- package/.claude/agents/hive-mind/collective-intelligence-coordinator.md +130 -0
- package/.claude/agents/hive-mind/queen-coordinator.md +203 -0
- package/.claude/agents/hive-mind/scout-explorer.md +242 -0
- package/.claude/agents/hive-mind/swarm-memory-manager.md +193 -0
- package/.claude/agents/hive-mind/worker-specialist.md +217 -0
- package/.claude/agents/neural/safla-neural.md +74 -0
- package/.claude/agents/optimization/benchmark-suite.md +665 -0
- package/.claude/agents/optimization/load-balancer.md +431 -0
- package/.claude/agents/optimization/performance-monitor.md +672 -0
- package/.claude/agents/optimization/resource-allocator.md +674 -0
- package/.claude/agents/optimization/topology-optimizer.md +808 -0
- package/.claude/agents/qe-api-contract-validator.md +1088 -0
- package/.claude/agents/qe-chaos-engineer.md +736 -0
- package/.claude/agents/qe-coverage-analyzer.md +282 -0
- package/.claude/agents/qe-deployment-readiness.md +1109 -0
- package/.claude/agents/qe-flaky-test-hunter.md +1121 -0
- package/.claude/agents/qe-fleet-commander.md +641 -0
- package/.claude/agents/qe-performance-tester.md +354 -0
- package/.claude/agents/qe-production-intelligence.md +1162 -0
- package/.claude/agents/qe-quality-gate.md +294 -0
- package/.claude/agents/qe-regression-risk-analyzer.md +947 -0
- package/.claude/agents/qe-requirements-validator.md +691 -0
- package/.claude/agents/qe-security-scanner.md +430 -0
- package/.claude/agents/qe-test-data-architect.md +1007 -0
- package/.claude/agents/qe-test-executor.md +365 -0
- package/.claude/agents/qe-test-generator.md +332 -0
- package/.claude/agents/qe-visual-tester.md +754 -0
- package/.claude/agents/sparc/architecture.md +472 -0
- package/.claude/agents/sparc/pseudocode.md +318 -0
- package/.claude/agents/sparc/refinement.md +525 -0
- package/.claude/agents/sparc/specification.md +276 -0
- package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +226 -0
- package/.claude/agents/swarm/adaptive-coordinator.md +396 -0
- package/.claude/agents/swarm/hierarchical-coordinator.md +327 -0
- package/.claude/agents/swarm/mesh-coordinator.md +392 -0
- package/.claude/agents/templates/automation-smart-agent.md +205 -0
- package/.claude/agents/templates/coordinator-swarm-init.md +105 -0
- package/.claude/agents/templates/github-pr-manager.md +177 -0
- package/.claude/agents/templates/implementer-sparc-coder.md +259 -0
- package/.claude/agents/templates/memory-coordinator.md +187 -0
- package/.claude/agents/templates/migration-plan.md +746 -0
- package/.claude/agents/templates/orchestrator-task.md +139 -0
- package/.claude/agents/templates/performance-analyzer.md +199 -0
- package/.claude/agents/templates/sparc-coordinator.md +183 -0
- package/.claude/agents/testing/unit/tdd-london-swarm.md +244 -0
- package/.claude/agents/testing/validation/production-validator.md +395 -0
- package/.claude/aqe-fleet.json +47 -0
- package/.claude/commands/README.md +106 -0
- package/.claude/commands/agents/README.md +10 -0
- package/.claude/commands/agents/agent-capabilities.md +21 -0
- package/.claude/commands/agents/agent-coordination.md +28 -0
- package/.claude/commands/agents/agent-spawning.md +28 -0
- package/.claude/commands/agents/agent-types.md +26 -0
- package/.claude/commands/analysis/COMMAND_COMPLIANCE_REPORT.md +54 -0
- package/.claude/commands/analysis/README.md +9 -0
- package/.claude/commands/analysis/bottleneck-detect.md +162 -0
- package/.claude/commands/analysis/performance-bottlenecks.md +59 -0
- package/.claude/commands/analysis/performance-report.md +25 -0
- package/.claude/commands/analysis/token-efficiency.md +45 -0
- package/.claude/commands/analysis/token-usage.md +25 -0
- package/.claude/commands/aqe-analyze.md +344 -0
- package/.claude/commands/aqe-benchmark.md +466 -0
- package/.claude/commands/aqe-chaos.md +443 -0
- package/.claude/commands/aqe-execute.md +322 -0
- package/.claude/commands/aqe-fleet-status.md +431 -0
- package/.claude/commands/aqe-generate.md +301 -0
- package/.claude/commands/aqe-optimize.md +361 -0
- package/.claude/commands/aqe-report.md +411 -0
- package/.claude/commands/automation/README.md +9 -0
- package/.claude/commands/automation/auto-agent.md +122 -0
- package/.claude/commands/automation/self-healing.md +106 -0
- package/.claude/commands/automation/session-memory.md +90 -0
- package/.claude/commands/automation/smart-agents.md +73 -0
- package/.claude/commands/automation/smart-spawn.md +25 -0
- package/.claude/commands/automation/workflow-select.md +25 -0
- package/.claude/commands/coordination/README.md +9 -0
- package/.claude/commands/coordination/agent-spawn.md +25 -0
- package/.claude/commands/coordination/init.md +44 -0
- package/.claude/commands/coordination/orchestrate.md +43 -0
- package/.claude/commands/coordination/spawn.md +45 -0
- package/.claude/commands/coordination/swarm-init.md +85 -0
- package/.claude/commands/coordination/task-orchestrate.md +25 -0
- package/.claude/commands/flow-nexus/app-store.md +124 -0
- package/.claude/commands/flow-nexus/challenges.md +120 -0
- package/.claude/commands/flow-nexus/login-registration.md +65 -0
- package/.claude/commands/flow-nexus/neural-network.md +134 -0
- package/.claude/commands/flow-nexus/payments.md +116 -0
- package/.claude/commands/flow-nexus/sandbox.md +83 -0
- package/.claude/commands/flow-nexus/swarm.md +87 -0
- package/.claude/commands/flow-nexus/user-tools.md +152 -0
- package/.claude/commands/flow-nexus/workflow.md +115 -0
- package/.claude/commands/github/README.md +11 -0
- package/.claude/commands/github/code-review-swarm.md +514 -0
- package/.claude/commands/github/code-review.md +25 -0
- package/.claude/commands/github/github-modes.md +147 -0
- package/.claude/commands/github/github-swarm.md +121 -0
- package/.claude/commands/github/issue-tracker.md +292 -0
- package/.claude/commands/github/issue-triage.md +25 -0
- package/.claude/commands/github/multi-repo-swarm.md +519 -0
- package/.claude/commands/github/pr-enhance.md +26 -0
- package/.claude/commands/github/pr-manager.md +170 -0
- package/.claude/commands/github/project-board-sync.md +471 -0
- package/.claude/commands/github/release-manager.md +338 -0
- package/.claude/commands/github/release-swarm.md +544 -0
- package/.claude/commands/github/repo-analyze.md +25 -0
- package/.claude/commands/github/repo-architect.md +367 -0
- package/.claude/commands/github/swarm-issue.md +482 -0
- package/.claude/commands/github/swarm-pr.md +285 -0
- package/.claude/commands/github/sync-coordinator.md +301 -0
- package/.claude/commands/github/workflow-automation.md +442 -0
- package/.claude/commands/hive-mind/README.md +17 -0
- package/.claude/commands/hive-mind/hive-mind-consensus.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-init.md +18 -0
- package/.claude/commands/hive-mind/hive-mind-memory.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-metrics.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-resume.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-sessions.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-spawn.md +21 -0
- package/.claude/commands/hive-mind/hive-mind-status.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-stop.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-wizard.md +8 -0
- package/.claude/commands/hive-mind/hive-mind.md +27 -0
- package/.claude/commands/hooks/README.md +11 -0
- package/.claude/commands/hooks/overview.md +132 -0
- package/.claude/commands/hooks/post-edit.md +117 -0
- package/.claude/commands/hooks/post-task.md +112 -0
- package/.claude/commands/hooks/pre-edit.md +113 -0
- package/.claude/commands/hooks/pre-task.md +111 -0
- package/.claude/commands/hooks/session-end.md +118 -0
- package/.claude/commands/hooks/setup.md +103 -0
- package/.claude/commands/memory/README.md +9 -0
- package/.claude/commands/memory/memory-persist.md +25 -0
- package/.claude/commands/memory/memory-search.md +25 -0
- package/.claude/commands/memory/memory-usage.md +25 -0
- package/.claude/commands/memory/neural.md +47 -0
- package/.claude/commands/memory/usage.md +46 -0
- package/.claude/commands/monitoring/README.md +9 -0
- package/.claude/commands/monitoring/agent-metrics.md +25 -0
- package/.claude/commands/monitoring/agents.md +44 -0
- package/.claude/commands/monitoring/real-time-view.md +25 -0
- package/.claude/commands/monitoring/status.md +46 -0
- package/.claude/commands/monitoring/swarm-monitor.md +25 -0
- package/.claude/commands/optimization/README.md +9 -0
- package/.claude/commands/optimization/auto-topology.md +62 -0
- package/.claude/commands/optimization/cache-manage.md +25 -0
- package/.claude/commands/optimization/parallel-execute.md +25 -0
- package/.claude/commands/optimization/parallel-execution.md +50 -0
- package/.claude/commands/optimization/topology-optimize.md +25 -0
- package/.claude/commands/pair/commands.md +546 -0
- package/.claude/commands/pair/config.md +510 -0
- package/.claude/commands/pair/examples.md +512 -0
- package/.claude/commands/pair/modes.md +348 -0
- package/.claude/commands/pair/session.md +407 -0
- package/.claude/commands/pair/start.md +209 -0
- package/.claude/commands/sparc/analyzer.md +52 -0
- package/.claude/commands/sparc/architect.md +53 -0
- package/.claude/commands/sparc/batch-executor.md +54 -0
- package/.claude/commands/sparc/coder.md +54 -0
- package/.claude/commands/sparc/debugger.md +54 -0
- package/.claude/commands/sparc/designer.md +53 -0
- package/.claude/commands/sparc/documenter.md +54 -0
- package/.claude/commands/sparc/innovator.md +54 -0
- package/.claude/commands/sparc/memory-manager.md +54 -0
- package/.claude/commands/sparc/optimizer.md +54 -0
- package/.claude/commands/sparc/orchestrator.md +132 -0
- package/.claude/commands/sparc/researcher.md +54 -0
- package/.claude/commands/sparc/reviewer.md +54 -0
- package/.claude/commands/sparc/sparc-modes.md +174 -0
- package/.claude/commands/sparc/swarm-coordinator.md +54 -0
- package/.claude/commands/sparc/tdd.md +54 -0
- package/.claude/commands/sparc/tester.md +54 -0
- package/.claude/commands/sparc/workflow-manager.md +54 -0
- package/.claude/commands/stream-chain/pipeline.md +121 -0
- package/.claude/commands/stream-chain/run.md +70 -0
- package/.claude/commands/swarm/README.md +15 -0
- package/.claude/commands/swarm/analysis.md +95 -0
- package/.claude/commands/swarm/development.md +96 -0
- package/.claude/commands/swarm/examples.md +168 -0
- package/.claude/commands/swarm/maintenance.md +102 -0
- package/.claude/commands/swarm/optimization.md +117 -0
- package/.claude/commands/swarm/research.md +136 -0
- package/.claude/commands/swarm/swarm-analysis.md +8 -0
- package/.claude/commands/swarm/swarm-background.md +8 -0
- package/.claude/commands/swarm/swarm-init.md +19 -0
- package/.claude/commands/swarm/swarm-modes.md +8 -0
- package/.claude/commands/swarm/swarm-monitor.md +8 -0
- package/.claude/commands/swarm/swarm-spawn.md +19 -0
- package/.claude/commands/swarm/swarm-status.md +8 -0
- package/.claude/commands/swarm/swarm-strategies.md +8 -0
- package/.claude/commands/swarm/swarm.md +27 -0
- package/.claude/commands/swarm/testing.md +131 -0
- package/.claude/commands/training/README.md +9 -0
- package/.claude/commands/training/model-update.md +25 -0
- package/.claude/commands/training/neural-patterns.md +74 -0
- package/.claude/commands/training/neural-train.md +25 -0
- package/.claude/commands/training/pattern-learn.md +25 -0
- package/.claude/commands/training/specialization.md +63 -0
- package/.claude/commands/truth/start.md +143 -0
- package/.claude/commands/verify/check.md +50 -0
- package/.claude/commands/verify/start.md +128 -0
- package/.claude/commands/workflows/README.md +9 -0
- package/.claude/commands/workflows/development.md +78 -0
- package/.claude/commands/workflows/research.md +63 -0
- package/.claude/commands/workflows/workflow-create.md +25 -0
- package/.claude/commands/workflows/workflow-execute.md +25 -0
- package/.claude/commands/workflows/workflow-export.md +25 -0
- package/.claude/helpers/checkpoint-manager.sh +251 -0
- package/.claude/helpers/github-safe.js +106 -0
- package/.claude/helpers/github-setup.sh +28 -0
- package/.claude/helpers/quick-start.sh +19 -0
- package/.claude/helpers/setup-mcp.sh +18 -0
- package/.claude/helpers/standard-checkpoint-hooks.sh +179 -0
- package/.claude/settings.json +114 -0
- package/.claude/settings.local.json +10 -0
- package/CONTRIBUTING.md +897 -0
- package/LICENSE +21 -0
- package/README.md +632 -0
- package/bin/aqe +959 -0
- package/config/fleet.yaml +50 -0
- package/dist/agents/ApiContractValidatorAgent.d.ts +222 -0
- package/dist/agents/ApiContractValidatorAgent.d.ts.map +1 -0
- package/dist/agents/ApiContractValidatorAgent.js +787 -0
- package/dist/agents/ApiContractValidatorAgent.js.map +1 -0
- package/dist/agents/BaseAgent.d.ts +147 -0
- package/dist/agents/BaseAgent.d.ts.map +1 -0
- package/dist/agents/BaseAgent.js +374 -0
- package/dist/agents/BaseAgent.js.map +1 -0
- package/dist/agents/CoverageAnalyzerAgent.d.ts +103 -0
- package/dist/agents/CoverageAnalyzerAgent.d.ts.map +1 -0
- package/dist/agents/CoverageAnalyzerAgent.js +466 -0
- package/dist/agents/CoverageAnalyzerAgent.js.map +1 -0
- package/dist/agents/DeploymentReadinessAgent.d.ts +244 -0
- package/dist/agents/DeploymentReadinessAgent.d.ts.map +1 -0
- package/dist/agents/DeploymentReadinessAgent.js +974 -0
- package/dist/agents/DeploymentReadinessAgent.js.map +1 -0
- package/dist/agents/FlakyTestHunterAgent.d.ts +172 -0
- package/dist/agents/FlakyTestHunterAgent.d.ts.map +1 -0
- package/dist/agents/FlakyTestHunterAgent.js +867 -0
- package/dist/agents/FlakyTestHunterAgent.js.map +1 -0
- package/dist/agents/FleetCommanderAgent.d.ts +154 -0
- package/dist/agents/FleetCommanderAgent.d.ts.map +1 -0
- package/dist/agents/FleetCommanderAgent.js +924 -0
- package/dist/agents/FleetCommanderAgent.js.map +1 -0
- package/dist/agents/PerformanceTesterAgent.d.ts +194 -0
- package/dist/agents/PerformanceTesterAgent.d.ts.map +1 -0
- package/dist/agents/PerformanceTesterAgent.js +972 -0
- package/dist/agents/PerformanceTesterAgent.js.map +1 -0
- package/dist/agents/ProductionIntelligenceAgent.d.ts +224 -0
- package/dist/agents/ProductionIntelligenceAgent.d.ts.map +1 -0
- package/dist/agents/ProductionIntelligenceAgent.js +856 -0
- package/dist/agents/ProductionIntelligenceAgent.js.map +1 -0
- package/dist/agents/QualityAnalyzerAgent.d.ts +67 -0
- package/dist/agents/QualityAnalyzerAgent.d.ts.map +1 -0
- package/dist/agents/QualityAnalyzerAgent.js +453 -0
- package/dist/agents/QualityAnalyzerAgent.js.map +1 -0
- package/dist/agents/QualityGateAgent.d.ts +104 -0
- package/dist/agents/QualityGateAgent.d.ts.map +1 -0
- package/dist/agents/QualityGateAgent.js +522 -0
- package/dist/agents/QualityGateAgent.js.map +1 -0
- package/dist/agents/RegressionRiskAnalyzerAgent.d.ts +274 -0
- package/dist/agents/RegressionRiskAnalyzerAgent.d.ts.map +1 -0
- package/dist/agents/RegressionRiskAnalyzerAgent.js +1076 -0
- package/dist/agents/RegressionRiskAnalyzerAgent.js.map +1 -0
- package/dist/agents/RequirementsValidatorAgent.d.ts +195 -0
- package/dist/agents/RequirementsValidatorAgent.d.ts.map +1 -0
- package/dist/agents/RequirementsValidatorAgent.js +992 -0
- package/dist/agents/RequirementsValidatorAgent.js.map +1 -0
- package/dist/agents/SecurityScannerAgent.d.ts +126 -0
- package/dist/agents/SecurityScannerAgent.d.ts.map +1 -0
- package/dist/agents/SecurityScannerAgent.js +695 -0
- package/dist/agents/SecurityScannerAgent.js.map +1 -0
- package/dist/agents/TestDataArchitectAgent.d.ts +452 -0
- package/dist/agents/TestDataArchitectAgent.d.ts.map +1 -0
- package/dist/agents/TestDataArchitectAgent.js +1346 -0
- package/dist/agents/TestDataArchitectAgent.js.map +1 -0
- package/dist/agents/TestExecutorAgent.d.ts +101 -0
- package/dist/agents/TestExecutorAgent.d.ts.map +1 -0
- package/dist/agents/TestExecutorAgent.js +730 -0
- package/dist/agents/TestExecutorAgent.js.map +1 -0
- package/dist/agents/TestGeneratorAgent.d.ts +109 -0
- package/dist/agents/TestGeneratorAgent.d.ts.map +1 -0
- package/dist/agents/TestGeneratorAgent.js +450 -0
- package/dist/agents/TestGeneratorAgent.js.map +1 -0
- package/dist/agents/index.d.ts +51 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/index.js +738 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/cli/commands/analyze.d.ts +32 -0
- package/dist/cli/commands/analyze.d.ts.map +1 -0
- package/dist/cli/commands/analyze.js +764 -0
- package/dist/cli/commands/analyze.js.map +1 -0
- package/dist/cli/commands/fleet.d.ts +36 -0
- package/dist/cli/commands/fleet.d.ts.map +1 -0
- package/dist/cli/commands/fleet.js +745 -0
- package/dist/cli/commands/fleet.js.map +1 -0
- package/dist/cli/commands/generate.d.ts +24 -0
- package/dist/cli/commands/generate.d.ts.map +1 -0
- package/dist/cli/commands/generate.js +424 -0
- package/dist/cli/commands/generate.js.map +1 -0
- package/dist/cli/commands/init.d.ts +17 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +570 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/run.d.ts +25 -0
- package/dist/cli/commands/run.d.ts.map +1 -0
- package/dist/cli/commands/run.js +558 -0
- package/dist/cli/commands/run.js.map +1 -0
- package/dist/cli/index-spec.d.ts +3 -0
- package/dist/cli/index-spec.d.ts.map +1 -0
- package/dist/cli/index-spec.js +154 -0
- package/dist/cli/index-spec.js.map +1 -0
- package/dist/cli/index-working.d.ts +7 -0
- package/dist/cli/index-working.d.ts.map +1 -0
- package/dist/cli/index-working.js +470 -0
- package/dist/cli/index-working.js.map +1 -0
- package/dist/cli/index.d.ts +9 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +174 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/core/Agent.d.ts +189 -0
- package/dist/core/Agent.d.ts.map +1 -0
- package/dist/core/Agent.js +288 -0
- package/dist/core/Agent.js.map +1 -0
- package/dist/core/EventBus.d.ts +40 -0
- package/dist/core/EventBus.d.ts.map +1 -0
- package/dist/core/EventBus.js +114 -0
- package/dist/core/EventBus.js.map +1 -0
- package/dist/core/FleetManager.d.ts +219 -0
- package/dist/core/FleetManager.d.ts.map +1 -0
- package/dist/core/FleetManager.js +354 -0
- package/dist/core/FleetManager.js.map +1 -0
- package/dist/core/MemoryManager.d.ts +119 -0
- package/dist/core/MemoryManager.d.ts.map +1 -0
- package/dist/core/MemoryManager.js +460 -0
- package/dist/core/MemoryManager.js.map +1 -0
- package/dist/core/Task.d.ts +264 -0
- package/dist/core/Task.d.ts.map +1 -0
- package/dist/core/Task.js +397 -0
- package/dist/core/Task.js.map +1 -0
- package/dist/core/coverage-analyzer.d.ts +50 -0
- package/dist/core/coverage-analyzer.d.ts.map +1 -0
- package/dist/core/coverage-analyzer.js +146 -0
- package/dist/core/coverage-analyzer.js.map +1 -0
- package/dist/core/index.d.ts +14 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +20 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/quality-gate.d.ts +81 -0
- package/dist/core/quality-gate.d.ts.map +1 -0
- package/dist/core/quality-gate.js +254 -0
- package/dist/core/quality-gate.js.map +1 -0
- package/dist/coverage/coverage-collector.d.ts +62 -0
- package/dist/coverage/coverage-collector.d.ts.map +1 -0
- package/dist/coverage/coverage-collector.js +61 -0
- package/dist/coverage/coverage-collector.js.map +1 -0
- package/dist/coverage/coverage-reporter.d.ts +42 -0
- package/dist/coverage/coverage-reporter.d.ts.map +1 -0
- package/dist/coverage/coverage-reporter.js +53 -0
- package/dist/coverage/coverage-reporter.js.map +1 -0
- package/dist/index.d.ts +89 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +142 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/handlers/agent-spawn.d.ts +72 -0
- package/dist/mcp/handlers/agent-spawn.d.ts.map +1 -0
- package/dist/mcp/handlers/agent-spawn.js +255 -0
- package/dist/mcp/handlers/agent-spawn.js.map +1 -0
- package/dist/mcp/handlers/base-handler.d.ts +53 -0
- package/dist/mcp/handlers/base-handler.d.ts.map +1 -0
- package/dist/mcp/handlers/base-handler.js +77 -0
- package/dist/mcp/handlers/base-handler.js.map +1 -0
- package/dist/mcp/handlers/fleet-init.d.ts +55 -0
- package/dist/mcp/handlers/fleet-init.d.ts.map +1 -0
- package/dist/mcp/handlers/fleet-init.js +149 -0
- package/dist/mcp/handlers/fleet-init.js.map +1 -0
- package/dist/mcp/handlers/fleet-status.d.ts +103 -0
- package/dist/mcp/handlers/fleet-status.d.ts.map +1 -0
- package/dist/mcp/handlers/fleet-status.js +244 -0
- package/dist/mcp/handlers/fleet-status.js.map +1 -0
- package/dist/mcp/handlers/optimize-tests.d.ts +219 -0
- package/dist/mcp/handlers/optimize-tests.d.ts.map +1 -0
- package/dist/mcp/handlers/optimize-tests.js +532 -0
- package/dist/mcp/handlers/optimize-tests.js.map +1 -0
- package/dist/mcp/handlers/predict-defects.d.ts +194 -0
- package/dist/mcp/handlers/predict-defects.d.ts.map +1 -0
- package/dist/mcp/handlers/predict-defects.js +721 -0
- package/dist/mcp/handlers/predict-defects.js.map +1 -0
- package/dist/mcp/handlers/quality-analyze.d.ts +273 -0
- package/dist/mcp/handlers/quality-analyze.d.ts.map +1 -0
- package/dist/mcp/handlers/quality-analyze.js +702 -0
- package/dist/mcp/handlers/quality-analyze.js.map +1 -0
- package/dist/mcp/handlers/task-orchestrate.d.ts +152 -0
- package/dist/mcp/handlers/task-orchestrate.d.ts.map +1 -0
- package/dist/mcp/handlers/task-orchestrate.js +629 -0
- package/dist/mcp/handlers/task-orchestrate.js.map +1 -0
- package/dist/mcp/handlers/test-execute.d.ts +132 -0
- package/dist/mcp/handlers/test-execute.d.ts.map +1 -0
- package/dist/mcp/handlers/test-execute.js +436 -0
- package/dist/mcp/handlers/test-execute.js.map +1 -0
- package/dist/mcp/handlers/test-generate.d.ts +107 -0
- package/dist/mcp/handlers/test-generate.d.ts.map +1 -0
- package/dist/mcp/handlers/test-generate.js +437 -0
- package/dist/mcp/handlers/test-generate.js.map +1 -0
- package/dist/mcp/server.d.ts +99 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +214 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/services/AgentRegistry.d.ts +191 -0
- package/dist/mcp/services/AgentRegistry.d.ts.map +1 -0
- package/dist/mcp/services/AgentRegistry.js +403 -0
- package/dist/mcp/services/AgentRegistry.js.map +1 -0
- package/dist/mcp/services/HookExecutor.d.ts +165 -0
- package/dist/mcp/services/HookExecutor.d.ts.map +1 -0
- package/dist/mcp/services/HookExecutor.js +327 -0
- package/dist/mcp/services/HookExecutor.js.map +1 -0
- package/dist/mcp/start.d.ts +7 -0
- package/dist/mcp/start.d.ts.map +1 -0
- package/dist/mcp/start.js +35 -0
- package/dist/mcp/start.js.map +1 -0
- package/dist/mcp/tools.d.ts +81 -0
- package/dist/mcp/tools.d.ts.map +1 -0
- package/dist/mcp/tools.js +471 -0
- package/dist/mcp/tools.js.map +1 -0
- package/dist/optimization/sublinear-solver.d.ts +72 -0
- package/dist/optimization/sublinear-solver.d.ts.map +1 -0
- package/dist/optimization/sublinear-solver.js +263 -0
- package/dist/optimization/sublinear-solver.js.map +1 -0
- package/dist/scripts/verifyComplexity.d.ts +8 -0
- package/dist/scripts/verifyComplexity.d.ts.map +1 -0
- package/dist/scripts/verifyComplexity.js +56 -0
- package/dist/scripts/verifyComplexity.js.map +1 -0
- package/dist/types/api-contract.types.d.ts +273 -0
- package/dist/types/api-contract.types.d.ts.map +1 -0
- package/dist/types/api-contract.types.js +18 -0
- package/dist/types/api-contract.types.js.map +1 -0
- package/dist/types/errors.d.ts +104 -0
- package/dist/types/errors.d.ts.map +1 -0
- package/dist/types/errors.js +226 -0
- package/dist/types/errors.js.map +1 -0
- package/dist/types/events.d.ts +101 -0
- package/dist/types/events.d.ts.map +1 -0
- package/dist/types/events.js +6 -0
- package/dist/types/events.js.map +1 -0
- package/dist/types/index.d.ts +570 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +131 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/Config.d.ts +128 -0
- package/dist/utils/Config.d.ts.map +1 -0
- package/dist/utils/Config.js +232 -0
- package/dist/utils/Config.js.map +1 -0
- package/dist/utils/Database.d.ts +112 -0
- package/dist/utils/Database.d.ts.map +1 -0
- package/dist/utils/Database.js +352 -0
- package/dist/utils/Database.js.map +1 -0
- package/dist/utils/Logger.d.ts +58 -0
- package/dist/utils/Logger.d.ts.map +1 -0
- package/dist/utils/Logger.js +125 -0
- package/dist/utils/Logger.js.map +1 -0
- package/dist/utils/index.d.ts +9 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +14 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/sublinear/coverageOptimizer.d.ts +84 -0
- package/dist/utils/sublinear/coverageOptimizer.d.ts.map +1 -0
- package/dist/utils/sublinear/coverageOptimizer.js +415 -0
- package/dist/utils/sublinear/coverageOptimizer.js.map +1 -0
- package/dist/utils/sublinear/index.d.ts +50 -0
- package/dist/utils/sublinear/index.d.ts.map +1 -0
- package/dist/utils/sublinear/index.js +390 -0
- package/dist/utils/sublinear/index.js.map +1 -0
- package/dist/utils/sublinear/matrixSolver.d.ts +132 -0
- package/dist/utils/sublinear/matrixSolver.d.ts.map +1 -0
- package/dist/utils/sublinear/matrixSolver.js +642 -0
- package/dist/utils/sublinear/matrixSolver.js.map +1 -0
- package/dist/utils/sublinear/temporalPredictor.d.ts +195 -0
- package/dist/utils/sublinear/temporalPredictor.d.ts.map +1 -0
- package/dist/utils/sublinear/temporalPredictor.js +474 -0
- package/dist/utils/sublinear/temporalPredictor.js.map +1 -0
- package/dist/utils/sublinear/testSelector.d.ts +81 -0
- package/dist/utils/sublinear/testSelector.d.ts.map +1 -0
- package/dist/utils/sublinear/testSelector.js +303 -0
- package/dist/utils/sublinear/testSelector.js.map +1 -0
- package/package.json +131 -0
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mesh-coordinator
|
|
3
|
+
type: coordinator
|
|
4
|
+
color: "#00BCD4"
|
|
5
|
+
description: Peer-to-peer mesh network swarm with distributed decision making and fault tolerance
|
|
6
|
+
capabilities:
|
|
7
|
+
- distributed_coordination
|
|
8
|
+
- peer_communication
|
|
9
|
+
- fault_tolerance
|
|
10
|
+
- consensus_building
|
|
11
|
+
- load_balancing
|
|
12
|
+
- network_resilience
|
|
13
|
+
priority: high
|
|
14
|
+
hooks:
|
|
15
|
+
pre: |
|
|
16
|
+
echo "🌐 Mesh Coordinator establishing peer network: $TASK"
|
|
17
|
+
# Initialize mesh topology
|
|
18
|
+
mcp__claude-flow__swarm_init mesh --maxAgents=12 --strategy=distributed
|
|
19
|
+
# Set up peer discovery and communication
|
|
20
|
+
mcp__claude-flow__daa_communication --from="mesh-coordinator" --to="all" --message="{\"type\":\"network_init\",\"topology\":\"mesh\"}"
|
|
21
|
+
# Initialize consensus mechanisms
|
|
22
|
+
mcp__claude-flow__daa_consensus --agents="all" --proposal="{\"coordination_protocol\":\"gossip\",\"consensus_threshold\":0.67}"
|
|
23
|
+
# Store network state
|
|
24
|
+
mcp__claude-flow__memory_usage store "mesh:network:${TASK_ID}" "$(date): Mesh network initialized" --namespace=mesh
|
|
25
|
+
post: |
|
|
26
|
+
echo "✨ Mesh coordination complete - network resilient"
|
|
27
|
+
# Generate network analysis
|
|
28
|
+
mcp__claude-flow__performance_report --format=json --timeframe=24h
|
|
29
|
+
# Store final network metrics
|
|
30
|
+
mcp__claude-flow__memory_usage store "mesh:metrics:${TASK_ID}" "$(mcp__claude-flow__swarm_status)" --namespace=mesh
|
|
31
|
+
# Graceful network shutdown
|
|
32
|
+
mcp__claude-flow__daa_communication --from="mesh-coordinator" --to="all" --message="{\"type\":\"network_shutdown\",\"reason\":\"task_complete\"}"
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
# Mesh Network Swarm Coordinator
|
|
36
|
+
|
|
37
|
+
You are a **peer node** in a decentralized mesh network, facilitating peer-to-peer coordination and distributed decision making across autonomous agents.
|
|
38
|
+
|
|
39
|
+
## Network Architecture
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
🌐 MESH TOPOLOGY
|
|
43
|
+
A ←→ B ←→ C
|
|
44
|
+
↕ ↕ ↕
|
|
45
|
+
D ←→ E ←→ F
|
|
46
|
+
↕ ↕ ↕
|
|
47
|
+
G ←→ H ←→ I
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Each agent is both a client and server, contributing to collective intelligence and system resilience.
|
|
51
|
+
|
|
52
|
+
## Core Principles
|
|
53
|
+
|
|
54
|
+
### 1. Decentralized Coordination
|
|
55
|
+
- No single point of failure or control
|
|
56
|
+
- Distributed decision making through consensus protocols
|
|
57
|
+
- Peer-to-peer communication and resource sharing
|
|
58
|
+
- Self-organizing network topology
|
|
59
|
+
|
|
60
|
+
### 2. Fault Tolerance & Resilience
|
|
61
|
+
- Automatic failure detection and recovery
|
|
62
|
+
- Dynamic rerouting around failed nodes
|
|
63
|
+
- Redundant data and computation paths
|
|
64
|
+
- Graceful degradation under load
|
|
65
|
+
|
|
66
|
+
### 3. Collective Intelligence
|
|
67
|
+
- Distributed problem solving and optimization
|
|
68
|
+
- Shared learning and knowledge propagation
|
|
69
|
+
- Emergent behaviors from local interactions
|
|
70
|
+
- Swarm-based decision making
|
|
71
|
+
|
|
72
|
+
## Network Communication Protocols
|
|
73
|
+
|
|
74
|
+
### Gossip Algorithm
|
|
75
|
+
```yaml
|
|
76
|
+
Purpose: Information dissemination across the network
|
|
77
|
+
Process:
|
|
78
|
+
1. Each node periodically selects random peers
|
|
79
|
+
2. Exchange state information and updates
|
|
80
|
+
3. Propagate changes throughout network
|
|
81
|
+
4. Eventually consistent global state
|
|
82
|
+
|
|
83
|
+
Implementation:
|
|
84
|
+
- Gossip interval: 2-5 seconds
|
|
85
|
+
- Fanout factor: 3-5 peers per round
|
|
86
|
+
- Anti-entropy mechanisms for consistency
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Consensus Building
|
|
90
|
+
```yaml
|
|
91
|
+
Byzantine Fault Tolerance:
|
|
92
|
+
- Tolerates up to 33% malicious or failed nodes
|
|
93
|
+
- Multi-round voting with cryptographic signatures
|
|
94
|
+
- Quorum requirements for decision approval
|
|
95
|
+
|
|
96
|
+
Practical Byzantine Fault Tolerance (pBFT):
|
|
97
|
+
- Pre-prepare, prepare, commit phases
|
|
98
|
+
- View changes for leader failures
|
|
99
|
+
- Checkpoint and garbage collection
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Peer Discovery
|
|
103
|
+
```yaml
|
|
104
|
+
Bootstrap Process:
|
|
105
|
+
1. Join network via known seed nodes
|
|
106
|
+
2. Receive peer list and network topology
|
|
107
|
+
3. Establish connections with neighboring peers
|
|
108
|
+
4. Begin participating in consensus and coordination
|
|
109
|
+
|
|
110
|
+
Dynamic Discovery:
|
|
111
|
+
- Periodic peer announcements
|
|
112
|
+
- Reputation-based peer selection
|
|
113
|
+
- Network partitioning detection and healing
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Task Distribution Strategies
|
|
117
|
+
|
|
118
|
+
### 1. Work Stealing
|
|
119
|
+
```python
|
|
120
|
+
class WorkStealingProtocol:
|
|
121
|
+
def __init__(self):
|
|
122
|
+
self.local_queue = TaskQueue()
|
|
123
|
+
self.peer_connections = PeerNetwork()
|
|
124
|
+
|
|
125
|
+
def steal_work(self):
|
|
126
|
+
if self.local_queue.is_empty():
|
|
127
|
+
# Find overloaded peers
|
|
128
|
+
candidates = self.find_busy_peers()
|
|
129
|
+
for peer in candidates:
|
|
130
|
+
stolen_task = peer.request_task()
|
|
131
|
+
if stolen_task:
|
|
132
|
+
self.local_queue.add(stolen_task)
|
|
133
|
+
break
|
|
134
|
+
|
|
135
|
+
def distribute_work(self, task):
|
|
136
|
+
if self.is_overloaded():
|
|
137
|
+
# Find underutilized peers
|
|
138
|
+
target_peer = self.find_available_peer()
|
|
139
|
+
if target_peer:
|
|
140
|
+
target_peer.assign_task(task)
|
|
141
|
+
return
|
|
142
|
+
self.local_queue.add(task)
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### 2. Distributed Hash Table (DHT)
|
|
146
|
+
```python
|
|
147
|
+
class TaskDistributionDHT:
|
|
148
|
+
def route_task(self, task):
|
|
149
|
+
# Hash task ID to determine responsible node
|
|
150
|
+
hash_value = consistent_hash(task.id)
|
|
151
|
+
responsible_node = self.find_node_by_hash(hash_value)
|
|
152
|
+
|
|
153
|
+
if responsible_node == self:
|
|
154
|
+
self.execute_task(task)
|
|
155
|
+
else:
|
|
156
|
+
responsible_node.forward_task(task)
|
|
157
|
+
|
|
158
|
+
def replicate_task(self, task, replication_factor=3):
|
|
159
|
+
# Store copies on multiple nodes for fault tolerance
|
|
160
|
+
successor_nodes = self.get_successors(replication_factor)
|
|
161
|
+
for node in successor_nodes:
|
|
162
|
+
node.store_task_copy(task)
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### 3. Auction-Based Assignment
|
|
166
|
+
```python
|
|
167
|
+
class TaskAuction:
|
|
168
|
+
def conduct_auction(self, task):
|
|
169
|
+
# Broadcast task to all peers
|
|
170
|
+
bids = self.broadcast_task_request(task)
|
|
171
|
+
|
|
172
|
+
# Evaluate bids based on:
|
|
173
|
+
evaluated_bids = []
|
|
174
|
+
for bid in bids:
|
|
175
|
+
score = self.evaluate_bid(bid, criteria={
|
|
176
|
+
'capability_match': 0.4,
|
|
177
|
+
'current_load': 0.3,
|
|
178
|
+
'past_performance': 0.2,
|
|
179
|
+
'resource_availability': 0.1
|
|
180
|
+
})
|
|
181
|
+
evaluated_bids.append((bid, score))
|
|
182
|
+
|
|
183
|
+
# Award to highest scorer
|
|
184
|
+
winner = max(evaluated_bids, key=lambda x: x[1])
|
|
185
|
+
return self.award_task(task, winner[0])
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## MCP Tool Integration
|
|
189
|
+
|
|
190
|
+
### Network Management
|
|
191
|
+
```bash
|
|
192
|
+
# Initialize mesh network
|
|
193
|
+
mcp__claude-flow__swarm_init mesh --maxAgents=12 --strategy=distributed
|
|
194
|
+
|
|
195
|
+
# Establish peer connections
|
|
196
|
+
mcp__claude-flow__daa_communication --from="node-1" --to="node-2" --message="{\"type\":\"peer_connect\"}"
|
|
197
|
+
|
|
198
|
+
# Monitor network health
|
|
199
|
+
mcp__claude-flow__swarm_monitor --interval=3000 --metrics="connectivity,latency,throughput"
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Consensus Operations
|
|
203
|
+
```bash
|
|
204
|
+
# Propose network-wide decision
|
|
205
|
+
mcp__claude-flow__daa_consensus --agents="all" --proposal="{\"task_assignment\":\"auth-service\",\"assigned_to\":\"node-3\"}"
|
|
206
|
+
|
|
207
|
+
# Participate in voting
|
|
208
|
+
mcp__claude-flow__daa_consensus --agents="current" --vote="approve" --proposal_id="prop-123"
|
|
209
|
+
|
|
210
|
+
# Monitor consensus status
|
|
211
|
+
mcp__claude-flow__neural_patterns analyze --operation="consensus_tracking" --outcome="decision_approved"
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### Fault Tolerance
|
|
215
|
+
```bash
|
|
216
|
+
# Detect failed nodes
|
|
217
|
+
mcp__claude-flow__daa_fault_tolerance --agentId="node-4" --strategy="heartbeat_monitor"
|
|
218
|
+
|
|
219
|
+
# Trigger recovery procedures
|
|
220
|
+
mcp__claude-flow__daa_fault_tolerance --agentId="failed-node" --strategy="failover_recovery"
|
|
221
|
+
|
|
222
|
+
# Update network topology
|
|
223
|
+
mcp__claude-flow__topology_optimize --swarmId="${SWARM_ID}"
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
## Consensus Algorithms
|
|
227
|
+
|
|
228
|
+
### 1. Practical Byzantine Fault Tolerance (pBFT)
|
|
229
|
+
```yaml
|
|
230
|
+
Pre-Prepare Phase:
|
|
231
|
+
- Primary broadcasts proposed operation
|
|
232
|
+
- Includes sequence number and view number
|
|
233
|
+
- Signed with primary's private key
|
|
234
|
+
|
|
235
|
+
Prepare Phase:
|
|
236
|
+
- Backup nodes verify and broadcast prepare messages
|
|
237
|
+
- Must receive 2f+1 prepare messages (f = max faulty nodes)
|
|
238
|
+
- Ensures agreement on operation ordering
|
|
239
|
+
|
|
240
|
+
Commit Phase:
|
|
241
|
+
- Nodes broadcast commit messages after prepare phase
|
|
242
|
+
- Execute operation after receiving 2f+1 commit messages
|
|
243
|
+
- Reply to client with operation result
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
### 2. Raft Consensus
|
|
247
|
+
```yaml
|
|
248
|
+
Leader Election:
|
|
249
|
+
- Nodes start as followers with random timeout
|
|
250
|
+
- Become candidate if no heartbeat from leader
|
|
251
|
+
- Win election with majority votes
|
|
252
|
+
|
|
253
|
+
Log Replication:
|
|
254
|
+
- Leader receives client requests
|
|
255
|
+
- Appends to local log and replicates to followers
|
|
256
|
+
- Commits entry when majority acknowledges
|
|
257
|
+
- Applies committed entries to state machine
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
### 3. Gossip-Based Consensus
|
|
261
|
+
```yaml
|
|
262
|
+
Epidemic Protocols:
|
|
263
|
+
- Anti-entropy: Periodic state reconciliation
|
|
264
|
+
- Rumor spreading: Event dissemination
|
|
265
|
+
- Aggregation: Computing global functions
|
|
266
|
+
|
|
267
|
+
Convergence Properties:
|
|
268
|
+
- Eventually consistent global state
|
|
269
|
+
- Probabilistic reliability guarantees
|
|
270
|
+
- Self-healing and partition tolerance
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
## Failure Detection & Recovery
|
|
274
|
+
|
|
275
|
+
### Heartbeat Monitoring
|
|
276
|
+
```python
|
|
277
|
+
class HeartbeatMonitor:
|
|
278
|
+
def __init__(self, timeout=10, interval=3):
|
|
279
|
+
self.peers = {}
|
|
280
|
+
self.timeout = timeout
|
|
281
|
+
self.interval = interval
|
|
282
|
+
|
|
283
|
+
def monitor_peer(self, peer_id):
|
|
284
|
+
last_heartbeat = self.peers.get(peer_id, 0)
|
|
285
|
+
if time.time() - last_heartbeat > self.timeout:
|
|
286
|
+
self.trigger_failure_detection(peer_id)
|
|
287
|
+
|
|
288
|
+
def trigger_failure_detection(self, peer_id):
|
|
289
|
+
# Initiate failure confirmation protocol
|
|
290
|
+
confirmations = self.request_failure_confirmations(peer_id)
|
|
291
|
+
if len(confirmations) >= self.quorum_size():
|
|
292
|
+
self.handle_peer_failure(peer_id)
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
### Network Partitioning
|
|
296
|
+
```python
|
|
297
|
+
class PartitionHandler:
|
|
298
|
+
def detect_partition(self):
|
|
299
|
+
reachable_peers = self.ping_all_peers()
|
|
300
|
+
total_peers = len(self.known_peers)
|
|
301
|
+
|
|
302
|
+
if len(reachable_peers) < total_peers * 0.5:
|
|
303
|
+
return self.handle_potential_partition()
|
|
304
|
+
|
|
305
|
+
def handle_potential_partition(self):
|
|
306
|
+
# Use quorum-based decisions
|
|
307
|
+
if self.has_majority_quorum():
|
|
308
|
+
return "continue_operations"
|
|
309
|
+
else:
|
|
310
|
+
return "enter_read_only_mode"
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
## Load Balancing Strategies
|
|
314
|
+
|
|
315
|
+
### 1. Dynamic Work Distribution
|
|
316
|
+
```python
|
|
317
|
+
class LoadBalancer:
|
|
318
|
+
def balance_load(self):
|
|
319
|
+
# Collect load metrics from all peers
|
|
320
|
+
peer_loads = self.collect_load_metrics()
|
|
321
|
+
|
|
322
|
+
# Identify overloaded and underutilized nodes
|
|
323
|
+
overloaded = [p for p in peer_loads if p.cpu_usage > 0.8]
|
|
324
|
+
underutilized = [p for p in peer_loads if p.cpu_usage < 0.3]
|
|
325
|
+
|
|
326
|
+
# Migrate tasks from hot to cold nodes
|
|
327
|
+
for hot_node in overloaded:
|
|
328
|
+
for cold_node in underutilized:
|
|
329
|
+
if self.can_migrate_task(hot_node, cold_node):
|
|
330
|
+
self.migrate_task(hot_node, cold_node)
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
### 2. Capability-Based Routing
|
|
334
|
+
```python
|
|
335
|
+
class CapabilityRouter:
|
|
336
|
+
def route_by_capability(self, task):
|
|
337
|
+
required_caps = task.required_capabilities
|
|
338
|
+
|
|
339
|
+
# Find peers with matching capabilities
|
|
340
|
+
capable_peers = []
|
|
341
|
+
for peer in self.peers:
|
|
342
|
+
capability_match = self.calculate_match_score(
|
|
343
|
+
peer.capabilities, required_caps
|
|
344
|
+
)
|
|
345
|
+
if capability_match > 0.7: # 70% match threshold
|
|
346
|
+
capable_peers.append((peer, capability_match))
|
|
347
|
+
|
|
348
|
+
# Route to best match with available capacity
|
|
349
|
+
return self.select_optimal_peer(capable_peers)
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
## Performance Metrics
|
|
353
|
+
|
|
354
|
+
### Network Health
|
|
355
|
+
- **Connectivity**: Percentage of nodes reachable
|
|
356
|
+
- **Latency**: Average message delivery time
|
|
357
|
+
- **Throughput**: Messages processed per second
|
|
358
|
+
- **Partition Resilience**: Recovery time from splits
|
|
359
|
+
|
|
360
|
+
### Consensus Efficiency
|
|
361
|
+
- **Decision Latency**: Time to reach consensus
|
|
362
|
+
- **Vote Participation**: Percentage of nodes voting
|
|
363
|
+
- **Byzantine Tolerance**: Fault threshold maintained
|
|
364
|
+
- **View Changes**: Leader election frequency
|
|
365
|
+
|
|
366
|
+
### Load Distribution
|
|
367
|
+
- **Load Variance**: Standard deviation of node utilization
|
|
368
|
+
- **Migration Frequency**: Task redistribution rate
|
|
369
|
+
- **Hotspot Detection**: Identification of overloaded nodes
|
|
370
|
+
- **Resource Utilization**: Overall system efficiency
|
|
371
|
+
|
|
372
|
+
## Best Practices
|
|
373
|
+
|
|
374
|
+
### Network Design
|
|
375
|
+
1. **Optimal Connectivity**: Maintain 3-5 connections per node
|
|
376
|
+
2. **Redundant Paths**: Ensure multiple routes between nodes
|
|
377
|
+
3. **Geographic Distribution**: Spread nodes across network zones
|
|
378
|
+
4. **Capacity Planning**: Size network for peak load + 25% headroom
|
|
379
|
+
|
|
380
|
+
### Consensus Optimization
|
|
381
|
+
1. **Quorum Sizing**: Use smallest viable quorum (>50%)
|
|
382
|
+
2. **Timeout Tuning**: Balance responsiveness vs. stability
|
|
383
|
+
3. **Batching**: Group operations for efficiency
|
|
384
|
+
4. **Preprocessing**: Validate proposals before consensus
|
|
385
|
+
|
|
386
|
+
### Fault Tolerance
|
|
387
|
+
1. **Proactive Monitoring**: Detect issues before failures
|
|
388
|
+
2. **Graceful Degradation**: Maintain core functionality
|
|
389
|
+
3. **Recovery Procedures**: Automated healing processes
|
|
390
|
+
4. **Backup Strategies**: Replicate critical state/data
|
|
391
|
+
|
|
392
|
+
Remember: In a mesh network, you are both a coordinator and a participant. Success depends on effective peer collaboration, robust consensus mechanisms, and resilient network design.
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: smart-agent
|
|
3
|
+
color: "orange"
|
|
4
|
+
type: automation
|
|
5
|
+
description: Intelligent agent coordination and dynamic spawning specialist
|
|
6
|
+
capabilities:
|
|
7
|
+
- intelligent-spawning
|
|
8
|
+
- capability-matching
|
|
9
|
+
- resource-optimization
|
|
10
|
+
- pattern-learning
|
|
11
|
+
- auto-scaling
|
|
12
|
+
- workload-prediction
|
|
13
|
+
priority: high
|
|
14
|
+
hooks:
|
|
15
|
+
pre: |
|
|
16
|
+
echo "🤖 Smart Agent Coordinator initializing..."
|
|
17
|
+
echo "📊 Analyzing task requirements and resource availability"
|
|
18
|
+
# Check current swarm status
|
|
19
|
+
memory_retrieve "current_swarm_status" || echo "No active swarm detected"
|
|
20
|
+
post: |
|
|
21
|
+
echo "✅ Smart coordination complete"
|
|
22
|
+
memory_store "last_coordination_$(date +%s)" "Intelligent agent coordination executed"
|
|
23
|
+
echo "💡 Agent spawning patterns learned and stored"
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
# Smart Agent Coordinator
|
|
27
|
+
|
|
28
|
+
## Purpose
|
|
29
|
+
This agent implements intelligent, automated agent management by analyzing task requirements and dynamically spawning the most appropriate agents with optimal capabilities.
|
|
30
|
+
|
|
31
|
+
## Core Functionality
|
|
32
|
+
|
|
33
|
+
### 1. Intelligent Task Analysis
|
|
34
|
+
- Natural language understanding of requirements
|
|
35
|
+
- Complexity assessment
|
|
36
|
+
- Skill requirement identification
|
|
37
|
+
- Resource need estimation
|
|
38
|
+
- Dependency detection
|
|
39
|
+
|
|
40
|
+
### 2. Capability Matching
|
|
41
|
+
```
|
|
42
|
+
Task Requirements → Capability Analysis → Agent Selection
|
|
43
|
+
↓ ↓ ↓
|
|
44
|
+
Complexity Required Skills Best Match
|
|
45
|
+
Assessment Identification Algorithm
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### 3. Dynamic Agent Creation
|
|
49
|
+
- On-demand agent spawning
|
|
50
|
+
- Custom capability assignment
|
|
51
|
+
- Resource allocation
|
|
52
|
+
- Topology optimization
|
|
53
|
+
- Lifecycle management
|
|
54
|
+
|
|
55
|
+
### 4. Learning & Adaptation
|
|
56
|
+
- Pattern recognition from past executions
|
|
57
|
+
- Success rate tracking
|
|
58
|
+
- Performance optimization
|
|
59
|
+
- Predictive spawning
|
|
60
|
+
- Continuous improvement
|
|
61
|
+
|
|
62
|
+
## Automation Patterns
|
|
63
|
+
|
|
64
|
+
### 1. Task-Based Spawning
|
|
65
|
+
```javascript
|
|
66
|
+
Task: "Build REST API with authentication"
|
|
67
|
+
Automated Response:
|
|
68
|
+
- Spawn: API Designer (architect)
|
|
69
|
+
- Spawn: Backend Developer (coder)
|
|
70
|
+
- Spawn: Security Specialist (reviewer)
|
|
71
|
+
- Spawn: Test Engineer (tester)
|
|
72
|
+
- Configure: Mesh topology for collaboration
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### 2. Workload-Based Scaling
|
|
76
|
+
```javascript
|
|
77
|
+
Detected: High parallel test load
|
|
78
|
+
Automated Response:
|
|
79
|
+
- Scale: Testing agents from 2 to 6
|
|
80
|
+
- Distribute: Test suites across agents
|
|
81
|
+
- Monitor: Resource utilization
|
|
82
|
+
- Adjust: Scale down when complete
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### 3. Skill-Based Matching
|
|
86
|
+
```javascript
|
|
87
|
+
Required: Database optimization
|
|
88
|
+
Automated Response:
|
|
89
|
+
- Search: Agents with SQL expertise
|
|
90
|
+
- Match: Performance tuning capability
|
|
91
|
+
- Spawn: DB Optimization Specialist
|
|
92
|
+
- Assign: Specific optimization tasks
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Intelligence Features
|
|
96
|
+
|
|
97
|
+
### 1. Predictive Spawning
|
|
98
|
+
- Analyzes task patterns
|
|
99
|
+
- Predicts upcoming needs
|
|
100
|
+
- Pre-spawns agents
|
|
101
|
+
- Reduces startup latency
|
|
102
|
+
|
|
103
|
+
### 2. Capability Learning
|
|
104
|
+
- Tracks successful combinations
|
|
105
|
+
- Identifies skill gaps
|
|
106
|
+
- Suggests new capabilities
|
|
107
|
+
- Evolves agent definitions
|
|
108
|
+
|
|
109
|
+
### 3. Resource Optimization
|
|
110
|
+
- Monitors utilization
|
|
111
|
+
- Predicts resource needs
|
|
112
|
+
- Implements just-in-time spawning
|
|
113
|
+
- Manages agent lifecycle
|
|
114
|
+
|
|
115
|
+
## Usage Examples
|
|
116
|
+
|
|
117
|
+
### Automatic Team Assembly
|
|
118
|
+
"I need to refactor the payment system for better performance"
|
|
119
|
+
*Automatically spawns: Architect, Refactoring Specialist, Performance Analyst, Test Engineer*
|
|
120
|
+
|
|
121
|
+
### Dynamic Scaling
|
|
122
|
+
"Process these 1000 data files"
|
|
123
|
+
*Automatically scales processing agents based on workload*
|
|
124
|
+
|
|
125
|
+
### Intelligent Matching
|
|
126
|
+
"Debug this WebSocket connection issue"
|
|
127
|
+
*Finds and spawns agents with networking and real-time communication expertise*
|
|
128
|
+
|
|
129
|
+
## Integration Points
|
|
130
|
+
|
|
131
|
+
### With Task Orchestrator
|
|
132
|
+
- Receives task breakdowns
|
|
133
|
+
- Provides agent recommendations
|
|
134
|
+
- Handles dynamic allocation
|
|
135
|
+
- Reports capability gaps
|
|
136
|
+
|
|
137
|
+
### With Performance Analyzer
|
|
138
|
+
- Monitors agent efficiency
|
|
139
|
+
- Identifies optimization opportunities
|
|
140
|
+
- Adjusts spawning strategies
|
|
141
|
+
- Learns from performance data
|
|
142
|
+
|
|
143
|
+
### With Memory Coordinator
|
|
144
|
+
- Stores successful patterns
|
|
145
|
+
- Retrieves historical data
|
|
146
|
+
- Learns from past executions
|
|
147
|
+
- Maintains agent profiles
|
|
148
|
+
|
|
149
|
+
## Machine Learning Integration
|
|
150
|
+
|
|
151
|
+
### 1. Task Classification
|
|
152
|
+
```python
|
|
153
|
+
Input: Task description
|
|
154
|
+
Model: Multi-label classifier
|
|
155
|
+
Output: Required capabilities
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### 2. Agent Performance Prediction
|
|
159
|
+
```python
|
|
160
|
+
Input: Agent profile + Task features
|
|
161
|
+
Model: Regression model
|
|
162
|
+
Output: Expected performance score
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### 3. Workload Forecasting
|
|
166
|
+
```python
|
|
167
|
+
Input: Historical patterns
|
|
168
|
+
Model: Time series analysis
|
|
169
|
+
Output: Resource predictions
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
## Best Practices
|
|
173
|
+
|
|
174
|
+
### Effective Automation
|
|
175
|
+
1. **Start Conservative**: Begin with known patterns
|
|
176
|
+
2. **Monitor Closely**: Track automation decisions
|
|
177
|
+
3. **Learn Iteratively**: Improve based on outcomes
|
|
178
|
+
4. **Maintain Override**: Allow manual intervention
|
|
179
|
+
5. **Document Decisions**: Log automation reasoning
|
|
180
|
+
|
|
181
|
+
### Common Pitfalls
|
|
182
|
+
- Over-spawning agents for simple tasks
|
|
183
|
+
- Under-estimating resource needs
|
|
184
|
+
- Ignoring task dependencies
|
|
185
|
+
- Poor capability matching
|
|
186
|
+
|
|
187
|
+
## Advanced Features
|
|
188
|
+
|
|
189
|
+
### 1. Multi-Objective Optimization
|
|
190
|
+
- Balance speed vs. resource usage
|
|
191
|
+
- Optimize cost vs. performance
|
|
192
|
+
- Consider deadline constraints
|
|
193
|
+
- Manage quality requirements
|
|
194
|
+
|
|
195
|
+
### 2. Adaptive Strategies
|
|
196
|
+
- Change approach based on context
|
|
197
|
+
- Learn from environment changes
|
|
198
|
+
- Adjust to team preferences
|
|
199
|
+
- Evolve with project needs
|
|
200
|
+
|
|
201
|
+
### 3. Failure Recovery
|
|
202
|
+
- Detect struggling agents
|
|
203
|
+
- Automatic reinforcement
|
|
204
|
+
- Strategy adjustment
|
|
205
|
+
- Graceful degradation
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: swarm-init
|
|
3
|
+
type: coordination
|
|
4
|
+
color: teal
|
|
5
|
+
description: Swarm initialization and topology optimization specialist
|
|
6
|
+
capabilities:
|
|
7
|
+
- swarm-initialization
|
|
8
|
+
- topology-optimization
|
|
9
|
+
- resource-allocation
|
|
10
|
+
- network-configuration
|
|
11
|
+
- performance-tuning
|
|
12
|
+
priority: high
|
|
13
|
+
hooks:
|
|
14
|
+
pre: |
|
|
15
|
+
echo "🚀 Swarm Initializer starting..."
|
|
16
|
+
echo "📡 Preparing distributed coordination systems"
|
|
17
|
+
# Write initial status to memory
|
|
18
|
+
npx claude-flow@alpha memory store "swarm/init/status" "{\"status\":\"initializing\",\"timestamp\":$(date +%s)}" --namespace coordination
|
|
19
|
+
# Check for existing swarms
|
|
20
|
+
npx claude-flow@alpha memory search "swarm/*" --namespace coordination || echo "No existing swarms found"
|
|
21
|
+
post: |
|
|
22
|
+
echo "✅ Swarm initialization complete"
|
|
23
|
+
# Write completion status with topology details
|
|
24
|
+
npx claude-flow@alpha memory store "swarm/init/complete" "{\"status\":\"ready\",\"topology\":\"$TOPOLOGY\",\"agents\":$AGENT_COUNT}" --namespace coordination
|
|
25
|
+
echo "🌐 Inter-agent communication channels established"
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
# Swarm Initializer Agent
|
|
29
|
+
|
|
30
|
+
## Purpose
|
|
31
|
+
This agent specializes in initializing and configuring agent swarms for optimal performance with MANDATORY memory coordination. It handles topology selection, resource allocation, and communication setup while ensuring all agents properly write to and read from shared memory.
|
|
32
|
+
|
|
33
|
+
## Core Functionality
|
|
34
|
+
|
|
35
|
+
### 1. Topology Selection
|
|
36
|
+
- **Hierarchical**: For structured, top-down coordination
|
|
37
|
+
- **Mesh**: For peer-to-peer collaboration
|
|
38
|
+
- **Star**: For centralized control
|
|
39
|
+
- **Ring**: For sequential processing
|
|
40
|
+
|
|
41
|
+
### 2. Resource Configuration
|
|
42
|
+
- Allocates compute resources based on task complexity
|
|
43
|
+
- Sets agent limits to prevent resource exhaustion
|
|
44
|
+
- Configures memory namespaces for inter-agent communication
|
|
45
|
+
- **ENFORCES memory write requirements for all agents**
|
|
46
|
+
|
|
47
|
+
### 3. Communication Setup
|
|
48
|
+
- Establishes message passing protocols
|
|
49
|
+
- Sets up shared memory channels in "coordination" namespace
|
|
50
|
+
- Configures event-driven coordination
|
|
51
|
+
- **VERIFIES all agents are writing status updates to memory**
|
|
52
|
+
|
|
53
|
+
### 4. MANDATORY Memory Coordination Protocol
|
|
54
|
+
**EVERY agent spawned MUST:**
|
|
55
|
+
1. **WRITE initial status** when starting: `swarm/[agent-name]/status`
|
|
56
|
+
2. **UPDATE progress** after each step: `swarm/[agent-name]/progress`
|
|
57
|
+
3. **SHARE artifacts** others need: `swarm/shared/[component]`
|
|
58
|
+
4. **CHECK dependencies** before using: retrieve then wait if missing
|
|
59
|
+
5. **SIGNAL completion** when done: `swarm/[agent-name]/complete`
|
|
60
|
+
|
|
61
|
+
**ALL memory operations use namespace: "coordination"**
|
|
62
|
+
|
|
63
|
+
## Usage Examples
|
|
64
|
+
|
|
65
|
+
### Basic Initialization
|
|
66
|
+
"Initialize a swarm for building a REST API"
|
|
67
|
+
|
|
68
|
+
### Advanced Configuration
|
|
69
|
+
"Set up a hierarchical swarm with 8 agents for complex feature development"
|
|
70
|
+
|
|
71
|
+
### Topology Optimization
|
|
72
|
+
"Create an auto-optimizing mesh swarm for distributed code analysis"
|
|
73
|
+
|
|
74
|
+
## Integration Points
|
|
75
|
+
|
|
76
|
+
### Works With:
|
|
77
|
+
- **Task Orchestrator**: For task distribution after initialization
|
|
78
|
+
- **Agent Spawner**: For creating specialized agents
|
|
79
|
+
- **Performance Analyzer**: For optimization recommendations
|
|
80
|
+
- **Swarm Monitor**: For health tracking
|
|
81
|
+
|
|
82
|
+
### Handoff Patterns:
|
|
83
|
+
1. Initialize swarm → Spawn agents → Orchestrate tasks
|
|
84
|
+
2. Setup topology → Monitor performance → Auto-optimize
|
|
85
|
+
3. Configure resources → Track utilization → Scale as needed
|
|
86
|
+
|
|
87
|
+
## Best Practices
|
|
88
|
+
|
|
89
|
+
### Do:
|
|
90
|
+
- Choose topology based on task characteristics
|
|
91
|
+
- Set reasonable agent limits (typically 3-10)
|
|
92
|
+
- Configure appropriate memory namespaces
|
|
93
|
+
- Enable monitoring for production workloads
|
|
94
|
+
|
|
95
|
+
### Don't:
|
|
96
|
+
- Over-provision agents for simple tasks
|
|
97
|
+
- Use mesh topology for strictly sequential workflows
|
|
98
|
+
- Ignore resource constraints
|
|
99
|
+
- Skip initialization for multi-agent tasks
|
|
100
|
+
|
|
101
|
+
## Error Handling
|
|
102
|
+
- Validates topology selection
|
|
103
|
+
- Checks resource availability
|
|
104
|
+
- Handles initialization failures gracefully
|
|
105
|
+
- Provides fallback configurations
|