.claude-flow/CAPABILITIES.md
Generated: 2026-02-28T16:04:10.839Z Full documentation: https://github.com/ruvnet/claude-flow
Claude Flow V3 is a domain-driven design architecture for multi-agent AI coordination with:
| Setting | Value |
|---|---|
| Topology | hierarchical-mesh |
| Max Agents | 15 |
| Memory Backend | hybrid |
| HNSW Indexing | Enabled |
| Neural Learning | Enabled |
| LearningBridge | Enabled (SONA + ReasoningBank) |
| Knowledge Graph | Enabled (PageRank + Communities) |
| Agent Scopes | Enabled (project/local/user) |
| Topology | Description | Best For |
|---|---|---|
hierarchical | Queen controls workers directly | Anti-drift, tight control |
mesh | Fully connected peer network | Distributed tasks |
hierarchical-mesh | V3 hybrid (recommended) | 10+ agents |
ring | Circular communication | Sequential workflows |
star | Central coordinator | Simple coordination |
adaptive | Dynamic based on load | Variable workloads |
balanced - Even distribution across agentsspecialized - Clear roles, no overlap (anti-drift)adaptive - Dynamic task routing# Initialize swarm
npx @claude-flow/cli@latest swarm init --topology hierarchical --max-agents 8 --strategy specialized
# Check status
npx @claude-flow/cli@latest swarm status
# Monitor activity
npx @claude-flow/cli@latest swarm monitor
coder, reviewer, tester, planner, researcher
security-architect, security-auditor, memory-specialist, performance-engineer
hierarchical-coordinator, mesh-coordinator, adaptive-coordinator, collective-intelligence-coordinator, swarm-memory-manager
byzantine-coordinator, raft-manager, gossip-coordinator, consensus-builder, crdt-synchronizer, quorum-manager, security-manager
perf-analyzer, performance-benchmarker, task-orchestrator, memory-coordinator, smart-agent
github-modes, pr-manager, code-review-swarm, issue-tracker, release-manager, workflow-automation, project-board-sync, repo-architect, multi-repo-swarm
sparc-coord, sparc-coder, specification, pseudocode, architecture, refinement
backend-dev, mobile-dev, ml-developer, cicd-engineer, api-docs, system-architect, code-analyzer, base-template-generator
tdd-london-swarm, production-validator
| Task Type | Recommended Agents | Topology |
|---|---|---|
| Bug Fix | researcher, coder, tester | mesh |
| New Feature | coordinator, architect, coder, tester, reviewer | hierarchical |
| Refactoring | architect, coder, reviewer | mesh |
| Performance | researcher, perf-engineer, coder | hierarchical |
| Security | security-architect, auditor, reviewer | hierarchical |
| Docs | researcher, api-docs | mesh |
| Command | Subcommands | Description |
|---|---|---|
init | 4 | Project initialization |
agent | 8 | Agent lifecycle management |
swarm | 6 | Multi-agent coordination |
memory | 11 | AgentDB with HNSW search |
mcp | 9 | MCP server management |
task | 6 | Task assignment |
session | 7 | Session persistence |
config | 7 | Configuration |
status | 3 | System monitoring |
workflow | 6 | Workflow templates |
hooks | 17 | Self-learning hooks |
hive-mind | 6 | Consensus coordination |
| Command | Subcommands | Description |
|---|---|---|
daemon | 5 | Background workers |
neural | 5 | Pattern training |
security | 6 | Security scanning |
performance | 5 | Profiling & benchmarks |
providers | 5 | AI provider config |
plugins | 5 | Plugin management |
deployment | 5 | Deploy management |
embeddings | 4 | Vector embeddings |
claims | 4 | Authorization |
migrate | 5 | V2āV3 migration |
process | 4 | Process management |
doctor | 1 | Health diagnostics |
completions | 4 | Shell completions |
# Initialize
npx @claude-flow/cli@latest init --wizard
# Spawn agent
npx @claude-flow/cli@latest agent spawn -t coder --name my-coder
# Memory operations
npx @claude-flow/cli@latest memory store --key "pattern" --value "data" --namespace patterns
npx @claude-flow/cli@latest memory search --query "authentication"
# Diagnostics
npx @claude-flow/cli@latest doctor --fix
| Hook | Description |
|---|---|
pre-edit | Context before file edits |
post-edit | Record edit outcomes |
pre-command | Risk assessment |
post-command | Command metrics |
pre-task | Task start + agent suggestions |
post-task | Task completion learning |
| Hook | Description |
|---|---|
session-start | Start/restore session |
session-end | Persist state |
session-restore | Restore previous |
notify | Cross-agent notifications |
| Hook | Description |
|---|---|
route | Optimal agent routing |
explain | Routing decisions |
pretrain | Bootstrap intelligence |
build-agents | Generate configs |
transfer | Pattern transfer |
| Hook | Description |
|---|---|
coverage-route | Coverage-based routing |
coverage-suggest | Improvement suggestions |
coverage-gaps | Gap analysis |
| Worker | Priority | Purpose |
|---|---|---|
ultralearn | normal | Deep knowledge |
optimize | high | Performance |
consolidate | low | Memory consolidation |
predict | normal | Predictive preload |
audit | critical | Security |
map | normal | Codebase mapping |
preload | low | Resource preload |
deepdive | normal | Deep analysis |
document | normal | Auto-docs |
refactor | normal | Suggestions |
benchmark | normal | Benchmarking |
testgaps | normal | Coverage gaps |
| Component | Status | Description |
|---|---|---|
| LearningBridge | ā Enabled | Connects insights to SONA/ReasoningBank neural pipeline |
| MemoryGraph | ā Enabled | PageRank knowledge graph + community detection |
| AgentMemoryScope | ā Enabled | 3-scope agent memory (project/local/user) |
LearningBridge - Insights trigger learning trajectories. Confidence evolves: +0.03 on access, -0.005/hour decay. Consolidation runs the JUDGE/DISTILL/CONSOLIDATE pipeline.
MemoryGraph - Builds a knowledge graph from entry references. PageRank identifies influential insights. Communities group related knowledge. Graph-aware ranking blends vector + structural scores.
AgentMemoryScope - Maps Claude Code 3-scope directories:
project: <gitRoot>/.claude/agent-memory/<agent>/local: <gitRoot>/.claude/agent-memory-local/<agent>/user: ~/.claude/agent-memory/<agent>/High-confidence insights (>0.8) can transfer between agents.
# Store pattern
npx @claude-flow/cli@latest memory store --key "name" --value "data" --namespace patterns
# Semantic search
npx @claude-flow/cli@latest memory search --query "authentication"
# List entries
npx @claude-flow/cli@latest memory list --namespace patterns
# Initialize database
npx @claude-flow/cli@latest memory init --force
| Type | Role |
|---|---|
| Strategic Queen | Long-term planning |
| Tactical Queen | Execution coordination |
| Adaptive Queen | Dynamic optimization |
researcher, coder, analyst, tester, architect, reviewer, optimizer, documenter
| Mechanism | Fault Tolerance | Use Case |
|---|---|---|
byzantine | f < n/3 faulty | Adversarial |
raft | f < n/2 failed | Leader-based |
gossip | Eventually consistent | Large scale |
crdt | Conflict-free | Distributed |
quorum | Configurable | Flexible |
# Initialize
npx @claude-flow/cli@latest hive-mind init --queen-type strategic
# Status
npx @claude-flow/cli@latest hive-mind status
# Spawn workers
npx @claude-flow/cli@latest hive-mind spawn --count 5 --type worker
# Consensus
npx @claude-flow/cli@latest hive-mind consensus --propose "task"
| Metric | Target | Status |
|---|---|---|
| HNSW Search | 150x-12,500x faster | ā Implemented |
| Memory Reduction | 50-75% | ā Implemented (3.92x) |
| SONA Integration | Pattern learning | ā Implemented |
| Flash Attention | 2.49x-7.47x | š In Progress |
| MCP Response | <100ms | ā Achieved |
| CLI Startup | <500ms | ā Achieved |
| SONA Adaptation | <0.05ms | š In Progress |
| Graph Build (1k) | <200ms | ā 2.78ms (71.9x headroom) |
| PageRank (1k) | <100ms | ā 12.21ms (8.2x headroom) |
| Insight Recording | <5ms/each | ā 0.12ms (41x headroom) |
| Consolidation | <500ms | ā 0.26ms (1,955x headroom) |
| Knowledge Transfer | <100ms | ā 1.25ms (80x headroom) |
| Package | Version | Purpose |
|---|---|---|
| agentic-flow | 3.0.0-alpha.1 | Core coordination + ReasoningBank + Router |
| agentdb | 3.0.0-alpha.10 | Vector database + 8 controllers |
| @ruvector/attention | 0.1.3 | Flash attention |
| @ruvector/sona | 0.1.5 | Neural learning |
| Package | Command |
|---|---|
| ruv-swarm | npx ruv-swarm mcp start |
| flow-nexus | npx flow-nexus@latest mcp start |
| agentic-jujutsu | npx agentic-jujutsu@latest |
# Add Claude Flow MCP
claude mcp add claude-flow -- npx -y @claude-flow/cli@latest
# Optional servers
claude mcp add ruv-swarm -- npx -y ruv-swarm mcp start
claude mcp add flow-nexus -- npx -y flow-nexus@latest mcp start
# Setup
npx @claude-flow/cli@latest init --wizard
npx @claude-flow/cli@latest daemon start
npx @claude-flow/cli@latest doctor --fix
# Swarm
npx @claude-flow/cli@latest swarm init --topology hierarchical --max-agents 8
npx @claude-flow/cli@latest swarm status
# Agents
npx @claude-flow/cli@latest agent spawn -t coder
npx @claude-flow/cli@latest agent list
# Memory
npx @claude-flow/cli@latest memory search --query "patterns"
# Hooks
npx @claude-flow/cli@latest hooks pre-task --description "task"
npx @claude-flow/cli@latest hooks worker dispatch --trigger optimize
.claude-flow/
āāā config.yaml # Runtime configuration
āāā CAPABILITIES.md # This file
āāā data/ # Memory storage
āāā logs/ # Operation logs
āāā sessions/ # Session state
āāā hooks/ # Custom hooks
āāā agents/ # Agent configs
āāā workflows/ # Workflow templates
Full Documentation: https://github.com/ruvnet/claude-flow Issues: https://github.com/ruvnet/claude-flow/issues