claude-flow-novice 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/MIGRATION_SUMMARY.md +222 -0
- package/.claude/agents/README.md +89 -0
- 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/README.md +253 -0
- package/.claude/agents/consensus/byzantine-coordinator.md +63 -0
- package/.claude/agents/consensus/consensus-builder.md +242 -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 +211 -0
- package/.claude/agents/core/planner.md +116 -0
- package/.claude/agents/core/researcher.md +136 -0
- package/.claude/agents/core/reviewer.md +272 -0
- package/.claude/agents/core/tester.md +266 -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/goal-planner.md +73 -0
- package/.claude/agents/neural/safla-neural.md +74 -0
- package/.claude/agents/optimization/README.md +250 -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/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/sublinear/consciousness-evolution-agent.md +499 -0
- package/.claude/agents/sublinear/matrix-solver-agent.md +113 -0
- package/.claude/agents/sublinear/nanosecond-scheduler-agent.md +644 -0
- package/.claude/agents/sublinear/pagerank-agent.md +699 -0
- package/.claude/agents/sublinear/phi-calculator-agent.md +749 -0
- package/.claude/agents/sublinear/psycho-symbolic-agent.md +543 -0
- package/.claude/agents/sublinear/sublinear.md +816 -0
- package/.claude/agents/sublinear/temporal-advantage-agent.md +360 -0
- package/.claude/agents/swarm/README.md +190 -0
- package/.claude/agents/swarm/adaptive-coordinator.md +396 -0
- package/.claude/agents/swarm/hierarchical-coordinator.md +300 -0
- package/.claude/agents/swarm/mesh-coordinator.md +435 -0
- package/.claude/agents/templates/automation-smart-agent.md +205 -0
- package/.claude/agents/templates/coordinator-swarm-init.md +90 -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/e2e/playwright-agent.md +249 -0
- package/.claude/agents/testing/unit/tdd-london-swarm.md +244 -0
- package/.claude/agents/testing/validation/production-validator.md +395 -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/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 +58 -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/README.md +261 -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/testing/playwright-e2e.md +288 -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 +112 -0
- package/.claude/settings.local.json +10 -0
- package/CHANGELOG.md +1517 -0
- package/LICENSE +21 -0
- package/README.md +338 -0
- package/dist/src/adapters/cliffy-node.js +70 -0
- package/dist/src/adapters/cliffy-node.js.map +1 -0
- package/dist/src/agents/agent-loader.js +208 -0
- package/dist/src/agents/agent-loader.js.map +1 -0
- package/dist/src/agents/agent-manager.js +1786 -0
- package/dist/src/agents/agent-manager.js.map +1 -0
- package/dist/src/agents/agent-registry.js +356 -0
- package/dist/src/agents/agent-registry.js.map +1 -0
- package/dist/src/agents/agent-validator.js +273 -0
- package/dist/src/agents/agent-validator.js.map +1 -0
- package/dist/src/agents/github/agent-factory.js +553 -0
- package/dist/src/agents/github/agent-factory.js.map +1 -0
- package/dist/src/agents/github/compatibility/legacy-agent-mappings.js +307 -0
- package/dist/src/agents/github/compatibility/legacy-agent-mappings.js.map +1 -0
- package/dist/src/agents/github/compatibility/legacy-agent-proxy.js +334 -0
- package/dist/src/agents/github/compatibility/legacy-agent-proxy.js.map +1 -0
- package/dist/src/agents/github/core/github-collaboration-manager.js +796 -0
- package/dist/src/agents/github/core/github-collaboration-manager.js.map +1 -0
- package/dist/src/agents/github/core/github-integration-manager.js +546 -0
- package/dist/src/agents/github/core/github-integration-manager.js.map +1 -0
- package/dist/src/agents/github/core/github-release-coordinator.js +718 -0
- package/dist/src/agents/github/core/github-release-coordinator.js.map +1 -0
- package/dist/src/agents/github/index.js +68 -0
- package/dist/src/agents/github/index.js.map +1 -0
- package/dist/src/agents/github/types/index.js +6 -0
- package/dist/src/agents/github/types/index.js.map +1 -0
- package/dist/src/agents/github/utils/error-handling.js +496 -0
- package/dist/src/agents/github/utils/error-handling.js.map +1 -0
- package/dist/src/agents/github/utils/github-client.js +158 -0
- package/dist/src/agents/github/utils/github-client.js.map +1 -0
- package/dist/src/agents/github/utils/hook-integration.js +450 -0
- package/dist/src/agents/github/utils/hook-integration.js.map +1 -0
- package/dist/src/agents/github/utils/performance-optimizer.js +501 -0
- package/dist/src/agents/github/utils/performance-optimizer.js.map +1 -0
- package/dist/src/agents/hierarchical-coordinator.js +775 -0
- package/dist/src/agents/hierarchical-coordinator.js.map +1 -0
- package/dist/src/agents/lifecycle-manager.js +613 -0
- package/dist/src/agents/lifecycle-manager.js.map +1 -0
- package/dist/src/agents/mesh-coordinator.js +580 -0
- package/dist/src/agents/mesh-coordinator.js.map +1 -0
- package/dist/src/agents/simple-agent.js +89 -0
- package/dist/src/agents/simple-agent.js.map +1 -0
- package/dist/src/agents/task-agent-integration.js +240 -0
- package/dist/src/agents/task-agent-integration.js.map +1 -0
- package/dist/src/api/auth-service.js +474 -0
- package/dist/src/api/auth-service.js.map +1 -0
- package/dist/src/api/claude-api-errors.js +171 -0
- package/dist/src/api/claude-api-errors.js.map +1 -0
- package/dist/src/api/claude-client-enhanced.js +473 -0
- package/dist/src/api/claude-client-enhanced.js.map +1 -0
- package/dist/src/api/claude-client.js +527 -0
- package/dist/src/api/claude-client.js.map +1 -0
- package/dist/src/api/database-service.js +666 -0
- package/dist/src/api/database-service.js.map +1 -0
- package/dist/src/api/swarm-api.js +585 -0
- package/dist/src/api/swarm-api.js.map +1 -0
- package/dist/src/automation/test-pipeline/E2ETestGenerator.js +448 -0
- package/dist/src/automation/test-pipeline/E2ETestGenerator.js.map +1 -0
- package/dist/src/automation/test-pipeline/PerformanceMonitor.js +572 -0
- package/dist/src/automation/test-pipeline/PerformanceMonitor.js.map +1 -0
- package/dist/src/automation/test-pipeline/PipelineValidator.js +654 -0
- package/dist/src/automation/test-pipeline/PipelineValidator.js.map +1 -0
- package/dist/src/automation/test-pipeline/RegressionTestManager.js +545 -0
- package/dist/src/automation/test-pipeline/RegressionTestManager.js.map +1 -0
- package/dist/src/automation/test-pipeline/SwarmTestCoordinator.js +450 -0
- package/dist/src/automation/test-pipeline/SwarmTestCoordinator.js.map +1 -0
- package/dist/src/automation/test-pipeline/TestDataManager.js +708 -0
- package/dist/src/automation/test-pipeline/TestDataManager.js.map +1 -0
- package/dist/src/automation/test-pipeline/TestReportingSystem.js +527 -0
- package/dist/src/automation/test-pipeline/TestReportingSystem.js.map +1 -0
- package/dist/src/automation/test-pipeline/utils/chrome-mcp-integration.js +353 -0
- package/dist/src/automation/test-pipeline/utils/chrome-mcp-integration.js.map +1 -0
- package/dist/src/automation/test-pipeline/utils/swarm-coordinator.js +448 -0
- package/dist/src/automation/test-pipeline/utils/swarm-coordinator.js.map +1 -0
- package/dist/src/ci-cd/deployment-orchestrator.js +477 -0
- package/dist/src/ci-cd/deployment-orchestrator.js.map +1 -0
- package/dist/src/ci-cd/github-actions-templates.js +972 -0
- package/dist/src/ci-cd/github-actions-templates.js.map +1 -0
- package/dist/src/ci-cd/performance/PerformanceGate.js +383 -0
- package/dist/src/ci-cd/performance/PerformanceGate.js.map +1 -0
- package/dist/src/cli/agents/analyst.js +788 -0
- package/dist/src/cli/agents/analyst.js.map +1 -0
- package/dist/src/cli/agents/architect.js +846 -0
- package/dist/src/cli/agents/architect.js.map +1 -0
- package/dist/src/cli/agents/base-agent.js +437 -0
- package/dist/src/cli/agents/base-agent.js.map +1 -0
- package/dist/src/cli/agents/capabilities.js +701 -0
- package/dist/src/cli/agents/capabilities.js.map +1 -0
- package/dist/src/cli/agents/coder.js +936 -0
- package/dist/src/cli/agents/coder.js.map +1 -0
- package/dist/src/cli/agents/coordinator.js +489 -0
- package/dist/src/cli/agents/coordinator.js.map +1 -0
- package/dist/src/cli/agents/hive-agents.js +708 -0
- package/dist/src/cli/agents/hive-agents.js.map +1 -0
- package/dist/src/cli/agents/index.js +299 -0
- package/dist/src/cli/agents/index.js.map +1 -0
- package/dist/src/cli/agents/researcher.js +388 -0
- package/dist/src/cli/agents/researcher.js.map +1 -0
- package/dist/src/cli/agents/tester.js +634 -0
- package/dist/src/cli/agents/tester.js.map +1 -0
- package/dist/src/cli/cli-core.js +264 -0
- package/dist/src/cli/cli-core.js.map +1 -0
- package/dist/src/cli/commands/advanced-memory-commands.js +834 -0
- package/dist/src/cli/commands/advanced-memory-commands.js.map +1 -0
- package/dist/src/cli/commands/agent-simple.js +346 -0
- package/dist/src/cli/commands/agent-simple.js.map +1 -0
- package/dist/src/cli/commands/agent.js +368 -0
- package/dist/src/cli/commands/agent.js.map +1 -0
- package/dist/src/cli/commands/claude-api.js +237 -0
- package/dist/src/cli/commands/claude-api.js.map +1 -0
- package/dist/src/cli/commands/claude.js +132 -0
- package/dist/src/cli/commands/claude.js.map +1 -0
- package/dist/src/cli/commands/config-integration.js +395 -0
- package/dist/src/cli/commands/config-integration.js.map +1 -0
- package/dist/src/cli/commands/config.js +67 -0
- package/dist/src/cli/commands/config.js.map +1 -0
- package/dist/src/cli/commands/enterprise.js +1523 -0
- package/dist/src/cli/commands/enterprise.js.map +1 -0
- package/dist/src/cli/commands/goal-init.js +262 -0
- package/dist/src/cli/commands/goal-init.js.map +1 -0
- package/dist/src/cli/commands/help-new.js +276 -0
- package/dist/src/cli/commands/help-new.js.map +1 -0
- package/dist/src/cli/commands/help.js +1055 -0
- package/dist/src/cli/commands/help.js.map +1 -0
- package/dist/src/cli/commands/hive-mind/index.js +20 -0
- package/dist/src/cli/commands/hive-mind/index.js.map +1 -0
- package/dist/src/cli/commands/hive-mind/init.js +58 -0
- package/dist/src/cli/commands/hive-mind/init.js.map +1 -0
- package/dist/src/cli/commands/hive-mind/optimize-memory.js +362 -0
- package/dist/src/cli/commands/hive-mind/optimize-memory.js.map +1 -0
- package/dist/src/cli/commands/hive-mind/pause.js +73 -0
- package/dist/src/cli/commands/hive-mind/pause.js.map +1 -0
- package/dist/src/cli/commands/hive-mind/ps.js +104 -0
- package/dist/src/cli/commands/hive-mind/ps.js.map +1 -0
- package/dist/src/cli/commands/hive-mind/resume.js +56 -0
- package/dist/src/cli/commands/hive-mind/resume.js.map +1 -0
- package/dist/src/cli/commands/hive-mind/spawn.js +242 -0
- package/dist/src/cli/commands/hive-mind/spawn.js.map +1 -0
- package/dist/src/cli/commands/hive-mind/status.js +250 -0
- package/dist/src/cli/commands/hive-mind/status.js.map +1 -0
- package/dist/src/cli/commands/hive-mind/stop.js +116 -0
- package/dist/src/cli/commands/hive-mind/stop.js.map +1 -0
- package/dist/src/cli/commands/hive-mind/task.js +302 -0
- package/dist/src/cli/commands/hive-mind/task.js.map +1 -0
- package/dist/src/cli/commands/hive-mind/wizard.js +705 -0
- package/dist/src/cli/commands/hive-mind/wizard.js.map +1 -0
- package/dist/src/cli/commands/hive.js +506 -0
- package/dist/src/cli/commands/hive.js.map +1 -0
- package/dist/src/cli/commands/hook-types.js +5 -0
- package/dist/src/cli/commands/hook-types.js.map +1 -0
- package/dist/src/cli/commands/hook-validator.js +177 -0
- package/dist/src/cli/commands/hook-validator.js.map +1 -0
- package/dist/src/cli/commands/hook.js +303 -0
- package/dist/src/cli/commands/hook.js.map +1 -0
- package/dist/src/cli/commands/index.js +2745 -0
- package/dist/src/cli/commands/index.js.map +1 -0
- package/dist/src/cli/commands/maestro.js +242 -0
- package/dist/src/cli/commands/maestro.js.map +1 -0
- package/dist/src/cli/commands/mcp.js +148 -0
- package/dist/src/cli/commands/mcp.js.map +1 -0
- package/dist/src/cli/commands/memory.js +193 -0
- package/dist/src/cli/commands/memory.js.map +1 -0
- package/dist/src/cli/commands/migrate.js +107 -0
- package/dist/src/cli/commands/migrate.js.map +1 -0
- package/dist/src/cli/commands/monitor.js +574 -0
- package/dist/src/cli/commands/monitor.js.map +1 -0
- package/dist/src/cli/commands/neural-init.js +211 -0
- package/dist/src/cli/commands/neural-init.js.map +1 -0
- package/dist/src/cli/commands/ruv-swarm.js +555 -0
- package/dist/src/cli/commands/ruv-swarm.js.map +1 -0
- package/dist/src/cli/commands/session.js +517 -0
- package/dist/src/cli/commands/session.js.map +1 -0
- package/dist/src/cli/commands/sparc.js +486 -0
- package/dist/src/cli/commands/sparc.js.map +1 -0
- package/dist/src/cli/commands/start/event-emitter.js +35 -0
- package/dist/src/cli/commands/start/event-emitter.js.map +1 -0
- package/dist/src/cli/commands/start/index.js +9 -0
- package/dist/src/cli/commands/start/index.js.map +1 -0
- package/dist/src/cli/commands/start/process-manager.js +294 -0
- package/dist/src/cli/commands/start/process-manager.js.map +1 -0
- package/dist/src/cli/commands/start/process-ui-simple.js +322 -0
- package/dist/src/cli/commands/start/process-ui-simple.js.map +1 -0
- package/dist/src/cli/commands/start/process-ui.js +5 -0
- package/dist/src/cli/commands/start/process-ui.js.map +1 -0
- package/dist/src/cli/commands/start/start-command.js +463 -0
- package/dist/src/cli/commands/start/start-command.js.map +1 -0
- package/dist/src/cli/commands/start/system-monitor.js +268 -0
- package/dist/src/cli/commands/start/system-monitor.js.map +1 -0
- package/dist/src/cli/commands/start/types.js +22 -0
- package/dist/src/cli/commands/start/types.js.map +1 -0
- package/dist/src/cli/commands/start.js +6 -0
- package/dist/src/cli/commands/start.js.map +1 -0
- package/dist/src/cli/commands/status.js +328 -0
- package/dist/src/cli/commands/status.js.map +1 -0
- package/dist/src/cli/commands/swarm-spawn.js +56 -0
- package/dist/src/cli/commands/swarm-spawn.js.map +1 -0
- package/dist/src/cli/commands/swarm.js +567 -0
- package/dist/src/cli/commands/swarm.js.map +1 -0
- package/dist/src/cli/commands/task.js +44 -0
- package/dist/src/cli/commands/task.js.map +1 -0
- package/dist/src/cli/commands/validate-integration.js +122 -0
- package/dist/src/cli/commands/validate-integration.js.map +1 -0
- package/dist/src/cli/commands/verification.js +351 -0
- package/dist/src/cli/commands/verification.js.map +1 -0
- package/dist/src/cli/commands/workflow.js +615 -0
- package/dist/src/cli/commands/workflow.js.map +1 -0
- package/dist/src/cli/completion.js +578 -0
- package/dist/src/cli/completion.js.map +1 -0
- package/dist/src/cli/consolidated/ConsolidatedCLI.js +379 -0
- package/dist/src/cli/consolidated/ConsolidatedCLI.js.map +1 -0
- package/dist/src/cli/consolidated/core/CommandHandlers.js +833 -0
- package/dist/src/cli/consolidated/core/CommandHandlers.js.map +1 -0
- package/dist/src/cli/consolidated/core/TierManager.js +291 -0
- package/dist/src/cli/consolidated/core/TierManager.js.map +1 -0
- package/dist/src/cli/consolidated/help/InteractiveHelp.js +714 -0
- package/dist/src/cli/consolidated/help/InteractiveHelp.js.map +1 -0
- package/dist/src/cli/consolidated/index.js +62 -0
- package/dist/src/cli/consolidated/index.js.map +1 -0
- package/dist/src/cli/consolidated/intelligence/IntelligenceEngine.js +457 -0
- package/dist/src/cli/consolidated/intelligence/IntelligenceEngine.js.map +1 -0
- package/dist/src/cli/consolidated/routing/CommandRouter.js +526 -0
- package/dist/src/cli/consolidated/routing/CommandRouter.js.map +1 -0
- package/dist/src/cli/consolidated/utils/IntelligentDefaults.js +729 -0
- package/dist/src/cli/consolidated/utils/IntelligentDefaults.js.map +1 -0
- package/dist/src/cli/consolidated/utils/PerformanceOptimizer.js +416 -0
- package/dist/src/cli/consolidated/utils/PerformanceOptimizer.js.map +1 -0
- package/dist/src/cli/formatter.js +284 -0
- package/dist/src/cli/formatter.js.map +1 -0
- package/dist/src/cli/help-formatter.js +111 -0
- package/dist/src/cli/help-formatter.js.map +1 -0
- package/dist/src/cli/index-remote.js +125 -0
- package/dist/src/cli/index-remote.js.map +1 -0
- package/dist/src/cli/index.js +159 -0
- package/dist/src/cli/index.js.map +1 -0
- package/dist/src/cli/init/batch-tools.js +388 -0
- package/dist/src/cli/init/batch-tools.js.map +1 -0
- package/dist/src/cli/init/claude-config.js +401 -0
- package/dist/src/cli/init/claude-config.js.map +1 -0
- package/dist/src/cli/init/directory-structure.js +146 -0
- package/dist/src/cli/init/directory-structure.js.map +1 -0
- package/dist/src/cli/init/index.js +52 -0
- package/dist/src/cli/init/index.js.map +1 -0
- package/dist/src/cli/init/sparc-environment.js +543 -0
- package/dist/src/cli/init/sparc-environment.js.map +1 -0
- package/dist/src/cli/init/swarm-commands.js +796 -0
- package/dist/src/cli/init/swarm-commands.js.map +1 -0
- package/dist/src/cli/init/utils.js +15 -0
- package/dist/src/cli/init/utils.js.map +1 -0
- package/dist/src/cli/maestro-cli-bridge.js +426 -0
- package/dist/src/cli/maestro-cli-bridge.js.map +1 -0
- package/dist/src/cli/main.js +26 -0
- package/dist/src/cli/main.js.map +1 -0
- package/dist/src/cli/node-repl.js +652 -0
- package/dist/src/cli/node-repl.js.map +1 -0
- package/dist/src/cli/repl.js +1078 -0
- package/dist/src/cli/repl.js.map +1 -0
- package/dist/src/cli/simple-cli.js +3026 -0
- package/dist/src/cli/simple-cli.js.map +1 -0
- package/dist/src/cli/simple-mcp.js +87 -0
- package/dist/src/cli/simple-mcp.js.map +1 -0
- package/dist/src/cli/simple-orchestrator.js +857 -0
- package/dist/src/cli/simple-orchestrator.js.map +1 -0
- package/dist/src/cli/ui/compatible-ui.js +322 -0
- package/dist/src/cli/ui/compatible-ui.js.map +1 -0
- package/dist/src/cli/ui/fallback-handler.js +156 -0
- package/dist/src/cli/ui/fallback-handler.js.map +1 -0
- package/dist/src/cli/ui/index.js +32 -0
- package/dist/src/cli/ui/index.js.map +1 -0
- package/dist/src/cli/utils/environment-detector.js +228 -0
- package/dist/src/cli/utils/environment-detector.js.map +1 -0
- package/dist/src/cli/utils/prompt-defaults.js +234 -0
- package/dist/src/cli/utils/prompt-defaults.js.map +1 -0
- package/dist/src/cli/validation-helper.js +66 -0
- package/dist/src/cli/validation-helper.js.map +1 -0
- package/dist/src/communication/message-bus.js +1007 -0
- package/dist/src/communication/message-bus.js.map +1 -0
- package/dist/src/communication/reliable-communication-manager.js +374 -0
- package/dist/src/communication/reliable-communication-manager.js.map +1 -0
- package/dist/src/config/ai/decision-tree-generator.js +763 -0
- package/dist/src/config/ai/decision-tree-generator.js.map +1 -0
- package/dist/src/config/ai/project-detection-engine.js +1081 -0
- package/dist/src/config/ai/project-detection-engine.js.map +1 -0
- package/dist/src/config/config-manager.js +1285 -0
- package/dist/src/config/config-manager.js.map +1 -0
- package/dist/src/config/consent-manager.js +433 -0
- package/dist/src/config/consent-manager.js.map +1 -0
- package/dist/src/config/core/intelligent-configuration-manager.js +674 -0
- package/dist/src/config/core/intelligent-configuration-manager.js.map +1 -0
- package/dist/src/config/index.js +110 -0
- package/dist/src/config/index.js.map +1 -0
- package/dist/src/config/integration/hooks-integration.js +548 -0
- package/dist/src/config/integration/hooks-integration.js.map +1 -0
- package/dist/src/config/migration/config-migration.js +285 -0
- package/dist/src/config/migration/config-migration.js.map +1 -0
- package/dist/src/config/migration/version-migration-engine.js +984 -0
- package/dist/src/config/migration/version-migration-engine.js.map +1 -0
- package/dist/src/config/migration-manager.js +529 -0
- package/dist/src/config/migration-manager.js.map +1 -0
- package/dist/src/config/ruv-swarm-config.js +332 -0
- package/dist/src/config/ruv-swarm-config.js.map +1 -0
- package/dist/src/config/ruv-swarm-integration.js +285 -0
- package/dist/src/config/ruv-swarm-integration.js.map +1 -0
- package/dist/src/config/storage/multi-tier-storage.js +626 -0
- package/dist/src/config/storage/multi-tier-storage.js.map +1 -0
- package/dist/src/config/test-migration-fixer.js +332 -0
- package/dist/src/config/test-migration-fixer.js.map +1 -0
- package/dist/src/config/ui/progressive-disclosure-engine.js +876 -0
- package/dist/src/config/ui/progressive-disclosure-engine.js.map +1 -0
- package/dist/src/config/utils/config-export-import.js +454 -0
- package/dist/src/config/utils/config-export-import.js.map +1 -0
- package/dist/src/config/utils/zero-config-setup.js +238 -0
- package/dist/src/config/utils/zero-config-setup.js.map +1 -0
- package/dist/src/config/validation/config-validator.js +462 -0
- package/dist/src/config/validation/config-validator.js.map +1 -0
- package/dist/src/config/web-portal-config.js +343 -0
- package/dist/src/config/web-portal-config.js.map +1 -0
- package/dist/src/config/zero-config-setup.js +294 -0
- package/dist/src/config/zero-config-setup.js.map +1 -0
- package/dist/src/constants/agent-types.js +51 -0
- package/dist/src/constants/agent-types.js.map +1 -0
- package/dist/src/coordination/advanced-scheduler.js +370 -0
- package/dist/src/coordination/advanced-scheduler.js.map +1 -0
- package/dist/src/coordination/advanced-task-executor.js +481 -0
- package/dist/src/coordination/advanced-task-executor.js.map +1 -0
- package/dist/src/coordination/background-executor.js +366 -0
- package/dist/src/coordination/background-executor.js.map +1 -0
- package/dist/src/coordination/circuit-breaker.js +286 -0
- package/dist/src/coordination/circuit-breaker.js.map +1 -0
- package/dist/src/coordination/conflict-resolution.js +348 -0
- package/dist/src/coordination/conflict-resolution.js.map +1 -0
- package/dist/src/coordination/dependency-graph.js +398 -0
- package/dist/src/coordination/dependency-graph.js.map +1 -0
- package/dist/src/coordination/hive-orchestrator.js +309 -0
- package/dist/src/coordination/hive-orchestrator.js.map +1 -0
- package/dist/src/coordination/hive-protocol.js +363 -0
- package/dist/src/coordination/hive-protocol.js.map +1 -0
- package/dist/src/coordination/index.js +21 -0
- package/dist/src/coordination/index.js.map +1 -0
- package/dist/src/coordination/load-balancer.js +737 -0
- package/dist/src/coordination/load-balancer.js.map +1 -0
- package/dist/src/coordination/manager.js +360 -0
- package/dist/src/coordination/manager.js.map +1 -0
- package/dist/src/coordination/messaging.js +221 -0
- package/dist/src/coordination/messaging.js.map +1 -0
- package/dist/src/coordination/metrics.js +415 -0
- package/dist/src/coordination/metrics.js.map +1 -0
- package/dist/src/coordination/resources.js +276 -0
- package/dist/src/coordination/resources.js.map +1 -0
- package/dist/src/coordination/scheduler.js +322 -0
- package/dist/src/coordination/scheduler.js.map +1 -0
- package/dist/src/coordination/swarm-coordinator.js +585 -0
- package/dist/src/coordination/swarm-coordinator.js.map +1 -0
- package/dist/src/coordination/swarm-monitor.js +359 -0
- package/dist/src/coordination/swarm-monitor.js.map +1 -0
- package/dist/src/coordination/work-stealing.js +164 -0
- package/dist/src/coordination/work-stealing.js.map +1 -0
- package/dist/src/core/agent-manager.js +80 -0
- package/dist/src/core/agent-manager.js.map +1 -0
- package/dist/src/core/config.js +1221 -0
- package/dist/src/core/config.js.map +1 -0
- package/dist/src/core/event-bus.js +136 -0
- package/dist/src/core/event-bus.js.map +1 -0
- package/dist/src/core/index.js +6 -0
- package/dist/src/core/index.js.map +1 -0
- package/dist/src/core/json-persistence.js +112 -0
- package/dist/src/core/json-persistence.js.map +1 -0
- package/dist/src/core/logger.js +245 -0
- package/dist/src/core/logger.js.map +1 -0
- package/dist/src/core/orchestrator-fixed.js +236 -0
- package/dist/src/core/orchestrator-fixed.js.map +1 -0
- package/dist/src/core/orchestrator.js +1136 -0
- package/dist/src/core/orchestrator.js.map +1 -0
- package/dist/src/core/persistence.js +185 -0
- package/dist/src/core/persistence.js.map +1 -0
- package/dist/src/core/project-manager.js +80 -0
- package/dist/src/core/project-manager.js.map +1 -0
- package/dist/src/core/version.js +35 -0
- package/dist/src/core/version.js.map +1 -0
- package/dist/src/crdt/types.js +509 -0
- package/dist/src/crdt/types.js.map +1 -0
- package/dist/src/enterprise/analytics-manager.js +1133 -0
- package/dist/src/enterprise/analytics-manager.js.map +1 -0
- package/dist/src/enterprise/audit-manager.js +1112 -0
- package/dist/src/enterprise/audit-manager.js.map +1 -0
- package/dist/src/enterprise/cloud-manager.js +886 -0
- package/dist/src/enterprise/cloud-manager.js.map +1 -0
- package/dist/src/enterprise/deployment-manager.js +963 -0
- package/dist/src/enterprise/deployment-manager.js.map +1 -0
- package/dist/src/enterprise/index.js +8 -0
- package/dist/src/enterprise/index.js.map +1 -0
- package/dist/src/enterprise/project-manager.js +577 -0
- package/dist/src/enterprise/project-manager.js.map +1 -0
- package/dist/src/enterprise/security-manager.js +987 -0
- package/dist/src/enterprise/security-manager.js.map +1 -0
- package/dist/src/feature-flags/cli/Phase4CLI.js +463 -0
- package/dist/src/feature-flags/cli/Phase4CLI.js.map +1 -0
- package/dist/src/feature-flags/core/FeatureFlagManager.js +324 -0
- package/dist/src/feature-flags/core/FeatureFlagManager.js.map +1 -0
- package/dist/src/feature-flags/index.js +237 -0
- package/dist/src/feature-flags/index.js.map +1 -0
- package/dist/src/feature-flags/monitoring/RolloutMonitor.js +275 -0
- package/dist/src/feature-flags/monitoring/RolloutMonitor.js.map +1 -0
- package/dist/src/feature-flags/rollout/RolloutController.js +301 -0
- package/dist/src/feature-flags/rollout/RolloutController.js.map +1 -0
- package/dist/src/feature-flags/validation/HookInterceptor.js +310 -0
- package/dist/src/feature-flags/validation/HookInterceptor.js.map +1 -0
- package/dist/src/feature-flags/validation/TruthBasedValidator.js +263 -0
- package/dist/src/feature-flags/validation/TruthBasedValidator.js.map +1 -0
- package/dist/src/hive-mind/core/Agent.js +569 -0
- package/dist/src/hive-mind/core/Agent.js.map +1 -0
- package/dist/src/hive-mind/core/Communication.js +411 -0
- package/dist/src/hive-mind/core/Communication.js.map +1 -0
- package/dist/src/hive-mind/core/DatabaseManager.js +599 -0
- package/dist/src/hive-mind/core/DatabaseManager.js.map +1 -0
- package/dist/src/hive-mind/core/HiveMind.js +575 -0
- package/dist/src/hive-mind/core/HiveMind.js.map +1 -0
- package/dist/src/hive-mind/core/Memory.js +1159 -0
- package/dist/src/hive-mind/core/Memory.js.map +1 -0
- package/dist/src/hive-mind/core/MemoryMonitor.js +525 -0
- package/dist/src/hive-mind/core/MemoryMonitor.js.map +1 -0
- package/dist/src/hive-mind/core/Queen.js +753 -0
- package/dist/src/hive-mind/core/Queen.js.map +1 -0
- package/dist/src/hive-mind/index.js +21 -0
- package/dist/src/hive-mind/index.js.map +1 -0
- package/dist/src/hive-mind/integration/ConsensusEngine.js +460 -0
- package/dist/src/hive-mind/integration/ConsensusEngine.js.map +1 -0
- package/dist/src/hive-mind/integration/MCPToolWrapper.js +243 -0
- package/dist/src/hive-mind/integration/MCPToolWrapper.js.map +1 -0
- package/dist/src/hive-mind/integration/SwarmOrchestrator.js +812 -0
- package/dist/src/hive-mind/integration/SwarmOrchestrator.js.map +1 -0
- package/dist/src/hive-mind/types.js +9 -0
- package/dist/src/hive-mind/types.js.map +1 -0
- package/dist/src/hooks/index.js +197 -0
- package/dist/src/hooks/index.js.map +1 -0
- package/dist/src/index.js +11 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/integration/mock-components.js +362 -0
- package/dist/src/integration/mock-components.js.map +1 -0
- package/dist/src/integration/system-integration.js +428 -0
- package/dist/src/integration/system-integration.js.map +1 -0
- package/dist/src/integration/types.js +5 -0
- package/dist/src/integration/types.js.map +1 -0
- package/dist/src/lifecycle/communication-protocols.js +568 -0
- package/dist/src/lifecycle/communication-protocols.js.map +1 -0
- package/dist/src/lifecycle/dependency-tracker.js +799 -0
- package/dist/src/lifecycle/dependency-tracker.js.map +1 -0
- package/dist/src/lifecycle/memory-schema.js +622 -0
- package/dist/src/lifecycle/memory-schema.js.map +1 -0
- package/dist/src/maestro/maestro-swarm-coordinator.js +504 -0
- package/dist/src/maestro/maestro-swarm-coordinator.js.map +1 -0
- package/dist/src/maestro/maestro-types.js +3 -0
- package/dist/src/maestro/maestro-types.js.map +1 -0
- package/dist/src/maestro/tests/native-hive-mind-integration.test.js +382 -0
- package/dist/src/maestro/tests/native-hive-mind-integration.test.js.map +1 -0
- package/dist/src/mcp/auth.js +347 -0
- package/dist/src/mcp/auth.js.map +1 -0
- package/dist/src/mcp/claude-code-wrapper.js +717 -0
- package/dist/src/mcp/claude-code-wrapper.js.map +1 -0
- package/dist/src/mcp/claude-flow-tools.js +1365 -0
- package/dist/src/mcp/claude-flow-tools.js.map +1 -0
- package/dist/src/mcp/client.js +201 -0
- package/dist/src/mcp/client.js.map +1 -0
- package/dist/src/mcp/index.js +192 -0
- package/dist/src/mcp/index.js.map +1 -0
- package/dist/src/mcp/integrate-wrapper.js +85 -0
- package/dist/src/mcp/integrate-wrapper.js.map +1 -0
- package/dist/src/mcp/lifecycle-manager.js +348 -0
- package/dist/src/mcp/lifecycle-manager.js.map +1 -0
- package/dist/src/mcp/load-balancer.js +386 -0
- package/dist/src/mcp/load-balancer.js.map +1 -0
- package/dist/src/mcp/orchestration-integration.js +800 -0
- package/dist/src/mcp/orchestration-integration.js.map +1 -0
- package/dist/src/mcp/performance-monitor.js +489 -0
- package/dist/src/mcp/performance-monitor.js.map +1 -0
- package/dist/src/mcp/protocol-manager.js +376 -0
- package/dist/src/mcp/protocol-manager.js.map +1 -0
- package/dist/src/mcp/recovery/connection-health-monitor.js +240 -0
- package/dist/src/mcp/recovery/connection-health-monitor.js.map +1 -0
- package/dist/src/mcp/recovery/connection-state-manager.js +309 -0
- package/dist/src/mcp/recovery/connection-state-manager.js.map +1 -0
- package/dist/src/mcp/recovery/fallback-coordinator.js +288 -0
- package/dist/src/mcp/recovery/fallback-coordinator.js.map +1 -0
- package/dist/src/mcp/recovery/index.js +10 -0
- package/dist/src/mcp/recovery/index.js.map +1 -0
- package/dist/src/mcp/recovery/reconnection-manager.js +219 -0
- package/dist/src/mcp/recovery/reconnection-manager.js.map +1 -0
- package/dist/src/mcp/recovery/recovery-manager.js +262 -0
- package/dist/src/mcp/recovery/recovery-manager.js.map +1 -0
- package/dist/src/mcp/router.js +220 -0
- package/dist/src/mcp/router.js.map +1 -0
- package/dist/src/mcp/ruv-swarm-tools.js +671 -0
- package/dist/src/mcp/ruv-swarm-tools.js.map +1 -0
- package/dist/src/mcp/server-with-wrapper.js +32 -0
- package/dist/src/mcp/server-with-wrapper.js.map +1 -0
- package/dist/src/mcp/server-wrapper-mode.js +26 -0
- package/dist/src/mcp/server-wrapper-mode.js.map +1 -0
- package/dist/src/mcp/server.js +539 -0
- package/dist/src/mcp/server.js.map +1 -0
- package/dist/src/mcp/session-manager.js +338 -0
- package/dist/src/mcp/session-manager.js.map +1 -0
- package/dist/src/mcp/sparc-modes.js +455 -0
- package/dist/src/mcp/sparc-modes.js.map +1 -0
- package/dist/src/mcp/swarm-tools.js +903 -0
- package/dist/src/mcp/swarm-tools.js.map +1 -0
- package/dist/src/mcp/tests/mcp-integration.test.js +493 -0
- package/dist/src/mcp/tests/mcp-integration.test.js.map +1 -0
- package/dist/src/mcp/tools.js +426 -0
- package/dist/src/mcp/tools.js.map +1 -0
- package/dist/src/mcp/transports/base.js +5 -0
- package/dist/src/mcp/transports/base.js.map +1 -0
- package/dist/src/mcp/transports/http.js +414 -0
- package/dist/src/mcp/transports/http.js.map +1 -0
- package/dist/src/mcp/transports/stdio.js +217 -0
- package/dist/src/mcp/transports/stdio.js.map +1 -0
- package/dist/src/memory/advanced-memory-manager.js +1522 -0
- package/dist/src/memory/advanced-memory-manager.js.map +1 -0
- package/dist/src/memory/backends/base.js +5 -0
- package/dist/src/memory/backends/base.js.map +1 -0
- package/dist/src/memory/backends/markdown.js +235 -0
- package/dist/src/memory/backends/markdown.js.map +1 -0
- package/dist/src/memory/backends/sqlite.js +295 -0
- package/dist/src/memory/backends/sqlite.js.map +1 -0
- package/dist/src/memory/cache.js +177 -0
- package/dist/src/memory/cache.js.map +1 -0
- package/dist/src/memory/distributed-memory.js +745 -0
- package/dist/src/memory/distributed-memory.js.map +1 -0
- package/dist/src/memory/indexer.js +184 -0
- package/dist/src/memory/indexer.js.map +1 -0
- package/dist/src/memory/manager.js +457 -0
- package/dist/src/memory/manager.js.map +1 -0
- package/dist/src/memory/sqlite-enhanced-backend.js +529 -0
- package/dist/src/memory/sqlite-enhanced-backend.js.map +1 -0
- package/dist/src/memory/swarm-memory.js +446 -0
- package/dist/src/memory/swarm-memory.js.map +1 -0
- package/dist/src/migration/index.js +94 -0
- package/dist/src/migration/index.js.map +1 -0
- package/dist/src/migration/logger.js +110 -0
- package/dist/src/migration/logger.js.map +1 -0
- package/dist/src/migration/migration-analyzer.js +255 -0
- package/dist/src/migration/migration-analyzer.js.map +1 -0
- package/dist/src/migration/migration-runner.js +511 -0
- package/dist/src/migration/migration-runner.js.map +1 -0
- package/dist/src/migration/migration-validator.js +272 -0
- package/dist/src/migration/migration-validator.js.map +1 -0
- package/dist/src/migration/progress-reporter.js +139 -0
- package/dist/src/migration/progress-reporter.js.map +1 -0
- package/dist/src/migration/rollback-manager.js +310 -0
- package/dist/src/migration/rollback-manager.js.map +1 -0
- package/dist/src/migration/tests/migration-system.test.js +9 -0
- package/dist/src/migration/tests/migration-system.test.js.map +1 -0
- package/dist/src/migration/types.js +5 -0
- package/dist/src/migration/types.js.map +1 -0
- package/dist/src/monitoring/diagnostics.js +532 -0
- package/dist/src/monitoring/diagnostics.js.map +1 -0
- package/dist/src/monitoring/health-check.js +355 -0
- package/dist/src/monitoring/health-check.js.map +1 -0
- package/dist/src/monitoring/phase4/analytics/consensus-tracker.js +764 -0
- package/dist/src/monitoring/phase4/analytics/consensus-tracker.js.map +1 -0
- package/dist/src/monitoring/phase4/analytics/performance-assessor.js +859 -0
- package/dist/src/monitoring/phase4/analytics/performance-assessor.js.map +1 -0
- package/dist/src/monitoring/phase4/analytics/truth-score-analyzer.js +667 -0
- package/dist/src/monitoring/phase4/analytics/truth-score-analyzer.js.map +1 -0
- package/dist/src/monitoring/phase4/dashboard/monitoring-dashboard.js +1008 -0
- package/dist/src/monitoring/phase4/dashboard/monitoring-dashboard.js.map +1 -0
- package/dist/src/monitoring/phase4/rollout-decision-engine.js +849 -0
- package/dist/src/monitoring/phase4/rollout-decision-engine.js.map +1 -0
- package/dist/src/monitoring/real-time-feedback-system.js +688 -0
- package/dist/src/monitoring/real-time-feedback-system.js.map +1 -0
- package/dist/src/monitoring/real-time-monitor.js +981 -0
- package/dist/src/monitoring/real-time-monitor.js.map +1 -0
- package/dist/src/monitoring/regression/RegressionDetector.js +525 -0
- package/dist/src/monitoring/regression/RegressionDetector.js.map +1 -0
- package/dist/src/neural/NeuralDomainMapper.js +1137 -0
- package/dist/src/neural/NeuralDomainMapper.js.map +1 -0
- package/dist/src/neural/index.js +418 -0
- package/dist/src/neural/index.js.map +1 -0
- package/dist/src/neural/integration.js +590 -0
- package/dist/src/neural/integration.js.map +1 -0
- package/dist/src/providers/anthropic-provider.js +245 -0
- package/dist/src/providers/anthropic-provider.js.map +1 -0
- package/dist/src/providers/base-provider.js +389 -0
- package/dist/src/providers/base-provider.js.map +1 -0
- package/dist/src/providers/cohere-provider.js +405 -0
- package/dist/src/providers/cohere-provider.js.map +1 -0
- package/dist/src/providers/google-provider.js +376 -0
- package/dist/src/providers/google-provider.js.map +1 -0
- package/dist/src/providers/index.js +18 -0
- package/dist/src/providers/index.js.map +1 -0
- package/dist/src/providers/ollama-provider.js +400 -0
- package/dist/src/providers/ollama-provider.js.map +1 -0
- package/dist/src/providers/openai-provider.js +364 -0
- package/dist/src/providers/openai-provider.js.map +1 -0
- package/dist/src/providers/provider-manager.js +487 -0
- package/dist/src/providers/provider-manager.js.map +1 -0
- package/dist/src/providers/types.js +55 -0
- package/dist/src/providers/types.js.map +1 -0
- package/dist/src/providers/utils.js +343 -0
- package/dist/src/providers/utils.js.map +1 -0
- package/dist/src/quality-gates/automated-review-system.js +645 -0
- package/dist/src/quality-gates/automated-review-system.js.map +1 -0
- package/dist/src/resources/resource-manager.js +1275 -0
- package/dist/src/resources/resource-manager.js.map +1 -0
- package/dist/src/rollback/recovery-manager.js +1065 -0
- package/dist/src/rollback/recovery-manager.js.map +1 -0
- package/dist/src/services/agent-manager.js +308 -0
- package/dist/src/services/agent-manager.js.map +1 -0
- package/dist/src/services/agentic-flow-hooks/hook-manager.js +506 -0
- package/dist/src/services/agentic-flow-hooks/hook-manager.js.map +1 -0
- package/dist/src/services/agentic-flow-hooks/index.js +322 -0
- package/dist/src/services/agentic-flow-hooks/index.js.map +1 -0
- package/dist/src/services/agentic-flow-hooks/llm-hooks.js +445 -0
- package/dist/src/services/agentic-flow-hooks/llm-hooks.js.map +1 -0
- package/dist/src/services/agentic-flow-hooks/memory-hooks.js +558 -0
- package/dist/src/services/agentic-flow-hooks/memory-hooks.js.map +1 -0
- package/dist/src/services/agentic-flow-hooks/neural-hooks.js +595 -0
- package/dist/src/services/agentic-flow-hooks/neural-hooks.js.map +1 -0
- package/dist/src/services/agentic-flow-hooks/performance-hooks.js +640 -0
- package/dist/src/services/agentic-flow-hooks/performance-hooks.js.map +1 -0
- package/dist/src/services/agentic-flow-hooks/types.js +8 -0
- package/dist/src/services/agentic-flow-hooks/types.js.map +1 -0
- package/dist/src/services/agentic-flow-hooks/workflow-hooks.js +746 -0
- package/dist/src/services/agentic-flow-hooks/workflow-hooks.js.map +1 -0
- package/dist/src/services/performance-metrics-collector.js +529 -0
- package/dist/src/services/performance-metrics-collector.js.map +1 -0
- package/dist/src/services/swarm-coordinator.js +431 -0
- package/dist/src/services/swarm-coordinator.js.map +1 -0
- package/dist/src/services/swarm-memory-manager.js +513 -0
- package/dist/src/services/swarm-memory-manager.js.map +1 -0
- package/dist/src/services/swarm-relaunch-manager.js +408 -0
- package/dist/src/services/swarm-relaunch-manager.js.map +1 -0
- package/dist/src/services/task-handoff-service.js +361 -0
- package/dist/src/services/task-handoff-service.js.map +1 -0
- package/dist/src/swarm/__tests__/integration.test.js +229 -0
- package/dist/src/swarm/__tests__/integration.test.js.map +1 -0
- package/dist/src/swarm/__tests__/prompt-copier.test.js +346 -0
- package/dist/src/swarm/__tests__/prompt-copier.test.js.map +1 -0
- package/dist/src/swarm/advanced-orchestrator.js +1093 -0
- package/dist/src/swarm/advanced-orchestrator.js.map +1 -0
- package/dist/src/swarm/claude-code-interface.js +959 -0
- package/dist/src/swarm/claude-code-interface.js.map +1 -0
- package/dist/src/swarm/claude-flow-executor.js +218 -0
- package/dist/src/swarm/claude-flow-executor.js.map +1 -0
- package/dist/src/swarm/coordinator.js +3001 -0
- package/dist/src/swarm/coordinator.js.map +1 -0
- package/dist/src/swarm/direct-executor.js +1169 -0
- package/dist/src/swarm/direct-executor.js.map +1 -0
- package/dist/src/swarm/executor-v2.js +312 -0
- package/dist/src/swarm/executor-v2.js.map +1 -0
- package/dist/src/swarm/executor.js +813 -0
- package/dist/src/swarm/executor.js.map +1 -0
- package/dist/src/swarm/hive-mind-integration.js +700 -0
- package/dist/src/swarm/hive-mind-integration.js.map +1 -0
- package/dist/src/swarm/index.js +43 -0
- package/dist/src/swarm/index.js.map +1 -0
- package/dist/src/swarm/json-output-aggregator.js +269 -0
- package/dist/src/swarm/json-output-aggregator.js.map +1 -0
- package/dist/src/swarm/mcp-integration-wrapper.js +623 -0
- package/dist/src/swarm/mcp-integration-wrapper.js.map +1 -0
- package/dist/src/swarm/memory.js +1119 -0
- package/dist/src/swarm/memory.js.map +1 -0
- package/dist/src/swarm/optimizations/__tests__/optimization.test.js +350 -0
- package/dist/src/swarm/optimizations/__tests__/optimization.test.js.map +1 -0
- package/dist/src/swarm/optimizations/async-file-manager.js +273 -0
- package/dist/src/swarm/optimizations/async-file-manager.js.map +1 -0
- package/dist/src/swarm/optimizations/circular-buffer.js +148 -0
- package/dist/src/swarm/optimizations/circular-buffer.js.map +1 -0
- package/dist/src/swarm/optimizations/connection-pool.js +239 -0
- package/dist/src/swarm/optimizations/connection-pool.js.map +1 -0
- package/dist/src/swarm/optimizations/index.js +30 -0
- package/dist/src/swarm/optimizations/index.js.map +1 -0
- package/dist/src/swarm/optimizations/optimized-executor.js +318 -0
- package/dist/src/swarm/optimizations/optimized-executor.js.map +1 -0
- package/dist/src/swarm/optimizations/ttl-map.js +223 -0
- package/dist/src/swarm/optimizations/ttl-map.js.map +1 -0
- package/dist/src/swarm/prompt-cli.js +202 -0
- package/dist/src/swarm/prompt-cli.js.map +1 -0
- package/dist/src/swarm/prompt-copier-enhanced.js +193 -0
- package/dist/src/swarm/prompt-copier-enhanced.js.map +1 -0
- package/dist/src/swarm/prompt-copier.js +376 -0
- package/dist/src/swarm/prompt-copier.js.map +1 -0
- package/dist/src/swarm/prompt-manager.js +287 -0
- package/dist/src/swarm/prompt-manager.js.map +1 -0
- package/dist/src/swarm/prompt-utils.js +299 -0
- package/dist/src/swarm/prompt-utils.js.map +1 -0
- package/dist/src/swarm/result-aggregator.js +713 -0
- package/dist/src/swarm/result-aggregator.js.map +1 -0
- package/dist/src/swarm/sparc-executor.js +1557 -0
- package/dist/src/swarm/sparc-executor.js.map +1 -0
- package/dist/src/swarm/strategies/auto.js +751 -0
- package/dist/src/swarm/strategies/auto.js.map +1 -0
- package/dist/src/swarm/strategies/base.js +117 -0
- package/dist/src/swarm/strategies/base.js.map +1 -0
- package/dist/src/swarm/strategies/research.js +911 -0
- package/dist/src/swarm/strategies/research.js.map +1 -0
- package/dist/src/swarm/strategies/strategy-metrics-patch.js +4 -0
- package/dist/src/swarm/strategies/strategy-metrics-patch.js.map +1 -0
- package/dist/src/swarm/types.js +54 -0
- package/dist/src/swarm/types.js.map +1 -0
- package/dist/src/swarm/workers/copy-worker.js +58 -0
- package/dist/src/swarm/workers/copy-worker.js.map +1 -0
- package/dist/src/swarm-fullstack/adapters/chrome-mcp-adapter.js +412 -0
- package/dist/src/swarm-fullstack/adapters/chrome-mcp-adapter.js.map +1 -0
- package/dist/src/swarm-fullstack/adapters/shadcn-mcp-adapter.js +560 -0
- package/dist/src/swarm-fullstack/adapters/shadcn-mcp-adapter.js.map +1 -0
- package/dist/src/swarm-fullstack/cli/fullstack-cli.js +582 -0
- package/dist/src/swarm-fullstack/cli/fullstack-cli.js.map +1 -0
- package/dist/src/swarm-fullstack/config/fullstack-config.js +369 -0
- package/dist/src/swarm-fullstack/config/fullstack-config.js.map +1 -0
- package/dist/src/swarm-fullstack/core/dynamic-agent-spawner.js +687 -0
- package/dist/src/swarm-fullstack/core/dynamic-agent-spawner.js.map +1 -0
- package/dist/src/swarm-fullstack/core/enhanced-swarm-message-router.js +589 -0
- package/dist/src/swarm-fullstack/core/enhanced-swarm-message-router.js.map +1 -0
- package/dist/src/swarm-fullstack/core/fullstack-orchestrator.js +538 -0
- package/dist/src/swarm-fullstack/core/fullstack-orchestrator.js.map +1 -0
- package/dist/src/swarm-fullstack/types/index.js +8 -0
- package/dist/src/swarm-fullstack/types/index.js.map +1 -0
- package/dist/src/task/commands.js +130 -0
- package/dist/src/task/commands.js.map +1 -0
- package/dist/src/task/coordination.js +737 -0
- package/dist/src/task/coordination.js.map +1 -0
- package/dist/src/task/engine.js +490 -0
- package/dist/src/task/engine.js.map +1 -0
- package/dist/src/task/index.js +269 -0
- package/dist/src/task/index.js.map +1 -0
- package/dist/src/task/types.js +5 -0
- package/dist/src/task/types.js.map +1 -0
- package/dist/src/terminal/adapters/base.js +5 -0
- package/dist/src/terminal/adapters/base.js.map +1 -0
- package/dist/src/terminal/adapters/native.js +473 -0
- package/dist/src/terminal/adapters/native.js.map +1 -0
- package/dist/src/terminal/adapters/vscode.js +285 -0
- package/dist/src/terminal/adapters/vscode.js.map +1 -0
- package/dist/src/terminal/manager.js +237 -0
- package/dist/src/terminal/manager.js.map +1 -0
- package/dist/src/terminal/pool.js +209 -0
- package/dist/src/terminal/pool.js.map +1 -0
- package/dist/src/terminal/session.js +211 -0
- package/dist/src/terminal/session.js.map +1 -0
- package/dist/src/terminal/vscode-bridge.js +186 -0
- package/dist/src/terminal/vscode-bridge.js.map +1 -0
- package/dist/src/testing/performance/PerformanceTestRunner.js +401 -0
- package/dist/src/testing/performance/PerformanceTestRunner.js.map +1 -0
- package/dist/src/testing-integration/chrome-mcp-integration.js +556 -0
- package/dist/src/testing-integration/chrome-mcp-integration.js.map +1 -0
- package/dist/src/testing-integration/continuous-test-runner.js +509 -0
- package/dist/src/testing-integration/continuous-test-runner.js.map +1 -0
- package/dist/src/tests/validation-consistency.test.js +52 -0
- package/dist/src/tests/validation-consistency.test.js.map +1 -0
- package/dist/src/topology/adaptive-coordinator.js +691 -0
- package/dist/src/topology/adaptive-coordinator.js.map +1 -0
- package/dist/src/topology/communication-bridge.js +551 -0
- package/dist/src/topology/communication-bridge.js.map +1 -0
- package/dist/src/topology/enhanced-hierarchical-coordinator.js +1732 -0
- package/dist/src/topology/enhanced-hierarchical-coordinator.js.map +1 -0
- package/dist/src/topology/enhanced-mesh-coordinator.js +1271 -0
- package/dist/src/topology/enhanced-mesh-coordinator.js.map +1 -0
- package/dist/src/topology/topology-manager.js +797 -0
- package/dist/src/topology/topology-manager.js.map +1 -0
- package/dist/src/topology/types.js +8 -0
- package/dist/src/topology/types.js.map +1 -0
- package/dist/src/types/agent-lifecycle-types.js +172 -0
- package/dist/src/types/agent-lifecycle-types.js.map +1 -0
- package/dist/src/types/agent-types.js +11 -0
- package/dist/src/types/agent-types.js.map +1 -0
- package/dist/src/types/cliffy.d.js +9 -0
- package/dist/src/types/cliffy.d.js.map +1 -0
- package/dist/src/types/global.d.js +5 -0
- package/dist/src/types/global.d.js.map +1 -0
- package/dist/src/types/index.js +16 -0
- package/dist/src/types/index.js.map +1 -0
- package/dist/src/types/mcp.d.js +3 -0
- package/dist/src/types/mcp.d.js.map +1 -0
- package/dist/src/types/vscode.d.js +4 -0
- package/dist/src/types/vscode.d.js.map +1 -0
- package/dist/src/ui/hive-dashboard.js +284 -0
- package/dist/src/ui/hive-dashboard.js.map +1 -0
- package/dist/src/utils/error-handler.js +27 -0
- package/dist/src/utils/error-handler.js.map +1 -0
- package/dist/src/utils/errors.js +195 -0
- package/dist/src/utils/errors.js.map +1 -0
- package/dist/src/utils/formatters.js +66 -0
- package/dist/src/utils/formatters.js.map +1 -0
- package/dist/src/utils/helpers.js +451 -0
- package/dist/src/utils/helpers.js.map +1 -0
- package/dist/src/utils/paths.js +43 -0
- package/dist/src/utils/paths.js.map +1 -0
- package/dist/src/utils/type-guards.js +119 -0
- package/dist/src/utils/type-guards.js.map +1 -0
- package/dist/src/utils/types.js +38 -0
- package/dist/src/utils/types.js.map +1 -0
- package/dist/src/verification/agent-scorer.js +633 -0
- package/dist/src/verification/agent-scorer.js.map +1 -0
- package/dist/src/verification/alert-manager.js +1126 -0
- package/dist/src/verification/alert-manager.js.map +1 -0
- package/dist/src/verification/api/types/index.js +6 -0
- package/dist/src/verification/api/types/index.js.map +1 -0
- package/dist/src/verification/checkpoint-manager.js +519 -0
- package/dist/src/verification/checkpoint-manager.js.map +1 -0
- package/dist/src/verification/cli-integration.js +500 -0
- package/dist/src/verification/cli-integration.js.map +1 -0
- package/dist/src/verification/conflict-resolver.js +534 -0
- package/dist/src/verification/conflict-resolver.js.map +1 -0
- package/dist/src/verification/crdt-coordinator.js +506 -0
- package/dist/src/verification/crdt-coordinator.js.map +1 -0
- package/dist/src/verification/dashboard-exporter.js +876 -0
- package/dist/src/verification/dashboard-exporter.js.map +1 -0
- package/dist/src/verification/demo.js +320 -0
- package/dist/src/verification/demo.js.map +1 -0
- package/dist/src/verification/examples.js +508 -0
- package/dist/src/verification/examples.js.map +1 -0
- package/dist/src/verification/hooks.js +961 -0
- package/dist/src/verification/hooks.js.map +1 -0
- package/dist/src/verification/index.js +73 -0
- package/dist/src/verification/index.js.map +1 -0
- package/dist/src/verification/interfaces.js +7 -0
- package/dist/src/verification/interfaces.js.map +1 -0
- package/dist/src/verification/memory-manager.js +510 -0
- package/dist/src/verification/memory-manager.js.map +1 -0
- package/dist/src/verification/middleware.js +579 -0
- package/dist/src/verification/middleware.js.map +1 -0
- package/dist/src/verification/rollback-engine.js +511 -0
- package/dist/src/verification/rollback-engine.js.map +1 -0
- package/dist/src/verification/rollback.js +1710 -0
- package/dist/src/verification/rollback.js.map +1 -0
- package/dist/src/verification/security-bypass-test.js +704 -0
- package/dist/src/verification/security-bypass-test.js.map +1 -0
- package/dist/src/verification/security.js +1125 -0
- package/dist/src/verification/security.js.map +1 -0
- package/dist/src/verification/simple-hooks.js +189 -0
- package/dist/src/verification/simple-hooks.js.map +1 -0
- package/dist/src/verification/system-tracker.js +657 -0
- package/dist/src/verification/system-tracker.js.map +1 -0
- package/dist/src/verification/telemetry.js +922 -0
- package/dist/src/verification/telemetry.js.map +1 -0
- package/dist/src/verification/test-verification.js +43 -0
- package/dist/src/verification/test-verification.js.map +1 -0
- package/dist/src/verification/tests/e2e/verification-pipeline.test.js +1027 -0
- package/dist/src/verification/tests/e2e/verification-pipeline.test.js.map +1 -0
- package/dist/src/verification/tests/integration/cross-agent-communication.test.js +638 -0
- package/dist/src/verification/tests/integration/cross-agent-communication.test.js.map +1 -0
- package/dist/src/verification/tests/mocks/false-reporting-scenarios.test.js +1029 -0
- package/dist/src/verification/tests/mocks/false-reporting-scenarios.test.js.map +1 -0
- package/dist/src/verification/tests/performance/verification-overhead.test.js +587 -0
- package/dist/src/verification/tests/performance/verification-overhead.test.js.map +1 -0
- package/dist/src/verification/tests/unit/truth-scoring.test.js +579 -0
- package/dist/src/verification/tests/unit/truth-scoring.test.js.map +1 -0
- package/dist/src/verification/tests.js +611 -0
- package/dist/src/verification/tests.js.map +1 -0
- package/dist/src/verification/truth-scorer.js +584 -0
- package/dist/src/verification/truth-scorer.js.map +1 -0
- package/dist/src/verification/types.js +56 -0
- package/dist/src/verification/types.js.map +1 -0
- package/dist/src/verification/verification-pipeline.js +884 -0
- package/dist/src/verification/verification-pipeline.js.map +1 -0
- package/dist/src/web/messaging/agent-status-tracker.js +447 -0
- package/dist/src/web/messaging/agent-status-tracker.js.map +1 -0
- package/dist/src/web/messaging/human-intervention-system.js +298 -0
- package/dist/src/web/messaging/human-intervention-system.js.map +1 -0
- package/dist/src/web/messaging/message-filter.js +289 -0
- package/dist/src/web/messaging/message-filter.js.map +1 -0
- package/dist/src/web/messaging/swarm-message-router.js +320 -0
- package/dist/src/web/messaging/swarm-message-router.js.map +1 -0
- package/dist/src/web/messaging/transparency-logger.js +415 -0
- package/dist/src/web/messaging/transparency-logger.js.map +1 -0
- package/dist/src/web/portal-server.js +440 -0
- package/dist/src/web/portal-server.js.map +1 -0
- package/dist/src/web/server.js +311 -0
- package/dist/src/web/server.js.map +1 -0
- package/dist/src/web/websocket/websocket-manager.js +509 -0
- package/dist/src/web/websocket/websocket-manager.js.map +1 -0
- package/dist/src/workflows/feature-lifecycle-manager.js +386 -0
- package/dist/src/workflows/feature-lifecycle-manager.js.map +1 -0
- package/dist/src/workflows/fullstack-coordination-manager.js +801 -0
- package/dist/src/workflows/fullstack-coordination-manager.js.map +1 -0
- package/dist/src/workflows/iterative-development-orchestrator.js +1128 -0
- package/dist/src/workflows/iterative-development-orchestrator.js.map +1 -0
- package/dist/src/workflows/progressive-rollout-manager.js +710 -0
- package/dist/src/workflows/progressive-rollout-manager.js.map +1 -0
- package/package.json +264 -0
- package/scripts/README.md +339 -0
- package/scripts/post-install-claude-md.js +50 -0
- package/src/commands/dependency-recommendations.js +551 -0
- package/src/commands/suggest-improvements.js +492 -0
- package/src/commands/suggest-templates.js +916 -0
- package/src/npx/claude-md-protection.js +169 -0
- package/wiki/INDEX.md +264 -0
- package/wiki/NAVIGATION.md +270 -0
- package/wiki/README.md +101 -0
- package/wiki/accessibility/README.md +103 -0
- package/wiki/accessibility/assistive-tech/screen-reader-support.md +912 -0
- package/wiki/accessibility/automation/agent-testing-automation.md +880 -0
- package/wiki/accessibility/guidelines/wcag-compliance.md +278 -0
- package/wiki/accessibility/i18n/internationalization-strategies.md +1022 -0
- package/wiki/accessibility/motor-accessibility/keyboard-navigation.md +1182 -0
- package/wiki/accessibility/patterns/inclusive-design-patterns.md +715 -0
- package/wiki/accessibility/testing/automated-testing.md +665 -0
- package/wiki/accessibility/visual-design/color-contrast.md +926 -0
- package/wiki/accessibility/workflows/accessibility-first-development.md +916 -0
- package/wiki/accessibility/workflows/inclusive-design-review.md +835 -0
- package/wiki/api-reference/README.md +565 -0
- package/wiki/api-reference/agent-management-api.md +931 -0
- package/wiki/api-reference/cli-api.md +630 -0
- package/wiki/api-reference/configuration-api.md +1355 -0
- package/wiki/api-reference/examples-code-samples.md +2241 -0
- package/wiki/api-reference/hooks-coordination-api.md +1406 -0
- package/wiki/api-reference/mcp-tool-specifications.md +944 -0
- package/wiki/api-reference/plugin-development.md +1695 -0
- package/wiki/api-reference/technical-architecture.md +1729 -0
- package/wiki/command-reference/README.md +305 -0
- package/wiki/command-reference/agent-commands.md +571 -0
- package/wiki/command-reference/cli-commands.md +516 -0
- package/wiki/command-reference/command-syntax.md +676 -0
- package/wiki/command-reference/expert/README.md +616 -0
- package/wiki/command-reference/expert-tier.md +791 -0
- package/wiki/command-reference/intermediate/README.md +628 -0
- package/wiki/command-reference/intermediate-tier.md +1024 -0
- package/wiki/command-reference/mcp-integration.md +412 -0
- package/wiki/command-reference/mcp-tools/README.md +1743 -0
- package/wiki/command-reference/mcp-tools/dual-access-workflows.md +911 -0
- package/wiki/command-reference/mcp-tools/index.md +201 -0
- package/wiki/command-reference/mcp-tools/integration-patterns.md +830 -0
- package/wiki/command-reference/mcp-tools/quick-reference.md +383 -0
- package/wiki/command-reference/mcp-tools/session-management.md +1183 -0
- package/wiki/command-reference/mcp-tools/task-tool-integration.md +827 -0
- package/wiki/command-reference/novice/README.md +661 -0
- package/wiki/command-reference/novice-tier.md +1142 -0
- package/wiki/command-reference/progression-guide.md +772 -0
- package/wiki/command-reference/troubleshooting.md +803 -0
- package/wiki/command-reference/workflows.md +752 -0
- package/wiki/community/README.md +328 -0
- package/wiki/community/contributing/README.md +623 -0
- package/wiki/community/contributing/code-of-conduct.md +388 -0
- package/wiki/community/contributing/collaboration-workflows.md +1 -0
- package/wiki/community/contributing/issue-reporting.md +1 -0
- package/wiki/community/contributing/onboarding-guide.md +1 -0
- package/wiki/community/contributing/recognition-system.md +1 -0
- package/wiki/community/discussions/README.md +54 -0
- package/wiki/community/learning-resources.md +476 -0
- package/wiki/community/showcase/README.md +1 -0
- package/wiki/core-concepts/README.md +656 -0
- package/wiki/core-concepts/agent-feedback-hooks/README.md +298 -0
- package/wiki/core-concepts/agents/README.md +392 -0
- package/wiki/core-concepts/agents/agent-creation-guide.md +431 -0
- package/wiki/core-concepts/agents.md +301 -0
- package/wiki/core-concepts/architecture.md +227 -0
- package/wiki/core-concepts/hooks-lifecycle/README.md +543 -0
- package/wiki/core-concepts/integration.md +507 -0
- package/wiki/core-concepts/memory-system/README.md +521 -0
- package/wiki/core-concepts/performance.md +463 -0
- package/wiki/core-concepts/sparc-methodology/README.md +465 -0
- package/wiki/core-concepts/sparc-workflow.md +407 -0
- package/wiki/core-concepts/swarm-coordination/README.md +525 -0
- package/wiki/core-concepts/swarm-coordination.md +453 -0
- package/wiki/cost-optimization/enterprise-cost-management.md +1356 -0
- package/wiki/deployment/enterprise-deployment-patterns.md +1739 -0
- package/wiki/enterprise-architecture/enterprise-architecture-overview.md +348 -0
- package/wiki/enterprise-architecture/enterprise-scaling-patterns.md +1184 -0
- package/wiki/examples/README.md +288 -0
- package/wiki/examples/automation/cicd-pipeline/README.md +1265 -0
- package/wiki/examples/basic/hello-world/README.md +434 -0
- package/wiki/examples/basic-projects/README.md +427 -0
- package/wiki/examples/enterprise-integration/README.md +602 -0
- package/wiki/examples/integration-patterns.md +825 -0
- package/wiki/examples/legacy-migration/README.md +656 -0
- package/wiki/examples/multi-cloud/README.md +1071 -0
- package/wiki/examples/performance-benchmarks.md +729 -0
- package/wiki/examples/performance-optimization/README.md +1214 -0
- package/wiki/examples/projects/rest-api/README.md +845 -0
- package/wiki/examples/real-time-collaboration/README.md +1092 -0
- package/wiki/examples/scenarios/ecommerce/README.md +1273 -0
- package/wiki/examples/swarm-patterns.md +1026 -0
- package/wiki/examples/templates/download-system.md +993 -0
- package/wiki/examples/templates/javascript/README.md +487 -0
- package/wiki/examples/templates/javascript/package.json +119 -0
- package/wiki/examples/troubleshooting/README.md +1317 -0
- package/wiki/examples/utilities/patterns/README.md +1347 -0
- package/wiki/examples/videos/01-setup.md +403 -0
- package/wiki/examples/workflow-automation/README.md +1023 -0
- package/wiki/getting-started/README.md +398 -0
- package/wiki/getting-started/benefits.md +451 -0
- package/wiki/getting-started/claude-code-mcp/README.md +319 -0
- package/wiki/getting-started/claude-code-mcp/setup.md +431 -0
- package/wiki/getting-started/claude-code-mcp/usage-examples.md +501 -0
- package/wiki/getting-started/cli-access/README.md +300 -0
- package/wiki/getting-started/cli-access/first-commands.md +319 -0
- package/wiki/getting-started/installation/README.md +469 -0
- package/wiki/getting-started/installation/troubleshooting.md +617 -0
- package/wiki/getting-started/learning-path.md +494 -0
- package/wiki/getting-started/learning-plan-generator.md +434 -0
- package/wiki/getting-started/quick-start/README.md +255 -0
- package/wiki/getting-started/quick-start/cli-tutorial.md +680 -0
- package/wiki/getting-started/quick-start/mcp-tutorial.md +544 -0
- package/wiki/governance/multi-project-coordination.md +820 -0
- package/wiki/languages/README.md +349 -0
- package/wiki/languages/go/README.md +124 -0
- package/wiki/languages/go/examples/README.md +1066 -0
- package/wiki/languages/go/frameworks/README.md +708 -0
- package/wiki/languages/go/integration/README.md +748 -0
- package/wiki/languages/go/microservices/README.md +1185 -0
- package/wiki/languages/go/performance/README.md +1310 -0
- package/wiki/languages/go/setup/README.md +397 -0
- package/wiki/languages/go/systems/README.md +1116 -0
- package/wiki/languages/go/testing/README.md +999 -0
- package/wiki/languages/java/README.md +217 -0
- package/wiki/languages/java/claude-flow-integration.md +1220 -0
- package/wiki/languages/java/enterprise-java.md +1247 -0
- package/wiki/languages/java/examples.md +1712 -0
- package/wiki/languages/java/microservices.md +1600 -0
- package/wiki/languages/java/performance.md +1122 -0
- package/wiki/languages/java/project-setup.md +504 -0
- package/wiki/languages/java/spring-boot.md +756 -0
- package/wiki/languages/java/testing.md +1323 -0
- package/wiki/languages/javascript/README.md +575 -0
- package/wiki/languages/javascript/api/README.md +1445 -0
- package/wiki/languages/javascript/backend/README.md +748 -0
- package/wiki/languages/javascript/frontend/README.md +1048 -0
- package/wiki/languages/javascript/integration.md +1107 -0
- package/wiki/languages/javascript/setup/README.md +438 -0
- package/wiki/languages/javascript/testing/README.md +1775 -0
- package/wiki/languages/python/README.md +1002 -0
- package/wiki/languages/python/data-science/README.md +1317 -0
- package/wiki/languages/python/examples/README.md +911 -0
- package/wiki/languages/python/integration.md +1515 -0
- package/wiki/languages/python/mcp-integration.md +843 -0
- package/wiki/languages/python/setup/README.md +622 -0
- package/wiki/languages/python/testing/README.md +1680 -0
- package/wiki/languages/python/web-development/README.md +974 -0
- package/wiki/languages/rust/README.md +936 -0
- package/wiki/languages/rust/examples/cli-mcp-workflows.md +850 -0
- package/wiki/languages/rust/examples/rest-api.md +1927 -0
- package/wiki/languages/rust/setup/cargo-integration.md +780 -0
- package/wiki/languages/rust/testing/quality-validation.md +1098 -0
- package/wiki/languages/rust/web-development/axum.md +1497 -0
- package/wiki/languages/rust/workflows/systems-programming.md +1189 -0
- package/wiki/languages/typescript/README.md +581 -0
- package/wiki/languages/typescript/automation.md +1070 -0
- package/wiki/languages/typescript/coordination.md +971 -0
- package/wiki/languages/typescript/enterprise.md +1368 -0
- package/wiki/languages/typescript/frameworks.md +970 -0
- package/wiki/languages/typescript/migration.md +1384 -0
- package/wiki/languages/typescript/patterns.md +694 -0
- package/wiki/languages/typescript/performance.md +1195 -0
- package/wiki/languages/typescript/setup.md +516 -0
- package/wiki/languages/typescript/workflows.md +481 -0
- package/wiki/monitoring/enterprise-observability.md +1141 -0
- package/wiki/security/enterprise-security-framework.md +1174 -0
- package/wiki/team-coordination/team-scaling-strategies.md +1486 -0
- package/wiki/troubleshooting/README.md +654 -0
- package/wiki/troubleshooting/common-issues/README.md +659 -0
- package/wiki/troubleshooting/common-issues.md +458 -0
- package/wiki/troubleshooting/error-resolution.md +763 -0
- package/wiki/troubleshooting/performance-optimization.md +540 -0
- package/wiki/tutorials/README.md +607 -0
- package/wiki/tutorials/advanced/01-multi-agent-orchestration-patterns.md +585 -0
- package/wiki/tutorials/advanced/02-enterprise-architecture-development.md +661 -0
- package/wiki/tutorials/advanced/03-advanced-sparc-methodology.md +595 -0
- package/wiki/tutorials/advanced/04-performance-optimization-workflows.md +613 -0
- package/wiki/tutorials/advanced/05-custom-agent-development.md +681 -0
- package/wiki/tutorials/advanced/06-legacy-system-integration.md +574 -0
- package/wiki/tutorials/advanced/07-production-deployment-monitoring.md +684 -0
- package/wiki/tutorials/advanced/08-enterprise-scenarios.md +700 -0
- package/wiki/tutorials/advanced/README.md +577 -0
- package/wiki/tutorials/advanced/performance-optimization.md +476 -0
- package/wiki/tutorials/advanced/swarm-orchestration.md +627 -0
- package/wiki/tutorials/beginner/01-first-project.md +532 -0
- package/wiki/tutorials/beginner/02-basic-workflows.md +523 -0
- package/wiki/tutorials/beginner/03-simple-automation.md +641 -0
- package/wiki/tutorials/beginner/04-quality-testing.md +984 -0
- package/wiki/tutorials/beginner/README.md +388 -0
- package/wiki/tutorials/exercises/ecommerce-platform.md +1370 -0
- package/wiki/tutorials/intermediate/01-multi-agent-teams.md +961 -0
- package/wiki/tutorials/intermediate/README.md +452 -0
- package/wiki/tutorials/intermediate/optimization.md +402 -0
- package/wiki/tutorials/skill-assessment.md +522 -0
- package/wiki/tutorials/skill-competency-matrix.md +548 -0
- package/wiki/tutorials/troubleshooting/command-cheatsheet.md +425 -0
- package/wiki/tutorials/troubleshooting/setup-issues.md +717 -0
- package/wiki/video-tutorials/README.md +202 -0
- package/wiki/video-tutorials/accessibility/README.md +1349 -0
- package/wiki/video-tutorials/community/README.md +1366 -0
- package/wiki/video-tutorials/content-organization/README.md +1295 -0
- package/wiki/video-tutorials/distribution/README.md +1093 -0
- package/wiki/video-tutorials/editing/README.md +751 -0
- package/wiki/video-tutorials/interactive/README.md +1151 -0
- package/wiki/video-tutorials/multi-language/README.md +1384 -0
- package/wiki/video-tutorials/planning/README.md +461 -0
- package/wiki/video-tutorials/recording/README.md +619 -0
- package/wiki/video-tutorials/technical-specs/README.md +1018 -0
|
@@ -0,0 +1,2241 @@
|
|
|
1
|
+
# API Examples & Code Samples
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
This document provides comprehensive code samples and practical examples for all Claude Flow APIs. These examples demonstrate real-world usage patterns, best practices, and advanced integration scenarios.
|
|
6
|
+
|
|
7
|
+
## Table of Contents
|
|
8
|
+
|
|
9
|
+
- [Getting Started Examples](#getting-started-examples)
|
|
10
|
+
- [CLI API Examples](#cli-api-examples)
|
|
11
|
+
- [MCP Integration Examples](#mcp-integration-examples)
|
|
12
|
+
- [Agent Management Examples](#agent-management-examples)
|
|
13
|
+
- [Hooks & Coordination Examples](#hooks--coordination-examples)
|
|
14
|
+
- [Configuration Examples](#configuration-examples)
|
|
15
|
+
- [Plugin Development Examples](#plugin-development-examples)
|
|
16
|
+
- [Advanced Integration Patterns](#advanced-integration-patterns)
|
|
17
|
+
- [Production Use Cases](#production-use-cases)
|
|
18
|
+
|
|
19
|
+
## Getting Started Examples
|
|
20
|
+
|
|
21
|
+
### Basic Project Setup
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
// basic-setup.ts - Simple project initialization
|
|
25
|
+
import { createConsolidatedCLI } from 'claude-flow-novice/cli';
|
|
26
|
+
import { initializeAgenticFlowHooks } from 'claude-flow-novice/hooks';
|
|
27
|
+
|
|
28
|
+
async function setupBasicProject() {
|
|
29
|
+
// 1. Initialize CLI with intelligent defaults
|
|
30
|
+
const cli = createConsolidatedCLI({
|
|
31
|
+
enablePerformanceOptimization: true,
|
|
32
|
+
enableProgressiveDisclosure: true,
|
|
33
|
+
enableNaturalLanguage: true,
|
|
34
|
+
debugMode: false
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
await cli.initialize();
|
|
38
|
+
|
|
39
|
+
// 2. Initialize hook system
|
|
40
|
+
await initializeAgenticFlowHooks({
|
|
41
|
+
enableNeuralIntegration: false,
|
|
42
|
+
enablePerformanceOptimization: true,
|
|
43
|
+
maxConcurrentHooks: 10
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
// 3. Set up basic project
|
|
47
|
+
const initResult = await cli.executeCommand('init my-project --template basic');
|
|
48
|
+
console.log('Project initialized:', initResult.message);
|
|
49
|
+
|
|
50
|
+
// 4. Spawn a simple development team
|
|
51
|
+
const backendAgent = await cli.executeCommand(
|
|
52
|
+
'agent spawn backend-dev "create REST API with authentication"'
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
const testerAgent = await cli.executeCommand(
|
|
56
|
+
'agent spawn tester "write unit and integration tests"'
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
console.log('Agents spawned:', { backendAgent, testerAgent });
|
|
60
|
+
|
|
61
|
+
return cli;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Run the setup
|
|
65
|
+
setupBasicProject().catch(console.error);
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Quick Agent Spawning
|
|
69
|
+
|
|
70
|
+
```typescript
|
|
71
|
+
// quick-agents.ts - Simple agent spawning patterns
|
|
72
|
+
import { AgentFactory, AgentManager } from 'claude-flow-novice/agents';
|
|
73
|
+
|
|
74
|
+
async function spawnQuickAgents() {
|
|
75
|
+
const agentManager = new AgentManager();
|
|
76
|
+
|
|
77
|
+
// Single agent for simple task
|
|
78
|
+
const coder = await AgentFactory.spawnAgent(
|
|
79
|
+
'coder',
|
|
80
|
+
'implement user authentication system',
|
|
81
|
+
{
|
|
82
|
+
language: 'typescript',
|
|
83
|
+
framework: 'express',
|
|
84
|
+
database: 'postgresql'
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
console.log(`Coder agent spawned: ${coder.agentId}`);
|
|
89
|
+
|
|
90
|
+
// Multiple agents for complex workflow
|
|
91
|
+
const team = await AgentFactory.spawnAgentSwarm([
|
|
92
|
+
{
|
|
93
|
+
type: 'backend-dev',
|
|
94
|
+
task: 'implement API endpoints',
|
|
95
|
+
options: { language: 'typescript' }
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
type: 'frontend-dev',
|
|
99
|
+
task: 'create React components',
|
|
100
|
+
options: { framework: 'react' }
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
type: 'tester',
|
|
104
|
+
task: 'write comprehensive tests',
|
|
105
|
+
options: { coverage: 90 }
|
|
106
|
+
}
|
|
107
|
+
]);
|
|
108
|
+
|
|
109
|
+
console.log(`Team spawned: ${team.map(a => a.agentId).join(', ')}`);
|
|
110
|
+
|
|
111
|
+
return { coder, team };
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## CLI API Examples
|
|
116
|
+
|
|
117
|
+
### Command Execution Patterns
|
|
118
|
+
|
|
119
|
+
```typescript
|
|
120
|
+
// cli-patterns.ts - Various CLI usage patterns
|
|
121
|
+
import { ConsolidatedCLI, CommandHandlers } from 'claude-flow-novice/cli';
|
|
122
|
+
|
|
123
|
+
class CLIExamples {
|
|
124
|
+
private cli: ConsolidatedCLI;
|
|
125
|
+
private handlers: CommandHandlers;
|
|
126
|
+
|
|
127
|
+
constructor() {
|
|
128
|
+
this.cli = new ConsolidatedCLI({
|
|
129
|
+
enableNaturalLanguage: true,
|
|
130
|
+
enablePerformanceOptimization: true
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// Example 1: Project initialization with options
|
|
135
|
+
async initializeProject() {
|
|
136
|
+
const result = await this.cli.executeCommand(
|
|
137
|
+
'init web-app --template fullstack --tier development --sparc --hooks'
|
|
138
|
+
);
|
|
139
|
+
|
|
140
|
+
if (result.success) {
|
|
141
|
+
console.log('Project initialized successfully');
|
|
142
|
+
console.log('Next steps:', result.suggestions);
|
|
143
|
+
} else {
|
|
144
|
+
console.error('Initialization failed:', result.error);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
return result;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// Example 2: Natural language command processing
|
|
151
|
+
async naturalLanguageCommands() {
|
|
152
|
+
// These natural language commands are automatically translated
|
|
153
|
+
const commands = [
|
|
154
|
+
'create a REST API with authentication',
|
|
155
|
+
'spawn three agents to build a React app',
|
|
156
|
+
'run tests with 90% coverage',
|
|
157
|
+
'optimize performance and fix any issues'
|
|
158
|
+
];
|
|
159
|
+
|
|
160
|
+
const results = [];
|
|
161
|
+
for (const command of commands) {
|
|
162
|
+
const result = await this.cli.executeCommand(command);
|
|
163
|
+
results.push({ command, result });
|
|
164
|
+
console.log(`Command: "${command}" - Success: ${result.success}`);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
return results;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// Example 3: Batch command execution
|
|
171
|
+
async batchCommands() {
|
|
172
|
+
const commands = [
|
|
173
|
+
'agent spawn architect "design system architecture"',
|
|
174
|
+
'agent spawn backend-dev "implement microservices"',
|
|
175
|
+
'agent spawn frontend-dev "build user interface"',
|
|
176
|
+
'agent spawn tester "create test automation"',
|
|
177
|
+
'sparc tdd "user management system"'
|
|
178
|
+
];
|
|
179
|
+
|
|
180
|
+
const results = await Promise.all(
|
|
181
|
+
commands.map(cmd => this.cli.executeCommand(cmd))
|
|
182
|
+
);
|
|
183
|
+
|
|
184
|
+
const successful = results.filter(r => r.success).length;
|
|
185
|
+
console.log(`Executed ${commands.length} commands, ${successful} successful`);
|
|
186
|
+
|
|
187
|
+
return results;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// Example 4: Interactive help and learning
|
|
191
|
+
async interactiveHelp() {
|
|
192
|
+
const helpResult = await this.cli.executeCommand('help --interactive');
|
|
193
|
+
|
|
194
|
+
// Access the intelligence engine for recommendations
|
|
195
|
+
const intelligence = this.cli.getIntelligenceEngine();
|
|
196
|
+
const recommendations = await intelligence.generateSuggestions({
|
|
197
|
+
type: 'web-application',
|
|
198
|
+
language: 'typescript',
|
|
199
|
+
complexity: 0.7
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
console.log('Available help topics:', helpResult.data.topics);
|
|
203
|
+
console.log('Recommendations:', recommendations);
|
|
204
|
+
|
|
205
|
+
return { helpResult, recommendations };
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
// Example 5: Status monitoring and metrics
|
|
209
|
+
async monitorSystem() {
|
|
210
|
+
const statusResult = await this.cli.executeCommand('status --format json --detailed');
|
|
211
|
+
|
|
212
|
+
const performanceOptimizer = this.cli.getPerformanceOptimizer();
|
|
213
|
+
const metrics = await performanceOptimizer.getMetrics();
|
|
214
|
+
|
|
215
|
+
console.log('System status:', statusResult.data);
|
|
216
|
+
console.log('Performance metrics:', metrics);
|
|
217
|
+
|
|
218
|
+
return { status: statusResult.data, metrics };
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// Usage example
|
|
223
|
+
async function runCLIExamples() {
|
|
224
|
+
const examples = new CLIExamples();
|
|
225
|
+
|
|
226
|
+
await examples.initializeProject();
|
|
227
|
+
await examples.naturalLanguageCommands();
|
|
228
|
+
await examples.batchCommands();
|
|
229
|
+
await examples.interactiveHelp();
|
|
230
|
+
await examples.monitorSystem();
|
|
231
|
+
}
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
### Advanced CLI Integration
|
|
235
|
+
|
|
236
|
+
```typescript
|
|
237
|
+
// cli-integration.ts - Advanced CLI integration patterns
|
|
238
|
+
import { createConsolidatedCLI, IntelligenceEngine } from 'claude-flow-novice/cli';
|
|
239
|
+
|
|
240
|
+
class AdvancedCLIIntegration {
|
|
241
|
+
private cli: ConsolidatedCLI;
|
|
242
|
+
private intelligence: IntelligenceEngine;
|
|
243
|
+
|
|
244
|
+
async setup() {
|
|
245
|
+
this.cli = createConsolidatedCLI({
|
|
246
|
+
enableNaturalLanguage: true,
|
|
247
|
+
enablePerformanceOptimization: true,
|
|
248
|
+
enableProgressiveDisclosure: true,
|
|
249
|
+
debugMode: true
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
await this.cli.initialize();
|
|
253
|
+
this.intelligence = this.cli.getIntelligenceEngine();
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
// Smart project detection and setup
|
|
257
|
+
async smartProjectSetup(projectPath: string) {
|
|
258
|
+
// Analyze existing project
|
|
259
|
+
const projectContext = await this.intelligence.analyzeProjectContext(projectPath);
|
|
260
|
+
console.log('Detected project type:', projectContext.type);
|
|
261
|
+
|
|
262
|
+
// Get intelligent recommendations
|
|
263
|
+
const recommendations = await this.intelligence.recommendAgents(projectContext);
|
|
264
|
+
console.log('Agent recommendations:', recommendations);
|
|
265
|
+
|
|
266
|
+
// Apply recommendations automatically
|
|
267
|
+
for (const rec of recommendations) {
|
|
268
|
+
if (rec.confidence > 0.8) {
|
|
269
|
+
const result = await this.cli.executeCommand(
|
|
270
|
+
`agent spawn ${rec.type} "${rec.reasoning}"`
|
|
271
|
+
);
|
|
272
|
+
console.log(`Spawned ${rec.type} agent:`, result.success);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
return { projectContext, recommendations };
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// Adaptive workflow based on user behavior
|
|
280
|
+
async adaptiveWorkflow() {
|
|
281
|
+
// Learn from user patterns
|
|
282
|
+
const userTier = await this.intelligence.detectUserTier();
|
|
283
|
+
console.log('Detected user tier:', userTier);
|
|
284
|
+
|
|
285
|
+
// Adapt interface based on expertise
|
|
286
|
+
switch (userTier) {
|
|
287
|
+
case 'novice':
|
|
288
|
+
return await this.noviceWorkflow();
|
|
289
|
+
case 'development':
|
|
290
|
+
return await this.developmentWorkflow();
|
|
291
|
+
case 'advanced':
|
|
292
|
+
return await this.advancedWorkflow();
|
|
293
|
+
case 'expert':
|
|
294
|
+
return await this.expertWorkflow();
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
private async noviceWorkflow() {
|
|
299
|
+
// Guided workflow for beginners
|
|
300
|
+
console.log('Starting novice-friendly guided workflow...');
|
|
301
|
+
|
|
302
|
+
const steps = [
|
|
303
|
+
'help basics',
|
|
304
|
+
'init --guided',
|
|
305
|
+
'agent spawn coder "simple web page"',
|
|
306
|
+
'status --simple'
|
|
307
|
+
];
|
|
308
|
+
|
|
309
|
+
for (const step of steps) {
|
|
310
|
+
console.log(`Step: ${step}`);
|
|
311
|
+
const result = await this.cli.executeCommand(step);
|
|
312
|
+
|
|
313
|
+
if (!result.success) {
|
|
314
|
+
console.log('Providing additional help...');
|
|
315
|
+
await this.cli.executeCommand(`help ${step.split(' ')[0]}`);
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
private async expertWorkflow() {
|
|
321
|
+
// Advanced workflow for experts
|
|
322
|
+
console.log('Starting expert-level workflow...');
|
|
323
|
+
|
|
324
|
+
const commands = [
|
|
325
|
+
'swarm init hierarchical --max-agents 20',
|
|
326
|
+
'neural enable --patterns all',
|
|
327
|
+
'hooks enable experimental',
|
|
328
|
+
'agent spawn custom-type "complex distributed system"',
|
|
329
|
+
'monitor start --detailed --neural'
|
|
330
|
+
];
|
|
331
|
+
|
|
332
|
+
return await Promise.all(
|
|
333
|
+
commands.map(cmd => this.cli.executeCommand(cmd))
|
|
334
|
+
);
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
// Custom command extension
|
|
338
|
+
async extendCLI() {
|
|
339
|
+
// Add custom commands dynamically
|
|
340
|
+
const customHandler = async (args: any) => {
|
|
341
|
+
console.log('Executing custom deployment command:', args);
|
|
342
|
+
|
|
343
|
+
// Custom deployment logic
|
|
344
|
+
const deployResult = await this.deployToEnvironment(args.environment);
|
|
345
|
+
|
|
346
|
+
return {
|
|
347
|
+
success: deployResult.success,
|
|
348
|
+
message: `Deployment to ${args.environment}: ${deployResult.status}`,
|
|
349
|
+
data: deployResult
|
|
350
|
+
};
|
|
351
|
+
};
|
|
352
|
+
|
|
353
|
+
// Register custom command (this would be done through proper CLI extension)
|
|
354
|
+
console.log('Custom command would be registered here');
|
|
355
|
+
|
|
356
|
+
// Example usage of the theoretical custom command
|
|
357
|
+
const result = await this.cli.executeCommand('deploy staging --strategy blue-green');
|
|
358
|
+
return result;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
private async deployToEnvironment(environment: string) {
|
|
362
|
+
// Mock deployment logic
|
|
363
|
+
return {
|
|
364
|
+
success: true,
|
|
365
|
+
status: 'completed',
|
|
366
|
+
environment,
|
|
367
|
+
timestamp: new Date()
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
## MCP Integration Examples
|
|
374
|
+
|
|
375
|
+
### Basic MCP Tool Usage
|
|
376
|
+
|
|
377
|
+
```typescript
|
|
378
|
+
// mcp-basic.ts - Basic MCP tool integration
|
|
379
|
+
import {
|
|
380
|
+
mcp__claude_flow__swarm_init,
|
|
381
|
+
mcp__claude_flow__agent_spawn,
|
|
382
|
+
mcp__claude_flow__task_orchestrate,
|
|
383
|
+
mcp__claude_flow__memory_usage
|
|
384
|
+
} from 'claude-flow-novice/mcp';
|
|
385
|
+
|
|
386
|
+
async function basicMCPExample() {
|
|
387
|
+
// 1. Initialize swarm
|
|
388
|
+
const swarm = await mcp__claude_flow__swarm_init({
|
|
389
|
+
topology: 'hierarchical',
|
|
390
|
+
maxAgents: 8,
|
|
391
|
+
strategy: 'balanced'
|
|
392
|
+
});
|
|
393
|
+
|
|
394
|
+
console.log('Swarm initialized:', swarm.swarmId);
|
|
395
|
+
|
|
396
|
+
// 2. Spawn agents
|
|
397
|
+
const agents = await Promise.all([
|
|
398
|
+
mcp__claude_flow__agent_spawn({
|
|
399
|
+
type: 'backend-dev',
|
|
400
|
+
name: 'API-Developer'
|
|
401
|
+
}),
|
|
402
|
+
mcp__claude_flow__agent_spawn({
|
|
403
|
+
type: 'frontend-dev',
|
|
404
|
+
name: 'UI-Developer'
|
|
405
|
+
}),
|
|
406
|
+
mcp__claude_flow__agent_spawn({
|
|
407
|
+
type: 'tester',
|
|
408
|
+
name: 'QA-Engineer'
|
|
409
|
+
})
|
|
410
|
+
]);
|
|
411
|
+
|
|
412
|
+
console.log('Agents spawned:', agents.map(a => a.agentId));
|
|
413
|
+
|
|
414
|
+
// 3. Store shared context
|
|
415
|
+
await mcp__claude_flow__memory_usage({
|
|
416
|
+
action: 'store',
|
|
417
|
+
key: 'project/requirements',
|
|
418
|
+
value: JSON.stringify({
|
|
419
|
+
framework: 'react',
|
|
420
|
+
backend: 'express',
|
|
421
|
+
database: 'postgresql',
|
|
422
|
+
testing: 'jest'
|
|
423
|
+
}),
|
|
424
|
+
namespace: 'project-context'
|
|
425
|
+
});
|
|
426
|
+
|
|
427
|
+
// 4. Orchestrate development task
|
|
428
|
+
const task = await mcp__claude_flow__task_orchestrate({
|
|
429
|
+
task: 'Build a full-stack web application with user authentication',
|
|
430
|
+
strategy: 'adaptive',
|
|
431
|
+
priority: 'high',
|
|
432
|
+
maxAgents: 3
|
|
433
|
+
});
|
|
434
|
+
|
|
435
|
+
console.log('Task orchestrated:', task.taskId);
|
|
436
|
+
|
|
437
|
+
return { swarm, agents, task };
|
|
438
|
+
}
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
### Advanced MCP Coordination
|
|
442
|
+
|
|
443
|
+
```typescript
|
|
444
|
+
// mcp-advanced.ts - Advanced MCP coordination patterns
|
|
445
|
+
import {
|
|
446
|
+
mcp__claude_flow__daa_init,
|
|
447
|
+
mcp__claude_flow__daa_agent_create,
|
|
448
|
+
mcp__claude_flow__daa_workflow_create,
|
|
449
|
+
mcp__claude_flow__neural_train,
|
|
450
|
+
mcp__claude_flow__performance_report
|
|
451
|
+
} from 'claude-flow-novice/mcp';
|
|
452
|
+
|
|
453
|
+
class AdvancedMCPCoordination {
|
|
454
|
+
private swarmId: string;
|
|
455
|
+
private agents: Map<string, any> = new Map();
|
|
456
|
+
|
|
457
|
+
async initializeDAA() {
|
|
458
|
+
// Initialize Decentralized Autonomous Agents
|
|
459
|
+
const daaResult = await mcp__claude_flow__daa_init({
|
|
460
|
+
enableCoordination: true,
|
|
461
|
+
enableLearning: true,
|
|
462
|
+
persistenceMode: 'auto'
|
|
463
|
+
});
|
|
464
|
+
|
|
465
|
+
console.log('DAA system initialized:', daaResult);
|
|
466
|
+
|
|
467
|
+
// Create autonomous agents with different cognitive patterns
|
|
468
|
+
const agentConfigs = [
|
|
469
|
+
{
|
|
470
|
+
id: 'adaptive-coordinator',
|
|
471
|
+
cognitivePattern: 'adaptive',
|
|
472
|
+
capabilities: ['coordination', 'optimization'],
|
|
473
|
+
enableMemory: true,
|
|
474
|
+
learningRate: 0.1
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
id: 'analytical-researcher',
|
|
478
|
+
cognitivePattern: 'convergent',
|
|
479
|
+
capabilities: ['research', 'analysis'],
|
|
480
|
+
enableMemory: true,
|
|
481
|
+
learningRate: 0.05
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
id: 'creative-designer',
|
|
485
|
+
cognitivePattern: 'divergent',
|
|
486
|
+
capabilities: ['design', 'creativity'],
|
|
487
|
+
enableMemory: true,
|
|
488
|
+
learningRate: 0.15
|
|
489
|
+
}
|
|
490
|
+
];
|
|
491
|
+
|
|
492
|
+
for (const config of agentConfigs) {
|
|
493
|
+
const agent = await mcp__claude_flow__daa_agent_create(config);
|
|
494
|
+
this.agents.set(agent.agentId, agent);
|
|
495
|
+
console.log(`Created autonomous agent: ${agent.agentId}`);
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
return daaResult;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
async createIntelligentWorkflow() {
|
|
502
|
+
// Create a self-adapting workflow
|
|
503
|
+
const workflow = await mcp__claude_flow__daa_workflow_create({
|
|
504
|
+
id: 'intelligent-development',
|
|
505
|
+
name: 'Intelligent Development Workflow',
|
|
506
|
+
strategy: 'adaptive',
|
|
507
|
+
steps: [
|
|
508
|
+
{
|
|
509
|
+
id: 'requirements-analysis',
|
|
510
|
+
name: 'Requirements Analysis',
|
|
511
|
+
agent: 'analytical-researcher',
|
|
512
|
+
adaptable: true
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
id: 'creative-design',
|
|
516
|
+
name: 'Creative Design Phase',
|
|
517
|
+
agent: 'creative-designer',
|
|
518
|
+
adaptable: true
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
id: 'implementation',
|
|
522
|
+
name: 'Implementation',
|
|
523
|
+
agent: 'adaptive-coordinator',
|
|
524
|
+
adaptable: true
|
|
525
|
+
}
|
|
526
|
+
],
|
|
527
|
+
dependencies: {
|
|
528
|
+
'creative-design': ['requirements-analysis'],
|
|
529
|
+
'implementation': ['creative-design']
|
|
530
|
+
}
|
|
531
|
+
});
|
|
532
|
+
|
|
533
|
+
console.log('Intelligent workflow created:', workflow.workflowId);
|
|
534
|
+
|
|
535
|
+
return workflow;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
async performanceOptimization() {
|
|
539
|
+
// Train neural patterns for optimization
|
|
540
|
+
const trainingResult = await mcp__claude_flow__neural_train({
|
|
541
|
+
iterations: 50
|
|
542
|
+
});
|
|
543
|
+
|
|
544
|
+
console.log('Neural training completed:', trainingResult);
|
|
545
|
+
|
|
546
|
+
// Generate performance report
|
|
547
|
+
const performanceReport = await mcp__claude_flow__performance_report({
|
|
548
|
+
format: 'detailed',
|
|
549
|
+
timeframe: '24h'
|
|
550
|
+
});
|
|
551
|
+
|
|
552
|
+
console.log('Performance analysis:', performanceReport.report.summary);
|
|
553
|
+
|
|
554
|
+
// Apply optimizations based on bottlenecks
|
|
555
|
+
if (performanceReport.report.bottlenecks.length > 0) {
|
|
556
|
+
console.log('Applying optimizations for bottlenecks:');
|
|
557
|
+
for (const bottleneck of performanceReport.report.bottlenecks) {
|
|
558
|
+
console.log(`- ${bottleneck.component}: ${bottleneck.impact}`);
|
|
559
|
+
// Apply specific optimizations here
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
return { trainingResult, performanceReport };
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
async coordinatedKnowledgeSharing() {
|
|
567
|
+
// Implement cross-agent knowledge sharing
|
|
568
|
+
const coordinatorId = Array.from(this.agents.keys())[0];
|
|
569
|
+
const otherAgents = Array.from(this.agents.keys()).slice(1);
|
|
570
|
+
|
|
571
|
+
await mcp__claude_flow__daa_knowledge_share({
|
|
572
|
+
sourceAgentId: coordinatorId,
|
|
573
|
+
targetAgentIds: otherAgents,
|
|
574
|
+
knowledgeDomain: 'optimization-patterns',
|
|
575
|
+
knowledgeContent: {
|
|
576
|
+
patterns: ['performance-optimization', 'resource-allocation'],
|
|
577
|
+
insights: ['cpu-usage-patterns', 'memory-efficiency'],
|
|
578
|
+
bestPractices: ['parallel-processing', 'cache-optimization']
|
|
579
|
+
}
|
|
580
|
+
});
|
|
581
|
+
|
|
582
|
+
console.log('Knowledge shared between agents');
|
|
583
|
+
|
|
584
|
+
// Check learning progress
|
|
585
|
+
const learningStatus = await mcp__claude_flow__daa_learning_status({
|
|
586
|
+
detailed: true
|
|
587
|
+
});
|
|
588
|
+
|
|
589
|
+
console.log('Learning progress:', learningStatus);
|
|
590
|
+
|
|
591
|
+
return learningStatus;
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
// Usage example
|
|
596
|
+
async function runAdvancedMCPExample() {
|
|
597
|
+
const coordinator = new AdvancedMCPCoordination();
|
|
598
|
+
|
|
599
|
+
await coordinator.initializeDAA();
|
|
600
|
+
await coordinator.createIntelligentWorkflow();
|
|
601
|
+
await coordinator.performanceOptimization();
|
|
602
|
+
await coordinator.coordinatedKnowledgeSharing();
|
|
603
|
+
}
|
|
604
|
+
```
|
|
605
|
+
|
|
606
|
+
## Agent Management Examples
|
|
607
|
+
|
|
608
|
+
### Agent Lifecycle Management
|
|
609
|
+
|
|
610
|
+
```typescript
|
|
611
|
+
// agent-lifecycle.ts - Complete agent lifecycle management
|
|
612
|
+
import {
|
|
613
|
+
AgentFactory,
|
|
614
|
+
AgentManager,
|
|
615
|
+
AgentRegistry,
|
|
616
|
+
BaseAgent
|
|
617
|
+
} from 'claude-flow-novice/agents';
|
|
618
|
+
|
|
619
|
+
class AgentLifecycleExample {
|
|
620
|
+
private agentManager: AgentManager;
|
|
621
|
+
private agentRegistry: AgentRegistry;
|
|
622
|
+
|
|
623
|
+
constructor() {
|
|
624
|
+
this.agentManager = new AgentManager();
|
|
625
|
+
this.agentRegistry = new AgentRegistry();
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
async demonstrateLifecycle() {
|
|
629
|
+
// 1. Create and configure agent
|
|
630
|
+
const agent = await this.createCustomAgent();
|
|
631
|
+
|
|
632
|
+
// 2. Monitor agent status
|
|
633
|
+
await this.monitorAgent(agent.id);
|
|
634
|
+
|
|
635
|
+
// 3. Scale agent resources
|
|
636
|
+
await this.scaleAgentResources(agent.id);
|
|
637
|
+
|
|
638
|
+
// 4. Handle agent failures
|
|
639
|
+
await this.handleAgentFailures(agent.id);
|
|
640
|
+
|
|
641
|
+
// 5. Graceful shutdown
|
|
642
|
+
await this.gracefulShutdown(agent.id);
|
|
643
|
+
|
|
644
|
+
return agent;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
private async createCustomAgent(): Promise<BaseAgent> {
|
|
648
|
+
// Advanced agent configuration
|
|
649
|
+
const config = {
|
|
650
|
+
type: 'ml-developer',
|
|
651
|
+
name: 'ML-Research-Agent',
|
|
652
|
+
capabilities: [
|
|
653
|
+
'tensorflow',
|
|
654
|
+
'pytorch',
|
|
655
|
+
'data-analysis',
|
|
656
|
+
'model-training'
|
|
657
|
+
],
|
|
658
|
+
resources: {
|
|
659
|
+
memory: '4GB',
|
|
660
|
+
cpu: '4 cores',
|
|
661
|
+
gpu: '1x NVIDIA T4',
|
|
662
|
+
timeout: 3600000 // 1 hour
|
|
663
|
+
},
|
|
664
|
+
coordination: {
|
|
665
|
+
swarmId: 'research-team',
|
|
666
|
+
role: 'specialist',
|
|
667
|
+
communicationPatterns: ['broadcast', 'direct', 'consensus']
|
|
668
|
+
},
|
|
669
|
+
hooks: {
|
|
670
|
+
preTask: ['resource-validation', 'data-preparation'],
|
|
671
|
+
postTask: ['result-validation', 'model-backup'],
|
|
672
|
+
onError: ['error-analysis', 'recovery-attempt']
|
|
673
|
+
},
|
|
674
|
+
neural: {
|
|
675
|
+
enabled: true,
|
|
676
|
+
learningRate: 0.01,
|
|
677
|
+
patterns: ['optimization', 'error-prediction']
|
|
678
|
+
}
|
|
679
|
+
};
|
|
680
|
+
|
|
681
|
+
const agent = await AgentFactory.createAgent(config);
|
|
682
|
+
await agent.initialize();
|
|
683
|
+
|
|
684
|
+
// Register with system
|
|
685
|
+
this.agentRegistry.registerAgent(agent);
|
|
686
|
+
|
|
687
|
+
console.log(`Agent ${agent.id} created and registered`);
|
|
688
|
+
return agent;
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
private async monitorAgent(agentId: string): Promise<void> {
|
|
692
|
+
// Set up real-time monitoring
|
|
693
|
+
const agent = this.agentRegistry.findAgent(agentId);
|
|
694
|
+
if (!agent) return;
|
|
695
|
+
|
|
696
|
+
// Monitor status changes
|
|
697
|
+
agent.onStatusChange((oldStatus, newStatus) => {
|
|
698
|
+
console.log(`Agent ${agentId}: ${oldStatus} → ${newStatus}`);
|
|
699
|
+
});
|
|
700
|
+
|
|
701
|
+
// Monitor performance metrics
|
|
702
|
+
setInterval(async () => {
|
|
703
|
+
const metrics = await agent.getMetrics();
|
|
704
|
+
console.log(`Agent ${agentId} metrics:`, {
|
|
705
|
+
cpu: `${metrics.resources.cpuUsage}%`,
|
|
706
|
+
memory: `${metrics.resources.memoryUsage / 1024 / 1024}MB`,
|
|
707
|
+
tasks: `${metrics.performance.tasksCompleted} completed`,
|
|
708
|
+
success: `${metrics.performance.successRate * 100}%`
|
|
709
|
+
});
|
|
710
|
+
|
|
711
|
+
// Alert on high resource usage
|
|
712
|
+
if (metrics.resources.cpuUsage > 80) {
|
|
713
|
+
console.warn(`High CPU usage detected for agent ${agentId}`);
|
|
714
|
+
await this.scaleAgentResources(agentId);
|
|
715
|
+
}
|
|
716
|
+
}, 30000); // Every 30 seconds
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
private async scaleAgentResources(agentId: string): Promise<void> {
|
|
720
|
+
console.log(`Scaling resources for agent ${agentId}`);
|
|
721
|
+
|
|
722
|
+
const agent = this.agentRegistry.findAgent(agentId);
|
|
723
|
+
if (!agent) return;
|
|
724
|
+
|
|
725
|
+
// Get current resource usage
|
|
726
|
+
const metrics = await agent.getMetrics();
|
|
727
|
+
|
|
728
|
+
// Calculate new resource allocation
|
|
729
|
+
const newResources = {
|
|
730
|
+
memory: metrics.resources.memoryUsage > 0.8 ? '8GB' : '4GB',
|
|
731
|
+
cpu: metrics.resources.cpuUsage > 80 ? '8 cores' : '4 cores'
|
|
732
|
+
};
|
|
733
|
+
|
|
734
|
+
// Apply resource scaling
|
|
735
|
+
await agent.updateResources(newResources);
|
|
736
|
+
console.log(`Resources scaled for agent ${agentId}:`, newResources);
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
private async handleAgentFailures(agentId: string): Promise<void> {
|
|
740
|
+
const agent = this.agentRegistry.findAgent(agentId);
|
|
741
|
+
if (!agent) return;
|
|
742
|
+
|
|
743
|
+
// Set up error handling
|
|
744
|
+
agent.onError(async (error, context) => {
|
|
745
|
+
console.error(`Agent ${agentId} error:`, error.message);
|
|
746
|
+
|
|
747
|
+
// Implement recovery strategies
|
|
748
|
+
switch (error.type) {
|
|
749
|
+
case 'memory-exhaustion':
|
|
750
|
+
await this.recoverFromMemoryExhaustion(agent);
|
|
751
|
+
break;
|
|
752
|
+
case 'task-timeout':
|
|
753
|
+
await this.recoverFromTaskTimeout(agent, context);
|
|
754
|
+
break;
|
|
755
|
+
case 'communication-failure':
|
|
756
|
+
await this.recoverFromCommunicationFailure(agent);
|
|
757
|
+
break;
|
|
758
|
+
default:
|
|
759
|
+
await this.genericRecovery(agent, error);
|
|
760
|
+
}
|
|
761
|
+
});
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
private async recoverFromMemoryExhaustion(agent: BaseAgent): Promise<void> {
|
|
765
|
+
console.log(`Recovering from memory exhaustion for agent ${agent.id}`);
|
|
766
|
+
|
|
767
|
+
// 1. Pause current tasks
|
|
768
|
+
await agent.pauseCurrentTasks();
|
|
769
|
+
|
|
770
|
+
// 2. Clear non-essential memory
|
|
771
|
+
await agent.clearCache();
|
|
772
|
+
|
|
773
|
+
// 3. Scale up memory
|
|
774
|
+
await agent.updateResources({ memory: '8GB' });
|
|
775
|
+
|
|
776
|
+
// 4. Resume tasks
|
|
777
|
+
await agent.resumeTasks();
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
private async gracefulShutdown(agentId: string): Promise<void> {
|
|
781
|
+
console.log(`Initiating graceful shutdown for agent ${agentId}`);
|
|
782
|
+
|
|
783
|
+
const agent = this.agentRegistry.findAgent(agentId);
|
|
784
|
+
if (!agent) return;
|
|
785
|
+
|
|
786
|
+
// 1. Stop accepting new tasks
|
|
787
|
+
await agent.stopAcceptingTasks();
|
|
788
|
+
|
|
789
|
+
// 2. Complete current tasks
|
|
790
|
+
await agent.completeCurrentTasks(60000); // 1 minute timeout
|
|
791
|
+
|
|
792
|
+
// 3. Save state
|
|
793
|
+
await agent.saveState();
|
|
794
|
+
|
|
795
|
+
// 4. Cleanup resources
|
|
796
|
+
await agent.cleanup();
|
|
797
|
+
|
|
798
|
+
// 5. Unregister from system
|
|
799
|
+
this.agentRegistry.unregisterAgent(agentId);
|
|
800
|
+
|
|
801
|
+
console.log(`Agent ${agentId} shutdown completed`);
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
```
|
|
805
|
+
|
|
806
|
+
### Multi-Agent Coordination
|
|
807
|
+
|
|
808
|
+
```typescript
|
|
809
|
+
// multi-agent-coordination.ts - Complex multi-agent scenarios
|
|
810
|
+
import {
|
|
811
|
+
SwarmCoordinator,
|
|
812
|
+
AgentTeam,
|
|
813
|
+
TaskDistributor
|
|
814
|
+
} from 'claude-flow-novice/coordination';
|
|
815
|
+
|
|
816
|
+
class MultiAgentCoordination {
|
|
817
|
+
private coordinator: SwarmCoordinator;
|
|
818
|
+
private teams: Map<string, AgentTeam> = new Map();
|
|
819
|
+
|
|
820
|
+
constructor() {
|
|
821
|
+
this.coordinator = new SwarmCoordinator({
|
|
822
|
+
topology: 'hierarchical',
|
|
823
|
+
maxAgents: 50,
|
|
824
|
+
coordinationStrategy: 'adaptive'
|
|
825
|
+
});
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
async orchestrateFullStackDevelopment() {
|
|
829
|
+
// Create specialized teams
|
|
830
|
+
const teams = await this.createSpecializedTeams();
|
|
831
|
+
|
|
832
|
+
// Distribute work across teams
|
|
833
|
+
const workPlan = await this.createWorkPlan();
|
|
834
|
+
|
|
835
|
+
// Execute coordinated development
|
|
836
|
+
const results = await this.executeCoordinatedWork(teams, workPlan);
|
|
837
|
+
|
|
838
|
+
return results;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
private async createSpecializedTeams() {
|
|
842
|
+
// Backend team
|
|
843
|
+
const backendTeam = new AgentTeam('backend-team', {
|
|
844
|
+
coordinator: await this.spawnTeamCoordinator('backend'),
|
|
845
|
+
specialists: [
|
|
846
|
+
await this.spawnSpecialist('api-developer'),
|
|
847
|
+
await this.spawnSpecialist('database-architect'),
|
|
848
|
+
await this.spawnSpecialist('security-engineer')
|
|
849
|
+
]
|
|
850
|
+
});
|
|
851
|
+
|
|
852
|
+
// Frontend team
|
|
853
|
+
const frontendTeam = new AgentTeam('frontend-team', {
|
|
854
|
+
coordinator: await this.spawnTeamCoordinator('frontend'),
|
|
855
|
+
specialists: [
|
|
856
|
+
await this.spawnSpecialist('ui-developer'),
|
|
857
|
+
await this.spawnSpecialist('ux-designer'),
|
|
858
|
+
await this.spawnSpecialist('performance-optimizer')
|
|
859
|
+
]
|
|
860
|
+
});
|
|
861
|
+
|
|
862
|
+
// QA team
|
|
863
|
+
const qaTeam = new AgentTeam('qa-team', {
|
|
864
|
+
coordinator: await this.spawnTeamCoordinator('qa'),
|
|
865
|
+
specialists: [
|
|
866
|
+
await this.spawnSpecialist('test-automation'),
|
|
867
|
+
await this.spawnSpecialist('security-tester'),
|
|
868
|
+
await this.spawnSpecialist('performance-tester')
|
|
869
|
+
]
|
|
870
|
+
});
|
|
871
|
+
|
|
872
|
+
// DevOps team
|
|
873
|
+
const devopsTeam = new AgentTeam('devops-team', {
|
|
874
|
+
coordinator: await this.spawnTeamCoordinator('devops'),
|
|
875
|
+
specialists: [
|
|
876
|
+
await this.spawnSpecialist('infrastructure-engineer'),
|
|
877
|
+
await this.spawnSpecialist('deployment-specialist'),
|
|
878
|
+
await this.spawnSpecialist('monitoring-specialist')
|
|
879
|
+
]
|
|
880
|
+
});
|
|
881
|
+
|
|
882
|
+
this.teams.set('backend', backendTeam);
|
|
883
|
+
this.teams.set('frontend', frontendTeam);
|
|
884
|
+
this.teams.set('qa', qaTeam);
|
|
885
|
+
this.teams.set('devops', devopsTeam);
|
|
886
|
+
|
|
887
|
+
return { backendTeam, frontendTeam, qaTeam, devopsTeam };
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
private async createWorkPlan() {
|
|
891
|
+
return {
|
|
892
|
+
phases: [
|
|
893
|
+
{
|
|
894
|
+
name: 'Architecture & Planning',
|
|
895
|
+
duration: '1 week',
|
|
896
|
+
teams: ['backend', 'frontend', 'devops'],
|
|
897
|
+
dependencies: [],
|
|
898
|
+
deliverables: [
|
|
899
|
+
'System architecture document',
|
|
900
|
+
'API specification',
|
|
901
|
+
'UI/UX mockups',
|
|
902
|
+
'Infrastructure plan'
|
|
903
|
+
]
|
|
904
|
+
},
|
|
905
|
+
{
|
|
906
|
+
name: 'Foundation Development',
|
|
907
|
+
duration: '2 weeks',
|
|
908
|
+
teams: ['backend', 'frontend'],
|
|
909
|
+
dependencies: ['Architecture & Planning'],
|
|
910
|
+
deliverables: [
|
|
911
|
+
'Core API endpoints',
|
|
912
|
+
'Authentication system',
|
|
913
|
+
'Basic UI components',
|
|
914
|
+
'Database schema'
|
|
915
|
+
]
|
|
916
|
+
},
|
|
917
|
+
{
|
|
918
|
+
name: 'Feature Implementation',
|
|
919
|
+
duration: '3 weeks',
|
|
920
|
+
teams: ['backend', 'frontend'],
|
|
921
|
+
dependencies: ['Foundation Development'],
|
|
922
|
+
deliverables: [
|
|
923
|
+
'Complete feature set',
|
|
924
|
+
'Frontend integration',
|
|
925
|
+
'Data validation',
|
|
926
|
+
'Error handling'
|
|
927
|
+
]
|
|
928
|
+
},
|
|
929
|
+
{
|
|
930
|
+
name: 'Testing & Quality Assurance',
|
|
931
|
+
duration: '1 week',
|
|
932
|
+
teams: ['qa'],
|
|
933
|
+
dependencies: ['Feature Implementation'],
|
|
934
|
+
deliverables: [
|
|
935
|
+
'Automated test suite',
|
|
936
|
+
'Performance benchmarks',
|
|
937
|
+
'Security audit',
|
|
938
|
+
'Bug fixes'
|
|
939
|
+
]
|
|
940
|
+
},
|
|
941
|
+
{
|
|
942
|
+
name: 'Deployment & Monitoring',
|
|
943
|
+
duration: '1 week',
|
|
944
|
+
teams: ['devops'],
|
|
945
|
+
dependencies: ['Testing & Quality Assurance'],
|
|
946
|
+
deliverables: [
|
|
947
|
+
'Production deployment',
|
|
948
|
+
'Monitoring setup',
|
|
949
|
+
'Backup systems',
|
|
950
|
+
'Documentation'
|
|
951
|
+
]
|
|
952
|
+
}
|
|
953
|
+
]
|
|
954
|
+
};
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
private async executeCoordinatedWork(teams: any, workPlan: any) {
|
|
958
|
+
const results = [];
|
|
959
|
+
|
|
960
|
+
for (const phase of workPlan.phases) {
|
|
961
|
+
console.log(`Starting phase: ${phase.name}`);
|
|
962
|
+
|
|
963
|
+
// Check dependencies
|
|
964
|
+
await this.waitForDependencies(phase.dependencies, results);
|
|
965
|
+
|
|
966
|
+
// Execute phase with assigned teams
|
|
967
|
+
const phaseResults = await Promise.all(
|
|
968
|
+
phase.teams.map(async (teamName) => {
|
|
969
|
+
const team = this.teams.get(teamName);
|
|
970
|
+
if (!team) return null;
|
|
971
|
+
|
|
972
|
+
return await this.executeTeamWork(team, phase);
|
|
973
|
+
})
|
|
974
|
+
);
|
|
975
|
+
|
|
976
|
+
// Aggregate results
|
|
977
|
+
const phaseResult = {
|
|
978
|
+
phase: phase.name,
|
|
979
|
+
teams: phase.teams,
|
|
980
|
+
deliverables: phase.deliverables,
|
|
981
|
+
results: phaseResults.filter(r => r !== null),
|
|
982
|
+
completed: new Date()
|
|
983
|
+
};
|
|
984
|
+
|
|
985
|
+
results.push(phaseResult);
|
|
986
|
+
console.log(`Completed phase: ${phase.name}`);
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
return results;
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
private async executeTeamWork(team: AgentTeam, phase: any) {
|
|
993
|
+
// Distribute work within team
|
|
994
|
+
const taskDistributor = new TaskDistributor(team);
|
|
995
|
+
|
|
996
|
+
const tasks = await taskDistributor.distributePhaseWork(phase);
|
|
997
|
+
|
|
998
|
+
// Execute tasks in parallel
|
|
999
|
+
const taskResults = await Promise.all(
|
|
1000
|
+
tasks.map(task => this.executeTask(task))
|
|
1001
|
+
);
|
|
1002
|
+
|
|
1003
|
+
// Coordinate team results
|
|
1004
|
+
const teamResult = await team.coordinator.aggregateResults(taskResults);
|
|
1005
|
+
|
|
1006
|
+
return teamResult;
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
private async executeTask(task: any) {
|
|
1010
|
+
console.log(`Executing task: ${task.name} (Agent: ${task.agentId})`);
|
|
1011
|
+
|
|
1012
|
+
// Simulate task execution with actual agent
|
|
1013
|
+
const agent = this.getAgent(task.agentId);
|
|
1014
|
+
const result = await agent.execute(task);
|
|
1015
|
+
|
|
1016
|
+
return {
|
|
1017
|
+
taskId: task.id,
|
|
1018
|
+
agentId: task.agentId,
|
|
1019
|
+
result,
|
|
1020
|
+
duration: task.duration,
|
|
1021
|
+
completed: new Date()
|
|
1022
|
+
};
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
private async spawnTeamCoordinator(teamType: string) {
|
|
1026
|
+
return await AgentFactory.spawnAgent(
|
|
1027
|
+
'coordinator',
|
|
1028
|
+
`Coordinate ${teamType} team activities`,
|
|
1029
|
+
{
|
|
1030
|
+
teamType,
|
|
1031
|
+
capabilities: ['coordination', 'planning', 'reporting'],
|
|
1032
|
+
authority: 'team-lead'
|
|
1033
|
+
}
|
|
1034
|
+
);
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
private async spawnSpecialist(specialistType: string) {
|
|
1038
|
+
return await AgentFactory.spawnAgent(
|
|
1039
|
+
specialistType,
|
|
1040
|
+
`Specialist work for ${specialistType}`,
|
|
1041
|
+
{
|
|
1042
|
+
expertiseLevel: 'senior',
|
|
1043
|
+
autonomy: 'high',
|
|
1044
|
+
collaboration: 'team-player'
|
|
1045
|
+
}
|
|
1046
|
+
);
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
```
|
|
1050
|
+
|
|
1051
|
+
## Hooks & Coordination Examples
|
|
1052
|
+
|
|
1053
|
+
### Custom Hook Development
|
|
1054
|
+
|
|
1055
|
+
```typescript
|
|
1056
|
+
// custom-hooks.ts - Creating and registering custom hooks
|
|
1057
|
+
import {
|
|
1058
|
+
agenticHookManager,
|
|
1059
|
+
HookRegistration,
|
|
1060
|
+
HookHandler,
|
|
1061
|
+
AgenticHookContext
|
|
1062
|
+
} from 'claude-flow-novice/hooks';
|
|
1063
|
+
|
|
1064
|
+
class CustomHookExamples {
|
|
1065
|
+
async registerQualityAssuranceHooks() {
|
|
1066
|
+
// Code quality enforcement hook
|
|
1067
|
+
const codeQualityHook: HookRegistration = {
|
|
1068
|
+
id: 'code-quality-enforcer',
|
|
1069
|
+
name: 'Code Quality Enforcer',
|
|
1070
|
+
description: 'Automatically enforces code quality standards',
|
|
1071
|
+
type: 'workflow-step',
|
|
1072
|
+
priority: 95,
|
|
1073
|
+
enabled: true,
|
|
1074
|
+
handler: this.createCodeQualityHandler(),
|
|
1075
|
+
filter: {
|
|
1076
|
+
stepTypes: ['code-generation', 'code-review'],
|
|
1077
|
+
fileTypes: ['.ts', '.js', '.py', '.java']
|
|
1078
|
+
},
|
|
1079
|
+
timeout: 30000,
|
|
1080
|
+
retries: 2
|
|
1081
|
+
};
|
|
1082
|
+
|
|
1083
|
+
await agenticHookManager.register(codeQualityHook);
|
|
1084
|
+
|
|
1085
|
+
// Automated testing hook
|
|
1086
|
+
const autoTestHook: HookRegistration = {
|
|
1087
|
+
id: 'auto-test-generator',
|
|
1088
|
+
name: 'Automatic Test Generator',
|
|
1089
|
+
description: 'Generates tests automatically when code is created',
|
|
1090
|
+
type: 'workflow-step',
|
|
1091
|
+
priority: 80,
|
|
1092
|
+
enabled: true,
|
|
1093
|
+
handler: this.createAutoTestHandler(),
|
|
1094
|
+
dependencies: ['code-quality-enforcer']
|
|
1095
|
+
};
|
|
1096
|
+
|
|
1097
|
+
await agenticHookManager.register(autoTestHook);
|
|
1098
|
+
|
|
1099
|
+
// Performance monitoring hook
|
|
1100
|
+
const perfMonitorHook: HookRegistration = {
|
|
1101
|
+
id: 'performance-monitor',
|
|
1102
|
+
name: 'Performance Monitor',
|
|
1103
|
+
description: 'Monitors performance impact of changes',
|
|
1104
|
+
type: 'performance-metric',
|
|
1105
|
+
priority: 70,
|
|
1106
|
+
enabled: true,
|
|
1107
|
+
handler: this.createPerformanceMonitorHandler()
|
|
1108
|
+
};
|
|
1109
|
+
|
|
1110
|
+
await agenticHookManager.register(perfMonitorHook);
|
|
1111
|
+
|
|
1112
|
+
console.log('Quality assurance hooks registered');
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
private createCodeQualityHandler(): HookHandler {
|
|
1116
|
+
return async (context: AgenticHookContext) => {
|
|
1117
|
+
const { payload } = context;
|
|
1118
|
+
|
|
1119
|
+
if (!payload.code && !payload.files) {
|
|
1120
|
+
return { success: true }; // Nothing to check
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
const results = {
|
|
1124
|
+
linting: await this.runLinter(payload),
|
|
1125
|
+
formatting: await this.checkFormatting(payload),
|
|
1126
|
+
complexity: await this.analyzeComplexity(payload),
|
|
1127
|
+
security: await this.securityScan(payload)
|
|
1128
|
+
};
|
|
1129
|
+
|
|
1130
|
+
const issues = this.aggregateIssues(results);
|
|
1131
|
+
|
|
1132
|
+
if (issues.critical.length > 0) {
|
|
1133
|
+
return {
|
|
1134
|
+
success: false,
|
|
1135
|
+
error: `Critical code quality issues found: ${issues.critical.join(', ')}`,
|
|
1136
|
+
data: { issues, results },
|
|
1137
|
+
shouldBlock: true,
|
|
1138
|
+
suggestions: this.generateFixSuggestions(issues)
|
|
1139
|
+
};
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
if (issues.warnings.length > 0) {
|
|
1143
|
+
console.warn('Code quality warnings:', issues.warnings);
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
return {
|
|
1147
|
+
success: true,
|
|
1148
|
+
data: {
|
|
1149
|
+
qualityScore: this.calculateQualityScore(results),
|
|
1150
|
+
issues,
|
|
1151
|
+
improvements: this.suggestImprovements(results)
|
|
1152
|
+
}
|
|
1153
|
+
};
|
|
1154
|
+
};
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
private createAutoTestHandler(): HookHandler {
|
|
1158
|
+
return async (context: AgenticHookContext) => {
|
|
1159
|
+
const { payload } = context;
|
|
1160
|
+
|
|
1161
|
+
if (!payload.code || payload.skipTests) {
|
|
1162
|
+
return { success: true };
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
try {
|
|
1166
|
+
// Analyze code to understand what needs testing
|
|
1167
|
+
const codeAnalysis = await this.analyzeCodeForTesting(payload.code);
|
|
1168
|
+
|
|
1169
|
+
// Generate appropriate tests
|
|
1170
|
+
const generatedTests = await this.generateTests(codeAnalysis);
|
|
1171
|
+
|
|
1172
|
+
// Validate generated tests
|
|
1173
|
+
const testValidation = await this.validateGeneratedTests(generatedTests);
|
|
1174
|
+
|
|
1175
|
+
if (!testValidation.valid) {
|
|
1176
|
+
return {
|
|
1177
|
+
success: false,
|
|
1178
|
+
error: 'Generated tests validation failed',
|
|
1179
|
+
data: { validation: testValidation }
|
|
1180
|
+
};
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
// Run tests to ensure they pass
|
|
1184
|
+
const testResults = await this.runGeneratedTests(generatedTests);
|
|
1185
|
+
|
|
1186
|
+
return {
|
|
1187
|
+
success: testResults.allPassed,
|
|
1188
|
+
data: {
|
|
1189
|
+
testsGenerated: generatedTests.length,
|
|
1190
|
+
testResults,
|
|
1191
|
+
coverage: testResults.coverage
|
|
1192
|
+
},
|
|
1193
|
+
nextHooks: testResults.allPassed ? ['test-report-generator'] : ['test-failure-handler']
|
|
1194
|
+
};
|
|
1195
|
+
|
|
1196
|
+
} catch (error) {
|
|
1197
|
+
return {
|
|
1198
|
+
success: false,
|
|
1199
|
+
error: `Test generation failed: ${error.message}`,
|
|
1200
|
+
shouldRetry: true
|
|
1201
|
+
};
|
|
1202
|
+
}
|
|
1203
|
+
};
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
private createPerformanceMonitorHandler(): HookHandler {
|
|
1207
|
+
return async (context: AgenticHookContext) => {
|
|
1208
|
+
const { payload } = context;
|
|
1209
|
+
|
|
1210
|
+
const startTime = performance.now();
|
|
1211
|
+
|
|
1212
|
+
// Monitor different types of performance metrics
|
|
1213
|
+
const metrics = await this.collectPerformanceMetrics(payload);
|
|
1214
|
+
|
|
1215
|
+
const endTime = performance.now();
|
|
1216
|
+
const hookExecutionTime = endTime - startTime;
|
|
1217
|
+
|
|
1218
|
+
// Analyze performance trends
|
|
1219
|
+
const trends = await this.analyzePerformanceTrends(metrics);
|
|
1220
|
+
|
|
1221
|
+
// Check for performance regressions
|
|
1222
|
+
const regressions = await this.detectPerformanceRegressions(metrics);
|
|
1223
|
+
|
|
1224
|
+
if (regressions.length > 0) {
|
|
1225
|
+
console.warn('Performance regressions detected:', regressions);
|
|
1226
|
+
|
|
1227
|
+
// Trigger performance optimization
|
|
1228
|
+
await this.triggerPerformanceOptimization(regressions);
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
return {
|
|
1232
|
+
success: true,
|
|
1233
|
+
data: {
|
|
1234
|
+
metrics,
|
|
1235
|
+
trends,
|
|
1236
|
+
regressions,
|
|
1237
|
+
hookExecutionTime
|
|
1238
|
+
},
|
|
1239
|
+
metadata: {
|
|
1240
|
+
monitoringTimestamp: new Date(),
|
|
1241
|
+
metricsCollected: Object.keys(metrics).length
|
|
1242
|
+
}
|
|
1243
|
+
};
|
|
1244
|
+
};
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
// Helper methods for hook implementations
|
|
1248
|
+
private async runLinter(payload: any) {
|
|
1249
|
+
// Simulate linting process
|
|
1250
|
+
return {
|
|
1251
|
+
errors: [],
|
|
1252
|
+
warnings: payload.code?.includes('console.log') ? ['Avoid console.log in production'] : [],
|
|
1253
|
+
suggestions: ['Consider using proper logging']
|
|
1254
|
+
};
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
private async checkFormatting(payload: any) {
|
|
1258
|
+
// Simulate formatting check
|
|
1259
|
+
return {
|
|
1260
|
+
formatted: true,
|
|
1261
|
+
issues: []
|
|
1262
|
+
};
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
private async analyzeComplexity(payload: any) {
|
|
1266
|
+
// Simulate complexity analysis
|
|
1267
|
+
const complexity = payload.code ? payload.code.split('\n').length * 0.1 : 0;
|
|
1268
|
+
return {
|
|
1269
|
+
score: complexity,
|
|
1270
|
+
acceptable: complexity < 10,
|
|
1271
|
+
recommendations: complexity > 10 ? ['Consider breaking into smaller functions'] : []
|
|
1272
|
+
};
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
private async securityScan(payload: any) {
|
|
1276
|
+
// Simulate security scanning
|
|
1277
|
+
return {
|
|
1278
|
+
vulnerabilities: [],
|
|
1279
|
+
securityScore: 95,
|
|
1280
|
+
recommendations: []
|
|
1281
|
+
};
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
private aggregateIssues(results: any) {
|
|
1285
|
+
const critical = [];
|
|
1286
|
+
const warnings = [];
|
|
1287
|
+
|
|
1288
|
+
if (results.linting.errors.length > 0) {
|
|
1289
|
+
critical.push(...results.linting.errors);
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
if (results.security.vulnerabilities.length > 0) {
|
|
1293
|
+
critical.push(...results.security.vulnerabilities);
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
if (results.complexity.score > 15) {
|
|
1297
|
+
critical.push('Code complexity too high');
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
warnings.push(...results.linting.warnings);
|
|
1301
|
+
warnings.push(...results.complexity.recommendations);
|
|
1302
|
+
|
|
1303
|
+
return { critical, warnings };
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1306
|
+
private calculateQualityScore(results: any): number {
|
|
1307
|
+
let score = 100;
|
|
1308
|
+
|
|
1309
|
+
score -= results.linting.errors.length * 20;
|
|
1310
|
+
score -= results.linting.warnings.length * 5;
|
|
1311
|
+
score -= results.security.vulnerabilities.length * 30;
|
|
1312
|
+
score -= Math.max(0, results.complexity.score - 10) * 2;
|
|
1313
|
+
|
|
1314
|
+
return Math.max(0, score);
|
|
1315
|
+
}
|
|
1316
|
+
}
|
|
1317
|
+
```
|
|
1318
|
+
|
|
1319
|
+
### Event-Driven Coordination
|
|
1320
|
+
|
|
1321
|
+
```typescript
|
|
1322
|
+
// event-coordination.ts - Event-driven agent coordination
|
|
1323
|
+
import {
|
|
1324
|
+
EventSystem,
|
|
1325
|
+
SystemEvent,
|
|
1326
|
+
EventHandler,
|
|
1327
|
+
EventFilter
|
|
1328
|
+
} from 'claude-flow-novice/events';
|
|
1329
|
+
|
|
1330
|
+
class EventDrivenCoordination {
|
|
1331
|
+
private eventSystem: EventSystem;
|
|
1332
|
+
private coordinationRules: Map<string, CoordinationRule> = new Map();
|
|
1333
|
+
|
|
1334
|
+
constructor() {
|
|
1335
|
+
this.eventSystem = new EventSystem();
|
|
1336
|
+
this.setupCoordinationRules();
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1339
|
+
private setupCoordinationRules() {
|
|
1340
|
+
// Rule: When backend API is completed, start frontend integration
|
|
1341
|
+
this.coordinationRules.set('api-to-frontend', {
|
|
1342
|
+
trigger: 'agent.task.completed',
|
|
1343
|
+
condition: (event) => event.payload.taskType === 'api-development',
|
|
1344
|
+
action: async (event) => {
|
|
1345
|
+
await this.spawnFrontendIntegrationAgent(event.payload.apiSpec);
|
|
1346
|
+
}
|
|
1347
|
+
});
|
|
1348
|
+
|
|
1349
|
+
// Rule: When tests fail, spawn debugging agent
|
|
1350
|
+
this.coordinationRules.set('test-failure-debug', {
|
|
1351
|
+
trigger: 'test.failed',
|
|
1352
|
+
condition: (event) => event.payload.severity === 'critical',
|
|
1353
|
+
action: async (event) => {
|
|
1354
|
+
await this.spawnDebuggingAgent(event.payload.failures);
|
|
1355
|
+
}
|
|
1356
|
+
});
|
|
1357
|
+
|
|
1358
|
+
// Rule: When performance degrades, trigger optimization
|
|
1359
|
+
this.coordinationRules.set('performance-optimization', {
|
|
1360
|
+
trigger: 'performance.degradation',
|
|
1361
|
+
condition: (event) => event.payload.degradation > 0.2,
|
|
1362
|
+
action: async (event) => {
|
|
1363
|
+
await this.triggerPerformanceOptimization(event.payload.metrics);
|
|
1364
|
+
}
|
|
1365
|
+
});
|
|
1366
|
+
|
|
1367
|
+
// Register event handlers
|
|
1368
|
+
this.registerEventHandlers();
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
private registerEventHandlers() {
|
|
1372
|
+
for (const [ruleId, rule] of this.coordinationRules) {
|
|
1373
|
+
this.eventSystem.subscribe(rule.trigger, async (event) => {
|
|
1374
|
+
if (rule.condition(event)) {
|
|
1375
|
+
console.log(`Coordination rule triggered: ${ruleId}`);
|
|
1376
|
+
await rule.action(event);
|
|
1377
|
+
}
|
|
1378
|
+
});
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
async demonstrateEventCoordination() {
|
|
1383
|
+
// Simulate various system events
|
|
1384
|
+
await this.simulateBackendCompletion();
|
|
1385
|
+
await this.simulateTestFailure();
|
|
1386
|
+
await this.simulatePerformanceDegradation();
|
|
1387
|
+
|
|
1388
|
+
// Show event-driven workflow
|
|
1389
|
+
await this.complexEventWorkflow();
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
private async simulateBackendCompletion() {
|
|
1393
|
+
const event: SystemEvent = {
|
|
1394
|
+
id: 'evt-001',
|
|
1395
|
+
type: 'agent.task.completed',
|
|
1396
|
+
source: 'backend-agent-001',
|
|
1397
|
+
timestamp: new Date(),
|
|
1398
|
+
payload: {
|
|
1399
|
+
taskType: 'api-development',
|
|
1400
|
+
agentId: 'backend-agent-001',
|
|
1401
|
+
taskId: 'task-001',
|
|
1402
|
+
apiSpec: {
|
|
1403
|
+
endpoints: ['/api/users', '/api/auth', '/api/data'],
|
|
1404
|
+
authentication: 'JWT',
|
|
1405
|
+
documentation: 'openapi-spec.json'
|
|
1406
|
+
}
|
|
1407
|
+
}
|
|
1408
|
+
};
|
|
1409
|
+
|
|
1410
|
+
await this.eventSystem.publish(event);
|
|
1411
|
+
console.log('Backend completion event published');
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
private async simulateTestFailure() {
|
|
1415
|
+
const event: SystemEvent = {
|
|
1416
|
+
id: 'evt-002',
|
|
1417
|
+
type: 'test.failed',
|
|
1418
|
+
source: 'test-runner',
|
|
1419
|
+
timestamp: new Date(),
|
|
1420
|
+
payload: {
|
|
1421
|
+
severity: 'critical',
|
|
1422
|
+
failures: [
|
|
1423
|
+
{
|
|
1424
|
+
test: 'user-authentication',
|
|
1425
|
+
error: 'JWT token validation failed',
|
|
1426
|
+
stack: 'AuthError: Invalid token signature...'
|
|
1427
|
+
},
|
|
1428
|
+
{
|
|
1429
|
+
test: 'data-retrieval',
|
|
1430
|
+
error: 'Database connection timeout',
|
|
1431
|
+
stack: 'DatabaseError: Connection timeout after 30s...'
|
|
1432
|
+
}
|
|
1433
|
+
]
|
|
1434
|
+
}
|
|
1435
|
+
};
|
|
1436
|
+
|
|
1437
|
+
await this.eventSystem.publish(event);
|
|
1438
|
+
console.log('Test failure event published');
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
private async simulatePerformanceDegradation() {
|
|
1442
|
+
const event: SystemEvent = {
|
|
1443
|
+
id: 'evt-003',
|
|
1444
|
+
type: 'performance.degradation',
|
|
1445
|
+
source: 'performance-monitor',
|
|
1446
|
+
timestamp: new Date(),
|
|
1447
|
+
payload: {
|
|
1448
|
+
degradation: 0.35, // 35% performance drop
|
|
1449
|
+
metrics: {
|
|
1450
|
+
responseTime: { before: 200, after: 500 },
|
|
1451
|
+
throughput: { before: 1000, after: 650 },
|
|
1452
|
+
errorRate: { before: 0.01, after: 0.05 }
|
|
1453
|
+
},
|
|
1454
|
+
affectedComponents: ['api-gateway', 'database']
|
|
1455
|
+
}
|
|
1456
|
+
};
|
|
1457
|
+
|
|
1458
|
+
await this.eventSystem.publish(event);
|
|
1459
|
+
console.log('Performance degradation event published');
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
private async complexEventWorkflow() {
|
|
1463
|
+
console.log('Starting complex event-driven workflow...');
|
|
1464
|
+
|
|
1465
|
+
// Chain of events that trigger each other
|
|
1466
|
+
const events = [
|
|
1467
|
+
{
|
|
1468
|
+
type: 'project.started',
|
|
1469
|
+
payload: { projectId: 'proj-001', requirements: 'e-commerce platform' }
|
|
1470
|
+
},
|
|
1471
|
+
{
|
|
1472
|
+
type: 'requirements.analyzed',
|
|
1473
|
+
payload: { components: ['user-auth', 'product-catalog', 'payment'] }
|
|
1474
|
+
},
|
|
1475
|
+
{
|
|
1476
|
+
type: 'architecture.designed',
|
|
1477
|
+
payload: { architecture: 'microservices', services: 5 }
|
|
1478
|
+
},
|
|
1479
|
+
{
|
|
1480
|
+
type: 'development.started',
|
|
1481
|
+
payload: { teams: ['backend', 'frontend', 'mobile'] }
|
|
1482
|
+
}
|
|
1483
|
+
];
|
|
1484
|
+
|
|
1485
|
+
// Set up cascade handlers
|
|
1486
|
+
this.eventSystem.subscribe('project.started', async (event) => {
|
|
1487
|
+
console.log('Project started, triggering requirements analysis...');
|
|
1488
|
+
|
|
1489
|
+
// Spawn requirements analyst
|
|
1490
|
+
await this.spawnAgent('analyst', 'Analyze project requirements');
|
|
1491
|
+
|
|
1492
|
+
// Trigger next event after some processing
|
|
1493
|
+
setTimeout(() => {
|
|
1494
|
+
this.eventSystem.publish({
|
|
1495
|
+
id: 'evt-cascade-001',
|
|
1496
|
+
type: 'requirements.analyzed',
|
|
1497
|
+
source: 'analyst-agent',
|
|
1498
|
+
timestamp: new Date(),
|
|
1499
|
+
payload: events[1].payload
|
|
1500
|
+
});
|
|
1501
|
+
}, 1000);
|
|
1502
|
+
});
|
|
1503
|
+
|
|
1504
|
+
this.eventSystem.subscribe('requirements.analyzed', async (event) => {
|
|
1505
|
+
console.log('Requirements analyzed, starting architecture design...');
|
|
1506
|
+
|
|
1507
|
+
await this.spawnAgent('architect', 'Design system architecture');
|
|
1508
|
+
|
|
1509
|
+
setTimeout(() => {
|
|
1510
|
+
this.eventSystem.publish({
|
|
1511
|
+
id: 'evt-cascade-002',
|
|
1512
|
+
type: 'architecture.designed',
|
|
1513
|
+
source: 'architect-agent',
|
|
1514
|
+
timestamp: new Date(),
|
|
1515
|
+
payload: events[2].payload
|
|
1516
|
+
});
|
|
1517
|
+
}, 1500);
|
|
1518
|
+
});
|
|
1519
|
+
|
|
1520
|
+
this.eventSystem.subscribe('architecture.designed', async (event) => {
|
|
1521
|
+
console.log('Architecture designed, starting development...');
|
|
1522
|
+
|
|
1523
|
+
await this.spawnMultipleAgents(['backend-dev', 'frontend-dev', 'mobile-dev']);
|
|
1524
|
+
|
|
1525
|
+
setTimeout(() => {
|
|
1526
|
+
this.eventSystem.publish({
|
|
1527
|
+
id: 'evt-cascade-003',
|
|
1528
|
+
type: 'development.started',
|
|
1529
|
+
source: 'coordination-system',
|
|
1530
|
+
timestamp: new Date(),
|
|
1531
|
+
payload: events[3].payload
|
|
1532
|
+
});
|
|
1533
|
+
}, 2000);
|
|
1534
|
+
});
|
|
1535
|
+
|
|
1536
|
+
// Start the cascade
|
|
1537
|
+
await this.eventSystem.publish({
|
|
1538
|
+
id: 'evt-start',
|
|
1539
|
+
type: 'project.started',
|
|
1540
|
+
source: 'user',
|
|
1541
|
+
timestamp: new Date(),
|
|
1542
|
+
payload: events[0].payload
|
|
1543
|
+
});
|
|
1544
|
+
|
|
1545
|
+
console.log('Complex workflow initiated');
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1548
|
+
// Helper methods for coordination actions
|
|
1549
|
+
private async spawnFrontendIntegrationAgent(apiSpec: any) {
|
|
1550
|
+
console.log('Spawning frontend integration agent with API spec:', apiSpec);
|
|
1551
|
+
// Implementation would spawn actual agent
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
private async spawnDebuggingAgent(failures: any[]) {
|
|
1555
|
+
console.log('Spawning debugging agent for failures:', failures);
|
|
1556
|
+
// Implementation would spawn debugging agent
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
private async triggerPerformanceOptimization(metrics: any) {
|
|
1560
|
+
console.log('Triggering performance optimization for metrics:', metrics);
|
|
1561
|
+
// Implementation would start optimization process
|
|
1562
|
+
}
|
|
1563
|
+
|
|
1564
|
+
private async spawnAgent(type: string, task: string) {
|
|
1565
|
+
console.log(`Spawning ${type} agent for: ${task}`);
|
|
1566
|
+
// Implementation would spawn actual agent
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
|
+
private async spawnMultipleAgents(types: string[]) {
|
|
1570
|
+
console.log('Spawning multiple agents:', types);
|
|
1571
|
+
// Implementation would spawn multiple agents
|
|
1572
|
+
}
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
interface CoordinationRule {
|
|
1576
|
+
trigger: string;
|
|
1577
|
+
condition: (event: SystemEvent) => boolean;
|
|
1578
|
+
action: (event: SystemEvent) => Promise<void>;
|
|
1579
|
+
}
|
|
1580
|
+
```
|
|
1581
|
+
|
|
1582
|
+
## Configuration Examples
|
|
1583
|
+
|
|
1584
|
+
### Intelligent Configuration Setup
|
|
1585
|
+
|
|
1586
|
+
```typescript
|
|
1587
|
+
// intelligent-config.ts - Smart configuration management
|
|
1588
|
+
import {
|
|
1589
|
+
IntelligentConfigurationManager,
|
|
1590
|
+
IntelligentDefaults,
|
|
1591
|
+
TierManager,
|
|
1592
|
+
ProgressiveDisclosureEngine
|
|
1593
|
+
} from 'claude-flow-novice/config';
|
|
1594
|
+
|
|
1595
|
+
class IntelligentConfigExample {
|
|
1596
|
+
private configManager: IntelligentConfigurationManager;
|
|
1597
|
+
private intelligentDefaults: IntelligentDefaults;
|
|
1598
|
+
private tierManager: TierManager;
|
|
1599
|
+
|
|
1600
|
+
async setupIntelligentConfiguration() {
|
|
1601
|
+
// Initialize with smart defaults
|
|
1602
|
+
this.configManager = new IntelligentConfigurationManager({
|
|
1603
|
+
namespace: 'smart-project',
|
|
1604
|
+
enableIntelligentDefaults: true,
|
|
1605
|
+
enableProgressiveDisclosure: true,
|
|
1606
|
+
enableLearning: true,
|
|
1607
|
+
adaptationRate: 0.15
|
|
1608
|
+
});
|
|
1609
|
+
|
|
1610
|
+
await this.configManager.initialize();
|
|
1611
|
+
|
|
1612
|
+
this.intelligentDefaults = new IntelligentDefaults({
|
|
1613
|
+
enableLearning: true,
|
|
1614
|
+
confidenceThreshold: 0.8
|
|
1615
|
+
});
|
|
1616
|
+
|
|
1617
|
+
this.tierManager = new TierManager(this.configManager);
|
|
1618
|
+
|
|
1619
|
+
// Demonstrate intelligent configuration
|
|
1620
|
+
await this.demonstrateIntelligentSetup();
|
|
1621
|
+
await this.demonstrateAdaptiveConfiguration();
|
|
1622
|
+
await this.demonstrateProjectSpecificDefaults();
|
|
1623
|
+
|
|
1624
|
+
return this.configManager;
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
private async demonstrateIntelligentSetup() {
|
|
1628
|
+
console.log('Demonstrating intelligent configuration setup...');
|
|
1629
|
+
|
|
1630
|
+
// Auto-detect user expertise and project type
|
|
1631
|
+
const userTier = await this.intelligentDefaults.detectUserTier();
|
|
1632
|
+
const projectType = await this.intelligentDefaults.detectProjectType('./');
|
|
1633
|
+
|
|
1634
|
+
console.log(`Detected user tier: ${userTier}`);
|
|
1635
|
+
console.log(`Detected project type: ${projectType}`);
|
|
1636
|
+
|
|
1637
|
+
// Set appropriate tier
|
|
1638
|
+
await this.tierManager.setTier(userTier);
|
|
1639
|
+
|
|
1640
|
+
// Generate context-aware suggestions
|
|
1641
|
+
const suggestions = await this.intelligentDefaults.suggestConfiguration({
|
|
1642
|
+
userTier,
|
|
1643
|
+
projectType,
|
|
1644
|
+
requirements: ['scalability', 'performance', 'security']
|
|
1645
|
+
});
|
|
1646
|
+
|
|
1647
|
+
console.log('Configuration suggestions:', suggestions);
|
|
1648
|
+
|
|
1649
|
+
// Apply high-confidence suggestions automatically
|
|
1650
|
+
for (const suggestion of suggestions) {
|
|
1651
|
+
if (suggestion.confidence > 0.9) {
|
|
1652
|
+
await this.configManager.set(suggestion.path, suggestion.value);
|
|
1653
|
+
console.log(`Applied suggestion: ${suggestion.path} = ${suggestion.value}`);
|
|
1654
|
+
}
|
|
1655
|
+
}
|
|
1656
|
+
}
|
|
1657
|
+
|
|
1658
|
+
private async demonstrateAdaptiveConfiguration() {
|
|
1659
|
+
console.log('Demonstrating adaptive configuration...');
|
|
1660
|
+
|
|
1661
|
+
// Simulate usage patterns and learning
|
|
1662
|
+
const usagePatterns = [
|
|
1663
|
+
{
|
|
1664
|
+
action: 'agent-spawn',
|
|
1665
|
+
type: 'backend-dev',
|
|
1666
|
+
frequency: 0.8,
|
|
1667
|
+
success: 0.95,
|
|
1668
|
+
context: { language: 'typescript', framework: 'express' }
|
|
1669
|
+
},
|
|
1670
|
+
{
|
|
1671
|
+
action: 'workflow-execution',
|
|
1672
|
+
type: 'tdd',
|
|
1673
|
+
frequency: 0.6,
|
|
1674
|
+
success: 0.85,
|
|
1675
|
+
context: { coverage: 90, testFramework: 'jest' }
|
|
1676
|
+
},
|
|
1677
|
+
{
|
|
1678
|
+
action: 'performance-optimization',
|
|
1679
|
+
type: 'memory',
|
|
1680
|
+
frequency: 0.3,
|
|
1681
|
+
success: 0.75,
|
|
1682
|
+
context: { threshold: 80, strategy: 'garbage-collection' }
|
|
1683
|
+
}
|
|
1684
|
+
];
|
|
1685
|
+
|
|
1686
|
+
// Learn from usage patterns
|
|
1687
|
+
for (const pattern of usagePatterns) {
|
|
1688
|
+
await this.intelligentDefaults.learnFromUsage(pattern);
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1691
|
+
// Update defaults based on learning
|
|
1692
|
+
const optimizedConfig = await this.intelligentDefaults.optimizeConfiguration(
|
|
1693
|
+
await this.configManager.export('json')
|
|
1694
|
+
);
|
|
1695
|
+
|
|
1696
|
+
if (optimizedConfig.improvements.length > 0) {
|
|
1697
|
+
console.log('Applying learned optimizations:', optimizedConfig.improvements);
|
|
1698
|
+
|
|
1699
|
+
for (const improvement of optimizedConfig.improvements) {
|
|
1700
|
+
if (improvement.confidence > 0.8) {
|
|
1701
|
+
await this.configManager.set(improvement.path, improvement.value);
|
|
1702
|
+
}
|
|
1703
|
+
}
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1706
|
+
|
|
1707
|
+
private async demonstrateProjectSpecificDefaults() {
|
|
1708
|
+
console.log('Demonstrating project-specific defaults...');
|
|
1709
|
+
|
|
1710
|
+
// Different project configurations
|
|
1711
|
+
const projectConfigs = {
|
|
1712
|
+
'e-commerce': {
|
|
1713
|
+
agents: {
|
|
1714
|
+
recommended: ['backend-dev', 'frontend-dev', 'security-manager', 'tester'],
|
|
1715
|
+
maxConcurrent: 6
|
|
1716
|
+
},
|
|
1717
|
+
swarm: {
|
|
1718
|
+
topology: 'hierarchical',
|
|
1719
|
+
coordination: 'centralized'
|
|
1720
|
+
},
|
|
1721
|
+
performance: {
|
|
1722
|
+
optimization: true,
|
|
1723
|
+
caching: true,
|
|
1724
|
+
cdn: true
|
|
1725
|
+
},
|
|
1726
|
+
security: {
|
|
1727
|
+
authentication: 'jwt',
|
|
1728
|
+
encryption: 'aes-256',
|
|
1729
|
+
validation: 'strict'
|
|
1730
|
+
}
|
|
1731
|
+
},
|
|
1732
|
+
|
|
1733
|
+
'ml-pipeline': {
|
|
1734
|
+
agents: {
|
|
1735
|
+
recommended: ['ml-developer', 'data-scientist', 'performance-optimizer'],
|
|
1736
|
+
maxConcurrent: 4,
|
|
1737
|
+
gpu: true
|
|
1738
|
+
},
|
|
1739
|
+
swarm: {
|
|
1740
|
+
topology: 'mesh',
|
|
1741
|
+
coordination: 'distributed'
|
|
1742
|
+
},
|
|
1743
|
+
performance: {
|
|
1744
|
+
optimization: true,
|
|
1745
|
+
parallelization: true,
|
|
1746
|
+
memory: 'large'
|
|
1747
|
+
},
|
|
1748
|
+
neural: {
|
|
1749
|
+
enabled: true,
|
|
1750
|
+
learningRate: 0.01,
|
|
1751
|
+
patterns: ['optimization', 'prediction']
|
|
1752
|
+
}
|
|
1753
|
+
},
|
|
1754
|
+
|
|
1755
|
+
'microservices': {
|
|
1756
|
+
agents: {
|
|
1757
|
+
recommended: ['architect', 'backend-dev', 'devops-engineer', 'monitoring-specialist'],
|
|
1758
|
+
maxConcurrent: 10
|
|
1759
|
+
},
|
|
1760
|
+
swarm: {
|
|
1761
|
+
topology: 'adaptive',
|
|
1762
|
+
coordination: 'distributed'
|
|
1763
|
+
},
|
|
1764
|
+
performance: {
|
|
1765
|
+
optimization: true,
|
|
1766
|
+
loadBalancing: true,
|
|
1767
|
+
scaling: 'auto'
|
|
1768
|
+
},
|
|
1769
|
+
deployment: {
|
|
1770
|
+
containerization: 'docker',
|
|
1771
|
+
orchestration: 'kubernetes',
|
|
1772
|
+
monitoring: 'prometheus'
|
|
1773
|
+
}
|
|
1774
|
+
}
|
|
1775
|
+
};
|
|
1776
|
+
|
|
1777
|
+
// Apply project-specific configuration
|
|
1778
|
+
const projectType = 'e-commerce'; // This would be auto-detected
|
|
1779
|
+
const projectConfig = projectConfigs[projectType];
|
|
1780
|
+
|
|
1781
|
+
await this.configManager.setMany({
|
|
1782
|
+
'project.type': projectType,
|
|
1783
|
+
'agents.recommended': projectConfig.agents.recommended,
|
|
1784
|
+
'agents.maxConcurrent': projectConfig.agents.maxConcurrent,
|
|
1785
|
+
'swarm.topology': projectConfig.swarm.topology,
|
|
1786
|
+
'performance.optimization': projectConfig.performance.optimization,
|
|
1787
|
+
'security.authentication': projectConfig.security.authentication
|
|
1788
|
+
});
|
|
1789
|
+
|
|
1790
|
+
console.log(`Applied ${projectType} project configuration`);
|
|
1791
|
+
|
|
1792
|
+
// Validate configuration
|
|
1793
|
+
const validation = await this.configManager.validate(projectConfig);
|
|
1794
|
+
if (!validation.valid) {
|
|
1795
|
+
console.warn('Configuration validation issues:', validation.errors);
|
|
1796
|
+
} else {
|
|
1797
|
+
console.log('Configuration validated successfully');
|
|
1798
|
+
}
|
|
1799
|
+
}
|
|
1800
|
+
|
|
1801
|
+
async demonstrateEnvironmentSpecificConfig() {
|
|
1802
|
+
console.log('Demonstrating environment-specific configuration...');
|
|
1803
|
+
|
|
1804
|
+
const environments = ['development', 'testing', 'staging', 'production'];
|
|
1805
|
+
|
|
1806
|
+
for (const env of environments) {
|
|
1807
|
+
const envConfig = await this.generateEnvironmentConfig(env);
|
|
1808
|
+
|
|
1809
|
+
// Create environment-specific configuration namespace
|
|
1810
|
+
const envManager = new IntelligentConfigurationManager({
|
|
1811
|
+
namespace: `project-${env}`,
|
|
1812
|
+
environment: env
|
|
1813
|
+
});
|
|
1814
|
+
|
|
1815
|
+
await envManager.initialize();
|
|
1816
|
+
await envManager.setMany(envConfig);
|
|
1817
|
+
|
|
1818
|
+
console.log(`${env} environment configured:`, Object.keys(envConfig));
|
|
1819
|
+
}
|
|
1820
|
+
}
|
|
1821
|
+
|
|
1822
|
+
private async generateEnvironmentConfig(environment: string) {
|
|
1823
|
+
const baseConfig = {
|
|
1824
|
+
general: {
|
|
1825
|
+
environment,
|
|
1826
|
+
debug: environment !== 'production',
|
|
1827
|
+
logLevel: environment === 'production' ? 'warn' : 'debug'
|
|
1828
|
+
},
|
|
1829
|
+
agents: {
|
|
1830
|
+
maxConcurrent: environment === 'production' ? 20 : 5,
|
|
1831
|
+
timeout: environment === 'production' ? 600000 : 300000
|
|
1832
|
+
},
|
|
1833
|
+
performance: {
|
|
1834
|
+
optimization: environment === 'production',
|
|
1835
|
+
caching: environment !== 'development',
|
|
1836
|
+
monitoring: environment === 'production' ? 'comprehensive' : 'basic'
|
|
1837
|
+
},
|
|
1838
|
+
security: {
|
|
1839
|
+
level: environment === 'production' ? 'high' : 'medium',
|
|
1840
|
+
encryption: environment === 'production',
|
|
1841
|
+
auditing: environment === 'production'
|
|
1842
|
+
}
|
|
1843
|
+
};
|
|
1844
|
+
|
|
1845
|
+
// Environment-specific overrides
|
|
1846
|
+
const overrides = {
|
|
1847
|
+
development: {
|
|
1848
|
+
agents: { autoSpawn: true },
|
|
1849
|
+
hooks: { enabled: true, debug: true },
|
|
1850
|
+
neural: { enabled: false }
|
|
1851
|
+
},
|
|
1852
|
+
testing: {
|
|
1853
|
+
agents: { isolation: true },
|
|
1854
|
+
testing: { coverage: 95, automation: true },
|
|
1855
|
+
performance: { benchmarking: true }
|
|
1856
|
+
},
|
|
1857
|
+
staging: {
|
|
1858
|
+
deployment: { blueGreen: true },
|
|
1859
|
+
monitoring: { realTime: true },
|
|
1860
|
+
testing: { loadTesting: true }
|
|
1861
|
+
},
|
|
1862
|
+
production: {
|
|
1863
|
+
scaling: { auto: true },
|
|
1864
|
+
backup: { automated: true, frequency: 'hourly' },
|
|
1865
|
+
alerting: { enabled: true, channels: ['email', 'slack'] }
|
|
1866
|
+
}
|
|
1867
|
+
};
|
|
1868
|
+
|
|
1869
|
+
return { ...baseConfig, ...overrides[environment] };
|
|
1870
|
+
}
|
|
1871
|
+
}
|
|
1872
|
+
```
|
|
1873
|
+
|
|
1874
|
+
## Production Use Cases
|
|
1875
|
+
|
|
1876
|
+
### Enterprise Deployment
|
|
1877
|
+
|
|
1878
|
+
```typescript
|
|
1879
|
+
// enterprise-deployment.ts - Production-ready enterprise setup
|
|
1880
|
+
import {
|
|
1881
|
+
EnterpriseClaudeFlow,
|
|
1882
|
+
SecurityManager,
|
|
1883
|
+
ScalabilityManager,
|
|
1884
|
+
MonitoringSystem
|
|
1885
|
+
} from 'claude-flow-novice/enterprise';
|
|
1886
|
+
|
|
1887
|
+
class EnterpriseDeploymentExample {
|
|
1888
|
+
private enterprise: EnterpriseClaudeFlow;
|
|
1889
|
+
private security: SecurityManager;
|
|
1890
|
+
private scalability: ScalabilityManager;
|
|
1891
|
+
private monitoring: MonitoringSystem;
|
|
1892
|
+
|
|
1893
|
+
async setupEnterpriseDeployment() {
|
|
1894
|
+
// Initialize enterprise-grade Claude Flow
|
|
1895
|
+
this.enterprise = new EnterpriseClaudeFlow({
|
|
1896
|
+
cluster: {
|
|
1897
|
+
nodes: 5,
|
|
1898
|
+
loadBalancing: true,
|
|
1899
|
+
failover: true
|
|
1900
|
+
},
|
|
1901
|
+
security: {
|
|
1902
|
+
authentication: 'enterprise-sso',
|
|
1903
|
+
authorization: 'rbac',
|
|
1904
|
+
encryption: 'end-to-end',
|
|
1905
|
+
auditing: 'comprehensive'
|
|
1906
|
+
},
|
|
1907
|
+
scalability: {
|
|
1908
|
+
autoScaling: true,
|
|
1909
|
+
maxNodes: 20,
|
|
1910
|
+
resourceQuotas: true
|
|
1911
|
+
},
|
|
1912
|
+
monitoring: {
|
|
1913
|
+
metrics: 'prometheus',
|
|
1914
|
+
logging: 'elk-stack',
|
|
1915
|
+
alerting: 'pagerduty',
|
|
1916
|
+
dashboards: 'grafana'
|
|
1917
|
+
}
|
|
1918
|
+
});
|
|
1919
|
+
|
|
1920
|
+
await this.enterprise.initialize();
|
|
1921
|
+
|
|
1922
|
+
// Setup security
|
|
1923
|
+
await this.setupEnterpriseSecurity();
|
|
1924
|
+
|
|
1925
|
+
// Setup scalability
|
|
1926
|
+
await this.setupEnterpriseScalability();
|
|
1927
|
+
|
|
1928
|
+
// Setup monitoring
|
|
1929
|
+
await this.setupEnterpriseMonitoring();
|
|
1930
|
+
|
|
1931
|
+
// Deploy enterprise workflows
|
|
1932
|
+
await this.deployEnterpriseWorkflows();
|
|
1933
|
+
|
|
1934
|
+
return this.enterprise;
|
|
1935
|
+
}
|
|
1936
|
+
|
|
1937
|
+
private async setupEnterpriseSecurity() {
|
|
1938
|
+
this.security = new SecurityManager({
|
|
1939
|
+
authentication: {
|
|
1940
|
+
provider: 'active-directory',
|
|
1941
|
+
mfa: true,
|
|
1942
|
+
sessionTimeout: 3600
|
|
1943
|
+
},
|
|
1944
|
+
authorization: {
|
|
1945
|
+
model: 'rbac',
|
|
1946
|
+
roles: [
|
|
1947
|
+
{
|
|
1948
|
+
name: 'admin',
|
|
1949
|
+
permissions: ['*'],
|
|
1950
|
+
resources: ['*']
|
|
1951
|
+
},
|
|
1952
|
+
{
|
|
1953
|
+
name: 'developer',
|
|
1954
|
+
permissions: ['agent:spawn', 'agent:monitor', 'workflow:execute'],
|
|
1955
|
+
resources: ['development/*', 'testing/*']
|
|
1956
|
+
},
|
|
1957
|
+
{
|
|
1958
|
+
name: 'operator',
|
|
1959
|
+
permissions: ['system:monitor', 'system:configure'],
|
|
1960
|
+
resources: ['production/*']
|
|
1961
|
+
}
|
|
1962
|
+
]
|
|
1963
|
+
},
|
|
1964
|
+
encryption: {
|
|
1965
|
+
algorithm: 'AES-256-GCM',
|
|
1966
|
+
keyRotation: true,
|
|
1967
|
+
rotationInterval: 86400000 // 24 hours
|
|
1968
|
+
},
|
|
1969
|
+
auditing: {
|
|
1970
|
+
enabled: true,
|
|
1971
|
+
retention: '2 years',
|
|
1972
|
+
compliance: ['SOX', 'HIPAA', 'GDPR']
|
|
1973
|
+
}
|
|
1974
|
+
});
|
|
1975
|
+
|
|
1976
|
+
await this.security.initialize();
|
|
1977
|
+
console.log('Enterprise security configured');
|
|
1978
|
+
}
|
|
1979
|
+
|
|
1980
|
+
private async setupEnterpriseScalability() {
|
|
1981
|
+
this.scalability = new ScalabilityManager({
|
|
1982
|
+
autoScaling: {
|
|
1983
|
+
enabled: true,
|
|
1984
|
+
metrics: ['cpu', 'memory', 'agent-queue-length'],
|
|
1985
|
+
thresholds: {
|
|
1986
|
+
scaleUp: 80,
|
|
1987
|
+
scaleDown: 30
|
|
1988
|
+
},
|
|
1989
|
+
cooldown: 300000 // 5 minutes
|
|
1990
|
+
},
|
|
1991
|
+
resourceManagement: {
|
|
1992
|
+
quotas: {
|
|
1993
|
+
'development': { agents: 50, memory: '10GB', cpu: '20 cores' },
|
|
1994
|
+
'testing': { agents: 100, memory: '20GB', cpu: '40 cores' },
|
|
1995
|
+
'production': { agents: 500, memory: '100GB', cpu: '200 cores' }
|
|
1996
|
+
},
|
|
1997
|
+
prioritization: true,
|
|
1998
|
+
preemption: true
|
|
1999
|
+
},
|
|
2000
|
+
loadBalancing: {
|
|
2001
|
+
algorithm: 'least-connections',
|
|
2002
|
+
healthChecks: true,
|
|
2003
|
+
sessionAffinity: false
|
|
2004
|
+
}
|
|
2005
|
+
});
|
|
2006
|
+
|
|
2007
|
+
await this.scalability.initialize();
|
|
2008
|
+
console.log('Enterprise scalability configured');
|
|
2009
|
+
}
|
|
2010
|
+
|
|
2011
|
+
private async setupEnterpriseMonitoring() {
|
|
2012
|
+
this.monitoring = new MonitoringSystem({
|
|
2013
|
+
metrics: {
|
|
2014
|
+
collection: {
|
|
2015
|
+
interval: 15000, // 15 seconds
|
|
2016
|
+
retention: '30 days',
|
|
2017
|
+
aggregation: ['sum', 'avg', 'p95', 'p99']
|
|
2018
|
+
},
|
|
2019
|
+
alerts: [
|
|
2020
|
+
{
|
|
2021
|
+
name: 'High Agent Failure Rate',
|
|
2022
|
+
condition: 'agent_failure_rate > 0.05',
|
|
2023
|
+
severity: 'critical',
|
|
2024
|
+
channels: ['pagerduty', 'slack']
|
|
2025
|
+
},
|
|
2026
|
+
{
|
|
2027
|
+
name: 'System Resource Exhaustion',
|
|
2028
|
+
condition: 'system_resource_usage > 0.9',
|
|
2029
|
+
severity: 'warning',
|
|
2030
|
+
channels: ['email', 'slack']
|
|
2031
|
+
},
|
|
2032
|
+
{
|
|
2033
|
+
name: 'Performance Degradation',
|
|
2034
|
+
condition: 'response_time_p95 > 5000',
|
|
2035
|
+
severity: 'warning',
|
|
2036
|
+
channels: ['slack']
|
|
2037
|
+
}
|
|
2038
|
+
]
|
|
2039
|
+
},
|
|
2040
|
+
logging: {
|
|
2041
|
+
level: 'info',
|
|
2042
|
+
format: 'json',
|
|
2043
|
+
centralized: true,
|
|
2044
|
+
retention: '90 days',
|
|
2045
|
+
indexing: true
|
|
2046
|
+
},
|
|
2047
|
+
dashboards: [
|
|
2048
|
+
{
|
|
2049
|
+
name: 'System Overview',
|
|
2050
|
+
panels: ['agent-status', 'system-resources', 'task-throughput']
|
|
2051
|
+
},
|
|
2052
|
+
{
|
|
2053
|
+
name: 'Performance Metrics',
|
|
2054
|
+
panels: ['response-times', 'error-rates', 'resource-utilization']
|
|
2055
|
+
},
|
|
2056
|
+
{
|
|
2057
|
+
name: 'Business Metrics',
|
|
2058
|
+
panels: ['workflow-completion', 'user-satisfaction', 'cost-analysis']
|
|
2059
|
+
}
|
|
2060
|
+
]
|
|
2061
|
+
});
|
|
2062
|
+
|
|
2063
|
+
await this.monitoring.initialize();
|
|
2064
|
+
console.log('Enterprise monitoring configured');
|
|
2065
|
+
}
|
|
2066
|
+
|
|
2067
|
+
private async deployEnterpriseWorkflows() {
|
|
2068
|
+
// Deploy standard enterprise workflows
|
|
2069
|
+
const workflows = [
|
|
2070
|
+
{
|
|
2071
|
+
name: 'Continuous Integration',
|
|
2072
|
+
type: 'ci-cd',
|
|
2073
|
+
stages: ['build', 'test', 'security-scan', 'deploy'],
|
|
2074
|
+
agents: ['backend-dev', 'tester', 'security-manager', 'devops-engineer']
|
|
2075
|
+
},
|
|
2076
|
+
{
|
|
2077
|
+
name: 'Code Review Process',
|
|
2078
|
+
type: 'quality-assurance',
|
|
2079
|
+
stages: ['automated-review', 'security-check', 'human-review'],
|
|
2080
|
+
agents: ['reviewer', 'security-manager']
|
|
2081
|
+
},
|
|
2082
|
+
{
|
|
2083
|
+
name: 'Incident Response',
|
|
2084
|
+
type: 'operational',
|
|
2085
|
+
stages: ['detection', 'analysis', 'resolution', 'post-mortem'],
|
|
2086
|
+
agents: ['monitor', 'analyst', 'resolver', 'documenter']
|
|
2087
|
+
},
|
|
2088
|
+
{
|
|
2089
|
+
name: 'Compliance Audit',
|
|
2090
|
+
type: 'compliance',
|
|
2091
|
+
stages: ['data-collection', 'analysis', 'reporting'],
|
|
2092
|
+
agents: ['auditor', 'analyst', 'reporter']
|
|
2093
|
+
}
|
|
2094
|
+
];
|
|
2095
|
+
|
|
2096
|
+
for (const workflow of workflows) {
|
|
2097
|
+
await this.enterprise.deployWorkflow(workflow);
|
|
2098
|
+
console.log(`Deployed enterprise workflow: ${workflow.name}`);
|
|
2099
|
+
}
|
|
2100
|
+
|
|
2101
|
+
return workflows;
|
|
2102
|
+
}
|
|
2103
|
+
|
|
2104
|
+
async demonstrateEnterpriseOperations() {
|
|
2105
|
+
// Simulate enterprise operations
|
|
2106
|
+
console.log('Demonstrating enterprise operations...');
|
|
2107
|
+
|
|
2108
|
+
// High-volume agent spawning
|
|
2109
|
+
await this.simulateHighVolumeOperations();
|
|
2110
|
+
|
|
2111
|
+
// Multi-tenant isolation
|
|
2112
|
+
await this.demonstrateMultiTenancy();
|
|
2113
|
+
|
|
2114
|
+
// Disaster recovery
|
|
2115
|
+
await this.demonstrateDisasterRecovery();
|
|
2116
|
+
|
|
2117
|
+
// Compliance reporting
|
|
2118
|
+
await this.generateComplianceReports();
|
|
2119
|
+
}
|
|
2120
|
+
|
|
2121
|
+
private async simulateHighVolumeOperations() {
|
|
2122
|
+
console.log('Simulating high-volume operations...');
|
|
2123
|
+
|
|
2124
|
+
// Spawn large number of agents across different projects
|
|
2125
|
+
const projects = ['project-a', 'project-b', 'project-c'];
|
|
2126
|
+
const agentTypes = ['backend-dev', 'frontend-dev', 'tester', 'reviewer'];
|
|
2127
|
+
|
|
2128
|
+
const spawnPromises = [];
|
|
2129
|
+
|
|
2130
|
+
for (const project of projects) {
|
|
2131
|
+
for (const agentType of agentTypes) {
|
|
2132
|
+
// Spawn 10 agents of each type per project
|
|
2133
|
+
for (let i = 0; i < 10; i++) {
|
|
2134
|
+
spawnPromises.push(
|
|
2135
|
+
this.enterprise.spawnAgent({
|
|
2136
|
+
type: agentType,
|
|
2137
|
+
project,
|
|
2138
|
+
task: `${agentType} work for ${project}`,
|
|
2139
|
+
priority: 'normal'
|
|
2140
|
+
})
|
|
2141
|
+
);
|
|
2142
|
+
}
|
|
2143
|
+
}
|
|
2144
|
+
}
|
|
2145
|
+
|
|
2146
|
+
const agents = await Promise.all(spawnPromises);
|
|
2147
|
+
console.log(`Spawned ${agents.length} agents across ${projects.length} projects`);
|
|
2148
|
+
|
|
2149
|
+
// Monitor system performance under load
|
|
2150
|
+
const performanceMetrics = await this.monitoring.getRealtimeMetrics();
|
|
2151
|
+
console.log('System performance under load:', performanceMetrics);
|
|
2152
|
+
|
|
2153
|
+
return agents;
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2156
|
+
private async demonstrateMultiTenancy() {
|
|
2157
|
+
console.log('Demonstrating multi-tenant isolation...');
|
|
2158
|
+
|
|
2159
|
+
const tenants = [
|
|
2160
|
+
{ id: 'tenant-alpha', quota: { agents: 100, memory: '20GB' } },
|
|
2161
|
+
{ id: 'tenant-beta', quota: { agents: 50, memory: '10GB' } },
|
|
2162
|
+
{ id: 'tenant-gamma', quota: { agents: 200, memory: '40GB' } }
|
|
2163
|
+
];
|
|
2164
|
+
|
|
2165
|
+
for (const tenant of tenants) {
|
|
2166
|
+
// Create isolated namespace for tenant
|
|
2167
|
+
await this.enterprise.createTenantNamespace(tenant.id, {
|
|
2168
|
+
resourceQuota: tenant.quota,
|
|
2169
|
+
networkPolicies: ['isolated'],
|
|
2170
|
+
securityPolicies: ['default', 'tenant-specific']
|
|
2171
|
+
});
|
|
2172
|
+
|
|
2173
|
+
// Deploy tenant-specific agents
|
|
2174
|
+
await this.enterprise.deployTenantAgents(tenant.id, {
|
|
2175
|
+
types: ['backend-dev', 'frontend-dev'],
|
|
2176
|
+
count: Math.floor(tenant.quota.agents * 0.1) // 10% of quota
|
|
2177
|
+
});
|
|
2178
|
+
|
|
2179
|
+
console.log(`Tenant ${tenant.id} isolated and configured`);
|
|
2180
|
+
}
|
|
2181
|
+
}
|
|
2182
|
+
|
|
2183
|
+
private async demonstrateDisasterRecovery() {
|
|
2184
|
+
console.log('Demonstrating disaster recovery...');
|
|
2185
|
+
|
|
2186
|
+
// Simulate system failure
|
|
2187
|
+
await this.enterprise.simulateFailure('node-failure', {
|
|
2188
|
+
nodes: ['node-1', 'node-2'],
|
|
2189
|
+
severity: 'high'
|
|
2190
|
+
});
|
|
2191
|
+
|
|
2192
|
+
// Trigger automatic recovery
|
|
2193
|
+
const recoveryResult = await this.enterprise.triggerDisasterRecovery({
|
|
2194
|
+
backupLocation: 's3://backup-bucket/latest',
|
|
2195
|
+
recoveryType: 'hot-standby',
|
|
2196
|
+
targetRTO: 300, // 5 minutes
|
|
2197
|
+
targetRPO: 60 // 1 minute
|
|
2198
|
+
});
|
|
2199
|
+
|
|
2200
|
+
console.log('Disaster recovery completed:', recoveryResult);
|
|
2201
|
+
|
|
2202
|
+
// Verify system integrity
|
|
2203
|
+
const integrityCheck = await this.enterprise.verifySystemIntegrity();
|
|
2204
|
+
console.log('System integrity verified:', integrityCheck.passed);
|
|
2205
|
+
}
|
|
2206
|
+
|
|
2207
|
+
private async generateComplianceReports() {
|
|
2208
|
+
console.log('Generating compliance reports...');
|
|
2209
|
+
|
|
2210
|
+
const complianceReports = await Promise.all([
|
|
2211
|
+
this.enterprise.generateComplianceReport('SOX', {
|
|
2212
|
+
period: 'quarterly',
|
|
2213
|
+
year: 2024,
|
|
2214
|
+
quarter: 'Q1'
|
|
2215
|
+
}),
|
|
2216
|
+
this.enterprise.generateComplianceReport('GDPR', {
|
|
2217
|
+
period: 'monthly',
|
|
2218
|
+
year: 2024,
|
|
2219
|
+
month: 'January'
|
|
2220
|
+
}),
|
|
2221
|
+
this.enterprise.generateComplianceReport('HIPAA', {
|
|
2222
|
+
period: 'annual',
|
|
2223
|
+
year: 2023
|
|
2224
|
+
})
|
|
2225
|
+
]);
|
|
2226
|
+
|
|
2227
|
+
for (const report of complianceReports) {
|
|
2228
|
+
console.log(`${report.standard} compliance score: ${report.score}%`);
|
|
2229
|
+
if (report.violations.length > 0) {
|
|
2230
|
+
console.warn(`${report.standard} violations:`, report.violations);
|
|
2231
|
+
}
|
|
2232
|
+
}
|
|
2233
|
+
|
|
2234
|
+
return complianceReports;
|
|
2235
|
+
}
|
|
2236
|
+
}
|
|
2237
|
+
```
|
|
2238
|
+
|
|
2239
|
+
<function_calls>
|
|
2240
|
+
<invoke name="TodoWrite">
|
|
2241
|
+
<parameter name="todos">[{"content": "Analyze existing codebase structure and APIs", "status": "completed", "activeForm": "Analyzing existing codebase structure and APIs"}, {"content": "Document core CLI API interfaces", "status": "completed", "activeForm": "Documenting core CLI API interfaces"}, {"content": "Create MCP tool specifications", "status": "completed", "activeForm": "Creating MCP tool specifications"}, {"content": "Document agent spawning and management APIs", "status": "completed", "activeForm": "Documenting agent spawning and management APIs"}, {"content": "Create hooks and coordination API documentation", "status": "completed", "activeForm": "Creating hooks and coordination API documentation"}, {"content": "Document configuration and storage APIs", "status": "completed", "activeForm": "Documenting configuration and storage APIs"}, {"content": "Create integration guides for developers", "status": "completed", "activeForm": "Creating integration guides for developers"}, {"content": "Document plugin development interfaces", "status": "completed", "activeForm": "Documenting plugin development interfaces"}, {"content": "Create technical architecture documentation", "status": "completed", "activeForm": "Creating technical architecture documentation"}, {"content": "Generate API reference examples and code samples", "status": "completed", "activeForm": "Generating API reference examples and code samples"}]
|