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,1137 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Neural Domain Mapper - GNN-style Domain Relationship Mapping
|
|
3
|
+
*
|
|
4
|
+
* Implements Graph Neural Network (GNN) architecture for mapping and analyzing
|
|
5
|
+
* domain relationships, calculating cohesion scores, identifying cross-domain
|
|
6
|
+
* dependencies, and providing predictive boundary optimization.
|
|
7
|
+
*
|
|
8
|
+
* This class enables advanced domain analysis and relationship mapping for
|
|
9
|
+
* the Claude Flow orchestration system, supporting dynamic domain boundaries
|
|
10
|
+
* and intelligent task routing based on learned patterns.
|
|
11
|
+
*
|
|
12
|
+
* @author Claude Flow Neural Team
|
|
13
|
+
* @version 2.0.0
|
|
14
|
+
* @since 2024-12-01
|
|
15
|
+
*/ import { EventEmitter } from 'events';
|
|
16
|
+
// ===== Main Class =====
|
|
17
|
+
/**
|
|
18
|
+
* Neural Domain Mapper - Advanced GNN-based domain relationship analysis
|
|
19
|
+
*
|
|
20
|
+
* This class implements a sophisticated Graph Neural Network architecture
|
|
21
|
+
* for analyzing and optimizing domain relationships in complex systems.
|
|
22
|
+
* It provides capabilities for:
|
|
23
|
+
*
|
|
24
|
+
* 1. Converting domain structures to graph representations
|
|
25
|
+
* 2. Calculating domain cohesion scores using multiple metrics
|
|
26
|
+
* 3. Identifying and analyzing cross-domain dependencies
|
|
27
|
+
* 4. Providing predictive boundary optimization suggestions
|
|
28
|
+
* 5. Training on domain relationship patterns
|
|
29
|
+
* 6. Making inferences about optimal domain organization
|
|
30
|
+
*/ export class NeuralDomainMapper extends EventEmitter {
|
|
31
|
+
graph;
|
|
32
|
+
layers;
|
|
33
|
+
trainingConfig;
|
|
34
|
+
trainingState;
|
|
35
|
+
patternStore;
|
|
36
|
+
isTraining = false;
|
|
37
|
+
modelVersion = '1.0.0';
|
|
38
|
+
weights = new Map();
|
|
39
|
+
biases = new Map();
|
|
40
|
+
/**
|
|
41
|
+
* Initialize the Neural Domain Mapper
|
|
42
|
+
*
|
|
43
|
+
* @param config Training configuration
|
|
44
|
+
* @param patternStore Pattern storage system
|
|
45
|
+
*/ constructor(config = {}, patternStore){
|
|
46
|
+
super();
|
|
47
|
+
this.trainingConfig = {
|
|
48
|
+
learningRate: 0.001,
|
|
49
|
+
batchSize: 32,
|
|
50
|
+
epochs: 100,
|
|
51
|
+
optimizer: 'adam',
|
|
52
|
+
lossFunction: 'mse',
|
|
53
|
+
regularization: {
|
|
54
|
+
l1: 0.0001,
|
|
55
|
+
l2: 0.0001,
|
|
56
|
+
dropout: 0.1
|
|
57
|
+
},
|
|
58
|
+
earlyStoping: {
|
|
59
|
+
enabled: true,
|
|
60
|
+
patience: 10,
|
|
61
|
+
minDelta: 0.001
|
|
62
|
+
},
|
|
63
|
+
validationSplit: 0.2,
|
|
64
|
+
...config
|
|
65
|
+
};
|
|
66
|
+
this.graph = {
|
|
67
|
+
nodes: new Map(),
|
|
68
|
+
edges: new Map(),
|
|
69
|
+
metadata: {
|
|
70
|
+
created: Date.now(),
|
|
71
|
+
lastTraining: 0,
|
|
72
|
+
version: this.modelVersion,
|
|
73
|
+
cohesionScore: 0,
|
|
74
|
+
totalNodes: 0,
|
|
75
|
+
totalEdges: 0
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
this.layers = [
|
|
79
|
+
{
|
|
80
|
+
type: 'gcn',
|
|
81
|
+
inputDim: 64,
|
|
82
|
+
outputDim: 128,
|
|
83
|
+
dropout: 0.1,
|
|
84
|
+
activation: 'relu',
|
|
85
|
+
normalization: 'batch'
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
type: 'gat',
|
|
89
|
+
inputDim: 128,
|
|
90
|
+
outputDim: 64,
|
|
91
|
+
numHeads: 8,
|
|
92
|
+
dropout: 0.1,
|
|
93
|
+
activation: 'relu',
|
|
94
|
+
normalization: 'layer'
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
type: 'gcn',
|
|
98
|
+
inputDim: 64,
|
|
99
|
+
outputDim: 32,
|
|
100
|
+
dropout: 0.05,
|
|
101
|
+
activation: 'tanh'
|
|
102
|
+
}
|
|
103
|
+
];
|
|
104
|
+
this.trainingState = {
|
|
105
|
+
epoch: 0,
|
|
106
|
+
loss: Infinity,
|
|
107
|
+
accuracy: 0,
|
|
108
|
+
learningRate: this.trainingConfig.learningRate,
|
|
109
|
+
optimizer: this.trainingConfig.optimizer,
|
|
110
|
+
checkpoints: []
|
|
111
|
+
};
|
|
112
|
+
this.patternStore = patternStore || this.createDefaultPatternStore();
|
|
113
|
+
this.initializeWeights();
|
|
114
|
+
}
|
|
115
|
+
// ===== Domain to Graph Conversion =====
|
|
116
|
+
/**
|
|
117
|
+
* Convert domain structure to graph format
|
|
118
|
+
*
|
|
119
|
+
* @param domains Domain definitions
|
|
120
|
+
* @param relationships Domain relationships
|
|
121
|
+
* @returns Constructed domain graph
|
|
122
|
+
*/ convertToGraph(domains, relationships) {
|
|
123
|
+
// Clear existing graph
|
|
124
|
+
this.graph.nodes.clear();
|
|
125
|
+
this.graph.edges.clear();
|
|
126
|
+
// Convert domains to nodes
|
|
127
|
+
for (const domain of domains){
|
|
128
|
+
const node = {
|
|
129
|
+
id: domain.id,
|
|
130
|
+
name: domain.name,
|
|
131
|
+
type: domain.type,
|
|
132
|
+
features: this.extractDomainFeatures(domain),
|
|
133
|
+
metadata: {
|
|
134
|
+
size: domain.metadata?.size || 1,
|
|
135
|
+
complexity: domain.metadata?.complexity || 0.5,
|
|
136
|
+
stability: domain.metadata?.stability || 0.8,
|
|
137
|
+
dependencies: domain.metadata?.dependencies || [],
|
|
138
|
+
lastUpdated: domain.metadata?.lastUpdated || Date.now(),
|
|
139
|
+
version: domain.metadata?.version || '1.0.0'
|
|
140
|
+
},
|
|
141
|
+
activation: 0,
|
|
142
|
+
embedding: this.initializeNodeEmbedding(domain.id)
|
|
143
|
+
};
|
|
144
|
+
this.graph.nodes.set(domain.id, node);
|
|
145
|
+
}
|
|
146
|
+
// Convert relationships to edges
|
|
147
|
+
for (const rel of relationships){
|
|
148
|
+
const edgeId = `${rel.source}->${rel.target}`;
|
|
149
|
+
const edge = {
|
|
150
|
+
source: rel.source,
|
|
151
|
+
target: rel.target,
|
|
152
|
+
weight: rel.weight || 1.0,
|
|
153
|
+
type: rel.type,
|
|
154
|
+
features: this.extractEdgeFeatures(rel),
|
|
155
|
+
metadata: {
|
|
156
|
+
frequency: rel.metadata?.frequency || 1,
|
|
157
|
+
latency: rel.metadata?.latency || 100,
|
|
158
|
+
reliability: rel.metadata?.reliability || 0.99,
|
|
159
|
+
bandwidth: rel.metadata?.bandwidth || 1000,
|
|
160
|
+
direction: rel.metadata?.direction || 'unidirectional'
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
this.graph.edges.set(edgeId, edge);
|
|
164
|
+
}
|
|
165
|
+
// Update graph metadata
|
|
166
|
+
this.graph.metadata.totalNodes = this.graph.nodes.size;
|
|
167
|
+
this.graph.metadata.totalEdges = this.graph.edges.size;
|
|
168
|
+
this.graph.metadata.lastTraining = 0; // Reset training timestamp
|
|
169
|
+
this.emit('graph-updated', this.graph);
|
|
170
|
+
return this.graph;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Extract numerical features from domain definition
|
|
174
|
+
*/ extractDomainFeatures(domain) {
|
|
175
|
+
const features = [];
|
|
176
|
+
// Type encoding (one-hot)
|
|
177
|
+
const types = [
|
|
178
|
+
'functional',
|
|
179
|
+
'technical',
|
|
180
|
+
'business',
|
|
181
|
+
'integration',
|
|
182
|
+
'data',
|
|
183
|
+
'ui',
|
|
184
|
+
'api'
|
|
185
|
+
];
|
|
186
|
+
const typeEncoding = types.map((t)=>t === domain.type ? 1 : 0);
|
|
187
|
+
features.push(...typeEncoding);
|
|
188
|
+
// Metadata features
|
|
189
|
+
features.push(domain.metadata?.size || 1, domain.metadata?.complexity || 0.5, domain.metadata?.stability || 0.8, (domain.metadata?.dependencies?.length || 0) / 10, Math.min((Date.now() - (domain.metadata?.lastUpdated || Date.now())) / (1000 * 60 * 60 * 24), 1));
|
|
190
|
+
// Pad to standard feature size
|
|
191
|
+
while(features.length < 64){
|
|
192
|
+
features.push(0);
|
|
193
|
+
}
|
|
194
|
+
return features.slice(0, 64); // Ensure consistent size
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Extract numerical features from edge definition
|
|
198
|
+
*/ extractEdgeFeatures(relationship) {
|
|
199
|
+
const features = [];
|
|
200
|
+
// Type encoding
|
|
201
|
+
const types = [
|
|
202
|
+
'dependency',
|
|
203
|
+
'communication',
|
|
204
|
+
'data-flow',
|
|
205
|
+
'inheritance',
|
|
206
|
+
'composition',
|
|
207
|
+
'aggregation'
|
|
208
|
+
];
|
|
209
|
+
const typeEncoding = types.map((t)=>t === relationship.type ? 1 : 0);
|
|
210
|
+
features.push(...typeEncoding);
|
|
211
|
+
// Metadata features
|
|
212
|
+
features.push(relationship.metadata?.frequency || 1, relationship.metadata?.latency || 100, relationship.metadata?.reliability || 0.99, relationship.metadata?.bandwidth || 1000, relationship.metadata?.direction === 'bidirectional' ? 1 : 0);
|
|
213
|
+
// Pad to standard feature size
|
|
214
|
+
while(features.length < 32){
|
|
215
|
+
features.push(0);
|
|
216
|
+
}
|
|
217
|
+
return features.slice(0, 32);
|
|
218
|
+
}
|
|
219
|
+
// ===== Domain Cohesion Analysis =====
|
|
220
|
+
/**
|
|
221
|
+
* Calculate comprehensive domain cohesion scores
|
|
222
|
+
*
|
|
223
|
+
* @returns Detailed cohesion analysis
|
|
224
|
+
*/ async calculateDomainCohesion() {
|
|
225
|
+
const domainScores = new Map();
|
|
226
|
+
const weakPoints = [];
|
|
227
|
+
let totalStructural = 0;
|
|
228
|
+
let totalFunctional = 0;
|
|
229
|
+
let totalBehavioral = 0;
|
|
230
|
+
let totalSemantic = 0;
|
|
231
|
+
// Calculate per-domain cohesion
|
|
232
|
+
for (const [domainId, node] of this.graph.nodes){
|
|
233
|
+
const structural = this.calculateStructuralCohesion(domainId);
|
|
234
|
+
const functional = this.calculateFunctionalCohesion(domainId);
|
|
235
|
+
const behavioral = this.calculateBehavioralCohesion(domainId);
|
|
236
|
+
const semantic = this.calculateSemanticCohesion(domainId);
|
|
237
|
+
const domainScore = (structural + functional + behavioral + semantic) / 4;
|
|
238
|
+
domainScores.set(domainId, domainScore);
|
|
239
|
+
totalStructural += structural;
|
|
240
|
+
totalFunctional += functional;
|
|
241
|
+
totalBehavioral += behavioral;
|
|
242
|
+
totalSemantic += semantic;
|
|
243
|
+
// Identify weak points
|
|
244
|
+
if (domainScore < 0.6) {
|
|
245
|
+
const suggestions = this.generateCohesionSuggestions(domainId, {
|
|
246
|
+
structural,
|
|
247
|
+
functional,
|
|
248
|
+
behavioral,
|
|
249
|
+
semantic
|
|
250
|
+
});
|
|
251
|
+
weakPoints.push({
|
|
252
|
+
domainId,
|
|
253
|
+
score: domainScore,
|
|
254
|
+
reason: this.identifyWeaknessReason(structural, functional, behavioral, semantic),
|
|
255
|
+
suggestions
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
const nodeCount = this.graph.nodes.size;
|
|
260
|
+
const overallScore = Array.from(domainScores.values()).reduce((sum, score)=>sum + score, 0) / nodeCount;
|
|
261
|
+
const analysis = {
|
|
262
|
+
overallScore,
|
|
263
|
+
domainScores,
|
|
264
|
+
factors: {
|
|
265
|
+
structural: totalStructural / nodeCount,
|
|
266
|
+
functional: totalFunctional / nodeCount,
|
|
267
|
+
behavioral: totalBehavioral / nodeCount,
|
|
268
|
+
semantic: totalSemantic / nodeCount
|
|
269
|
+
},
|
|
270
|
+
weakPoints,
|
|
271
|
+
recommendations: await this.generateCohesionRecommendations(domainScores, weakPoints)
|
|
272
|
+
};
|
|
273
|
+
// Update graph metadata
|
|
274
|
+
this.graph.metadata.cohesionScore = overallScore;
|
|
275
|
+
this.emit('cohesion-calculated', analysis);
|
|
276
|
+
return analysis;
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Calculate structural cohesion based on graph connectivity
|
|
280
|
+
*/ calculateStructuralCohesion(domainId) {
|
|
281
|
+
const node = this.graph.nodes.get(domainId);
|
|
282
|
+
if (!node) return 0;
|
|
283
|
+
const outgoingEdges = Array.from(this.graph.edges.values()).filter((e)=>e.source === domainId);
|
|
284
|
+
const incomingEdges = Array.from(this.graph.edges.values()).filter((e)=>e.target === domainId);
|
|
285
|
+
const totalEdges = outgoingEdges.length + incomingEdges.length;
|
|
286
|
+
const maxPossibleEdges = (this.graph.nodes.size - 1) * 2; // Bidirectional
|
|
287
|
+
const connectivity = totalEdges / maxPossibleEdges;
|
|
288
|
+
// Consider edge weights
|
|
289
|
+
const weightedConnectivity = (outgoingEdges.reduce((sum, e)=>sum + e.weight, 0) + incomingEdges.reduce((sum, e)=>sum + e.weight, 0)) / (totalEdges || 1);
|
|
290
|
+
return Math.min((connectivity + weightedConnectivity) / 2, 1);
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Calculate functional cohesion based on domain purpose alignment
|
|
294
|
+
*/ calculateFunctionalCohesion(domainId) {
|
|
295
|
+
const node = this.graph.nodes.get(domainId);
|
|
296
|
+
if (!node) return 0;
|
|
297
|
+
// Analyze connected domains for functional similarity
|
|
298
|
+
const connectedDomains = this.getConnectedDomains(domainId);
|
|
299
|
+
const sameTypePenalty = connectedDomains.filter((d)=>d.type === node.type).length / (connectedDomains.length || 1);
|
|
300
|
+
// Consider domain complexity and size alignment
|
|
301
|
+
const avgComplexity = connectedDomains.reduce((sum, d)=>sum + d.metadata.complexity, 0) / (connectedDomains.length || 1);
|
|
302
|
+
const complexityAlignment = 1 - Math.abs(node.metadata.complexity - avgComplexity);
|
|
303
|
+
return sameTypePenalty * 0.6 + complexityAlignment * 0.4;
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Calculate behavioral cohesion based on interaction patterns
|
|
307
|
+
*/ calculateBehavioralCohesion(domainId) {
|
|
308
|
+
const relatedEdges = Array.from(this.graph.edges.values()).filter((e)=>e.source === domainId || e.target === domainId);
|
|
309
|
+
if (relatedEdges.length === 0) return 0.5; // Neutral for isolated domains
|
|
310
|
+
// Analyze interaction frequency and reliability
|
|
311
|
+
const avgFrequency = relatedEdges.reduce((sum, e)=>sum + e.metadata.frequency, 0) / relatedEdges.length;
|
|
312
|
+
const avgReliability = relatedEdges.reduce((sum, e)=>sum + e.metadata.reliability, 0) / relatedEdges.length;
|
|
313
|
+
const avgLatency = relatedEdges.reduce((sum, e)=>sum + e.metadata.latency, 0) / relatedEdges.length;
|
|
314
|
+
// Normalize and combine metrics
|
|
315
|
+
const frequencyScore = Math.min(avgFrequency / 10, 1); // Assume 10 is high frequency
|
|
316
|
+
const reliabilityScore = avgReliability;
|
|
317
|
+
const latencyScore = Math.max(0, 1 - avgLatency / 1000); // Assume 1000ms is poor latency
|
|
318
|
+
return (frequencyScore + reliabilityScore + latencyScore) / 3;
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Calculate semantic cohesion based on domain naming and metadata
|
|
322
|
+
*/ calculateSemanticCohesion(domainId) {
|
|
323
|
+
const node = this.graph.nodes.get(domainId);
|
|
324
|
+
if (!node) return 0;
|
|
325
|
+
const connectedDomains = this.getConnectedDomains(domainId);
|
|
326
|
+
// Analyze naming similarity (simplified semantic analysis)
|
|
327
|
+
let semanticScore = 0;
|
|
328
|
+
for (const connectedDomain of connectedDomains){
|
|
329
|
+
const nameSimilarity = this.calculateNameSimilarity(node.name, connectedDomain.name);
|
|
330
|
+
const typeSimilarity = node.type === connectedDomain.type ? 1 : 0.5;
|
|
331
|
+
semanticScore += (nameSimilarity + typeSimilarity) / 2;
|
|
332
|
+
}
|
|
333
|
+
return connectedDomains.length > 0 ? semanticScore / connectedDomains.length : 0.5;
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* Get domains connected to the specified domain
|
|
337
|
+
*/ getConnectedDomains(domainId) {
|
|
338
|
+
const connectedIds = new Set();
|
|
339
|
+
for (const edge of this.graph.edges.values()){
|
|
340
|
+
if (edge.source === domainId) {
|
|
341
|
+
connectedIds.add(edge.target);
|
|
342
|
+
} else if (edge.target === domainId) {
|
|
343
|
+
connectedIds.add(edge.source);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
return Array.from(connectedIds).map((id)=>this.graph.nodes.get(id)).filter(Boolean);
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Calculate name similarity between two domain names
|
|
350
|
+
*/ calculateNameSimilarity(name1, name2) {
|
|
351
|
+
const words1 = name1.toLowerCase().split(/[\s\-_]+/);
|
|
352
|
+
const words2 = name2.toLowerCase().split(/[\s\-_]+/);
|
|
353
|
+
const commonWords = words1.filter((w)=>words2.includes(w));
|
|
354
|
+
const totalWords = new Set([
|
|
355
|
+
...words1,
|
|
356
|
+
...words2
|
|
357
|
+
]).size;
|
|
358
|
+
return totalWords > 0 ? commonWords.length / totalWords : 0;
|
|
359
|
+
}
|
|
360
|
+
// ===== Cross-Domain Dependency Analysis =====
|
|
361
|
+
/**
|
|
362
|
+
* Identify and analyze cross-domain dependencies
|
|
363
|
+
*
|
|
364
|
+
* @returns Comprehensive dependency analysis
|
|
365
|
+
*/ async identifyCrossDomainDependencies() {
|
|
366
|
+
const dependencyGraph = new Map();
|
|
367
|
+
const circularDependencies = [];
|
|
368
|
+
const criticalPaths = [];
|
|
369
|
+
// Build dependency graph
|
|
370
|
+
for (const [nodeId1] of this.graph.nodes){
|
|
371
|
+
const dependencies = [];
|
|
372
|
+
for (const edge of this.graph.edges.values()){
|
|
373
|
+
if (edge.source === nodeId1 && edge.type === 'dependency') {
|
|
374
|
+
dependencies.push(edge.target);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
dependencyGraph.set(nodeId1, dependencies);
|
|
378
|
+
}
|
|
379
|
+
// Detect circular dependencies
|
|
380
|
+
const visited = new Set();
|
|
381
|
+
const recursionStack = new Set();
|
|
382
|
+
const detectCircularDFS = (nodeId1, path)=>{
|
|
383
|
+
visited.add(nodeId1);
|
|
384
|
+
recursionStack.add(nodeId1);
|
|
385
|
+
path.push(nodeId1);
|
|
386
|
+
const dependencies = dependencyGraph.get(nodeId1) || [];
|
|
387
|
+
for (const depId of dependencies){
|
|
388
|
+
if (!visited.has(depId)) {
|
|
389
|
+
detectCircularDFS(depId, [
|
|
390
|
+
...path
|
|
391
|
+
]);
|
|
392
|
+
} else if (recursionStack.has(depId)) {
|
|
393
|
+
// Found circular dependency
|
|
394
|
+
const cycleStart = path.indexOf(depId);
|
|
395
|
+
const cycle = path.slice(cycleStart);
|
|
396
|
+
circularDependencies.push([
|
|
397
|
+
...cycle,
|
|
398
|
+
depId
|
|
399
|
+
]);
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
recursionStack.delete(nodeId1);
|
|
403
|
+
};
|
|
404
|
+
for (const [nodeId1] of this.graph.nodes){
|
|
405
|
+
if (!visited.has(nodeId1)) {
|
|
406
|
+
detectCircularDFS(nodeId1, []);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
// Identify critical paths
|
|
410
|
+
const calculateRisk = (path)=>{
|
|
411
|
+
let totalRisk = 0;
|
|
412
|
+
for(let i = 0; i < path.length - 1; i++){
|
|
413
|
+
const edgeId = `${path[i]}->${path[i + 1]}`;
|
|
414
|
+
const edge = this.graph.edges.get(edgeId);
|
|
415
|
+
if (edge) {
|
|
416
|
+
// Risk based on reliability (inverted) and criticality
|
|
417
|
+
const reliability = edge.metadata.reliability;
|
|
418
|
+
const criticality = 1 - reliability;
|
|
419
|
+
totalRisk += criticality;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
return totalRisk / (path.length - 1);
|
|
423
|
+
};
|
|
424
|
+
const calculateImpact = (path)=>{
|
|
425
|
+
// Impact based on number of affected domains
|
|
426
|
+
const affectedDomains = new Set();
|
|
427
|
+
for (const nodeId1 of path){
|
|
428
|
+
// Find all domains that depend on nodes in this path
|
|
429
|
+
for (const [depId, deps] of dependencyGraph){
|
|
430
|
+
if (deps.includes(nodeId1)) {
|
|
431
|
+
affectedDomains.add(depId);
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
return affectedDomains.size / this.graph.nodes.size;
|
|
436
|
+
};
|
|
437
|
+
// Find longest dependency chains as critical paths
|
|
438
|
+
const findLongestPaths = (nodeId1, visited, path)=>{
|
|
439
|
+
if (path.length > 3) {
|
|
440
|
+
// Consider paths longer than 3 as potentially critical
|
|
441
|
+
const risk = calculateRisk(path);
|
|
442
|
+
const impact = calculateImpact(path);
|
|
443
|
+
if (risk > 0.3 || impact > 0.2) {
|
|
444
|
+
criticalPaths.push({
|
|
445
|
+
path: [
|
|
446
|
+
...path
|
|
447
|
+
],
|
|
448
|
+
risk,
|
|
449
|
+
impact
|
|
450
|
+
});
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
const dependencies = dependencyGraph.get(nodeId1) || [];
|
|
454
|
+
for (const depId of dependencies){
|
|
455
|
+
if (!visited.has(depId)) {
|
|
456
|
+
visited.add(depId);
|
|
457
|
+
findLongestPaths(depId, visited, [
|
|
458
|
+
...path,
|
|
459
|
+
depId
|
|
460
|
+
]);
|
|
461
|
+
visited.delete(depId);
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
};
|
|
465
|
+
for (const [nodeId1] of this.graph.nodes){
|
|
466
|
+
const visited = new Set([
|
|
467
|
+
nodeId1
|
|
468
|
+
]);
|
|
469
|
+
findLongestPaths(nodeId1, visited, [
|
|
470
|
+
nodeId1
|
|
471
|
+
]);
|
|
472
|
+
}
|
|
473
|
+
// Calculate metrics
|
|
474
|
+
const inDegrees = new Map();
|
|
475
|
+
const outDegrees = new Map();
|
|
476
|
+
for (const [nodeId1] of this.graph.nodes){
|
|
477
|
+
inDegrees.set(nodeId1, 0);
|
|
478
|
+
outDegrees.set(nodeId1, 0);
|
|
479
|
+
}
|
|
480
|
+
for (const deps of dependencyGraph.values()){
|
|
481
|
+
outDegrees.set(nodeId, deps.length);
|
|
482
|
+
for (const depId of deps){
|
|
483
|
+
inDegrees.set(depId, (inDegrees.get(depId) || 0) + 1);
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
const averageInDegree = Array.from(inDegrees.values()).reduce((sum, deg)=>sum + deg, 0) / this.graph.nodes.size;
|
|
487
|
+
const averageOutDegree = Array.from(outDegrees.values()).reduce((sum, deg)=>sum + deg, 0) / this.graph.nodes.size;
|
|
488
|
+
// Calculate maximum depth
|
|
489
|
+
const calculateMaxDepth = (nodeId1, visited)=>{
|
|
490
|
+
if (visited.has(nodeId1)) return 0;
|
|
491
|
+
visited.add(nodeId1);
|
|
492
|
+
const dependencies = dependencyGraph.get(nodeId1) || [];
|
|
493
|
+
if (dependencies.length === 0) return 1;
|
|
494
|
+
const depths = dependencies.map((depId)=>calculateMaxDepth(depId, new Set(visited)));
|
|
495
|
+
return 1 + Math.max(...depths, 0);
|
|
496
|
+
};
|
|
497
|
+
const depths = Array.from(this.graph.nodes.keys()).map((nodeId1)=>calculateMaxDepth(nodeId1, new Set()));
|
|
498
|
+
const maxDepth = Math.max(...depths, 0);
|
|
499
|
+
// Cyclomatic complexity (simplified)
|
|
500
|
+
const cyclomaticComplexity = this.graph.edges.size - this.graph.nodes.size + 2;
|
|
501
|
+
const analysis = {
|
|
502
|
+
graph: dependencyGraph,
|
|
503
|
+
circularDependencies,
|
|
504
|
+
criticalPaths: criticalPaths.sort((a, b)=>b.risk + b.impact - (a.risk + a.impact)).slice(0, 10),
|
|
505
|
+
metrics: {
|
|
506
|
+
averageInDegree,
|
|
507
|
+
averageOutDegree,
|
|
508
|
+
maxDepth,
|
|
509
|
+
cyclomaticComplexity
|
|
510
|
+
},
|
|
511
|
+
optimizations: await this.generateDependencyOptimizations(dependencyGraph, circularDependencies, criticalPaths)
|
|
512
|
+
};
|
|
513
|
+
this.emit('dependencies-analyzed', analysis);
|
|
514
|
+
return analysis;
|
|
515
|
+
}
|
|
516
|
+
// ===== Predictive Boundary Optimization =====
|
|
517
|
+
/**
|
|
518
|
+
* Provide predictive boundary optimization suggestions
|
|
519
|
+
*
|
|
520
|
+
* @returns Boundary optimization recommendations
|
|
521
|
+
*/ async provideBoundaryOptimization() {
|
|
522
|
+
const proposals = [];
|
|
523
|
+
// Analyze current boundaries and identify optimization opportunities
|
|
524
|
+
const cohesionAnalysis = await this.calculateDomainCohesion();
|
|
525
|
+
const dependencyAnalysis = await this.identifyCrossDomainDependencies();
|
|
526
|
+
// Generate merge proposals for highly coupled domains
|
|
527
|
+
await this.generateMergeProposals(proposals, cohesionAnalysis, dependencyAnalysis);
|
|
528
|
+
// Generate split proposals for low-cohesion domains
|
|
529
|
+
await this.generateSplitProposals(proposals, cohesionAnalysis, dependencyAnalysis);
|
|
530
|
+
// Generate relocation proposals for misplaced functionality
|
|
531
|
+
await this.generateRelocationProposals(proposals, cohesionAnalysis, dependencyAnalysis);
|
|
532
|
+
// Generate abstraction proposals for common patterns
|
|
533
|
+
await this.generateAbstractionProposals(proposals, cohesionAnalysis, dependencyAnalysis);
|
|
534
|
+
// Calculate overall optimization score
|
|
535
|
+
const optimizationScore = this.calculateOptimizationScore(proposals);
|
|
536
|
+
// Determine priority based on current system health
|
|
537
|
+
const priority = this.determinePriority(cohesionAnalysis, dependencyAnalysis, optimizationScore);
|
|
538
|
+
const optimization = {
|
|
539
|
+
proposals: proposals.sort((a, b)=>b.confidence - a.confidence).slice(0, 20),
|
|
540
|
+
optimizationScore,
|
|
541
|
+
priority
|
|
542
|
+
};
|
|
543
|
+
this.emit('optimization-generated', optimization);
|
|
544
|
+
return optimization;
|
|
545
|
+
}
|
|
546
|
+
// ===== Training Methods =====
|
|
547
|
+
/**
|
|
548
|
+
* Train the neural network on domain relationship patterns
|
|
549
|
+
*
|
|
550
|
+
* @param trainingData Training dataset
|
|
551
|
+
* @param validationData Validation dataset
|
|
552
|
+
* @returns Training results
|
|
553
|
+
*/ async train(trainingData, validationData) {
|
|
554
|
+
if (this.isTraining) {
|
|
555
|
+
throw new Error('Training already in progress');
|
|
556
|
+
}
|
|
557
|
+
this.isTraining = true;
|
|
558
|
+
this.emit('training-started', {
|
|
559
|
+
trainingData,
|
|
560
|
+
validationData
|
|
561
|
+
});
|
|
562
|
+
try {
|
|
563
|
+
const trainingHistory = [];
|
|
564
|
+
let bestAccuracy = 0;
|
|
565
|
+
let bestWeights = new Map(this.weights);
|
|
566
|
+
let bestBiases = new Map(this.biases);
|
|
567
|
+
let patienceCounter = 0;
|
|
568
|
+
// Training loop
|
|
569
|
+
for(let epoch = 0; epoch < this.trainingConfig.epochs; epoch++){
|
|
570
|
+
this.trainingState.epoch = epoch;
|
|
571
|
+
// Forward pass and backpropagation
|
|
572
|
+
const { loss, accuracy } = await this.trainEpoch(trainingData);
|
|
573
|
+
// Validation
|
|
574
|
+
let validationLoss;
|
|
575
|
+
let validationAccuracy;
|
|
576
|
+
if (validationData) {
|
|
577
|
+
const validationResults = await this.validateModel(validationData);
|
|
578
|
+
validationLoss = validationResults.loss;
|
|
579
|
+
validationAccuracy = validationResults.accuracy;
|
|
580
|
+
}
|
|
581
|
+
// Update training state
|
|
582
|
+
this.trainingState.loss = loss;
|
|
583
|
+
this.trainingState.accuracy = accuracy;
|
|
584
|
+
this.trainingState.validationLoss = validationLoss;
|
|
585
|
+
this.trainingState.validationAccuracy = validationAccuracy;
|
|
586
|
+
const epochResult = {
|
|
587
|
+
epoch,
|
|
588
|
+
loss,
|
|
589
|
+
accuracy,
|
|
590
|
+
validationLoss,
|
|
591
|
+
validationAccuracy
|
|
592
|
+
};
|
|
593
|
+
trainingHistory.push(epochResult);
|
|
594
|
+
// Check for improvement
|
|
595
|
+
const currentAccuracy = validationAccuracy || accuracy;
|
|
596
|
+
if (currentAccuracy > bestAccuracy + this.trainingConfig.earlyStoping.minDelta) {
|
|
597
|
+
bestAccuracy = currentAccuracy;
|
|
598
|
+
bestWeights = new Map(this.weights);
|
|
599
|
+
bestBiases = new Map(this.biases);
|
|
600
|
+
patienceCounter = 0;
|
|
601
|
+
} else {
|
|
602
|
+
patienceCounter++;
|
|
603
|
+
}
|
|
604
|
+
// Early stopping
|
|
605
|
+
if (this.trainingConfig.earlyStoping.enabled && patienceCounter >= this.trainingConfig.earlyStoping.patience) {
|
|
606
|
+
console.log(`Early stopping at epoch ${epoch}`);
|
|
607
|
+
break;
|
|
608
|
+
}
|
|
609
|
+
// Learning rate scheduling
|
|
610
|
+
if (epoch > 0 && epoch % 20 === 0) {
|
|
611
|
+
this.trainingConfig.learningRate *= 0.9;
|
|
612
|
+
this.trainingState.learningRate = this.trainingConfig.learningRate;
|
|
613
|
+
}
|
|
614
|
+
this.emit('epoch-completed', epochResult);
|
|
615
|
+
}
|
|
616
|
+
// Restore best model
|
|
617
|
+
this.weights = bestWeights;
|
|
618
|
+
this.biases = bestBiases;
|
|
619
|
+
// Update graph metadata
|
|
620
|
+
this.graph.metadata.lastTraining = Date.now();
|
|
621
|
+
const result = {
|
|
622
|
+
finalAccuracy: bestAccuracy,
|
|
623
|
+
trainingHistory,
|
|
624
|
+
bestModel: {
|
|
625
|
+
weights: bestWeights,
|
|
626
|
+
biases: bestBiases
|
|
627
|
+
}
|
|
628
|
+
};
|
|
629
|
+
this.emit('training-completed', result);
|
|
630
|
+
return result;
|
|
631
|
+
} finally{
|
|
632
|
+
this.isTraining = false;
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
/**
|
|
636
|
+
* Train a single epoch
|
|
637
|
+
*/ async trainEpoch(trainingData) {
|
|
638
|
+
const batchSize = this.trainingConfig.batchSize;
|
|
639
|
+
let totalLoss = 0;
|
|
640
|
+
let correct = 0;
|
|
641
|
+
let total = 0;
|
|
642
|
+
// Shuffle training data
|
|
643
|
+
const indices = Array.from({
|
|
644
|
+
length: trainingData.inputs.length
|
|
645
|
+
}, (_, i)=>i);
|
|
646
|
+
this.shuffleArray(indices);
|
|
647
|
+
// Process batches
|
|
648
|
+
for(let i = 0; i < indices.length; i += batchSize){
|
|
649
|
+
const batchIndices = indices.slice(i, i + batchSize);
|
|
650
|
+
const batchInputs = batchIndices.map((idx)=>trainingData.inputs[idx]);
|
|
651
|
+
const batchTargets = batchIndices.map((idx)=>trainingData.outputs[idx]);
|
|
652
|
+
const { loss, accuracy } = await this.processBatch(batchInputs, batchTargets);
|
|
653
|
+
totalLoss += loss;
|
|
654
|
+
correct += accuracy * batchIndices.length;
|
|
655
|
+
total += batchIndices.length;
|
|
656
|
+
}
|
|
657
|
+
return {
|
|
658
|
+
loss: totalLoss / Math.ceil(indices.length / batchSize),
|
|
659
|
+
accuracy: correct / total
|
|
660
|
+
};
|
|
661
|
+
}
|
|
662
|
+
/**
|
|
663
|
+
* Process a single batch
|
|
664
|
+
*/ async processBatch(inputs, targets) {
|
|
665
|
+
// Forward pass
|
|
666
|
+
const predictions = inputs.map((input)=>this.forwardPass(input));
|
|
667
|
+
// Calculate loss
|
|
668
|
+
const loss = this.calculateLoss(predictions, targets);
|
|
669
|
+
// Calculate accuracy
|
|
670
|
+
const accuracy = this.calculateAccuracy(predictions, targets);
|
|
671
|
+
// Backward pass
|
|
672
|
+
await this.backwardPass(inputs, predictions, targets);
|
|
673
|
+
return {
|
|
674
|
+
loss,
|
|
675
|
+
accuracy
|
|
676
|
+
};
|
|
677
|
+
}
|
|
678
|
+
/**
|
|
679
|
+
* Forward pass through the network
|
|
680
|
+
*/ forwardPass(input) {
|
|
681
|
+
let activation = this.preprocessInput(input);
|
|
682
|
+
// Process through each layer
|
|
683
|
+
for(let i = 0; i < this.layers.length; i++){
|
|
684
|
+
const layerConfig = this.layers[i];
|
|
685
|
+
const weights = this.weights.get(`layer_${i}`) || [];
|
|
686
|
+
const biases = this.biases.get(`layer_${i}`) || [];
|
|
687
|
+
activation = this.processLayer(activation, weights, biases, layerConfig);
|
|
688
|
+
}
|
|
689
|
+
return activation;
|
|
690
|
+
}
|
|
691
|
+
/**
|
|
692
|
+
* Backward pass for gradient calculation and weight updates
|
|
693
|
+
*/ async backwardPass(inputs, predictions, targets) {
|
|
694
|
+
// Calculate output gradients
|
|
695
|
+
const outputGradients = this.calculateOutputGradients(predictions, targets);
|
|
696
|
+
// Backpropagate through layers
|
|
697
|
+
let gradients = outputGradients;
|
|
698
|
+
for(let i = this.layers.length - 1; i >= 0; i--){
|
|
699
|
+
const layerConfig = this.layers[i];
|
|
700
|
+
const weights = this.weights.get(`layer_${i}`) || [];
|
|
701
|
+
const biases = this.biases.get(`layer_${i}`) || [];
|
|
702
|
+
const { weightGradients, biasGradients, inputGradients } = this.calculateLayerGradients(gradients, weights, biases, layerConfig);
|
|
703
|
+
// Update weights and biases
|
|
704
|
+
this.updateWeights(`layer_${i}`, weights, weightGradients);
|
|
705
|
+
this.updateBiases(`layer_${i}`, biases, biasGradients);
|
|
706
|
+
gradients = inputGradients;
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
// ===== Inference Methods =====
|
|
710
|
+
/**
|
|
711
|
+
* Make predictions using the trained model
|
|
712
|
+
*
|
|
713
|
+
* @param input Input data for prediction
|
|
714
|
+
* @returns Prediction results
|
|
715
|
+
*/ async predict(input) {
|
|
716
|
+
if (this.isTraining) {
|
|
717
|
+
throw new Error('Cannot make predictions during training');
|
|
718
|
+
}
|
|
719
|
+
const output = this.forwardPass(input);
|
|
720
|
+
const confidence = this.calculatePredictionConfidence(output);
|
|
721
|
+
// Generate alternatives using dropout or ensemble
|
|
722
|
+
const alternatives = await this.generateAlternativePredictions(input, 5);
|
|
723
|
+
const prediction = {
|
|
724
|
+
input,
|
|
725
|
+
output,
|
|
726
|
+
confidence,
|
|
727
|
+
alternatives
|
|
728
|
+
};
|
|
729
|
+
this.emit('prediction-made', prediction);
|
|
730
|
+
return prediction;
|
|
731
|
+
}
|
|
732
|
+
/**
|
|
733
|
+
* Analyze domain relationships and suggest optimizations
|
|
734
|
+
*
|
|
735
|
+
* @param domains Domain configuration to analyze
|
|
736
|
+
* @returns Analysis results with optimization suggestions
|
|
737
|
+
*/ async analyzeDomains(domains) {
|
|
738
|
+
// Update internal graph
|
|
739
|
+
this.graph = {
|
|
740
|
+
...domains
|
|
741
|
+
};
|
|
742
|
+
// Perform comprehensive analysis
|
|
743
|
+
const [cohesion, dependencies, optimization] = await Promise.all([
|
|
744
|
+
this.calculateDomainCohesion(),
|
|
745
|
+
this.identifyCrossDomainDependencies(),
|
|
746
|
+
this.provideBoundaryOptimization()
|
|
747
|
+
]);
|
|
748
|
+
// Generate high-level recommendations
|
|
749
|
+
const recommendations = this.generateHighLevelRecommendations(cohesion, dependencies, optimization);
|
|
750
|
+
const analysis = {
|
|
751
|
+
cohesion,
|
|
752
|
+
dependencies,
|
|
753
|
+
optimization,
|
|
754
|
+
recommendations
|
|
755
|
+
};
|
|
756
|
+
this.emit('domains-analyzed', analysis);
|
|
757
|
+
return analysis;
|
|
758
|
+
}
|
|
759
|
+
// ===== Helper Methods =====
|
|
760
|
+
createDefaultPatternStore() {
|
|
761
|
+
const patterns = new Map();
|
|
762
|
+
return {
|
|
763
|
+
add: (pattern)=>patterns.set(pattern.id, pattern),
|
|
764
|
+
get: (id)=>patterns.get(id),
|
|
765
|
+
findSimilar: (pattern, threshold)=>{
|
|
766
|
+
return Array.from(patterns.values()).filter((p)=>this.calculatePatternSimilarity(p, pattern) >= threshold);
|
|
767
|
+
},
|
|
768
|
+
getByType: (type)=>{
|
|
769
|
+
return Array.from(patterns.values()).filter((p)=>p.type === type);
|
|
770
|
+
},
|
|
771
|
+
prune: (maxAge)=>{
|
|
772
|
+
const cutoff = Date.now() - maxAge;
|
|
773
|
+
for (const [id, pattern] of patterns){
|
|
774
|
+
if (Date.now() - maxAge > cutoff) {
|
|
775
|
+
patterns.delete(id);
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
},
|
|
779
|
+
export: ()=>Array.from(patterns.values()),
|
|
780
|
+
import: (importedPatterns)=>{
|
|
781
|
+
for (const pattern of importedPatterns){
|
|
782
|
+
patterns.set(pattern.id, pattern);
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
};
|
|
786
|
+
}
|
|
787
|
+
initializeNodeEmbedding(nodeId1) {
|
|
788
|
+
return Array.from({
|
|
789
|
+
length: 32
|
|
790
|
+
}, ()=>(Math.random() - 0.5) * 0.1);
|
|
791
|
+
}
|
|
792
|
+
initializeWeights() {
|
|
793
|
+
for(let i = 0; i < this.layers.length; i++){
|
|
794
|
+
const layer = this.layers[i];
|
|
795
|
+
const inputDim = i === 0 ? 64 : this.layers[i - 1].outputDim;
|
|
796
|
+
const outputDim = layer.outputDim;
|
|
797
|
+
// Xavier/Glorot initialization
|
|
798
|
+
const limit = Math.sqrt(6 / (inputDim + outputDim));
|
|
799
|
+
const weights = Array.from({
|
|
800
|
+
length: inputDim * outputDim
|
|
801
|
+
}, ()=>(Math.random() - 0.5) * 2 * limit);
|
|
802
|
+
const biases = Array.from({
|
|
803
|
+
length: outputDim
|
|
804
|
+
}, ()=>0);
|
|
805
|
+
this.weights.set(`layer_${i}`, weights);
|
|
806
|
+
this.biases.set(`layer_${i}`, biases);
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
shuffleArray(array) {
|
|
810
|
+
for(let i = array.length - 1; i > 0; i--){
|
|
811
|
+
const j = Math.floor(Math.random() * (i + 1));
|
|
812
|
+
[array[i], array[j]] = [
|
|
813
|
+
array[j],
|
|
814
|
+
array[i]
|
|
815
|
+
];
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
preprocessInput(input) {
|
|
819
|
+
// Convert input to numerical features
|
|
820
|
+
if (typeof input === 'object' && input.features) {
|
|
821
|
+
return input.features;
|
|
822
|
+
}
|
|
823
|
+
// Default preprocessing
|
|
824
|
+
return Array.from({
|
|
825
|
+
length: 64
|
|
826
|
+
}, ()=>0);
|
|
827
|
+
}
|
|
828
|
+
processLayer(input, weights, biases, config) {
|
|
829
|
+
// Matrix multiplication: input * weights + biases
|
|
830
|
+
const output = new Array(config.outputDim).fill(0);
|
|
831
|
+
for(let i = 0; i < config.outputDim; i++){
|
|
832
|
+
let sum = biases[i] || 0;
|
|
833
|
+
for(let j = 0; j < input.length; j++){
|
|
834
|
+
const weightIndex = j * config.outputDim + i;
|
|
835
|
+
sum += input[j] * (weights[weightIndex] || 0);
|
|
836
|
+
}
|
|
837
|
+
output[i] = this.applyActivation(sum, config.activation);
|
|
838
|
+
}
|
|
839
|
+
// Apply dropout during training
|
|
840
|
+
if (this.isTraining && config.dropout > 0) {
|
|
841
|
+
for(let i = 0; i < output.length; i++){
|
|
842
|
+
if (Math.random() < config.dropout) {
|
|
843
|
+
output[i] = 0;
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
return output;
|
|
848
|
+
}
|
|
849
|
+
applyActivation(x, activation) {
|
|
850
|
+
switch(activation){
|
|
851
|
+
case 'relu':
|
|
852
|
+
return Math.max(0, x);
|
|
853
|
+
case 'tanh':
|
|
854
|
+
return Math.tanh(x);
|
|
855
|
+
case 'sigmoid':
|
|
856
|
+
return 1 / (1 + Math.exp(-x));
|
|
857
|
+
case 'gelu':
|
|
858
|
+
return 0.5 * x * (1 + Math.tanh(Math.sqrt(2 / Math.PI) * (x + 0.044715 * Math.pow(x, 3))));
|
|
859
|
+
case 'swish':
|
|
860
|
+
return x / (1 + Math.exp(-x));
|
|
861
|
+
default:
|
|
862
|
+
return x;
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
calculateLoss(predictions, targets) {
|
|
866
|
+
let totalLoss = 0;
|
|
867
|
+
for(let i = 0; i < predictions.length; i++){
|
|
868
|
+
const pred = predictions[i];
|
|
869
|
+
const target = Array.isArray(targets[i]) ? targets[i] : [
|
|
870
|
+
targets[i]
|
|
871
|
+
];
|
|
872
|
+
// Mean squared error
|
|
873
|
+
for(let j = 0; j < Math.min(pred.length, target.length); j++){
|
|
874
|
+
const diff = pred[j] - target[j];
|
|
875
|
+
totalLoss += diff * diff;
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
return totalLoss / predictions.length;
|
|
879
|
+
}
|
|
880
|
+
calculateAccuracy(predictions, targets) {
|
|
881
|
+
let correct = 0;
|
|
882
|
+
for(let i = 0; i < predictions.length; i++){
|
|
883
|
+
const pred = predictions[i];
|
|
884
|
+
const target = Array.isArray(targets[i]) ? targets[i] : [
|
|
885
|
+
targets[i]
|
|
886
|
+
];
|
|
887
|
+
// Simple threshold-based accuracy for regression
|
|
888
|
+
let sampleCorrect = true;
|
|
889
|
+
for(let j = 0; j < Math.min(pred.length, target.length); j++){
|
|
890
|
+
if (Math.abs(pred[j] - target[j]) > 0.1) {
|
|
891
|
+
sampleCorrect = false;
|
|
892
|
+
break;
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
if (sampleCorrect) correct++;
|
|
896
|
+
}
|
|
897
|
+
return correct / predictions.length;
|
|
898
|
+
}
|
|
899
|
+
calculateOutputGradients(predictions, targets) {
|
|
900
|
+
const gradients = [];
|
|
901
|
+
for(let i = 0; i < predictions.length; i++){
|
|
902
|
+
const pred = predictions[i];
|
|
903
|
+
const target = Array.isArray(targets[i]) ? targets[i] : [
|
|
904
|
+
targets[i]
|
|
905
|
+
];
|
|
906
|
+
const sampleGradients = [];
|
|
907
|
+
for(let j = 0; j < pred.length; j++){
|
|
908
|
+
const targetVal = j < target.length ? target[j] : 0;
|
|
909
|
+
sampleGradients.push(2 * (pred[j] - targetVal));
|
|
910
|
+
}
|
|
911
|
+
gradients.push(sampleGradients);
|
|
912
|
+
}
|
|
913
|
+
return gradients;
|
|
914
|
+
}
|
|
915
|
+
calculateLayerGradients(outputGradients, weights, biases, config) {
|
|
916
|
+
// Simplified gradient calculation
|
|
917
|
+
const weightGradients = new Array(weights.length).fill(0);
|
|
918
|
+
const biasGradients = new Array(biases.length).fill(0);
|
|
919
|
+
const inputGradients = [];
|
|
920
|
+
// This is a simplified implementation
|
|
921
|
+
// In practice, you'd need proper matrix operations and chain rule application
|
|
922
|
+
for(let i = 0; i < outputGradients.length; i++){
|
|
923
|
+
const sampleInputGradients = new Array(config.inputDim).fill(0);
|
|
924
|
+
for(let j = 0; j < outputGradients[i].length; j++){
|
|
925
|
+
const grad = outputGradients[i][j];
|
|
926
|
+
// Bias gradients
|
|
927
|
+
biasGradients[j] += grad;
|
|
928
|
+
// Weight and input gradients would require activation functions and inputs
|
|
929
|
+
// This is simplified for demonstration
|
|
930
|
+
}
|
|
931
|
+
inputGradients.push(sampleInputGradients);
|
|
932
|
+
}
|
|
933
|
+
return {
|
|
934
|
+
weightGradients,
|
|
935
|
+
biasGradients,
|
|
936
|
+
inputGradients
|
|
937
|
+
};
|
|
938
|
+
}
|
|
939
|
+
updateWeights(layerId, weights, gradients) {
|
|
940
|
+
const lr = this.trainingState.learningRate;
|
|
941
|
+
const l2 = this.trainingConfig.regularization.l2;
|
|
942
|
+
for(let i = 0; i < weights.length && i < gradients.length; i++){
|
|
943
|
+
weights[i] -= lr * (gradients[i] + l2 * weights[i]);
|
|
944
|
+
}
|
|
945
|
+
this.weights.set(layerId, weights);
|
|
946
|
+
}
|
|
947
|
+
updateBiases(layerId, biases, gradients) {
|
|
948
|
+
const lr = this.trainingState.learningRate;
|
|
949
|
+
for(let i = 0; i < biases.length && i < gradients.length; i++){
|
|
950
|
+
biases[i] -= lr * gradients[i];
|
|
951
|
+
}
|
|
952
|
+
this.biases.set(layerId, biases);
|
|
953
|
+
}
|
|
954
|
+
async validateModel(validationData) {
|
|
955
|
+
const predictions = validationData.inputs.map((input)=>this.forwardPass(input));
|
|
956
|
+
const loss = this.calculateLoss(predictions, validationData.outputs);
|
|
957
|
+
const accuracy = this.calculateAccuracy(predictions, validationData.outputs);
|
|
958
|
+
return {
|
|
959
|
+
loss,
|
|
960
|
+
accuracy
|
|
961
|
+
};
|
|
962
|
+
}
|
|
963
|
+
calculatePredictionConfidence(output) {
|
|
964
|
+
// Calculate confidence based on output certainty
|
|
965
|
+
const maxVal = Math.max(...output);
|
|
966
|
+
const minVal = Math.min(...output);
|
|
967
|
+
const range = maxVal - minVal;
|
|
968
|
+
// Higher range indicates more confident prediction
|
|
969
|
+
return Math.min(range, 1);
|
|
970
|
+
}
|
|
971
|
+
async generateAlternativePredictions(input, count) {
|
|
972
|
+
const alternatives = [];
|
|
973
|
+
// Generate alternatives using noise injection
|
|
974
|
+
for(let i = 0; i < count; i++){
|
|
975
|
+
const noisyInput = this.addNoiseToInput(input, 0.1);
|
|
976
|
+
const output = this.forwardPass(noisyInput);
|
|
977
|
+
const confidence = this.calculatePredictionConfidence(output);
|
|
978
|
+
alternatives.push({
|
|
979
|
+
output,
|
|
980
|
+
confidence
|
|
981
|
+
});
|
|
982
|
+
}
|
|
983
|
+
return alternatives.sort((a, b)=>b.confidence - a.confidence);
|
|
984
|
+
}
|
|
985
|
+
addNoiseToInput(input, noiseLevel) {
|
|
986
|
+
if (typeof input === 'object' && input.features) {
|
|
987
|
+
const noisyFeatures = input.features.map((f)=>f + (Math.random() - 0.5) * noiseLevel);
|
|
988
|
+
return {
|
|
989
|
+
...input,
|
|
990
|
+
features: noisyFeatures
|
|
991
|
+
};
|
|
992
|
+
}
|
|
993
|
+
return input;
|
|
994
|
+
}
|
|
995
|
+
calculatePatternSimilarity(p1, p2) {
|
|
996
|
+
// Simplified similarity calculation
|
|
997
|
+
let similarity = 0;
|
|
998
|
+
let factors = 0;
|
|
999
|
+
if (p1.type === p2.type) {
|
|
1000
|
+
similarity += 0.3;
|
|
1001
|
+
}
|
|
1002
|
+
factors++;
|
|
1003
|
+
if (p2.confidence !== undefined) {
|
|
1004
|
+
similarity += 1 - Math.abs(p1.confidence - p2.confidence);
|
|
1005
|
+
factors++;
|
|
1006
|
+
}
|
|
1007
|
+
return similarity / factors;
|
|
1008
|
+
}
|
|
1009
|
+
// Additional helper methods would be implemented here for:
|
|
1010
|
+
// - generateCohesionSuggestions
|
|
1011
|
+
// - identifyWeaknessReason
|
|
1012
|
+
// - generateCohesionRecommendations
|
|
1013
|
+
// - generateDependencyOptimizations
|
|
1014
|
+
// - generateMergeProposals
|
|
1015
|
+
// - generateSplitProposals
|
|
1016
|
+
// - generateRelocationProposals
|
|
1017
|
+
// - generateAbstractionProposals
|
|
1018
|
+
// - calculateOptimizationScore
|
|
1019
|
+
// - determinePriority
|
|
1020
|
+
// - generateHighLevelRecommendations
|
|
1021
|
+
/**
|
|
1022
|
+
* Get current model statistics
|
|
1023
|
+
*/ getModelStats() {
|
|
1024
|
+
return {
|
|
1025
|
+
graphSize: {
|
|
1026
|
+
nodes: this.graph.nodes.size,
|
|
1027
|
+
edges: this.graph.edges.size
|
|
1028
|
+
},
|
|
1029
|
+
trainingState: {
|
|
1030
|
+
...this.trainingState
|
|
1031
|
+
},
|
|
1032
|
+
modelVersion: this.modelVersion,
|
|
1033
|
+
lastTraining: this.graph.metadata.lastTraining,
|
|
1034
|
+
cohesionScore: this.graph.metadata.cohesionScore
|
|
1035
|
+
};
|
|
1036
|
+
}
|
|
1037
|
+
/**
|
|
1038
|
+
* Export model state for persistence
|
|
1039
|
+
*/ exportModel() {
|
|
1040
|
+
return {
|
|
1041
|
+
graph: this.graph,
|
|
1042
|
+
weights: Object.fromEntries(this.weights),
|
|
1043
|
+
biases: Object.fromEntries(this.biases),
|
|
1044
|
+
trainingState: this.trainingState,
|
|
1045
|
+
config: this.trainingConfig
|
|
1046
|
+
};
|
|
1047
|
+
}
|
|
1048
|
+
/**
|
|
1049
|
+
* Import model state from persistence
|
|
1050
|
+
*/ importModel(modelData) {
|
|
1051
|
+
this.graph = modelData.graph;
|
|
1052
|
+
this.weights = new Map(Object.entries(modelData.weights));
|
|
1053
|
+
this.biases = new Map(Object.entries(modelData.biases));
|
|
1054
|
+
this.trainingState = modelData.trainingState;
|
|
1055
|
+
this.trainingConfig = {
|
|
1056
|
+
...this.trainingConfig,
|
|
1057
|
+
...modelData.config
|
|
1058
|
+
};
|
|
1059
|
+
this.emit('model-imported', modelData);
|
|
1060
|
+
}
|
|
1061
|
+
// Stub implementations for remaining methods
|
|
1062
|
+
generateCohesionSuggestions(domainId, factors) {
|
|
1063
|
+
return [
|
|
1064
|
+
'Improve structural cohesion',
|
|
1065
|
+
'Enhance functional alignment'
|
|
1066
|
+
];
|
|
1067
|
+
}
|
|
1068
|
+
identifyWeaknessReason(structural, functional, behavioral, semantic) {
|
|
1069
|
+
const lowest = Math.min(structural, functional, behavioral, semantic);
|
|
1070
|
+
if (lowest === structural) return 'Poor structural cohesion';
|
|
1071
|
+
if (lowest === functional) return 'Low functional alignment';
|
|
1072
|
+
if (lowest === behavioral) return 'Inconsistent behavior patterns';
|
|
1073
|
+
return 'Weak semantic relationships';
|
|
1074
|
+
}
|
|
1075
|
+
async generateCohesionRecommendations(domainScores, weakPoints) {
|
|
1076
|
+
return [
|
|
1077
|
+
{
|
|
1078
|
+
type: 'restructure',
|
|
1079
|
+
target: [
|
|
1080
|
+
'domain1',
|
|
1081
|
+
'domain2'
|
|
1082
|
+
],
|
|
1083
|
+
impact: 0.3,
|
|
1084
|
+
confidence: 0.8
|
|
1085
|
+
}
|
|
1086
|
+
];
|
|
1087
|
+
}
|
|
1088
|
+
async generateDependencyOptimizations(dependencyGraph, circularDependencies, criticalPaths) {
|
|
1089
|
+
return [
|
|
1090
|
+
{
|
|
1091
|
+
type: 'break-cycle',
|
|
1092
|
+
affected: [
|
|
1093
|
+
'domain1',
|
|
1094
|
+
'domain2'
|
|
1095
|
+
],
|
|
1096
|
+
benefit: 0.5,
|
|
1097
|
+
effort: 0.3
|
|
1098
|
+
}
|
|
1099
|
+
];
|
|
1100
|
+
}
|
|
1101
|
+
async generateMergeProposals(proposals, cohesionAnalysis, dependencyAnalysis) {
|
|
1102
|
+
// Implementation would analyze highly coupled domains for merge opportunities
|
|
1103
|
+
}
|
|
1104
|
+
async generateSplitProposals(proposals, cohesionAnalysis, dependencyAnalysis) {
|
|
1105
|
+
// Implementation would identify large, low-cohesion domains for splitting
|
|
1106
|
+
}
|
|
1107
|
+
async generateRelocationProposals(proposals, cohesionAnalysis, dependencyAnalysis) {
|
|
1108
|
+
// Implementation would suggest moving functionality between domains
|
|
1109
|
+
}
|
|
1110
|
+
async generateAbstractionProposals(proposals, cohesionAnalysis, dependencyAnalysis) {
|
|
1111
|
+
// Implementation would identify common patterns for abstraction
|
|
1112
|
+
}
|
|
1113
|
+
calculateOptimizationScore(proposals) {
|
|
1114
|
+
return proposals.reduce((score, p)=>score + p.confidence * 0.1, 0);
|
|
1115
|
+
}
|
|
1116
|
+
determinePriority(cohesionAnalysis, dependencyAnalysis, optimizationScore) {
|
|
1117
|
+
if (cohesionAnalysis.overallScore < 0.3) return 'critical';
|
|
1118
|
+
if (optimizationScore > 0.7) return 'high';
|
|
1119
|
+
if (optimizationScore > 0.4) return 'medium';
|
|
1120
|
+
return 'low';
|
|
1121
|
+
}
|
|
1122
|
+
generateHighLevelRecommendations(cohesion, dependencies, optimization) {
|
|
1123
|
+
const recommendations = [];
|
|
1124
|
+
if (cohesion.overallScore < 0.6) {
|
|
1125
|
+
recommendations.push('Consider domain restructuring to improve cohesion');
|
|
1126
|
+
}
|
|
1127
|
+
if (dependencies.circularDependencies.length > 0) {
|
|
1128
|
+
recommendations.push('Address circular dependencies to improve maintainability');
|
|
1129
|
+
}
|
|
1130
|
+
if (optimization.priority === 'high' || optimization.priority === 'critical') {
|
|
1131
|
+
recommendations.push('Implement boundary optimizations to improve system architecture');
|
|
1132
|
+
}
|
|
1133
|
+
return recommendations;
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
//# sourceMappingURL=NeuralDomainMapper.js.map
|