

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1# Claude Code Configuration - Claude Flow V323## 🚨 AUTOMATIC SWARM ORCHESTRATION45**When starting work on complex tasks, Claude Code MUST automatically:**671. **Initialize the swarm** using CLI tools via Bash82. **Spawn concurrent agents** using Claude Code's Task tool93. **Coordinate via hooks** and memory1011### 🚨 CRITICAL: CLI + Task Tool in SAME Message1213**When user says "spawn swarm" or requests complex work, Claude Code MUST in ONE message:**141. Call CLI tools via Bash to initialize coordination152. **IMMEDIATELY** call Task tool to spawn REAL working agents163. Both CLI and Task calls must be in the SAME response1718**CLI coordinates, Task tool agents do the actual work!**1920### 🤖 INTELLIGENT 3-TIER MODEL ROUTING (ADR-026, ADR-143)2122**The routing system has 3 tiers for optimal cost/performance:**2324| Tier | Handler | Latency | Cost | Use Cases |25|------|---------|---------|------|-----------|26| **1** | Deterministic codemod | ~1ms | $0 | Structural transforms, **no LLM**: var→const, remove-console, add-logging |27| **2** | Haiku | ~500ms | $0.0002 | Simple tasks, bug fixes, low complexity |28| **3** | Sonnet/Opus | 2-5s | $0.003-$0.015 | Architecture, security, complex reasoning |2930**Before spawning agents, get routing recommendation:**31```bash32npx @claude-flow/cli@latest hooks pre-task --description "[task description]"33```3435**When you see these recommendations:**36371. `[CODEMOD_AVAILABLE]` → call the `hooks_codemod` MCP tool (intent + file). It applies the transform deterministically via the TypeScript compiler at $0, no LLM.38 - Deterministic intents (Tier 1): `var-to-const`, `remove-console`, `add-logging`39 - `add-types`, `add-error-handling`, `async-await` need judgement → they route to a model (Tier 2/3), NOT a $0 codemod40412. `[TASK_MODEL_RECOMMENDATION] Use model="X"` → Use that model in Task tool:42```javascript43Task({44 prompt: "...",45 subagent_type: "coder",46 model: "haiku" // ← USE THE RECOMMENDED MODEL (haiku/sonnet/opus)47})48```4950**Benefits:** Tier-1 codemods are $0 and ~1ms (no model call); routing keeps simple edits off Sonnet/Opus.5152---5354### 🛡️ Anti-Drift Config (PREFERRED)5556**Use this to prevent agent drift:**57```bash58# Small teams (6-8 agents) - use hierarchical for tight control59npx @claude-flow/cli@latest swarm init --topology hierarchical --max-agents 8 --strategy specialized6061# Large teams (10-15 agents) - use hierarchical-mesh for V3 queen + peer communication62npx @claude-flow/cli@latest swarm init --topology hierarchical-mesh --max-agents 15 --strategy specialized63```6465**Valid Topologies:**66- `hierarchical` - Queen controls workers directly (anti-drift for small teams)67- `hierarchical-mesh` - V3 queen + peer communication (recommended for 10+ agents)68- `mesh` - Fully connected peer network69- `ring` - Circular communication pattern70- `star` - Central coordinator with spokes71- `hybrid` - Dynamic topology switching7273**Anti-Drift Guidelines:**74- **hierarchical**: Coordinator catches divergence75- **max-agents 6-8**: Smaller team = less drift76- **specialized**: Clear roles, no overlap77- **consensus**: raft (leader maintains state)7879---8081### 🔄 Auto-Start Swarm Protocol (Background Execution)8283When the user requests a complex task, **spawn agents in background and WAIT for completion:**8485```javascript86// STEP 1: Initialize swarm coordination (anti-drift config)87Bash("npx @claude-flow/cli@latest swarm init --topology hierarchical --max-agents 8 --strategy specialized")8889// STEP 2: Spawn ALL agents IN BACKGROUND in a SINGLE message90// Use run_in_background: true so agents work concurrently91Task({92 prompt: "Research requirements, analyze codebase patterns, store findings in memory",93 subagent_type: "researcher",94 description: "Research phase",95 run_in_background: true // ← CRITICAL: Run in background96})97Task({98 prompt: "Design architecture based on research. Document decisions.",99 subagent_type: "system-architect",100 description: "Architecture phase",101 run_in_background: true102})103Task({104 prompt: "Implement the solution following the design. Write clean code.",105 subagent_type: "coder",106 description: "Implementation phase",107 run_in_background: true108})109Task({110 prompt: "Write comprehensive tests for the implementation.",111 subagent_type: "tester",112 description: "Testing phase",113 run_in_background: true114})115Task({116 prompt: "Review code quality, security, and best practices.",117 subagent_type: "reviewer",118 description: "Review phase",119 run_in_background: true120})121122// STEP 3: WAIT - Tell user agents are working, then STOP123// Say: "I've spawned 5 agents to work on this in parallel. They'll report back when done."124// DO NOT check status repeatedly. Just wait for user or agent responses.125```126127### ⏸️ CRITICAL: Spawn and Wait Pattern128129**After spawning background agents:**1301311. **TELL USER** - "I've spawned X agents working in parallel on: [list tasks]"1322. **STOP** - Do not continue with more tool calls1333. **WAIT** - Let the background agents complete their work1344. **RESPOND** - When agents return results, review and synthesize135136**Example response after spawning:**137```138I've launched 5 concurrent agents to work on this:139- 🔍 Researcher: Analyzing requirements and codebase140- 🏗️ Architect: Designing the implementation approach141- 💻 Coder: Implementing the solution142- 🧪 Tester: Writing tests143- 👀 Reviewer: Code review and security check144145They're working in parallel. I'll synthesize their results when they complete.146```147148### 🚫 DO NOT:149- Continuously check swarm status150- Poll TaskOutput repeatedly151- Add more tool calls after spawning152- Ask "should I check on the agents?"153154### ✅ DO:155- Spawn all agents in ONE message156- Tell user what's happening157- Wait for agent results to arrive158- Synthesize results when they return159160## 🧠 AUTO-LEARNING PROTOCOL161162### Before Starting Any Task163```bash164# 1. Search memory for relevant patterns from past successes165Bash("npx @claude-flow/cli@latest memory search --query '[task keywords]' --namespace patterns")166167# 2. Check if similar task was done before168Bash("npx @claude-flow/cli@latest memory search --query '[task type]' --namespace tasks")169170# 3. Load learned optimizations171Bash("npx @claude-flow/cli@latest hooks route --task '[task description]'")172```173174### After Completing Any Task Successfully175```bash176# 1. Store successful pattern for future reference177Bash("npx @claude-flow/cli@latest memory store --namespace patterns --key '[pattern-name]' --value '[what worked]'")178179# 2. Train neural patterns on the successful approach180Bash("npx @claude-flow/cli@latest hooks post-edit --file '[main-file]' --train-neural true")181182# 3. Record task completion with metrics183Bash("npx @claude-flow/cli@latest hooks post-task --task-id '[id]' --success true --store-results true")184185# 4. Trigger optimization worker if performance-related186Bash("npx @claude-flow/cli@latest hooks worker dispatch --trigger optimize")187```188189### Continuous Improvement Triggers190191| Trigger | Worker | When to Use |192|---------|--------|-------------|193| After major refactor | `optimize` | Performance optimization |194| After adding features | `testgaps` | Find missing test coverage |195| After security changes | `audit` | Security analysis |196| After API changes | `document` | Update documentation |197| Every 5+ file changes | `map` | Update codebase map |198| Complex debugging | `deepdive` | Deep code analysis |199200### Memory-Enhanced Development201202**ALWAYS check memory before:**203- Starting a new feature (search for similar implementations)204- Debugging an issue (search for past solutions)205- Refactoring code (search for learned patterns)206- Performance work (search for optimization strategies)207208**ALWAYS store in memory after:**209- Solving a tricky bug (store the solution pattern)210- Completing a feature (store the approach)211- Finding a performance fix (store the optimization)212- Discovering a security issue (store the vulnerability pattern)213214### 📋 Agent Routing (Anti-Drift)215216| Code | Task | Agents |217|------|------|--------|218| 1 | Bug Fix | coordinator, researcher, coder, tester |219| 3 | Feature | coordinator, architect, coder, tester, reviewer |220| 5 | Refactor | coordinator, architect, coder, reviewer |221| 7 | Performance | coordinator, perf-engineer, coder |222| 9 | Security | coordinator, security-architect, auditor |223| 11 | Docs | researcher, api-docs |224225**Codes 1-9: hierarchical/specialized (anti-drift). Code 11: mesh/balanced**226227### 🎯 Task Complexity Detection228229**AUTO-INVOKE SWARM when task involves:**230- Multiple files (3+)231- New feature implementation232- Refactoring across modules233- API changes with tests234- Security-related changes235- Performance optimization236- Database schema changes237238**SKIP SWARM for:**239- Single file edits240- Simple bug fixes (1-2 lines)241- Documentation updates242- Configuration changes243- Quick questions/exploration244245## 🚨 CRITICAL: CONCURRENT EXECUTION & FILE MANAGEMENT246247**ABSOLUTE RULES**:2481. ALL operations MUST be concurrent/parallel in a single message2492. **NEVER save working files, text/mds and tests to the root folder**2503. ALWAYS organize files in appropriate subdirectories2514. **USE CLAUDE CODE'S TASK TOOL** for spawning agents concurrently, not just MCP252253### ⚡ GOLDEN RULE: "1 MESSAGE = ALL RELATED OPERATIONS"254255**MANDATORY PATTERNS:**256- **TodoWrite**: ALWAYS batch ALL todos in ONE call (5-10+ todos minimum)257- **Task tool (Claude Code)**: ALWAYS spawn ALL agents in ONE message with full instructions258- **File operations**: ALWAYS batch ALL reads/writes/edits in ONE message259- **Bash commands**: ALWAYS batch ALL terminal operations in ONE message260- **Memory operations**: ALWAYS batch ALL memory store/retrieve in ONE message261262### 📁 File Organization Rules263264**NEVER save to root folder. Use these directories:**265- `/src` - Source code files266- `/tests` - Test files267- `/docs` - Documentation and markdown files268- `/config` - Configuration files269- `/scripts` - Utility scripts270- `/examples` - Example code271272## Project Config (Anti-Drift Defaults)273274- **Topology**: hierarchical (prevents drift)275- **Max Agents**: 8 (smaller = less drift)276- **Strategy**: specialized (clear roles)277- **Consensus**: raft278- **Memory**: hybrid279- **HNSW**: Enabled280- **Neural**: Enabled281282## 🚀 V3 CLI Commands (26 Commands, 140+ Subcommands)283284### Core Commands285286| Command | Subcommands | Description |287|---------|-------------|-------------|288| `init` | 4 | Project initialization with wizard, presets, skills, hooks |289| `agent` | 8 | Agent lifecycle (spawn, list, status, stop, metrics, pool, health, logs) |290| `swarm` | 6 | Multi-agent swarm coordination and orchestration |291| `memory` | 11 | AgentDB memory with HNSW vector search (measured ~1.9x–4.7x vs brute force above crossover) |292| `mcp` | 9 | MCP server management and tool execution |293| `task` | 6 | Task creation, assignment, and lifecycle |294| `session` | 7 | Session state management and persistence |295| `config` | 7 | Configuration management and provider setup |296| `status` | 3 | System status monitoring with watch mode |297| `workflow` | 6 | Workflow execution and template management |298| `hooks` | 17 | Self-learning hooks + 12 background workers |299| `hive-mind` | 6 | Queen-led Byzantine fault-tolerant consensus |300301### Advanced Commands302303| Command | Subcommands | Description |304|---------|-------------|-------------|305| `daemon` | 5 | Background worker daemon (start, stop, status, trigger, enable) |306| `neural` | 5 | Neural pattern training (train, status, patterns, predict, optimize) |307| `security` | 6 | Security scanning (scan, audit, cve, threats, validate, report) |308| `performance` | 5 | Performance profiling (benchmark, profile, metrics, optimize, report) |309| `providers` | 5 | AI providers (list, add, remove, test, configure) |310| `plugins` | 5 | Plugin management (list, install, uninstall, enable, disable) |311| `deployment` | 5 | Deployment management (deploy, rollback, status, environments, release) |312| `embeddings` | 4 | Vector embeddings (embed, batch, search, init) — agentic-flow ONNX backend (speedup unverified, no benchmark) |313| `claims` | 4 | Claims-based authorization (check, grant, revoke, list) |314| `migrate` | 5 | V2 to V3 migration with rollback support |315| `doctor` | 1 | System diagnostics with health checks |316| `completions` | 4 | Shell completions (bash, zsh, fish, powershell) |317318### Quick CLI Examples319320```bash321# Initialize project322npx @claude-flow/cli@latest init --wizard323324# Start daemon with background workers325npx @claude-flow/cli@latest daemon start326327# Spawn an agent328npx @claude-flow/cli@latest agent spawn -t coder --name my-coder329330# Initialize swarm331npx @claude-flow/cli@latest swarm init --v3-mode332333# Search memory (HNSW-indexed)334npx @claude-flow/cli@latest memory search --query "authentication patterns"335336# System diagnostics337npx @claude-flow/cli@latest doctor --fix338339# Security scan340npx @claude-flow/cli@latest security scan --depth full341342# Performance benchmark343npx @claude-flow/cli@latest performance benchmark --suite all344```345346## 🚀 Available Agents (60+ Types)347348### Core Development349`coder`, `reviewer`, `tester`, `planner`, `researcher`350351### V3 Specialized Agents352`security-architect`, `security-auditor`, `memory-specialist`, `performance-engineer`353354### 🔐 @claude-flow/security355CVE remediation, input validation, path security:356- `InputValidator` - Zod validation357- `PathValidator` - Traversal prevention358- `SafeExecutor` - Injection protection359360### Swarm Coordination361`hierarchical-coordinator`, `mesh-coordinator`, `adaptive-coordinator`, `collective-intelligence-coordinator`, `swarm-memory-manager`362363### Consensus & Distributed364`byzantine-coordinator`, `raft-manager`, `gossip-coordinator`, `consensus-builder`, `crdt-synchronizer`, `quorum-manager`, `security-manager`365366### Performance & Optimization367`perf-analyzer`, `performance-benchmarker`, `task-orchestrator`, `memory-coordinator`, `smart-agent`368369### GitHub & Repository370`github-modes`, `pr-manager`, `code-review-swarm`, `issue-tracker`, `release-manager`, `workflow-automation`, `project-board-sync`, `repo-architect`, `multi-repo-swarm`371372### SPARC Methodology373`sparc-coord`, `sparc-coder`, `specification`, `pseudocode`, `architecture`, `refinement`374375### Specialized Development376`backend-dev`, `mobile-dev`, `ml-developer`, `cicd-engineer`, `api-docs`, `system-architect`, `code-analyzer`, `base-template-generator`377378### Testing & Validation379`tdd-london-swarm`, `production-validator`380381## 🪝 V3 Hooks System (27 Hooks + 12 Workers)382383### All Available Hooks384385| Hook | Description | Key Options |386|------|-------------|-------------|387| `pre-edit` | Get context before editing files | `--file`, `--operation` |388| `post-edit` | Record editing outcome for learning | `--file`, `--success`, `--train-neural` |389| `pre-command` | Assess risk before commands | `--command`, `--validate-safety` |390| `post-command` | Record command execution outcome | `--command`, `--track-metrics` |391| `pre-task` | Record task start, get agent suggestions | `--description`, `--coordinate-swarm` |392| `post-task` | Record task completion for learning | `--task-id`, `--success`, `--store-results` |393| `session-start` | Start/restore session (v2 compat) | `--session-id`, `--auto-configure` |394| `session-end` | End session and persist state | `--generate-summary`, `--export-metrics` |395| `session-restore` | Restore a previous session | `--session-id`, `--latest` |396| `route` | Route task to optimal agent | `--task`, `--context`, `--top-k` |397| `route-task` | (v2 compat) Alias for route | `--task`, `--auto-swarm` |398| `explain` | Explain routing decision | `--topic`, `--detailed` |399| `pretrain` | Bootstrap intelligence from repo | `--model-type`, `--epochs` |400| `build-agents` | Generate optimized agent configs | `--agent-types`, `--focus` |401| `metrics` | View learning metrics dashboard | `--v3-dashboard`, `--format` |402| `transfer` | Transfer patterns via IPFS registry | `store`, `from-project` |403| `list` | List all registered hooks | `--format` |404| `intelligence` | RuVector intelligence system | `trajectory-*`, `pattern-*`, `stats` |405| `worker` | Background worker management | `list`, `dispatch`, `status`, `detect` |406| `progress` | Check V3 implementation progress | `--detailed`, `--format` |407| `statusline` | Generate dynamic statusline | `--json`, `--compact`, `--no-color` |408| `coverage-route` | Route based on test coverage gaps | `--task`, `--path` |409| `coverage-suggest` | Suggest coverage improvements | `--path` |410| `coverage-gaps` | List coverage gaps with priorities | `--format`, `--limit` |411| `pre-bash` | (v2 compat) Alias for pre-command | Same as pre-command |412| `post-bash` | (v2 compat) Alias for post-command | Same as post-command |413414### 12 Background Workers415416| Worker | Priority | Description |417|--------|----------|-------------|418| `ultralearn` | normal | Deep knowledge acquisition |419| `optimize` | high | Performance optimization |420| `consolidate` | low | Memory consolidation |421| `predict` | normal | Predictive preloading |422| `audit` | critical | Security analysis |423| `map` | normal | Codebase mapping |424| `preload` | low | Resource preloading |425| `deepdive` | normal | Deep code analysis |426| `document` | normal | Auto-documentation |427| `refactor` | normal | Refactoring suggestions |428| `benchmark` | normal | Performance benchmarking |429| `testgaps` | normal | Test coverage analysis |430431### Essential Hook Commands432433```bash434# Core hooks435npx @claude-flow/cli@latest hooks pre-task --description "[task]"436npx @claude-flow/cli@latest hooks post-task --task-id "[id]" --success true437npx @claude-flow/cli@latest hooks post-edit --file "[file]" --train-neural true438439# Session management440npx @claude-flow/cli@latest hooks session-start --session-id "[id]"441npx @claude-flow/cli@latest hooks session-end --export-metrics true442npx @claude-flow/cli@latest hooks session-restore --session-id "[id]"443444# Intelligence routing445npx @claude-flow/cli@latest hooks route --task "[task]"446npx @claude-flow/cli@latest hooks explain --topic "[topic]"447448# Neural learning449npx @claude-flow/cli@latest hooks pretrain --model-type moe --epochs 10450npx @claude-flow/cli@latest hooks build-agents --agent-types coder,tester451452# Background workers453npx @claude-flow/cli@latest hooks worker list454npx @claude-flow/cli@latest hooks worker dispatch --trigger audit455npx @claude-flow/cli@latest hooks worker status456457# Coverage-aware routing458npx @claude-flow/cli@latest hooks coverage-gaps --format table459npx @claude-flow/cli@latest hooks coverage-route --task "[task]"460461# Statusline (for Claude Code integration)462npx @claude-flow/cli@latest hooks statusline463npx @claude-flow/cli@latest hooks statusline --json464```465466## 🔄 Migration (V2 to V3)467468```bash469# Check migration status470npx @claude-flow/cli@latest migrate status471472# Run migration with backup473npx @claude-flow/cli@latest migrate run --backup474475# Rollback if needed476npx @claude-flow/cli@latest migrate rollback477478# Validate migration479npx @claude-flow/cli@latest migrate validate480```481482## 🧠 Intelligence System (RuVector)483484V3 includes the RuVector Intelligence System (measured numbers: see [audit](../../../docs/reviews/intelligence-system-audit-2026-05-29.md) + [`scripts/benchmark-intelligence.mjs`](../../../scripts/benchmark-intelligence.mjs)):485- **SONA**: Self-Optimizing Neural Architecture (measured 0.0043ms/adapt, target <0.05ms met)486- **MoE**: Mixture of Experts for specialized routing (gate converges — confidence 0.13→0.88 after rewards)487- **HNSW**: measured ~1.9x at N=20k, ~3.2x–4.7x at N=5k vs brute force (recall@10 ~0.99); ANN wins above the crossover, ruvector NAPI backend (WASM not active on test host)488- **EWC++**: Elastic Weight Consolidation (prevents forgetting)489- **Flash Attention**: integration available; speedup dropped from docs pending an in-tree benchmark (was: 2.49x–7.47x, inherited unverified from upstream — removed to avoid a credibility claim we can't reproduce)490491The 4-step intelligence pipeline:4921. **RETRIEVE** - Fetch relevant patterns via HNSW4932. **JUDGE** - Evaluate with verdicts (success/failure)4943. **DISTILL** - Extract key learnings via LoRA4954. **CONSOLIDATE** - Prevent catastrophic forgetting via EWC++496497## 📦 Embeddings Package (v3.0.0-alpha.12)498499Features:500- **sql.js**: Cross-platform SQLite persistent cache (WASM, no native compilation)501- **Document chunking**: Configurable overlap and size502- **Normalization**: L2, L1, min-max, z-score503- **Hyperbolic embeddings**: Poincaré ball model for hierarchical data504- **agentic-flow ONNX integration**: speedup unverified (no benchmark; backend reported `onnx`, model all-MiniLM-L6-v2, 384-dim)505- **Neural substrate**: Integration with RuVector506507## 🐝 Hive-Mind Consensus508509### Topologies510- `hierarchical` - Queen controls workers directly511- `mesh` - Fully connected peer network512- `hierarchical-mesh` - Hybrid (recommended)513- `adaptive` - Dynamic based on load514515### Consensus Strategies516- `byzantine` - BFT (tolerates f < n/3 faulty)517- `raft` - Leader-based (tolerates f < n/2)518- `gossip` - Epidemic for eventual consistency519- `crdt` - Conflict-free replicated data types520- `quorum` - Configurable quorum-based521522## V3 Performance Targets523524> Source of truth: [`docs/reviews/intelligence-system-audit-2026-05-29.md`](../../../docs/reviews/intelligence-system-audit-2026-05-29.md) + [`scripts/benchmark-intelligence.mjs`](../../../scripts/benchmark-intelligence.mjs). Numbers below are measured unless marked "target/unverified".525526| Metric | Measured / Target | Status |527|--------|-------------------|--------|528| HNSW Search | ~1.9x at N=20k, ~3.2x–4.7x at N=5k vs brute force (recall@10 ~0.99) | **Measured** (ruvector NAPI; 150x-12,500x NOT reproduced) |529| Int8 Quantization | 3.84x compression, reconstruction cosine 0.99999 | **Measured** |530| RaBitQ Quantization | 32x compression, 0.60ms/query | **Measured** |531| SONA Adaptation | 0.0043ms/adapt (target <0.05ms met) | **Measured** |532| MoE Gate | converges (confidence 0.13→0.88) | **Measured** |533| Flash Attention | integration available; measured speedup pending benchmark | **Not measured** — prior "2.49x–7.47x" figure was inherited from upstream marketing, never reproduced in-tree; dropped to avoid a credibility claim we can't verify |534| MCP Response | <100ms | target |535| CLI Startup | <500ms | target |536537## 📊 Performance Optimization Protocol538539### Automatic Performance Tracking540```bash541# After any significant operation, track metrics542Bash("npx @claude-flow/cli@latest hooks post-command --command '[operation]' --track-metrics true")543544# Periodically run benchmarks (every major feature)545Bash("npx @claude-flow/cli@latest performance benchmark --suite all")546547# Analyze bottlenecks when performance degrades548Bash("npx @claude-flow/cli@latest performance profile --target '[component]'")549```550551### Session Persistence (Cross-Conversation Learning)552```bash553# At session start - restore previous context554Bash("npx @claude-flow/cli@latest session restore --latest")555556# At session end - persist learned patterns557Bash("npx @claude-flow/cli@latest hooks session-end --generate-summary true --persist-state true --export-metrics true")558```559560### Neural Pattern Training561```bash562# Train on successful code patterns563Bash("npx @claude-flow/cli@latest neural train --pattern-type coordination --epochs 10")564565# Predict optimal approach for new tasks566Bash("npx @claude-flow/cli@latest neural predict --input '[task description]'")567568# View learned patterns569Bash("npx @claude-flow/cli@latest neural patterns --list")570```571572## 🔧 Environment Variables573574```bash575# Configuration576CLAUDE_FLOW_CONFIG=./claude-flow.config.json577CLAUDE_FLOW_LOG_LEVEL=info578579# Provider API Keys580ANTHROPIC_API_KEY=sk-ant-...581OPENAI_API_KEY=sk-...582GOOGLE_API_KEY=...583584# MCP Server585CLAUDE_FLOW_MCP_PORT=3000586CLAUDE_FLOW_MCP_HOST=localhost587CLAUDE_FLOW_MCP_TRANSPORT=stdio588589# Memory590CLAUDE_FLOW_MEMORY_BACKEND=hybrid591CLAUDE_FLOW_MEMORY_PATH=./data/memory592```593594## 🔍 Doctor Health Checks595596Run `npx @claude-flow/cli@latest doctor` to check:597- Node.js version (20+)598- npm version (9+)599- Git installation600- Config file validity601- Daemon status602- Memory database603- API keys604- MCP servers605- Disk space606- TypeScript installation607608## 🚀 Quick Setup609610```bash611# Add MCP servers (auto-detects MCP mode when stdin is piped)612claude mcp add claude-flow -- npx -y ruflo@latest mcp start613claude mcp add ruv-swarm -- npx -y ruv-swarm mcp start # Optional614claude mcp add flow-nexus -- npx -y flow-nexus@latest mcp start # Optional615616# Start daemon617npx @claude-flow/cli@latest daemon start618619# Run doctor620npx @claude-flow/cli@latest doctor --fix621```622623## 🎯 Claude Code vs CLI Tools624625### Claude Code Handles ALL EXECUTION:626- **Task tool**: Spawn and run agents concurrently627- File operations (Read, Write, Edit, MultiEdit, Glob, Grep)628- Code generation and programming629- Bash commands and system operations630- TodoWrite and task management631- Git operations632633### CLI Tools Handle Coordination (via Bash):634- **Swarm init**: `npx @claude-flow/cli@latest swarm init --topology <type>`635- **Swarm status**: `npx @claude-flow/cli@latest swarm status`636- **Agent spawn**: `npx @claude-flow/cli@latest agent spawn -t <type> --name <name>`637- **Memory store**: `npx @claude-flow/cli@latest memory store --key "mykey" --value "myvalue" --namespace patterns`638- **Memory search**: `npx @claude-flow/cli@latest memory search --query "search terms"`639- **Memory list**: `npx @claude-flow/cli@latest memory list --namespace patterns`640- **Memory retrieve**: `npx @claude-flow/cli@latest memory retrieve --key "mykey" --namespace patterns`641- **Hooks**: `npx @claude-flow/cli@latest hooks <hook-name> [options]`642643## 📝 Memory Commands Reference (IMPORTANT)644645### Store Data (ALL options shown)646```bash647# REQUIRED: --key and --value648# OPTIONAL: --namespace (default: "default"), --ttl, --tags649npx @claude-flow/cli@latest memory store --key "pattern-auth" --value "JWT with refresh tokens" --namespace patterns650npx @claude-flow/cli@latest memory store --key "bug-fix-123" --value "Fixed null check" --namespace solutions --tags "bugfix,auth"651```652653### Search Data (semantic vector search)654```bash655# REQUIRED: --query (full flag, not -q)656# OPTIONAL: --namespace, --limit, --threshold657npx @claude-flow/cli@latest memory search --query "authentication patterns"658npx @claude-flow/cli@latest memory search --query "error handling" --namespace patterns --limit 5659```660661### List Entries662```bash663# OPTIONAL: --namespace, --limit664npx @claude-flow/cli@latest memory list665npx @claude-flow/cli@latest memory list --namespace patterns --limit 10666```667668### Retrieve Specific Entry669```bash670# REQUIRED: --key671# OPTIONAL: --namespace (default: "default")672npx @claude-flow/cli@latest memory retrieve --key "pattern-auth"673npx @claude-flow/cli@latest memory retrieve --key "pattern-auth" --namespace patterns674```675676### Initialize Memory Database677```bash678npx @claude-flow/cli@latest memory init --force --verbose679```680681**KEY**: CLI coordinates the strategy via Bash, Claude Code's Task tool executes with real agents.682683## 📚 Full Capabilities Reference684685For a comprehensive overview of all Claude Flow V3 features, agents, commands, and integrations, see:686687**`.claude-flow/CAPABILITIES.md`** - Complete reference generated during init688689This includes:690- All 60+ agent types with routing recommendations691- All 26 CLI commands with 140+ subcommands692- All 27 hooks + 12 background workers693- RuVector intelligence system details694- Hive-Mind consensus mechanisms695- Integration ecosystem (agentic-flow, agentdb, ruv-swarm, flow-nexus, agentic-jujutsu)696- Performance targets and status697698## Support699700- Documentation: https://github.com/ruvnet/claude-flow701- Issues: https://github.com/ruvnet/claude-flow/issues702703---704705Remember: **Claude Flow CLI coordinates, Claude Code Task tool creates!**706707# important-instruction-reminders708Do what has been asked; nothing more, nothing less.709NEVER create files unless they're absolutely necessary for achieving your goal.710ALWAYS prefer editing an existing file to creating a new one.711NEVER proactively create documentation files (*.md) or README files. Only create documentation files if explicitly requested by the User.712Never save working files, text/mds and tests to the root folder.713714## 🚨 SWARM EXECUTION RULES (CRITICAL)7151. **SPAWN IN BACKGROUND**: Use `run_in_background: true` for all agent Task calls7162. **SPAWN ALL AT ONCE**: Put ALL agent Task calls in ONE message for parallel execution7173. **TELL USER**: After spawning, list what each agent is doing (use emojis for clarity)7184. **STOP AND WAIT**: After spawning, STOP - do NOT add more tool calls or check status7195. **NO POLLING**: Never poll TaskOutput or check swarm status - trust agents to return7206. **SYNTHESIZE**: When agent results arrive, review ALL results before proceeding7217. **NO CONFIRMATION**: Don't ask "should I check?" - just wait for results722723Example spawn message:724```725"I've launched 4 agents in background:726- 🔍 Researcher: [task]727- 💻 Coder: [task]728- 🧪 Tester: [task]729- 👀 Reviewer: [task]730Working in parallel - I'll synthesize when they complete."731```732
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| ruvnet/rufloAGENTS.md · 68k | AGENTS.md | buildteststyletypes+5 | 81/100 | 14 days ago | |
| ruvnet/rufloCLAUDE.md · 68k | CLAUDE.md | setupbuildlint-formatstyle+8 | 84/100 | 14 days ago | |
| ruvnet/rufloruflo/src/ruvocal/CLAUDE.md · 68k | CLAUDE.md | setupbuildtestlint-format+6 | 97/100 | 14 days ago | |
| ruvnet/ruflov3/@claude-flow/mcp/CLAUDE.md · 68k | CLAUDE.md | teststyletypestesting-strategy+4 | 69/100 | 14 days ago | |
| ruvnet/ruflov3/CLAUDE.md · 68k | CLAUDE.md | setupbuildtestarch+4 | 70/100 | 14 days ago | |
| ruvnet/ruflov3/@claude-flow/codex/AGENTS.md · 68k | AGENTS.md | setupbuildteststyle+8 | 96/100 | 14 days ago |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| bagisto/bagistoCLAUDE.md · 28k | CLAUDE.md | setupbuildteststyle+5 | 100/100 | 7 days ago | |
| Adit-Jain-srm/NightmareNetCLAUDE.md · 46 | CLAUDE.md | buildtestlint-formatstyle+6 | 100/100 | 14 days ago | |
| tyrchen/geektime-bootcamp-aiw7/genslides/backend/CLAUDE.md · 230 | CLAUDE.md | testlint-formatstylearch+6 | 100/100 | 9 days ago | |
| nimbalyst/nimbalystpackages/android/CLAUDE.md · 1.5k | CLAUDE.md | setupbuildstylearch+2 | 100/100 | 14 days ago | |
| dotCMS/corecore-web/CLAUDE.md · 949 | CLAUDE.md | teststylearchtesting-strategy+3 | 100/100 | 14 days ago | |
| microsoft/playwrightCLAUDE.md · 95k | CLAUDE.md | buildtestlint-formatstyle+7 | 100/100 | 7 days ago | |
| tphakala/birdnet-goCLAUDE.md · 1.6k | CLAUDE.md | buildtestlint-formatstyle+8 | 100/100 | today | |
| livewire/livewireCLAUDE.md · 24k | CLAUDE.md | setupbuildteststyle+4 | 100/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/ruvnet-ruflo-v3-claude-flow-cli-claude)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.