@claude-flow/cli 3.0.0-alpha.92 → 3.0.0-alpha.93

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.
Files changed (2) hide show
  1. package/README.md +919 -1489
  2. package/package.json +2 -1
package/README.md CHANGED
@@ -1,1713 +1,1143 @@
1
- # @claude-flow/cli
1
+ # Claude-Flow v3: Enterprise AI Orchestration Platform
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/@claude-flow/cli.svg)](https://www.npmjs.com/package/@claude-flow/cli)
4
- [![npm downloads](https://img.shields.io/npm/dm/@claude-flow/cli.svg)](https://www.npmjs.com/package/@claude-flow/cli)
5
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
- [![TypeScript](https://img.shields.io/badge/TypeScript-5.0+-blue.svg)](https://www.typescriptlang.org/)
7
- [![Node.js](https://img.shields.io/badge/Node.js-20+-green.svg)](https://nodejs.org/)
8
- [![Commands](https://img.shields.io/badge/Commands-29-orange.svg)](https://github.com/ruvnet/claude-flow)
9
- [![Subcommands](https://img.shields.io/badge/Subcommands-170+-purple.svg)](https://github.com/ruvnet/claude-flow)
3
+ <div align="center">
10
4
 
11
- > Modern CLI module for Claude Flow V3 - comprehensive command-line interface with 29 commands, 170+ subcommands, interactive prompts, self-learning hooks, background workers, hive-mind coordination, Q-Learning agent routing, code analysis, collaborative issue claims, smart error suggestions, and beautiful output formatting.
5
+ [![Star on GitHub](https://img.shields.io/github/stars/ruvnet/claude-flow?style=for-the-badge&logo=github&color=gold)](https://github.com/ruvnet/claude-flow)
6
+ [![Downloads](https://img.shields.io/npm/dt/claude-flow?style=for-the-badge&logo=npm&color=blue&label=Downloads)](https://www.npmjs.com/package/claude-flow)
7
+ [![Latest Release](https://img.shields.io/npm/v/claude-flow/alpha?style=for-the-badge&logo=npm&color=green&label=v3.0.0-alpha)](https://www.npmjs.com/package/claude-flow)
8
+ [![Claude Code](https://img.shields.io/badge/Claude%20Code-SDK%20Integrated-green?style=for-the-badge&logo=anthropic)](https://github.com/ruvnet/claude-flow)
9
+ [![Agentics Foundation](https://img.shields.io/badge/Agentics-Foundation-crimson?style=for-the-badge&logo=openai)](https://discord.com/invite/dfxmpwkG2D)
10
+ [![MIT License](https://img.shields.io/badge/License-MIT-yellow?style=for-the-badge&logo=opensourceinitiative)](https://opensource.org/licenses/MIT)
12
11
 
13
- ## Features
12
+ **Production-ready multi-agent AI orchestration for Claude Code**
14
13
 
15
- ### Core Capabilities
16
- - **29 Main Commands** - Complete CLI coverage for all Claude Flow operations
17
- - **170+ Subcommands** - Fine-grained control over every aspect of the system
18
- - **Advanced Argument Parsing** - Full support for flags, options, subcommands, and positional arguments
19
- - **Interactive Prompts** - Rich interactive mode with confirmations, selections, and input validation
20
- - **Beautiful Output** - Colored output, tables, progress bars, spinners, and multiple formats (text, JSON, table)
21
- - **Smart Error Suggestions** - Levenshtein distance-based typo detection with helpful corrections
22
-
23
- ### V3-Specific Features
24
- - **Self-Learning Hooks** - 17 hook subcommands + 12 background workers with pattern learning and neural integration
25
- - **Hive-Mind Coordination** - Queen-led Byzantine fault-tolerant multi-agent consensus
26
- - **15-Agent Swarm** - V3 hierarchical mesh coordination with domain specialization
27
- - **AgentDB Integration** - 150x-12,500x faster vector search with HNSW indexing
28
- - **SONA Learning** - Sub-0.05ms adaptation with Mixture of Experts routing
29
- - **Q-Learning Routing** - Intelligent task-to-agent routing with reinforcement learning
30
- - **Code Analysis** - AST analysis, diff classification, complexity metrics, boundary detection
31
- - **Issue Claims (ADR-016)** - Collaborative human-agent issue management with work stealing
32
-
33
- ### Developer Experience
34
- - **Type-Safe** - Full TypeScript support with comprehensive type definitions
35
- - **Global Options** - Built-in `--help`, `--version`, `--verbose`, `--quiet`, `--format`
36
- - **Shell Completions** - Full tab completion for bash, zsh, fish, and PowerShell
37
- - **Doctor Command** - System diagnostics with health checks and suggested fixes
38
- - **Migration Tools** - Built-in V2 to V3 migration with rollback support
39
-
40
- ## Installation
14
+ *Deploy 54+ specialized agents in coordinated swarms with self-learning capabilities, fault-tolerant consensus, and enterprise-grade security.*
41
15
 
42
- ```bash
43
- npm install @claude-flow/cli
44
- ```
16
+ </div>
45
17
 
46
- Or use globally:
18
+ ## Overview
47
19
 
48
- ```bash
49
- npm install -g @claude-flow/cli
50
- claude-flow --version
51
- ```
20
+ Claude-Flow is a comprehensive AI agent orchestration framework that transforms Claude Code into a powerful multi-agent development platform. It enables teams to deploy, coordinate, and optimize specialized AI agents working together on complex software engineering tasks.
52
21
 
53
- ## Quick Start
22
+ ### Claude Code: With vs Without Claude-Flow
54
23
 
55
- ```bash
56
- # Initialize a new project
57
- claude-flow init --wizard
58
-
59
- # Start MCP server
60
- claude-flow mcp start
61
-
62
- # Spawn an agent
63
- claude-flow agent spawn -t coder --name my-coder
24
+ | Capability | Claude Code Alone | Claude Code + Claude-Flow |
25
+ |------------|-------------------|---------------------------|
26
+ | **Agent Collaboration** | Agents work in isolation, no shared context | Agents collaborate via swarms with shared memory and consensus |
27
+ | **Coordination** | Manual orchestration between tasks | Queen-led hierarchy with 5 consensus algorithms (Raft, Byzantine, Gossip) |
28
+ | **Memory** | Session-only, no persistence | HNSW vector memory with 150x-12,500x faster retrieval |
29
+ | **Learning** | Static behavior, no adaptation | SONA self-learning with <0.05ms adaptation, improves over time |
30
+ | **Task Routing** | You decide which agent to use | Intelligent routing based on learned patterns (89% accuracy) |
31
+ | **Complex Tasks** | Manual breakdown required | Automatic decomposition across 5 domains (Security, Core, Integration, Support) |
32
+ | **Background Workers** | Nothing runs automatically | 12 context-triggered workers auto-dispatch on file changes, patterns, sessions |
33
+ | **LLM Provider** | Anthropic only | 6 providers with automatic failover and cost-based routing (85% savings) |
34
+ | **Security** | Standard protections | CVE-hardened with bcrypt, input validation, path traversal prevention |
35
+ | **Performance** | Baseline | 2.8-4.4x faster tasks, 4-32x memory reduction via quantization |
64
36
 
65
- # Initialize a swarm
66
- claude-flow swarm init --v3-mode
37
+ ### Key Capabilities
67
38
 
68
- # Search memory
69
- claude-flow memory search -q "authentication patterns"
39
+ - **54+ Specialized Agents** - Ready-to-use AI agents for coding, code review, testing, security audits, documentation, and DevOps tasks. Each agent is optimized for its specific role.
70
40
 
71
- # Route task to optimal agent (Q-Learning)
72
- claude-flow route task "Implement OAuth2 authentication"
41
+ - **Coordinated Agent Teams** - Run unlimited agents simultaneously in organized swarms. Agents can spawn sub-workers, communicate, share context, and divide work automatically using patterns like hierarchical (queen/workers) or mesh (peer-to-peer).
73
42
 
74
- # Analyze code complexity
75
- claude-flow analyze complexity ./src
43
+ - **Learns From Your Workflow** - The system remembers what works. Successful patterns are stored and reused, routing similar tasks to the best-performing agents. Gets smarter over time.
76
44
 
77
- # Claim an issue
78
- claude-flow issues claim ISSUE-123
79
-
80
- # Check system status
81
- claude-flow status --watch
82
- ```
45
+ - **Works With Any LLM** - Switch between Claude, GPT-4, Gemini, Cohere, or local models like Llama. Automatic failover if one provider is unavailable. Smart routing picks the cheapest option that meets quality requirements.
83
46
 
84
- ## Complete Command Reference
47
+ - **Plugs Into Claude Code** - Native integration via MCP (Model Context Protocol). Use claude-flow commands directly in your Claude Code sessions with full tool access.
85
48
 
86
- ### Overview
87
-
88
- | Command | Subcommands | Description |
89
- |---------|-------------|-------------|
90
- | `init` | 4 | Project initialization with wizard, presets, and configuration |
91
- | `agent` | 8 | Agent lifecycle management (spawn, list, status, stop, metrics, pool, health, logs) |
92
- | `swarm` | 6 | Multi-agent swarm coordination and orchestration |
93
- | `memory` | 11 | AgentDB memory operations with vector search |
94
- | `mcp` | 9 | MCP server management and tool execution |
95
- | `task` | 6 | Task creation, assignment, and lifecycle management |
96
- | `session` | 7 | Session state management and persistence |
97
- | `config` | 7 | Configuration management and provider setup |
98
- | `status` | 3 | System status monitoring with watch mode |
99
- | `start` | 3 | Service startup and quick launch |
100
- | `workflow` | 6 | Workflow execution and template management |
101
- | `hooks` | 17 | Self-learning hooks with neural pattern recognition + 12 background workers |
102
- | `hive-mind` | 6 | Queen-led consensus-based multi-agent coordination |
103
- | `migrate` | 5 | V2 to V3 migration with rollback support |
104
- | `process` | 4 | Background process management and monitoring |
105
- | `daemon` | 5 | Node.js worker daemon (start, stop, status, trigger, enable) |
106
- | `neural` | 5 | Neural pattern training (train, status, patterns, predict, optimize) |
107
- | `security` | 6 | Security scanning (scan, audit, cve, threats, validate, report) |
108
- | `performance` | 5 | Performance profiling (benchmark, profile, metrics, optimize, report) |
109
- | `providers` | 5 | AI providers (list, add, remove, test, configure) |
110
- | `plugins` | 5 | Plugin management (list, install, uninstall, enable, disable) |
111
- | `deployment` | 5 | Deployment management (deploy, rollback, status, environments, release) |
112
- | `embeddings` | 13 | Vector embeddings with ONNX models, hyperbolic space, and neural substrate |
113
- | `claims` | 4 | Claims-based authorization (check, grant, revoke, list) |
114
- | `issues` | 10 | Collaborative issue claims with work stealing (ADR-016) |
115
- | `route` | 7 | Q-Learning agent routing with reinforcement learning |
116
- | `analyze` | 11 | Code analysis (AST, diff, complexity, boundaries, dependencies) |
117
- | `doctor` | 1 | System diagnostics with health checks and suggested fixes |
118
- | `completions` | 4 | Shell completions for bash, zsh, fish, and PowerShell |
49
+ - **Production-Ready Security** - Built-in protection against common vulnerabilities: input validation, path traversal prevention, command injection blocking, and safe credential handling.
119
50
 
120
51
  ---
121
52
 
122
- ### `init` - Project Initialization
123
-
124
- Initialize Claude Flow V3 with interactive wizard or presets.
125
-
126
- ```bash
127
- claude-flow init [subcommand] [options]
128
- ```
129
-
130
- #### Subcommands
131
-
132
- | Subcommand | Description |
133
- |------------|-------------|
134
- | `wizard` | Interactive setup wizard with step-by-step configuration |
135
- | `check` | Validate current configuration and environment |
136
- | `skills` | List and manage available skills |
137
- | `hooks` | Configure and validate hooks integration |
53
+ ## Quick Start
138
54
 
139
- #### Options
55
+ ### Prerequisites
140
56
 
141
- | Option | Short | Description | Default |
142
- |--------|-------|-------------|---------|
143
- | `--preset` | `-p` | Configuration preset (minimal, default, full, custom) | `default` |
144
- | `--force` | `-f` | Overwrite existing configuration | `false` |
145
- | `--skip-deps` | | Skip dependency installation | `false` |
146
- | `--topology` | `-t` | Swarm topology (hierarchical, mesh, hybrid) | `hierarchical` |
147
- | `--max-agents` | `-m` | Maximum concurrent agents | `15` |
148
- | `--memory-backend` | | Memory backend (agentdb, sqlite, hybrid) | `hybrid` |
149
- | `--enable-hnsw` | | Enable HNSW indexing (150x faster) | `true` |
150
- | `--enable-neural` | | Enable SONA neural learning | `true` |
57
+ - **Node.js 18+** or **Bun 1.0+** (Bun is faster)
58
+ - **npm 9+** / **pnpm** / **bun** package manager
151
59
 
152
- #### Examples
60
+ **IMPORTANT**: Claude Code must be installed first:
153
61
 
154
62
  ```bash
155
- # Interactive wizard
156
- claude-flow init --wizard
63
+ # 1. Install Claude Code globally
64
+ npm install -g @anthropic-ai/claude-code
157
65
 
158
- # Quick setup with defaults
159
- claude-flow init --preset default
160
-
161
- # Full V3 setup with all features
162
- claude-flow init --preset full --enable-hnsw --enable-neural
163
-
164
- # Validate configuration
165
- claude-flow init check
66
+ # 2. (Optional) Skip permissions check for faster setup
67
+ claude --dangerously-skip-permissions
166
68
  ```
167
69
 
168
- ---
169
-
170
- ### `agent` - Agent Management
171
-
172
- Spawn, manage, and monitor AI agents with various specializations.
70
+ ### Installation
173
71
 
174
72
  ```bash
175
- claude-flow agent <subcommand> [options]
176
- ```
177
-
178
- #### Subcommands
179
-
180
- | Subcommand | Aliases | Description |
181
- |------------|---------|-------------|
182
- | `spawn` | | Spawn a new agent with specified type and configuration |
183
- | `list` | `ls` | List all active agents with filtering options |
184
- | `status` | | Show detailed status and metrics for an agent |
185
- | `stop` | `kill` | Stop a running agent (graceful or forced) |
186
- | `metrics` | | Show agent performance metrics over time |
187
- | `pool` | | Manage agent pool for auto-scaling |
188
- | `health` | | Show agent health and resource metrics |
189
- | `logs` | | View agent activity logs with filtering |
190
-
191
- #### Agent Types
192
-
193
- | Type | Description | Capabilities |
194
- |------|-------------|--------------|
195
- | `coder` | Code development with neural patterns | code-generation, refactoring, debugging, testing |
196
- | `researcher` | Research with web access and data analysis | web-search, data-analysis, summarization, citation |
197
- | `tester` | Comprehensive testing with automation | unit-testing, integration-testing, coverage-analysis |
198
- | `reviewer` | Code review with security and quality checks | code-review, security-audit, quality-check |
199
- | `architect` | System design with enterprise patterns | system-design, pattern-analysis, scalability |
200
- | `coordinator` | Multi-agent orchestration and workflow | task-orchestration, agent-management, workflow-control |
201
- | `security-architect` | Security architecture and threat modeling | threat-modeling, security-patterns, compliance |
202
- | `security-auditor` | CVE remediation and security testing | vulnerability-scan, penetration-testing |
203
- | `memory-specialist` | AgentDB unification (150x-12,500x faster) | vector-search, agentdb, caching, optimization |
204
- | `performance-engineer` | 2.49x-7.47x optimization targets | benchmarking, profiling, optimization |
205
-
206
- #### Spawn Options
207
-
208
- | Option | Short | Description | Default |
209
- |--------|-------|-------------|---------|
210
- | `--type` | `-t` | Agent type to spawn | required |
211
- | `--name` | `-n` | Agent name/identifier | auto-generated |
212
- | `--provider` | `-p` | LLM provider (anthropic, openrouter, ollama) | `anthropic` |
213
- | `--model` | `-m` | Model to use | provider default |
214
- | `--task` | | Initial task for the agent | none |
215
- | `--timeout` | | Agent timeout in seconds | `300` |
216
- | `--auto-tools` | | Enable automatic tool usage | `true` |
217
-
218
- #### Examples
219
-
220
- ```bash
221
- # Spawn a coder agent
222
- claude-flow agent spawn -t coder --name my-coder
223
-
224
- # Spawn researcher with initial task
225
- claude-flow agent spawn -t researcher --task "Research React 19 features"
226
-
227
- # List all active agents
228
- claude-flow agent list
229
-
230
- # List agents by type
231
- claude-flow agent list -t coder
232
-
233
- # Get detailed agent status
234
- claude-flow agent status agent-001
235
-
236
- # Show agent metrics for 24 hours
237
- claude-flow agent metrics -p 24h
238
-
239
- # View agent logs
240
- claude-flow agent logs -i agent-001 -f
73
+ # With npm/npx (Node.js)
74
+ npm install claude-flow@v3alpha
75
+ npx claude-flow@v3alpha init
241
76
 
242
- # Configure agent pool
243
- claude-flow agent pool --size 5 --min 2 --max 15 --auto-scale
77
+ # With Bun (faster)
78
+ bun add claude-flow@v3alpha
79
+ bunx claude-flow@v3alpha init
244
80
 
245
- # Health check with detailed metrics
246
- claude-flow agent health -d
81
+ # Start MCP server for Claude Code integration
82
+ npx claude-flow@v3alpha mcp start
247
83
 
248
- # Stop agent gracefully
249
- claude-flow agent stop agent-001
84
+ # Run a task with agents
85
+ npx claude-flow@v3alpha --agent coder --task "Implement user authentication"
250
86
 
251
- # Force stop
252
- claude-flow agent stop agent-001 -f
87
+ # List available agents
88
+ npx claude-flow@v3alpha --list
253
89
  ```
254
90
 
255
91
  ---
256
92
 
257
- ### `swarm` - Swarm Coordination
258
-
259
- Multi-agent swarm initialization, coordination, and management.
93
+ ## Features
260
94
 
95
+ ### Core Platform Capabilities
96
+
97
+ | Capability | Description | Metrics |
98
+ |------------|-------------|---------|
99
+ | **54+ Specialized Agents** | Purpose-built AI agents for development, testing, security, and operations | 10 categories, unlimited concurrent |
100
+ | **Multi-Topology Swarms** | Hierarchical, mesh, ring, star, and adaptive coordination patterns | 2.8-4.4x speed improvement |
101
+ | **Self-Learning Hooks** | ReasoningBank pattern learning with HNSW vector search | 150x faster retrieval |
102
+ | **MCP Integration** | Native Claude Code support via Model Context Protocol | 27+ tools available |
103
+ | **Security-First Design** | Input validation, path traversal prevention, command sandboxing | CVE-1, CVE-2, CVE-3 addressed |
104
+ | **Cross-Platform** | Full support for Windows, macOS, and Linux environments | Node.js 18+ |
105
+
106
+ ### Agent Ecosystem
107
+
108
+ | Category | Agent Count | Key Agents | Purpose |
109
+ |----------|-------------|------------|---------|
110
+ | **Core Development** | 5 | coder, reviewer, tester, planner, researcher | Daily development tasks |
111
+ | **V3 Specialized** | 10 | queen-coordinator, security-architect, memory-specialist | Enterprise orchestration |
112
+ | **Swarm Coordination** | 5 | hierarchical-coordinator, mesh-coordinator, adaptive-coordinator | Multi-agent patterns |
113
+ | **Consensus & Distributed** | 7 | byzantine-coordinator, raft-manager, gossip-coordinator | Fault-tolerant coordination |
114
+ | **Performance** | 5 | perf-analyzer, performance-benchmarker, task-orchestrator | Optimization & monitoring |
115
+ | **GitHub & Repository** | 9 | pr-manager, code-review-swarm, issue-tracker, release-manager | Repository automation |
116
+ | **SPARC Methodology** | 6 | sparc-coord, specification, pseudocode, architecture | Structured development |
117
+ | **Specialized Dev** | 8 | backend-dev, mobile-dev, ml-developer, cicd-engineer | Domain expertise |
118
+
119
+ ### Swarm Topologies
120
+
121
+ | Topology | Recommended Agents | Best For | Execution Time | Memory/Agent |
122
+ |----------|-------------------|----------|----------------|--------------|
123
+ | **Hierarchical** | 6+ | Structured tasks, clear authority chains | 0.20s | 256 MB |
124
+ | **Mesh** | 4+ | Collaborative work, high redundancy | 0.15s | 192 MB |
125
+ | **Ring** | 3+ | Sequential processing pipelines | 0.12s | 128 MB |
126
+ | **Star** | 5+ | Centralized control, spoke workers | 0.14s | 180 MB |
127
+ | **Hybrid (Hierarchical-Mesh)** | 7+ | Complex multi-domain tasks | 0.18s | 320 MB |
128
+ | **Adaptive** | 2+ | Dynamic workloads, auto-scaling | Variable | Dynamic |
129
+
130
+ ### Self-Learning & Intelligence
131
+
132
+ | Feature | Technology | Performance | Description |
133
+ |---------|------------|-------------|-------------|
134
+ | **ReasoningBank** | HNSW Vector Search | 150x faster | Pattern storage with similarity-based retrieval |
135
+ | **SONA Neural** | LoRA Fine-tuning | <0.05ms adaptation | Self-optimizing neural architecture |
136
+ | **Pattern Learning** | EWC++ Memory | Zero forgetting | Continuous learning without catastrophic forgetting |
137
+ | **Intent Routing** | MoE (Mixture of Experts) | 95%+ accuracy | Intelligent task-to-agent routing |
138
+ | **Domain Detection** | Vector Clustering | Real-time | Automatic categorization (security, testing, performance) |
139
+ | **Quality Tracking** | Success/Failure Metrics | Per-pattern | Historical performance tracking |
140
+
141
+ ### Memory & Storage
142
+
143
+ | Backend | Technology | Performance | Use Case |
144
+ |---------|------------|-------------|----------|
145
+ | **AgentDB** | HNSW Indexing | 150x-12,500x faster | Primary vector storage |
146
+ | **SQLite** | Relational DB | Standard | Metadata and structured data |
147
+ | **Hybrid** | AgentDB + SQLite | Best of both | Recommended default |
148
+ | **In-Memory** | RAM-based | Fastest | Temporary/session data |
149
+
150
+ ### MCP Tools & Integration
151
+
152
+ | Category | Tools | Description |
153
+ |----------|-------|-------------|
154
+ | **Coordination** | `swarm_init`, `agent_spawn`, `task_orchestrate` | Swarm and agent lifecycle management |
155
+ | **Monitoring** | `swarm_status`, `agent_list`, `agent_metrics`, `task_status` | Real-time status and metrics |
156
+ | **Memory & Neural** | `memory_usage`, `neural_status`, `neural_train`, `neural_patterns` | Memory operations and learning |
157
+ | **GitHub** | `github_swarm`, `repo_analyze`, `pr_enhance`, `issue_triage`, `code_review` | Repository integration |
158
+ | **Workers** | `worker/run`, `worker/status`, `worker/alerts`, `worker/history` | Background task management |
159
+ | **Hooks** | `hooks/pre-*`, `hooks/post-*`, `hooks/route`, `hooks/session-*`, `hooks/intelligence/*`, `hooks/worker/*` | 31 lifecycle hooks |
160
+ | **Progress** | `progress/check`, `progress/sync`, `progress/summary`, `progress/watch` | V3 implementation tracking |
161
+
162
+ ### Security Features
163
+
164
+ | Feature | Protection | Implementation |
165
+ |---------|------------|----------------|
166
+ | **Input Validation** | Injection attacks | Boundary validation on all inputs |
167
+ | **Path Traversal Prevention** | Directory escape | Blocked patterns (`../`, `~/.`, `/etc/`) |
168
+ | **Command Sandboxing** | Shell injection | Allowlisted commands, metacharacter blocking |
169
+ | **Prototype Pollution** | Object manipulation | Safe JSON parsing with validation |
170
+ | **TOCTOU Protection** | Race conditions | Symlink skipping and atomic operations |
171
+ | **Information Disclosure** | Data leakage | Error message sanitization |
172
+ | **CVE Monitoring** | Known vulnerabilities | Active scanning and patching |
173
+
174
+ ### Advanced Capabilities
175
+
176
+ | Feature | Description | Benefit |
177
+ |---------|-------------|---------|
178
+ | **Automatic Topology Selection** | AI-driven topology choice based on task complexity | Optimal resource utilization |
179
+ | **Parallel Execution** | Concurrent agent operation with load balancing | 2.8-4.4x speed improvement |
180
+ | **Neural Training** | 27+ model support with continuous learning | Adaptive intelligence |
181
+ | **Bottleneck Analysis** | Real-time performance monitoring and optimization | Proactive issue detection |
182
+ | **Smart Auto-Spawning** | Dynamic agent creation based on workload | Elastic scaling |
183
+ | **Self-Healing Workflows** | Automatic error recovery and task retry | High availability |
184
+ | **Cross-Session Memory** | Persistent pattern storage across sessions | Continuous learning |
185
+ | **Event Sourcing** | Complete audit trail with replay capability | Debugging and compliance |
186
+ | **Background Workers** | 12 auto-triggered workers for analysis and optimization | Automated maintenance |
187
+ | **GitHub Integration** | PR management, issue triage, code review automation | Repository workflow |
188
+
189
+ ### Plugin System (`@claude-flow/plugins`)
190
+
191
+ | Component | Description | Key Features |
192
+ |-----------|-------------|--------------|
193
+ | **PluginBuilder** | Fluent builder for creating plugins | MCP tools, hooks, workers, providers |
194
+ | **MCPToolBuilder** | Build MCP tools with typed parameters | String, number, boolean, enum params |
195
+ | **HookBuilder** | Build hooks with conditions and transformers | Priorities, conditional execution, data transformation |
196
+ | **WorkerPool** | Managed worker pool with auto-scaling | Min/max workers, task queuing, graceful shutdown |
197
+ | **ProviderRegistry** | LLM provider management with fallback | Cost optimization, automatic failover |
198
+ | **AgenticFlowBridge** | agentic-flow@alpha integration | Swarm coordination, agent spawning |
199
+ | **AgentDBBridge** | Vector storage with HNSW indexing | 150x faster search, batch operations |
200
+ | **Security Utilities** | Input validation and protection | Path traversal, injection, rate limiting |
201
+
202
+ ### Plugin Hook Events
203
+
204
+ | Category | Events | Description |
205
+ |----------|--------|-------------|
206
+ | **Session** | `session:start`, `session:end` | Session lifecycle management |
207
+ | **Agent** | `agent:pre-spawn`, `agent:post-spawn`, `agent:pre-terminate`, `agent:post-terminate` | Agent lifecycle hooks |
208
+ | **Task** | `task:pre-execute`, `task:post-complete`, `task:error` | Task execution hooks |
209
+ | **Tool** | `tool:pre-call`, `tool:post-call` | MCP tool invocation hooks |
210
+ | **Memory** | `memory:pre-store`, `memory:post-store`, `memory:pre-retrieve`, `memory:post-retrieve` | Memory operation hooks |
211
+ | **Swarm** | `swarm:initialized`, `swarm:shutdown`, `swarm:consensus-reached` | Swarm coordination hooks |
212
+ | **File** | `file:pre-read`, `file:post-read`, `file:pre-write`, `file:post-write` | File operation hooks |
213
+ | **Command** | `command:pre-execute`, `command:post-execute` | Shell command hooks |
214
+ | **Learning** | `learning:pattern-learned`, `learning:pattern-applied` | Pattern learning hooks |
215
+
216
+ ### Plugin Worker Types
217
+
218
+ | Worker Type | Purpose | Capabilities |
219
+ |-------------|---------|--------------|
220
+ | `coder` | Code implementation | Code generation, refactoring |
221
+ | `reviewer` | Code review | Quality analysis, suggestions |
222
+ | `tester` | Test generation/execution | Unit tests, integration tests |
223
+ | `researcher` | Information gathering | Web search, documentation |
224
+ | `planner` | Task planning | Decomposition, scheduling |
225
+ | `coordinator` | Multi-agent coordination | Orchestration, consensus |
226
+ | `security` | Security analysis | Vulnerability scanning, audit |
227
+ | `performance` | Performance optimization | Profiling, benchmarking |
228
+ | `specialized` | Custom capabilities | Domain-specific tasks |
229
+ | `long-running` | Background tasks | Async processing, polling |
230
+
231
+ ### Plugin Performance
232
+
233
+ | Metric | Target | Achieved |
234
+ |--------|--------|----------|
235
+ | Plugin load time | <50ms | ~20ms |
236
+ | Hook execution | <1ms | ~0.5ms |
237
+ | Worker spawn | <100ms | ~50ms |
238
+ | Vector search (10K) | <10ms | ~5ms |
239
+
240
+ ### RuVector WASM Plugins
241
+
242
+ | Plugin | Description | Performance |
243
+ |--------|-------------|-------------|
244
+ | **SemanticCodeSearchPlugin** | Semantic code search with vector embeddings | Real-time indexing |
245
+ | **IntentRouterPlugin** | Routes user intents to optimal handlers | 95%+ accuracy |
246
+ | **HookPatternLibraryPlugin** | Pre-built patterns for common tasks | Security, testing, performance |
247
+ | **MCPToolOptimizerPlugin** | Optimizes MCP tool selection | Context-aware suggestions |
248
+ | **ReasoningBankPlugin** | Vector-backed pattern storage with HNSW | 150x faster search |
249
+ | **AgentConfigGeneratorPlugin** | Generates optimized agent configurations | From pretrain data |
250
+
251
+ ### Background Workers (12 Auto-Triggered)
252
+
253
+ Workers run automatically in the background based on context, or can be dispatched manually via MCP tools.
254
+
255
+ | Worker | Trigger | Purpose | Auto-Triggers On |
256
+ |--------|---------|---------|------------------|
257
+ | **UltraLearn** | `ultralearn` | Deep knowledge acquisition from codebase | New project, major refactors |
258
+ | **Optimize** | `optimize` | Performance optimization suggestions | Slow operations detected |
259
+ | **Consolidate** | `consolidate` | Memory pattern consolidation | Session end, memory threshold |
260
+ | **Predict** | `predict` | Predictive resource preloading | Usage patterns detected |
261
+ | **Audit** | `audit` | Security vulnerability analysis | Security-related file changes |
262
+ | **Map** | `map` | Codebase structure mapping | New directories, large changes |
263
+ | **Preload** | `preload` | Resource and dependency preloading | Project initialization |
264
+ | **DeepDive** | `deepdive` | Deep code analysis and understanding | Complex file edits |
265
+ | **Document** | `document` | Auto-documentation generation | New functions/classes created |
266
+ | **Refactor** | `refactor` | Refactoring opportunity detection | Code smell patterns |
267
+ | **Benchmark** | `benchmark` | Performance benchmarking | Performance-critical changes |
268
+ | **TestGaps** | `testgaps` | Test coverage gap analysis | Code changes without tests |
269
+
270
+ **Worker Commands:**
261
271
  ```bash
262
- claude-flow swarm <subcommand> [options]
263
- ```
272
+ # Dispatch a worker manually
273
+ npx claude-flow@v3alpha worker dispatch --trigger audit --context "./src"
264
274
 
265
- #### Subcommands
275
+ # Check worker status
276
+ npx claude-flow@v3alpha worker status
266
277
 
267
- | Subcommand | Description |
268
- |------------|-------------|
269
- | `init` | Initialize a new swarm with specified topology |
270
- | `start` | Start swarm execution with objective and strategy |
271
- | `status` | Show swarm status, progress, and metrics |
272
- | `stop` | Stop swarm execution (with state save option) |
273
- | `scale` | Scale swarm agent count up or down |
274
- | `coordinate` | Execute V3 15-agent hierarchical mesh coordination |
278
+ # View completed results
279
+ npx claude-flow@v3alpha worker results --limit 10
280
+ ```
275
281
 
276
- #### Topologies
282
+ ### LLM Providers (`@claude-flow/providers`)
277
283
 
278
- | Topology | Description | Best For |
279
- |----------|-------------|----------|
280
- | `hierarchical` | Queen-led coordination with worker agents | Structured tasks, clear authority |
281
- | `mesh` | Fully connected peer-to-peer network | Collaborative work, redundancy |
282
- | `ring` | Circular communication pattern | Sequential processing |
283
- | `star` | Central coordinator with spoke agents | Centralized control |
284
- | `hybrid` | Hierarchical mesh for maximum flexibility | Complex multi-domain tasks |
284
+ | Provider | Models | Features | Cost |
285
+ |----------|--------|----------|------|
286
+ | **Anthropic** | Claude 3.5 Sonnet, Claude 3 Opus, Claude 3 Haiku | Native, streaming, tool calling | $3-15/1M tokens |
287
+ | **OpenAI** | GPT-4o, GPT-4 Turbo, GPT-3.5, o1-preview, o3-mini | Function calling, vision | $0.50-60/1M tokens |
288
+ | **Google** | Gemini 2.0 Flash, Gemini 1.5 Pro/Flash | Multimodal, long context | $0.075-7/1M tokens |
289
+ | **Cohere** | Command R+, Command R, Command Light | RAG optimized | $0.50-15/1M tokens |
290
+ | **Ollama** | Llama 3.2, Mistral, CodeLlama, DeepSeek | Local, free, offline | Free |
291
+ | **RuVector** | Custom models via @ruvector/ruvllm | WASM optimized | Custom |
285
292
 
286
- #### Strategies
293
+ ### Provider Load Balancing
287
294
 
288
- | Strategy | Description | Agent Distribution |
289
- |----------|-------------|-------------------|
290
- | `research` | Distributed research and analysis | 1 coordinator, 4 researchers, 2 analysts |
291
- | `development` | Collaborative code development | 1 coordinator, 1 architect, 3 coders, 2 testers, 1 reviewer |
292
- | `testing` | Comprehensive test coverage | 1 test lead, 2 unit testers, 2 integration testers, 1 QA |
293
- | `optimization` | Performance optimization | 1 performance lead, 2 profilers, 2 optimizers |
294
- | `maintenance` | Codebase maintenance and refactoring | 1 coordinator, 2 refactorers, 1 documenter |
295
- | `analysis` | Code analysis and documentation | 1 analyst lead, 2 code analysts, 1 security analyst |
296
-
297
- #### Examples
295
+ | Strategy | Description | Best For |
296
+ |----------|-------------|----------|
297
+ | `round-robin` | Rotate through providers sequentially | Even distribution |
298
+ | `least-loaded` | Use provider with lowest current load | High throughput |
299
+ | `latency-based` | Use fastest responding provider | Low latency |
300
+ | `cost-based` | Use cheapest provider that meets requirements | Cost optimization (85%+ savings) |
298
301
 
299
- ```bash
300
- # Initialize V3 swarm (recommended)
301
- claude-flow swarm init --v3-mode
302
+ ### Embedding Providers (`@claude-flow/embeddings`)
302
303
 
303
- # Initialize with specific topology
304
- claude-flow swarm init -t mesh --max-agents 10
304
+ | Provider | Models | Dimensions | Latency | Cost |
305
+ |----------|--------|------------|---------|------|
306
+ | **Agentic-Flow** | ONNX SIMD optimized | 384 | ~3ms | Free (local) |
307
+ | **OpenAI** | text-embedding-3-small/large, ada-002 | 1536-3072 | ~50-100ms | $0.02-0.13/1M tokens |
308
+ | **Transformers.js** | all-MiniLM-L6-v2, all-mpnet-base-v2, bge-small | 384-768 | ~230ms | Free (local) |
309
+ | **Mock** | Deterministic hash-based | Configurable | <1ms | Free |
305
310
 
306
- # Start development swarm
307
- claude-flow swarm start -o "Build REST API with authentication" -s development
311
+ ### Embedding Features
308
312
 
309
- # Parallel analysis swarm
310
- claude-flow swarm start -o "Analyze codebase for performance issues" --parallel
313
+ | Feature | Description | Performance |
314
+ |---------|-------------|-------------|
315
+ | **Auto-Install** | `provider: 'auto'` installs agentic-flow automatically | Zero config |
316
+ | **Smart Fallback** | agentic-flow → transformers → mock chain | Always works |
317
+ | **75x Faster** | Agentic-flow ONNX vs Transformers.js | 3ms vs 230ms |
318
+ | **LRU Caching** | Intelligent cache with hit rate tracking | <1ms cache hits |
319
+ | **Batch Processing** | Efficient batch embedding with partial cache | 10 items <100ms |
320
+ | **Similarity Functions** | Cosine, Euclidean, Dot product | Optimized math |
311
321
 
312
- # Check swarm status
313
- claude-flow swarm status swarm-123
322
+ ### Consensus Strategies (`@claude-flow/swarm`)
314
323
 
315
- # Scale swarm
316
- claude-flow swarm scale swarm-123 --agents 20
324
+ | Strategy | Algorithm | Fault Tolerance | Latency | Best For |
325
+ |----------|-----------|-----------------|---------|----------|
326
+ | **Byzantine (PBFT)** | Practical Byzantine Fault Tolerance | f < n/3 faulty nodes | ~100ms | Adversarial environments |
327
+ | **Raft** | Leader-based log replication | f < n/2 failures | ~50ms | Strong consistency |
328
+ | **Gossip** | Epidemic protocol dissemination | High partition tolerance | ~200ms | Eventually consistent |
329
+ | **CRDT** | Conflict-free Replicated Data Types | Strong eventual consistency | ~10ms | Concurrent updates |
330
+ | **Quorum** | Configurable read/write quorums | Flexible | ~75ms | Tunable consistency |
317
331
 
318
- # V3 15-agent coordination
319
- claude-flow swarm coordinate --agents 15
332
+ ### CLI Commands (`@claude-flow/cli`)
320
333
 
321
- # Stop with state save
322
- claude-flow swarm stop swarm-123 --save-state
323
- ```
324
-
325
- ---
334
+ | Command | Subcommands | Description |
335
+ |---------|-------------|-------------|
336
+ | `init` | 4 | Project initialization (wizard, check, skills, hooks) |
337
+ | `agent` | 8 | Agent lifecycle (spawn, list, status, stop, metrics, pool, health, logs) |
338
+ | `swarm` | 6 | Swarm coordination (init, start, status, stop, scale, coordinate) |
339
+ | `memory` | 11 | Memory operations (store, retrieve, search, list, delete, stats, configure, cleanup, compress, export, import) |
340
+ | `mcp` | 9 | MCP server (start, stop, status, health, restart, tools, toggle, exec, logs) |
341
+ | `task` | 6 | Task management (create, list, status, cancel, assign, retry) |
342
+ | `session` | 7 | Session management (list, save, restore, delete, export, import, current) |
343
+ | `config` | 7 | Configuration (init, get, set, providers, reset, export, import) |
344
+ | `status` | 3 | System status with watch mode (agents, tasks, memory) |
345
+ | `workflow` | 6 | Workflow execution (run, validate, list, status, stop, template) |
346
+ | `hooks` | 32 | Self-learning hooks (pre/post-edit, pre/post-command, route, explain, pretrain, session-*, intelligence/*, worker/*, progress) |
347
+ | `hive-mind` | 6 | Queen-led coordination (init, spawn, status, task, optimize-memory, shutdown) |
348
+ | `migrate` | 5 | V2→V3 migration (status, run, verify, rollback, breaking) |
349
+ | `neural` | 5 | Neural pattern training (train, status, patterns, predict, optimize) |
350
+ | `security` | 6 | Security scanning (scan, audit, cve, threats, validate, report) |
351
+ | `performance` | 5 | Performance profiling (benchmark, profile, metrics, optimize, report) |
352
+ | `providers` | 5 | AI providers (list, add, remove, test, configure) |
353
+ | `plugins` | 5 | Plugin management (list, install, uninstall, enable, disable) |
354
+ | `deployment` | 5 | Deployment management (deploy, rollback, status, environments, release) |
355
+ | `embeddings` | 13 | Vector embeddings with ONNX, hyperbolic space, neural substrate |
356
+ | `daemon` | 5 | Background workers (start, stop, status, trigger, enable) |
357
+ | `progress` | 4 | V3 implementation progress (check, sync, summary, watch) |
358
+ | `claims` | 4 | Authorization (check, grant, revoke, list) |
326
359
 
327
- ### `memory` - Memory Management
360
+ ### Testing Framework (`@claude-flow/testing`)
328
361
 
329
- AgentDB memory operations with vector search, caching, and optimization.
362
+ | Component | Description | Features |
363
+ |-----------|-------------|----------|
364
+ | **London School TDD** | Behavior verification with mocks | Mock-first, interaction testing |
365
+ | **Vitest Integration** | ADR-008 compliant test runner | 10x faster than Jest |
366
+ | **Fixture Library** | Pre-defined test data | Agents, memory, swarm, MCP |
367
+ | **Mock Factory** | Application and service mocks | Auto-reset, state tracking |
368
+ | **Async Utilities** | waitFor, retry, withTimeout | Reliable async testing |
369
+ | **Performance Assertions** | V3 target validation | Speedup, memory, latency checks |
370
+
371
+ ### Testing Fixtures
372
+
373
+ | Fixture Type | Contents | Use Case |
374
+ |--------------|----------|----------|
375
+ | `agentConfigs` | 15 V3 agent configurations | Agent testing |
376
+ | `memoryEntries` | Patterns, rules, embeddings | Memory testing |
377
+ | `swarmConfigs` | V3 default, minimal, mesh, hierarchical | Swarm testing |
378
+ | `mcpTools` | 27+ tool definitions | MCP testing |
379
+
380
+ ### Deployment & CI/CD (`@claude-flow/deployment`)
381
+
382
+ | Feature | Description | Automation |
383
+ |---------|-------------|------------|
384
+ | **Version Bumping** | major, minor, patch, prerelease | Automatic semver |
385
+ | **Changelog Generation** | Conventional commits parsing | Auto-generated |
386
+ | **Git Integration** | Tagging, committing | Automatic |
387
+ | **NPM Publishing** | alpha, beta, rc, latest tags | Tag-based |
388
+ | **Validation** | Lint, test, build, dependency checks | Pre-release |
389
+ | **Dry Run Mode** | Test releases without changes | Safe testing |
390
+
391
+ ### Release Channels
392
+
393
+ | Channel | Version Format | Purpose |
394
+ |---------|---------------|---------|
395
+ | `alpha` | 1.0.0-alpha.1 | Early development |
396
+ | `beta` | 1.0.0-beta.1 | Feature complete, testing |
397
+ | `rc` | 1.0.0-rc.1 | Release candidate |
398
+ | `latest` | 1.0.0 | Stable production |
399
+
400
+ ### Integration (`@claude-flow/integration`)
401
+
402
+ | Component | Description | Performance |
403
+ |-----------|-------------|-------------|
404
+ | **AgenticFlowBridge** | agentic-flow@alpha integration | ADR-001 compliant |
405
+ | **SONA Adapter** | Learning system integration | <0.05ms adaptation |
406
+ | **Flash Attention** | Attention mechanism coordinator | 2.49x-7.47x speedup |
407
+ | **SDK Bridge** | Version negotiation, API compatibility | Auto-detection |
408
+ | **Feature Flags** | Dynamic feature management | 9 configurable flags |
409
+ | **Runtime Detection** | NAPI, WASM, JS auto-selection | Optimal performance |
410
+
411
+ ### Integration Runtimes
412
+
413
+ | Runtime | Performance | Requirements |
414
+ |---------|-------------|--------------|
415
+ | **NAPI** | Optimal | Native bindings, x64 |
416
+ | **WASM** | Good | WebAssembly support |
417
+ | **JS** | Fallback | Always available |
418
+
419
+ ### Performance Benchmarking (`@claude-flow/performance`)
420
+
421
+ | Capability | Description | Output |
422
+ |------------|-------------|--------|
423
+ | **Statistical Analysis** | Mean, median, P95, P99, stddev | Comprehensive metrics |
424
+ | **Memory Tracking** | Heap, RSS, external, array buffers | Resource monitoring |
425
+ | **Auto-Calibration** | Automatic iteration adjustment | Statistical significance |
426
+ | **Regression Detection** | Baseline comparison | Change detection |
427
+ | **V3 Target Validation** | Built-in performance targets | Pass/fail checking |
428
+
429
+ ### V3 Benchmark Targets
430
+
431
+ | Category | Benchmark | Target |
432
+ |----------|-----------|--------|
433
+ | **Startup** | CLI cold start | <500ms |
434
+ | **Startup** | MCP server init | <400ms |
435
+ | **Startup** | Agent spawn | <200ms |
436
+ | **Memory** | Vector search | <1ms |
437
+ | **Memory** | HNSW indexing | <10ms |
438
+ | **Memory** | Memory write | <5ms |
439
+ | **Swarm** | Agent coordination | <50ms |
440
+ | **Swarm** | Consensus latency | <100ms |
441
+ | **Neural** | SONA adaptation | <0.05ms |
442
+
443
+ ### Neural & SONA (`@claude-flow/neural`)
444
+
445
+ | Feature | Description | Performance |
446
+ |---------|-------------|-------------|
447
+ | **SONA Learning** | Self-Optimizing Neural Architecture | <0.05ms adaptation |
448
+ | **5 Learning Modes** | real-time, balanced, research, edge, batch | Mode-specific optimization |
449
+ | **9 RL Algorithms** | PPO, A2C, DQN, Q-Learning, SARSA, Decision Transformer, etc. | Comprehensive RL |
450
+ | **LoRA Integration** | Low-Rank Adaptation for efficient fine-tuning | Minimal memory overhead |
451
+ | **MicroLoRA** | Ultra-lightweight LoRA for edge/real-time modes | <5MB memory footprint |
452
+ | **EWC++ Memory** | Elastic Weight Consolidation prevents catastrophic forgetting | Zero knowledge loss |
453
+ | **Trajectory Tracking** | Execution path recording for pattern extraction | Continuous learning |
330
454
 
331
- ```bash
332
- claude-flow memory <subcommand> [options]
333
- ```
455
+ ### Memory & Vector Optimization
334
456
 
335
- #### Subcommands
336
-
337
- | Subcommand | Aliases | Description |
338
- |------------|---------|-------------|
339
- | `store` | | Store data in memory with optional vector embedding |
340
- | `retrieve` | `get` | Retrieve data from memory by key |
341
- | `search` | | Semantic/vector search with HNSW indexing |
342
- | `list` | `ls` | List memory entries with filtering |
343
- | `delete` | `rm` | Delete memory entry |
344
- | `stats` | | Show memory statistics and performance |
345
- | `configure` | `config` | Configure memory backend and HNSW parameters |
346
- | `cleanup` | | Clean up stale and expired entries |
347
- | `compress` | | Compress and optimize memory storage |
348
- | `export` | | Export memory to file (JSON, CSV, binary) |
349
- | `import` | | Import memory from file |
350
-
351
- #### Memory Backends
352
-
353
- | Backend | Description | Performance |
457
+ | Feature | Description | Improvement |
354
458
  |---------|-------------|-------------|
355
- | `agentdb` | Vector database with HNSW indexing | 150x-12,500x faster search |
356
- | `sqlite` | Lightweight local storage | Good for small datasets |
357
- | `hybrid` | SQLite + AgentDB (recommended) | Best of both worlds |
358
- | `memory` | In-memory (non-persistent) | Fastest, no persistence |
359
-
360
- #### Search Options
459
+ | **Scalar Quantization** | Reduce vector precision for memory savings | 4x memory reduction |
460
+ | **Product Quantization** | Compress vectors into codebooks | 8-32x memory reduction |
461
+ | **HNSW Indexing** | Hierarchical Navigable Small World graphs | 150x-12,500x faster search |
462
+ | **LRU Caching** | Intelligent embedding cache with TTL | <1ms cache hits |
463
+ | **Batch Processing** | Process multiple embeddings in single call | 10x throughput |
464
+ | **Memory Compression** | Pattern distillation and pruning | 50-75% reduction |
361
465
 
362
- | Option | Short | Description | Default |
363
- |--------|-------|-------------|---------|
364
- | `--query` | `-q` | Search query | required |
365
- | `--namespace` | `-n` | Memory namespace | all |
366
- | `--limit` | `-l` | Maximum results | `10` |
367
- | `--threshold` | | Similarity threshold (0-1) | `0.7` |
368
- | `--type` | `-t` | Search type (semantic, keyword, hybrid) | `semantic` |
466
+ ### Embedding System (`@claude-flow/embeddings`)
369
467
 
370
- #### Examples
468
+ | Feature | Description | Performance |
469
+ |---------|-------------|-------------|
470
+ | **Multi-Provider** | Agentic-Flow (ONNX), OpenAI, Transformers.js, Mock | 4 providers |
471
+ | **Auto-Install** | `claude-flow embeddings init` or `createEmbeddingServiceAsync()` | Zero config |
472
+ | **75x Faster** | Agentic-flow ONNX SIMD vs Transformers.js | 3ms vs 230ms |
473
+ | **Hyperbolic Space** | Poincaré ball model for hierarchical data | Exponential capacity |
474
+ | **Dimensions** | 384 to 3072 configurable | Quality vs speed tradeoff |
475
+ | **Similarity Metrics** | Cosine, Euclidean, Dot product, Hyperbolic distance | Task-specific matching |
476
+ | **Neural Substrate** | Drift detection, memory physics, swarm coordination | agentic-flow integration |
477
+ | **LRU + SQLite Cache** | Persistent cross-session caching | <1ms cache hits |
371
478
 
372
479
  ```bash
373
- # Store text data
374
- claude-flow memory store -k "api/auth" -v "JWT implementation with refresh tokens"
480
+ # Initialize ONNX embeddings with hyperbolic config
481
+ claude-flow embeddings init
375
482
 
376
- # Store as vector embedding
377
- claude-flow memory store -k "pattern/singleton" -v "Singleton pattern description" --vector
483
+ # Use larger model for higher quality
484
+ claude-flow embeddings init --model all-mpnet-base-v2
378
485
 
379
486
  # Semantic search
380
- claude-flow memory search -q "authentication patterns"
381
-
382
- # Keyword search
383
- claude-flow memory search -q "JWT" -t keyword
384
-
385
- # Hybrid search with threshold
386
- claude-flow memory search -q "security best practices" -t hybrid --threshold 0.8
387
-
388
- # List entries by namespace
389
- claude-flow memory list -n patterns
390
-
391
- # Show memory statistics
392
- claude-flow memory stats
393
-
394
- # Configure HNSW parameters
395
- claude-flow memory configure -b hybrid --hnsw-m 16 --hnsw-ef 200
396
-
397
- # Cleanup old entries
398
- claude-flow memory cleanup --older-than 30d
399
-
400
- # Cleanup expired TTL entries
401
- claude-flow memory cleanup --expired-only
402
-
403
- # Compress with quantization (32x memory reduction)
404
- claude-flow memory compress --quantize --bits 4
405
-
406
- # Export memory
407
- claude-flow memory export -o ./backup.json -f json
408
-
409
- # Import memory
410
- claude-flow memory import -i ./backup.json --merge
487
+ claude-flow embeddings search -q "authentication patterns"
411
488
  ```
412
489
 
413
- ---
414
-
415
- ### `mcp` - MCP Server Management
416
-
417
- Model Context Protocol server control and tool execution.
418
-
419
- ```bash
420
- claude-flow mcp <subcommand> [options]
490
+ ### SONA Learning Modes
491
+
492
+ | Mode | Adaptation | Quality | Memory | Use Case |
493
+ |------|------------|---------|--------|----------|
494
+ | `real-time` | <0.5ms | 70%+ | 25MB | Production, low-latency |
495
+ | `balanced` | <18ms | 75%+ | 50MB | General purpose |
496
+ | `research` | <100ms | 95%+ | 100MB | Deep exploration |
497
+ | `edge` | <1ms | 80%+ | 5MB | Resource-constrained |
498
+ | `batch` | <50ms | 85%+ | 75MB | High-throughput |
499
+
500
+ ### RL Algorithms
501
+
502
+ | Algorithm | Type | Best For |
503
+ |-----------|------|----------|
504
+ | **PPO** | Policy Gradient | Stable continuous learning |
505
+ | **A2C** | Actor-Critic | Balanced exploration/exploitation |
506
+ | **DQN** | Value-based | Discrete action spaces |
507
+ | **Q-Learning** | Tabular | Simple state spaces |
508
+ | **SARSA** | On-policy | Online learning |
509
+ | **Decision Transformer** | Sequence modeling | Long-horizon planning |
510
+
511
+ ### Hive-Mind Coordination
512
+
513
+ | Feature | Description | Capability |
514
+ |---------|-------------|------------|
515
+ | **Queen-Led Topology** | Hierarchical command structure | Unlimited agents + sub-workers |
516
+ | **Byzantine Consensus** | Fault-tolerant agreement | f < n/3 tolerance |
517
+ | **Collective Memory** | Shared pattern storage | Distillation, compression |
518
+ | **Specialist Spawning** | Domain-specific agents | Security, performance, etc. |
519
+ | **Adaptive Topology** | Dynamic structure changes | Load-based optimization |
520
+
521
+ ### agentic-flow@alpha Integration
522
+
523
+ | Feature | Description | Benefit |
524
+ |---------|-------------|---------|
525
+ | **ADR-001 Compliance** | Build on agentic-flow, don't duplicate | Eliminates 10,000+ duplicate lines |
526
+ | **Core Foundation** | Use agentic-flow as the base layer | Unified architecture |
527
+ | **SONA Integration** | Seamless learning system connection | <0.05ms adaptation |
528
+ | **Flash Attention** | Optimized attention mechanisms | 2.49x-7.47x speedup |
529
+ | **AgentDB Bridge** | Vector storage integration | 150x-12,500x faster search |
530
+ | **Feature Flags** | Dynamic capability management | 9 configurable features |
531
+ | **Runtime Detection** | NAPI/WASM/JS auto-selection | Optimal performance per platform |
532
+ | **Graceful Fallback** | Works with or without agentic-flow | Always functional |
533
+
534
+ ### MCP Server (`@claude-flow/mcp`)
535
+
536
+ | Feature | Description | Spec |
537
+ |---------|-------------|------|
538
+ | **MCP 2025-11-25** | Full specification compliance | Latest MCP standard |
539
+ | **Multiple Transports** | stdio, HTTP, WebSocket, in-process | Flexible connectivity |
540
+ | **Resources** | list, read, subscribe with caching | Dynamic content |
541
+ | **Prompts** | Templates with arguments and embedding | Reusable prompts |
542
+ | **Tasks** | Async operations with progress/cancel | Long-running ops |
543
+ | **Tool Registry** | O(1) lookup, <10ms registration | Fast tool access |
544
+ | **Connection Pooling** | Max 10 connections, configurable | Resource management |
545
+ | **Session Management** | Timeout handling, authentication | Secure sessions |
546
+
547
+ ### MCP Methods
548
+
549
+ | Method | Description |
550
+ |--------|-------------|
551
+ | `initialize` | Initialize connection |
552
+ | `tools/list` | List available tools |
553
+ | `tools/call` | Execute a tool |
554
+ | `resources/list` | List resources with pagination |
555
+ | `resources/read` | Read resource content |
556
+ | `resources/subscribe` | Subscribe to updates |
557
+ | `prompts/list` | List prompts with pagination |
558
+ | `prompts/get` | Get prompt with arguments |
559
+ | `tasks/status` | Get task status |
560
+ | `tasks/cancel` | Cancel running task |
561
+ | `completion/complete` | Auto-complete arguments |
562
+
563
+ ### Security Module (`@claude-flow/security`)
564
+
565
+ | Feature | CVE/Issue | Description |
566
+ |---------|-----------|-------------|
567
+ | **Password Hashing** | CVE-2 | Secure bcrypt with 12+ rounds |
568
+ | **Credential Generation** | CVE-3 | Cryptographically secure API keys |
569
+ | **Safe Command Execution** | HIGH-1 | Allowlist-based command execution |
570
+ | **Path Validation** | HIGH-2 | Path traversal and symlink protection |
571
+ | **Input Validation** | General | Zod-based schema validation |
572
+ | **Token Generation** | General | HMAC-signed secure tokens |
573
+ | **HTML Sanitization** | XSS | Script and injection prevention |
574
+
575
+ ### Security Validation Schemas
576
+
577
+ | Schema | Purpose |
578
+ |--------|---------|
579
+ | `SafeStringSchema` | Basic safe string with length limits |
580
+ | `IdentifierSchema` | Alphanumeric identifiers |
581
+ | `FilenameSchema` | Safe filenames |
582
+ | `EmailSchema` | Email addresses |
583
+ | `PasswordSchema` | Secure passwords (8-72 chars) |
584
+ | `UUIDSchema` | UUID v4 format |
585
+ | `HttpsUrlSchema` | HTTPS URLs only |
586
+ | `SpawnAgentSchema` | Agent spawn requests |
587
+ | `TaskInputSchema` | Task definitions |
588
+
589
+ ### Hooks System (`@claude-flow/hooks`)
590
+
591
+ | Component | Description | Performance |
592
+ |-----------|-------------|-------------|
593
+ | **ReasoningBank** | Pattern storage with HNSW indexing | 150x faster retrieval |
594
+ | **GuidanceProvider** | Context-aware development guidance | Real-time suggestions |
595
+ | **PatternLearning** | Automatic strategy extraction | Continuous improvement |
596
+ | **QualityTracking** | Success/failure rate per pattern | Performance metrics |
597
+ | **DomainDetection** | Auto-categorization of patterns | Security, testing, etc. |
598
+ | **AgentRouting** | Task-to-agent optimization | Historical performance |
599
+ | **Consolidation** | Prune low-quality, promote high-quality | Memory optimization |
600
+
601
+ ### Hook Lifecycle Events
602
+
603
+ | Phase | Hooks | Purpose |
604
+ |-------|-------|---------|
605
+ | **Pre-Edit** | `pre-edit` | Context gathering, security checks |
606
+ | **Post-Edit** | `post-edit` | Outcome recording, pattern learning |
607
+ | **Pre-Command** | `pre-command` | Risk assessment, validation |
608
+ | **Post-Command** | `post-command` | Success/failure tracking |
609
+ | **Pre-Task** | `pre-task` | Setup, resource allocation |
610
+ | **Post-Task** | `post-task` | Cleanup, learning |
611
+ | **Session** | `session-end`, `session-restore` | State management |
612
+
613
+ ### V3 Statusline (`@claude-flow/hooks`)
614
+
615
+ Real-time development status display for Claude Code integration showing DDD progress, swarm activity, security status, and system metrics.
616
+
617
+ **Output Format:**
618
+ ```
619
+ ▊ Claude Flow V3 ● ruvnet │ ⎇ v3 │ Opus 4.5
620
+ ─────────────────────────────────────────────────────
621
+ 🏗️ DDD Domains [●●●●●] 5/5 ⚡ 1.0x → 2.49x-7.47x
622
+ 🤖 Swarm ◉ [58/15] 👥 0 🟢 CVE 3/3 💾 22282MB 📂 47% 🧠 10%
623
+ 🔧 Architecture DDD ● 98% │ Security ●CLEAN │ Memory ●AgentDB │ Integration ●
421
624
  ```
422
625
 
423
- #### Subcommands
424
-
425
- | Subcommand | Description |
426
- |------------|-------------|
427
- | `start` | Start MCP server with specified transport |
428
- | `stop` | Stop MCP server (graceful or forced) |
429
- | `status` | Show MCP server status and metrics |
430
- | `health` | Check MCP server health |
431
- | `restart` | Restart MCP server |
432
- | `tools` | List available MCP tools by category |
433
- | `toggle` | Enable or disable specific tools |
434
- | `exec` | Execute an MCP tool directly |
435
- | `logs` | Show MCP server logs |
436
-
437
- #### Transport Types
438
-
439
- | Transport | Description | Use Case |
440
- |-----------|-------------|----------|
441
- | `stdio` | Standard I/O (default) | Claude Code integration |
442
- | `http` | HTTP REST API | Web integrations, remote access |
443
- | `websocket` | WebSocket connection | Real-time bidirectional |
444
-
445
- #### Tool Categories
446
-
447
- | Category | Description | Tool Count |
448
- |----------|-------------|------------|
449
- | `agent` | Agent lifecycle management | 4 |
450
- | `swarm` | Swarm coordination | 3 |
451
- | `memory` | Memory operations | 3 |
452
- | `config` | Configuration | 3 |
453
- | `hooks` | Hook execution | 9 |
454
- | `system` | System operations | 3 |
455
-
456
- #### Examples
457
-
626
+ | Indicator | Description | Values |
627
+ |-----------|-------------|--------|
628
+ | `▊ Claude Flow V3` | Project header | Always shown |
629
+ | `● ruvnet` | GitHub user (via `gh` CLI) | Dynamic |
630
+ | `⎇ v3` | Current git branch | Dynamic |
631
+ | `Opus 4.5` | Claude model name | From Claude Code |
632
+ | `[●●●●●]` | DDD domain progress bar | 0-5 domains |
633
+ | `⚡ 1.0x → 2.49x-7.47x` | Performance speedup target | Current → Target |
634
+ | `◉/○` | Swarm coordination status | Active/Inactive |
635
+ | `[58/15]` | Active agents / max agents | Process count |
636
+ | `👥 0` | Sub-agents spawned | Task tool agents |
637
+ | `🟢 CVE 3/3` | Security CVE remediation | Fixed/Total |
638
+ | `💾 22282MB` | Memory usage (Node.js processes) | Real-time |
639
+ | `📂 47%` | Context window usage | From Claude Code |
640
+ | `🧠 10%` | Intelligence score (patterns learned) | 0-100% |
641
+ | `DDD ● 98%` | Domain-Driven Design progress | Percentage |
642
+ | `Security ●CLEAN` | Security audit status | CLEAN/PENDING/FAILED |
643
+ | `Memory ●AgentDB` | Memory backend in use | AgentDB/SQLite/Hybrid |
644
+ | `Integration ●` | agentic-flow integration status | Active/Inactive |
645
+
646
+ **Usage:**
458
647
  ```bash
459
- # Start with stdio (default)
460
- claude-flow mcp start
648
+ # V3 statusline (Node.js)
649
+ node v3/@claude-flow/hooks/bin/statusline.js
461
650
 
462
- # Start HTTP server on port 8080
463
- claude-flow mcp start -t http -p 8080
651
+ # JSON output for scripting
652
+ node v3/@claude-flow/hooks/bin/statusline.js --json
464
653
 
465
- # Start as background daemon
466
- claude-flow mcp start -d
654
+ # Compact JSON (single line)
655
+ node v3/@claude-flow/hooks/bin/statusline.js --compact
467
656
 
468
- # Check server status
469
- claude-flow mcp status
470
-
471
- # Health check
472
- claude-flow mcp health
473
-
474
- # List all tools
475
- claude-flow mcp tools
476
-
477
- # List tools by category
478
- claude-flow mcp tools -c memory
479
-
480
- # Execute a tool
481
- claude-flow mcp exec -t swarm/init -p '{"topology":"mesh"}'
482
-
483
- # View logs
484
- claude-flow mcp logs -n 50 -f
485
-
486
- # Restart server
487
- claude-flow mcp restart
488
-
489
- # Stop server
490
- claude-flow mcp stop
657
+ # Help
658
+ node v3/@claude-flow/hooks/bin/statusline.js --help
491
659
  ```
492
660
 
493
- ---
494
-
495
- ### `task` - Task Management
496
-
497
- Create, assign, and manage tasks across agents.
661
+ **Claude Code Integration:**
498
662
 
499
- ```bash
500
- claude-flow task <subcommand> [options]
663
+ Add to `.claude/settings.json`:
664
+ ```json
665
+ {
666
+ "statusLine": {
667
+ "type": "command",
668
+ "command": "node v3/@claude-flow/hooks/bin/statusline.js"
669
+ }
670
+ }
501
671
  ```
502
672
 
503
- #### Subcommands
673
+ **Data Sources:**
674
+ - `.claude-flow/metrics/v3-progress.json` - DDD domain progress
675
+ - `.claude-flow/metrics/swarm-activity.json` - Active agent counts
676
+ - `.claude-flow/security/audit-status.json` - CVE remediation status
677
+ - `.claude-flow/learning/patterns.db` - Intelligence score (pattern count)
678
+ - Process detection via `ps aux` - Real-time memory and agent counts
679
+ - Git branch via `git branch --show-current`
680
+ - GitHub user via `gh api user`
504
681
 
505
- | Subcommand | Description |
506
- |------------|-------------|
507
- | `create` | Create a new task with priority and dependencies |
508
- | `list` | List tasks with status filtering |
509
- | `status` | Show detailed task status |
510
- | `cancel` | Cancel a pending or running task |
511
- | `assign` | Assign task to specific agent |
512
- | `retry` | Retry a failed task |
682
+ ### Background Daemons
513
683
 
514
- #### Examples
684
+ #### V3 Node.js Worker Daemon (Recommended)
515
685
 
516
- ```bash
517
- # Create a task
518
- claude-flow task create "Implement user authentication" -p high
686
+ Cross-platform TypeScript-based daemon service with auto-scheduling:
519
687
 
520
- # Create task with dependencies
521
- claude-flow task create "Write tests" --depends-on task-001
688
+ | Worker | Interval | Priority | Description |
689
+ |--------|----------|----------|-------------|
690
+ | `map` | 5min | normal | Codebase structure mapping |
691
+ | `audit` | 10min | critical | Security vulnerability scanning |
692
+ | `optimize` | 15min | high | Performance optimization |
693
+ | `consolidate` | 30min | low | Memory consolidation |
694
+ | `testgaps` | 20min | normal | Test coverage analysis |
522
695
 
523
- # List all tasks
524
- claude-flow task list
525
-
526
- # List pending tasks
527
- claude-flow task list -s pending
696
+ **Commands:**
697
+ ```bash
698
+ # Start daemon (auto-runs on SessionStart hooks)
699
+ npx claude-flow@v3alpha daemon start
528
700
 
529
- # Get task status
530
- claude-flow task status task-001
701
+ # Check status with worker history
702
+ npx claude-flow@v3alpha daemon status
531
703
 
532
- # Assign to agent
533
- claude-flow task assign task-001 --agent coder-001
704
+ # Manually trigger a worker
705
+ npx claude-flow@v3alpha daemon trigger map
534
706
 
535
- # Cancel task
536
- claude-flow task cancel task-001
707
+ # Enable/disable workers
708
+ npx claude-flow@v3alpha daemon enable map audit optimize
537
709
 
538
- # Retry failed task
539
- claude-flow task retry task-001
710
+ # Stop daemon
711
+ npx claude-flow@v3alpha daemon stop
540
712
  ```
541
713
 
542
- ---
543
-
544
- ### `session` - Session Management
545
-
546
- Manage session state, persistence, and restoration.
547
-
548
- ```bash
549
- claude-flow session <subcommand> [options]
714
+ **Daemon Status Output:**
715
+ ```
716
+ +-- Worker Daemon ---+
717
+ | Status: ● RUNNING |
718
+ | PID: 12345 |
719
+ | Workers Enabled: 5 |
720
+ | Max Concurrent: 3 |
721
+ +--------------------+
722
+
723
+ Worker Status
724
+ +-------------+----+----------+------+---------+----------+----------+
725
+ | Worker | On | Status | Runs | Success | Last Run | Next Run |
726
+ +-------------+----+----------+------+---------+----------+----------+
727
+ | map | ✓ | idle | 12 | 100% | 2m ago | in 3m |
728
+ | audit | ✓ | idle | 6 | 100% | 5m ago | in 5m |
729
+ | optimize | ✓ | running | 4 | 100% | now | - |
730
+ | consolidate | ✓ | idle | 2 | 100% | 15m ago | in 15m |
731
+ | testgaps | ✓ | idle | 3 | 100% | 8m ago | in 12m |
732
+ +-------------+----+----------+------+---------+----------+----------+
550
733
  ```
551
734
 
552
- #### Subcommands
735
+ #### Legacy Shell Daemons (V2)
553
736
 
554
- | Subcommand | Description |
555
- |------------|-------------|
556
- | `list` | List all sessions |
557
- | `save` | Save current session state |
558
- | `restore` | Restore a previous session |
559
- | `delete` | Delete a session |
560
- | `export` | Export session to file |
561
- | `import` | Import session from file |
562
- | `current` | Show current session info |
737
+ Shell-based daemons for monitoring (Linux/macOS only):
563
738
 
564
- #### Examples
739
+ | Daemon | Interval | Purpose | Output |
740
+ |--------|----------|---------|--------|
741
+ | **Swarm Monitor** | 3s | Process detection, agent counting | `swarm-activity.json` |
742
+ | **Metrics Daemon** | 30s | V3 progress sync, SQLite metrics | `metrics.db` |
565
743
 
744
+ **Commands:**
566
745
  ```bash
567
- # List all sessions
568
- claude-flow session list
569
-
570
- # Save current session
571
- claude-flow session save --name "feature-auth"
572
-
573
- # Restore session
574
- claude-flow session restore session-123
575
-
576
- # Export session
577
- claude-flow session export -o ./session-backup.json
578
-
579
- # Import session
580
- claude-flow session import -i ./session-backup.json
581
-
582
- # Show current session
583
- claude-flow session current
584
-
585
- # Delete old session
586
- claude-flow session delete session-123
587
- ```
746
+ # Start all daemons
747
+ .claude/helpers/daemon-manager.sh start 3 5
588
748
 
589
- ---
590
-
591
- ### `config` - Configuration Management
592
-
593
- Manage configuration, providers, and settings.
749
+ # Check daemon status
750
+ .claude/helpers/daemon-manager.sh status
594
751
 
595
- ```bash
596
- claude-flow config <subcommand> [options]
752
+ # Stop all daemons
753
+ .claude/helpers/daemon-manager.sh stop
597
754
  ```
598
755
 
599
- #### Subcommands
600
-
601
- | Subcommand | Description |
602
- |------------|-------------|
603
- | `init` | Initialize configuration file |
604
- | `get` | Get configuration value |
605
- | `set` | Set configuration value |
606
- | `providers` | Manage LLM provider configurations |
607
- | `reset` | Reset configuration to defaults |
608
- | `export` | Export configuration |
609
- | `import` | Import configuration |
756
+ ### Worker Manager (7 Scheduled Workers)
610
757
 
611
- #### Examples
758
+ | Worker | Interval | Purpose |
759
+ |--------|----------|---------|
760
+ | `perf` | 5 min | Performance benchmarks |
761
+ | `health` | 5 min | Disk, memory, CPU monitoring |
762
+ | `patterns` | 15 min | Pattern dedup & pruning |
763
+ | `ddd` | 10 min | DDD progress tracking |
764
+ | `adr` | 15 min | ADR compliance checking |
765
+ | `security` | 30 min | Security vulnerability scans |
766
+ | `learning` | 30 min | Learning pattern optimization |
612
767
 
768
+ **Commands:**
613
769
  ```bash
614
- # Initialize config
615
- claude-flow config init
616
-
617
- # Get a value
618
- claude-flow config get memory.backend
770
+ # Start worker manager
771
+ .claude/helpers/worker-manager.sh start 60
619
772
 
620
- # Set a value
621
- claude-flow config set swarm.topology mesh
773
+ # Force run all workers immediately
774
+ .claude/helpers/worker-manager.sh force
622
775
 
623
- # Configure providers
624
- claude-flow config providers --add anthropic --api-key $ANTHROPIC_API_KEY
625
-
626
- # Reset to defaults
627
- claude-flow config reset --confirm
628
-
629
- # Export config
630
- claude-flow config export -o ./config-backup.json
631
-
632
- # Import config
633
- claude-flow config import -i ./config.json
776
+ # Check worker status
777
+ .claude/helpers/worker-manager.sh status
634
778
  ```
635
779
 
636
780
  ---
637
781
 
638
- ### `status` - System Status
782
+ ## Use Cases
639
783
 
640
- Monitor system status with real-time updates.
784
+ | Use Case | Command |
785
+ |----------|---------|
786
+ | Code review | `npx claude-flow@v3alpha --agent reviewer --task "Review PR #123"` |
787
+ | Test generation | `npx claude-flow@v3alpha --agent tester --task "Write tests for auth module"` |
788
+ | Security audit | `npx claude-flow@v3alpha --agent security-architect --task "Audit for vulnerabilities"` |
789
+ | Multi-agent swarm | `npx claude-flow@v3alpha swarm init --topology hierarchical` |
790
+ | Route task | `npx claude-flow@v3alpha hooks route "Optimize database queries"` |
791
+ | Performance analysis | `npx claude-flow@v3alpha --agent perf-analyzer --task "Profile API endpoints"` |
792
+ | GitHub PR management | `npx claude-flow@v3alpha --agent pr-manager --task "Review open PRs"` |
793
+ | Check V3 progress | `npx claude-flow@v3alpha progress --detailed` |
794
+ | Sync progress metrics | `npx claude-flow@v3alpha progress sync` |
641
795
 
642
- ```bash
643
- claude-flow status [subcommand] [options]
644
- ```
645
-
646
- #### Subcommands
647
-
648
- | Subcommand | Description |
649
- |------------|-------------|
650
- | `agents` | Show status of all agents |
651
- | `tasks` | Show status of all tasks |
652
- | `memory` | Show memory system status |
653
-
654
- #### Options
655
-
656
- | Option | Short | Description | Default |
657
- |--------|-------|-------------|---------|
658
- | `--watch` | `-w` | Watch mode with auto-refresh | `false` |
659
- | `--interval` | `-i` | Refresh interval in seconds | `5` |
796
+ ---
660
797
 
661
- #### Examples
798
+ ## Self-Learning Hooks Commands (27 Hooks)
662
799
 
800
+ ### Core Tool Lifecycle Hooks
663
801
  ```bash
664
- # Show all status
665
- claude-flow status
666
-
667
- # Watch mode with 2s refresh
668
- claude-flow status --watch -i 2
669
-
670
- # Agent status only
671
- claude-flow status agents
802
+ # Before/after file editing
803
+ npx claude-flow@v3alpha hooks pre-edit <filePath>
804
+ npx claude-flow@v3alpha hooks post-edit <filePath> --success true --train-patterns
672
805
 
673
- # Task status
674
- claude-flow status tasks
806
+ # Before/after commands
807
+ npx claude-flow@v3alpha hooks pre-command "<command>"
808
+ npx claude-flow@v3alpha hooks post-command "<command>" --success true
675
809
 
676
- # Memory status
677
- claude-flow status memory
810
+ # Before/after tasks
811
+ npx claude-flow@v3alpha hooks pre-task --description "<task>"
812
+ npx claude-flow@v3alpha hooks post-task --task-id "<id>" --success true
678
813
  ```
679
814
 
680
- ---
681
-
682
- ### `workflow` - Workflow Management
683
-
684
- Execute and manage automated workflows.
685
-
815
+ ### Intelligence & Routing Hooks
686
816
  ```bash
687
- claude-flow workflow <subcommand> [options]
688
- ```
817
+ # Route task to optimal agent using learned patterns
818
+ npx claude-flow@v3alpha hooks route "<task description>" --include-explanation
689
819
 
690
- #### Subcommands
820
+ # Explain routing decision with transparency
821
+ npx claude-flow@v3alpha hooks explain "<topic>" --depth comprehensive
691
822
 
692
- | Subcommand | Description |
693
- |------------|-------------|
694
- | `run` | Execute a workflow |
695
- | `validate` | Validate workflow definition |
696
- | `list` | List available workflows |
697
- | `status` | Show workflow execution status |
698
- | `stop` | Stop running workflow |
699
- | `template` | Manage workflow templates (list, show, create) |
700
-
701
- #### Examples
702
-
703
- ```bash
704
- # Run a workflow
705
- claude-flow workflow run ./workflows/deploy.yaml
823
+ # Bootstrap intelligence from repository
824
+ npx claude-flow@v3alpha hooks pretrain --model-type moe --epochs 10
706
825
 
707
- # Validate workflow
708
- claude-flow workflow validate ./workflows/deploy.yaml
826
+ # Generate optimized agent configs from pretrain data
827
+ npx claude-flow@v3alpha hooks build-agents --agent-types coder,tester --config-format yaml
709
828
 
710
- # List workflows
711
- claude-flow workflow list
712
-
713
- # Check workflow status
714
- claude-flow workflow status workflow-123
829
+ # Transfer patterns from another project
830
+ npx claude-flow@v3alpha hooks transfer <sourceProject>
715
831
 
716
- # Stop workflow
717
- claude-flow workflow stop workflow-123
832
+ # Initialize hooks system
833
+ npx claude-flow@v3alpha hooks init
718
834
 
719
- # List templates
720
- claude-flow workflow template list
835
+ # View learning metrics dashboard
836
+ npx claude-flow@v3alpha hooks metrics
721
837
 
722
- # Create from template
723
- claude-flow workflow template create --from deploy-standard
838
+ # List all registered hooks
839
+ npx claude-flow@v3alpha hooks list
724
840
  ```
725
841
 
726
- ---
842
+ ### Session Management Hooks
843
+ ```bash
844
+ # Start session with context loading
845
+ npx claude-flow@v3alpha hooks session-start --session-id "<id>" --load-context
727
846
 
728
- ### `hooks` - Self-Learning Hooks
847
+ # End session with persistence
848
+ npx claude-flow@v3alpha hooks session-end --export-metrics true --persist-patterns
729
849
 
730
- Advanced self-learning hooks with 17 subcommands for neural pattern recognition and background worker management.
850
+ # Restore previous session context
851
+ npx claude-flow@v3alpha hooks session-restore --session-id "<id>"
731
852
 
732
- ```bash
733
- claude-flow hooks <subcommand> [options]
853
+ # Send notifications to swarm
854
+ npx claude-flow@v3alpha hooks notify --message "<message>" --swarm-status
734
855
  ```
735
856
 
736
- #### Subcommands
737
-
738
- | Subcommand | Description |
739
- |------------|-------------|
740
- | `pre-edit` | Execute before file edit (get context, agent suggestions) |
741
- | `post-edit` | Execute after file edit (record outcome for learning) |
742
- | `pre-command` | Execute before command (risk assessment) |
743
- | `post-command` | Execute after command (record outcome) |
744
- | `pre-task` | Execute before task (setup, validation) |
745
- | `post-task` | Execute after task (cleanup, learning) |
746
- | `session-end` | Execute on session end (save state) |
747
- | `session-restore` | Execute on session restore (load state) |
748
- | `route` | Route task to optimal agent using learned patterns |
749
- | `explain` | Explain routing decision with transparency |
750
- | `pretrain` | Bootstrap intelligence from repository |
751
- | `build-agents` | Generate optimized agent configs from pretrain data |
752
- | `metrics` | View learning metrics dashboard |
753
- | `transfer` | Transfer patterns from another project |
754
- | `list` | List all registered hooks |
755
- | `intelligence` | RuVector intelligence (SONA, MoE, HNSW) |
756
- | `worker` | Background worker management (12 workers) |
757
-
758
- #### Learning Pipeline
759
-
760
- The hooks system implements a 4-step learning pipeline:
761
-
762
- 1. **RETRIEVE** - Top-k memory injection with MMR diversity
763
- 2. **JUDGE** - LLM-as-judge trajectory evaluation
764
- 3. **DISTILL** - Extract strategy memories from trajectories
765
- 4. **CONSOLIDATE** - Dedup, detect contradictions, prune old patterns
766
-
767
- #### Examples
768
-
857
+ ### RuVector Intelligence Hooks (Reinforcement Learning)
769
858
  ```bash
770
- # Pre-edit hook (get context and suggestions)
771
- claude-flow hooks pre-edit ./src/auth/login.ts
772
-
773
- # Post-edit hook (record success for learning)
774
- claude-flow hooks post-edit ./src/auth/login.ts --success true
775
-
776
- # Pre-command risk assessment
777
- claude-flow hooks pre-command "rm -rf ./node_modules"
778
-
779
- # Route task to optimal agent
780
- claude-flow hooks route "Implement OAuth2 authentication"
781
-
782
- # Explain routing decision
783
- claude-flow hooks explain "Implement OAuth2 authentication"
859
+ # Trajectory-based learning (4-step pipeline: RETRIEVE, JUDGE, DISTILL, CONSOLIDATE)
860
+ npx claude-flow@v3alpha hooks intelligence trajectory-start --session "<session>"
861
+ npx claude-flow@v3alpha hooks intelligence trajectory-step --action "<action>" --reward 0.9
862
+ npx claude-flow@v3alpha hooks intelligence trajectory-end --verdict success
784
863
 
785
- # Bootstrap from repository
786
- claude-flow hooks pretrain
864
+ # Pattern storage with HNSW indexing (150x faster search)
865
+ npx claude-flow@v3alpha hooks intelligence pattern-store --pattern "<pattern>" --embedding "[...]"
866
+ npx claude-flow@v3alpha hooks intelligence pattern-search --query "<query>" --limit 10
787
867
 
788
- # Build optimized agent configs
789
- claude-flow hooks build-agents --focus "security"
790
-
791
- # View learning metrics
792
- claude-flow hooks metrics
793
-
794
- # Transfer patterns from another project
795
- claude-flow hooks transfer ../other-project
796
-
797
- # View intelligence status (SONA, MoE, HNSW)
798
- claude-flow hooks intelligence
799
- ```
868
+ # Learning stats and attention focus
869
+ npx claude-flow@v3alpha hooks intelligence stats
870
+ npx claude-flow@v3alpha hooks intelligence learn --experience '{"type":"success"}'
871
+ npx claude-flow@v3alpha hooks intelligence attention --focus "<task>"
800
872
 
801
- #### Worker Subcommands
873
+ # Full intelligence system (SONA, MoE, HNSW, EWC++, Flash Attention)
874
+ npx claude-flow@v3alpha hooks intelligence
875
+ npx claude-flow@v3alpha hooks intelligence reset --confirm
802
876
 
803
- The `hooks worker` command manages 12 background workers for analysis and optimization tasks.
877
+ # ═══════════════════════════════════════════════════════════════
878
+ # Background Worker Commands (12 workers for analysis/optimization)
879
+ # ═══════════════════════════════════════════════════════════════
804
880
 
805
- | Worker | Priority | Est. Time | Description |
806
- |--------|----------|-----------|-------------|
807
- | `ultralearn` | normal | 60s | Deep knowledge acquisition and learning |
808
- | `optimize` | high | 30s | Performance optimization and tuning |
809
- | `consolidate` | low | 20s | Memory consolidation and cleanup |
810
- | `predict` | normal | 15s | Predictive preloading and anticipation |
811
- | `audit` | critical | 45s | Security analysis and vulnerability scanning |
812
- | `map` | normal | 30s | Codebase mapping and architecture analysis |
813
- | `preload` | low | 10s | Resource preloading and cache warming |
814
- | `deepdive` | normal | 60s | Deep code analysis and examination |
815
- | `document` | normal | 45s | Auto-documentation generation |
816
- | `refactor` | normal | 30s | Code refactoring suggestions |
817
- | `benchmark` | normal | 60s | Performance benchmarking |
818
- | `testgaps` | normal | 30s | Test coverage analysis |
819
-
820
- ##### Worker Commands
821
-
822
- ```bash
823
881
  # List all available workers
824
- claude-flow hooks worker list
882
+ npx claude-flow@v3alpha hooks worker list
825
883
 
826
884
  # Detect triggers from prompt text
827
- claude-flow hooks worker detect --prompt "optimize performance"
885
+ npx claude-flow@v3alpha hooks worker detect --prompt "optimize performance"
828
886
 
829
- # Auto-dispatch workers when triggers match (min confidence 0.6)
830
- claude-flow hooks worker detect --prompt "deep dive into auth" --auto-dispatch --min-confidence 0.6
887
+ # Auto-dispatch workers when triggers match (confidence 0.6)
888
+ npx claude-flow@v3alpha hooks worker detect --prompt "deep dive into auth" --auto-dispatch --min-confidence 0.6
831
889
 
832
- # Manually dispatch a worker
833
- claude-flow hooks worker dispatch --trigger refactor --context "auth module"
890
+ # Manually dispatch a worker (ultralearn, optimize, audit, map, deepdive, document, refactor, benchmark, testgaps, etc.)
891
+ npx claude-flow@v3alpha hooks worker dispatch --trigger refactor --context "auth module"
834
892
 
835
893
  # Check worker status
836
- claude-flow hooks worker status
894
+ npx claude-flow@v3alpha hooks worker status
837
895
 
838
896
  # Cancel a running worker
839
- claude-flow hooks worker cancel --id worker_refactor_1_abc123
897
+ npx claude-flow@v3alpha hooks worker cancel --id worker_refactor_1_abc123
840
898
  ```
841
899
 
842
- ##### Performance Targets
843
-
844
- | Metric | Target |
845
- |--------|--------|
846
- | Trigger detection | <5ms |
847
- | Worker spawn | <50ms |
848
- | Max concurrent | 10 |
849
-
850
- ##### UserPromptSubmit Integration
851
-
852
- Workers are automatically triggered via the `UserPromptSubmit` hook when prompt patterns match worker triggers with confidence ≥0.6.
853
-
854
- ---
855
-
856
- ### `hive-mind` - Consensus Coordination
857
-
858
- Queen-led Byzantine fault-tolerant multi-agent coordination.
859
-
860
- ```bash
861
- claude-flow hive-mind <subcommand> [options]
862
- ```
863
-
864
- #### Subcommands
865
-
866
- | Subcommand | Description |
867
- |------------|-------------|
868
- | `init` | Initialize hive-mind with topology and consensus strategy |
869
- | `spawn` | Spawn agents in the hive (queen, worker, specialist) |
870
- | `status` | Show hive-mind status with consensus health |
871
- | `task` | Submit task to hive-mind for collaborative execution |
872
- | `optimize-memory` | Optimize collective memory (distill, compress) |
873
- | `shutdown` | Gracefully shutdown hive-mind |
874
-
875
- #### Topologies
876
-
877
- | Topology | Description |
878
- |----------|-------------|
879
- | `hierarchical` | Queen controls workers directly |
880
- | `mesh` | Fully connected peer network |
881
- | `hierarchical-mesh` | Hybrid: Queen + mesh workers |
882
- | `adaptive` | Dynamic topology based on load |
883
-
884
- #### Consensus Strategies
885
-
886
- | Strategy | Description | Fault Tolerance |
887
- |----------|-------------|-----------------|
888
- | `byzantine` | Byzantine fault-tolerant (BFT) | Tolerates f < n/3 faulty nodes |
889
- | `raft` | Leader-based consensus | Tolerates f < n/2 failures |
890
- | `gossip` | Epidemic protocol for eventual consistency | High partition tolerance |
891
- | `crdt` | Conflict-free replicated data types | Strong eventual consistency |
892
- | `quorum` | Configurable quorum-based | Flexible fault tolerance |
893
-
894
- #### Examples
895
-
900
+ ### Progress Tracking Hooks
896
901
  ```bash
897
- # Initialize with defaults
898
- claude-flow hive-mind init
899
-
900
- # Initialize with Byzantine consensus
901
- claude-flow hive-mind init -t hierarchical-mesh -c byzantine --agents 15
902
-
903
- # Spawn queen
904
- claude-flow hive-mind spawn --role queen --name hive-queen
902
+ # Check V3 implementation progress
903
+ npx claude-flow@v3alpha hooks progress
905
904
 
906
- # Spawn workers
907
- claude-flow hive-mind spawn --role worker --count 5
905
+ # Detailed breakdown by category (CLI, MCP, Hooks, Packages, DDD)
906
+ npx claude-flow@v3alpha hooks progress --detailed
908
907
 
909
- # Spawn specialist
910
- claude-flow hive-mind spawn --role specialist --specialty security
908
+ # Sync progress and persist to file
909
+ npx claude-flow@v3alpha hooks progress --sync
911
910
 
912
- # Submit task for collaborative execution
913
- claude-flow hive-mind task "Implement secure API endpoints" --consensus-required
911
+ # Get human-readable summary
912
+ npx claude-flow@v3alpha hooks progress --summary
914
913
 
915
- # Check hive status
916
- claude-flow hive-mind status --detailed
917
-
918
- # Optimize collective memory
919
- claude-flow hive-mind optimize-memory --distill --compress
920
-
921
- # Graceful shutdown
922
- claude-flow hive-mind shutdown --save-state
914
+ # JSON output for scripting
915
+ npx claude-flow@v3alpha progress --json
923
916
  ```
924
917
 
925
918
  ---
926
919
 
927
- ### `migrate` - V2 to V3 Migration
920
+ ## Architecture
928
921
 
929
- Migration tools for transitioning from V2 to V3.
922
+ ### V3 Module Structure
930
923
 
931
- ```bash
932
- claude-flow migrate <subcommand> [options]
933
924
  ```
934
-
935
- #### Subcommands
936
-
937
- | Subcommand | Description |
938
- |------------|-------------|
939
- | `status` | Check migration status and pending items |
940
- | `run` | Execute migration (with dry-run option) |
941
- | `verify` | Verify migration integrity |
942
- | `rollback` | Rollback to previous version |
943
- | `breaking` | Show V3 breaking changes |
944
-
945
- #### Migration Targets
946
-
947
- | Target | Description |
948
- |--------|-------------|
949
- | `config` | Migrate configuration files |
950
- | `memory` | Migrate memory/database content |
951
- | `agents` | Migrate agent configurations |
952
- | `hooks` | Migrate hook definitions |
953
- | `workflows` | Migrate workflow definitions |
954
- | `all` | Full migration |
955
-
956
- #### Examples
957
-
958
- ```bash
959
- # Check migration status
960
- claude-flow migrate status
961
-
962
- # Preview migration (dry run)
963
- claude-flow migrate run --dry-run
964
-
965
- # Run full migration with backup
966
- claude-flow migrate run -t all --backup
967
-
968
- # Migrate specific component
969
- claude-flow migrate run -t memory
970
-
971
- # Verify migration
972
- claude-flow migrate verify
973
-
974
- # Auto-fix issues
975
- claude-flow migrate verify --fix
976
-
977
- # Show breaking changes
978
- claude-flow migrate breaking
979
-
980
- # Rollback
981
- claude-flow migrate rollback --backup-id backup-1704369600
925
+ v3/
926
+ ├── @claude-flow/hooks # Event-driven lifecycle hooks + ReasoningBank
927
+ ├── @claude-flow/memory # AgentDB unification module
928
+ ├── @claude-flow/security # CVE remediation & patterns
929
+ ├── @claude-flow/swarm # 15-agent coordination
930
+ ├── @claude-flow/plugins # RuVector WASM plugins
931
+ ├── @claude-flow/cli # CLI modernization
932
+ ├── @claude-flow/neural # SONA learning integration
933
+ ├── @claude-flow/testing # TDD London School framework
934
+ ├── @claude-flow/deployment # Release & CI/CD
935
+ └── @claude-flow/shared # Shared utilities & types
982
936
  ```
937
+
938
+ ### Performance Metrics
939
+
940
+ | Metric | Measured |
941
+ |--------|----------|
942
+ | Swarm task execution | 100% success rate (7/7 strategies) |
943
+ | Average task duration | 0.15-0.30 seconds |
944
+ | Memory usage per agent | 128-320 MB |
945
+ | CPU utilization | 15-30% per agent |
946
+ | Parallel agent capacity | Unlimited (resource-dependent) |
947
+
948
+ ### Topology Performance
949
+
950
+ | Topology | Agents | Execution Time | Memory |
951
+ |----------|--------|----------------|--------|
952
+ | Centralized | 2-3 | 0.14-0.20s | 180-256 MB |
953
+ | Distributed | 4-5 | 0.10-0.12s | 128-160 MB |
954
+ | Hierarchical | 6 | 0.20s | 256 MB |
955
+ | Mesh | 4 | 0.15s | 192 MB |
956
+ | Hybrid | 7 | 0.18s | 320 MB |
983
957
 
984
958
  ---
985
959
 
986
- ### `embeddings` - Vector Embeddings
960
+ ## Cross-Platform Support
987
961
 
988
- ONNX-based embeddings with hyperbolic space (Poincaré ball), semantic search, and neural substrate integration.
962
+ ### Windows (PowerShell)
989
963
 
990
- ```bash
991
- claude-flow embeddings <subcommand> [options]
964
+ ```powershell
965
+ npx @claude-flow/security@latest audit --platform windows
966
+ $env:CLAUDE_FLOW_MODE = "integration"
992
967
  ```
993
968
 
994
- #### Subcommands
995
-
996
- | Subcommand | Description |
997
- |------------|-------------|
998
- | `init` | Initialize ONNX model and hyperbolic configuration |
999
- | `generate` | Generate embeddings for text |
1000
- | `search` | Semantic similarity search with HNSW |
1001
- | `compare` | Compare similarity between texts |
1002
- | `collections` | Manage embedding collections/namespaces |
1003
- | `index` | Manage HNSW indexes (build, rebuild, optimize) |
1004
- | `providers` | List available embedding providers |
1005
- | `chunk` | Document chunking with configurable overlap |
1006
- | `normalize` | L2/L1/minmax/zscore normalization |
1007
- | `hyperbolic` | Hyperbolic embedding operations (Poincaré ball) |
1008
- | `neural` | Neural substrate features (drift, memory, swarm) |
1009
- | `models` | List and download ONNX models |
1010
- | `cache` | Manage persistent SQLite cache |
1011
-
1012
- #### Supported Models
1013
-
1014
- | Model | Dimensions | Size | Use Case |
1015
- |-------|------------|------|----------|
1016
- | `all-MiniLM-L6-v2` | 384 | 23MB | Fast, general purpose (default) |
1017
- | `all-mpnet-base-v2` | 768 | 110MB | Higher quality, more compute |
1018
- | `bge-small-en-v1.5` | 384 | 33MB | BGE family, good for retrieval |
1019
-
1020
- #### Hyperbolic Embeddings
1021
-
1022
- The Poincaré ball model provides:
1023
- - **Better hierarchical representation** - Exponential capacity in low dimensions
1024
- - **Distance preservation** - Geodesic distance preserves hierarchy
1025
- - **Use cases** - Taxonomies, org charts, file systems, knowledge graphs
1026
-
1027
- #### Examples
969
+ ### macOS (Bash/Zsh)
1028
970
 
1029
971
  ```bash
1030
- # Initialize embedding subsystem with defaults
1031
- claude-flow embeddings init
1032
-
1033
- # Use larger model with custom curvature
1034
- claude-flow embeddings init --model all-mpnet-base-v2 --curvature -0.5
1035
-
1036
- # Euclidean only (no hyperbolic)
1037
- claude-flow embeddings init --no-hyperbolic
1038
-
1039
- # Generate embedding
1040
- claude-flow embeddings generate -t "Implement OAuth2 authentication"
1041
-
1042
- # Semantic search
1043
- claude-flow embeddings search -q "authentication patterns" --limit 10
1044
-
1045
- # Compare texts
1046
- claude-flow embeddings compare --text1 "Hello" --text2 "Hi there"
1047
-
1048
- # Document chunking
1049
- claude-flow embeddings chunk -t "Long document..." --max-size 512 --overlap 50
1050
-
1051
- # Hyperbolic operations
1052
- claude-flow embeddings hyperbolic -a convert
1053
-
1054
- # Neural substrate (drift detection, memory physics)
1055
- claude-flow embeddings neural --init
1056
- claude-flow embeddings neural -f drift
1057
-
1058
- # Download model
1059
- claude-flow embeddings models -d all-mpnet-base-v2
1060
-
1061
- # Cache stats
1062
- claude-flow embeddings cache
1063
- ```
1064
-
1065
- #### Configuration File
1066
-
1067
- After `embeddings init`, configuration is stored in `.claude-flow/embeddings.json`:
1068
-
1069
- ```json
1070
- {
1071
- "model": "all-MiniLM-L6-v2",
1072
- "modelPath": ".claude-flow/models",
1073
- "dimension": 384,
1074
- "cacheSize": 256,
1075
- "hyperbolic": {
1076
- "enabled": true,
1077
- "curvature": -1,
1078
- "epsilon": 1e-15,
1079
- "maxNorm": 0.99999
1080
- },
1081
- "neural": {
1082
- "enabled": true,
1083
- "driftThreshold": 0.3,
1084
- "decayRate": 0.01
1085
- }
1086
- }
972
+ npx @claude-flow/security@latest audit --platform darwin
973
+ export CLAUDE_FLOW_SECURITY_MODE="strict"
1087
974
  ```
1088
975
 
1089
- ---
1090
-
1091
- ### `doctor` - System Diagnostics
1092
-
1093
- System health checks with automatic fix suggestions.
976
+ ### Linux (Bash)
1094
977
 
1095
978
  ```bash
1096
- claude-flow doctor [options]
979
+ npx @claude-flow/security@latest audit --platform linux
980
+ export CLAUDE_FLOW_MEMORY_PATH="./data"
1097
981
  ```
1098
982
 
1099
- #### Health Checks
1100
-
1101
- | Check | Description | Auto-Fix |
1102
- |-------|-------------|----------|
1103
- | Node.js Version | Verify Node.js 20+ | nvm install 20 |
1104
- | npm Version | Verify npm 9+ | npm install -g npm@latest |
1105
- | Git | Check git installation | Install git |
1106
- | Git Repository | Check if in git repo | git init |
1107
- | Config File | Validate configuration | claude-flow config init |
1108
- | Daemon Status | Check daemon running | claude-flow daemon start |
1109
- | Memory Database | Check memory DB | claude-flow memory configure |
1110
- | API Keys | Check for API keys | export ANTHROPIC_API_KEY=... |
1111
- | MCP Servers | Check MCP configuration | claude mcp add claude-flow ... |
1112
- | Disk Space | Check available space | Free up disk |
1113
- | TypeScript | Check TypeScript install | npm install -D typescript |
1114
-
1115
- #### Options
1116
-
1117
- | Option | Short | Description | Default |
1118
- |--------|-------|-------------|---------|
1119
- | `--fix` | `-f` | Show fix commands for issues | `false` |
1120
- | `--component` | `-c` | Check specific component | all |
1121
- | `--verbose` | `-v` | Verbose output | `false` |
1122
-
1123
- #### Examples
1124
-
1125
- ```bash
1126
- # Run full health check
1127
- claude-flow doctor
1128
-
1129
- # Show fixes for issues
1130
- claude-flow doctor --fix
1131
-
1132
- # Check specific component
1133
- claude-flow doctor -c daemon
1134
- claude-flow doctor -c mcp
1135
- claude-flow doctor -c memory
1136
- ```
983
+ ---
1137
984
 
1138
- #### Output Example
985
+ ## Environment Variables
1139
986
 
1140
- ```
1141
- Claude Flow Doctor
1142
- System diagnostics and health check
1143
- ──────────────────────────────────────────────────
1144
-
1145
- Node.js Version: v22.21.1 (>= 20 required)
1146
- npm Version: v10.9.4
1147
- Git: v2.52.0
1148
- Git Repository: In a git repository
1149
- Config File: No config file (using defaults)
1150
- Daemon Status: Not running
1151
- Memory Database: Not initialized
1152
- ⚠ API Keys: No API keys found
1153
- ⚠ MCP Servers: No MCP config found
1154
- ✓ Disk Space: 73G available
1155
- ✓ TypeScript: v5.9.3
1156
-
1157
- ──────────────────────────────────────────────────
1158
-
1159
- Summary: 6 passed, 5 warnings
1160
-
1161
- All checks passed with some warnings.
1162
- ```
987
+ | Variable | Description | Default |
988
+ |----------|-------------|---------|
989
+ | `CLAUDE_FLOW_MODE` | Operation mode (`development`, `production`, `integration`) | `development` |
990
+ | `CLAUDE_FLOW_MEMORY_PATH` | Directory for persistent memory storage | `./data` |
991
+ | `CLAUDE_FLOW_SECURITY_MODE` | Security level (`strict`, `standard`, `permissive`) | `standard` |
992
+ | `CLAUDE_FLOW_LOG_LEVEL` | Logging verbosity (`debug`, `info`, `warn`, `error`) | `info` |
993
+ | `CLAUDE_FLOW_MAX_AGENTS` | Default concurrent agent limit (increase for more parallelism) | `15` |
994
+ | `CLAUDE_FLOW_TOPOLOGY` | Default swarm topology | `hierarchical` |
995
+ | `CLAUDE_FLOW_HNSW_M` | HNSW index M parameter (connectivity) | `16` |
996
+ | `CLAUDE_FLOW_HNSW_EF` | HNSW search ef parameter (accuracy) | `200` |
997
+ | `CLAUDE_FLOW_EMBEDDING_DIM` | Vector embedding dimensions | `384` |
998
+ | `ANTHROPIC_API_KEY` | Anthropic API key for Claude integration | - |
1163
999
 
1164
1000
  ---
1165
1001
 
1166
- ### `route` - Q-Learning Agent Router
1002
+ ## Troubleshooting
1167
1003
 
1168
- Intelligent task-to-agent routing using reinforcement learning.
1004
+ ### Common Issues
1169
1005
 
1006
+ **MCP server won't start**
1170
1007
  ```bash
1171
- claude-flow route <subcommand> [options]
1008
+ # Check if port is in use
1009
+ lsof -i :3000
1010
+ # Kill existing process
1011
+ kill -9 <PID>
1012
+ # Restart MCP server
1013
+ npx claude-flow@v3alpha mcp start
1172
1014
  ```
1173
1015
 
1174
- #### Subcommands
1175
-
1176
- | Subcommand | Description |
1177
- |------------|-------------|
1178
- | `task` | Route a task to optimal agent using Q-Learning |
1179
- | `list-agents` | List available agent types with capabilities |
1180
- | `stats` | Show router statistics and learning metrics |
1181
- | `feedback` | Provide routing feedback for continuous learning |
1182
- | `reset` | Reset Q-Learning router state |
1183
- | `export` | Export Q-table for persistence |
1184
- | `import` | Import Q-table from file |
1185
-
1186
- #### Agent Types
1187
-
1188
- | Type | Description |
1189
- |------|-------------|
1190
- | `coder` | Code implementation and debugging |
1191
- | `tester` | Testing and quality assurance |
1192
- | `reviewer` | Code review and quality checks |
1193
- | `architect` | System design and architecture |
1194
- | `researcher` | Research and information gathering |
1195
- | `optimizer` | Performance optimization |
1196
- | `debugger` | Bug fixing and troubleshooting |
1197
- | `documenter` | Documentation and comments |
1198
-
1199
- #### How It Works
1200
-
1201
- 1. **State Encoding** - Analyzes task description using hash-based feature extraction
1202
- 2. **Q-Learning** - Uses Q-table to map (state, action) pairs to expected rewards
1203
- 3. **Epsilon-Greedy** - Balances exploration (try new agents) vs exploitation (use best known)
1204
- 4. **Feedback Loop** - Learns from success/failure outcomes to improve routing
1205
-
1206
- #### Examples
1207
-
1016
+ **Agent spawn failures**
1208
1017
  ```bash
1209
- # Route a task to optimal agent
1210
- claude-flow route task "Implement user authentication with JWT"
1211
-
1212
- # Route with verbose output showing decision process
1213
- claude-flow route task "Fix memory leak in API handler" --verbose
1214
-
1215
- # List available agent types
1216
- claude-flow route list-agents
1217
-
1218
- # View router statistics
1219
- claude-flow route stats
1220
-
1221
- # Provide feedback (reward: -1 to 1)
1222
- claude-flow route feedback --agent coder --reward 0.8 --task "auth implementation"
1223
-
1224
- # Export Q-table for backup
1225
- claude-flow route export -o ./q-table.json
1226
-
1227
- # Import Q-table
1228
- claude-flow route import -i ./q-table.json
1229
-
1230
- # Reset router (start fresh)
1231
- claude-flow route reset --confirm
1018
+ # Check available memory
1019
+ free -m
1020
+ # Reduce max agents if memory constrained
1021
+ export CLAUDE_FLOW_MAX_AGENTS=5
1232
1022
  ```
1233
1023
 
1234
- ---
1235
-
1236
- ### `analyze` - Code Analysis
1237
-
1238
- Comprehensive code analysis with AST parsing, diff classification, complexity metrics, and dependency analysis.
1239
-
1024
+ **Pattern search returning no results**
1240
1025
  ```bash
1241
- claude-flow analyze <subcommand> [options]
1026
+ # Verify patterns are stored
1027
+ npx claude-flow@v3alpha hooks metrics
1028
+ # Re-run pretraining if empty
1029
+ npx claude-flow@v3alpha hooks pretrain
1242
1030
  ```
1243
1031
 
1244
- #### Subcommands
1245
-
1246
- | Subcommand | Description | Algorithm |
1247
- |------------|-------------|-----------|
1248
- | `ast` | AST analysis with symbol extraction | tree-sitter (regex fallback) |
1249
- | `complexity` | Cyclomatic and cognitive complexity | McCabe + cognitive metrics |
1250
- | `symbols` | Extract functions, classes, types | AST parsing |
1251
- | `imports` | Import dependency analysis | Static analysis |
1252
- | `diff` | Diff classification and risk assessment | Pattern matching |
1253
- | `boundaries` | Code boundaries detection | MinCut algorithm |
1254
- | `modules` | Module community detection | Louvain algorithm |
1255
- | `dependencies` | Full dependency graph | Graph building |
1256
- | `circular` | Circular dependency detection | Tarjan's SCC |
1257
- | `deps` | Project dependency analysis | npm/yarn |
1258
- | `code` | Static code quality analysis | Multi-metric |
1259
-
1260
- #### Diff Risk Levels
1261
-
1262
- | Risk | Color | Description |
1263
- |------|-------|-------------|
1264
- | `critical` | Red | Breaking changes, security-sensitive |
1265
- | `high` | Orange | Core logic, API changes |
1266
- | `medium` | Yellow | Feature additions, significant refactoring |
1267
- | `low` | Green | Documentation, tests, formatting |
1268
-
1269
- #### Examples
1270
-
1271
- ```bash
1272
- # Analyze AST of a file
1273
- claude-flow analyze ast ./src/auth/login.ts
1274
-
1275
- # Analyze with symbol extraction
1276
- claude-flow analyze symbols ./src/services/ --recursive
1277
-
1278
- # Check cyclomatic complexity
1279
- claude-flow analyze complexity ./src --threshold 10
1280
-
1281
- # Classify a git diff
1282
- claude-flow analyze diff HEAD~1
1283
-
1284
- # Classify staged changes
1285
- claude-flow analyze diff --staged
1286
-
1287
- # Find code boundaries (module splits)
1288
- claude-flow analyze boundaries ./src --min-cut
1289
-
1290
- # Detect module communities
1291
- claude-flow analyze modules ./src --algorithm louvain
1292
-
1293
- # Find circular dependencies
1294
- claude-flow analyze circular ./src
1295
-
1296
- # Full dependency graph
1297
- claude-flow analyze dependencies ./src -o ./deps.dot --format dot
1298
-
1299
- # Project dependency analysis
1300
- claude-flow analyze deps --outdated
1032
+ **Windows path issues**
1033
+ ```powershell
1034
+ # Use forward slashes or escape backslashes
1035
+ $env:CLAUDE_FLOW_MEMORY_PATH = "./data"
1036
+ # Or use absolute path
1037
+ $env:CLAUDE_FLOW_MEMORY_PATH = "C:/Users/name/claude-flow/data"
1301
1038
  ```
1302
1039
 
1303
- ---
1304
-
1305
- ### `issues` - Collaborative Issue Claims (ADR-016)
1306
-
1307
- Human-agent collaborative issue management with work stealing, load balancing, and handoffs.
1308
-
1040
+ **Permission denied errors**
1309
1041
  ```bash
1310
- claude-flow issues <subcommand> [options]
1042
+ # Fix npm permissions (Linux/macOS)
1043
+ sudo chown -R $(whoami) ~/.npm
1044
+ # Or use nvm to manage Node.js
1311
1045
  ```
1312
1046
 
1313
- #### Subcommands
1314
-
1315
- | Subcommand | Description |
1316
- |------------|-------------|
1317
- | `list` | List all active claims |
1318
- | `claim` | Claim an issue for yourself or an agent |
1319
- | `release` | Release a claim |
1320
- | `handoff` | Request handoff to another agent/user |
1321
- | `status` | Update claim status and progress |
1322
- | `stealable` | List issues available for work stealing |
1323
- | `steal` | Steal an issue from overloaded/stale claimant |
1324
- | `load` | View agent load distribution |
1325
- | `rebalance` | Rebalance claims across swarm |
1326
- | `board` | Visual Kanban-style claim board |
1327
-
1328
- #### Claim Status
1329
-
1330
- | Status | Description |
1331
- |--------|-------------|
1332
- | `active` | Actively being worked on |
1333
- | `paused` | Temporarily paused |
1334
- | `blocked` | Blocked by dependency |
1335
- | `stealable` | Available for work stealing |
1336
- | `completed` | Work completed |
1337
- | `handoff-pending` | Awaiting handoff acceptance |
1338
- | `review-requested` | Needs review |
1339
-
1340
- #### Work Stealing
1341
-
1342
- Issues can be marked stealable when:
1343
- - **Overloaded** - Claimant has too many active claims
1344
- - **Stale** - No progress for extended period
1345
- - **Blocked** - Blocked beyond timeout threshold
1346
- - **Voluntary** - Claimant voluntarily releases
1347
-
1348
- #### Examples
1349
-
1047
+ **High memory usage**
1350
1048
  ```bash
1351
- # List all claims
1352
- claude-flow issues list
1353
-
1354
- # List with status filter
1355
- claude-flow issues list --status active
1356
-
1357
- # Claim an issue
1358
- claude-flow issues claim ISSUE-123
1359
-
1360
- # Claim as agent
1361
- claude-flow issues claim ISSUE-123 --as-agent --type coder
1362
-
1363
- # Update progress
1364
- claude-flow issues status ISSUE-123 --progress 50
1365
-
1366
- # Mark as blocked
1367
- claude-flow issues status ISSUE-123 --set blocked --note "Waiting for API"
1368
-
1369
- # Request handoff to another user
1370
- claude-flow issues handoff ISSUE-123 --to user:alice:Alice
1371
-
1372
- # Request handoff to agent
1373
- claude-flow issues handoff ISSUE-123 --to agent:coder:coder-001
1374
-
1375
- # View stealable issues
1376
- claude-flow issues stealable
1377
-
1378
- # Steal an issue
1379
- claude-flow issues steal ISSUE-123 --reason overloaded
1380
-
1381
- # View agent load
1382
- claude-flow issues load
1383
-
1384
- # Rebalance swarm
1385
- claude-flow issues rebalance --strategy even
1386
-
1387
- # Visual board view
1388
- claude-flow issues board
1389
- ```
1390
-
1391
- #### Board View
1392
-
1393
- ```
1394
- 📋 Issue Claims Board
1395
- ────────────────────────────────────────────────────────────────
1396
-
1397
- ACTIVE (3) PAUSED (1) BLOCKED (1)
1398
- ──────────────── ──────────────── ────────────────
1399
- │ ISSUE-123 │ │ ISSUE-456 │ │ ISSUE-789 │
1400
- │ 🤖 coder │ │ 👤 alice │ │ 🤖 tester │
1401
- │ 75% ████░░░ │ │ 30% ██░░░░░ │ │ 50% ███░░░░ │
1402
- └──────────────┘ └──────────────┘ └──────────────┘
1049
+ # Enable garbage collection
1050
+ node --expose-gc node_modules/.bin/claude-flow
1051
+ # Reduce HNSW parameters for lower memory
1052
+ export CLAUDE_FLOW_HNSW_M=8
1053
+ export CLAUDE_FLOW_HNSW_EF=100
1403
1054
  ```
1404
1055
 
1405
1056
  ---
1406
1057
 
1407
- ### `completions` - Shell Completions
1058
+ ## Migration Guide (V2 → V3)
1408
1059
 
1409
- Generate shell completion scripts for tab completion of commands.
1060
+ ### Breaking Changes
1410
1061
 
1411
- ```bash
1412
- claude-flow completions <shell>
1413
- ```
1414
-
1415
- #### Supported Shells
1416
-
1417
- | Shell | Installation | File Location |
1418
- |-------|-------------|---------------|
1419
- | `bash` | `claude-flow completions bash >> ~/.bashrc` | `~/.bash_completion.d/claude-flow` |
1420
- | `zsh` | `claude-flow completions zsh > ~/.zfunc/_claude-flow` | `~/.zfunc/_claude-flow` |
1421
- | `fish` | `claude-flow completions fish > ~/.config/fish/completions/claude-flow.fish` | `~/.config/fish/completions/` |
1422
- | `powershell` | `claude-flow completions powershell >> $PROFILE` | PowerShell profile |
1062
+ 1. **Module Structure**: V3 uses scoped packages (`@claude-flow/*`)
1063
+ 2. **Memory Backend**: Default changed from JSON to AgentDB with HNSW
1064
+ 3. **Hooks System**: New ReasoningBank replaces basic pattern storage
1065
+ 4. **Security**: Stricter input validation enabled by default
1423
1066
 
1424
- #### Examples
1067
+ ### Upgrade Steps
1425
1068
 
1426
1069
  ```bash
1427
- # Install bash completions
1428
- claude-flow completions bash > ~/.bash_completion.d/claude-flow
1429
- source ~/.bash_completion.d/claude-flow
1070
+ # 1. Backup existing data
1071
+ cp -r ./data ./data-backup-v2
1430
1072
 
1431
- # Install zsh completions
1432
- mkdir -p ~/.zfunc
1433
- claude-flow completions zsh > ~/.zfunc/_claude-flow
1434
- # Add to .zshrc: fpath=(~/.zfunc $fpath); autoload -Uz compinit; compinit
1073
+ # 2. Update to V3
1074
+ npm install claude-flow@latest
1435
1075
 
1436
- # Install fish completions
1437
- claude-flow completions fish > ~/.config/fish/completions/claude-flow.fish
1076
+ # 3. Run migration
1077
+ npx claude-flow@v3alpha migrate --from v2
1438
1078
 
1439
- # Install PowerShell completions
1440
- claude-flow completions powershell >> $PROFILE
1079
+ # 4. Verify installation
1080
+ npx claude-flow@v3alpha --version
1081
+ npx claude-flow@v3alpha hooks metrics
1441
1082
  ```
1442
1083
 
1443
- #### Completion Features
1444
-
1445
- - All 29 top-level commands
1446
- - Full subcommand completion for each command
1447
- - Flag and option completion
1448
- - Dynamic suggestions based on context
1449
-
1450
- ---
1451
-
1452
- ### Smart Error Suggestions
1453
-
1454
- When you mistype a command, the CLI provides helpful suggestions using Levenshtein distance matching.
1084
+ ### Configuration Changes
1455
1085
 
1456
1086
  ```bash
1457
- $ claude-flow swram
1458
- [ERROR] Unknown command: swram
1459
- Did you mean one of these?
1460
- - swarm
1461
- - neural
1462
- - start
1463
-
1464
- $ claude-flow memroy
1465
- [ERROR] Unknown command: memroy
1466
- Did you mean "memory"?
1467
-
1468
- $ claude-flow agnet
1469
- [ERROR] Unknown command: agnet
1470
- Did you mean "agent"?
1471
- ```
1472
-
1473
- The suggestion system:
1474
- - Uses Levenshtein distance to find similar commands
1475
- - Recognizes 40+ common typos (e.g., `memroy` → `memory`, `swram` → `swarm`)
1476
- - Suggests up to 3 alternatives sorted by similarity
1477
- - Boosts prefix matches for better suggestions
1087
+ # V2 (deprecated)
1088
+ npx claude-flow init --mode basic
1478
1089
 
1479
- ---
1480
-
1481
- ## Global Options
1482
-
1483
- All commands support these global options:
1484
-
1485
- | Option | Short | Description | Default |
1486
- |--------|-------|-------------|---------|
1487
- | `--help` | `-h` | Show help information | |
1488
- | `--version` | `-V` | Show version number | |
1489
- | `--verbose` | `-v` | Enable verbose output | `false` |
1490
- | `--quiet` | `-q` | Suppress non-essential output | `false` |
1491
- | `--config` | `-c` | Path to configuration file | `./claude-flow.config.json` |
1492
- | `--format` | `-f` | Output format (text, json, table) | `text` |
1493
- | `--no-color` | | Disable colored output | `false` |
1494
- | `--interactive` | `-i` | Enable interactive mode | `true` (if TTY) |
1495
-
1496
- ## Programmatic API
1497
-
1498
- ### CommandParser
1499
-
1500
- ```typescript
1501
- import { CommandParser, OutputFormatter } from '@claude-flow/cli';
1502
-
1503
- // Create a parser instance
1504
- const parser = new CommandParser();
1505
-
1506
- // Register a command
1507
- parser.registerCommand({
1508
- name: 'mycommand',
1509
- description: 'My custom command',
1510
- options: [
1511
- {
1512
- name: 'type',
1513
- short: 't',
1514
- description: 'Operation type',
1515
- type: 'string',
1516
- choices: ['a', 'b', 'c'],
1517
- default: 'a'
1518
- }
1519
- ],
1520
- subcommands: [
1521
- { name: 'sub1', description: 'First subcommand' },
1522
- { name: 'sub2', description: 'Second subcommand' }
1523
- ],
1524
- action: async (ctx) => {
1525
- // Command implementation
1526
- return { success: true };
1527
- }
1528
- });
1529
-
1530
- // Parse arguments
1531
- const result = parser.parse(process.argv.slice(2));
1532
-
1533
- // Validate flags
1534
- const errors = parser.validateFlags(result.flags, result.command);
1535
-
1536
- // Get all registered commands
1537
- const commands = parser.getAllCommands();
1538
- ```
1539
-
1540
- ### Output Formatting
1541
-
1542
- ```typescript
1543
- import { OutputFormatter, output, Progress, Spinner } from '@claude-flow/cli';
1544
-
1545
- // Use the singleton instance
1546
- output.printSuccess('Operation completed');
1547
- output.printError('Something went wrong');
1548
- output.printWarning('Proceed with caution');
1549
- output.printInfo('FYI: This is informational');
1550
-
1551
- // Or create a custom formatter
1552
- const formatter = new OutputFormatter({ color: true });
1553
-
1554
- // Color methods
1555
- formatter.success('Green text');
1556
- formatter.error('Red text');
1557
- formatter.warning('Yellow text');
1558
- formatter.bold('Bold text');
1559
- formatter.dim('Dimmed text');
1560
- formatter.highlight('Highlighted text');
1561
-
1562
- // Structured output
1563
- output.printTable({
1564
- columns: [
1565
- { key: 'name', header: 'Name', width: 20 },
1566
- { key: 'status', header: 'Status', width: 10, align: 'right' }
1567
- ],
1568
- data: [
1569
- { name: 'Agent 1', status: 'active' },
1570
- { name: 'Agent 2', status: 'idle' }
1571
- ]
1572
- });
1573
-
1574
- output.printJson({ key: 'value' });
1575
- output.printList(['Item 1', 'Item 2', 'Item 3']);
1576
- output.printBox('Content here', 'Title');
1577
- output.progressBar(50, 100, 40); // 50% of 100, width 40
1578
-
1579
- // Progress indication
1580
- const spinner = new Spinner('Loading...');
1581
- spinner.start();
1582
- // ... do work
1583
- spinner.succeed('Completed');
1584
-
1585
- const progress = new Progress({ total: 100 });
1586
- progress.update(50); // 50%
1587
- progress.finish();
1588
- ```
1589
-
1590
- ### Interactive Prompts
1591
-
1592
- ```typescript
1593
- import { text, select, confirm, input, multiSelect } from '@claude-flow/cli';
1594
-
1595
- // Text input
1596
- const name = await text('Enter your name:');
1597
-
1598
- // Selection
1599
- const choice = await select({
1600
- message: 'Choose option:',
1601
- options: [
1602
- { label: 'Option A', value: 'A', hint: 'First option' },
1603
- { label: 'Option B', value: 'B', hint: 'Second option' },
1604
- ],
1605
- default: 'A'
1606
- });
1607
-
1608
- // Confirmation
1609
- const confirmed = await confirm({
1610
- message: 'Continue?',
1611
- default: false
1612
- });
1613
-
1614
- // Input with validation
1615
- const email = await input({
1616
- message: 'Enter email:',
1617
- validate: (v) => v.includes('@') || 'Invalid email'
1618
- });
1619
-
1620
- // Multi-select
1621
- const features = await multiSelect({
1622
- message: 'Select features:',
1623
- options: [
1624
- { label: 'Feature A', value: 'a' },
1625
- { label: 'Feature B', value: 'b' },
1626
- { label: 'Feature C', value: 'c' },
1627
- ]
1628
- });
1090
+ # V3 (new)
1091
+ npx claude-flow@v3alpha init
1092
+ npx claude-flow@v3alpha hooks pretrain # Bootstrap learning
1629
1093
  ```
1630
1094
 
1631
- ## TypeScript Types
1632
-
1633
- ```typescript
1634
- import type {
1635
- // Command types
1636
- Command,
1637
- CommandOption,
1638
- CommandContext,
1639
- CommandResult,
1640
-
1641
- // Parser types
1642
- ParseResult,
1643
- ParsedFlags,
1644
- ParserOptions,
1645
-
1646
- // Config types
1647
- V3Config,
1648
- ProviderConfig,
1649
- SwarmConfig,
1650
- MemoryConfig,
1651
-
1652
- // Output types
1653
- TableColumn,
1654
- TableOptions,
1655
- SpinnerOptions,
1656
- ProgressOptions,
1657
-
1658
- // Prompt types
1659
- SelectOption,
1660
- InputOptions,
1661
- ConfirmOptions,
1662
- } from '@claude-flow/cli';
1663
- ```
1664
-
1665
- ## Environment Variables
1666
-
1667
- ```bash
1668
- # Configuration
1669
- CLAUDE_FLOW_CONFIG=./claude-flow.config.json
1670
- CLAUDE_FLOW_LOG_LEVEL=info
1671
-
1672
- # Provider API Keys
1673
- ANTHROPIC_API_KEY=sk-ant-...
1674
- OPENAI_API_KEY=sk-...
1675
- GOOGLE_API_KEY=...
1676
-
1677
- # MCP Server
1678
- CLAUDE_FLOW_MCP_PORT=3000
1679
- CLAUDE_FLOW_MCP_HOST=localhost
1680
- CLAUDE_FLOW_MCP_TRANSPORT=stdio
1681
-
1682
- # Memory
1683
- CLAUDE_FLOW_MEMORY_BACKEND=hybrid
1684
- CLAUDE_FLOW_MEMORY_PATH=./data/memory
1685
- ```
1686
-
1687
- ## Performance Targets
1688
-
1689
- The CLI is optimized for V3 performance targets:
1095
+ ### API Changes
1690
1096
 
1691
- | Metric | Target | Description |
1692
- |--------|--------|-------------|
1693
- | Startup | <500ms | CLI initialization time |
1694
- | Command parsing | <5ms | Argument parsing time |
1695
- | MCP tool execution | <100ms | Tool call overhead |
1696
- | Memory search | 150x-12,500x faster | With HNSW indexing |
1697
- | SONA adaptation | <0.05ms | Neural learning overhead |
1097
+ | V2 API | V3 API |
1098
+ |--------|--------|
1099
+ | `claude-flow start` | `claude-flow mcp start` |
1100
+ | `--pattern-store` | `--memory-backend agentdb` |
1101
+ | `hooks record` | `hooks post-edit --success` |
1102
+ | `swarm create` | `swarm init --topology` |
1698
1103
 
1699
- ## Related Packages
1104
+ ---
1700
1105
 
1701
- - [@claude-flow/shared](../shared) - Shared types and utilities
1702
- - [@claude-flow/swarm](../swarm) - Swarm coordination module
1703
- - [@claude-flow/memory](../memory) - AgentDB memory system
1704
- - [@claude-flow/mcp](../mcp) - MCP server implementation
1705
- - [@claude-flow/hooks](../hooks) - Self-learning hooks system
1706
- - [@claude-flow/neural](../neural) - SONA neural learning
1707
- - [@claude-flow/embeddings](../embeddings) - Vector embeddings (75x faster with agentic-flow)
1708
- - [@claude-flow/security](../security) - CVE remediation & security patterns
1709
- - [@claude-flow/providers](../providers) - Multi-LLM provider system
1106
+ ## Documentation
1107
+
1108
+ ### V3 Module Documentation
1109
+
1110
+ | Module | Description | Docs |
1111
+ |--------|-------------|------|
1112
+ | `@claude-flow/plugins` | Plugin SDK with workers, hooks, providers, security | [README](./v3/@claude-flow/plugins/README.md) |
1113
+ | `@claude-flow/hooks` | Event-driven lifecycle hooks + ReasoningBank | [Source](./v3/@claude-flow/hooks/) |
1114
+ | `@claude-flow/memory` | AgentDB unification with HNSW indexing | [Source](./v3/@claude-flow/memory/) |
1115
+ | `@claude-flow/security` | CVE remediation & security patterns | [Source](./v3/@claude-flow/security/) |
1116
+ | `@claude-flow/swarm` | 15-agent coordination engine | [Source](./v3/@claude-flow/swarm/) |
1117
+ | `@claude-flow/cli` | CLI modernization | [Source](./v3/@claude-flow/cli/) |
1118
+ | `@claude-flow/neural` | SONA learning integration | [Source](./v3/@claude-flow/neural/) |
1119
+ | `@claude-flow/testing` | TDD London School framework | [Source](./v3/@claude-flow/testing/) |
1120
+ | `@claude-flow/mcp` | MCP server & tools | [Source](./v3/@claude-flow/mcp/) |
1121
+ | `@claude-flow/embeddings` | Vector embedding providers | [Source](./v3/@claude-flow/embeddings/) |
1122
+ | `@claude-flow/providers` | LLM provider integrations | [Source](./v3/@claude-flow/providers/) |
1123
+ | `@claude-flow/integration` | agentic-flow@alpha integration | [Source](./v3/@claude-flow/integration/) |
1124
+ | `@claude-flow/performance` | Benchmarking & optimization | [Source](./v3/@claude-flow/performance/) |
1125
+ | `@claude-flow/deployment` | Release & CI/CD | [Source](./v3/@claude-flow/deployment/) |
1126
+ | `@claude-flow/shared` | Shared utilities, types & V3ProgressService | [Source](./v3/@claude-flow/shared/) |
1127
+
1128
+ ### Additional Resources
1129
+
1130
+ - [V2 Documentation](./v2/README.md)
1131
+ - [Architecture Decisions (ADRs)](./v3/docs/adr/)
1132
+ - [API Reference](./v2/docs/technical/)
1133
+ - [Examples](./v2/examples/)
1134
+
1135
+ ## Support
1136
+
1137
+ - Documentation: https://github.com/ruvnet/claude-flow
1138
+ - Issues: https://github.com/ruvnet/claude-flow/issues
1139
+ - Discord: [Agentics Foundation](https://discord.com/invite/dfxmpwkG2D)
1710
1140
 
1711
1141
  ## License
1712
1142
 
1713
- MIT
1143
+ MIT - [RuvNet](https://github.com/ruvnet)