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,1317 @@
|
|
|
1
|
+
# Python Data Science with Claude-Flow
|
|
2
|
+
|
|
3
|
+
Comprehensive guide to data science workflows, machine learning pipelines, and Jupyter integration using claude-flow orchestration for enhanced productivity and collaboration.
|
|
4
|
+
|
|
5
|
+
## 🔬 Data Science Overview
|
|
6
|
+
|
|
7
|
+
### Data Science Agent Ecosystem
|
|
8
|
+
|
|
9
|
+
| Agent Type | Specialization | Primary Tools | Use Cases |
|
|
10
|
+
|------------|---------------|---------------|-----------|
|
|
11
|
+
| **`ml-developer`** | Machine Learning | scikit-learn, TensorFlow, PyTorch | Model development, training |
|
|
12
|
+
| **`data-scientist`** | Analysis & Visualization | pandas, NumPy, Matplotlib | EDA, statistical analysis |
|
|
13
|
+
| **`data-engineer`** | ETL & Pipelines | Apache Airflow, Spark | Data processing, pipelines |
|
|
14
|
+
| **`researcher`** | Domain Research | Literature, APIs | Research, feature discovery |
|
|
15
|
+
|
|
16
|
+
## 📊 Quick Start: Data Science Projects
|
|
17
|
+
|
|
18
|
+
### 1. Exploratory Data Analysis (EDA)
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# Initialize data analysis project with claude-flow
|
|
22
|
+
npx claude-flow@alpha sparc run spec-pseudocode "Customer behavior analysis with visualization"
|
|
23
|
+
|
|
24
|
+
# Spawn coordinated data science team
|
|
25
|
+
Task("Data Scientist", "Perform exploratory data analysis with pandas and seaborn", "data-scientist")
|
|
26
|
+
Task("Visualization Expert", "Create interactive dashboards with Plotly", "coder")
|
|
27
|
+
Task("Statistical Analyst", "Run statistical tests and hypothesis testing", "researcher")
|
|
28
|
+
Task("Report Writer", "Generate comprehensive analysis report", "api-docs")
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### 2. Machine Learning Pipeline
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# Complete ML workflow with SPARC methodology
|
|
35
|
+
npx claude-flow@alpha sparc tdd "Predictive model for customer churn"
|
|
36
|
+
|
|
37
|
+
# Parallel ML development
|
|
38
|
+
Task("Data Engineer", "Build feature engineering pipeline", "data-engineer")
|
|
39
|
+
Task("ML Engineer", "Train and evaluate multiple models", "ml-developer")
|
|
40
|
+
Task("MLOps Engineer", "Setup model deployment and monitoring", "cicd-engineer")
|
|
41
|
+
Task("Performance Analyst", "Analyze model performance and optimization", "performance-optimizer")
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 3. Time Series Analysis
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# Time series forecasting project
|
|
48
|
+
Task("Time Series Analyst", "Build ARIMA and Prophet forecasting models", "ml-developer")
|
|
49
|
+
Task("Feature Engineer", "Create lag features and seasonality components", "data-scientist")
|
|
50
|
+
Task("Validation Engineer", "Implement cross-validation for time series", "tester")
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## 📓 Jupyter Notebook Integration
|
|
54
|
+
|
|
55
|
+
### Jupyter Environment Setup
|
|
56
|
+
|
|
57
|
+
```python
|
|
58
|
+
# notebook_setup.py - Generated by claude-flow agents
|
|
59
|
+
import pandas as pd
|
|
60
|
+
import numpy as np
|
|
61
|
+
import matplotlib.pyplot as plt
|
|
62
|
+
import seaborn as sns
|
|
63
|
+
import plotly.express as px
|
|
64
|
+
import plotly.graph_objects as go
|
|
65
|
+
from plotly.subplots import make_subplots
|
|
66
|
+
|
|
67
|
+
# Machine learning libraries
|
|
68
|
+
from sklearn.model_selection import train_test_split, cross_val_score
|
|
69
|
+
from sklearn.preprocessing import StandardScaler, LabelEncoder
|
|
70
|
+
from sklearn.ensemble import RandomForestClassifier, GradientBoostingClassifier
|
|
71
|
+
from sklearn.linear_model import LogisticRegression
|
|
72
|
+
from sklearn.metrics import classification_report, confusion_matrix, roc_auc_score
|
|
73
|
+
|
|
74
|
+
# Deep learning
|
|
75
|
+
import tensorflow as tf
|
|
76
|
+
from tensorflow import keras
|
|
77
|
+
from tensorflow.keras import layers
|
|
78
|
+
|
|
79
|
+
# Set display options
|
|
80
|
+
pd.set_option('display.max_columns', None)
|
|
81
|
+
pd.set_option('display.width', None)
|
|
82
|
+
pd.set_option('display.max_colwidth', None)
|
|
83
|
+
|
|
84
|
+
# Plotting style
|
|
85
|
+
plt.style.use('seaborn-v0_8')
|
|
86
|
+
sns.set_palette("husl")
|
|
87
|
+
|
|
88
|
+
# Jupyter extensions for claude-flow integration
|
|
89
|
+
%load_ext autoreload
|
|
90
|
+
%autoreload 2
|
|
91
|
+
|
|
92
|
+
# Claude-flow notebook helpers
|
|
93
|
+
import subprocess
|
|
94
|
+
import os
|
|
95
|
+
|
|
96
|
+
def notify_claude_flow(message):
|
|
97
|
+
"""Notify claude-flow of notebook progress."""
|
|
98
|
+
try:
|
|
99
|
+
subprocess.run([
|
|
100
|
+
"npx", "claude-flow@alpha", "hooks", "notify",
|
|
101
|
+
"--message", f"Jupyter: {message}"
|
|
102
|
+
], check=True)
|
|
103
|
+
except subprocess.CalledProcessError:
|
|
104
|
+
print(f"Note: {message}")
|
|
105
|
+
|
|
106
|
+
def save_to_memory(key, value):
|
|
107
|
+
"""Save data to claude-flow memory."""
|
|
108
|
+
try:
|
|
109
|
+
subprocess.run([
|
|
110
|
+
"npx", "claude-flow@alpha", "mcp", "memory_usage",
|
|
111
|
+
"--action", "store",
|
|
112
|
+
"--key", f"jupyter/{key}",
|
|
113
|
+
"--value", str(value)
|
|
114
|
+
], check=True)
|
|
115
|
+
except subprocess.CalledProcessError:
|
|
116
|
+
print(f"Saved locally: {key} = {value}")
|
|
117
|
+
|
|
118
|
+
print("Claude-Flow Jupyter environment ready! 🚀")
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Data Analysis Notebook Template
|
|
122
|
+
|
|
123
|
+
```python
|
|
124
|
+
# 01_exploratory_data_analysis.ipynb - Generated by data-scientist agent
|
|
125
|
+
|
|
126
|
+
# Cell 1: Setup and Data Loading
|
|
127
|
+
import pandas as pd
|
|
128
|
+
import numpy as np
|
|
129
|
+
import matplotlib.pyplot as plt
|
|
130
|
+
import seaborn as sns
|
|
131
|
+
from notebook_setup import notify_claude_flow, save_to_memory
|
|
132
|
+
|
|
133
|
+
# Load dataset
|
|
134
|
+
df = pd.read_csv('data/customer_data.csv')
|
|
135
|
+
notify_claude_flow("Dataset loaded successfully")
|
|
136
|
+
|
|
137
|
+
print(f"Dataset shape: {df.shape}")
|
|
138
|
+
print(f"Memory usage: {df.memory_usage(deep=True).sum() / 1024**2:.2f} MB")
|
|
139
|
+
|
|
140
|
+
# Cell 2: Data Overview
|
|
141
|
+
def analyze_dataset(df):
|
|
142
|
+
"""Comprehensive dataset analysis."""
|
|
143
|
+
analysis = {
|
|
144
|
+
'shape': df.shape,
|
|
145
|
+
'columns': list(df.columns),
|
|
146
|
+
'dtypes': df.dtypes.to_dict(),
|
|
147
|
+
'missing_values': df.isnull().sum().to_dict(),
|
|
148
|
+
'duplicate_rows': df.duplicated().sum(),
|
|
149
|
+
'numeric_columns': df.select_dtypes(include=[np.number]).columns.tolist(),
|
|
150
|
+
'categorical_columns': df.select_dtypes(include=['object']).columns.tolist()
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
# Save analysis to claude-flow memory
|
|
154
|
+
save_to_memory("dataset_analysis", analysis)
|
|
155
|
+
|
|
156
|
+
return analysis
|
|
157
|
+
|
|
158
|
+
analysis = analyze_dataset(df)
|
|
159
|
+
print("Dataset Analysis:")
|
|
160
|
+
for key, value in analysis.items():
|
|
161
|
+
print(f"{key}: {value}")
|
|
162
|
+
|
|
163
|
+
# Cell 3: Missing Values Analysis
|
|
164
|
+
def plot_missing_values(df):
|
|
165
|
+
"""Visualize missing values pattern."""
|
|
166
|
+
plt.figure(figsize=(12, 8))
|
|
167
|
+
|
|
168
|
+
# Missing values heatmap
|
|
169
|
+
plt.subplot(2, 2, 1)
|
|
170
|
+
sns.heatmap(df.isnull(), cbar=True, yticklabels=False, cmap='viridis')
|
|
171
|
+
plt.title('Missing Values Heatmap')
|
|
172
|
+
|
|
173
|
+
# Missing values bar plot
|
|
174
|
+
plt.subplot(2, 2, 2)
|
|
175
|
+
missing_counts = df.isnull().sum()
|
|
176
|
+
missing_counts[missing_counts > 0].plot(kind='bar')
|
|
177
|
+
plt.title('Missing Values Count')
|
|
178
|
+
plt.xticks(rotation=45)
|
|
179
|
+
|
|
180
|
+
# Missing values percentage
|
|
181
|
+
plt.subplot(2, 2, 3)
|
|
182
|
+
missing_percent = (df.isnull().sum() / len(df)) * 100
|
|
183
|
+
missing_percent[missing_percent > 0].plot(kind='bar', color='orange')
|
|
184
|
+
plt.title('Missing Values Percentage')
|
|
185
|
+
plt.xticks(rotation=45)
|
|
186
|
+
|
|
187
|
+
plt.tight_layout()
|
|
188
|
+
plt.show()
|
|
189
|
+
|
|
190
|
+
plot_missing_values(df)
|
|
191
|
+
notify_claude_flow("Missing values analysis completed")
|
|
192
|
+
|
|
193
|
+
# Cell 4: Statistical Summary
|
|
194
|
+
def generate_statistical_summary(df):
|
|
195
|
+
"""Generate comprehensive statistical summary."""
|
|
196
|
+
numeric_df = df.select_dtypes(include=[np.number])
|
|
197
|
+
|
|
198
|
+
summary = {
|
|
199
|
+
'descriptive_stats': numeric_df.describe().to_dict(),
|
|
200
|
+
'correlation_matrix': numeric_df.corr().to_dict(),
|
|
201
|
+
'skewness': numeric_df.skew().to_dict(),
|
|
202
|
+
'kurtosis': numeric_df.kurtosis().to_dict()
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
# Correlation heatmap
|
|
206
|
+
plt.figure(figsize=(10, 8))
|
|
207
|
+
sns.heatmap(numeric_df.corr(), annot=True, cmap='coolwarm', center=0)
|
|
208
|
+
plt.title('Feature Correlation Matrix')
|
|
209
|
+
plt.show()
|
|
210
|
+
|
|
211
|
+
save_to_memory("statistical_summary", summary)
|
|
212
|
+
return summary
|
|
213
|
+
|
|
214
|
+
stats = generate_statistical_summary(df)
|
|
215
|
+
notify_claude_flow("Statistical analysis completed")
|
|
216
|
+
|
|
217
|
+
# Cell 5: Distribution Analysis
|
|
218
|
+
def plot_distributions(df, columns=None):
|
|
219
|
+
"""Plot distributions for numeric columns."""
|
|
220
|
+
if columns is None:
|
|
221
|
+
columns = df.select_dtypes(include=[np.number]).columns
|
|
222
|
+
|
|
223
|
+
n_cols = min(len(columns), 4)
|
|
224
|
+
n_rows = (len(columns) + n_cols - 1) // n_cols
|
|
225
|
+
|
|
226
|
+
fig, axes = plt.subplots(n_rows, n_cols, figsize=(15, 4*n_rows))
|
|
227
|
+
axes = axes.flatten() if n_rows > 1 else [axes]
|
|
228
|
+
|
|
229
|
+
for i, col in enumerate(columns):
|
|
230
|
+
if i < len(axes):
|
|
231
|
+
# Histogram with KDE
|
|
232
|
+
axes[i].hist(df[col].dropna(), bins=30, alpha=0.7, density=True)
|
|
233
|
+
df[col].plot.kde(ax=axes[i], secondary_y=False)
|
|
234
|
+
axes[i].set_title(f'Distribution of {col}')
|
|
235
|
+
axes[i].set_xlabel(col)
|
|
236
|
+
axes[i].set_ylabel('Density')
|
|
237
|
+
|
|
238
|
+
# Hide unused subplots
|
|
239
|
+
for i in range(len(columns), len(axes)):
|
|
240
|
+
axes[i].set_visible(False)
|
|
241
|
+
|
|
242
|
+
plt.tight_layout()
|
|
243
|
+
plt.show()
|
|
244
|
+
|
|
245
|
+
plot_distributions(df)
|
|
246
|
+
notify_claude_flow("Distribution analysis completed")
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### Machine Learning Notebook
|
|
250
|
+
|
|
251
|
+
```python
|
|
252
|
+
# 02_machine_learning_pipeline.ipynb - Generated by ml-developer agent
|
|
253
|
+
|
|
254
|
+
# Cell 1: ML Pipeline Setup
|
|
255
|
+
from sklearn.model_selection import train_test_split, cross_val_score, GridSearchCV
|
|
256
|
+
from sklearn.preprocessing import StandardScaler, LabelEncoder, OneHotEncoder
|
|
257
|
+
from sklearn.ensemble import RandomForestClassifier, GradientBoostingClassifier
|
|
258
|
+
from sklearn.linear_model import LogisticRegression
|
|
259
|
+
from sklearn.svm import SVC
|
|
260
|
+
from sklearn.metrics import classification_report, confusion_matrix, roc_auc_score, roc_curve
|
|
261
|
+
from sklearn.pipeline import Pipeline
|
|
262
|
+
import joblib
|
|
263
|
+
|
|
264
|
+
class MLPipeline:
|
|
265
|
+
"""Comprehensive ML pipeline with claude-flow integration."""
|
|
266
|
+
|
|
267
|
+
def __init__(self, target_column):
|
|
268
|
+
self.target_column = target_column
|
|
269
|
+
self.models = {}
|
|
270
|
+
self.results = {}
|
|
271
|
+
self.best_model = None
|
|
272
|
+
self.preprocessor = None
|
|
273
|
+
|
|
274
|
+
def preprocess_data(self, df):
|
|
275
|
+
"""Preprocess data for machine learning."""
|
|
276
|
+
# Separate features and target
|
|
277
|
+
X = df.drop(columns=[self.target_column])
|
|
278
|
+
y = df[self.target_column]
|
|
279
|
+
|
|
280
|
+
# Handle categorical variables
|
|
281
|
+
categorical_columns = X.select_dtypes(include=['object']).columns
|
|
282
|
+
numeric_columns = X.select_dtypes(include=[np.number]).columns
|
|
283
|
+
|
|
284
|
+
# Create preprocessing pipeline
|
|
285
|
+
from sklearn.compose import ColumnTransformer
|
|
286
|
+
|
|
287
|
+
preprocessor = ColumnTransformer(
|
|
288
|
+
transformers=[
|
|
289
|
+
('num', StandardScaler(), numeric_columns),
|
|
290
|
+
('cat', OneHotEncoder(drop='first', sparse=False), categorical_columns)
|
|
291
|
+
]
|
|
292
|
+
)
|
|
293
|
+
|
|
294
|
+
self.preprocessor = preprocessor
|
|
295
|
+
X_processed = preprocessor.fit_transform(X)
|
|
296
|
+
|
|
297
|
+
# Save preprocessing info to memory
|
|
298
|
+
preprocessing_info = {
|
|
299
|
+
'categorical_columns': categorical_columns.tolist(),
|
|
300
|
+
'numeric_columns': numeric_columns.tolist(),
|
|
301
|
+
'target_column': self.target_column,
|
|
302
|
+
'feature_names': (numeric_columns.tolist() +
|
|
303
|
+
[f"{col}_{val}" for col in categorical_columns
|
|
304
|
+
for val in df[col].unique()[1:]])
|
|
305
|
+
}
|
|
306
|
+
save_to_memory("preprocessing_info", preprocessing_info)
|
|
307
|
+
|
|
308
|
+
return X_processed, y
|
|
309
|
+
|
|
310
|
+
def train_models(self, X, y, test_size=0.2, random_state=42):
|
|
311
|
+
"""Train multiple models and compare performance."""
|
|
312
|
+
# Split data
|
|
313
|
+
X_train, X_test, y_train, y_test = train_test_split(
|
|
314
|
+
X, y, test_size=test_size, random_state=random_state, stratify=y
|
|
315
|
+
)
|
|
316
|
+
|
|
317
|
+
# Define models
|
|
318
|
+
models = {
|
|
319
|
+
'Logistic Regression': LogisticRegression(random_state=random_state),
|
|
320
|
+
'Random Forest': RandomForestClassifier(random_state=random_state),
|
|
321
|
+
'Gradient Boosting': GradientBoostingClassifier(random_state=random_state),
|
|
322
|
+
'SVM': SVC(probability=True, random_state=random_state)
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
results = {}
|
|
326
|
+
|
|
327
|
+
for name, model in models.items():
|
|
328
|
+
print(f"Training {name}...")
|
|
329
|
+
|
|
330
|
+
# Cross-validation
|
|
331
|
+
cv_scores = cross_val_score(model, X_train, y_train, cv=5, scoring='roc_auc')
|
|
332
|
+
|
|
333
|
+
# Train on full training set
|
|
334
|
+
model.fit(X_train, y_train)
|
|
335
|
+
|
|
336
|
+
# Predictions
|
|
337
|
+
y_pred = model.predict(X_test)
|
|
338
|
+
y_pred_proba = model.predict_proba(X_test)[:, 1]
|
|
339
|
+
|
|
340
|
+
# Metrics
|
|
341
|
+
results[name] = {
|
|
342
|
+
'model': model,
|
|
343
|
+
'cv_mean': cv_scores.mean(),
|
|
344
|
+
'cv_std': cv_scores.std(),
|
|
345
|
+
'test_auc': roc_auc_score(y_test, y_pred_proba),
|
|
346
|
+
'classification_report': classification_report(y_test, y_pred, output_dict=True)
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
print(f"{name} - CV AUC: {cv_scores.mean():.4f} (+/- {cv_scores.std()*2:.4f})")
|
|
350
|
+
print(f"{name} - Test AUC: {roc_auc_score(y_test, y_pred_proba):.4f}")
|
|
351
|
+
|
|
352
|
+
self.models = models
|
|
353
|
+
self.results = results
|
|
354
|
+
self.X_test = X_test
|
|
355
|
+
self.y_test = y_test
|
|
356
|
+
|
|
357
|
+
# Find best model
|
|
358
|
+
best_model_name = max(results.keys(), key=lambda k: results[k]['test_auc'])
|
|
359
|
+
self.best_model = models[best_model_name]
|
|
360
|
+
|
|
361
|
+
save_to_memory("model_results", {k: {
|
|
362
|
+
'cv_mean': v['cv_mean'],
|
|
363
|
+
'cv_std': v['cv_std'],
|
|
364
|
+
'test_auc': v['test_auc']
|
|
365
|
+
} for k, v in results.items()})
|
|
366
|
+
|
|
367
|
+
notify_claude_flow(f"Model training completed. Best model: {best_model_name}")
|
|
368
|
+
|
|
369
|
+
return results
|
|
370
|
+
|
|
371
|
+
def plot_model_comparison(self):
|
|
372
|
+
"""Plot model comparison."""
|
|
373
|
+
model_names = list(self.results.keys())
|
|
374
|
+
cv_means = [self.results[name]['cv_mean'] for name in model_names]
|
|
375
|
+
test_aucs = [self.results[name]['test_auc'] for name in model_names]
|
|
376
|
+
|
|
377
|
+
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(15, 6))
|
|
378
|
+
|
|
379
|
+
# CV scores
|
|
380
|
+
ax1.bar(model_names, cv_means)
|
|
381
|
+
ax1.set_title('Cross-Validation AUC Scores')
|
|
382
|
+
ax1.set_ylabel('AUC Score')
|
|
383
|
+
ax1.set_xticklabels(model_names, rotation=45)
|
|
384
|
+
|
|
385
|
+
# Test scores
|
|
386
|
+
ax2.bar(model_names, test_aucs)
|
|
387
|
+
ax2.set_title('Test Set AUC Scores')
|
|
388
|
+
ax2.set_ylabel('AUC Score')
|
|
389
|
+
ax2.set_xticklabels(model_names, rotation=45)
|
|
390
|
+
|
|
391
|
+
plt.tight_layout()
|
|
392
|
+
plt.show()
|
|
393
|
+
|
|
394
|
+
def plot_roc_curves(self):
|
|
395
|
+
"""Plot ROC curves for all models."""
|
|
396
|
+
plt.figure(figsize=(10, 8))
|
|
397
|
+
|
|
398
|
+
for name, result in self.results.items():
|
|
399
|
+
model = result['model']
|
|
400
|
+
y_pred_proba = model.predict_proba(self.X_test)[:, 1]
|
|
401
|
+
fpr, tpr, _ = roc_curve(self.y_test, y_pred_proba)
|
|
402
|
+
auc = result['test_auc']
|
|
403
|
+
plt.plot(fpr, tpr, label=f'{name} (AUC = {auc:.3f})')
|
|
404
|
+
|
|
405
|
+
plt.plot([0, 1], [0, 1], 'k--', label='Random')
|
|
406
|
+
plt.xlabel('False Positive Rate')
|
|
407
|
+
plt.ylabel('True Positive Rate')
|
|
408
|
+
plt.title('ROC Curves Comparison')
|
|
409
|
+
plt.legend()
|
|
410
|
+
plt.grid(True)
|
|
411
|
+
plt.show()
|
|
412
|
+
|
|
413
|
+
def hyperparameter_tuning(self, model_name='Random Forest'):
|
|
414
|
+
"""Perform hyperparameter tuning for selected model."""
|
|
415
|
+
if model_name not in self.models:
|
|
416
|
+
raise ValueError(f"Model {model_name} not found")
|
|
417
|
+
|
|
418
|
+
model = self.models[model_name]
|
|
419
|
+
|
|
420
|
+
# Define parameter grids
|
|
421
|
+
param_grids = {
|
|
422
|
+
'Random Forest': {
|
|
423
|
+
'n_estimators': [100, 200, 300],
|
|
424
|
+
'max_depth': [None, 10, 20, 30],
|
|
425
|
+
'min_samples_split': [2, 5, 10],
|
|
426
|
+
'min_samples_leaf': [1, 2, 4]
|
|
427
|
+
},
|
|
428
|
+
'Gradient Boosting': {
|
|
429
|
+
'n_estimators': [100, 200],
|
|
430
|
+
'learning_rate': [0.01, 0.1, 0.2],
|
|
431
|
+
'max_depth': [3, 5, 7]
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
if model_name in param_grids:
|
|
436
|
+
param_grid = param_grids[model_name]
|
|
437
|
+
|
|
438
|
+
print(f"Performing hyperparameter tuning for {model_name}...")
|
|
439
|
+
grid_search = GridSearchCV(
|
|
440
|
+
model, param_grid, cv=5, scoring='roc_auc', n_jobs=-1
|
|
441
|
+
)
|
|
442
|
+
|
|
443
|
+
# Use training data for tuning
|
|
444
|
+
X_train = self.X_test # This should be actual training data
|
|
445
|
+
y_train = self.y_test # This should be actual training labels
|
|
446
|
+
|
|
447
|
+
grid_search.fit(X_train, y_train)
|
|
448
|
+
|
|
449
|
+
print(f"Best parameters: {grid_search.best_params_}")
|
|
450
|
+
print(f"Best CV score: {grid_search.best_score_:.4f}")
|
|
451
|
+
|
|
452
|
+
self.best_model = grid_search.best_estimator_
|
|
453
|
+
save_to_memory("best_model_params", grid_search.best_params_)
|
|
454
|
+
|
|
455
|
+
return grid_search
|
|
456
|
+
else:
|
|
457
|
+
print(f"No parameter grid defined for {model_name}")
|
|
458
|
+
return None
|
|
459
|
+
|
|
460
|
+
# Initialize and run ML pipeline
|
|
461
|
+
ml_pipeline = MLPipeline('target_column_name') # Replace with actual target
|
|
462
|
+
X_processed, y = ml_pipeline.preprocess_data(df)
|
|
463
|
+
results = ml_pipeline.train_models(X_processed, y)
|
|
464
|
+
|
|
465
|
+
# Visualize results
|
|
466
|
+
ml_pipeline.plot_model_comparison()
|
|
467
|
+
ml_pipeline.plot_roc_curves()
|
|
468
|
+
|
|
469
|
+
notify_claude_flow("ML pipeline execution completed")
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
## 🔄 Data Engineering Workflows
|
|
473
|
+
|
|
474
|
+
### ETL Pipeline with Apache Airflow
|
|
475
|
+
|
|
476
|
+
```python
|
|
477
|
+
# dags/data_pipeline.py - Data engineering workflow
|
|
478
|
+
from datetime import datetime, timedelta
|
|
479
|
+
from airflow import DAG
|
|
480
|
+
from airflow.operators.python import PythonOperator
|
|
481
|
+
from airflow.operators.bash import BashOperator
|
|
482
|
+
import pandas as pd
|
|
483
|
+
import numpy as np
|
|
484
|
+
import requests
|
|
485
|
+
|
|
486
|
+
default_args = {
|
|
487
|
+
'owner': 'claude-flow-data-engineer',
|
|
488
|
+
'depends_on_past': False,
|
|
489
|
+
'start_date': datetime(2024, 1, 1),
|
|
490
|
+
'email_on_failure': True,
|
|
491
|
+
'email_on_retry': False,
|
|
492
|
+
'retries': 2,
|
|
493
|
+
'retry_delay': timedelta(minutes=5)
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
def extract_data(**context):
|
|
497
|
+
"""Extract data from multiple sources."""
|
|
498
|
+
# API data extraction
|
|
499
|
+
api_response = requests.get('https://api.example.com/data')
|
|
500
|
+
api_data = api_response.json()
|
|
501
|
+
|
|
502
|
+
# Database extraction
|
|
503
|
+
db_query = """
|
|
504
|
+
SELECT customer_id, purchase_date, amount, product_category
|
|
505
|
+
FROM transactions
|
|
506
|
+
WHERE date >= NOW() - INTERVAL '1 DAY'
|
|
507
|
+
"""
|
|
508
|
+
db_data = pd.read_sql(db_query, connection_string)
|
|
509
|
+
|
|
510
|
+
# File data extraction
|
|
511
|
+
file_data = pd.read_csv('/data/raw/daily_data.csv')
|
|
512
|
+
|
|
513
|
+
# Combine data sources
|
|
514
|
+
combined_data = {
|
|
515
|
+
'api_data': api_data,
|
|
516
|
+
'db_data': db_data.to_dict('records'),
|
|
517
|
+
'file_data': file_data.to_dict('records')
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
# Store in staging area
|
|
521
|
+
pd.DataFrame(combined_data['db_data']).to_parquet('/data/staging/db_data.parquet')
|
|
522
|
+
pd.DataFrame(combined_data['file_data']).to_parquet('/data/staging/file_data.parquet')
|
|
523
|
+
|
|
524
|
+
# Notify claude-flow
|
|
525
|
+
subprocess.run([
|
|
526
|
+
"npx", "claude-flow@alpha", "hooks", "notify",
|
|
527
|
+
"--message", "Data extraction completed"
|
|
528
|
+
])
|
|
529
|
+
|
|
530
|
+
return combined_data
|
|
531
|
+
|
|
532
|
+
def transform_data(**context):
|
|
533
|
+
"""Transform and clean extracted data."""
|
|
534
|
+
# Load staging data
|
|
535
|
+
db_data = pd.read_parquet('/data/staging/db_data.parquet')
|
|
536
|
+
file_data = pd.read_parquet('/data/staging/file_data.parquet')
|
|
537
|
+
|
|
538
|
+
# Data cleaning
|
|
539
|
+
def clean_dataframe(df):
|
|
540
|
+
# Remove duplicates
|
|
541
|
+
df = df.drop_duplicates()
|
|
542
|
+
|
|
543
|
+
# Handle missing values
|
|
544
|
+
numeric_columns = df.select_dtypes(include=[np.number]).columns
|
|
545
|
+
df[numeric_columns] = df[numeric_columns].fillna(df[numeric_columns].median())
|
|
546
|
+
|
|
547
|
+
categorical_columns = df.select_dtypes(include=['object']).columns
|
|
548
|
+
df[categorical_columns] = df[categorical_columns].fillna('Unknown')
|
|
549
|
+
|
|
550
|
+
return df
|
|
551
|
+
|
|
552
|
+
# Feature engineering
|
|
553
|
+
def engineer_features(df):
|
|
554
|
+
if 'purchase_date' in df.columns:
|
|
555
|
+
df['purchase_date'] = pd.to_datetime(df['purchase_date'])
|
|
556
|
+
df['day_of_week'] = df['purchase_date'].dt.dayofweek
|
|
557
|
+
df['month'] = df['purchase_date'].dt.month
|
|
558
|
+
df['is_weekend'] = df['day_of_week'].isin([5, 6])
|
|
559
|
+
|
|
560
|
+
if 'amount' in df.columns:
|
|
561
|
+
df['amount_log'] = np.log1p(df['amount'])
|
|
562
|
+
df['amount_category'] = pd.cut(
|
|
563
|
+
df['amount'],
|
|
564
|
+
bins=[0, 50, 200, 1000, float('inf')],
|
|
565
|
+
labels=['low', 'medium', 'high', 'premium']
|
|
566
|
+
)
|
|
567
|
+
|
|
568
|
+
return df
|
|
569
|
+
|
|
570
|
+
# Apply transformations
|
|
571
|
+
db_data_clean = clean_dataframe(db_data)
|
|
572
|
+
db_data_transformed = engineer_features(db_data_clean)
|
|
573
|
+
|
|
574
|
+
file_data_clean = clean_dataframe(file_data)
|
|
575
|
+
file_data_transformed = engineer_features(file_data_clean)
|
|
576
|
+
|
|
577
|
+
# Combine transformed data
|
|
578
|
+
combined_transformed = pd.concat([
|
|
579
|
+
db_data_transformed,
|
|
580
|
+
file_data_transformed
|
|
581
|
+
], ignore_index=True)
|
|
582
|
+
|
|
583
|
+
# Save transformed data
|
|
584
|
+
combined_transformed.to_parquet('/data/processed/daily_processed.parquet')
|
|
585
|
+
|
|
586
|
+
# Data quality checks
|
|
587
|
+
quality_report = {
|
|
588
|
+
'total_records': len(combined_transformed),
|
|
589
|
+
'null_counts': combined_transformed.isnull().sum().to_dict(),
|
|
590
|
+
'duplicate_count': combined_transformed.duplicated().sum(),
|
|
591
|
+
'numeric_stats': combined_transformed.describe().to_dict()
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
# Save quality report
|
|
595
|
+
with open('/data/quality/quality_report.json', 'w') as f:
|
|
596
|
+
json.dump(quality_report, f)
|
|
597
|
+
|
|
598
|
+
subprocess.run([
|
|
599
|
+
"npx", "claude-flow@alpha", "hooks", "notify",
|
|
600
|
+
"--message", f"Data transformation completed. {len(combined_transformed)} records processed"
|
|
601
|
+
])
|
|
602
|
+
|
|
603
|
+
return quality_report
|
|
604
|
+
|
|
605
|
+
def load_data(**context):
|
|
606
|
+
"""Load processed data to data warehouse."""
|
|
607
|
+
# Load processed data
|
|
608
|
+
processed_data = pd.read_parquet('/data/processed/daily_processed.parquet')
|
|
609
|
+
|
|
610
|
+
# Load to data warehouse
|
|
611
|
+
processed_data.to_sql(
|
|
612
|
+
'customer_analytics',
|
|
613
|
+
warehouse_connection,
|
|
614
|
+
if_exists='append',
|
|
615
|
+
index=False,
|
|
616
|
+
method='multi'
|
|
617
|
+
)
|
|
618
|
+
|
|
619
|
+
# Update metadata table
|
|
620
|
+
metadata = {
|
|
621
|
+
'load_date': datetime.now(),
|
|
622
|
+
'record_count': len(processed_data),
|
|
623
|
+
'source': 'daily_pipeline',
|
|
624
|
+
'version': context['run_id']
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
pd.DataFrame([metadata]).to_sql(
|
|
628
|
+
'pipeline_metadata',
|
|
629
|
+
warehouse_connection,
|
|
630
|
+
if_exists='append',
|
|
631
|
+
index=False
|
|
632
|
+
)
|
|
633
|
+
|
|
634
|
+
subprocess.run([
|
|
635
|
+
"npx", "claude-flow@alpha", "hooks", "notify",
|
|
636
|
+
"--message", f"Data loaded to warehouse. {len(processed_data)} records"
|
|
637
|
+
])
|
|
638
|
+
|
|
639
|
+
# Define DAG
|
|
640
|
+
dag = DAG(
|
|
641
|
+
'customer_data_pipeline',
|
|
642
|
+
default_args=default_args,
|
|
643
|
+
description='Customer data ETL pipeline with claude-flow integration',
|
|
644
|
+
schedule_interval='@daily',
|
|
645
|
+
catchup=False,
|
|
646
|
+
max_active_runs=1
|
|
647
|
+
)
|
|
648
|
+
|
|
649
|
+
# Define tasks
|
|
650
|
+
extract_task = PythonOperator(
|
|
651
|
+
task_id='extract_data',
|
|
652
|
+
python_callable=extract_data,
|
|
653
|
+
dag=dag
|
|
654
|
+
)
|
|
655
|
+
|
|
656
|
+
transform_task = PythonOperator(
|
|
657
|
+
task_id='transform_data',
|
|
658
|
+
python_callable=transform_data,
|
|
659
|
+
dag=dag
|
|
660
|
+
)
|
|
661
|
+
|
|
662
|
+
load_task = PythonOperator(
|
|
663
|
+
task_id='load_data',
|
|
664
|
+
python_callable=load_data,
|
|
665
|
+
dag=dag
|
|
666
|
+
)
|
|
667
|
+
|
|
668
|
+
# Data quality validation
|
|
669
|
+
quality_check = BashOperator(
|
|
670
|
+
task_id='quality_check',
|
|
671
|
+
bash_command='python /scripts/data_quality_check.py',
|
|
672
|
+
dag=dag
|
|
673
|
+
)
|
|
674
|
+
|
|
675
|
+
# Send notification to claude-flow
|
|
676
|
+
notification_task = BashOperator(
|
|
677
|
+
task_id='notify_completion',
|
|
678
|
+
bash_command='npx claude-flow@alpha hooks notify --message "Daily pipeline completed successfully"',
|
|
679
|
+
dag=dag
|
|
680
|
+
)
|
|
681
|
+
|
|
682
|
+
# Set task dependencies
|
|
683
|
+
extract_task >> transform_task >> load_task >> quality_check >> notification_task
|
|
684
|
+
```
|
|
685
|
+
|
|
686
|
+
## 📈 Advanced Analytics Workflows
|
|
687
|
+
|
|
688
|
+
### Time Series Analysis
|
|
689
|
+
|
|
690
|
+
```python
|
|
691
|
+
# time_series_analysis.py - Advanced time series modeling
|
|
692
|
+
import pandas as pd
|
|
693
|
+
import numpy as np
|
|
694
|
+
import matplotlib.pyplot as plt
|
|
695
|
+
from statsmodels.tsa.arima.model import ARIMA
|
|
696
|
+
from statsmodels.tsa.seasonal import seasonal_decompose
|
|
697
|
+
from statsmodels.tsa.stattools import adfuller
|
|
698
|
+
from prophet import Prophet
|
|
699
|
+
import warnings
|
|
700
|
+
warnings.filterwarnings('ignore')
|
|
701
|
+
|
|
702
|
+
class TimeSeriesAnalyzer:
|
|
703
|
+
"""Advanced time series analysis with claude-flow integration."""
|
|
704
|
+
|
|
705
|
+
def __init__(self, data, date_column, value_column):
|
|
706
|
+
self.data = data.copy()
|
|
707
|
+
self.date_column = date_column
|
|
708
|
+
self.value_column = value_column
|
|
709
|
+
self.prepare_data()
|
|
710
|
+
|
|
711
|
+
def prepare_data(self):
|
|
712
|
+
"""Prepare time series data."""
|
|
713
|
+
# Convert date column
|
|
714
|
+
self.data[self.date_column] = pd.to_datetime(self.data[self.date_column])
|
|
715
|
+
self.data = self.data.sort_values(self.date_column)
|
|
716
|
+
self.data.set_index(self.date_column, inplace=True)
|
|
717
|
+
|
|
718
|
+
# Handle missing values
|
|
719
|
+
self.data[self.value_column] = self.data[self.value_column].interpolate()
|
|
720
|
+
|
|
721
|
+
save_to_memory("time_series_info", {
|
|
722
|
+
"start_date": str(self.data.index.min()),
|
|
723
|
+
"end_date": str(self.data.index.max()),
|
|
724
|
+
"frequency": str(self.data.index.freq),
|
|
725
|
+
"total_observations": len(self.data)
|
|
726
|
+
})
|
|
727
|
+
|
|
728
|
+
def stationarity_test(self):
|
|
729
|
+
"""Test for stationarity using Augmented Dickey-Fuller test."""
|
|
730
|
+
result = adfuller(self.data[self.value_column].dropna())
|
|
731
|
+
|
|
732
|
+
stationarity_result = {
|
|
733
|
+
'adf_statistic': result[0],
|
|
734
|
+
'p_value': result[1],
|
|
735
|
+
'critical_values': result[4],
|
|
736
|
+
'is_stationary': result[1] < 0.05
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
print(f"ADF Statistic: {result[0]}")
|
|
740
|
+
print(f"p-value: {result[1]}")
|
|
741
|
+
print("Critical Values:")
|
|
742
|
+
for key, value in result[4].items():
|
|
743
|
+
print(f"\t{key}: {value}")
|
|
744
|
+
|
|
745
|
+
if result[1] < 0.05:
|
|
746
|
+
print("Series is stationary")
|
|
747
|
+
else:
|
|
748
|
+
print("Series is not stationary")
|
|
749
|
+
|
|
750
|
+
save_to_memory("stationarity_test", stationarity_result)
|
|
751
|
+
return stationarity_result
|
|
752
|
+
|
|
753
|
+
def seasonal_decomposition(self):
|
|
754
|
+
"""Perform seasonal decomposition."""
|
|
755
|
+
decomposition = seasonal_decompose(
|
|
756
|
+
self.data[self.value_column],
|
|
757
|
+
model='additive',
|
|
758
|
+
period=12 # Adjust based on your data frequency
|
|
759
|
+
)
|
|
760
|
+
|
|
761
|
+
# Plot decomposition
|
|
762
|
+
fig, axes = plt.subplots(4, 1, figsize=(12, 10))
|
|
763
|
+
|
|
764
|
+
decomposition.observed.plot(ax=axes[0], title='Original')
|
|
765
|
+
decomposition.trend.plot(ax=axes[1], title='Trend')
|
|
766
|
+
decomposition.seasonal.plot(ax=axes[2], title='Seasonal')
|
|
767
|
+
decomposition.resid.plot(ax=axes[3], title='Residual')
|
|
768
|
+
|
|
769
|
+
plt.tight_layout()
|
|
770
|
+
plt.show()
|
|
771
|
+
|
|
772
|
+
# Save decomposition statistics
|
|
773
|
+
decomposition_stats = {
|
|
774
|
+
'trend_variance': float(decomposition.trend.var()),
|
|
775
|
+
'seasonal_variance': float(decomposition.seasonal.var()),
|
|
776
|
+
'residual_variance': float(decomposition.resid.var())
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
save_to_memory("seasonal_decomposition", decomposition_stats)
|
|
780
|
+
notify_claude_flow("Seasonal decomposition completed")
|
|
781
|
+
|
|
782
|
+
return decomposition
|
|
783
|
+
|
|
784
|
+
def arima_modeling(self, order=(1, 1, 1)):
|
|
785
|
+
"""Build ARIMA model."""
|
|
786
|
+
model = ARIMA(self.data[self.value_column], order=order)
|
|
787
|
+
fitted_model = model.fit()
|
|
788
|
+
|
|
789
|
+
# Model summary
|
|
790
|
+
print(fitted_model.summary())
|
|
791
|
+
|
|
792
|
+
# Residual analysis
|
|
793
|
+
residuals = fitted_model.resid
|
|
794
|
+
|
|
795
|
+
fig, axes = plt.subplots(2, 2, figsize=(12, 8))
|
|
796
|
+
|
|
797
|
+
# Residuals plot
|
|
798
|
+
residuals.plot(ax=axes[0, 0], title='Residuals')
|
|
799
|
+
|
|
800
|
+
# Q-Q plot
|
|
801
|
+
from scipy import stats
|
|
802
|
+
stats.probplot(residuals, dist="norm", plot=axes[0, 1])
|
|
803
|
+
axes[0, 1].set_title('Q-Q Plot')
|
|
804
|
+
|
|
805
|
+
# Histogram of residuals
|
|
806
|
+
residuals.hist(ax=axes[1, 0], bins=30)
|
|
807
|
+
axes[1, 0].set_title('Residuals Histogram')
|
|
808
|
+
|
|
809
|
+
# ACF of residuals
|
|
810
|
+
from statsmodels.graphics.tsaplots import plot_acf
|
|
811
|
+
plot_acf(residuals, ax=axes[1, 1], lags=20)
|
|
812
|
+
axes[1, 1].set_title('ACF of Residuals')
|
|
813
|
+
|
|
814
|
+
plt.tight_layout()
|
|
815
|
+
plt.show()
|
|
816
|
+
|
|
817
|
+
# Model metrics
|
|
818
|
+
aic = fitted_model.aic
|
|
819
|
+
bic = fitted_model.bic
|
|
820
|
+
|
|
821
|
+
model_metrics = {
|
|
822
|
+
'aic': aic,
|
|
823
|
+
'bic': bic,
|
|
824
|
+
'order': order,
|
|
825
|
+
'log_likelihood': fitted_model.llf
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
save_to_memory("arima_model", model_metrics)
|
|
829
|
+
notify_claude_flow(f"ARIMA model fitted with AIC: {aic:.2f}")
|
|
830
|
+
|
|
831
|
+
return fitted_model
|
|
832
|
+
|
|
833
|
+
def prophet_modeling(self):
|
|
834
|
+
"""Build Prophet model for forecasting."""
|
|
835
|
+
# Prepare data for Prophet
|
|
836
|
+
prophet_data = self.data.reset_index()
|
|
837
|
+
prophet_data = prophet_data.rename(columns={
|
|
838
|
+
self.date_column: 'ds',
|
|
839
|
+
self.value_column: 'y'
|
|
840
|
+
})
|
|
841
|
+
|
|
842
|
+
# Initialize and fit Prophet model
|
|
843
|
+
model = Prophet(
|
|
844
|
+
yearly_seasonality=True,
|
|
845
|
+
weekly_seasonality=False,
|
|
846
|
+
daily_seasonality=False,
|
|
847
|
+
seasonality_mode='additive'
|
|
848
|
+
)
|
|
849
|
+
|
|
850
|
+
model.fit(prophet_data)
|
|
851
|
+
|
|
852
|
+
# Make future dataframe for forecasting
|
|
853
|
+
future = model.make_future_dataframe(periods=30, freq='D')
|
|
854
|
+
forecast = model.predict(future)
|
|
855
|
+
|
|
856
|
+
# Plot forecast
|
|
857
|
+
fig = model.plot(forecast)
|
|
858
|
+
plt.title('Prophet Forecast')
|
|
859
|
+
plt.show()
|
|
860
|
+
|
|
861
|
+
# Plot components
|
|
862
|
+
fig = model.plot_components(forecast)
|
|
863
|
+
plt.show()
|
|
864
|
+
|
|
865
|
+
# Model performance metrics
|
|
866
|
+
from sklearn.metrics import mean_absolute_error, mean_squared_error
|
|
867
|
+
|
|
868
|
+
# Get predictions for historical data
|
|
869
|
+
historical_forecast = forecast[forecast['ds'].isin(prophet_data['ds'])]
|
|
870
|
+
mae = mean_absolute_error(prophet_data['y'], historical_forecast['yhat'])
|
|
871
|
+
rmse = np.sqrt(mean_squared_error(prophet_data['y'], historical_forecast['yhat']))
|
|
872
|
+
|
|
873
|
+
prophet_metrics = {
|
|
874
|
+
'mae': mae,
|
|
875
|
+
'rmse': rmse,
|
|
876
|
+
'forecast_periods': 30
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
save_to_memory("prophet_model", prophet_metrics)
|
|
880
|
+
notify_claude_flow(f"Prophet model fitted with MAE: {mae:.2f}")
|
|
881
|
+
|
|
882
|
+
return model, forecast
|
|
883
|
+
|
|
884
|
+
# Example usage
|
|
885
|
+
# ts_analyzer = TimeSeriesAnalyzer(df, 'date', 'sales')
|
|
886
|
+
# ts_analyzer.stationarity_test()
|
|
887
|
+
# ts_analyzer.seasonal_decomposition()
|
|
888
|
+
# arima_model = ts_analyzer.arima_modeling()
|
|
889
|
+
# prophet_model, forecast = ts_analyzer.prophet_modeling()
|
|
890
|
+
```
|
|
891
|
+
|
|
892
|
+
## 📊 Visualization and Reporting
|
|
893
|
+
|
|
894
|
+
### Interactive Dashboard Creation
|
|
895
|
+
|
|
896
|
+
```python
|
|
897
|
+
# dashboard.py - Interactive data science dashboard
|
|
898
|
+
import streamlit as st
|
|
899
|
+
import pandas as pd
|
|
900
|
+
import numpy as np
|
|
901
|
+
import plotly.express as px
|
|
902
|
+
import plotly.graph_objects as go
|
|
903
|
+
from plotly.subplots import make_subplots
|
|
904
|
+
import seaborn as sns
|
|
905
|
+
import matplotlib.pyplot as plt
|
|
906
|
+
|
|
907
|
+
class DataScienceDashboard:
|
|
908
|
+
"""Interactive dashboard for data science insights."""
|
|
909
|
+
|
|
910
|
+
def __init__(self):
|
|
911
|
+
st.set_page_config(
|
|
912
|
+
page_title="Claude-Flow Data Science Dashboard",
|
|
913
|
+
page_icon="📊",
|
|
914
|
+
layout="wide"
|
|
915
|
+
)
|
|
916
|
+
|
|
917
|
+
def load_data(self):
|
|
918
|
+
"""Load and cache data."""
|
|
919
|
+
@st.cache_data
|
|
920
|
+
def get_data():
|
|
921
|
+
# Load your dataset here
|
|
922
|
+
return pd.read_csv('data/analysis_data.csv')
|
|
923
|
+
|
|
924
|
+
return get_data()
|
|
925
|
+
|
|
926
|
+
def sidebar_filters(self, df):
|
|
927
|
+
"""Create sidebar filters."""
|
|
928
|
+
st.sidebar.header("Filters")
|
|
929
|
+
|
|
930
|
+
# Date range filter
|
|
931
|
+
if 'date' in df.columns:
|
|
932
|
+
date_range = st.sidebar.date_input(
|
|
933
|
+
"Select Date Range",
|
|
934
|
+
value=(df['date'].min(), df['date'].max()),
|
|
935
|
+
min_value=df['date'].min(),
|
|
936
|
+
max_value=df['date'].max()
|
|
937
|
+
)
|
|
938
|
+
|
|
939
|
+
# Categorical filters
|
|
940
|
+
categorical_columns = df.select_dtypes(include=['object']).columns
|
|
941
|
+
filters = {}
|
|
942
|
+
|
|
943
|
+
for col in categorical_columns:
|
|
944
|
+
unique_values = df[col].unique()
|
|
945
|
+
selected_values = st.sidebar.multiselect(
|
|
946
|
+
f"Select {col}",
|
|
947
|
+
options=unique_values,
|
|
948
|
+
default=unique_values
|
|
949
|
+
)
|
|
950
|
+
filters[col] = selected_values
|
|
951
|
+
|
|
952
|
+
return filters
|
|
953
|
+
|
|
954
|
+
def overview_metrics(self, df):
|
|
955
|
+
"""Display overview metrics."""
|
|
956
|
+
st.header("📈 Overview Metrics")
|
|
957
|
+
|
|
958
|
+
col1, col2, col3, col4 = st.columns(4)
|
|
959
|
+
|
|
960
|
+
with col1:
|
|
961
|
+
st.metric(
|
|
962
|
+
"Total Records",
|
|
963
|
+
f"{len(df):,}",
|
|
964
|
+
delta=f"{len(df) - 1000:,}" if len(df) > 1000 else None
|
|
965
|
+
)
|
|
966
|
+
|
|
967
|
+
with col2:
|
|
968
|
+
numeric_cols = df.select_dtypes(include=[np.number]).columns
|
|
969
|
+
if len(numeric_cols) > 0:
|
|
970
|
+
avg_value = df[numeric_cols[0]].mean()
|
|
971
|
+
st.metric(
|
|
972
|
+
f"Average {numeric_cols[0]}",
|
|
973
|
+
f"{avg_value:.2f}",
|
|
974
|
+
delta=f"{avg_value - df[numeric_cols[0]].median():.2f}"
|
|
975
|
+
)
|
|
976
|
+
|
|
977
|
+
with col3:
|
|
978
|
+
if 'amount' in df.columns:
|
|
979
|
+
total_amount = df['amount'].sum()
|
|
980
|
+
st.metric(
|
|
981
|
+
"Total Amount",
|
|
982
|
+
f"${total_amount:,.2f}",
|
|
983
|
+
delta=f"${total_amount * 0.1:,.2f}"
|
|
984
|
+
)
|
|
985
|
+
|
|
986
|
+
with col4:
|
|
987
|
+
unique_customers = df['customer_id'].nunique() if 'customer_id' in df.columns else 0
|
|
988
|
+
st.metric(
|
|
989
|
+
"Unique Customers",
|
|
990
|
+
f"{unique_customers:,}",
|
|
991
|
+
delta=f"{int(unique_customers * 0.05):,}"
|
|
992
|
+
)
|
|
993
|
+
|
|
994
|
+
def data_visualization(self, df):
|
|
995
|
+
"""Create data visualizations."""
|
|
996
|
+
st.header("📊 Data Visualizations")
|
|
997
|
+
|
|
998
|
+
# Time series plot
|
|
999
|
+
if 'date' in df.columns and 'amount' in df.columns:
|
|
1000
|
+
st.subheader("Time Series Analysis")
|
|
1001
|
+
|
|
1002
|
+
daily_data = df.groupby('date')['amount'].sum().reset_index()
|
|
1003
|
+
fig = px.line(
|
|
1004
|
+
daily_data,
|
|
1005
|
+
x='date',
|
|
1006
|
+
y='amount',
|
|
1007
|
+
title="Daily Amount Trend"
|
|
1008
|
+
)
|
|
1009
|
+
st.plotly_chart(fig, use_container_width=True)
|
|
1010
|
+
|
|
1011
|
+
# Distribution plots
|
|
1012
|
+
st.subheader("Distribution Analysis")
|
|
1013
|
+
|
|
1014
|
+
col1, col2 = st.columns(2)
|
|
1015
|
+
|
|
1016
|
+
with col1:
|
|
1017
|
+
numeric_columns = df.select_dtypes(include=[np.number]).columns
|
|
1018
|
+
if len(numeric_columns) > 0:
|
|
1019
|
+
selected_column = st.selectbox("Select column for distribution", numeric_columns)
|
|
1020
|
+
fig = px.histogram(
|
|
1021
|
+
df,
|
|
1022
|
+
x=selected_column,
|
|
1023
|
+
title=f"Distribution of {selected_column}"
|
|
1024
|
+
)
|
|
1025
|
+
st.plotly_chart(fig, use_container_width=True)
|
|
1026
|
+
|
|
1027
|
+
with col2:
|
|
1028
|
+
categorical_columns = df.select_dtypes(include=['object']).columns
|
|
1029
|
+
if len(categorical_columns) > 0:
|
|
1030
|
+
selected_cat_column = st.selectbox("Select categorical column", categorical_columns)
|
|
1031
|
+
value_counts = df[selected_cat_column].value_counts()
|
|
1032
|
+
fig = px.pie(
|
|
1033
|
+
values=value_counts.values,
|
|
1034
|
+
names=value_counts.index,
|
|
1035
|
+
title=f"Distribution of {selected_cat_column}"
|
|
1036
|
+
)
|
|
1037
|
+
st.plotly_chart(fig, use_container_width=True)
|
|
1038
|
+
|
|
1039
|
+
# Correlation heatmap
|
|
1040
|
+
st.subheader("Correlation Analysis")
|
|
1041
|
+
numeric_df = df.select_dtypes(include=[np.number])
|
|
1042
|
+
if len(numeric_df.columns) > 1:
|
|
1043
|
+
correlation_matrix = numeric_df.corr()
|
|
1044
|
+
fig = px.imshow(
|
|
1045
|
+
correlation_matrix,
|
|
1046
|
+
title="Correlation Heatmap",
|
|
1047
|
+
color_continuous_scale="RdBu"
|
|
1048
|
+
)
|
|
1049
|
+
st.plotly_chart(fig, use_container_width=True)
|
|
1050
|
+
|
|
1051
|
+
def machine_learning_insights(self, df):
|
|
1052
|
+
"""Display ML model insights."""
|
|
1053
|
+
st.header("🤖 Machine Learning Insights")
|
|
1054
|
+
|
|
1055
|
+
# Feature importance (if available)
|
|
1056
|
+
if 'feature_importance.csv' in os.listdir():
|
|
1057
|
+
feature_importance = pd.read_csv('feature_importance.csv')
|
|
1058
|
+
|
|
1059
|
+
fig = px.bar(
|
|
1060
|
+
feature_importance.head(10),
|
|
1061
|
+
x='importance',
|
|
1062
|
+
y='feature',
|
|
1063
|
+
orientation='h',
|
|
1064
|
+
title="Top 10 Feature Importance"
|
|
1065
|
+
)
|
|
1066
|
+
st.plotly_chart(fig, use_container_width=True)
|
|
1067
|
+
|
|
1068
|
+
# Model performance metrics
|
|
1069
|
+
col1, col2 = st.columns(2)
|
|
1070
|
+
|
|
1071
|
+
with col1:
|
|
1072
|
+
st.subheader("Model Performance")
|
|
1073
|
+
performance_data = {
|
|
1074
|
+
'Model': ['Random Forest', 'Gradient Boosting', 'Logistic Regression'],
|
|
1075
|
+
'AUC Score': [0.85, 0.83, 0.78],
|
|
1076
|
+
'Accuracy': [0.82, 0.80, 0.75]
|
|
1077
|
+
}
|
|
1078
|
+
performance_df = pd.DataFrame(performance_data)
|
|
1079
|
+
|
|
1080
|
+
fig = px.bar(
|
|
1081
|
+
performance_df,
|
|
1082
|
+
x='Model',
|
|
1083
|
+
y='AUC Score',
|
|
1084
|
+
title="Model Comparison - AUC Scores"
|
|
1085
|
+
)
|
|
1086
|
+
st.plotly_chart(fig, use_container_width=True)
|
|
1087
|
+
|
|
1088
|
+
with col2:
|
|
1089
|
+
st.subheader("Prediction Distribution")
|
|
1090
|
+
# Simulated prediction data
|
|
1091
|
+
predictions = np.random.beta(2, 5, 1000)
|
|
1092
|
+
fig = px.histogram(
|
|
1093
|
+
x=predictions,
|
|
1094
|
+
title="Prediction Score Distribution",
|
|
1095
|
+
nbins=30
|
|
1096
|
+
)
|
|
1097
|
+
st.plotly_chart(fig, use_container_width=True)
|
|
1098
|
+
|
|
1099
|
+
def run_dashboard(self):
|
|
1100
|
+
"""Run the complete dashboard."""
|
|
1101
|
+
st.title("📊 Claude-Flow Data Science Dashboard")
|
|
1102
|
+
st.markdown("---")
|
|
1103
|
+
|
|
1104
|
+
# Load data
|
|
1105
|
+
df = self.load_data()
|
|
1106
|
+
|
|
1107
|
+
# Apply filters
|
|
1108
|
+
filters = self.sidebar_filters(df)
|
|
1109
|
+
|
|
1110
|
+
# Filter dataframe based on selections
|
|
1111
|
+
filtered_df = df.copy()
|
|
1112
|
+
for col, values in filters.items():
|
|
1113
|
+
if values: # Only apply filter if values are selected
|
|
1114
|
+
filtered_df = filtered_df[filtered_df[col].isin(values)]
|
|
1115
|
+
|
|
1116
|
+
# Display dashboard sections
|
|
1117
|
+
self.overview_metrics(filtered_df)
|
|
1118
|
+
st.markdown("---")
|
|
1119
|
+
|
|
1120
|
+
self.data_visualization(filtered_df)
|
|
1121
|
+
st.markdown("---")
|
|
1122
|
+
|
|
1123
|
+
self.machine_learning_insights(filtered_df)
|
|
1124
|
+
|
|
1125
|
+
# Data download
|
|
1126
|
+
st.sidebar.markdown("---")
|
|
1127
|
+
st.sidebar.subheader("Download Data")
|
|
1128
|
+
csv = filtered_df.to_csv(index=False)
|
|
1129
|
+
st.sidebar.download_button(
|
|
1130
|
+
label="Download Filtered Data as CSV",
|
|
1131
|
+
data=csv,
|
|
1132
|
+
file_name="filtered_data.csv",
|
|
1133
|
+
mime="text/csv"
|
|
1134
|
+
)
|
|
1135
|
+
|
|
1136
|
+
# Run dashboard
|
|
1137
|
+
if __name__ == "__main__":
|
|
1138
|
+
dashboard = DataScienceDashboard()
|
|
1139
|
+
dashboard.run_dashboard()
|
|
1140
|
+
```
|
|
1141
|
+
|
|
1142
|
+
## 🔗 MLOps Integration
|
|
1143
|
+
|
|
1144
|
+
### Model Deployment Pipeline
|
|
1145
|
+
|
|
1146
|
+
```python
|
|
1147
|
+
# mlops_pipeline.py - MLOps deployment with claude-flow
|
|
1148
|
+
import mlflow
|
|
1149
|
+
import mlflow.sklearn
|
|
1150
|
+
from mlflow.tracking import MlflowClient
|
|
1151
|
+
import joblib
|
|
1152
|
+
import pandas as pd
|
|
1153
|
+
import numpy as np
|
|
1154
|
+
from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score
|
|
1155
|
+
import requests
|
|
1156
|
+
import json
|
|
1157
|
+
|
|
1158
|
+
class MLOpsManager:
|
|
1159
|
+
"""MLOps pipeline management with claude-flow integration."""
|
|
1160
|
+
|
|
1161
|
+
def __init__(self, experiment_name="claude-flow-ml"):
|
|
1162
|
+
mlflow.set_experiment(experiment_name)
|
|
1163
|
+
self.client = MlflowClient()
|
|
1164
|
+
self.experiment_name = experiment_name
|
|
1165
|
+
|
|
1166
|
+
def register_model(self, model, model_name, run_id=None):
|
|
1167
|
+
"""Register model in MLflow model registry."""
|
|
1168
|
+
model_uri = f"runs:/{run_id}/model" if run_id else None
|
|
1169
|
+
|
|
1170
|
+
# Register model
|
|
1171
|
+
result = mlflow.register_model(
|
|
1172
|
+
model_uri=model_uri,
|
|
1173
|
+
name=model_name,
|
|
1174
|
+
tags={"created_by": "claude-flow", "framework": "sklearn"}
|
|
1175
|
+
)
|
|
1176
|
+
|
|
1177
|
+
notify_claude_flow(f"Model {model_name} registered with version {result.version}")
|
|
1178
|
+
return result
|
|
1179
|
+
|
|
1180
|
+
def deploy_model(self, model_name, version, stage="Staging"):
|
|
1181
|
+
"""Deploy model to specified stage."""
|
|
1182
|
+
# Transition model to stage
|
|
1183
|
+
self.client.transition_model_version_stage(
|
|
1184
|
+
name=model_name,
|
|
1185
|
+
version=version,
|
|
1186
|
+
stage=stage
|
|
1187
|
+
)
|
|
1188
|
+
|
|
1189
|
+
# Create deployment script
|
|
1190
|
+
deployment_script = f"""
|
|
1191
|
+
import mlflow.sklearn
|
|
1192
|
+
import pandas as pd
|
|
1193
|
+
from flask import Flask, request, jsonify
|
|
1194
|
+
|
|
1195
|
+
app = Flask(__name__)
|
|
1196
|
+
|
|
1197
|
+
# Load model
|
|
1198
|
+
model = mlflow.sklearn.load_model('models:/{model_name}/{stage}')
|
|
1199
|
+
|
|
1200
|
+
@app.route('/predict', methods=['POST'])
|
|
1201
|
+
def predict():
|
|
1202
|
+
try:
|
|
1203
|
+
data = request.get_json()
|
|
1204
|
+
df = pd.DataFrame(data)
|
|
1205
|
+
predictions = model.predict(df)
|
|
1206
|
+
return jsonify({{'predictions': predictions.tolist()}})
|
|
1207
|
+
except Exception as e:
|
|
1208
|
+
return jsonify({{'error': str(e)}}), 400
|
|
1209
|
+
|
|
1210
|
+
@app.route('/health', methods=['GET'])
|
|
1211
|
+
def health():
|
|
1212
|
+
return jsonify({{'status': 'healthy', 'model': '{model_name}', 'version': '{version}'}})
|
|
1213
|
+
|
|
1214
|
+
if __name__ == '__main__':
|
|
1215
|
+
app.run(host='0.0.0.0', port=5000)
|
|
1216
|
+
"""
|
|
1217
|
+
|
|
1218
|
+
with open(f'deployment_{model_name}_{version}.py', 'w') as f:
|
|
1219
|
+
f.write(deployment_script)
|
|
1220
|
+
|
|
1221
|
+
notify_claude_flow(f"Model {model_name} v{version} deployed to {stage}")
|
|
1222
|
+
|
|
1223
|
+
def monitor_model_performance(self, model_name, test_data, true_labels):
|
|
1224
|
+
"""Monitor model performance and detect drift."""
|
|
1225
|
+
# Load production model
|
|
1226
|
+
model = mlflow.sklearn.load_model(f"models:/{model_name}/Production")
|
|
1227
|
+
|
|
1228
|
+
# Generate predictions
|
|
1229
|
+
predictions = model.predict(test_data)
|
|
1230
|
+
|
|
1231
|
+
# Calculate metrics
|
|
1232
|
+
metrics = {
|
|
1233
|
+
'accuracy': accuracy_score(true_labels, predictions),
|
|
1234
|
+
'precision': precision_score(true_labels, predictions, average='weighted'),
|
|
1235
|
+
'recall': recall_score(true_labels, predictions, average='weighted'),
|
|
1236
|
+
'f1': f1_score(true_labels, predictions, average='weighted')
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
# Log monitoring metrics
|
|
1240
|
+
with mlflow.start_run():
|
|
1241
|
+
for metric_name, metric_value in metrics.items():
|
|
1242
|
+
mlflow.log_metric(f"monitoring_{metric_name}", metric_value)
|
|
1243
|
+
|
|
1244
|
+
# Check for performance degradation
|
|
1245
|
+
baseline_accuracy = 0.85 # Set your baseline
|
|
1246
|
+
if metrics['accuracy'] < baseline_accuracy:
|
|
1247
|
+
alert_message = f"Model performance degradation detected! Accuracy: {metrics['accuracy']:.3f}"
|
|
1248
|
+
notify_claude_flow(alert_message)
|
|
1249
|
+
|
|
1250
|
+
# Trigger retraining workflow
|
|
1251
|
+
self.trigger_retraining(model_name)
|
|
1252
|
+
|
|
1253
|
+
save_to_memory("model_monitoring", metrics)
|
|
1254
|
+
return metrics
|
|
1255
|
+
|
|
1256
|
+
def trigger_retraining(self, model_name):
|
|
1257
|
+
"""Trigger model retraining workflow."""
|
|
1258
|
+
# This could trigger an Airflow DAG or other workflow
|
|
1259
|
+
retraining_config = {
|
|
1260
|
+
'model_name': model_name,
|
|
1261
|
+
'trigger_reason': 'performance_degradation',
|
|
1262
|
+
'timestamp': pd.Timestamp.now().isoformat()
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
# Save retraining request
|
|
1266
|
+
save_to_memory("retraining_trigger", retraining_config)
|
|
1267
|
+
|
|
1268
|
+
# Notify claude-flow to initiate retraining
|
|
1269
|
+
notify_claude_flow(f"Retraining triggered for model {model_name}")
|
|
1270
|
+
|
|
1271
|
+
# Model serving with FastAPI
|
|
1272
|
+
from fastapi import FastAPI, HTTPException
|
|
1273
|
+
from pydantic import BaseModel
|
|
1274
|
+
from typing import List
|
|
1275
|
+
|
|
1276
|
+
class PredictionRequest(BaseModel):
|
|
1277
|
+
features: List[List[float]]
|
|
1278
|
+
|
|
1279
|
+
class PredictionResponse(BaseModel):
|
|
1280
|
+
predictions: List[float]
|
|
1281
|
+
model_version: str
|
|
1282
|
+
|
|
1283
|
+
app = FastAPI(title="Claude-Flow ML Model API")
|
|
1284
|
+
|
|
1285
|
+
# Load model at startup
|
|
1286
|
+
@app.on_event("startup")
|
|
1287
|
+
async def load_model():
|
|
1288
|
+
global model, model_version
|
|
1289
|
+
model = mlflow.sklearn.load_model("models:/{model_name}/Production")
|
|
1290
|
+
model_version = "1.0.0" # Get from MLflow
|
|
1291
|
+
|
|
1292
|
+
@app.post("/predict", response_model=PredictionResponse)
|
|
1293
|
+
async def predict(request: PredictionRequest):
|
|
1294
|
+
try:
|
|
1295
|
+
predictions = model.predict(request.features)
|
|
1296
|
+
return PredictionResponse(
|
|
1297
|
+
predictions=predictions.tolist(),
|
|
1298
|
+
model_version=model_version
|
|
1299
|
+
)
|
|
1300
|
+
except Exception as e:
|
|
1301
|
+
raise HTTPException(status_code=400, detail=str(e))
|
|
1302
|
+
|
|
1303
|
+
@app.get("/health")
|
|
1304
|
+
async def health_check():
|
|
1305
|
+
return {"status": "healthy", "model_version": model_version}
|
|
1306
|
+
```
|
|
1307
|
+
|
|
1308
|
+
## 📚 Next Steps
|
|
1309
|
+
|
|
1310
|
+
1. **[Testing Strategies](../testing/README.md)** - Data science testing approaches
|
|
1311
|
+
2. **[Examples](../examples/README.md)** - Complete data science projects
|
|
1312
|
+
3. **[Web Development Integration](../web-development/README.md)** - ML models in web apps
|
|
1313
|
+
4. **[Performance Optimization](../examples/performance.md)** - Scaling data science workflows
|
|
1314
|
+
|
|
1315
|
+
---
|
|
1316
|
+
|
|
1317
|
+
**Ready to build data science pipelines?** Start with [Jupyter setup](./jupyter-setup.md) or explore [ML examples](../examples/machine-learning.md).
|