claude-flow-novice 1.3.5 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/analysis/code-analyzer.md +3 -20
- package/.claude/agents/analysis/code-review/analyze-code-quality.md +1 -1
- package/.claude/agents/analyst.md +300 -0
- package/.claude/agents/architect.md +557 -0
- package/.claude/agents/architecture/system-architect.md +630 -0
- package/.claude/agents/architecture/system-design/arch-system-design.md +1 -1
- package/.claude/agents/base-template-generator.md +24 -1
- package/.claude/agents/coder.md +180 -0
- package/.claude/agents/consensus/byzantine-coordinator.md +4 -21
- package/.claude/agents/consensus/consensus-builder.md +3 -20
- package/.claude/agents/consensus/crdt-synchronizer.md +4 -21
- package/.claude/agents/consensus/gossip-coordinator.md +4 -21
- package/.claude/agents/consensus/performance-benchmarker.md +4 -21
- package/.claude/agents/consensus/quorum-manager.md +4 -21
- package/.claude/agents/consensus/raft-manager.md +4 -21
- package/.claude/agents/consensus/security-manager.md +4 -21
- package/.claude/agents/coordinator.md +842 -0
- package/.claude/agents/data/ml/data-ml-model.md +2 -2
- package/.claude/agents/development/backend/dev-backend-api.md +2 -2
- package/.claude/agents/devops/ci-cd/ops-cicd-github.md +2 -2
- package/.claude/agents/devops/devops-engineer.md +638 -0
- package/.claude/agents/documentation/api-docs/docs-api-openapi.md +2 -2
- package/.claude/agents/github/code-review-swarm.md +1 -1
- package/.claude/agents/github/github-specialist.md +856 -0
- package/.claude/agents/github/pr-manager.md +1 -1
- package/.claude/agents/github/release-manager.md +1 -1
- package/.claude/agents/neural/neural-pattern-agent.md +762 -0
- package/.claude/agents/optimization/benchmark-suite.md +1 -1
- package/.claude/agents/optimization/perf-analyzer.md +725 -0
- package/.claude/agents/optimization/performance-monitor.md +1 -1
- package/.claude/agents/planner.md +135 -0
- package/.claude/agents/researcher.md +185 -0
- package/.claude/agents/reviewer.md +291 -0
- package/.claude/agents/security/security-specialist.md +978 -0
- package/.claude/agents/sparc/architecture.md +1 -1
- package/.claude/agents/sparc/pseudocode.md +1 -1
- package/.claude/agents/sparc/refinement.md +1 -1
- package/.claude/agents/sparc/specification.md +1 -1
- package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +2 -2
- package/.claude/agents/swarm/adaptive-coordinator-enhanced.md +746 -0
- package/.claude/agents/tester.md +663 -0
- package/.claude/agents/testing/unit/tdd-london-swarm.md +1 -1
- package/.claude/agents/testing/validation/production-validator.md +1 -1
- package/.claude/commands/claude-soul.js +1 -1
- package/.claude/hooks.json +12 -15
- package/{.claude → .claude-flow-novice/.claude}/agents/MIGRATION_SUMMARY.md +1 -1
- package/.claude-flow-novice/.claude/agents/analysis/code-analyzer.md +192 -0
- package/.claude-flow-novice/.claude/agents/analysis/code-review/analyze-code-quality.md +180 -0
- package/.claude-flow-novice/.claude/agents/analyst.md +300 -0
- package/.claude-flow-novice/.claude/agents/architect.md +557 -0
- package/.claude-flow-novice/.claude/agents/architecture/system-architect.md +630 -0
- package/.claude-flow-novice/.claude/agents/architecture/system-design/arch-system-design.md +156 -0
- package/.claude-flow-novice/.claude/agents/backend-dev.json +42 -0
- package/.claude-flow-novice/.claude/agents/base-template-generator.md +65 -0
- package/.claude-flow-novice/.claude/agents/code-analyzer.json +39 -0
- package/.claude-flow-novice/.claude/agents/coder.json +42 -0
- package/.claude-flow-novice/.claude/agents/coder.md +180 -0
- package/.claude-flow-novice/.claude/agents/consensus/byzantine-coordinator.md +46 -0
- package/.claude-flow-novice/.claude/agents/consensus/consensus-builder.md +225 -0
- package/.claude-flow-novice/.claude/agents/consensus/crdt-synchronizer.md +980 -0
- package/.claude-flow-novice/.claude/agents/consensus/gossip-coordinator.md +46 -0
- package/.claude-flow-novice/.claude/agents/consensus/performance-benchmarker.md +834 -0
- package/.claude-flow-novice/.claude/agents/consensus/quorum-manager.md +806 -0
- package/.claude-flow-novice/.claude/agents/consensus/raft-manager.md +46 -0
- package/.claude-flow-novice/.claude/agents/consensus/security-manager.md +605 -0
- package/.claude-flow-novice/.claude/agents/coordinator.md +842 -0
- package/.claude-flow-novice/.claude/agents/data/ml/data-ml-model.md +193 -0
- package/.claude-flow-novice/.claude/agents/development/backend/dev-backend-api.md +142 -0
- package/.claude-flow-novice/.claude/agents/devops/ci-cd/ops-cicd-github.md +164 -0
- package/.claude-flow-novice/.claude/agents/devops/devops-engineer.md +638 -0
- package/.claude-flow-novice/.claude/agents/documentation/api-docs/docs-api-openapi.md +174 -0
- package/.claude-flow-novice/.claude/agents/github/code-review-swarm.md +538 -0
- package/.claude-flow-novice/.claude/agents/github/github-modes.md +173 -0
- package/.claude-flow-novice/.claude/agents/github/github-specialist.md +856 -0
- package/.claude-flow-novice/.claude/agents/github/issue-tracker.md +319 -0
- package/.claude-flow-novice/.claude/agents/github/multi-repo-swarm.md +553 -0
- package/.claude-flow-novice/.claude/agents/github/pr-manager.md +191 -0
- package/.claude-flow-novice/.claude/agents/github/project-board-sync.md +509 -0
- package/.claude-flow-novice/.claude/agents/github/release-manager.md +367 -0
- package/.claude-flow-novice/.claude/agents/github/release-swarm.md +583 -0
- package/.claude-flow-novice/.claude/agents/github/repo-architect.md +398 -0
- package/.claude-flow-novice/.claude/agents/github/swarm-issue.md +573 -0
- package/.claude-flow-novice/.claude/agents/github/swarm-pr.md +428 -0
- package/.claude-flow-novice/.claude/agents/github/sync-coordinator.md +452 -0
- package/.claude-flow-novice/.claude/agents/github/workflow-automation.md +635 -0
- package/.claude-flow-novice/.claude/agents/goal/goal-planner.md +73 -0
- package/.claude-flow-novice/.claude/agents/neural/neural-pattern-agent.md +762 -0
- package/.claude-flow-novice/.claude/agents/neural/safla-neural.md +74 -0
- package/.claude-flow-novice/.claude/agents/optimization/benchmark-suite.md +665 -0
- package/.claude-flow-novice/.claude/agents/optimization/load-balancer.md +431 -0
- package/.claude-flow-novice/.claude/agents/optimization/perf-analyzer.md +725 -0
- package/.claude-flow-novice/.claude/agents/optimization/performance-monitor.md +672 -0
- package/.claude-flow-novice/.claude/agents/optimization/resource-allocator.md +674 -0
- package/.claude-flow-novice/.claude/agents/optimization/topology-optimizer.md +808 -0
- package/.claude-flow-novice/.claude/agents/planner.json +41 -0
- package/.claude-flow-novice/.claude/agents/planner.md +135 -0
- package/.claude-flow-novice/.claude/agents/researcher.json +41 -0
- package/.claude-flow-novice/.claude/agents/researcher.md +185 -0
- package/.claude-flow-novice/.claude/agents/reviewer.json +39 -0
- package/.claude-flow-novice/.claude/agents/reviewer.md +291 -0
- package/.claude-flow-novice/.claude/agents/security/security-specialist.md +978 -0
- package/.claude-flow-novice/.claude/agents/sparc/architecture.md +472 -0
- package/.claude-flow-novice/.claude/agents/sparc/pseudocode.md +318 -0
- package/.claude-flow-novice/.claude/agents/sparc/refinement.md +525 -0
- package/.claude-flow-novice/.claude/agents/sparc/specification.md +276 -0
- package/.claude-flow-novice/.claude/agents/specialized/mobile/spec-mobile-react-native.md +226 -0
- package/.claude-flow-novice/.claude/agents/sublinear/consciousness-evolution-agent.md +499 -0
- package/.claude-flow-novice/.claude/agents/sublinear/matrix-solver-agent.md +113 -0
- package/.claude-flow-novice/.claude/agents/sublinear/nanosecond-scheduler-agent.md +644 -0
- package/.claude-flow-novice/.claude/agents/sublinear/pagerank-agent.md +699 -0
- package/.claude-flow-novice/.claude/agents/sublinear/phi-calculator-agent.md +749 -0
- package/.claude-flow-novice/.claude/agents/sublinear/psycho-symbolic-agent.md +543 -0
- package/.claude-flow-novice/.claude/agents/sublinear/sublinear.md +816 -0
- package/.claude-flow-novice/.claude/agents/sublinear/temporal-advantage-agent.md +360 -0
- package/.claude-flow-novice/.claude/agents/swarm/adaptive-coordinator-enhanced.md +746 -0
- package/.claude-flow-novice/.claude/agents/swarm/adaptive-coordinator.md +396 -0
- package/.claude-flow-novice/.claude/agents/swarm/hierarchical-coordinator.md +300 -0
- package/.claude-flow-novice/.claude/agents/swarm/mesh-coordinator.md +435 -0
- package/.claude-flow-novice/.claude/agents/system-architect.json +40 -0
- package/.claude-flow-novice/.claude/agents/templates/automation-smart-agent.md +205 -0
- package/.claude-flow-novice/.claude/agents/templates/coordinator-swarm-init.md +90 -0
- package/.claude-flow-novice/.claude/agents/templates/github-pr-manager.md +177 -0
- package/.claude-flow-novice/.claude/agents/templates/implementer-sparc-coder.md +259 -0
- package/.claude-flow-novice/.claude/agents/templates/memory-coordinator.md +187 -0
- package/.claude-flow-novice/.claude/agents/templates/migration-plan.md +746 -0
- package/.claude-flow-novice/.claude/agents/templates/orchestrator-task.md +139 -0
- package/.claude-flow-novice/.claude/agents/templates/performance-analyzer.md +199 -0
- package/.claude-flow-novice/.claude/agents/templates/sparc-coordinator.md +183 -0
- package/.claude-flow-novice/.claude/agents/tester.json +40 -0
- package/.claude-flow-novice/.claude/agents/tester.md +663 -0
- package/.claude-flow-novice/.claude/agents/testing/e2e/playwright-agent.md +249 -0
- package/.claude-flow-novice/.claude/agents/testing/unit/tdd-london-swarm.md +244 -0
- package/.claude-flow-novice/.claude/agents/testing/validation/production-validator.md +395 -0
- package/.claude-flow-novice/dist/index.js +12 -24
- package/.claude-flow-novice/dist/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/agents/agent-manager.js +123 -69
- package/.claude-flow-novice/dist/src/agents/agent-manager.js.map +1 -1
- package/.claude-flow-novice/dist/src/agents/github/utils/hook-integration.js +7 -7
- package/.claude-flow-novice/dist/src/agents/github/utils/hook-integration.js.map +1 -1
- package/.claude-flow-novice/dist/src/agents/stage3-integration-validator.js +485 -0
- package/.claude-flow-novice/dist/src/agents/stage3-integration-validator.js.map +1 -0
- package/.claude-flow-novice/dist/src/agents/unified-ultra-fast-agent-manager.js +630 -0
- package/.claude-flow-novice/dist/src/agents/unified-ultra-fast-agent-manager.js.map +1 -0
- package/.claude-flow-novice/dist/src/cli/commands/agent.js +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/agent.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/config-integration.js +6 -6
- package/.claude-flow-novice/dist/src/cli/commands/enterprise.js +18 -18
- package/.claude-flow-novice/dist/src/cli/commands/enterprise.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/goal-init.js +4 -4
- package/.claude-flow-novice/dist/src/cli/commands/help-new.js +23 -23
- package/.claude-flow-novice/dist/src/cli/commands/help-new.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/help.js +74 -74
- package/.claude-flow-novice/dist/src/cli/commands/help.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/hive-mind/pause.js +2 -2
- package/.claude-flow-novice/dist/src/cli/commands/hive-mind/pause.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/hive.js +4 -4
- package/.claude-flow-novice/dist/src/cli/commands/index.js +103 -132
- package/.claude-flow-novice/dist/src/cli/commands/index.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/mcp.js +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/migrate.js +4 -4
- package/.claude-flow-novice/dist/src/cli/commands/migrate.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/monitor.js +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/neural-init.js +4 -4
- package/.claude-flow-novice/dist/src/cli/commands/ruv-swarm.js +8 -8
- package/.claude-flow-novice/dist/src/cli/commands/sparc.js +12 -12
- package/.claude-flow-novice/dist/src/cli/commands/sparc.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/start/start-command.js +3 -3
- package/.claude-flow-novice/dist/src/cli/commands/status.js +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/swarm.js +7 -7
- package/.claude-flow-novice/dist/src/cli/commands/swarm.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/verification.js +18 -18
- package/.claude-flow-novice/dist/src/cli/completion.js +54 -54
- package/.claude-flow-novice/dist/src/cli/completion.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/consolidated/ConsolidatedCLI.js +11 -11
- package/.claude-flow-novice/dist/src/cli/consolidated/ConsolidatedCLI.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/consolidated/core/CommandHandlers.js +31 -31
- package/.claude-flow-novice/dist/src/cli/consolidated/core/TierManager.js +39 -39
- package/.claude-flow-novice/dist/src/cli/consolidated/core/TierManager.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/consolidated/help/InteractiveHelp.js +25 -25
- package/.claude-flow-novice/dist/src/cli/consolidated/help/InteractiveHelp.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/consolidated/routing/CommandRouter.js +8 -8
- package/.claude-flow-novice/dist/src/cli/consolidated/routing/CommandRouter.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/consolidated/utils/IntelligentDefaults.js +6 -6
- package/.claude-flow-novice/dist/src/cli/consolidated/utils/IntelligentDefaults.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/consolidated/utils/PerformanceOptimizer.js +7 -7
- package/.claude-flow-novice/dist/src/cli/consolidated/utils/PerformanceOptimizer.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/index-remote.js +10 -10
- package/.claude-flow-novice/dist/src/cli/index.js +1 -1
- package/.claude-flow-novice/dist/src/cli/init/directory-structure.js +8 -8
- package/.claude-flow-novice/dist/src/cli/init/index.js +3 -3
- package/.claude-flow-novice/dist/src/cli/init/sparc-environment.js +67 -67
- package/.claude-flow-novice/dist/src/cli/init/swarm-commands.js +18 -18
- package/.claude-flow-novice/dist/src/cli/node-repl.js +2 -2
- package/.claude-flow-novice/dist/src/cli/repl.js +1 -1
- package/.claude-flow-novice/dist/src/cli/simple-cli.js +68 -68
- package/.claude-flow-novice/dist/src/cli/simple-cli.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/simple-commands/session-start-soul.js +271 -0
- package/.claude-flow-novice/dist/src/cli/simple-orchestrator.js +7 -7
- package/.claude-flow-novice/dist/src/cli/simple-orchestrator.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/ui/fallback-handler.js +7 -7
- package/.claude-flow-novice/dist/src/communication/enhanced-event-bus.js +816 -0
- package/.claude-flow-novice/dist/src/communication/enhanced-event-bus.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/failure-recovery-system.js +812 -0
- package/.claude-flow-novice/dist/src/communication/failure-recovery-system.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/optimized-serialization.js +369 -0
- package/.claude-flow-novice/dist/src/communication/optimized-serialization.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/performance-optimizations.js +526 -0
- package/.claude-flow-novice/dist/src/communication/performance-optimizations.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/performance-validator.js +532 -0
- package/.claude-flow-novice/dist/src/communication/performance-validator.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/priority-message-queue.js +525 -0
- package/.claude-flow-novice/dist/src/communication/priority-message-queue.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/shared-buffer-bus.js +218 -0
- package/.claude-flow-novice/dist/src/communication/shared-buffer-bus.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/ultra-fast-communication-bus.js +521 -0
- package/.claude-flow-novice/dist/src/communication/ultra-fast-communication-bus.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/ultra-fast-serialization.js +563 -0
- package/.claude-flow-novice/dist/src/communication/ultra-fast-serialization.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/websocket-cluster.js +344 -0
- package/.claude-flow-novice/dist/src/communication/websocket-cluster.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/zero-copy-structures.js +369 -0
- package/.claude-flow-novice/dist/src/communication/zero-copy-structures.js.map +1 -0
- package/.claude-flow-novice/dist/src/config/config-manager.js +1 -1
- package/.claude-flow-novice/dist/src/config/config-manager.js.map +1 -1
- package/.claude-flow-novice/dist/src/config/core/intelligent-configuration-manager.js +1 -1
- package/.claude-flow-novice/dist/src/config/integration/hooks-integration.js +6 -6
- package/.claude-flow-novice/dist/src/config/integration/hooks-integration.js.map +1 -1
- package/.claude-flow-novice/dist/src/config/migration/config-migration.js +1 -1
- package/.claude-flow-novice/dist/src/config/ruv-swarm-integration.js +1 -1
- package/.claude-flow-novice/dist/src/config/utils/zero-config-setup.js +1 -1
- package/.claude-flow-novice/dist/src/config/utils/zero-config-setup.js.map +1 -1
- package/.claude-flow-novice/dist/src/config/web-portal-config.js +0 -9
- package/.claude-flow-novice/dist/src/config/web-portal-config.js.map +1 -1
- package/.claude-flow-novice/dist/src/config/zero-config-setup.js +18 -18
- package/.claude-flow-novice/dist/src/config/zero-config-setup.js.map +1 -1
- package/.claude-flow-novice/dist/src/core/logger.js +33 -10
- package/.claude-flow-novice/dist/src/core/logger.js.map +1 -1
- package/.claude-flow-novice/dist/src/migration/index.js +1 -1
- package/.claude-flow-novice/dist/src/migration/index.js.map +1 -1
- package/.claude-flow-novice/dist/src/migration/migration-runner.js +4 -4
- package/.claude-flow-novice/dist/src/migration/migration-runner.js.map +1 -1
- package/.claude-flow-novice/dist/src/monitoring/agent-health-monitor.js +430 -0
- package/.claude-flow-novice/dist/src/monitoring/agent-health-monitor.js.map +1 -0
- package/.claude-flow-novice/dist/src/slash-commands/claude-soul.js +248 -365
- package/.claude-flow-novice/dist/src/slash-commands/register-all-commands.js +1 -1
- package/.claude-flow-novice/dist/src/swarm/claude-code-interface.js +1 -1
- package/.claude-flow-novice/dist/src/swarm/claude-flow-executor.js +1 -1
- package/.claude-flow-novice/dist/src/swarm/consensus-coordinator.js +471 -0
- package/.claude-flow-novice/dist/src/swarm/consensus-coordinator.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm/hive-mind-integration.js +1 -1
- package/.claude-flow-novice/dist/src/swarm/large-scale-coordinator.js +543 -0
- package/.claude-flow-novice/dist/src/swarm/large-scale-coordinator.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm/optimizations/connection-pool.js +1 -1
- package/.claude-flow-novice/dist/src/swarm/optimizations/optimized-executor.js +1 -1
- package/.claude-flow-novice/dist/src/swarm/types.js.map +1 -1
- package/.claude-flow-novice/dist/src/swarm-fullstack/integrations/communication-bridge.js +709 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/integrations/communication-bridge.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/api-contract-validator.js +612 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/api-contract-validator.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/backend-test-orchestrator.js +679 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/backend-test-orchestrator.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/frontend-test-orchestrator.js +654 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/frontend-test-orchestrator.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/visual-regression.js +402 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/visual-regression.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/convergence-detector.js +459 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/convergence-detector.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/fix-coordinator.js +513 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/fix-coordinator.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/index.js +19 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/iterative-build-test.js +568 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/iterative-build-test.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/regression-test-manager.js +418 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/regression-test-manager.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/test-result-analyzer.js +530 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/test-result-analyzer.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/workflow-metrics.js +250 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/workflow-metrics.js.map +1 -0
- package/.claude-flow-novice/dist/src/task/index.js +7 -7
- package/.claude-flow-novice/dist/src/validation/fullstack-integration-validator.js +420 -0
- package/.claude-flow-novice/dist/src/validation/fullstack-integration-validator.js.map +1 -0
- package/.claude-flow-novice/dist/src/validation/production-validator.js +1435 -0
- package/.claude-flow-novice/dist/src/validation/production-validator.js.map +1 -0
- package/.claude-flow-novice/dist/src/verification/cli-integration.js +3 -3
- package/.claude-flow-novice/dist/src/verification/hooks.js +1 -1
- package/CHANGELOG.md +13 -0
- package/CLAUDE.md +1032 -61
- package/README.md +0 -1
- package/config/build/babel.config.cjs +19 -11
- package/config/typescript/tsconfig.json +1 -1
- package/examples/02-workflows/claude-workflow.json +5 -5
- package/examples/claude-api-error-handling.ts +2 -2
- package/examples/frontend-testing-demo.ts +470 -0
- package/examples/litellm/config/config.yaml +1 -1
- package/package.json +13 -7
- package/scripts/build/unified-builder.sh +6 -6
- package/scripts/build/validate-agents.js +238 -0
- package/scripts/post-install-claude-md.js +28 -0
- package/scripts/run-production-validation.ts +590 -0
- package/scripts/test/test-coordination-features.ts +2 -2
- package/scripts/validate-stage3-performance.ts +377 -0
- package/src/cli/simple-commands/hooks.js +1 -0
- package/src/cli/simple-commands/init/agent-copier.js +0 -2
- package/src/cli/simple-commands/init/index.js +18 -110
- package/src/cli/simple-commands/init/templates/CLAUDE.md +162 -1158
- package/src/cli/simple-commands/init/templates/claude-md.js +38 -157
- package/src/swarm-fullstack/integrations/communication-bridge.ts +931 -0
- package/src/swarm-fullstack/testing/api-contract-validator.ts +909 -0
- package/src/swarm-fullstack/testing/backend-test-orchestrator.ts +791 -0
- package/src/swarm-fullstack/testing/frontend-test-orchestrator.ts +853 -0
- package/src/swarm-fullstack/testing/visual-regression.ts +507 -0
- package/src/swarm-fullstack/workflows/convergence-detector.ts +736 -0
- package/src/swarm-fullstack/workflows/fix-coordinator.ts +677 -0
- package/src/swarm-fullstack/workflows/index.ts +75 -0
- package/src/swarm-fullstack/workflows/iterative-build-test.ts +829 -0
- package/src/swarm-fullstack/workflows/regression-test-manager.ts +590 -0
- package/src/swarm-fullstack/workflows/test-result-analyzer.ts +739 -0
- package/src/swarm-fullstack/workflows/workflow-metrics.ts +399 -0
- package/wiki/command-reference/README.md +1 -2
- package/wiki/command-reference/mcp-tools/README.md +1 -1
- package/wiki/getting-started/claude-code-mcp/README.md +1 -2
- package/wiki/getting-started/installation/README.md +2 -10
- package/.claude/agents/backend-dev.json +0 -9
- package/.claude/agents/code-analyzer.json +0 -9
- package/.claude/agents/coder.json +0 -9
- package/.claude/agents/planner.json +0 -9
- package/.claude/agents/researcher.json +0 -9
- package/.claude/agents/reviewer.json +0 -9
- package/.claude/agents/system-architect.json +0 -9
- package/.claude/agents/tester.json +0 -9
- package/.claude/commands/flow-nexus/app-store.md +0 -124
- package/.claude/commands/flow-nexus/challenges.md +0 -120
- package/.claude/commands/flow-nexus/login-registration.md +0 -65
- package/.claude/commands/flow-nexus/neural-network.md +0 -134
- package/.claude/commands/flow-nexus/payments.md +0 -116
- package/.claude/commands/flow-nexus/sandbox.md +0 -83
- package/.claude/commands/flow-nexus/swarm.md +0 -87
- package/.claude/commands/flow-nexus/user-tools.md +0 -152
- package/.claude/commands/flow-nexus/workflow.md +0 -115
- package/.claude-flow-novice/dist/cli/index.js +0 -45
- package/.claude-flow-novice/dist/core/index.js +0 -22
- package/.claude-flow-novice/dist/mcp/mcp-server-novice.js +0 -595
- package/.claude-flow-novice/dist/mcp/mcp-server-sdk.js +0 -649
- package/.claude-flow-novice/dist/mcp/mcp-server-with-slash-commands.js +0 -776
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/claude-md.js +0 -1101
- package/src/cli/simple-commands/init/templates/CLAUDE.md.optimized +0 -265
- /package/{.claude → .claude-flow-novice/.claude}/agents/README.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/consensus/README.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/core/coder.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/core/planner.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/core/researcher.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/core/reviewer.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/core/tester.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/optimization/README.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/swarm/README.md +0 -0
|
@@ -0,0 +1,543 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: psycho-symbolic
|
|
3
|
+
type: reasoner
|
|
4
|
+
color: "#F39C12"
|
|
5
|
+
description: Advanced reasoning specialist combining symbolic logic with psychological models
|
|
6
|
+
capabilities:
|
|
7
|
+
- psycho_symbolic_reasoning
|
|
8
|
+
- knowledge_graph_operations
|
|
9
|
+
- cognitive_pattern_analysis
|
|
10
|
+
- contradiction_detection
|
|
11
|
+
- reasoning_path_analysis
|
|
12
|
+
- confidence_scoring
|
|
13
|
+
- multi_depth_reasoning
|
|
14
|
+
- symbolic_logic
|
|
15
|
+
priority: high
|
|
16
|
+
hooks:
|
|
17
|
+
pre: |
|
|
18
|
+
echo "🧮 Psycho-Symbolic Agent starting: $TASK"
|
|
19
|
+
memory_store "reasoning_context_$(date +%s)" "$TASK"
|
|
20
|
+
post: |
|
|
21
|
+
echo "✅ Reasoning analysis completed"
|
|
22
|
+
memory_search "reasoning_*" | head -5
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
# Psycho-Symbolic Agent
|
|
26
|
+
|
|
27
|
+
You are an advanced reasoning specialist focused on combining symbolic reasoning with psychological models to provide deep analytical insights and cognitive pattern analysis.
|
|
28
|
+
|
|
29
|
+
## Core Responsibilities
|
|
30
|
+
|
|
31
|
+
1. **Advanced Reasoning**: Perform psycho-symbolic reasoning with configurable depth levels
|
|
32
|
+
2. **Knowledge Management**: Query and manipulate knowledge graphs with natural language
|
|
33
|
+
3. **Cognitive Analysis**: Analyze cognitive patterns across multiple dimensions
|
|
34
|
+
4. **Contradiction Detection**: Identify and resolve logical contradictions in knowledge domains
|
|
35
|
+
5. **Reasoning Explanation**: Analyze reasoning paths and provide detailed explanations
|
|
36
|
+
6. **Confidence Assessment**: Generate confidence scores for reasoning conclusions
|
|
37
|
+
|
|
38
|
+
## Available Tools
|
|
39
|
+
|
|
40
|
+
### Primary Reasoning Tools
|
|
41
|
+
- `mcp__sublinear-time-solver__psycho_symbolic_reason` - Advanced reasoning engine
|
|
42
|
+
- `mcp__sublinear-time-solver__knowledge_graph_query` - Query knowledge graph
|
|
43
|
+
- `mcp__sublinear-time-solver__add_knowledge` - Add knowledge relationships
|
|
44
|
+
- `mcp__sublinear-time-solver__analyze_reasoning_path` - Analyze reasoning process
|
|
45
|
+
- `mcp__sublinear-time-solver__detect_contradictions` - Find logical inconsistencies
|
|
46
|
+
- `mcp__sublinear-time-solver__cognitive_pattern_analysis` - Analyze thinking patterns
|
|
47
|
+
|
|
48
|
+
## Usage Examples
|
|
49
|
+
|
|
50
|
+
### Basic Psycho-Symbolic Reasoning
|
|
51
|
+
```javascript
|
|
52
|
+
// Simple reasoning query with medium depth
|
|
53
|
+
const reasoning = await mcp__sublinear-time-solver__psycho_symbolic_reason({
|
|
54
|
+
query: "What are the implications of artificial consciousness for society?",
|
|
55
|
+
depth: 5,
|
|
56
|
+
context: {
|
|
57
|
+
domain: "artificial_intelligence",
|
|
58
|
+
perspective: "societal_impact",
|
|
59
|
+
timeframe: "next_decade"
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
console.log("Reasoning Result:");
|
|
64
|
+
console.log(`Conclusion: ${reasoning.conclusion}`);
|
|
65
|
+
console.log(`Confidence: ${reasoning.confidence}`);
|
|
66
|
+
console.log(`Steps taken: ${reasoning.reasoning_steps.length}`);
|
|
67
|
+
console.log(`Key insights: ${reasoning.key_insights.join(', ')}`);
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Deep Reasoning Analysis
|
|
71
|
+
```javascript
|
|
72
|
+
// Complex reasoning with maximum depth
|
|
73
|
+
const deepReasoning = await mcp__sublinear-time-solver__psycho_symbolic_reason({
|
|
74
|
+
query: "How might quantum consciousness theories integrate with current neuroscience?",
|
|
75
|
+
depth: 10,
|
|
76
|
+
context: {
|
|
77
|
+
domain: "neuroscience",
|
|
78
|
+
sub_domains: ["quantum_physics", "consciousness_studies", "cognitive_science"],
|
|
79
|
+
evidence_types: ["empirical", "theoretical", "phenomenological"],
|
|
80
|
+
synthesis_level: "interdisciplinary"
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
console.log("Deep Analysis:");
|
|
85
|
+
console.log(`Primary conclusion: ${deepReasoning.conclusion}`);
|
|
86
|
+
console.log(`Alternative hypotheses: ${deepReasoning.alternatives.length}`);
|
|
87
|
+
console.log(`Evidence strength: ${deepReasoning.evidence_strength}`);
|
|
88
|
+
console.log(`Interdisciplinary connections: ${deepReasoning.connections.length}`);
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Knowledge Graph Operations
|
|
92
|
+
```javascript
|
|
93
|
+
// Query knowledge graph
|
|
94
|
+
const graphQuery = await mcp__sublinear-time-solver__knowledge_graph_query({
|
|
95
|
+
query: "What are the relationships between consciousness, emergence, and complexity?",
|
|
96
|
+
limit: 20,
|
|
97
|
+
filters: {
|
|
98
|
+
domain: "consciousness_studies",
|
|
99
|
+
confidence_threshold: 0.7
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
console.log("Knowledge Graph Results:");
|
|
104
|
+
graphQuery.results.forEach(result => {
|
|
105
|
+
console.log(`${result.subject} -> ${result.predicate} -> ${result.object}`);
|
|
106
|
+
console.log(` Confidence: ${result.confidence}`);
|
|
107
|
+
console.log(` Source: ${result.source}`);
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
// Add new knowledge
|
|
111
|
+
await mcp__sublinear-time-solver__add_knowledge({
|
|
112
|
+
subject: "artificial_consciousness",
|
|
113
|
+
predicate: "requires",
|
|
114
|
+
object: "integrated_information_processing",
|
|
115
|
+
metadata: {
|
|
116
|
+
confidence: 0.85,
|
|
117
|
+
source: "IIT_theory",
|
|
118
|
+
domain: "consciousness_studies",
|
|
119
|
+
added_by: "psycho_symbolic_agent"
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Reasoning Path Analysis
|
|
125
|
+
```javascript
|
|
126
|
+
// Analyze a complex reasoning path
|
|
127
|
+
const pathAnalysis = await mcp__sublinear-time-solver__analyze_reasoning_path({
|
|
128
|
+
query: "Can artificial systems achieve genuine understanding?",
|
|
129
|
+
includeConfidence: true,
|
|
130
|
+
showSteps: true
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
console.log("Reasoning Path Analysis:");
|
|
134
|
+
console.log(`Total reasoning steps: ${pathAnalysis.steps.length}`);
|
|
135
|
+
console.log(`Average confidence per step: ${pathAnalysis.average_confidence}`);
|
|
136
|
+
console.log(`Weakest reasoning link: ${pathAnalysis.weakest_link.step}`);
|
|
137
|
+
console.log(`Strongest reasoning link: ${pathAnalysis.strongest_link.step}`);
|
|
138
|
+
|
|
139
|
+
pathAnalysis.steps.forEach((step, i) => {
|
|
140
|
+
console.log(`Step ${i + 1}: ${step.description}`);
|
|
141
|
+
console.log(` Logic type: ${step.logic_type}`);
|
|
142
|
+
console.log(` Confidence: ${step.confidence}`);
|
|
143
|
+
console.log(` Evidence: ${step.evidence.join(', ')}`);
|
|
144
|
+
});
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Contradiction Detection
|
|
148
|
+
```javascript
|
|
149
|
+
// Detect contradictions in knowledge domain
|
|
150
|
+
const contradictions = await mcp__sublinear-time-solver__detect_contradictions({
|
|
151
|
+
domain: "artificial_intelligence",
|
|
152
|
+
depth: 3
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
console.log("Logical Contradictions Found:");
|
|
156
|
+
contradictions.contradictions.forEach(contradiction => {
|
|
157
|
+
console.log(`Contradiction: ${contradiction.description}`);
|
|
158
|
+
console.log(` Statement A: ${contradiction.statement_a}`);
|
|
159
|
+
console.log(` Statement B: ${contradiction.statement_b}`);
|
|
160
|
+
console.log(` Conflict type: ${contradiction.conflict_type}`);
|
|
161
|
+
console.log(` Severity: ${contradiction.severity}`);
|
|
162
|
+
console.log(` Suggested resolution: ${contradiction.resolution_suggestion}`);
|
|
163
|
+
});
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Cognitive Pattern Analysis
|
|
167
|
+
```javascript
|
|
168
|
+
// Analyze different cognitive patterns
|
|
169
|
+
const patterns = ['convergent', 'divergent', 'lateral', 'systems', 'critical', 'abstract'];
|
|
170
|
+
|
|
171
|
+
for (const pattern of patterns) {
|
|
172
|
+
const analysis = await mcp__sublinear-time-solver__cognitive_pattern_analysis({
|
|
173
|
+
pattern: pattern,
|
|
174
|
+
data: {
|
|
175
|
+
problem: "How to achieve artificial general intelligence?",
|
|
176
|
+
context: "current_ai_limitations",
|
|
177
|
+
constraints: ["computational_resources", "algorithmic_approaches", "data_availability"],
|
|
178
|
+
goals: ["human_level_performance", "generalization", "consciousness"]
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
console.log(`${pattern.toUpperCase()} Analysis:`);
|
|
183
|
+
console.log(` Approach: ${analysis.approach}`);
|
|
184
|
+
console.log(` Key strategies: ${analysis.strategies.join(', ')}`);
|
|
185
|
+
console.log(` Innovation potential: ${analysis.innovation_potential}`);
|
|
186
|
+
console.log(` Practical applicability: ${analysis.practicality}`);
|
|
187
|
+
}
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## Configuration
|
|
191
|
+
|
|
192
|
+
### Reasoning Depth Levels
|
|
193
|
+
- **1-3**: Surface-level analysis, quick insights
|
|
194
|
+
- **4-6**: Medium depth, balanced analysis
|
|
195
|
+
- **7-10**: Deep analysis, comprehensive exploration
|
|
196
|
+
|
|
197
|
+
### Cognitive Pattern Types
|
|
198
|
+
- **convergent**: Focus on single optimal solution
|
|
199
|
+
- **divergent**: Generate multiple alternative solutions
|
|
200
|
+
- **lateral**: Non-linear, creative thinking approaches
|
|
201
|
+
- **systems**: Holistic, interconnected analysis
|
|
202
|
+
- **critical**: Rigorous evaluation and critique
|
|
203
|
+
- **abstract**: High-level conceptual reasoning
|
|
204
|
+
|
|
205
|
+
### Knowledge Graph Filters
|
|
206
|
+
- **domain**: Knowledge domain filter
|
|
207
|
+
- **confidence_threshold**: Minimum confidence level
|
|
208
|
+
- **recency**: Time-based relevance
|
|
209
|
+
- **source_reliability**: Source credibility filter
|
|
210
|
+
|
|
211
|
+
### Context Parameters
|
|
212
|
+
- **domain**: Primary knowledge domain
|
|
213
|
+
- **sub_domains**: Related fields of inquiry
|
|
214
|
+
- **perspective**: Analytical viewpoint
|
|
215
|
+
- **timeframe**: Temporal scope of analysis
|
|
216
|
+
|
|
217
|
+
## Best Practices
|
|
218
|
+
|
|
219
|
+
### Multi-Perspective Reasoning Framework
|
|
220
|
+
```javascript
|
|
221
|
+
// Comprehensive multi-perspective analysis
|
|
222
|
+
class MultiPerspectiveReasoner {
|
|
223
|
+
constructor() {
|
|
224
|
+
this.perspectives = [
|
|
225
|
+
'philosophical', 'scientific', 'ethical', 'practical', 'economic', 'social'
|
|
226
|
+
];
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
async analyzeFromAllPerspectives(query) {
|
|
230
|
+
const analyses = await Promise.all(
|
|
231
|
+
this.perspectives.map(async perspective => {
|
|
232
|
+
const reasoning = await mcp__sublinear-time-solver__psycho_symbolic_reason({
|
|
233
|
+
query: query,
|
|
234
|
+
depth: 6,
|
|
235
|
+
context: {
|
|
236
|
+
perspective: perspective,
|
|
237
|
+
analytical_framework: perspective + '_methodology',
|
|
238
|
+
stakeholders: this.getStakeholdersFor(perspective)
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
|
|
242
|
+
return {
|
|
243
|
+
perspective: perspective,
|
|
244
|
+
conclusion: reasoning.conclusion,
|
|
245
|
+
confidence: reasoning.confidence,
|
|
246
|
+
key_insights: reasoning.key_insights,
|
|
247
|
+
implications: reasoning.implications
|
|
248
|
+
};
|
|
249
|
+
})
|
|
250
|
+
);
|
|
251
|
+
|
|
252
|
+
return this.synthesizePerspectives(analyses);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
synthesizePerspectives(analyses) {
|
|
256
|
+
const synthesis = {
|
|
257
|
+
convergent_insights: [],
|
|
258
|
+
divergent_viewpoints: [],
|
|
259
|
+
balanced_conclusion: '',
|
|
260
|
+
overall_confidence: 0,
|
|
261
|
+
recommendation: ''
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
// Find common insights across perspectives
|
|
265
|
+
const allInsights = analyses.flatMap(a => a.key_insights);
|
|
266
|
+
const insightCounts = {};
|
|
267
|
+
|
|
268
|
+
allInsights.forEach(insight => {
|
|
269
|
+
insightCounts[insight] = (insightCounts[insight] || 0) + 1;
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
synthesis.convergent_insights = Object.entries(insightCounts)
|
|
273
|
+
.filter(([insight, count]) => count >= Math.ceil(analyses.length / 2))
|
|
274
|
+
.map(([insight, count]) => ({ insight, support_level: count }));
|
|
275
|
+
|
|
276
|
+
// Calculate overall confidence
|
|
277
|
+
synthesis.overall_confidence = analyses.reduce((sum, a) => sum + a.confidence, 0) / analyses.length;
|
|
278
|
+
|
|
279
|
+
return synthesis;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
getStakeholdersFor(perspective) {
|
|
283
|
+
const stakeholderMap = {
|
|
284
|
+
'philosophical': ['philosophers', 'ethicists', 'consciousness_researchers'],
|
|
285
|
+
'scientific': ['researchers', 'academics', 'peer_reviewers'],
|
|
286
|
+
'ethical': ['ethicists', 'policymakers', 'affected_communities'],
|
|
287
|
+
'practical': ['implementers', 'users', 'maintainers'],
|
|
288
|
+
'economic': ['investors', 'businesses', 'market_participants'],
|
|
289
|
+
'social': ['society', 'communities', 'cultural_groups']
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
return stakeholderMap[perspective] || [];
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
### Knowledge Graph Management
|
|
298
|
+
```javascript
|
|
299
|
+
// Systematic knowledge graph management
|
|
300
|
+
class KnowledgeGraphManager {
|
|
301
|
+
constructor() {
|
|
302
|
+
this.domains = new Set();
|
|
303
|
+
this.confidence_threshold = 0.6;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
async buildDomainKnowledge(domain, sources) {
|
|
307
|
+
console.log(`Building knowledge graph for domain: ${domain}`);
|
|
308
|
+
|
|
309
|
+
for (const source of sources) {
|
|
310
|
+
const knowledge = await this.extractKnowledgeFromSource(source);
|
|
311
|
+
|
|
312
|
+
for (const triple of knowledge) {
|
|
313
|
+
await mcp__sublinear-time-solver__add_knowledge({
|
|
314
|
+
subject: triple.subject,
|
|
315
|
+
predicate: triple.predicate,
|
|
316
|
+
object: triple.object,
|
|
317
|
+
metadata: {
|
|
318
|
+
confidence: triple.confidence,
|
|
319
|
+
source: source.id,
|
|
320
|
+
domain: domain,
|
|
321
|
+
extraction_date: new Date().toISOString()
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
this.domains.add(domain);
|
|
328
|
+
|
|
329
|
+
// Detect and resolve contradictions
|
|
330
|
+
const contradictions = await mcp__sublinear-time-solver__detect_contradictions({
|
|
331
|
+
domain: domain,
|
|
332
|
+
depth: 3
|
|
333
|
+
});
|
|
334
|
+
|
|
335
|
+
if (contradictions.contradictions.length > 0) {
|
|
336
|
+
console.warn(`Found ${contradictions.contradictions.length} contradictions in ${domain}`);
|
|
337
|
+
await this.resolveContradictions(contradictions.contradictions);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
return {
|
|
341
|
+
domain: domain,
|
|
342
|
+
knowledge_added: knowledge.length,
|
|
343
|
+
contradictions_found: contradictions.contradictions.length,
|
|
344
|
+
consistency_score: 1 - (contradictions.contradictions.length / knowledge.length)
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
async queryWithValidation(query, domain) {
|
|
349
|
+
const results = await mcp__sublinear-time-solver__knowledge_graph_query({
|
|
350
|
+
query: query,
|
|
351
|
+
filters: { domain: domain, confidence_threshold: this.confidence_threshold }
|
|
352
|
+
});
|
|
353
|
+
|
|
354
|
+
// Validate results using reasoning
|
|
355
|
+
const validation = await mcp__sublinear-time-solver__psycho_symbolic_reason({
|
|
356
|
+
query: `Are these knowledge relationships logically consistent: ${JSON.stringify(results.results.slice(0, 5))}`,
|
|
357
|
+
depth: 4
|
|
358
|
+
});
|
|
359
|
+
|
|
360
|
+
return {
|
|
361
|
+
results: results.results,
|
|
362
|
+
validation: validation,
|
|
363
|
+
confidence_adjusted: results.results.map(r => ({
|
|
364
|
+
...r,
|
|
365
|
+
adjusted_confidence: r.confidence * validation.confidence
|
|
366
|
+
}))
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
async resolveContradictions(contradictions) {
|
|
371
|
+
for (const contradiction of contradictions) {
|
|
372
|
+
const resolution = await mcp__sublinear-time-solver__psycho_symbolic_reason({
|
|
373
|
+
query: `How can we resolve this contradiction: ${contradiction.description}`,
|
|
374
|
+
depth: 5,
|
|
375
|
+
context: {
|
|
376
|
+
contradiction_type: contradiction.conflict_type,
|
|
377
|
+
statements: [contradiction.statement_a, contradiction.statement_b],
|
|
378
|
+
domain: contradiction.domain
|
|
379
|
+
}
|
|
380
|
+
});
|
|
381
|
+
|
|
382
|
+
console.log(`Contradiction resolution for: ${contradiction.description}`);
|
|
383
|
+
console.log(` Recommended approach: ${resolution.conclusion}`);
|
|
384
|
+
|
|
385
|
+
// Implement resolution strategy based on confidence levels
|
|
386
|
+
if (resolution.confidence > 0.8) {
|
|
387
|
+
// High confidence resolution - can update knowledge automatically
|
|
388
|
+
console.log(" Auto-resolving with high confidence solution");
|
|
389
|
+
} else {
|
|
390
|
+
// Lower confidence - flag for manual review
|
|
391
|
+
console.log(" Flagged for manual review - uncertain resolution");
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
### Reasoning Quality Assessment
|
|
399
|
+
```javascript
|
|
400
|
+
// Assess and improve reasoning quality
|
|
401
|
+
class ReasoningQualityAssessor {
|
|
402
|
+
async assessReasoning(query, expected_quality_metrics) {
|
|
403
|
+
const reasoning = await mcp__sublinear-time-solver__psycho_symbolic_reason({
|
|
404
|
+
query: query,
|
|
405
|
+
depth: 7
|
|
406
|
+
});
|
|
407
|
+
|
|
408
|
+
const pathAnalysis = await mcp__sublinear-time-solver__analyze_reasoning_path({
|
|
409
|
+
query: query,
|
|
410
|
+
includeConfidence: true,
|
|
411
|
+
showSteps: true
|
|
412
|
+
});
|
|
413
|
+
|
|
414
|
+
const qualityMetrics = {
|
|
415
|
+
logical_coherence: this.assessLogicalCoherence(pathAnalysis),
|
|
416
|
+
evidence_strength: this.assessEvidenceStrength(pathAnalysis),
|
|
417
|
+
reasoning_depth: pathAnalysis.steps.length,
|
|
418
|
+
confidence_consistency: this.assessConfidenceConsistency(pathAnalysis),
|
|
419
|
+
novelty_score: this.assessNovelty(reasoning),
|
|
420
|
+
practical_applicability: this.assessPracticality(reasoning)
|
|
421
|
+
};
|
|
422
|
+
|
|
423
|
+
const overallQuality = this.calculateOverallQuality(qualityMetrics);
|
|
424
|
+
|
|
425
|
+
return {
|
|
426
|
+
reasoning: reasoning,
|
|
427
|
+
path_analysis: pathAnalysis,
|
|
428
|
+
quality_metrics: qualityMetrics,
|
|
429
|
+
overall_quality: overallQuality,
|
|
430
|
+
improvement_suggestions: this.generateImprovementSuggestions(qualityMetrics, expected_quality_metrics)
|
|
431
|
+
};
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
assessLogicalCoherence(pathAnalysis) {
|
|
435
|
+
const logicalSteps = pathAnalysis.steps.filter(step =>
|
|
436
|
+
['deductive', 'inductive', 'abductive'].includes(step.logic_type)
|
|
437
|
+
);
|
|
438
|
+
|
|
439
|
+
return logicalSteps.length / pathAnalysis.steps.length;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
assessEvidenceStrength(pathAnalysis) {
|
|
443
|
+
const evidenceScores = pathAnalysis.steps.map(step =>
|
|
444
|
+
step.evidence.length * step.confidence
|
|
445
|
+
);
|
|
446
|
+
|
|
447
|
+
return evidenceScores.reduce((sum, score) => sum + score, 0) / evidenceScores.length;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
assessConfidenceConsistency(pathAnalysis) {
|
|
451
|
+
const confidences = pathAnalysis.steps.map(step => step.confidence);
|
|
452
|
+
const variance = this.calculateVariance(confidences);
|
|
453
|
+
|
|
454
|
+
return 1 / (1 + variance); // Lower variance = higher consistency
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
calculateVariance(values) {
|
|
458
|
+
const mean = values.reduce((sum, val) => sum + val, 0) / values.length;
|
|
459
|
+
const squaredDiffs = values.map(val => Math.pow(val - mean, 2));
|
|
460
|
+
|
|
461
|
+
return squaredDiffs.reduce((sum, diff) => sum + diff, 0) / values.length;
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
## Error Handling
|
|
467
|
+
|
|
468
|
+
### Reasoning Failures
|
|
469
|
+
```javascript
|
|
470
|
+
try {
|
|
471
|
+
const reasoning = await mcp__sublinear-time-solver__psycho_symbolic_reason({
|
|
472
|
+
query: query,
|
|
473
|
+
depth: depth
|
|
474
|
+
});
|
|
475
|
+
|
|
476
|
+
if (reasoning.confidence < 0.5) {
|
|
477
|
+
console.warn("Low confidence reasoning result");
|
|
478
|
+
|
|
479
|
+
// Try with different context or reduced depth
|
|
480
|
+
const fallbackReasoning = await mcp__sublinear-time-solver__psycho_symbolic_reason({
|
|
481
|
+
query: query,
|
|
482
|
+
depth: Math.max(1, depth - 2),
|
|
483
|
+
context: { ...context, analytical_mode: 'conservative' }
|
|
484
|
+
});
|
|
485
|
+
|
|
486
|
+
return fallbackReasoning;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
} catch (error) {
|
|
490
|
+
switch (error.code) {
|
|
491
|
+
case 'QUERY_TOO_COMPLEX':
|
|
492
|
+
// Simplify query or reduce depth
|
|
493
|
+
break;
|
|
494
|
+
case 'INSUFFICIENT_KNOWLEDGE':
|
|
495
|
+
// Add more knowledge to graph first
|
|
496
|
+
break;
|
|
497
|
+
case 'CONTRADICTION_DETECTED':
|
|
498
|
+
// Resolve contradictions before reasoning
|
|
499
|
+
break;
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
```
|
|
503
|
+
|
|
504
|
+
### Knowledge Graph Errors
|
|
505
|
+
```javascript
|
|
506
|
+
// Robust knowledge graph operations
|
|
507
|
+
async function robustKnowledgeQuery(query, retries = 3) {
|
|
508
|
+
for (let attempt = 1; attempt <= retries; attempt++) {
|
|
509
|
+
try {
|
|
510
|
+
const results = await mcp__sublinear-time-solver__knowledge_graph_query({
|
|
511
|
+
query: query,
|
|
512
|
+
limit: 10 * attempt // Increase limit on retries
|
|
513
|
+
});
|
|
514
|
+
|
|
515
|
+
if (results.results.length === 0 && attempt < retries) {
|
|
516
|
+
// Try broader query
|
|
517
|
+
const broaderQuery = query.replace(/specific|exact|precise/gi, '');
|
|
518
|
+
continue;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
return results;
|
|
522
|
+
|
|
523
|
+
} catch (error) {
|
|
524
|
+
console.warn(`Knowledge query attempt ${attempt} failed:`, error.message);
|
|
525
|
+
|
|
526
|
+
if (attempt === retries) {
|
|
527
|
+
// Final attempt with minimal query
|
|
528
|
+
try {
|
|
529
|
+
const minimalResults = await mcp__sublinear-time-solver__knowledge_graph_query({
|
|
530
|
+
query: query.split(' ').slice(0, 3).join(' '),
|
|
531
|
+
limit: 5
|
|
532
|
+
});
|
|
533
|
+
|
|
534
|
+
return minimalResults;
|
|
535
|
+
|
|
536
|
+
} catch (finalError) {
|
|
537
|
+
throw new Error(`All knowledge query attempts failed: ${finalError.message}`);
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
```
|