@claude-flow/cli 3.0.2 → 3.1.0-alpha.2
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/analyze-code-quality.md +179 -0
- package/.claude/agents/analysis/code-analyzer.md +210 -0
- package/.claude/agents/analysis/code-review/analyze-code-quality.md +179 -0
- package/.claude/agents/architecture/arch-system-design.md +157 -0
- package/.claude/agents/architecture/system-design/arch-system-design.md +155 -0
- package/.claude/agents/browser/browser-agent.yaml +182 -0
- package/.claude/agents/consensus/byzantine-coordinator.md +63 -0
- package/.claude/agents/consensus/crdt-synchronizer.md +997 -0
- package/.claude/agents/consensus/gossip-coordinator.md +63 -0
- package/.claude/agents/consensus/performance-benchmarker.md +851 -0
- package/.claude/agents/consensus/quorum-manager.md +823 -0
- package/.claude/agents/consensus/raft-manager.md +63 -0
- package/.claude/agents/consensus/security-manager.md +622 -0
- package/.claude/agents/core/coder.md +453 -0
- package/.claude/agents/core/planner.md +375 -0
- package/.claude/agents/core/researcher.md +369 -0
- package/.claude/agents/core/reviewer.md +520 -0
- package/.claude/agents/core/tester.md +512 -0
- package/.claude/agents/custom/test-long-runner.md +44 -0
- package/.claude/agents/data/data-ml-model.md +445 -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/development/dev-backend-api.md +345 -0
- package/.claude/agents/devops/ci-cd/ops-cicd-github.md +164 -0
- package/.claude/agents/devops/ops-cicd-github.md +165 -0
- package/.claude/agents/documentation/api-docs/docs-api-openapi.md +174 -0
- package/.claude/agents/documentation/docs-api-openapi.md +355 -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 +377 -0
- package/.claude/agents/github/github-modes.md +173 -0
- package/.claude/agents/github/issue-tracker.md +576 -0
- package/.claude/agents/github/multi-repo-swarm.md +553 -0
- package/.claude/agents/github/pr-manager.md +438 -0
- package/.claude/agents/github/project-board-sync.md +509 -0
- package/.claude/agents/github/release-manager.md +605 -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 +903 -0
- package/.claude/agents/goal/agent.md +816 -0
- package/.claude/agents/goal/goal-planner.md +73 -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/payments/agentic-payments.md +126 -0
- package/.claude/agents/sona/sona-learning-optimizer.md +74 -0
- package/.claude/agents/sparc/architecture.md +699 -0
- package/.claude/agents/sparc/pseudocode.md +520 -0
- package/.claude/agents/sparc/refinement.md +802 -0
- package/.claude/agents/sparc/specification.md +478 -0
- package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +225 -0
- package/.claude/agents/specialized/spec-mobile-react-native.md +227 -0
- package/.claude/agents/sublinear/consensus-coordinator.md +338 -0
- package/.claude/agents/sublinear/matrix-optimizer.md +185 -0
- package/.claude/agents/sublinear/pagerank-analyzer.md +299 -0
- package/.claude/agents/sublinear/performance-optimizer.md +368 -0
- package/.claude/agents/sublinear/trading-predictor.md +246 -0
- package/.claude/agents/swarm/adaptive-coordinator.md +1127 -0
- package/.claude/agents/swarm/hierarchical-coordinator.md +710 -0
- package/.claude/agents/swarm/mesh-coordinator.md +963 -0
- package/.claude/agents/templates/automation-smart-agent.md +205 -0
- package/.claude/agents/templates/base-template-generator.md +268 -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/orchestrator-task.md +139 -0
- package/.claude/agents/templates/performance-analyzer.md +199 -0
- package/.claude/agents/templates/sparc-coordinator.md +514 -0
- package/.claude/agents/testing/production-validator.md +395 -0
- package/.claude/agents/testing/tdd-london-swarm.md +244 -0
- package/.claude/agents/v3/adr-architect.md +184 -0
- package/.claude/agents/v3/aidefence-guardian.md +282 -0
- package/.claude/agents/v3/claims-authorizer.md +208 -0
- package/.claude/agents/v3/collective-intelligence-coordinator.md +993 -0
- package/.claude/agents/v3/ddd-domain-expert.md +220 -0
- package/.claude/agents/v3/injection-analyst.md +236 -0
- package/.claude/agents/v3/memory-specialist.md +995 -0
- package/.claude/agents/v3/performance-engineer.md +1233 -0
- package/.claude/agents/v3/pii-detector.md +151 -0
- package/.claude/agents/v3/reasoningbank-learner.md +213 -0
- package/.claude/agents/v3/security-architect-aidefence.md +410 -0
- package/.claude/agents/v3/security-architect.md +867 -0
- package/.claude/agents/v3/security-auditor.md +771 -0
- package/.claude/agents/v3/sparc-orchestrator.md +182 -0
- package/.claude/agents/v3/swarm-memory-manager.md +157 -0
- package/.claude/agents/v3/v3-integration-architect.md +205 -0
- package/.claude/commands/agents/README.md +50 -0
- package/.claude/commands/agents/agent-capabilities.md +140 -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 +216 -0
- package/.claude/commands/agents/health.md +139 -0
- package/.claude/commands/agents/list.md +100 -0
- package/.claude/commands/agents/logs.md +130 -0
- package/.claude/commands/agents/metrics.md +122 -0
- package/.claude/commands/agents/pool.md +127 -0
- package/.claude/commands/agents/spawn.md +140 -0
- package/.claude/commands/agents/status.md +115 -0
- package/.claude/commands/agents/stop.md +102 -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/claude-flow-help.md +103 -0
- package/.claude/commands/claude-flow-memory.md +107 -0
- package/.claude/commands/claude-flow-swarm.md +205 -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/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/ask.md +97 -0
- package/.claude/commands/sparc/batch-executor.md +54 -0
- package/.claude/commands/sparc/code.md +89 -0
- package/.claude/commands/sparc/coder.md +54 -0
- package/.claude/commands/sparc/debug.md +83 -0
- package/.claude/commands/sparc/debugger.md +54 -0
- package/.claude/commands/sparc/designer.md +53 -0
- package/.claude/commands/sparc/devops.md +109 -0
- package/.claude/commands/sparc/docs-writer.md +80 -0
- package/.claude/commands/sparc/documenter.md +54 -0
- package/.claude/commands/sparc/innovator.md +54 -0
- package/.claude/commands/sparc/integration.md +83 -0
- package/.claude/commands/sparc/mcp.md +117 -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/post-deployment-monitoring-mode.md +83 -0
- package/.claude/commands/sparc/refinement-optimization-mode.md +83 -0
- package/.claude/commands/sparc/researcher.md +54 -0
- package/.claude/commands/sparc/reviewer.md +54 -0
- package/.claude/commands/sparc/security-review.md +80 -0
- package/.claude/commands/sparc/sparc-modes.md +174 -0
- package/.claude/commands/sparc/sparc.md +111 -0
- package/.claude/commands/sparc/spec-pseudocode.md +80 -0
- package/.claude/commands/sparc/supabase-admin.md +348 -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/tutorial.md +79 -0
- package/.claude/commands/sparc/workflow-manager.md +54 -0
- package/.claude/commands/sparc.md +166 -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 +87 -0
- package/.claude/commands/swarm/testing.md +131 -0
- package/.claude/commands/training/README.md +9 -0
- package/.claude/commands/training/model-update.md +25 -0
- package/.claude/commands/training/neural-patterns.md +108 -0
- package/.claude/commands/training/neural-train.md +75 -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/README.md +97 -0
- package/.claude/helpers/adr-compliance.sh +186 -0
- package/.claude/helpers/auto-commit.sh +178 -0
- package/.claude/helpers/checkpoint-manager.sh +251 -0
- package/.claude/helpers/daemon-manager.sh +252 -0
- package/.claude/helpers/ddd-tracker.sh +144 -0
- package/.claude/helpers/github-safe.js +106 -0
- package/.claude/helpers/github-setup.sh +28 -0
- package/.claude/helpers/guidance-hook.sh +13 -0
- package/.claude/helpers/guidance-hooks.sh +102 -0
- package/.claude/helpers/health-monitor.sh +108 -0
- package/.claude/helpers/learning-hooks.sh +329 -0
- package/.claude/helpers/learning-optimizer.sh +127 -0
- package/.claude/helpers/learning-service.mjs +1144 -0
- package/.claude/helpers/memory.js +83 -0
- package/.claude/helpers/metrics-db.mjs +488 -0
- package/.claude/helpers/pattern-consolidator.sh +86 -0
- package/.claude/helpers/perf-worker.sh +160 -0
- package/.claude/helpers/post-commit +16 -0
- package/.claude/helpers/pre-commit +26 -0
- package/.claude/helpers/quick-start.sh +19 -0
- package/.claude/helpers/router.js +66 -0
- package/.claude/helpers/security-scanner.sh +127 -0
- package/.claude/helpers/session.js +127 -0
- package/.claude/helpers/setup-mcp.sh +18 -0
- package/.claude/helpers/standard-checkpoint-hooks.sh +189 -0
- package/.claude/helpers/statusline-hook.sh +21 -0
- package/.claude/helpers/statusline.cjs +509 -0
- package/.claude/helpers/statusline.js +316 -0
- package/.claude/helpers/swarm-comms.sh +353 -0
- package/.claude/helpers/swarm-hooks.sh +761 -0
- package/.claude/helpers/swarm-monitor.sh +211 -0
- package/.claude/helpers/sync-v3-metrics.sh +245 -0
- package/.claude/helpers/update-v3-progress.sh +166 -0
- package/.claude/helpers/v3-quick-status.sh +58 -0
- package/.claude/helpers/v3.sh +111 -0
- package/.claude/helpers/validate-v3-config.sh +216 -0
- package/.claude/helpers/worker-manager.sh +170 -0
- package/.claude/settings.json +237 -0
- package/.claude/skills/agentdb-advanced/SKILL.md +550 -0
- package/.claude/skills/agentdb-learning/SKILL.md +545 -0
- package/.claude/skills/agentdb-memory-patterns/SKILL.md +339 -0
- package/.claude/skills/agentdb-optimization/SKILL.md +509 -0
- package/.claude/skills/agentdb-vector-search/SKILL.md +339 -0
- package/.claude/skills/agentic-jujutsu/SKILL.md +645 -0
- package/.claude/skills/aidefence-scan.md +151 -0
- package/.claude/skills/aidefence.yaml +297 -0
- package/.claude/skills/browser/SKILL.md +204 -0
- package/.claude/skills/flow-nexus-neural/SKILL.md +738 -0
- package/.claude/skills/flow-nexus-platform/SKILL.md +1157 -0
- package/.claude/skills/flow-nexus-swarm/SKILL.md +610 -0
- package/.claude/skills/github-code-review/SKILL.md +1140 -0
- package/.claude/skills/github-multi-repo/SKILL.md +874 -0
- package/.claude/skills/github-project-management/SKILL.md +1277 -0
- package/.claude/skills/github-release-management/SKILL.md +1081 -0
- package/.claude/skills/github-workflow-automation/SKILL.md +1065 -0
- package/.claude/skills/hive-mind-advanced/SKILL.md +712 -0
- package/.claude/skills/hooks-automation/SKILL.md +1201 -0
- package/.claude/skills/pair-programming/SKILL.md +1202 -0
- package/.claude/skills/performance-analysis/SKILL.md +563 -0
- package/.claude/skills/reasoningbank-agentdb/SKILL.md +446 -0
- package/.claude/skills/reasoningbank-intelligence/SKILL.md +201 -0
- package/.claude/skills/secure-review.md +181 -0
- package/{.claude-flow → .claude/skills/skill-builder/.claude-flow}/metrics/performance.json +3 -3
- package/.claude/skills/skill-builder/.claude-flow/metrics/task-metrics.json +10 -0
- package/.claude/skills/skill-builder/SKILL.md +910 -0
- package/.claude/skills/sparc-methodology/SKILL.md +1115 -0
- package/.claude/skills/stream-chain/SKILL.md +563 -0
- package/.claude/skills/swarm-advanced/SKILL.md +973 -0
- package/.claude/skills/swarm-orchestration/SKILL.md +179 -0
- package/.claude/skills/v3-cli-modernization/SKILL.md +872 -0
- package/.claude/skills/v3-core-implementation/SKILL.md +797 -0
- package/.claude/skills/v3-ddd-architecture/SKILL.md +442 -0
- package/.claude/skills/v3-integration-deep/SKILL.md +241 -0
- package/.claude/skills/v3-mcp-optimization/SKILL.md +777 -0
- package/.claude/skills/v3-memory-unification/SKILL.md +174 -0
- package/.claude/skills/v3-performance-optimization/SKILL.md +390 -0
- package/.claude/skills/v3-security-overhaul/SKILL.md +82 -0
- package/.claude/skills/v3-swarm-coordination/SKILL.md +340 -0
- package/.claude/skills/verification-quality/SKILL.md +649 -0
- package/.claude/skills/worker-benchmarks/skill.md +135 -0
- package/.claude/skills/worker-integration/skill.md +154 -0
- package/README.md +6512 -850
- package/bin/cli.js +144 -6
- package/bin/mcp-server.js +189 -0
- package/dist/src/benchmarks/pretrain/index.d.ts +58 -0
- package/dist/src/benchmarks/pretrain/index.d.ts.map +1 -0
- package/dist/src/benchmarks/pretrain/index.js +404 -0
- package/dist/src/benchmarks/pretrain/index.js.map +1 -0
- package/dist/src/commands/agent.d.ts.map +1 -1
- package/dist/src/commands/agent.js +49 -33
- package/dist/src/commands/agent.js.map +1 -1
- package/dist/src/commands/analyze.d.ts +19 -0
- package/dist/src/commands/analyze.d.ts.map +1 -0
- package/dist/src/commands/analyze.js +1823 -0
- package/dist/src/commands/analyze.js.map +1 -0
- package/dist/src/commands/benchmark.d.ts +10 -0
- package/dist/src/commands/benchmark.d.ts.map +1 -0
- package/dist/src/commands/benchmark.js +459 -0
- package/dist/src/commands/benchmark.js.map +1 -0
- package/dist/src/commands/categories.d.ts +75 -0
- package/dist/src/commands/categories.d.ts.map +1 -0
- package/dist/src/commands/categories.js +178 -0
- package/dist/src/commands/categories.js.map +1 -0
- package/dist/src/commands/claims.d.ts +10 -0
- package/dist/src/commands/claims.d.ts.map +1 -0
- package/dist/src/commands/claims.js +373 -0
- package/dist/src/commands/claims.js.map +1 -0
- package/dist/src/commands/completions.d.ts +10 -0
- package/dist/src/commands/completions.d.ts.map +1 -0
- package/dist/src/commands/completions.js +539 -0
- package/dist/src/commands/completions.js.map +1 -0
- package/dist/src/commands/config.js +1 -1
- package/dist/src/commands/config.js.map +1 -1
- package/dist/src/commands/daemon.d.ts +8 -0
- package/dist/src/commands/daemon.d.ts.map +1 -0
- package/dist/src/commands/daemon.js +593 -0
- package/dist/src/commands/daemon.js.map +1 -0
- package/dist/src/commands/deployment.d.ts +10 -0
- package/dist/src/commands/deployment.d.ts.map +1 -0
- package/dist/src/commands/deployment.js +289 -0
- package/dist/src/commands/deployment.js.map +1 -0
- package/dist/src/commands/doctor.d.ts +10 -0
- package/dist/src/commands/doctor.d.ts.map +1 -0
- package/dist/src/commands/doctor.js +571 -0
- package/dist/src/commands/doctor.js.map +1 -0
- package/dist/src/commands/embeddings.d.ts +18 -0
- package/dist/src/commands/embeddings.d.ts.map +1 -0
- package/dist/src/commands/embeddings.js +1576 -0
- package/dist/src/commands/embeddings.js.map +1 -0
- package/dist/src/commands/guidance.d.ts +8 -0
- package/dist/src/commands/guidance.d.ts.map +1 -0
- package/dist/src/commands/guidance.js +560 -0
- package/dist/src/commands/guidance.js.map +1 -0
- package/dist/src/commands/hive-mind.d.ts +3 -0
- package/dist/src/commands/hive-mind.d.ts.map +1 -1
- package/dist/src/commands/hive-mind.js +673 -70
- package/dist/src/commands/hive-mind.js.map +1 -1
- package/dist/src/commands/hooks.d.ts.map +1 -1
- package/dist/src/commands/hooks.js +1503 -52
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/commands/index.d.ts +70 -13
- package/dist/src/commands/index.d.ts.map +1 -1
- package/dist/src/commands/index.js +287 -33
- package/dist/src/commands/index.js.map +1 -1
- package/dist/src/commands/init.d.ts.map +1 -1
- package/dist/src/commands/init.js +259 -13
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/issues.d.ts +21 -0
- package/dist/src/commands/issues.d.ts.map +1 -0
- package/dist/src/commands/issues.js +567 -0
- package/dist/src/commands/issues.js.map +1 -0
- package/dist/src/commands/mcp.d.ts.map +1 -1
- package/dist/src/commands/mcp.js +75 -37
- package/dist/src/commands/mcp.js.map +1 -1
- package/dist/src/commands/memory.d.ts.map +1 -1
- package/dist/src/commands/memory.js +355 -74
- package/dist/src/commands/memory.js.map +1 -1
- package/dist/src/commands/migrate.d.ts.map +1 -1
- package/dist/src/commands/migrate.js +15 -3
- package/dist/src/commands/migrate.js.map +1 -1
- package/dist/src/commands/neural.d.ts +10 -0
- package/dist/src/commands/neural.d.ts.map +1 -0
- package/dist/src/commands/neural.js +1448 -0
- package/dist/src/commands/neural.js.map +1 -0
- package/dist/src/commands/performance.d.ts +10 -0
- package/dist/src/commands/performance.d.ts.map +1 -0
- package/dist/src/commands/performance.js +579 -0
- package/dist/src/commands/performance.js.map +1 -0
- package/dist/src/commands/plugins.d.ts +11 -0
- package/dist/src/commands/plugins.d.ts.map +1 -0
- package/dist/src/commands/plugins.js +820 -0
- package/dist/src/commands/plugins.js.map +1 -0
- package/dist/src/commands/progress.d.ts +11 -0
- package/dist/src/commands/progress.d.ts.map +1 -0
- package/dist/src/commands/progress.js +259 -0
- package/dist/src/commands/progress.js.map +1 -0
- package/dist/src/commands/providers.d.ts +10 -0
- package/dist/src/commands/providers.d.ts.map +1 -0
- package/dist/src/commands/providers.js +232 -0
- package/dist/src/commands/providers.js.map +1 -0
- package/dist/src/commands/route.d.ts +16 -0
- package/dist/src/commands/route.d.ts.map +1 -0
- package/dist/src/commands/route.js +813 -0
- package/dist/src/commands/route.js.map +1 -0
- package/dist/src/commands/ruvector/backup.d.ts +11 -0
- package/dist/src/commands/ruvector/backup.d.ts.map +1 -0
- package/dist/src/commands/ruvector/backup.js +746 -0
- package/dist/src/commands/ruvector/backup.js.map +1 -0
- package/dist/src/commands/ruvector/benchmark.d.ts +11 -0
- package/dist/src/commands/ruvector/benchmark.d.ts.map +1 -0
- package/dist/src/commands/ruvector/benchmark.js +480 -0
- package/dist/src/commands/ruvector/benchmark.js.map +1 -0
- package/dist/src/commands/ruvector/import.d.ts +18 -0
- package/dist/src/commands/ruvector/import.d.ts.map +1 -0
- package/dist/src/commands/ruvector/import.js +349 -0
- package/dist/src/commands/ruvector/import.js.map +1 -0
- package/dist/src/commands/ruvector/index.d.ts +29 -0
- package/dist/src/commands/ruvector/index.d.ts.map +1 -0
- package/dist/src/commands/ruvector/index.js +129 -0
- package/dist/src/commands/ruvector/index.js.map +1 -0
- package/dist/src/commands/ruvector/init.d.ts +11 -0
- package/dist/src/commands/ruvector/init.d.ts.map +1 -0
- package/dist/src/commands/ruvector/init.js +431 -0
- package/dist/src/commands/ruvector/init.js.map +1 -0
- package/dist/src/commands/ruvector/migrate.d.ts +11 -0
- package/dist/src/commands/ruvector/migrate.d.ts.map +1 -0
- package/dist/src/commands/ruvector/migrate.js +481 -0
- package/dist/src/commands/ruvector/migrate.js.map +1 -0
- package/dist/src/commands/ruvector/optimize.d.ts +11 -0
- package/dist/src/commands/ruvector/optimize.d.ts.map +1 -0
- package/dist/src/commands/ruvector/optimize.js +503 -0
- package/dist/src/commands/ruvector/optimize.js.map +1 -0
- package/dist/src/commands/ruvector/setup.d.ts +18 -0
- package/dist/src/commands/ruvector/setup.d.ts.map +1 -0
- package/dist/src/commands/ruvector/setup.js +765 -0
- package/dist/src/commands/ruvector/setup.js.map +1 -0
- package/dist/src/commands/ruvector/status.d.ts +11 -0
- package/dist/src/commands/ruvector/status.d.ts.map +1 -0
- package/dist/src/commands/ruvector/status.js +456 -0
- package/dist/src/commands/ruvector/status.js.map +1 -0
- package/dist/src/commands/security.d.ts +10 -0
- package/dist/src/commands/security.d.ts.map +1 -0
- package/dist/src/commands/security.js +575 -0
- package/dist/src/commands/security.js.map +1 -0
- package/dist/src/commands/session.js +9 -9
- package/dist/src/commands/start.d.ts.map +1 -1
- package/dist/src/commands/start.js +27 -7
- package/dist/src/commands/start.js.map +1 -1
- package/dist/src/commands/status.js +7 -7
- package/dist/src/commands/swarm.d.ts.map +1 -1
- package/dist/src/commands/swarm.js +214 -39
- package/dist/src/commands/swarm.js.map +1 -1
- package/dist/src/commands/task.js +8 -8
- package/dist/src/commands/transfer-store.d.ts +13 -0
- package/dist/src/commands/transfer-store.d.ts.map +1 -0
- package/dist/src/commands/transfer-store.js +428 -0
- package/dist/src/commands/transfer-store.js.map +1 -0
- package/dist/src/commands/update.d.ts +8 -0
- package/dist/src/commands/update.d.ts.map +1 -0
- package/dist/src/commands/update.js +276 -0
- package/dist/src/commands/update.js.map +1 -0
- package/dist/src/commands/workflow.js +5 -5
- package/dist/src/config-adapter.js +2 -1
- package/dist/src/config-adapter.js.map +1 -1
- package/dist/src/index.d.ts +22 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +153 -12
- package/dist/src/index.js.map +1 -1
- package/dist/src/init/claudemd-generator.d.ts +15 -5
- package/dist/src/init/claudemd-generator.d.ts.map +1 -1
- package/dist/src/init/claudemd-generator.js +399 -539
- package/dist/src/init/claudemd-generator.js.map +1 -1
- package/dist/src/init/executor.d.ts +24 -0
- package/dist/src/init/executor.d.ts.map +1 -1
- package/dist/src/init/executor.js +874 -38
- package/dist/src/init/executor.js.map +1 -1
- package/dist/src/init/helpers-generator.js +1 -1
- package/dist/src/init/helpers-generator.js.map +1 -1
- package/dist/src/init/index.d.ts +4 -3
- package/dist/src/init/index.d.ts.map +1 -1
- package/dist/src/init/index.js +2 -2
- package/dist/src/init/index.js.map +1 -1
- package/dist/src/init/mcp-generator.d.ts +9 -0
- package/dist/src/init/mcp-generator.d.ts.map +1 -1
- package/dist/src/init/mcp-generator.js +57 -28
- package/dist/src/init/mcp-generator.js.map +1 -1
- package/dist/src/init/settings-generator.d.ts.map +1 -1
- package/dist/src/init/settings-generator.js +126 -89
- package/dist/src/init/settings-generator.js.map +1 -1
- package/dist/src/init/statusline-generator.d.ts +6 -0
- package/dist/src/init/statusline-generator.d.ts.map +1 -1
- package/dist/src/init/statusline-generator.js +1119 -84
- package/dist/src/init/statusline-generator.js.map +1 -1
- package/dist/src/init/types.d.ts +37 -2
- package/dist/src/init/types.d.ts.map +1 -1
- package/dist/src/init/types.js +40 -3
- package/dist/src/init/types.js.map +1 -1
- package/dist/src/mcp-client.d.ts +3 -3
- package/dist/src/mcp-client.d.ts.map +1 -1
- package/dist/src/mcp-client.js +46 -4
- package/dist/src/mcp-client.js.map +1 -1
- package/dist/src/mcp-server.d.ts +9 -1
- package/dist/src/mcp-server.d.ts.map +1 -1
- package/dist/src/mcp-server.js +194 -46
- package/dist/src/mcp-server.js.map +1 -1
- package/dist/src/mcp-tools/agent-tools.d.ts +2 -1
- package/dist/src/mcp-tools/agent-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/agent-tools.js +479 -20
- package/dist/src/mcp-tools/agent-tools.js.map +1 -1
- package/dist/src/mcp-tools/analyze-tools.d.ts +38 -0
- package/dist/src/mcp-tools/analyze-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/analyze-tools.js +317 -0
- package/dist/src/mcp-tools/analyze-tools.js.map +1 -0
- package/dist/src/mcp-tools/auto-install.d.ts +83 -0
- package/dist/src/mcp-tools/auto-install.d.ts.map +1 -0
- package/dist/src/mcp-tools/auto-install.js +131 -0
- package/dist/src/mcp-tools/auto-install.js.map +1 -0
- package/dist/src/mcp-tools/browser-tools.d.ts +13 -0
- package/dist/src/mcp-tools/browser-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/browser-tools.js +550 -0
- package/dist/src/mcp-tools/browser-tools.js.map +1 -0
- package/dist/src/mcp-tools/claims-tools.d.ts +12 -0
- package/dist/src/mcp-tools/claims-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/claims-tools.js +732 -0
- package/dist/src/mcp-tools/claims-tools.js.map +1 -0
- package/dist/src/mcp-tools/config-tools.d.ts +1 -1
- package/dist/src/mcp-tools/config-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/config-tools.js +266 -19
- package/dist/src/mcp-tools/config-tools.js.map +1 -1
- package/dist/src/mcp-tools/coordination-tools.d.ts +13 -0
- package/dist/src/mcp-tools/coordination-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/coordination-tools.js +486 -0
- package/dist/src/mcp-tools/coordination-tools.js.map +1 -0
- package/dist/src/mcp-tools/daa-tools.d.ts +13 -0
- package/dist/src/mcp-tools/daa-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/daa-tools.js +426 -0
- package/dist/src/mcp-tools/daa-tools.js.map +1 -0
- package/dist/src/mcp-tools/embeddings-tools.d.ts +9 -0
- package/dist/src/mcp-tools/embeddings-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/embeddings-tools.js +782 -0
- package/dist/src/mcp-tools/embeddings-tools.js.map +1 -0
- package/dist/src/mcp-tools/github-tools.d.ts +13 -0
- package/dist/src/mcp-tools/github-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/github-tools.js +373 -0
- package/dist/src/mcp-tools/github-tools.js.map +1 -0
- package/dist/src/mcp-tools/hive-mind-tools.d.ts +8 -0
- package/dist/src/mcp-tools/hive-mind-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/hive-mind-tools.js +583 -0
- package/dist/src/mcp-tools/hive-mind-tools.js.map +1 -0
- package/dist/src/mcp-tools/hooks-tools.d.ts +3 -0
- package/dist/src/mcp-tools/hooks-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/hooks-tools.js +1307 -182
- package/dist/src/mcp-tools/hooks-tools.js.map +1 -1
- package/dist/src/mcp-tools/index.d.ts +9 -0
- package/dist/src/mcp-tools/index.d.ts.map +1 -1
- package/dist/src/mcp-tools/index.js +9 -0
- package/dist/src/mcp-tools/index.js.map +1 -1
- package/dist/src/mcp-tools/memory-tools.d.ts +8 -2
- package/dist/src/mcp-tools/memory-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/memory-tools.js +376 -132
- package/dist/src/mcp-tools/memory-tools.js.map +1 -1
- package/dist/src/mcp-tools/neural-tools.d.ts +16 -0
- package/dist/src/mcp-tools/neural-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/neural-tools.js +456 -0
- package/dist/src/mcp-tools/neural-tools.js.map +1 -0
- package/dist/src/mcp-tools/performance-tools.d.ts +16 -0
- package/dist/src/mcp-tools/performance-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/performance-tools.js +534 -0
- package/dist/src/mcp-tools/performance-tools.js.map +1 -0
- package/dist/src/mcp-tools/progress-tools.d.ts +14 -0
- package/dist/src/mcp-tools/progress-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/progress-tools.js +348 -0
- package/dist/src/mcp-tools/progress-tools.js.map +1 -0
- package/dist/src/mcp-tools/security-tools.d.ts +18 -0
- package/dist/src/mcp-tools/security-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/security-tools.js +434 -0
- package/dist/src/mcp-tools/security-tools.js.map +1 -0
- package/dist/src/mcp-tools/session-tools.d.ts +1 -1
- package/dist/src/mcp-tools/session-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/session-tools.js +241 -26
- package/dist/src/mcp-tools/session-tools.js.map +1 -1
- package/dist/src/mcp-tools/swarm-tools.js +4 -4
- package/dist/src/mcp-tools/system-tools.d.ts +13 -0
- package/dist/src/mcp-tools/system-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/system-tools.js +314 -0
- package/dist/src/mcp-tools/system-tools.js.map +1 -0
- package/dist/src/mcp-tools/task-tools.d.ts +1 -1
- package/dist/src/mcp-tools/task-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/task-tools.js +223 -21
- package/dist/src/mcp-tools/task-tools.js.map +1 -1
- package/dist/src/mcp-tools/terminal-tools.d.ts +13 -0
- package/dist/src/mcp-tools/terminal-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/terminal-tools.js +246 -0
- package/dist/src/mcp-tools/terminal-tools.js.map +1 -0
- package/dist/src/mcp-tools/transfer-tools.d.ts +14 -0
- package/dist/src/mcp-tools/transfer-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/transfer-tools.js +396 -0
- package/dist/src/mcp-tools/transfer-tools.js.map +1 -0
- package/dist/src/mcp-tools/workflow-tools.d.ts +8 -0
- package/dist/src/mcp-tools/workflow-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/workflow-tools.js +481 -0
- package/dist/src/mcp-tools/workflow-tools.js.map +1 -0
- package/dist/src/memory/ewc-consolidation.d.ts +271 -0
- package/dist/src/memory/ewc-consolidation.d.ts.map +1 -0
- package/dist/src/memory/ewc-consolidation.js +542 -0
- package/dist/src/memory/ewc-consolidation.js.map +1 -0
- package/dist/src/memory/intelligence.d.ts +285 -0
- package/dist/src/memory/intelligence.d.ts.map +1 -0
- package/dist/src/memory/intelligence.js +766 -0
- package/dist/src/memory/intelligence.js.map +1 -0
- package/dist/src/memory/memory-initializer.d.ts +395 -0
- package/dist/src/memory/memory-initializer.d.ts.map +1 -0
- package/dist/src/memory/memory-initializer.js +1924 -0
- package/dist/src/memory/memory-initializer.js.map +1 -0
- package/dist/src/memory/sona-optimizer.d.ts +227 -0
- package/dist/src/memory/sona-optimizer.d.ts.map +1 -0
- package/dist/src/memory/sona-optimizer.js +633 -0
- package/dist/src/memory/sona-optimizer.js.map +1 -0
- package/dist/src/output.d.ts +16 -0
- package/dist/src/output.d.ts.map +1 -1
- package/dist/src/output.js +42 -0
- package/dist/src/output.js.map +1 -1
- package/dist/src/parser.d.ts.map +1 -1
- package/dist/src/parser.js +27 -3
- package/dist/src/parser.js.map +1 -1
- package/dist/src/plugins/manager.d.ts +133 -0
- package/dist/src/plugins/manager.d.ts.map +1 -0
- package/dist/src/plugins/manager.js +383 -0
- package/dist/src/plugins/manager.js.map +1 -0
- package/dist/src/plugins/store/discovery.d.ts +88 -0
- package/dist/src/plugins/store/discovery.d.ts.map +1 -0
- package/dist/src/plugins/store/discovery.js +1147 -0
- package/dist/src/plugins/store/discovery.js.map +1 -0
- package/dist/src/plugins/store/index.d.ts +76 -0
- package/dist/src/plugins/store/index.d.ts.map +1 -0
- package/dist/src/plugins/store/index.js +141 -0
- package/dist/src/plugins/store/index.js.map +1 -0
- package/dist/src/plugins/store/search.d.ts +46 -0
- package/dist/src/plugins/store/search.d.ts.map +1 -0
- package/dist/src/plugins/store/search.js +230 -0
- package/dist/src/plugins/store/search.js.map +1 -0
- package/dist/src/plugins/store/types.d.ts +274 -0
- package/dist/src/plugins/store/types.d.ts.map +1 -0
- package/dist/src/plugins/store/types.js +7 -0
- package/dist/src/plugins/store/types.js.map +1 -0
- package/dist/src/plugins/tests/demo-plugin-store.d.ts +7 -0
- package/dist/src/plugins/tests/demo-plugin-store.d.ts.map +1 -0
- package/dist/src/plugins/tests/demo-plugin-store.js +126 -0
- package/dist/src/plugins/tests/demo-plugin-store.js.map +1 -0
- package/dist/src/plugins/tests/standalone-test.d.ts +12 -0
- package/dist/src/plugins/tests/standalone-test.d.ts.map +1 -0
- package/dist/src/plugins/tests/standalone-test.js +188 -0
- package/dist/src/plugins/tests/standalone-test.js.map +1 -0
- package/dist/src/plugins/tests/test-plugin-store.d.ts +7 -0
- package/dist/src/plugins/tests/test-plugin-store.d.ts.map +1 -0
- package/dist/src/plugins/tests/test-plugin-store.js +206 -0
- package/dist/src/plugins/tests/test-plugin-store.js.map +1 -0
- package/dist/src/production/circuit-breaker.d.ts +101 -0
- package/dist/src/production/circuit-breaker.d.ts.map +1 -0
- package/dist/src/production/circuit-breaker.js +241 -0
- package/dist/src/production/circuit-breaker.js.map +1 -0
- package/dist/src/production/error-handler.d.ts +92 -0
- package/dist/src/production/error-handler.d.ts.map +1 -0
- package/dist/src/production/error-handler.js +299 -0
- package/dist/src/production/error-handler.js.map +1 -0
- package/dist/src/production/index.d.ts +23 -0
- package/dist/src/production/index.d.ts.map +1 -0
- package/dist/src/production/index.js +18 -0
- package/dist/src/production/index.js.map +1 -0
- package/dist/src/production/monitoring.d.ts +161 -0
- package/dist/src/production/monitoring.d.ts.map +1 -0
- package/dist/src/production/monitoring.js +356 -0
- package/dist/src/production/monitoring.js.map +1 -0
- package/dist/src/production/rate-limiter.d.ts +80 -0
- package/dist/src/production/rate-limiter.d.ts.map +1 -0
- package/dist/src/production/rate-limiter.js +201 -0
- package/dist/src/production/rate-limiter.js.map +1 -0
- package/dist/src/production/retry.d.ts +48 -0
- package/dist/src/production/retry.d.ts.map +1 -0
- package/dist/src/production/retry.js +179 -0
- package/dist/src/production/retry.js.map +1 -0
- package/dist/src/runtime/headless.d.ts +60 -0
- package/dist/src/runtime/headless.d.ts.map +1 -0
- package/dist/src/runtime/headless.js +284 -0
- package/dist/src/runtime/headless.js.map +1 -0
- package/dist/src/ruvector/ast-analyzer.d.ts +67 -0
- package/dist/src/ruvector/ast-analyzer.d.ts.map +1 -0
- package/dist/src/ruvector/ast-analyzer.js +277 -0
- package/dist/src/ruvector/ast-analyzer.js.map +1 -0
- package/dist/src/ruvector/coverage-router.d.ts +160 -0
- package/dist/src/ruvector/coverage-router.d.ts.map +1 -0
- package/dist/src/ruvector/coverage-router.js +529 -0
- package/dist/src/ruvector/coverage-router.js.map +1 -0
- package/dist/src/ruvector/coverage-tools.d.ts +33 -0
- package/dist/src/ruvector/coverage-tools.d.ts.map +1 -0
- package/dist/src/ruvector/coverage-tools.js +157 -0
- package/dist/src/ruvector/coverage-tools.js.map +1 -0
- package/dist/src/ruvector/diff-classifier.d.ts +175 -0
- package/dist/src/ruvector/diff-classifier.d.ts.map +1 -0
- package/dist/src/ruvector/diff-classifier.js +698 -0
- package/dist/src/ruvector/diff-classifier.js.map +1 -0
- package/dist/src/ruvector/enhanced-model-router.d.ts +146 -0
- package/dist/src/ruvector/enhanced-model-router.d.ts.map +1 -0
- package/dist/src/ruvector/enhanced-model-router.js +519 -0
- package/dist/src/ruvector/enhanced-model-router.js.map +1 -0
- package/dist/src/ruvector/flash-attention.d.ts +195 -0
- package/dist/src/ruvector/flash-attention.d.ts.map +1 -0
- package/dist/src/ruvector/flash-attention.js +643 -0
- package/dist/src/ruvector/flash-attention.js.map +1 -0
- package/dist/src/ruvector/graph-analyzer.d.ts +187 -0
- package/dist/src/ruvector/graph-analyzer.d.ts.map +1 -0
- package/dist/src/ruvector/graph-analyzer.js +929 -0
- package/dist/src/ruvector/graph-analyzer.js.map +1 -0
- package/dist/src/ruvector/index.d.ts +34 -0
- package/dist/src/ruvector/index.d.ts.map +1 -0
- package/dist/src/ruvector/index.js +60 -0
- package/dist/src/ruvector/index.js.map +1 -0
- package/dist/src/ruvector/lora-adapter.d.ts +218 -0
- package/dist/src/ruvector/lora-adapter.d.ts.map +1 -0
- package/dist/src/ruvector/lora-adapter.js +455 -0
- package/dist/src/ruvector/lora-adapter.js.map +1 -0
- package/dist/src/ruvector/model-router.d.ts +220 -0
- package/dist/src/ruvector/model-router.d.ts.map +1 -0
- package/dist/src/ruvector/model-router.js +488 -0
- package/dist/src/ruvector/model-router.js.map +1 -0
- package/dist/src/ruvector/moe-router.d.ts +206 -0
- package/dist/src/ruvector/moe-router.d.ts.map +1 -0
- package/dist/src/ruvector/moe-router.js +626 -0
- package/dist/src/ruvector/moe-router.js.map +1 -0
- package/dist/src/ruvector/q-learning-router.d.ts +211 -0
- package/dist/src/ruvector/q-learning-router.d.ts.map +1 -0
- package/dist/src/ruvector/q-learning-router.js +681 -0
- package/dist/src/ruvector/q-learning-router.js.map +1 -0
- package/dist/src/ruvector/semantic-router.d.ts +77 -0
- package/dist/src/ruvector/semantic-router.d.ts.map +1 -0
- package/dist/src/ruvector/semantic-router.js +178 -0
- package/dist/src/ruvector/semantic-router.js.map +1 -0
- package/dist/src/ruvector/vector-db.d.ts +69 -0
- package/dist/src/ruvector/vector-db.d.ts.map +1 -0
- package/dist/src/ruvector/vector-db.js +243 -0
- package/dist/src/ruvector/vector-db.js.map +1 -0
- package/dist/src/services/claim-service.d.ts +204 -0
- package/dist/src/services/claim-service.d.ts.map +1 -0
- package/dist/src/services/claim-service.js +818 -0
- package/dist/src/services/claim-service.js.map +1 -0
- package/dist/src/services/container-worker-pool.d.ts +197 -0
- package/dist/src/services/container-worker-pool.d.ts.map +1 -0
- package/dist/src/services/container-worker-pool.js +581 -0
- package/dist/src/services/container-worker-pool.js.map +1 -0
- package/dist/src/services/headless-worker-executor.d.ts +304 -0
- package/dist/src/services/headless-worker-executor.d.ts.map +1 -0
- package/dist/src/services/headless-worker-executor.js +999 -0
- package/dist/src/services/headless-worker-executor.js.map +1 -0
- package/dist/src/services/index.d.ts +13 -0
- package/dist/src/services/index.d.ts.map +1 -0
- package/dist/src/services/index.js +11 -0
- package/dist/src/services/index.js.map +1 -0
- package/dist/src/services/registry-api.d.ts +58 -0
- package/dist/src/services/registry-api.d.ts.map +1 -0
- package/dist/src/services/registry-api.js +146 -0
- package/dist/src/services/registry-api.js.map +1 -0
- package/dist/src/services/ruvector-training.d.ts +213 -0
- package/dist/src/services/ruvector-training.d.ts.map +1 -0
- package/dist/src/services/ruvector-training.js +498 -0
- package/dist/src/services/ruvector-training.js.map +1 -0
- package/dist/src/services/worker-daemon.d.ts +203 -0
- package/dist/src/services/worker-daemon.d.ts.map +1 -0
- package/dist/src/services/worker-daemon.js +756 -0
- package/dist/src/services/worker-daemon.js.map +1 -0
- package/dist/src/services/worker-queue.d.ts +194 -0
- package/dist/src/services/worker-queue.d.ts.map +1 -0
- package/dist/src/services/worker-queue.js +511 -0
- package/dist/src/services/worker-queue.js.map +1 -0
- package/dist/src/suggest.d.ts +53 -0
- package/dist/src/suggest.d.ts.map +1 -0
- package/dist/src/suggest.js +200 -0
- package/dist/src/suggest.js.map +1 -0
- package/dist/src/tests/ruvector-integration-benchmark.d.ts +6 -0
- package/dist/src/tests/ruvector-integration-benchmark.d.ts.map +1 -0
- package/dist/src/tests/ruvector-integration-benchmark.js +385 -0
- package/dist/src/tests/ruvector-integration-benchmark.js.map +1 -0
- package/dist/src/transfer/anonymization/index.d.ts +25 -0
- package/dist/src/transfer/anonymization/index.d.ts.map +1 -0
- package/dist/src/transfer/anonymization/index.js +175 -0
- package/dist/src/transfer/anonymization/index.js.map +1 -0
- package/dist/src/transfer/deploy-seraphine.d.ts +13 -0
- package/dist/src/transfer/deploy-seraphine.d.ts.map +1 -0
- package/dist/src/transfer/deploy-seraphine.js +205 -0
- package/dist/src/transfer/deploy-seraphine.js.map +1 -0
- package/dist/src/transfer/export.d.ts +25 -0
- package/dist/src/transfer/export.d.ts.map +1 -0
- package/dist/src/transfer/export.js +113 -0
- package/dist/src/transfer/export.js.map +1 -0
- package/dist/src/transfer/index.d.ts +12 -0
- package/dist/src/transfer/index.d.ts.map +1 -0
- package/dist/src/transfer/index.js +31 -0
- package/dist/src/transfer/index.js.map +1 -0
- package/dist/src/transfer/ipfs/client.d.ts +109 -0
- package/dist/src/transfer/ipfs/client.d.ts.map +1 -0
- package/dist/src/transfer/ipfs/client.js +299 -0
- package/dist/src/transfer/ipfs/client.js.map +1 -0
- package/dist/src/transfer/ipfs/upload.d.ts +95 -0
- package/dist/src/transfer/ipfs/upload.d.ts.map +1 -0
- package/dist/src/transfer/ipfs/upload.js +413 -0
- package/dist/src/transfer/ipfs/upload.js.map +1 -0
- package/dist/src/transfer/models/seraphine.d.ts +72 -0
- package/dist/src/transfer/models/seraphine.d.ts.map +1 -0
- package/dist/src/transfer/models/seraphine.js +373 -0
- package/dist/src/transfer/models/seraphine.js.map +1 -0
- package/dist/src/transfer/serialization/cfp.d.ts +49 -0
- package/dist/src/transfer/serialization/cfp.d.ts.map +1 -0
- package/dist/src/transfer/serialization/cfp.js +180 -0
- package/dist/src/transfer/serialization/cfp.js.map +1 -0
- package/dist/src/transfer/storage/gcs.d.ts +82 -0
- package/dist/src/transfer/storage/gcs.d.ts.map +1 -0
- package/dist/src/transfer/storage/gcs.js +230 -0
- package/dist/src/transfer/storage/gcs.js.map +1 -0
- package/dist/src/transfer/storage/index.d.ts +6 -0
- package/dist/src/transfer/storage/index.d.ts.map +1 -0
- package/dist/src/transfer/storage/index.js +6 -0
- package/dist/src/transfer/storage/index.js.map +1 -0
- package/dist/src/transfer/store/discovery.d.ts +84 -0
- package/dist/src/transfer/store/discovery.d.ts.map +1 -0
- package/dist/src/transfer/store/discovery.js +382 -0
- package/dist/src/transfer/store/discovery.js.map +1 -0
- package/dist/src/transfer/store/download.d.ts +70 -0
- package/dist/src/transfer/store/download.d.ts.map +1 -0
- package/dist/src/transfer/store/download.js +334 -0
- package/dist/src/transfer/store/download.js.map +1 -0
- package/dist/src/transfer/store/index.d.ts +84 -0
- package/dist/src/transfer/store/index.d.ts.map +1 -0
- package/dist/src/transfer/store/index.js +153 -0
- package/dist/src/transfer/store/index.js.map +1 -0
- package/dist/src/transfer/store/publish.d.ts +76 -0
- package/dist/src/transfer/store/publish.d.ts.map +1 -0
- package/dist/src/transfer/store/publish.js +294 -0
- package/dist/src/transfer/store/publish.js.map +1 -0
- package/dist/src/transfer/store/registry.d.ts +58 -0
- package/dist/src/transfer/store/registry.d.ts.map +1 -0
- package/dist/src/transfer/store/registry.js +285 -0
- package/dist/src/transfer/store/registry.js.map +1 -0
- package/dist/src/transfer/store/search.d.ts +54 -0
- package/dist/src/transfer/store/search.d.ts.map +1 -0
- package/dist/src/transfer/store/search.js +232 -0
- package/dist/src/transfer/store/search.js.map +1 -0
- package/dist/src/transfer/store/tests/standalone-test.d.ts +12 -0
- package/dist/src/transfer/store/tests/standalone-test.d.ts.map +1 -0
- package/dist/src/transfer/store/tests/standalone-test.js +190 -0
- package/dist/src/transfer/store/tests/standalone-test.js.map +1 -0
- package/dist/src/transfer/store/types.d.ts +193 -0
- package/dist/src/transfer/store/types.d.ts.map +1 -0
- package/dist/src/transfer/store/types.js +6 -0
- package/dist/src/transfer/store/types.js.map +1 -0
- package/dist/src/transfer/test-seraphine.d.ts +6 -0
- package/dist/src/transfer/test-seraphine.d.ts.map +1 -0
- package/dist/src/transfer/test-seraphine.js +105 -0
- package/dist/src/transfer/test-seraphine.js.map +1 -0
- package/dist/src/transfer/tests/test-store.d.ts +7 -0
- package/dist/src/transfer/tests/test-store.d.ts.map +1 -0
- package/dist/src/transfer/tests/test-store.js +214 -0
- package/dist/src/transfer/tests/test-store.js.map +1 -0
- package/dist/src/transfer/types.d.ts +245 -0
- package/dist/src/transfer/types.d.ts.map +1 -0
- package/dist/src/transfer/types.js +6 -0
- package/dist/src/transfer/types.js.map +1 -0
- package/dist/src/types.d.ts +1 -1
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/update/checker.d.ts +34 -0
- package/dist/src/update/checker.d.ts.map +1 -0
- package/dist/src/update/checker.js +190 -0
- package/dist/src/update/checker.js.map +1 -0
- package/dist/src/update/executor.d.ts +32 -0
- package/dist/src/update/executor.d.ts.map +1 -0
- package/dist/src/update/executor.js +181 -0
- package/dist/src/update/executor.js.map +1 -0
- package/dist/src/update/index.d.ts +33 -0
- package/dist/src/update/index.d.ts.map +1 -0
- package/dist/src/update/index.js +64 -0
- package/dist/src/update/index.js.map +1 -0
- package/dist/src/update/rate-limiter.d.ts +20 -0
- package/dist/src/update/rate-limiter.d.ts.map +1 -0
- package/dist/src/update/rate-limiter.js +96 -0
- package/dist/src/update/rate-limiter.js.map +1 -0
- package/dist/src/update/validator.d.ts +17 -0
- package/dist/src/update/validator.d.ts.map +1 -0
- package/dist/src/update/validator.js +123 -0
- package/dist/src/update/validator.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +88 -11
- package/.agentic-flow/intelligence.json +0 -17
- package/.claude-flow/metrics/task-metrics.json +0 -10
- package/__tests__/README.md +0 -140
- package/__tests__/TEST_SUMMARY.md +0 -144
- package/__tests__/cli.test.ts +0 -558
- package/__tests__/commands.test.ts +0 -726
- package/__tests__/config-adapter.test.ts +0 -362
- package/__tests__/config-loading.test.ts +0 -106
- package/__tests__/coverage/.tmp/coverage-0.json +0 -1
- package/__tests__/coverage/.tmp/coverage-1.json +0 -1
- package/__tests__/coverage/.tmp/coverage-2.json +0 -1
- package/__tests__/coverage/.tmp/coverage-3.json +0 -1
- package/__tests__/coverage/.tmp/coverage-4.json +0 -1
- package/__tests__/coverage/.tmp/coverage-5.json +0 -1
- package/__tests__/mcp-client.test.ts +0 -480
- package/__tests__/p1-commands.test.ts +0 -1064
- package/docs/CONFIG_LOADING.md +0 -236
- package/docs/IMPLEMENTATION_COMPLETE.md +0 -421
- package/docs/MCP_CLIENT_GUIDE.md +0 -620
- package/docs/REFACTORING_SUMMARY.md +0 -247
- package/src/commands/agent.ts +0 -941
- package/src/commands/config.ts +0 -452
- package/src/commands/hive-mind.ts +0 -762
- package/src/commands/hooks.ts +0 -2603
- package/src/commands/index.ts +0 -115
- package/src/commands/init.ts +0 -597
- package/src/commands/mcp.ts +0 -753
- package/src/commands/memory.ts +0 -1161
- package/src/commands/migrate.ts +0 -447
- package/src/commands/process.ts +0 -695
- package/src/commands/session.ts +0 -891
- package/src/commands/start.ts +0 -457
- package/src/commands/status.ts +0 -736
- package/src/commands/swarm.ts +0 -648
- package/src/commands/task.ts +0 -792
- package/src/commands/workflow.ts +0 -742
- package/src/config-adapter.ts +0 -210
- package/src/index.ts +0 -400
- package/src/infrastructure/in-memory-repositories.ts +0 -310
- package/src/init/claudemd-generator.ts +0 -631
- package/src/init/executor.ts +0 -762
- package/src/init/helpers-generator.ts +0 -628
- package/src/init/index.ts +0 -60
- package/src/init/mcp-generator.ts +0 -83
- package/src/init/settings-generator.ts +0 -274
- package/src/init/statusline-generator.ts +0 -211
- package/src/init/types.ts +0 -447
- package/src/mcp-client.ts +0 -229
- package/src/mcp-server.ts +0 -577
- package/src/mcp-tools/agent-tools.ts +0 -92
- package/src/mcp-tools/config-tools.ts +0 -88
- package/src/mcp-tools/hooks-tools.ts +0 -1849
- package/src/mcp-tools/index.ts +0 -14
- package/src/mcp-tools/memory-tools.ts +0 -270
- package/src/mcp-tools/session-tools.ts +0 -102
- package/src/mcp-tools/swarm-tools.ts +0 -105
- package/src/mcp-tools/task-tools.ts +0 -102
- package/src/mcp-tools/types.ts +0 -33
- package/src/output.ts +0 -593
- package/src/parser.ts +0 -417
- package/src/prompt.ts +0 -619
- package/src/types.ts +0 -287
- package/tsconfig.json +0 -16
- package/tsconfig.tsbuildinfo +0 -1
- package/vitest.config.ts +0 -13
- /package/{tmp.json → .claude/agents/tmp.json} +0 -0
- /package/{.claude-flow → .claude/skills/skill-builder/.claude-flow}/metrics/agent-metrics.json +0 -0
|
@@ -9,12 +9,12 @@ import { dirname } from 'path';
|
|
|
9
9
|
// ESM-compatible __dirname
|
|
10
10
|
const __filename = fileURLToPath(import.meta.url);
|
|
11
11
|
const __dirname = dirname(__filename);
|
|
12
|
-
import { detectPlatform } from './types.js';
|
|
12
|
+
import { detectPlatform, DEFAULT_INIT_OPTIONS } from './types.js';
|
|
13
13
|
import { generateSettingsJson } from './settings-generator.js';
|
|
14
14
|
import { generateMCPJson } from './mcp-generator.js';
|
|
15
15
|
import { generateStatuslineScript, generateStatuslineHook } from './statusline-generator.js';
|
|
16
16
|
import { generatePreCommitHook, generatePostCommitHook, generateSessionManager, generateAgentRouter, generateMemoryHelper, } from './helpers-generator.js';
|
|
17
|
-
import { generateClaudeMd
|
|
17
|
+
import { generateClaudeMd } from './claudemd-generator.js';
|
|
18
18
|
/**
|
|
19
19
|
* Skills to copy based on configuration
|
|
20
20
|
*/
|
|
@@ -29,6 +29,7 @@ const SKILLS_MAP = {
|
|
|
29
29
|
'stream-chain',
|
|
30
30
|
'skill-builder',
|
|
31
31
|
],
|
|
32
|
+
browser: ['browser'], // agent-browser integration
|
|
32
33
|
agentdb: [
|
|
33
34
|
'agentdb-advanced',
|
|
34
35
|
'agentdb-learning',
|
|
@@ -85,6 +86,25 @@ const AGENTS_MAP = {
|
|
|
85
86
|
hiveMind: ['hive-mind'],
|
|
86
87
|
sparc: ['sparc'],
|
|
87
88
|
swarm: ['swarm'],
|
|
89
|
+
browser: ['browser'], // agent-browser integration
|
|
90
|
+
// V3-specific agents
|
|
91
|
+
v3: ['v3'],
|
|
92
|
+
optimization: ['optimization'],
|
|
93
|
+
templates: ['templates'],
|
|
94
|
+
testing: ['testing'],
|
|
95
|
+
sublinear: ['sublinear'],
|
|
96
|
+
flowNexus: ['flow-nexus'],
|
|
97
|
+
analysis: ['analysis'],
|
|
98
|
+
architecture: ['architecture'],
|
|
99
|
+
development: ['development'],
|
|
100
|
+
devops: ['devops'],
|
|
101
|
+
documentation: ['documentation'],
|
|
102
|
+
specialized: ['specialized'],
|
|
103
|
+
goal: ['goal'],
|
|
104
|
+
sona: ['sona'],
|
|
105
|
+
payments: ['payments'],
|
|
106
|
+
data: ['data'],
|
|
107
|
+
custom: ['custom'],
|
|
88
108
|
};
|
|
89
109
|
/**
|
|
90
110
|
* Directory structure to create
|
|
@@ -165,6 +185,10 @@ export async function executeInit(options) {
|
|
|
165
185
|
if (options.components.runtime) {
|
|
166
186
|
await writeRuntimeConfig(targetDir, options, result);
|
|
167
187
|
}
|
|
188
|
+
// Create initial metrics for statusline (prevents "all zeros" display)
|
|
189
|
+
if (options.components.statusline) {
|
|
190
|
+
await writeInitialMetrics(targetDir, options, result);
|
|
191
|
+
}
|
|
168
192
|
// Generate CLAUDE.md
|
|
169
193
|
if (options.components.claudeMd) {
|
|
170
194
|
await writeClaudeMd(targetDir, options, result);
|
|
@@ -178,6 +202,223 @@ export async function executeInit(options) {
|
|
|
178
202
|
}
|
|
179
203
|
return result;
|
|
180
204
|
}
|
|
205
|
+
/**
|
|
206
|
+
* Execute upgrade - updates helpers and creates missing metrics without losing data
|
|
207
|
+
* This is safe for existing users who want the latest statusline fixes
|
|
208
|
+
*/
|
|
209
|
+
export async function executeUpgrade(targetDir) {
|
|
210
|
+
const result = {
|
|
211
|
+
success: true,
|
|
212
|
+
updated: [],
|
|
213
|
+
created: [],
|
|
214
|
+
preserved: [],
|
|
215
|
+
errors: [],
|
|
216
|
+
};
|
|
217
|
+
try {
|
|
218
|
+
// Ensure required directories exist
|
|
219
|
+
const dirs = [
|
|
220
|
+
'.claude/helpers',
|
|
221
|
+
'.claude-flow/metrics',
|
|
222
|
+
'.claude-flow/security',
|
|
223
|
+
'.claude-flow/learning',
|
|
224
|
+
];
|
|
225
|
+
for (const dir of dirs) {
|
|
226
|
+
const fullPath = path.join(targetDir, dir);
|
|
227
|
+
if (!fs.existsSync(fullPath)) {
|
|
228
|
+
fs.mkdirSync(fullPath, { recursive: true });
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
// 1. ALWAYS update statusline helper (force overwrite)
|
|
232
|
+
const statuslinePath = path.join(targetDir, '.claude', 'helpers', 'statusline.cjs');
|
|
233
|
+
// Use default options with statusline config
|
|
234
|
+
const upgradeOptions = {
|
|
235
|
+
...DEFAULT_INIT_OPTIONS,
|
|
236
|
+
targetDir,
|
|
237
|
+
force: true,
|
|
238
|
+
statusline: {
|
|
239
|
+
...DEFAULT_INIT_OPTIONS.statusline,
|
|
240
|
+
refreshInterval: 5000,
|
|
241
|
+
},
|
|
242
|
+
};
|
|
243
|
+
const statuslineContent = generateStatuslineScript(upgradeOptions);
|
|
244
|
+
if (fs.existsSync(statuslinePath)) {
|
|
245
|
+
result.updated.push('.claude/helpers/statusline.cjs');
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
result.created.push('.claude/helpers/statusline.cjs');
|
|
249
|
+
}
|
|
250
|
+
fs.writeFileSync(statuslinePath, statuslineContent, 'utf-8');
|
|
251
|
+
// 2. Create MISSING metrics files only (preserve existing data)
|
|
252
|
+
const metricsDir = path.join(targetDir, '.claude-flow', 'metrics');
|
|
253
|
+
const securityDir = path.join(targetDir, '.claude-flow', 'security');
|
|
254
|
+
// v3-progress.json
|
|
255
|
+
const progressPath = path.join(metricsDir, 'v3-progress.json');
|
|
256
|
+
if (!fs.existsSync(progressPath)) {
|
|
257
|
+
const progress = {
|
|
258
|
+
version: '3.0.0',
|
|
259
|
+
initialized: new Date().toISOString(),
|
|
260
|
+
domains: { completed: 0, total: 5, status: 'INITIALIZING' },
|
|
261
|
+
ddd: { progress: 0, modules: 0, totalFiles: 0, totalLines: 0 },
|
|
262
|
+
swarm: { activeAgents: 0, maxAgents: 15, topology: 'hierarchical-mesh' },
|
|
263
|
+
learning: { status: 'READY', patternsLearned: 0, sessionsCompleted: 0 },
|
|
264
|
+
_note: 'Metrics will update as you use Claude Flow'
|
|
265
|
+
};
|
|
266
|
+
fs.writeFileSync(progressPath, JSON.stringify(progress, null, 2), 'utf-8');
|
|
267
|
+
result.created.push('.claude-flow/metrics/v3-progress.json');
|
|
268
|
+
}
|
|
269
|
+
else {
|
|
270
|
+
result.preserved.push('.claude-flow/metrics/v3-progress.json');
|
|
271
|
+
}
|
|
272
|
+
// swarm-activity.json
|
|
273
|
+
const activityPath = path.join(metricsDir, 'swarm-activity.json');
|
|
274
|
+
if (!fs.existsSync(activityPath)) {
|
|
275
|
+
const activity = {
|
|
276
|
+
timestamp: new Date().toISOString(),
|
|
277
|
+
processes: { agentic_flow: 0, mcp_server: 0, estimated_agents: 0 },
|
|
278
|
+
swarm: { active: false, agent_count: 0, coordination_active: false },
|
|
279
|
+
integration: { agentic_flow_active: false, mcp_active: false },
|
|
280
|
+
_initialized: true
|
|
281
|
+
};
|
|
282
|
+
fs.writeFileSync(activityPath, JSON.stringify(activity, null, 2), 'utf-8');
|
|
283
|
+
result.created.push('.claude-flow/metrics/swarm-activity.json');
|
|
284
|
+
}
|
|
285
|
+
else {
|
|
286
|
+
result.preserved.push('.claude-flow/metrics/swarm-activity.json');
|
|
287
|
+
}
|
|
288
|
+
// learning.json
|
|
289
|
+
const learningPath = path.join(metricsDir, 'learning.json');
|
|
290
|
+
if (!fs.existsSync(learningPath)) {
|
|
291
|
+
const learning = {
|
|
292
|
+
initialized: new Date().toISOString(),
|
|
293
|
+
routing: { accuracy: 0, decisions: 0 },
|
|
294
|
+
patterns: { shortTerm: 0, longTerm: 0, quality: 0 },
|
|
295
|
+
sessions: { total: 0, current: null },
|
|
296
|
+
_note: 'Intelligence grows as you use Claude Flow'
|
|
297
|
+
};
|
|
298
|
+
fs.writeFileSync(learningPath, JSON.stringify(learning, null, 2), 'utf-8');
|
|
299
|
+
result.created.push('.claude-flow/metrics/learning.json');
|
|
300
|
+
}
|
|
301
|
+
else {
|
|
302
|
+
result.preserved.push('.claude-flow/metrics/learning.json');
|
|
303
|
+
}
|
|
304
|
+
// audit-status.json
|
|
305
|
+
const auditPath = path.join(securityDir, 'audit-status.json');
|
|
306
|
+
if (!fs.existsSync(auditPath)) {
|
|
307
|
+
const audit = {
|
|
308
|
+
initialized: new Date().toISOString(),
|
|
309
|
+
status: 'PENDING',
|
|
310
|
+
cvesFixed: 0,
|
|
311
|
+
totalCves: 3,
|
|
312
|
+
lastScan: null,
|
|
313
|
+
_note: 'Run: npx @claude-flow/cli@latest security scan'
|
|
314
|
+
};
|
|
315
|
+
fs.writeFileSync(auditPath, JSON.stringify(audit, null, 2), 'utf-8');
|
|
316
|
+
result.created.push('.claude-flow/security/audit-status.json');
|
|
317
|
+
}
|
|
318
|
+
else {
|
|
319
|
+
result.preserved.push('.claude-flow/security/audit-status.json');
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
catch (error) {
|
|
323
|
+
result.success = false;
|
|
324
|
+
result.errors.push(error instanceof Error ? error.message : String(error));
|
|
325
|
+
}
|
|
326
|
+
return result;
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Execute upgrade with --add-missing flag
|
|
330
|
+
* Adds any new skills, agents, and commands that don't exist yet
|
|
331
|
+
*/
|
|
332
|
+
export async function executeUpgradeWithMissing(targetDir) {
|
|
333
|
+
// First do the normal upgrade
|
|
334
|
+
const result = await executeUpgrade(targetDir);
|
|
335
|
+
if (!result.success) {
|
|
336
|
+
return result;
|
|
337
|
+
}
|
|
338
|
+
// Initialize tracking arrays
|
|
339
|
+
result.addedSkills = [];
|
|
340
|
+
result.addedAgents = [];
|
|
341
|
+
result.addedCommands = [];
|
|
342
|
+
try {
|
|
343
|
+
// Ensure target directories exist
|
|
344
|
+
const skillsDir = path.join(targetDir, '.claude', 'skills');
|
|
345
|
+
const agentsDir = path.join(targetDir, '.claude', 'agents');
|
|
346
|
+
const commandsDir = path.join(targetDir, '.claude', 'commands');
|
|
347
|
+
for (const dir of [skillsDir, agentsDir, commandsDir]) {
|
|
348
|
+
if (!fs.existsSync(dir)) {
|
|
349
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
// Find source directories
|
|
353
|
+
const sourceSkillsDir = findSourceDir('skills');
|
|
354
|
+
const sourceAgentsDir = findSourceDir('agents');
|
|
355
|
+
const sourceCommandsDir = findSourceDir('commands');
|
|
356
|
+
// Debug: Log source directories found
|
|
357
|
+
if (process.env.DEBUG || process.env.CLAUDE_FLOW_DEBUG) {
|
|
358
|
+
console.log('[DEBUG] Source directories:');
|
|
359
|
+
console.log(` Skills: ${sourceSkillsDir || 'NOT FOUND'}`);
|
|
360
|
+
console.log(` Agents: ${sourceAgentsDir || 'NOT FOUND'}`);
|
|
361
|
+
console.log(` Commands: ${sourceCommandsDir || 'NOT FOUND'}`);
|
|
362
|
+
}
|
|
363
|
+
// Add missing skills
|
|
364
|
+
if (sourceSkillsDir) {
|
|
365
|
+
const allSkills = Object.values(SKILLS_MAP).flat();
|
|
366
|
+
const debugMode = process.env.DEBUG || process.env.CLAUDE_FLOW_DEBUG;
|
|
367
|
+
if (debugMode) {
|
|
368
|
+
console.log(`[DEBUG] Checking ${allSkills.length} skills from SKILLS_MAP`);
|
|
369
|
+
}
|
|
370
|
+
for (const skillName of [...new Set(allSkills)]) {
|
|
371
|
+
const sourcePath = path.join(sourceSkillsDir, skillName);
|
|
372
|
+
const targetPath = path.join(skillsDir, skillName);
|
|
373
|
+
const sourceExists = fs.existsSync(sourcePath);
|
|
374
|
+
const targetExists = fs.existsSync(targetPath);
|
|
375
|
+
if (debugMode) {
|
|
376
|
+
console.log(`[DEBUG] Skill '${skillName}': source=${sourceExists}, target=${targetExists}`);
|
|
377
|
+
}
|
|
378
|
+
if (sourceExists && !targetExists) {
|
|
379
|
+
copyDirRecursive(sourcePath, targetPath);
|
|
380
|
+
result.addedSkills.push(skillName);
|
|
381
|
+
result.created.push(`.claude/skills/${skillName}`);
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
// Add missing agents
|
|
386
|
+
if (sourceAgentsDir) {
|
|
387
|
+
const allAgents = Object.values(AGENTS_MAP).flat();
|
|
388
|
+
for (const agentCategory of [...new Set(allAgents)]) {
|
|
389
|
+
const sourcePath = path.join(sourceAgentsDir, agentCategory);
|
|
390
|
+
const targetPath = path.join(agentsDir, agentCategory);
|
|
391
|
+
if (fs.existsSync(sourcePath) && !fs.existsSync(targetPath)) {
|
|
392
|
+
copyDirRecursive(sourcePath, targetPath);
|
|
393
|
+
result.addedAgents.push(agentCategory);
|
|
394
|
+
result.created.push(`.claude/agents/${agentCategory}`);
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
// Add missing commands
|
|
399
|
+
if (sourceCommandsDir) {
|
|
400
|
+
const allCommands = Object.values(COMMANDS_MAP).flat();
|
|
401
|
+
for (const cmdName of [...new Set(allCommands)]) {
|
|
402
|
+
const sourcePath = path.join(sourceCommandsDir, cmdName);
|
|
403
|
+
const targetPath = path.join(commandsDir, cmdName);
|
|
404
|
+
if (fs.existsSync(sourcePath) && !fs.existsSync(targetPath)) {
|
|
405
|
+
if (fs.statSync(sourcePath).isDirectory()) {
|
|
406
|
+
copyDirRecursive(sourcePath, targetPath);
|
|
407
|
+
}
|
|
408
|
+
else {
|
|
409
|
+
fs.copyFileSync(sourcePath, targetPath);
|
|
410
|
+
}
|
|
411
|
+
result.addedCommands.push(cmdName);
|
|
412
|
+
result.created.push(`.claude/commands/${cmdName}`);
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
catch (error) {
|
|
418
|
+
result.errors.push(`Add missing failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
419
|
+
}
|
|
420
|
+
return result;
|
|
421
|
+
}
|
|
181
422
|
/**
|
|
182
423
|
* Create directory structure
|
|
183
424
|
*/
|
|
@@ -241,6 +482,8 @@ async function copySkills(targetDir, options, result) {
|
|
|
241
482
|
skillsToCopy.push(...SKILLS_MAP.github);
|
|
242
483
|
if (skillsConfig.flowNexus)
|
|
243
484
|
skillsToCopy.push(...SKILLS_MAP.flowNexus);
|
|
485
|
+
if (skillsConfig.browser)
|
|
486
|
+
skillsToCopy.push(...SKILLS_MAP.browser);
|
|
244
487
|
if (skillsConfig.v3)
|
|
245
488
|
skillsToCopy.push(...SKILLS_MAP.v3);
|
|
246
489
|
}
|
|
@@ -346,6 +589,15 @@ async function copyAgents(targetDir, options, result) {
|
|
|
346
589
|
agentsToCopy.push(...AGENTS_MAP.sparc);
|
|
347
590
|
if (agentsConfig.swarm)
|
|
348
591
|
agentsToCopy.push(...AGENTS_MAP.swarm);
|
|
592
|
+
if (agentsConfig.browser)
|
|
593
|
+
agentsToCopy.push(...AGENTS_MAP.browser);
|
|
594
|
+
// V3-specific agent categories
|
|
595
|
+
if (agentsConfig.v3)
|
|
596
|
+
agentsToCopy.push(...(AGENTS_MAP.v3 || []));
|
|
597
|
+
if (agentsConfig.optimization)
|
|
598
|
+
agentsToCopy.push(...(AGENTS_MAP.optimization || []));
|
|
599
|
+
if (agentsConfig.testing)
|
|
600
|
+
agentsToCopy.push(...(AGENTS_MAP.testing || []));
|
|
349
601
|
}
|
|
350
602
|
// Find source agents directory
|
|
351
603
|
const sourceAgentsDir = findSourceDir('agents', options.sourceBaseDir);
|
|
@@ -360,9 +612,10 @@ async function copyAgents(targetDir, options, result) {
|
|
|
360
612
|
if (fs.existsSync(sourcePath)) {
|
|
361
613
|
if (!fs.existsSync(targetPath) || options.force) {
|
|
362
614
|
copyDirRecursive(sourcePath, targetPath);
|
|
363
|
-
// Count agent files
|
|
364
|
-
const
|
|
365
|
-
|
|
615
|
+
// Count agent files (.yaml and .md)
|
|
616
|
+
const yamlFiles = countFiles(sourcePath, '.yaml');
|
|
617
|
+
const mdFiles = countFiles(sourcePath, '.md');
|
|
618
|
+
result.summary.agentsCount += yamlFiles + mdFiles;
|
|
366
619
|
result.created.files.push(`.claude/agents/${agentCategory}`);
|
|
367
620
|
}
|
|
368
621
|
else {
|
|
@@ -371,35 +624,79 @@ async function copyAgents(targetDir, options, result) {
|
|
|
371
624
|
}
|
|
372
625
|
}
|
|
373
626
|
}
|
|
627
|
+
/**
|
|
628
|
+
* Find source helpers directory
|
|
629
|
+
*/
|
|
630
|
+
function findSourceHelpersDir(sourceBaseDir) {
|
|
631
|
+
const possiblePaths = [];
|
|
632
|
+
// If explicit source base directory is provided, check it first
|
|
633
|
+
if (sourceBaseDir) {
|
|
634
|
+
possiblePaths.push(path.join(sourceBaseDir, '.claude', 'helpers'));
|
|
635
|
+
}
|
|
636
|
+
// IMPORTANT: Check the package's own .claude/helpers directory
|
|
637
|
+
// This is the primary path when running as an npm package
|
|
638
|
+
// __dirname is typically /path/to/node_modules/@claude-flow/cli/dist/src/init
|
|
639
|
+
// We need to go up 3 levels to reach the package root (dist/src/init -> dist/src -> dist -> root)
|
|
640
|
+
const packageRoot = path.resolve(__dirname, '..', '..', '..');
|
|
641
|
+
const packageHelpers = path.join(packageRoot, '.claude', 'helpers');
|
|
642
|
+
if (fs.existsSync(packageHelpers)) {
|
|
643
|
+
possiblePaths.unshift(packageHelpers); // Add to beginning (highest priority)
|
|
644
|
+
}
|
|
645
|
+
// From dist/src/init -> go up to project root
|
|
646
|
+
let currentDir = __dirname;
|
|
647
|
+
for (let i = 0; i < 10; i++) {
|
|
648
|
+
const parentDir = path.dirname(currentDir);
|
|
649
|
+
const helpersPath = path.join(parentDir, '.claude', 'helpers');
|
|
650
|
+
if (fs.existsSync(helpersPath)) {
|
|
651
|
+
possiblePaths.push(helpersPath);
|
|
652
|
+
}
|
|
653
|
+
currentDir = parentDir;
|
|
654
|
+
}
|
|
655
|
+
// Also check relative to process.cwd() for development
|
|
656
|
+
const cwdBased = [
|
|
657
|
+
path.join(process.cwd(), '.claude', 'helpers'),
|
|
658
|
+
path.join(process.cwd(), '..', '.claude', 'helpers'),
|
|
659
|
+
path.join(process.cwd(), '..', '..', '.claude', 'helpers'),
|
|
660
|
+
];
|
|
661
|
+
possiblePaths.push(...cwdBased);
|
|
662
|
+
for (const p of possiblePaths) {
|
|
663
|
+
if (fs.existsSync(p)) {
|
|
664
|
+
return p;
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
return null;
|
|
668
|
+
}
|
|
374
669
|
/**
|
|
375
670
|
* Write helper scripts
|
|
376
671
|
*/
|
|
377
672
|
async function writeHelpers(targetDir, options, result) {
|
|
378
673
|
const helpersDir = path.join(targetDir, '.claude', 'helpers');
|
|
379
|
-
|
|
674
|
+
// Find source helpers directory (works for npm package and local dev)
|
|
675
|
+
const sourceHelpersDir = findSourceHelpersDir(options.sourceBaseDir);
|
|
380
676
|
// Try to copy existing helpers from source first
|
|
381
|
-
if (
|
|
382
|
-
const
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
fs.chmodSync(destPath, '755');
|
|
396
|
-
}
|
|
397
|
-
result.created.files.push(`.claude/helpers/${file}`);
|
|
398
|
-
}
|
|
399
|
-
else {
|
|
400
|
-
result.skipped.push(`.claude/helpers/${file}`);
|
|
677
|
+
if (sourceHelpersDir && fs.existsSync(sourceHelpersDir)) {
|
|
678
|
+
const helperFiles = fs.readdirSync(sourceHelpersDir);
|
|
679
|
+
let copiedCount = 0;
|
|
680
|
+
for (const file of helperFiles) {
|
|
681
|
+
const sourcePath = path.join(sourceHelpersDir, file);
|
|
682
|
+
const destPath = path.join(helpersDir, file);
|
|
683
|
+
// Skip directories and only copy files
|
|
684
|
+
if (!fs.statSync(sourcePath).isFile())
|
|
685
|
+
continue;
|
|
686
|
+
if (!fs.existsSync(destPath) || options.force) {
|
|
687
|
+
fs.copyFileSync(sourcePath, destPath);
|
|
688
|
+
// Make shell scripts and mjs files executable
|
|
689
|
+
if (file.endsWith('.sh') || file.endsWith('.mjs')) {
|
|
690
|
+
fs.chmodSync(destPath, '755');
|
|
401
691
|
}
|
|
692
|
+
result.created.files.push(`.claude/helpers/${file}`);
|
|
693
|
+
copiedCount++;
|
|
694
|
+
}
|
|
695
|
+
else {
|
|
696
|
+
result.skipped.push(`.claude/helpers/${file}`);
|
|
402
697
|
}
|
|
698
|
+
}
|
|
699
|
+
if (copiedCount > 0) {
|
|
403
700
|
return; // Skip generating if we copied from source
|
|
404
701
|
}
|
|
405
702
|
}
|
|
@@ -426,28 +723,62 @@ async function writeHelpers(targetDir, options, result) {
|
|
|
426
723
|
}
|
|
427
724
|
}
|
|
428
725
|
}
|
|
726
|
+
/**
|
|
727
|
+
* Find source .claude directory for statusline files
|
|
728
|
+
*/
|
|
729
|
+
function findSourceClaudeDir(sourceBaseDir) {
|
|
730
|
+
const possiblePaths = [];
|
|
731
|
+
// If explicit source base directory is provided, check it first
|
|
732
|
+
if (sourceBaseDir) {
|
|
733
|
+
possiblePaths.push(path.join(sourceBaseDir, '.claude'));
|
|
734
|
+
}
|
|
735
|
+
// IMPORTANT: Check the package's own .claude directory
|
|
736
|
+
// Go up 3 levels: dist/src/init -> dist/src -> dist -> root
|
|
737
|
+
const packageRoot = path.resolve(__dirname, '..', '..', '..');
|
|
738
|
+
const packageClaude = path.join(packageRoot, '.claude');
|
|
739
|
+
if (fs.existsSync(packageClaude)) {
|
|
740
|
+
possiblePaths.unshift(packageClaude); // Add to beginning (highest priority)
|
|
741
|
+
}
|
|
742
|
+
// From dist/src/init -> go up to project root
|
|
743
|
+
let currentDir = __dirname;
|
|
744
|
+
for (let i = 0; i < 10; i++) {
|
|
745
|
+
const parentDir = path.dirname(currentDir);
|
|
746
|
+
const claudePath = path.join(parentDir, '.claude');
|
|
747
|
+
if (fs.existsSync(claudePath)) {
|
|
748
|
+
possiblePaths.push(claudePath);
|
|
749
|
+
}
|
|
750
|
+
currentDir = parentDir;
|
|
751
|
+
}
|
|
752
|
+
for (const p of possiblePaths) {
|
|
753
|
+
if (fs.existsSync(p)) {
|
|
754
|
+
return p;
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
return null;
|
|
758
|
+
}
|
|
429
759
|
/**
|
|
430
760
|
* Write statusline configuration
|
|
431
761
|
*/
|
|
432
762
|
async function writeStatusline(targetDir, options, result) {
|
|
433
763
|
const claudeDir = path.join(targetDir, '.claude');
|
|
434
764
|
const helpersDir = path.join(targetDir, '.claude', 'helpers');
|
|
765
|
+
// Find source .claude directory (works for npm package and local dev)
|
|
766
|
+
const sourceClaudeDir = findSourceClaudeDir(options.sourceBaseDir);
|
|
435
767
|
// Try to copy existing advanced statusline files from source
|
|
436
|
-
const sourceBaseDir = options.sourceBaseDir;
|
|
437
768
|
const advancedStatuslineFiles = [
|
|
438
769
|
{ src: 'statusline.sh', dest: 'statusline.sh', dir: claudeDir },
|
|
439
770
|
{ src: 'statusline.mjs', dest: 'statusline.mjs', dir: claudeDir },
|
|
440
771
|
];
|
|
441
772
|
let copiedAdvanced = false;
|
|
442
|
-
if (
|
|
773
|
+
if (sourceClaudeDir) {
|
|
443
774
|
for (const file of advancedStatuslineFiles) {
|
|
444
|
-
const sourcePath = path.join(
|
|
775
|
+
const sourcePath = path.join(sourceClaudeDir, file.src);
|
|
445
776
|
const destPath = path.join(file.dir, file.dest);
|
|
446
777
|
if (fs.existsSync(sourcePath)) {
|
|
447
778
|
if (!fs.existsSync(destPath) || options.force) {
|
|
448
779
|
fs.copyFileSync(sourcePath, destPath);
|
|
449
|
-
// Make shell scripts executable
|
|
450
|
-
if (file.src.endsWith('.sh')) {
|
|
780
|
+
// Make shell scripts and mjs executable
|
|
781
|
+
if (file.src.endsWith('.sh') || file.src.endsWith('.mjs')) {
|
|
451
782
|
fs.chmodSync(destPath, '755');
|
|
452
783
|
}
|
|
453
784
|
result.created.files.push(`.claude/${file.dest}`);
|
|
@@ -464,7 +795,7 @@ async function writeStatusline(targetDir, options, result) {
|
|
|
464
795
|
const statuslineScript = generateStatuslineScript(options);
|
|
465
796
|
const statuslineHook = generateStatuslineHook(options);
|
|
466
797
|
const files = {
|
|
467
|
-
'statusline.
|
|
798
|
+
'statusline.cjs': statuslineScript, // .cjs for ES module project compatibility
|
|
468
799
|
'statusline-hook.sh': statuslineHook,
|
|
469
800
|
};
|
|
470
801
|
for (const [name, content] of Object.entries(files)) {
|
|
@@ -533,6 +864,505 @@ neural/
|
|
|
533
864
|
fs.writeFileSync(gitignorePath, gitignore, 'utf-8');
|
|
534
865
|
result.created.files.push('.claude-flow/.gitignore');
|
|
535
866
|
}
|
|
867
|
+
// Write CAPABILITIES.md with full system overview
|
|
868
|
+
await writeCapabilitiesDoc(targetDir, options, result);
|
|
869
|
+
}
|
|
870
|
+
/**
|
|
871
|
+
* Write initial metrics files for statusline
|
|
872
|
+
* Creates baseline data so statusline shows meaningful state instead of all zeros
|
|
873
|
+
*/
|
|
874
|
+
async function writeInitialMetrics(targetDir, options, result) {
|
|
875
|
+
const metricsDir = path.join(targetDir, '.claude-flow', 'metrics');
|
|
876
|
+
const learningDir = path.join(targetDir, '.claude-flow', 'learning');
|
|
877
|
+
const securityDir = path.join(targetDir, '.claude-flow', 'security');
|
|
878
|
+
// Ensure directories exist
|
|
879
|
+
for (const dir of [metricsDir, learningDir, securityDir]) {
|
|
880
|
+
if (!fs.existsSync(dir)) {
|
|
881
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
// Create initial v3-progress.json
|
|
885
|
+
const progressPath = path.join(metricsDir, 'v3-progress.json');
|
|
886
|
+
if (!fs.existsSync(progressPath) || options.force) {
|
|
887
|
+
const progress = {
|
|
888
|
+
version: '3.0.0',
|
|
889
|
+
initialized: new Date().toISOString(),
|
|
890
|
+
domains: {
|
|
891
|
+
completed: 0,
|
|
892
|
+
total: 5,
|
|
893
|
+
status: 'INITIALIZING'
|
|
894
|
+
},
|
|
895
|
+
ddd: {
|
|
896
|
+
progress: 0,
|
|
897
|
+
modules: 0,
|
|
898
|
+
totalFiles: 0,
|
|
899
|
+
totalLines: 0
|
|
900
|
+
},
|
|
901
|
+
swarm: {
|
|
902
|
+
activeAgents: 0,
|
|
903
|
+
maxAgents: options.runtime.maxAgents,
|
|
904
|
+
topology: options.runtime.topology
|
|
905
|
+
},
|
|
906
|
+
learning: {
|
|
907
|
+
status: 'READY',
|
|
908
|
+
patternsLearned: 0,
|
|
909
|
+
sessionsCompleted: 0
|
|
910
|
+
},
|
|
911
|
+
_note: 'Metrics will update as you use Claude Flow. Run: npx @claude-flow/cli@latest daemon start'
|
|
912
|
+
};
|
|
913
|
+
fs.writeFileSync(progressPath, JSON.stringify(progress, null, 2), 'utf-8');
|
|
914
|
+
result.created.files.push('.claude-flow/metrics/v3-progress.json');
|
|
915
|
+
}
|
|
916
|
+
// Create initial swarm-activity.json
|
|
917
|
+
const activityPath = path.join(metricsDir, 'swarm-activity.json');
|
|
918
|
+
if (!fs.existsSync(activityPath) || options.force) {
|
|
919
|
+
const activity = {
|
|
920
|
+
timestamp: new Date().toISOString(),
|
|
921
|
+
processes: {
|
|
922
|
+
agentic_flow: 0,
|
|
923
|
+
mcp_server: 0,
|
|
924
|
+
estimated_agents: 0
|
|
925
|
+
},
|
|
926
|
+
swarm: {
|
|
927
|
+
active: false,
|
|
928
|
+
agent_count: 0,
|
|
929
|
+
coordination_active: false
|
|
930
|
+
},
|
|
931
|
+
integration: {
|
|
932
|
+
agentic_flow_active: false,
|
|
933
|
+
mcp_active: false
|
|
934
|
+
},
|
|
935
|
+
_initialized: true
|
|
936
|
+
};
|
|
937
|
+
fs.writeFileSync(activityPath, JSON.stringify(activity, null, 2), 'utf-8');
|
|
938
|
+
result.created.files.push('.claude-flow/metrics/swarm-activity.json');
|
|
939
|
+
}
|
|
940
|
+
// Create initial learning.json
|
|
941
|
+
const learningPath = path.join(metricsDir, 'learning.json');
|
|
942
|
+
if (!fs.existsSync(learningPath) || options.force) {
|
|
943
|
+
const learning = {
|
|
944
|
+
initialized: new Date().toISOString(),
|
|
945
|
+
routing: {
|
|
946
|
+
accuracy: 0,
|
|
947
|
+
decisions: 0
|
|
948
|
+
},
|
|
949
|
+
patterns: {
|
|
950
|
+
shortTerm: 0,
|
|
951
|
+
longTerm: 0,
|
|
952
|
+
quality: 0
|
|
953
|
+
},
|
|
954
|
+
sessions: {
|
|
955
|
+
total: 0,
|
|
956
|
+
current: null
|
|
957
|
+
},
|
|
958
|
+
_note: 'Intelligence grows as you use Claude Flow'
|
|
959
|
+
};
|
|
960
|
+
fs.writeFileSync(learningPath, JSON.stringify(learning, null, 2), 'utf-8');
|
|
961
|
+
result.created.files.push('.claude-flow/metrics/learning.json');
|
|
962
|
+
}
|
|
963
|
+
// Create initial audit-status.json
|
|
964
|
+
const auditPath = path.join(securityDir, 'audit-status.json');
|
|
965
|
+
if (!fs.existsSync(auditPath) || options.force) {
|
|
966
|
+
const audit = {
|
|
967
|
+
initialized: new Date().toISOString(),
|
|
968
|
+
status: 'PENDING',
|
|
969
|
+
cvesFixed: 0,
|
|
970
|
+
totalCves: 3,
|
|
971
|
+
lastScan: null,
|
|
972
|
+
_note: 'Run: npx @claude-flow/cli@latest security scan'
|
|
973
|
+
};
|
|
974
|
+
fs.writeFileSync(auditPath, JSON.stringify(audit, null, 2), 'utf-8');
|
|
975
|
+
result.created.files.push('.claude-flow/security/audit-status.json');
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
/**
|
|
979
|
+
* Write CAPABILITIES.md - comprehensive overview of all Claude Flow features
|
|
980
|
+
*/
|
|
981
|
+
async function writeCapabilitiesDoc(targetDir, options, result) {
|
|
982
|
+
const capabilitiesPath = path.join(targetDir, '.claude-flow', 'CAPABILITIES.md');
|
|
983
|
+
if (fs.existsSync(capabilitiesPath) && !options.force) {
|
|
984
|
+
result.skipped.push('.claude-flow/CAPABILITIES.md');
|
|
985
|
+
return;
|
|
986
|
+
}
|
|
987
|
+
const capabilities = `# Claude Flow V3 - Complete Capabilities Reference
|
|
988
|
+
> Generated: ${new Date().toISOString()}
|
|
989
|
+
> Full documentation: https://github.com/ruvnet/claude-flow
|
|
990
|
+
|
|
991
|
+
## 📋 Table of Contents
|
|
992
|
+
|
|
993
|
+
1. [Overview](#overview)
|
|
994
|
+
2. [Swarm Orchestration](#swarm-orchestration)
|
|
995
|
+
3. [Available Agents (60+)](#available-agents)
|
|
996
|
+
4. [CLI Commands (26 Commands, 140+ Subcommands)](#cli-commands)
|
|
997
|
+
5. [Hooks System (27 Hooks + 12 Workers)](#hooks-system)
|
|
998
|
+
6. [Memory & Intelligence (RuVector)](#memory--intelligence)
|
|
999
|
+
7. [Hive-Mind Consensus](#hive-mind-consensus)
|
|
1000
|
+
8. [Performance Targets](#performance-targets)
|
|
1001
|
+
9. [Integration Ecosystem](#integration-ecosystem)
|
|
1002
|
+
|
|
1003
|
+
---
|
|
1004
|
+
|
|
1005
|
+
## Overview
|
|
1006
|
+
|
|
1007
|
+
Claude Flow V3 is a domain-driven design architecture for multi-agent AI coordination with:
|
|
1008
|
+
|
|
1009
|
+
- **15-Agent Swarm Coordination** with hierarchical and mesh topologies
|
|
1010
|
+
- **HNSW Vector Search** - 150x-12,500x faster pattern retrieval
|
|
1011
|
+
- **SONA Neural Learning** - Self-optimizing with <0.05ms adaptation
|
|
1012
|
+
- **Byzantine Fault Tolerance** - Queen-led consensus mechanisms
|
|
1013
|
+
- **MCP Server Integration** - Model Context Protocol support
|
|
1014
|
+
|
|
1015
|
+
### Current Configuration
|
|
1016
|
+
| Setting | Value |
|
|
1017
|
+
|---------|-------|
|
|
1018
|
+
| Topology | ${options.runtime.topology} |
|
|
1019
|
+
| Max Agents | ${options.runtime.maxAgents} |
|
|
1020
|
+
| Memory Backend | ${options.runtime.memoryBackend} |
|
|
1021
|
+
| HNSW Indexing | ${options.runtime.enableHNSW ? 'Enabled' : 'Disabled'} |
|
|
1022
|
+
| Neural Learning | ${options.runtime.enableNeural ? 'Enabled' : 'Disabled'} |
|
|
1023
|
+
|
|
1024
|
+
---
|
|
1025
|
+
|
|
1026
|
+
## Swarm Orchestration
|
|
1027
|
+
|
|
1028
|
+
### Topologies
|
|
1029
|
+
| Topology | Description | Best For |
|
|
1030
|
+
|----------|-------------|----------|
|
|
1031
|
+
| \`hierarchical\` | Queen controls workers directly | Anti-drift, tight control |
|
|
1032
|
+
| \`mesh\` | Fully connected peer network | Distributed tasks |
|
|
1033
|
+
| \`hierarchical-mesh\` | V3 hybrid (recommended) | 10+ agents |
|
|
1034
|
+
| \`ring\` | Circular communication | Sequential workflows |
|
|
1035
|
+
| \`star\` | Central coordinator | Simple coordination |
|
|
1036
|
+
| \`adaptive\` | Dynamic based on load | Variable workloads |
|
|
1037
|
+
|
|
1038
|
+
### Strategies
|
|
1039
|
+
- \`balanced\` - Even distribution across agents
|
|
1040
|
+
- \`specialized\` - Clear roles, no overlap (anti-drift)
|
|
1041
|
+
- \`adaptive\` - Dynamic task routing
|
|
1042
|
+
|
|
1043
|
+
### Quick Commands
|
|
1044
|
+
\`\`\`bash
|
|
1045
|
+
# Initialize swarm
|
|
1046
|
+
npx @claude-flow/cli@latest swarm init --topology hierarchical --max-agents 8 --strategy specialized
|
|
1047
|
+
|
|
1048
|
+
# Check status
|
|
1049
|
+
npx @claude-flow/cli@latest swarm status
|
|
1050
|
+
|
|
1051
|
+
# Monitor activity
|
|
1052
|
+
npx @claude-flow/cli@latest swarm monitor
|
|
1053
|
+
\`\`\`
|
|
1054
|
+
|
|
1055
|
+
---
|
|
1056
|
+
|
|
1057
|
+
## Available Agents
|
|
1058
|
+
|
|
1059
|
+
### Core Development (5)
|
|
1060
|
+
\`coder\`, \`reviewer\`, \`tester\`, \`planner\`, \`researcher\`
|
|
1061
|
+
|
|
1062
|
+
### V3 Specialized (4)
|
|
1063
|
+
\`security-architect\`, \`security-auditor\`, \`memory-specialist\`, \`performance-engineer\`
|
|
1064
|
+
|
|
1065
|
+
### Swarm Coordination (5)
|
|
1066
|
+
\`hierarchical-coordinator\`, \`mesh-coordinator\`, \`adaptive-coordinator\`, \`collective-intelligence-coordinator\`, \`swarm-memory-manager\`
|
|
1067
|
+
|
|
1068
|
+
### Consensus & Distributed (7)
|
|
1069
|
+
\`byzantine-coordinator\`, \`raft-manager\`, \`gossip-coordinator\`, \`consensus-builder\`, \`crdt-synchronizer\`, \`quorum-manager\`, \`security-manager\`
|
|
1070
|
+
|
|
1071
|
+
### Performance & Optimization (5)
|
|
1072
|
+
\`perf-analyzer\`, \`performance-benchmarker\`, \`task-orchestrator\`, \`memory-coordinator\`, \`smart-agent\`
|
|
1073
|
+
|
|
1074
|
+
### GitHub & Repository (9)
|
|
1075
|
+
\`github-modes\`, \`pr-manager\`, \`code-review-swarm\`, \`issue-tracker\`, \`release-manager\`, \`workflow-automation\`, \`project-board-sync\`, \`repo-architect\`, \`multi-repo-swarm\`
|
|
1076
|
+
|
|
1077
|
+
### SPARC Methodology (6)
|
|
1078
|
+
\`sparc-coord\`, \`sparc-coder\`, \`specification\`, \`pseudocode\`, \`architecture\`, \`refinement\`
|
|
1079
|
+
|
|
1080
|
+
### Specialized Development (8)
|
|
1081
|
+
\`backend-dev\`, \`mobile-dev\`, \`ml-developer\`, \`cicd-engineer\`, \`api-docs\`, \`system-architect\`, \`code-analyzer\`, \`base-template-generator\`
|
|
1082
|
+
|
|
1083
|
+
### Testing & Validation (2)
|
|
1084
|
+
\`tdd-london-swarm\`, \`production-validator\`
|
|
1085
|
+
|
|
1086
|
+
### Agent Routing by Task
|
|
1087
|
+
| Task Type | Recommended Agents | Topology |
|
|
1088
|
+
|-----------|-------------------|----------|
|
|
1089
|
+
| Bug Fix | researcher, coder, tester | mesh |
|
|
1090
|
+
| New Feature | coordinator, architect, coder, tester, reviewer | hierarchical |
|
|
1091
|
+
| Refactoring | architect, coder, reviewer | mesh |
|
|
1092
|
+
| Performance | researcher, perf-engineer, coder | hierarchical |
|
|
1093
|
+
| Security | security-architect, auditor, reviewer | hierarchical |
|
|
1094
|
+
| Docs | researcher, api-docs | mesh |
|
|
1095
|
+
|
|
1096
|
+
---
|
|
1097
|
+
|
|
1098
|
+
## CLI Commands
|
|
1099
|
+
|
|
1100
|
+
### Core Commands (12)
|
|
1101
|
+
| Command | Subcommands | Description |
|
|
1102
|
+
|---------|-------------|-------------|
|
|
1103
|
+
| \`init\` | 4 | Project initialization |
|
|
1104
|
+
| \`agent\` | 8 | Agent lifecycle management |
|
|
1105
|
+
| \`swarm\` | 6 | Multi-agent coordination |
|
|
1106
|
+
| \`memory\` | 11 | AgentDB with HNSW search |
|
|
1107
|
+
| \`mcp\` | 9 | MCP server management |
|
|
1108
|
+
| \`task\` | 6 | Task assignment |
|
|
1109
|
+
| \`session\` | 7 | Session persistence |
|
|
1110
|
+
| \`config\` | 7 | Configuration |
|
|
1111
|
+
| \`status\` | 3 | System monitoring |
|
|
1112
|
+
| \`workflow\` | 6 | Workflow templates |
|
|
1113
|
+
| \`hooks\` | 17 | Self-learning hooks |
|
|
1114
|
+
| \`hive-mind\` | 6 | Consensus coordination |
|
|
1115
|
+
|
|
1116
|
+
### Advanced Commands (14)
|
|
1117
|
+
| Command | Subcommands | Description |
|
|
1118
|
+
|---------|-------------|-------------|
|
|
1119
|
+
| \`daemon\` | 5 | Background workers |
|
|
1120
|
+
| \`neural\` | 5 | Pattern training |
|
|
1121
|
+
| \`security\` | 6 | Security scanning |
|
|
1122
|
+
| \`performance\` | 5 | Profiling & benchmarks |
|
|
1123
|
+
| \`providers\` | 5 | AI provider config |
|
|
1124
|
+
| \`plugins\` | 5 | Plugin management |
|
|
1125
|
+
| \`deployment\` | 5 | Deploy management |
|
|
1126
|
+
| \`embeddings\` | 4 | Vector embeddings |
|
|
1127
|
+
| \`claims\` | 4 | Authorization |
|
|
1128
|
+
| \`migrate\` | 5 | V2→V3 migration |
|
|
1129
|
+
| \`process\` | 4 | Process management |
|
|
1130
|
+
| \`doctor\` | 1 | Health diagnostics |
|
|
1131
|
+
| \`completions\` | 4 | Shell completions |
|
|
1132
|
+
|
|
1133
|
+
### Example Commands
|
|
1134
|
+
\`\`\`bash
|
|
1135
|
+
# Initialize
|
|
1136
|
+
npx @claude-flow/cli@latest init --wizard
|
|
1137
|
+
|
|
1138
|
+
# Spawn agent
|
|
1139
|
+
npx @claude-flow/cli@latest agent spawn -t coder --name my-coder
|
|
1140
|
+
|
|
1141
|
+
# Memory operations
|
|
1142
|
+
npx @claude-flow/cli@latest memory store --key "pattern" --value "data" --namespace patterns
|
|
1143
|
+
npx @claude-flow/cli@latest memory search --query "authentication"
|
|
1144
|
+
|
|
1145
|
+
# Diagnostics
|
|
1146
|
+
npx @claude-flow/cli@latest doctor --fix
|
|
1147
|
+
\`\`\`
|
|
1148
|
+
|
|
1149
|
+
---
|
|
1150
|
+
|
|
1151
|
+
## Hooks System
|
|
1152
|
+
|
|
1153
|
+
### 27 Available Hooks
|
|
1154
|
+
|
|
1155
|
+
#### Core Hooks (6)
|
|
1156
|
+
| Hook | Description |
|
|
1157
|
+
|------|-------------|
|
|
1158
|
+
| \`pre-edit\` | Context before file edits |
|
|
1159
|
+
| \`post-edit\` | Record edit outcomes |
|
|
1160
|
+
| \`pre-command\` | Risk assessment |
|
|
1161
|
+
| \`post-command\` | Command metrics |
|
|
1162
|
+
| \`pre-task\` | Task start + agent suggestions |
|
|
1163
|
+
| \`post-task\` | Task completion learning |
|
|
1164
|
+
|
|
1165
|
+
#### Session Hooks (4)
|
|
1166
|
+
| Hook | Description |
|
|
1167
|
+
|------|-------------|
|
|
1168
|
+
| \`session-start\` | Start/restore session |
|
|
1169
|
+
| \`session-end\` | Persist state |
|
|
1170
|
+
| \`session-restore\` | Restore previous |
|
|
1171
|
+
| \`notify\` | Cross-agent notifications |
|
|
1172
|
+
|
|
1173
|
+
#### Intelligence Hooks (5)
|
|
1174
|
+
| Hook | Description |
|
|
1175
|
+
|------|-------------|
|
|
1176
|
+
| \`route\` | Optimal agent routing |
|
|
1177
|
+
| \`explain\` | Routing decisions |
|
|
1178
|
+
| \`pretrain\` | Bootstrap intelligence |
|
|
1179
|
+
| \`build-agents\` | Generate configs |
|
|
1180
|
+
| \`transfer\` | Pattern transfer |
|
|
1181
|
+
|
|
1182
|
+
#### Coverage Hooks (3)
|
|
1183
|
+
| Hook | Description |
|
|
1184
|
+
|------|-------------|
|
|
1185
|
+
| \`coverage-route\` | Coverage-based routing |
|
|
1186
|
+
| \`coverage-suggest\` | Improvement suggestions |
|
|
1187
|
+
| \`coverage-gaps\` | Gap analysis |
|
|
1188
|
+
|
|
1189
|
+
### 12 Background Workers
|
|
1190
|
+
| Worker | Priority | Purpose |
|
|
1191
|
+
|--------|----------|---------|
|
|
1192
|
+
| \`ultralearn\` | normal | Deep knowledge |
|
|
1193
|
+
| \`optimize\` | high | Performance |
|
|
1194
|
+
| \`consolidate\` | low | Memory consolidation |
|
|
1195
|
+
| \`predict\` | normal | Predictive preload |
|
|
1196
|
+
| \`audit\` | critical | Security |
|
|
1197
|
+
| \`map\` | normal | Codebase mapping |
|
|
1198
|
+
| \`preload\` | low | Resource preload |
|
|
1199
|
+
| \`deepdive\` | normal | Deep analysis |
|
|
1200
|
+
| \`document\` | normal | Auto-docs |
|
|
1201
|
+
| \`refactor\` | normal | Suggestions |
|
|
1202
|
+
| \`benchmark\` | normal | Benchmarking |
|
|
1203
|
+
| \`testgaps\` | normal | Coverage gaps |
|
|
1204
|
+
|
|
1205
|
+
---
|
|
1206
|
+
|
|
1207
|
+
## Memory & Intelligence
|
|
1208
|
+
|
|
1209
|
+
### RuVector Intelligence System
|
|
1210
|
+
- **SONA**: Self-Optimizing Neural Architecture (<0.05ms)
|
|
1211
|
+
- **MoE**: Mixture of Experts routing
|
|
1212
|
+
- **HNSW**: 150x-12,500x faster search
|
|
1213
|
+
- **EWC++**: Prevents catastrophic forgetting
|
|
1214
|
+
- **Flash Attention**: 2.49x-7.47x speedup
|
|
1215
|
+
- **Int8 Quantization**: 3.92x memory reduction
|
|
1216
|
+
|
|
1217
|
+
### 4-Step Intelligence Pipeline
|
|
1218
|
+
1. **RETRIEVE** - HNSW pattern search
|
|
1219
|
+
2. **JUDGE** - Success/failure verdicts
|
|
1220
|
+
3. **DISTILL** - LoRA learning extraction
|
|
1221
|
+
4. **CONSOLIDATE** - EWC++ preservation
|
|
1222
|
+
|
|
1223
|
+
### Memory Commands
|
|
1224
|
+
\`\`\`bash
|
|
1225
|
+
# Store pattern
|
|
1226
|
+
npx @claude-flow/cli@latest memory store --key "name" --value "data" --namespace patterns
|
|
1227
|
+
|
|
1228
|
+
# Semantic search
|
|
1229
|
+
npx @claude-flow/cli@latest memory search --query "authentication"
|
|
1230
|
+
|
|
1231
|
+
# List entries
|
|
1232
|
+
npx @claude-flow/cli@latest memory list --namespace patterns
|
|
1233
|
+
|
|
1234
|
+
# Initialize database
|
|
1235
|
+
npx @claude-flow/cli@latest memory init --force
|
|
1236
|
+
\`\`\`
|
|
1237
|
+
|
|
1238
|
+
---
|
|
1239
|
+
|
|
1240
|
+
## Hive-Mind Consensus
|
|
1241
|
+
|
|
1242
|
+
### Queen Types
|
|
1243
|
+
| Type | Role |
|
|
1244
|
+
|------|------|
|
|
1245
|
+
| Strategic Queen | Long-term planning |
|
|
1246
|
+
| Tactical Queen | Execution coordination |
|
|
1247
|
+
| Adaptive Queen | Dynamic optimization |
|
|
1248
|
+
|
|
1249
|
+
### Worker Types (8)
|
|
1250
|
+
\`researcher\`, \`coder\`, \`analyst\`, \`tester\`, \`architect\`, \`reviewer\`, \`optimizer\`, \`documenter\`
|
|
1251
|
+
|
|
1252
|
+
### Consensus Mechanisms
|
|
1253
|
+
| Mechanism | Fault Tolerance | Use Case |
|
|
1254
|
+
|-----------|-----------------|----------|
|
|
1255
|
+
| \`byzantine\` | f < n/3 faulty | Adversarial |
|
|
1256
|
+
| \`raft\` | f < n/2 failed | Leader-based |
|
|
1257
|
+
| \`gossip\` | Eventually consistent | Large scale |
|
|
1258
|
+
| \`crdt\` | Conflict-free | Distributed |
|
|
1259
|
+
| \`quorum\` | Configurable | Flexible |
|
|
1260
|
+
|
|
1261
|
+
### Hive-Mind Commands
|
|
1262
|
+
\`\`\`bash
|
|
1263
|
+
# Initialize
|
|
1264
|
+
npx @claude-flow/cli@latest hive-mind init --queen-type strategic
|
|
1265
|
+
|
|
1266
|
+
# Status
|
|
1267
|
+
npx @claude-flow/cli@latest hive-mind status
|
|
1268
|
+
|
|
1269
|
+
# Spawn workers
|
|
1270
|
+
npx @claude-flow/cli@latest hive-mind spawn --count 5 --type worker
|
|
1271
|
+
|
|
1272
|
+
# Consensus
|
|
1273
|
+
npx @claude-flow/cli@latest hive-mind consensus --propose "task"
|
|
1274
|
+
\`\`\`
|
|
1275
|
+
|
|
1276
|
+
---
|
|
1277
|
+
|
|
1278
|
+
## Performance Targets
|
|
1279
|
+
|
|
1280
|
+
| Metric | Target | Status |
|
|
1281
|
+
|--------|--------|--------|
|
|
1282
|
+
| HNSW Search | 150x-12,500x faster | ✅ Implemented |
|
|
1283
|
+
| Memory Reduction | 50-75% | ✅ Implemented (3.92x) |
|
|
1284
|
+
| SONA Integration | Pattern learning | ✅ Implemented |
|
|
1285
|
+
| Flash Attention | 2.49x-7.47x | 🔄 In Progress |
|
|
1286
|
+
| MCP Response | <100ms | ✅ Achieved |
|
|
1287
|
+
| CLI Startup | <500ms | ✅ Achieved |
|
|
1288
|
+
| SONA Adaptation | <0.05ms | 🔄 In Progress |
|
|
1289
|
+
|
|
1290
|
+
---
|
|
1291
|
+
|
|
1292
|
+
## Integration Ecosystem
|
|
1293
|
+
|
|
1294
|
+
### Integrated Packages
|
|
1295
|
+
| Package | Version | Purpose |
|
|
1296
|
+
|---------|---------|---------|
|
|
1297
|
+
| agentic-flow | 2.0.1-alpha | Core coordination |
|
|
1298
|
+
| agentdb | 2.0.0-alpha.3.4 | Vector database |
|
|
1299
|
+
| @ruvector/attention | 0.1.3 | Flash attention |
|
|
1300
|
+
| @ruvector/sona | 0.1.5 | Neural learning |
|
|
1301
|
+
|
|
1302
|
+
### Optional Integrations
|
|
1303
|
+
| Package | Command |
|
|
1304
|
+
|---------|---------|
|
|
1305
|
+
| ruv-swarm | \`npx ruv-swarm mcp start\` |
|
|
1306
|
+
| flow-nexus | \`npx flow-nexus@latest mcp start\` |
|
|
1307
|
+
| agentic-jujutsu | \`npx agentic-jujutsu@latest\` |
|
|
1308
|
+
|
|
1309
|
+
### MCP Server Setup
|
|
1310
|
+
\`\`\`bash
|
|
1311
|
+
# Add Claude Flow MCP
|
|
1312
|
+
claude mcp add claude-flow -- npx -y @claude-flow/cli@latest
|
|
1313
|
+
|
|
1314
|
+
# Optional servers
|
|
1315
|
+
claude mcp add ruv-swarm -- npx -y ruv-swarm mcp start
|
|
1316
|
+
claude mcp add flow-nexus -- npx -y flow-nexus@latest mcp start
|
|
1317
|
+
\`\`\`
|
|
1318
|
+
|
|
1319
|
+
---
|
|
1320
|
+
|
|
1321
|
+
## Quick Reference
|
|
1322
|
+
|
|
1323
|
+
### Essential Commands
|
|
1324
|
+
\`\`\`bash
|
|
1325
|
+
# Setup
|
|
1326
|
+
npx @claude-flow/cli@latest init --wizard
|
|
1327
|
+
npx @claude-flow/cli@latest daemon start
|
|
1328
|
+
npx @claude-flow/cli@latest doctor --fix
|
|
1329
|
+
|
|
1330
|
+
# Swarm
|
|
1331
|
+
npx @claude-flow/cli@latest swarm init --topology hierarchical --max-agents 8
|
|
1332
|
+
npx @claude-flow/cli@latest swarm status
|
|
1333
|
+
|
|
1334
|
+
# Agents
|
|
1335
|
+
npx @claude-flow/cli@latest agent spawn -t coder
|
|
1336
|
+
npx @claude-flow/cli@latest agent list
|
|
1337
|
+
|
|
1338
|
+
# Memory
|
|
1339
|
+
npx @claude-flow/cli@latest memory search --query "patterns"
|
|
1340
|
+
|
|
1341
|
+
# Hooks
|
|
1342
|
+
npx @claude-flow/cli@latest hooks pre-task --description "task"
|
|
1343
|
+
npx @claude-flow/cli@latest hooks worker dispatch --trigger optimize
|
|
1344
|
+
\`\`\`
|
|
1345
|
+
|
|
1346
|
+
### File Structure
|
|
1347
|
+
\`\`\`
|
|
1348
|
+
.claude-flow/
|
|
1349
|
+
├── config.yaml # Runtime configuration
|
|
1350
|
+
├── CAPABILITIES.md # This file
|
|
1351
|
+
├── data/ # Memory storage
|
|
1352
|
+
├── logs/ # Operation logs
|
|
1353
|
+
├── sessions/ # Session state
|
|
1354
|
+
├── hooks/ # Custom hooks
|
|
1355
|
+
├── agents/ # Agent configs
|
|
1356
|
+
└── workflows/ # Workflow templates
|
|
1357
|
+
\`\`\`
|
|
1358
|
+
|
|
1359
|
+
---
|
|
1360
|
+
|
|
1361
|
+
**Full Documentation**: https://github.com/ruvnet/claude-flow
|
|
1362
|
+
**Issues**: https://github.com/ruvnet/claude-flow/issues
|
|
1363
|
+
`;
|
|
1364
|
+
fs.writeFileSync(capabilitiesPath, capabilities, 'utf-8');
|
|
1365
|
+
result.created.files.push('.claude-flow/CAPABILITIES.md');
|
|
536
1366
|
}
|
|
537
1367
|
/**
|
|
538
1368
|
* Write CLAUDE.md with swarm guidance
|
|
@@ -543,9 +1373,9 @@ async function writeClaudeMd(targetDir, options, result) {
|
|
|
543
1373
|
result.skipped.push('CLAUDE.md');
|
|
544
1374
|
return;
|
|
545
1375
|
}
|
|
546
|
-
//
|
|
547
|
-
const
|
|
548
|
-
const content =
|
|
1376
|
+
// Determine template: explicit option > infer from components > 'standard'
|
|
1377
|
+
const inferredTemplate = (!options.components.commands && !options.components.agents) ? 'minimal' : undefined;
|
|
1378
|
+
const content = generateClaudeMd(options, inferredTemplate);
|
|
549
1379
|
fs.writeFileSync(claudeMdPath, content, 'utf-8');
|
|
550
1380
|
result.created.files.push('CLAUDE.md');
|
|
551
1381
|
}
|
|
@@ -559,8 +1389,16 @@ function findSourceDir(type, sourceBaseDir) {
|
|
|
559
1389
|
if (sourceBaseDir) {
|
|
560
1390
|
possiblePaths.push(path.join(sourceBaseDir, '.claude', type));
|
|
561
1391
|
}
|
|
1392
|
+
// IMPORTANT: Check the package's own .claude directory first
|
|
1393
|
+
// This is the primary path when running as an npm package
|
|
1394
|
+
// __dirname is typically /path/to/node_modules/@claude-flow/cli/dist/src/init
|
|
1395
|
+
// We need to go up 3 levels to reach the package root (dist/src/init -> dist/src -> dist -> root)
|
|
1396
|
+
const packageRoot = path.resolve(__dirname, '..', '..', '..');
|
|
1397
|
+
const packageDotClaude = path.join(packageRoot, '.claude', type);
|
|
1398
|
+
if (fs.existsSync(packageDotClaude)) {
|
|
1399
|
+
possiblePaths.unshift(packageDotClaude); // Add to beginning (highest priority)
|
|
1400
|
+
}
|
|
562
1401
|
// From dist/src/init -> go up to project root
|
|
563
|
-
// __dirname is typically /path/to/v3/@claude-flow/cli/dist/src/init
|
|
564
1402
|
const distPath = __dirname;
|
|
565
1403
|
// Try to find the project root by looking for .claude directory
|
|
566
1404
|
let currentDir = distPath;
|
|
@@ -644,8 +1482,6 @@ function countEnabledHooks(options) {
|
|
|
644
1482
|
count++;
|
|
645
1483
|
if (hooks.notification)
|
|
646
1484
|
count++;
|
|
647
|
-
if (hooks.permissionRequest)
|
|
648
|
-
count++;
|
|
649
1485
|
return count;
|
|
650
1486
|
}
|
|
651
1487
|
export default executeInit;
|