@claude-flow/cli 3.1.0-alpha.8 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/core/coder.md +1 -1
- package/.claude/agents/core/planner.md +2 -2
- package/.claude/agents/core/researcher.md +1 -1
- package/.claude/agents/core/reviewer.md +1 -1
- package/.claude/agents/core/tester.md +1 -1
- package/.claude/agents/data/data-ml-model.md +4 -4
- package/.claude/agents/development/dev-backend-api.md +4 -4
- package/.claude/agents/documentation/docs-api-openapi.md +4 -4
- package/.claude/agents/github/code-review-swarm.md +2 -2
- package/.claude/agents/github/issue-tracker.md +2 -2
- package/.claude/agents/github/pr-manager.md +2 -2
- package/.claude/agents/github/release-manager.md +2 -2
- package/.claude/agents/github/workflow-automation.md +2 -2
- package/.claude/agents/sparc/architecture.md +3 -3
- package/.claude/agents/sparc/pseudocode.md +2 -2
- package/.claude/agents/sparc/refinement.md +3 -3
- package/.claude/agents/sparc/specification.md +2 -2
- package/.claude/agents/swarm/adaptive-coordinator.md +1 -1
- package/.claude/agents/swarm/hierarchical-coordinator.md +1 -1
- package/.claude/agents/swarm/mesh-coordinator.md +1 -1
- package/.claude/agents/templates/base-template-generator.md +3 -3
- package/.claude/agents/templates/sparc-coordinator.md +3 -3
- package/.claude/helpers/auto-memory-hook.mjs +350 -0
- package/.claude/helpers/hook-handler.cjs +232 -0
- package/.claude/helpers/intelligence.cjs +916 -0
- package/.claude/helpers/session.js +8 -0
- package/.claude/helpers/statusline.cjs +96 -28
- package/.claude/settings.json +86 -141
- package/.claude/skills/reasoningbank-intelligence/SKILL.md +2 -2
- package/.claude/skills/swarm-orchestration/SKILL.md +1 -1
- package/README.md +950 -502
- package/bin/preinstall.cjs +2 -0
- package/dist/src/commands/doctor.d.ts.map +1 -1
- package/dist/src/commands/doctor.js +45 -2
- package/dist/src/commands/doctor.js.map +1 -1
- package/dist/src/commands/hooks.d.ts.map +1 -1
- package/dist/src/commands/hooks.js +292 -82
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/commands/init.d.ts.map +1 -1
- package/dist/src/commands/init.js +88 -6
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/neural.js.map +1 -1
- package/dist/src/index.js +2 -2
- package/dist/src/index.js.map +1 -1
- package/dist/src/init/executor.d.ts +8 -2
- package/dist/src/init/executor.d.ts.map +1 -1
- package/dist/src/init/executor.js +315 -43
- package/dist/src/init/executor.js.map +1 -1
- package/dist/src/init/helpers-generator.d.ts +18 -0
- package/dist/src/init/helpers-generator.d.ts.map +1 -1
- package/dist/src/init/helpers-generator.js +498 -0
- package/dist/src/init/helpers-generator.js.map +1 -1
- package/dist/src/init/mcp-generator.d.ts +0 -1
- package/dist/src/init/mcp-generator.d.ts.map +1 -1
- package/dist/src/init/mcp-generator.js +32 -16
- package/dist/src/init/mcp-generator.js.map +1 -1
- package/dist/src/init/settings-generator.d.ts.map +1 -1
- package/dist/src/init/settings-generator.js +138 -95
- package/dist/src/init/settings-generator.js.map +1 -1
- package/dist/src/init/statusline-generator.d.ts +16 -8
- package/dist/src/init/statusline-generator.d.ts.map +1 -1
- package/dist/src/init/statusline-generator.js +506 -930
- package/dist/src/init/statusline-generator.js.map +1 -1
- package/dist/src/init/types.d.ts +8 -0
- package/dist/src/init/types.d.ts.map +1 -1
- package/dist/src/init/types.js +7 -0
- package/dist/src/init/types.js.map +1 -1
- package/dist/src/mcp-client.d.ts.map +1 -1
- package/dist/src/mcp-client.js +4 -0
- package/dist/src/mcp-client.js.map +1 -1
- package/dist/src/mcp-tools/agentdb-tools.d.ts +30 -0
- package/dist/src/mcp-tools/agentdb-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/agentdb-tools.js +557 -0
- package/dist/src/mcp-tools/agentdb-tools.js.map +1 -0
- package/dist/src/mcp-tools/hooks-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/hooks-tools.js +184 -32
- package/dist/src/mcp-tools/hooks-tools.js.map +1 -1
- package/dist/src/mcp-tools/neural-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/neural-tools.js +32 -27
- package/dist/src/mcp-tools/neural-tools.js.map +1 -1
- package/dist/src/memory/intelligence.d.ts.map +1 -1
- package/dist/src/memory/intelligence.js +34 -6
- package/dist/src/memory/intelligence.js.map +1 -1
- package/dist/src/memory/memory-bridge.d.ts +407 -0
- package/dist/src/memory/memory-bridge.d.ts.map +1 -0
- package/dist/src/memory/memory-bridge.js +1493 -0
- package/dist/src/memory/memory-bridge.js.map +1 -0
- package/dist/src/memory/memory-initializer.d.ts +3 -0
- package/dist/src/memory/memory-initializer.d.ts.map +1 -1
- package/dist/src/memory/memory-initializer.js +125 -1
- package/dist/src/memory/memory-initializer.js.map +1 -1
- package/dist/src/ruvector/enhanced-model-router.d.ts.map +1 -1
- package/dist/src/ruvector/enhanced-model-router.js +25 -15
- package/dist/src/ruvector/enhanced-model-router.js.map +1 -1
- package/dist/src/services/agentic-flow-bridge.d.ts +50 -0
- package/dist/src/services/agentic-flow-bridge.d.ts.map +1 -0
- package/dist/src/services/agentic-flow-bridge.js +95 -0
- package/dist/src/services/agentic-flow-bridge.js.map +1 -0
- package/dist/src/services/ruvector-training.d.ts +2 -1
- package/dist/src/services/ruvector-training.d.ts.map +1 -1
- package/dist/src/services/ruvector-training.js +1 -2
- package/dist/src/services/ruvector-training.js.map +1 -1
- package/dist/src/update/validator.js +1 -1
- package/dist/src/update/validator.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -4
package/README.md
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
# 🌊
|
|
1
|
+
# 🌊 Ruflo v3: Enterprise AI Orchestration Platform
|
|
2
2
|
|
|
3
3
|
<div align="center">
|
|
4
4
|
|
|
5
|
-

|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
+
[](https://github.com/ruvnet/claude-flow)
|
|
10
|
+
|
|
9
11
|
[](https://github.com/ruvnet/claude-flow)
|
|
10
12
|
[](https://www.npmjs.com/package/claude-flow)
|
|
11
13
|
[](https://www.npmjs.com/package/claude-flow)
|
|
@@ -23,14 +25,16 @@
|
|
|
23
25
|
|
|
24
26
|
</div>
|
|
25
27
|
|
|
28
|
+
> **Why Ruflo?** Claude Flow is now Ruflo — named by Ruv, who loves Rust, flow states, and building things that feel inevitable. The "Ru" is the Ruv. The "flo" is the flow. Underneath, WASM kernels written in Rust power the policy engine, embeddings, and proof system. 5,800 commits later, the alpha is over. This is v3.5.
|
|
29
|
+
|
|
26
30
|
## Getting into the Flow
|
|
27
31
|
|
|
28
|
-
|
|
32
|
+
Ruflo 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.
|
|
29
33
|
|
|
30
34
|
### Self-Learning/Self-Optimizing Agent Architecture
|
|
31
35
|
|
|
32
36
|
```
|
|
33
|
-
User →
|
|
37
|
+
User → Ruflo (CLI/MCP) → Router → Swarm → Agents → Memory → LLM Providers
|
|
34
38
|
↑ ↓
|
|
35
39
|
└──── Learning Loop ←──────┘
|
|
36
40
|
```
|
|
@@ -122,27 +126,24 @@ flowchart TB
|
|
|
122
126
|
style RESOURCES fill:#1a1a2e,stroke:#0f3460
|
|
123
127
|
```
|
|
124
128
|
|
|
125
|
-
**RuVector Components** (
|
|
129
|
+
**RuVector Components** (included with Ruflo):
|
|
126
130
|
|
|
127
131
|
| Component | Purpose | Performance |
|
|
128
132
|
|-----------|---------|-------------|
|
|
129
|
-
| **SONA** | Self-Optimizing Neural Architecture - learns optimal routing |
|
|
130
|
-
| **EWC++** | Elastic Weight Consolidation - prevents catastrophic forgetting | Preserves
|
|
131
|
-
| **Flash Attention** | Optimized attention computation | 2
|
|
132
|
-
| **HNSW** | Hierarchical Navigable Small World vector search |
|
|
133
|
+
| **SONA** | Self-Optimizing Neural Architecture - learns optimal routing | Fast adaptation |
|
|
134
|
+
| **EWC++** | Elastic Weight Consolidation - prevents catastrophic forgetting | Preserves learned patterns |
|
|
135
|
+
| **Flash Attention** | Optimized attention computation | 2-7x speedup |
|
|
136
|
+
| **HNSW** | Hierarchical Navigable Small World vector search | Sub-millisecond retrieval |
|
|
133
137
|
| **ReasoningBank** | Pattern storage with trajectory learning | RETRIEVE→JUDGE→DISTILL |
|
|
134
|
-
| **Hyperbolic** |
|
|
135
|
-
| **LoRA/MicroLoRA** | Low-Rank Adaptation for efficient fine-tuning |
|
|
136
|
-
| **Int8 Quantization** | Memory-efficient weight storage |
|
|
137
|
-
| **SemanticRouter** | Semantic task routing with cosine similarity |
|
|
138
|
+
| **Hyperbolic** | Poincare ball embeddings for hierarchical data | Better code relationships |
|
|
139
|
+
| **LoRA/MicroLoRA** | Low-Rank Adaptation for efficient fine-tuning | Lightweight adaptation |
|
|
140
|
+
| **Int8 Quantization** | Memory-efficient weight storage | ~4x memory reduction |
|
|
141
|
+
| **SemanticRouter** | Semantic task routing with cosine similarity | Fast intent routing |
|
|
138
142
|
| **9 RL Algorithms** | Q-Learning, SARSA, A2C, PPO, DQN, Decision Transformer, etc. | Task-specific learning |
|
|
139
143
|
|
|
140
144
|
```bash
|
|
141
|
-
#
|
|
142
|
-
npx
|
|
143
|
-
|
|
144
|
-
# Or use via Claude-Flow
|
|
145
|
-
npx claude-flow@v3alpha hooks intelligence --status
|
|
145
|
+
# Use RuVector via Ruflo
|
|
146
|
+
npx ruflo@alpha hooks intelligence --status
|
|
146
147
|
```
|
|
147
148
|
|
|
148
149
|
</details>
|
|
@@ -157,7 +158,7 @@ curl -fsSL https://cdn.jsdelivr.net/gh/ruvnet/claude-flow@main/scripts/install.s
|
|
|
157
158
|
curl -fsSL https://cdn.jsdelivr.net/gh/ruvnet/claude-flow@main/scripts/install.sh | bash -s -- --full
|
|
158
159
|
|
|
159
160
|
# Or via npx
|
|
160
|
-
npx
|
|
161
|
+
npx ruflo@alpha init --wizard
|
|
161
162
|
```
|
|
162
163
|
|
|
163
164
|
---
|
|
@@ -171,7 +172,7 @@ npx claude-flow@alpha init --wizard
|
|
|
171
172
|
|
|
172
173
|
🔌 **Works With Any LLM** - Switch between Claude, GPT, Gemini, Cohere, or local models like Llama. Automatic failover if one provider is unavailable. Smart routing picks the cheapest option that meets quality requirements.
|
|
173
174
|
|
|
174
|
-
⚡ **Plugs Into Claude Code** - Native integration via MCP (Model Context Protocol). Use
|
|
175
|
+
⚡ **Plugs Into Claude Code** - Native integration via MCP (Model Context Protocol). Use ruflo commands directly in your Claude Code sessions with full tool access.
|
|
175
176
|
|
|
176
177
|
🔒 **Production-Ready Security** - Built-in protection against prompt injection, input validation, path traversal prevention, command injection blocking, and safe credential handling.
|
|
177
178
|
|
|
@@ -212,18 +213,21 @@ Agents organize into swarms led by queens that coordinate work, prevent drift, a
|
|
|
212
213
|
- 👷 **8 Worker Types**: Researcher, Coder, Analyst, Tester, Architect, Reviewer, Optimizer, Documenter
|
|
213
214
|
- 🗳️ **3 Consensus Algorithms**: Majority, Weighted (Queen 3x), Byzantine (f < n/3)
|
|
214
215
|
- 🧠 **Collective Memory**: Shared knowledge, LRU cache, SQLite persistence with WAL
|
|
215
|
-
- ⚡ **Performance**:
|
|
216
|
+
- ⚡ **Performance**: Fast batch spawning with parallel agent coordination
|
|
216
217
|
|
|
217
218
|
</details>
|
|
218
219
|
|
|
219
220
|
<details>
|
|
220
221
|
<summary>🧠 <strong>Intelligence & Memory</strong> — How the system learns and remembers</summary>
|
|
221
222
|
|
|
222
|
-
The system stores successful patterns in vector memory, learns from outcomes via neural networks, and adapts routing based on what works best.
|
|
223
|
+
The system stores successful patterns in vector memory, builds a knowledge graph for structural understanding, learns from outcomes via neural networks, and adapts routing based on what works best.
|
|
223
224
|
|
|
224
225
|
| Layer | Components | What It Does |
|
|
225
226
|
|-------|------------|--------------|
|
|
226
|
-
| Memory | HNSW, AgentDB, Cache | Stores and retrieves patterns
|
|
227
|
+
| Memory | HNSW, AgentDB, Cache | Stores and retrieves patterns with fast HNSW search |
|
|
228
|
+
| Knowledge Graph | MemoryGraph, PageRank, Communities | Identifies influential insights, detects clusters (ADR-049) |
|
|
229
|
+
| Self-Learning | LearningBridge, SONA, ReasoningBank | Triggers learning from insights, confidence lifecycle (ADR-049) |
|
|
230
|
+
| Agent Scopes | AgentMemoryScope, 3-scope dirs | Per-agent isolation + cross-agent knowledge transfer (ADR-049) |
|
|
227
231
|
| Embeddings | ONNX Runtime, MiniLM | Local vectors without API calls (75x faster) |
|
|
228
232
|
| Learning | SONA, MoE, ReasoningBank | Self-improves from results (<0.05ms adaptation) |
|
|
229
233
|
| Fine-tuning | MicroLoRA, EWC++ | Lightweight adaptation without full retraining |
|
|
@@ -271,7 +275,7 @@ Smart routing skips expensive LLM calls when possible. Simple edits use WASM (fr
|
|
|
271
275
|
</details>
|
|
272
276
|
|
|
273
277
|
<details>
|
|
274
|
-
<summary>⚡ <strong>Agent Booster (WASM)</strong> —
|
|
278
|
+
<summary>⚡ <strong>Agent Booster (WASM)</strong> — Skip LLM for simple code transforms</summary>
|
|
275
279
|
|
|
276
280
|
Agent Booster uses WebAssembly to handle simple code transformations without calling the LLM at all. When the hooks system detects a simple task, it routes directly to Agent Booster for instant results.
|
|
277
281
|
|
|
@@ -346,7 +350,7 @@ const config = optimizer.getOptimalConfig(agentCount);
|
|
|
346
350
|
<details>
|
|
347
351
|
<summary>🛡️ <strong>Anti-Drift Swarm Configuration</strong> — Prevent goal drift in multi-agent work</summary>
|
|
348
352
|
|
|
349
|
-
Complex swarms can drift from their original goals.
|
|
353
|
+
Complex swarms can drift from their original goals. Ruflo V3 includes anti-drift defaults that prevent agents from going off-task.
|
|
350
354
|
|
|
351
355
|
**Recommended Configuration:**
|
|
352
356
|
|
|
@@ -388,24 +392,26 @@ swarm_init({
|
|
|
388
392
|
|
|
389
393
|
</details>
|
|
390
394
|
|
|
391
|
-
### Claude Code: With vs Without
|
|
395
|
+
### Claude Code: With vs Without Ruflo
|
|
392
396
|
|
|
393
|
-
| Capability | Claude Code Alone | Claude Code +
|
|
397
|
+
| Capability | Claude Code Alone | Claude Code + Ruflo |
|
|
394
398
|
|------------|-------------------|---------------------------|
|
|
395
399
|
| **Agent Collaboration** | Agents work in isolation, no shared context | Agents collaborate via swarms with shared memory and consensus |
|
|
396
400
|
| **Coordination** | Manual orchestration between tasks | Queen-led hierarchy with 5 consensus algorithms (Raft, Byzantine, Gossip) |
|
|
397
401
|
| **Hive Mind** | ⛔ Not available | 🐝 Queen-led swarms with collective intelligence, 3 queen types, 8 worker types |
|
|
398
402
|
| **Consensus** | ⛔ No multi-agent decisions | Byzantine fault-tolerant voting (f < n/3), weighted, majority |
|
|
399
|
-
| **Memory** | Session-only, no persistence | HNSW vector memory with
|
|
403
|
+
| **Memory** | Session-only, no persistence | HNSW vector memory with sub-ms retrieval + knowledge graph |
|
|
400
404
|
| **Vector Database** | ⛔ No native support | 🐘 RuVector PostgreSQL with 77+ SQL functions, ~61µs search, 16,400 QPS |
|
|
405
|
+
| **Knowledge Graph** | ⛔ Flat insight lists | PageRank + community detection identifies influential insights (ADR-049) |
|
|
401
406
|
| **Collective Memory** | ⛔ No shared knowledge | Shared knowledge base with LRU cache, SQLite persistence, 8 memory types |
|
|
402
|
-
| **Learning** | Static behavior, no adaptation | SONA self-learning with <0.05ms adaptation,
|
|
407
|
+
| **Learning** | Static behavior, no adaptation | SONA self-learning with <0.05ms adaptation, LearningBridge for insights |
|
|
408
|
+
| **Agent Scoping** | Single project scope | 3-scope agent memory (project/local/user) with cross-agent transfer |
|
|
403
409
|
| **Task Routing** | You decide which agent to use | Intelligent routing based on learned patterns (89% accuracy) |
|
|
404
410
|
| **Complex Tasks** | Manual breakdown required | Automatic decomposition across 5 domains (Security, Core, Integration, Support) |
|
|
405
411
|
| **Background Workers** | Nothing runs automatically | 12 context-triggered workers auto-dispatch on file changes, patterns, sessions |
|
|
406
412
|
| **LLM Provider** | Anthropic only | 6 providers with automatic failover and cost-based routing (85% savings) |
|
|
407
413
|
| **Security** | Standard protections | CVE-hardened with bcrypt, input validation, path traversal prevention |
|
|
408
|
-
| **Performance** | Baseline |
|
|
414
|
+
| **Performance** | Baseline | Faster tasks via parallel swarm spawning and intelligent routing |
|
|
409
415
|
|
|
410
416
|
## Quick Start
|
|
411
417
|
|
|
@@ -475,44 +481,44 @@ curl ... | bash -s -- --full
|
|
|
475
481
|
|
|
476
482
|
```bash
|
|
477
483
|
# Quick start (no install needed)
|
|
478
|
-
npx
|
|
484
|
+
npx ruflo@alpha init
|
|
479
485
|
|
|
480
486
|
# Or install globally
|
|
481
|
-
npm install -g
|
|
482
|
-
|
|
487
|
+
npm install -g ruflo@alpha
|
|
488
|
+
ruflo init
|
|
483
489
|
|
|
484
490
|
# With Bun (faster)
|
|
485
|
-
bunx
|
|
491
|
+
bunx ruflo@alpha init
|
|
486
492
|
```
|
|
487
493
|
|
|
488
494
|
#### Install Profiles
|
|
489
495
|
|
|
490
496
|
| Profile | Size | Use Case |
|
|
491
497
|
|---------|------|----------|
|
|
492
|
-
| `--omit=optional` | ~
|
|
493
|
-
| Default | ~340MB |
|
|
498
|
+
| `--omit=optional` | ~45MB | Core CLI only (fastest) |
|
|
499
|
+
| Default | ~340MB | Full install with ML/embeddings |
|
|
494
500
|
|
|
495
501
|
```bash
|
|
496
502
|
# Minimal install (skip ML/embeddings)
|
|
497
|
-
npm install -g
|
|
503
|
+
npm install -g ruflo@alpha --omit=optional
|
|
498
504
|
```
|
|
499
505
|
|
|
500
506
|
<details>
|
|
501
507
|
<summary>🤖 <strong>OpenAI Codex CLI Support</strong> — Full Codex integration with self-learning</summary>
|
|
502
508
|
|
|
503
|
-
|
|
509
|
+
Ruflo supports both **Claude Code** and **OpenAI Codex CLI** via the [@claude-flow/codex](https://www.npmjs.com/package/@claude-flow/codex) package, following the [Agentics Foundation](https://agentics.org) standard.
|
|
504
510
|
|
|
505
511
|
### Quick Start for Codex
|
|
506
512
|
|
|
507
513
|
```bash
|
|
508
514
|
# Initialize for Codex CLI (creates AGENTS.md instead of CLAUDE.md)
|
|
509
|
-
npx
|
|
515
|
+
npx ruflo@alpha init --codex
|
|
510
516
|
|
|
511
517
|
# Full Codex setup with all 137+ skills
|
|
512
|
-
npx
|
|
518
|
+
npx ruflo@alpha init --codex --full
|
|
513
519
|
|
|
514
520
|
# Initialize for both platforms (dual mode)
|
|
515
|
-
npx
|
|
521
|
+
npx ruflo@alpha init --dual
|
|
516
522
|
```
|
|
517
523
|
|
|
518
524
|
### Platform Comparison
|
|
@@ -524,6 +530,7 @@ npx claude-flow@alpha init --dual
|
|
|
524
530
|
| Skill Syntax | `/skill-name` | `$skill-name` |
|
|
525
531
|
| Settings | `settings.json` | `config.toml` |
|
|
526
532
|
| MCP | Native | Via `codex mcp add` |
|
|
533
|
+
| Default Model | claude-sonnet | gpt-5.3 |
|
|
527
534
|
|
|
528
535
|
### Key Concept: Execution Model
|
|
529
536
|
|
|
@@ -536,6 +543,59 @@ npx claude-flow@alpha init --dual
|
|
|
536
543
|
|
|
537
544
|
**Codex does the work. Claude-flow coordinates and learns.**
|
|
538
545
|
|
|
546
|
+
### Dual-Mode Integration (Claude Code + Codex)
|
|
547
|
+
|
|
548
|
+
Run Claude Code for interactive development and spawn headless Codex workers for parallel background tasks:
|
|
549
|
+
|
|
550
|
+
```
|
|
551
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
552
|
+
│ CLAUDE CODE (interactive) ←→ CODEX WORKERS (headless) │
|
|
553
|
+
│ - Main conversation - Parallel background execution │
|
|
554
|
+
│ - Complex reasoning - Bulk code generation │
|
|
555
|
+
│ - Architecture decisions - Test execution │
|
|
556
|
+
│ - Final integration - File processing │
|
|
557
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
558
|
+
```
|
|
559
|
+
|
|
560
|
+
```bash
|
|
561
|
+
# Spawn parallel Codex workers from Claude Code
|
|
562
|
+
claude -p "Analyze src/auth/ for security issues" --session-id "task-1" &
|
|
563
|
+
claude -p "Write unit tests for src/api/" --session-id "task-2" &
|
|
564
|
+
claude -p "Optimize database queries in src/db/" --session-id "task-3" &
|
|
565
|
+
wait # Wait for all to complete
|
|
566
|
+
```
|
|
567
|
+
|
|
568
|
+
| Dual-Mode Feature | Benefit |
|
|
569
|
+
|-------------------|---------|
|
|
570
|
+
| Parallel Execution | 4-8x faster for bulk tasks |
|
|
571
|
+
| Cost Optimization | Route simple tasks to cheaper workers |
|
|
572
|
+
| Context Preservation | Shared memory across platforms |
|
|
573
|
+
| Best of Both | Interactive + batch processing |
|
|
574
|
+
|
|
575
|
+
### Dual-Mode CLI Commands (NEW)
|
|
576
|
+
|
|
577
|
+
```bash
|
|
578
|
+
# List collaboration templates
|
|
579
|
+
npx @claude-flow/codex dual templates
|
|
580
|
+
|
|
581
|
+
# Run feature development swarm (architect → coder → tester → reviewer)
|
|
582
|
+
npx @claude-flow/codex dual run --template feature --task "Add user auth"
|
|
583
|
+
|
|
584
|
+
# Run security audit swarm (scanner → analyzer → fixer)
|
|
585
|
+
npx @claude-flow/codex dual run --template security --task "src/auth/"
|
|
586
|
+
|
|
587
|
+
# Run refactoring swarm (analyzer → planner → refactorer → validator)
|
|
588
|
+
npx @claude-flow/codex dual run --template refactor --task "src/legacy/"
|
|
589
|
+
```
|
|
590
|
+
|
|
591
|
+
### Pre-Built Collaboration Templates
|
|
592
|
+
|
|
593
|
+
| Template | Pipeline | Platforms |
|
|
594
|
+
|----------|----------|-----------|
|
|
595
|
+
| **feature** | architect → coder → tester → reviewer | Claude + Codex |
|
|
596
|
+
| **security** | scanner → analyzer → fixer | Codex + Claude |
|
|
597
|
+
| **refactor** | analyzer → planner → refactorer → validator | Claude + Codex |
|
|
598
|
+
|
|
539
599
|
### MCP Integration for Codex
|
|
540
600
|
|
|
541
601
|
When you run `init --codex`, the MCP server is automatically registered:
|
|
@@ -545,7 +605,7 @@ When you run `init --codex`, the MCP server is automatically registered:
|
|
|
545
605
|
codex mcp list
|
|
546
606
|
|
|
547
607
|
# If not present, add manually:
|
|
548
|
-
codex mcp add
|
|
608
|
+
codex mcp add ruflo -- npx ruflo mcp start
|
|
549
609
|
```
|
|
550
610
|
|
|
551
611
|
### Self-Learning Workflow
|
|
@@ -557,6 +617,13 @@ codex mcp add claude-flow -- npx claude-flow mcp start
|
|
|
557
617
|
4. REMEMBER: memory_store(key, value, namespace="patterns") → Save for future
|
|
558
618
|
```
|
|
559
619
|
|
|
620
|
+
The **Intelligence Loop** (ADR-050) automates this cycle through hooks. Each session automatically:
|
|
621
|
+
- Builds a knowledge graph from memory entries (PageRank + Jaccard similarity)
|
|
622
|
+
- Injects ranked context into every route decision
|
|
623
|
+
- Tracks edit patterns and generates new insights
|
|
624
|
+
- Boosts confidence for useful patterns, decays unused ones
|
|
625
|
+
- Saves snapshots so you can track improvement with `node .claude/helpers/hook-handler.cjs stats`
|
|
626
|
+
|
|
560
627
|
### MCP Tools for Learning
|
|
561
628
|
|
|
562
629
|
| Tool | Purpose | When to Use |
|
|
@@ -567,39 +634,22 @@ codex mcp add claude-flow -- npx claude-flow mcp start
|
|
|
567
634
|
| `agent_spawn` | Register agent roles | Multi-agent workflows |
|
|
568
635
|
| `neural_train` | Train on patterns | Periodic improvement |
|
|
569
636
|
|
|
570
|
-
###
|
|
571
|
-
|
|
572
|
-
```
|
|
573
|
-
Build an email validator using a learning-enabled swarm.
|
|
574
|
-
|
|
575
|
-
STEP 1 - LEARN (use MCP tool):
|
|
576
|
-
Use tool: memory_search
|
|
577
|
-
query: "validation utility function patterns"
|
|
578
|
-
namespace: "patterns"
|
|
579
|
-
If score > 0.7, use that pattern as reference.
|
|
580
|
-
|
|
581
|
-
STEP 2 - COORDINATE (use MCP tools):
|
|
582
|
-
Use tool: swarm_init with topology="hierarchical", maxAgents=3
|
|
583
|
-
Use tool: agent_spawn with type="coder", name="validator"
|
|
637
|
+
### 137+ Skills Available
|
|
584
638
|
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
namespace: "patterns"
|
|
595
|
-
|
|
596
|
-
YOU execute all code. Use MCP tools for learning.
|
|
597
|
-
```
|
|
639
|
+
| Category | Examples |
|
|
640
|
+
|----------|----------|
|
|
641
|
+
| **V3 Core** | `$v3-security-overhaul`, `$v3-memory-unification`, `$v3-performance-optimization` |
|
|
642
|
+
| **AgentDB** | `$agentdb-vector-search`, `$agentdb-optimization`, `$agentdb-learning` |
|
|
643
|
+
| **Swarm** | `$swarm-orchestration`, `$swarm-advanced`, `$hive-mind-advanced` |
|
|
644
|
+
| **GitHub** | `$github-code-review`, `$github-workflow-automation`, `$github-multi-repo` |
|
|
645
|
+
| **SPARC** | `$sparc-methodology`, `$sparc:architect`, `$sparc:coder`, `$sparc:tester` |
|
|
646
|
+
| **Flow Nexus** | `$flow-nexus-neural`, `$flow-nexus-swarm`, `$flow-nexus:workflow` |
|
|
647
|
+
| **Dual-Mode** | `$dual-spawn`, `$dual-coordinate`, `$dual-collect` |
|
|
598
648
|
|
|
599
649
|
### Vector Search Details
|
|
600
650
|
|
|
601
651
|
- **Embedding Dimensions**: 384
|
|
602
|
-
- **Search Algorithm**: HNSW (
|
|
652
|
+
- **Search Algorithm**: HNSW (sub-millisecond)
|
|
603
653
|
- **Similarity Scoring**: 0-1 (higher = better)
|
|
604
654
|
- Score > 0.7: Strong match, use pattern
|
|
605
655
|
- Score 0.5-0.7: Partial match, adapt
|
|
@@ -611,46 +661,46 @@ YOU execute all code. Use MCP tools for learning.
|
|
|
611
661
|
|
|
612
662
|
```bash
|
|
613
663
|
# Initialize project
|
|
614
|
-
npx
|
|
664
|
+
npx ruflo@alpha init
|
|
615
665
|
|
|
616
666
|
# Start MCP server for Claude Code integration
|
|
617
|
-
npx
|
|
667
|
+
npx ruflo@alpha mcp start
|
|
618
668
|
|
|
619
669
|
# Run a task with agents
|
|
620
|
-
npx
|
|
670
|
+
npx ruflo@alpha --agent coder --task "Implement user authentication"
|
|
621
671
|
|
|
622
672
|
# List available agents
|
|
623
|
-
npx
|
|
673
|
+
npx ruflo@alpha --list
|
|
624
674
|
```
|
|
625
675
|
|
|
626
676
|
### Upgrading
|
|
627
677
|
|
|
628
678
|
```bash
|
|
629
679
|
# Update helpers and statusline (preserves your data)
|
|
630
|
-
npx
|
|
680
|
+
npx ruflo@v3alpha init upgrade
|
|
631
681
|
|
|
632
682
|
# Update AND add any missing skills/agents/commands
|
|
633
|
-
npx
|
|
683
|
+
npx ruflo@v3alpha init upgrade --add-missing
|
|
634
684
|
```
|
|
635
685
|
|
|
636
686
|
The `--add-missing` flag automatically detects and installs new skills, agents, and commands that were added in newer versions, without overwriting your existing customizations.
|
|
637
687
|
|
|
638
688
|
### Claude Code MCP Integration
|
|
639
689
|
|
|
640
|
-
Add
|
|
690
|
+
Add ruflo as an MCP server for seamless integration:
|
|
641
691
|
|
|
642
692
|
```bash
|
|
643
|
-
# Add
|
|
644
|
-
claude mcp add
|
|
693
|
+
# Add ruflo MCP server to Claude Code
|
|
694
|
+
claude mcp add ruflo -- npx -y ruflo@latest mcp start
|
|
645
695
|
|
|
646
696
|
# Verify installation
|
|
647
697
|
claude mcp list
|
|
648
698
|
```
|
|
649
699
|
|
|
650
|
-
Once added, Claude Code can use all 175+
|
|
700
|
+
Once added, Claude Code can use all 175+ ruflo MCP tools directly:
|
|
651
701
|
- `swarm_init` - Initialize agent swarms
|
|
652
702
|
- `agent_spawn` - Spawn specialized agents
|
|
653
|
-
- `memory_search` - Search patterns with HNSW
|
|
703
|
+
- `memory_search` - Search patterns with HNSW vector search
|
|
654
704
|
- `hooks_route` - Intelligent task routing
|
|
655
705
|
- And 170+ more tools...
|
|
656
706
|
|
|
@@ -658,13 +708,13 @@ Once added, Claude Code can use all 175+ claude-flow MCP tools directly:
|
|
|
658
708
|
## What is it exactly? Agents that learn, build and work perpetually.
|
|
659
709
|
|
|
660
710
|
<details>
|
|
661
|
-
<summary>🆚 <strong>Why
|
|
711
|
+
<summary>🆚 <strong>Why Ruflo v3?</strong></summary>
|
|
662
712
|
|
|
663
|
-
|
|
713
|
+
Ruflo v3 introduces **self-learning neural capabilities** that no other agent orchestration framework offers. While competitors require manual agent configuration and static routing, Ruflo learns from every task execution, prevents catastrophic forgetting of successful patterns, and intelligently routes work to specialized experts.
|
|
664
714
|
|
|
665
715
|
#### 🧠 Neural & Learning
|
|
666
716
|
|
|
667
|
-
| Feature |
|
|
717
|
+
| Feature | Ruflo v3 | CrewAI | LangGraph | AutoGen | Manus |
|
|
668
718
|
|---------|----------------|--------|-----------|---------|-------|
|
|
669
719
|
| **Self-Learning** | ✅ SONA + EWC++ | ⛔ | ⛔ | ⛔ | ⛔ |
|
|
670
720
|
| **Prevents Forgetting** | ✅ EWC++ consolidation | ⛔ | ⛔ | ⛔ | ⛔ |
|
|
@@ -675,19 +725,22 @@ Claude-Flow v3 introduces **self-learning neural capabilities** that no other ag
|
|
|
675
725
|
|
|
676
726
|
#### 💾 Memory & Embeddings
|
|
677
727
|
|
|
678
|
-
| Feature |
|
|
728
|
+
| Feature | Ruflo v3 | CrewAI | LangGraph | AutoGen | Manus |
|
|
679
729
|
|---------|----------------|--------|-----------|---------|-------|
|
|
680
|
-
| **Vector Memory** | ✅ HNSW (
|
|
681
|
-
| **
|
|
730
|
+
| **Vector Memory** | ✅ HNSW (sub-ms search) | ⛔ | Via plugins | ⛔ | ⛔ |
|
|
731
|
+
| **Knowledge Graph** | ✅ PageRank + communities | ⛔ | ⛔ | ⛔ | ⛔ |
|
|
732
|
+
| **Self-Learning Memory** | ✅ LearningBridge (SONA) | ⛔ | ⛔ | ⛔ | ⛔ |
|
|
733
|
+
| **Agent-Scoped Memory** | ✅ 3-scope (project/local/user) | ⛔ | ⛔ | ⛔ | ⛔ |
|
|
734
|
+
| **PostgreSQL Vector DB** | ✅ RuVector (77+ SQL functions) | ⛔ | pgvector only | ⛔ | ⛔ |
|
|
682
735
|
| **Hyperbolic Embeddings** | ✅ Poincaré ball (native + SQL) | ⛔ | ⛔ | ⛔ | ⛔ |
|
|
683
|
-
| **Quantization** | ✅ Int8 (
|
|
736
|
+
| **Quantization** | ✅ Int8 (~4x savings) | ⛔ | ⛔ | ⛔ | ⛔ |
|
|
684
737
|
| **Persistent Memory** | ✅ SQLite + AgentDB + PostgreSQL | ⛔ | ⛔ | ⛔ | Limited |
|
|
685
738
|
| **Cross-Session Context** | ✅ Full restoration | ⛔ | ⛔ | ⛔ | ⛔ |
|
|
686
739
|
| **GNN/Attention in SQL** | ✅ 39 attention mechanisms | ⛔ | ⛔ | ⛔ | ⛔ |
|
|
687
740
|
|
|
688
741
|
#### 🐝 Swarm & Coordination
|
|
689
742
|
|
|
690
|
-
| Feature |
|
|
743
|
+
| Feature | Ruflo v3 | CrewAI | LangGraph | AutoGen | Manus |
|
|
691
744
|
|---------|----------------|--------|-----------|---------|-------|
|
|
692
745
|
| **Swarm Topologies** | ✅ 4 types | 1 | 1 | 1 | 1 |
|
|
693
746
|
| **Consensus Protocols** | ✅ 5 (Raft, BFT, etc.) | ⛔ | ⛔ | ⛔ | ⛔ |
|
|
@@ -697,7 +750,7 @@ Claude-Flow v3 introduces **self-learning neural capabilities** that no other ag
|
|
|
697
750
|
|
|
698
751
|
#### 🔧 Developer Experience
|
|
699
752
|
|
|
700
|
-
| Feature |
|
|
753
|
+
| Feature | Ruflo v3 | CrewAI | LangGraph | AutoGen | Manus |
|
|
701
754
|
|---------|----------------|--------|-----------|---------|-------|
|
|
702
755
|
| **MCP Integration** | ✅ Native (170+ tools) | ⛔ | ⛔ | ⛔ | ⛔ |
|
|
703
756
|
| **Skills System** | ✅ 42+ pre-built | ⛔ | ⛔ | ⛔ | Limited |
|
|
@@ -707,41 +760,41 @@ Claude-Flow v3 introduces **self-learning neural capabilities** that no other ag
|
|
|
707
760
|
|
|
708
761
|
#### 🛡️ Security & Platform
|
|
709
762
|
|
|
710
|
-
| Feature |
|
|
763
|
+
| Feature | Ruflo v3 | CrewAI | LangGraph | AutoGen | Manus |
|
|
711
764
|
|---------|----------------|--------|-----------|---------|-------|
|
|
712
765
|
| **Threat Detection** | ✅ AIDefence (<10ms) | ⛔ | ⛔ | ⛔ | ⛔ |
|
|
713
766
|
| **Cloud Platform** | ✅ Flow Nexus | ⛔ | ⛔ | ⛔ | ⛔ |
|
|
714
|
-
| **Code Transforms** | ✅ Agent Booster (
|
|
767
|
+
| **Code Transforms** | ✅ Agent Booster (WASM) | ⛔ | ⛔ | ⛔ | ⛔ |
|
|
715
768
|
| **Input Validation** | ✅ Zod + Path security | ⛔ | ⛔ | ⛔ | ⛔ |
|
|
716
769
|
|
|
717
|
-
<sub>*Comparison updated
|
|
770
|
+
<sub>*Comparison updated February 2026. Feature availability based on public documentation.*</sub>
|
|
718
771
|
|
|
719
772
|
</details>
|
|
720
773
|
|
|
721
774
|
<details>
|
|
722
775
|
<summary>🚀 <strong>Key Differentiators</strong> — Self-learning, memory optimization, fault tolerance</summary>
|
|
723
776
|
|
|
724
|
-
What makes
|
|
777
|
+
What makes Ruflo different from other agent frameworks? These 10 capabilities work together to create a system that learns from experience, runs efficiently on any hardware, and keeps working even when things go wrong.
|
|
725
778
|
|
|
726
779
|
| | Feature | What It Does | Technical Details |
|
|
727
780
|
|---|---------|--------------|-------------------|
|
|
728
|
-
| 🧠 | **SONA** | Learns which agents perform best for each task type and routes work accordingly | Self-Optimizing Neural Architecture
|
|
781
|
+
| 🧠 | **SONA** | Learns which agents perform best for each task type and routes work accordingly | Self-Optimizing Neural Architecture |
|
|
729
782
|
| 🔒 | **EWC++** | Preserves learned patterns when training on new ones — no forgetting | Elastic Weight Consolidation prevents catastrophic forgetting |
|
|
730
783
|
| 🎯 | **MoE** | Routes tasks through 8 specialized expert networks based on task type | Mixture of 8 Experts with dynamic gating |
|
|
731
|
-
| ⚡ | **Flash Attention** | Accelerates attention computation
|
|
732
|
-
| 🌐 | **Hyperbolic Embeddings** | Represents hierarchical code relationships in compact vector space |
|
|
733
|
-
| 📦 | **LoRA** |
|
|
734
|
-
| 🗜️ | **Int8 Quantization** | Converts 32-bit weights to 8-bit with minimal accuracy loss |
|
|
784
|
+
| ⚡ | **Flash Attention** | Accelerates attention computation for faster agent responses | Optimized attention via @ruvector/attention |
|
|
785
|
+
| 🌐 | **Hyperbolic Embeddings** | Represents hierarchical code relationships in compact vector space | Poincare ball model for hierarchical data |
|
|
786
|
+
| 📦 | **LoRA** | Lightweight model adaptation so agents fit in limited memory | Low-Rank Adaptation via @ruvector/sona |
|
|
787
|
+
| 🗜️ | **Int8 Quantization** | Converts 32-bit weights to 8-bit with minimal accuracy loss | ~4x memory reduction with calibrated integers |
|
|
735
788
|
| 🤝 | **Claims System** | Manages task ownership between humans and agents with handoff support | Work ownership with claim/release/handoff protocols |
|
|
736
789
|
| 🛡️ | **Byzantine Consensus** | Coordinates agents even when some fail or return bad results | Fault-tolerant, handles up to 1/3 failing agents |
|
|
737
|
-
| 🐘 | **RuVector PostgreSQL** | Enterprise-grade vector database with 77+ SQL functions for AI operations |
|
|
790
|
+
| 🐘 | **RuVector PostgreSQL** | Enterprise-grade vector database with 77+ SQL functions for AI operations | Fast vector search with GNN/attention in SQL |
|
|
738
791
|
|
|
739
792
|
</details>
|
|
740
793
|
|
|
741
794
|
<details>
|
|
742
795
|
<summary>💰 <strong>Intelligent 3-Tier Model Routing</strong> — Save 75% on API costs, extend Claude Max 2.5x</summary>
|
|
743
796
|
|
|
744
|
-
Not every task needs the most powerful (and expensive) model.
|
|
797
|
+
Not every task needs the most powerful (and expensive) model. Ruflo analyzes each request and automatically routes it to the cheapest handler that can do the job well. Simple code transforms skip the LLM entirely using WebAssembly. Medium tasks use faster, cheaper models. Only complex architecture decisions use Opus.
|
|
745
798
|
|
|
746
799
|
**Cost & Usage Benefits:**
|
|
747
800
|
|
|
@@ -767,7 +820,7 @@ Not every task needs the most powerful (and expensive) model. Claude-Flow analyz
|
|
|
767
820
|
<details>
|
|
768
821
|
<summary>📋 <strong>Spec-Driven Development</strong> — Build complete specs, implement without drift</summary>
|
|
769
822
|
|
|
770
|
-
Complex projects fail when implementation drifts from the original plan.
|
|
823
|
+
Complex projects fail when implementation drifts from the original plan. Ruflo solves this with a spec-first approach: define your architecture through ADRs (Architecture Decision Records), organize code into DDD bounded contexts, and let the system enforce compliance as agents work. The result is implementations that match specifications — even across multi-agent swarms working in parallel.
|
|
771
824
|
|
|
772
825
|
**How It Prevents Drift:**
|
|
773
826
|
|
|
@@ -810,6 +863,8 @@ Complex projects fail when implementation drifts from the original plan. Claude-
|
|
|
810
863
|
- **ADR-008**: Vitest testing framework (10x faster than Jest)
|
|
811
864
|
- **ADR-009**: Hybrid Memory Backend (SQLite + HNSW)
|
|
812
865
|
- **ADR-026**: Intelligent 3-tier model routing
|
|
866
|
+
- **ADR-048**: Auto Memory Bridge (Claude Code ↔ AgentDB bidirectional sync)
|
|
867
|
+
- **ADR-049**: Self-Learning Memory with GNN (LearningBridge, MemoryGraph, AgentMemoryScope)
|
|
813
868
|
|
|
814
869
|
</details>
|
|
815
870
|
|
|
@@ -906,28 +961,32 @@ sequenceDiagram
|
|
|
906
961
|
</details>
|
|
907
962
|
|
|
908
963
|
<details>
|
|
909
|
-
<summary>🧠 <strong>Memory Architecture</strong> — How knowledge is stored and retrieved</summary>
|
|
964
|
+
<summary>🧠 <strong>Memory Architecture</strong> — How knowledge is stored, learned, and retrieved</summary>
|
|
910
965
|
|
|
911
966
|
```mermaid
|
|
912
967
|
flowchart LR
|
|
913
968
|
subgraph Input["📥 Input"]
|
|
914
969
|
Query[Query/Pattern]
|
|
970
|
+
Insight[New Insight]
|
|
915
971
|
end
|
|
916
972
|
|
|
917
973
|
subgraph Processing["⚙️ Processing"]
|
|
918
974
|
Embed[ONNX Embeddings]
|
|
919
975
|
Normalize[Normalization]
|
|
976
|
+
Learn[LearningBridge<br/>SONA + ReasoningBank]
|
|
920
977
|
end
|
|
921
978
|
|
|
922
979
|
subgraph Storage["💾 Storage"]
|
|
923
980
|
HNSW[(HNSW Index<br/>150x faster)]
|
|
924
981
|
SQLite[(SQLite Cache)]
|
|
925
982
|
AgentDB[(AgentDB)]
|
|
983
|
+
Graph[MemoryGraph<br/>PageRank + Communities]
|
|
926
984
|
end
|
|
927
985
|
|
|
928
986
|
subgraph Retrieval["🔍 Retrieval"]
|
|
929
987
|
Vector[Vector Search]
|
|
930
988
|
Semantic[Semantic Match]
|
|
989
|
+
Rank[Graph-Aware Ranking]
|
|
931
990
|
Results[Top-K Results]
|
|
932
991
|
end
|
|
933
992
|
|
|
@@ -935,11 +994,108 @@ flowchart LR
|
|
|
935
994
|
Embed --> Normalize
|
|
936
995
|
Normalize --> HNSW
|
|
937
996
|
Normalize --> SQLite
|
|
997
|
+
Insight --> Learn
|
|
998
|
+
Learn --> AgentDB
|
|
999
|
+
AgentDB --> Graph
|
|
938
1000
|
HNSW --> Vector
|
|
939
1001
|
SQLite --> Vector
|
|
940
1002
|
AgentDB --> Semantic
|
|
941
|
-
Vector -->
|
|
942
|
-
Semantic -->
|
|
1003
|
+
Vector --> Rank
|
|
1004
|
+
Semantic --> Rank
|
|
1005
|
+
Graph --> Rank
|
|
1006
|
+
Rank --> Results
|
|
1007
|
+
```
|
|
1008
|
+
|
|
1009
|
+
**Self-Learning Memory (ADR-049):**
|
|
1010
|
+
| Component | Purpose | Performance |
|
|
1011
|
+
|-----------|---------|-------------|
|
|
1012
|
+
| **LearningBridge** | Connects insights to SONA/ReasoningBank neural pipeline | 0.12 ms/insight |
|
|
1013
|
+
| **MemoryGraph** | PageRank + label propagation knowledge graph | 2.78 ms build (1k nodes) |
|
|
1014
|
+
| **AgentMemoryScope** | 3-scope agent memory (project/local/user) with cross-agent transfer | 1.25 ms transfer |
|
|
1015
|
+
| **AutoMemoryBridge** | Bidirectional sync: Claude Code auto memory files ↔ AgentDB | ADR-048 |
|
|
1016
|
+
|
|
1017
|
+
</details>
|
|
1018
|
+
|
|
1019
|
+
<details>
|
|
1020
|
+
<summary>🧠 <strong>AgentDB v3 Controllers</strong> — 20+ intelligent memory controllers</summary>
|
|
1021
|
+
|
|
1022
|
+
Ruflo V3 integrates AgentDB v3 (3.0.0-alpha.10) providing 20+ memory controllers accessible via MCP tools and the CLI.
|
|
1023
|
+
|
|
1024
|
+
**Core Memory:**
|
|
1025
|
+
|
|
1026
|
+
| Controller | MCP Tool | Description |
|
|
1027
|
+
|-----------|----------|-------------|
|
|
1028
|
+
| HierarchicalMemory | `agentdb_hierarchical-store/recall` | Working → episodic → semantic memory tiers with Ebbinghaus forgetting curves and spaced repetition |
|
|
1029
|
+
| MemoryConsolidation | `agentdb_consolidate` | Automatic clustering and merging of related memories into semantic summaries |
|
|
1030
|
+
| BatchOperations | `agentdb_batch` | Bulk insert/update/delete operations for high-throughput memory management |
|
|
1031
|
+
| ReasoningBank | `agentdb_pattern-store/search` | Pattern storage with BM25+semantic hybrid search |
|
|
1032
|
+
|
|
1033
|
+
**Intelligence:**
|
|
1034
|
+
|
|
1035
|
+
| Controller | MCP Tool | Description |
|
|
1036
|
+
|-----------|----------|-------------|
|
|
1037
|
+
| SemanticRouter | `agentdb_semantic-route` | Route tasks to agents using vector similarity instead of manual rules |
|
|
1038
|
+
| ContextSynthesizer | `agentdb_context-synthesize` | Auto-generate context summaries from memory entries |
|
|
1039
|
+
| GNNService | — | Graph neural network for intent classification and skill recommendation |
|
|
1040
|
+
| SonaTrajectoryService | — | Record and predict learning trajectories for agents |
|
|
1041
|
+
| GraphTransformerService | — | Sublinear attention, causal attention, Granger causality extraction |
|
|
1042
|
+
|
|
1043
|
+
**Causal & Explainable:**
|
|
1044
|
+
|
|
1045
|
+
| Controller | MCP Tool | Description |
|
|
1046
|
+
|-----------|----------|-------------|
|
|
1047
|
+
| CausalRecall | `agentdb_causal-edge` | Recall with causal re-ranking and utility scoring |
|
|
1048
|
+
| ExplainableRecall | — | Certificates proving *why* a memory was recalled |
|
|
1049
|
+
| CausalMemoryGraph | — | Directed causal relationships between memory entries |
|
|
1050
|
+
| MMRDiversityRanker | — | Maximal Marginal Relevance for diverse search results |
|
|
1051
|
+
|
|
1052
|
+
**Security & Integrity:**
|
|
1053
|
+
|
|
1054
|
+
| Controller | MCP Tool | Description |
|
|
1055
|
+
|-----------|----------|-------------|
|
|
1056
|
+
| GuardedVectorBackend | — | Cryptographic proof-of-work before vector insert/search |
|
|
1057
|
+
| MutationGuard | — | Token-validated mutations with cryptographic proofs |
|
|
1058
|
+
| AttestationLog | — | Immutable audit trail of all memory operations |
|
|
1059
|
+
|
|
1060
|
+
**Optimization:**
|
|
1061
|
+
|
|
1062
|
+
| Controller | MCP Tool | Description |
|
|
1063
|
+
|-----------|----------|-------------|
|
|
1064
|
+
| RVFOptimizer | — | 4-bit adaptive quantization and progressive compression |
|
|
1065
|
+
|
|
1066
|
+
**MCP Tool Examples:**
|
|
1067
|
+
```bash
|
|
1068
|
+
# Store to hierarchical memory
|
|
1069
|
+
agentdb_hierarchical-store --key "auth-pattern" --value "JWT refresh" --tier "semantic"
|
|
1070
|
+
|
|
1071
|
+
# Recall from memory tiers
|
|
1072
|
+
agentdb_hierarchical-recall --query "authentication" --topK 5
|
|
1073
|
+
|
|
1074
|
+
# Run memory consolidation
|
|
1075
|
+
agentdb_consolidate
|
|
1076
|
+
|
|
1077
|
+
# Batch insert
|
|
1078
|
+
agentdb_batch --operation insert --entries '[{"key":"k1","value":"v1"}]'
|
|
1079
|
+
|
|
1080
|
+
# Synthesize context
|
|
1081
|
+
agentdb_context-synthesize --query "error handling patterns"
|
|
1082
|
+
|
|
1083
|
+
# Semantic routing
|
|
1084
|
+
agentdb_semantic-route --input "fix auth bug in login"
|
|
1085
|
+
```
|
|
1086
|
+
|
|
1087
|
+
**Hierarchical Memory Tiers:**
|
|
1088
|
+
```
|
|
1089
|
+
┌─────────────────────────────────────────────┐
|
|
1090
|
+
│ Working Memory │ ← Active context, fast access
|
|
1091
|
+
│ Size-based eviction (1MB limit) │
|
|
1092
|
+
├─────────────────────────────────────────────┤
|
|
1093
|
+
│ Episodic Memory │ ← Recent patterns, moderate retention
|
|
1094
|
+
│ Importance × retention score ranking │
|
|
1095
|
+
├─────────────────────────────────────────────┤
|
|
1096
|
+
│ Semantic Memory │ ← Consolidated knowledge, persistent
|
|
1097
|
+
│ Promoted from episodic via consolidation │
|
|
1098
|
+
└─────────────────────────────────────────────┘
|
|
943
1099
|
```
|
|
944
1100
|
|
|
945
1101
|
</details>
|
|
@@ -1014,18 +1170,18 @@ flowchart TB
|
|
|
1014
1170
|
|
|
1015
1171
|
## 🔌 Setup & Configuration
|
|
1016
1172
|
|
|
1017
|
-
Connect
|
|
1173
|
+
Connect Ruflo to your development environment.
|
|
1018
1174
|
|
|
1019
1175
|
<details>
|
|
1020
|
-
<summary>🔌 <strong>MCP Setup</strong> — Connect
|
|
1176
|
+
<summary>🔌 <strong>MCP Setup</strong> — Connect Ruflo to Any AI Environment</summary>
|
|
1021
1177
|
|
|
1022
|
-
|
|
1178
|
+
Ruflo runs as an MCP (Model Context Protocol) server, allowing you to connect it to any MCP-compatible AI client. This means you can use Ruflo's 60+ agents, swarm coordination, and self-learning capabilities from Claude Desktop, VS Code, Cursor, Windsurf, ChatGPT, and more.
|
|
1023
1179
|
|
|
1024
1180
|
### Quick Add Command
|
|
1025
1181
|
|
|
1026
1182
|
```bash
|
|
1027
|
-
# Start
|
|
1028
|
-
npx
|
|
1183
|
+
# Start Ruflo MCP server in any environment
|
|
1184
|
+
npx ruflo@v3alpha mcp start
|
|
1029
1185
|
```
|
|
1030
1186
|
|
|
1031
1187
|
<details open>
|
|
@@ -1040,9 +1196,9 @@ npx claude-flow@v3alpha mcp start
|
|
|
1040
1196
|
```json
|
|
1041
1197
|
{
|
|
1042
1198
|
"mcpServers": {
|
|
1043
|
-
"
|
|
1199
|
+
"ruflo": {
|
|
1044
1200
|
"command": "npx",
|
|
1045
|
-
"args": ["
|
|
1201
|
+
"args": ["ruflo@v3alpha", "mcp", "start"],
|
|
1046
1202
|
"env": {
|
|
1047
1203
|
"ANTHROPIC_API_KEY": "sk-ant-..."
|
|
1048
1204
|
}
|
|
@@ -1062,12 +1218,12 @@ Restart Claude Desktop after saving. Look for the MCP indicator (hammer icon) in
|
|
|
1062
1218
|
|
|
1063
1219
|
```bash
|
|
1064
1220
|
# Add via CLI (recommended)
|
|
1065
|
-
claude mcp add
|
|
1221
|
+
claude mcp add ruflo -- npx ruflo@v3alpha mcp start
|
|
1066
1222
|
|
|
1067
1223
|
# Or add with environment variables
|
|
1068
|
-
claude mcp add
|
|
1224
|
+
claude mcp add ruflo \
|
|
1069
1225
|
--env ANTHROPIC_API_KEY=sk-ant-... \
|
|
1070
|
-
-- npx
|
|
1226
|
+
-- npx ruflo@v3alpha mcp start
|
|
1071
1227
|
|
|
1072
1228
|
# Verify installation
|
|
1073
1229
|
claude mcp list
|
|
@@ -1094,9 +1250,9 @@ Create `.vscode/mcp.json` in your project:
|
|
|
1094
1250
|
```json
|
|
1095
1251
|
{
|
|
1096
1252
|
"mcpServers": {
|
|
1097
|
-
"
|
|
1253
|
+
"ruflo": {
|
|
1098
1254
|
"command": "npx",
|
|
1099
|
-
"args": ["
|
|
1255
|
+
"args": ["ruflo@v3alpha", "mcp", "start"],
|
|
1100
1256
|
"env": {
|
|
1101
1257
|
"ANTHROPIC_API_KEY": "sk-ant-..."
|
|
1102
1258
|
}
|
|
@@ -1121,9 +1277,9 @@ Create `.cursor/mcp.json` in your project (or global config):
|
|
|
1121
1277
|
```json
|
|
1122
1278
|
{
|
|
1123
1279
|
"mcpServers": {
|
|
1124
|
-
"
|
|
1280
|
+
"ruflo": {
|
|
1125
1281
|
"command": "npx",
|
|
1126
|
-
"args": ["
|
|
1282
|
+
"args": ["ruflo@v3alpha", "mcp", "start"],
|
|
1127
1283
|
"env": {
|
|
1128
1284
|
"ANTHROPIC_API_KEY": "sk-ant-..."
|
|
1129
1285
|
}
|
|
@@ -1148,9 +1304,9 @@ Create `.cursor/mcp.json` in your project (or global config):
|
|
|
1148
1304
|
```json
|
|
1149
1305
|
{
|
|
1150
1306
|
"mcpServers": {
|
|
1151
|
-
"
|
|
1307
|
+
"ruflo": {
|
|
1152
1308
|
"command": "npx",
|
|
1153
|
-
"args": ["
|
|
1309
|
+
"args": ["ruflo@v3alpha", "mcp", "start"],
|
|
1154
1310
|
"env": {
|
|
1155
1311
|
"ANTHROPIC_API_KEY": "sk-ant-..."
|
|
1156
1312
|
}
|
|
@@ -1177,11 +1333,11 @@ Click **Refresh** in the MCP settings to connect. Windsurf supports up to 100 MC
|
|
|
1177
1333
|
|
|
1178
1334
|
**Remote Server Setup:**
|
|
1179
1335
|
|
|
1180
|
-
For ChatGPT, you need a remote MCP server (not local stdio). Deploy
|
|
1336
|
+
For ChatGPT, you need a remote MCP server (not local stdio). Deploy ruflo to a server with HTTP transport:
|
|
1181
1337
|
|
|
1182
1338
|
```bash
|
|
1183
1339
|
# Start with HTTP transport
|
|
1184
|
-
npx
|
|
1340
|
+
npx ruflo@v3alpha mcp start --transport http --port 3000
|
|
1185
1341
|
```
|
|
1186
1342
|
|
|
1187
1343
|
Then add the server URL in ChatGPT Connectors settings.
|
|
@@ -1197,7 +1353,7 @@ Google AI Studio supports MCP natively since May 2025, with managed MCP servers
|
|
|
1197
1353
|
|
|
1198
1354
|
**Using MCP SuperAssistant Extension:**
|
|
1199
1355
|
1. Install [MCP SuperAssistant](https://chrome.google.com/webstore) Chrome extension
|
|
1200
|
-
2. Configure your
|
|
1356
|
+
2. Configure your ruflo MCP server
|
|
1201
1357
|
3. Use with Google AI Studio, Gemini, and other AI platforms
|
|
1202
1358
|
|
|
1203
1359
|
**Native SDK Integration:**
|
|
@@ -1210,9 +1366,9 @@ const ai = new GoogleGenAI({ apiKey: 'YOUR_API_KEY' });
|
|
|
1210
1366
|
// MCP definitions are natively supported in the Gen AI SDK
|
|
1211
1367
|
const mcpConfig = {
|
|
1212
1368
|
servers: [{
|
|
1213
|
-
name: '
|
|
1369
|
+
name: 'ruflo',
|
|
1214
1370
|
command: 'npx',
|
|
1215
|
-
args: ['
|
|
1371
|
+
args: ['ruflo@v3alpha', 'mcp', 'start']
|
|
1216
1372
|
}]
|
|
1217
1373
|
};
|
|
1218
1374
|
```
|
|
@@ -1233,9 +1389,9 @@ JetBrains AI Assistant supports MCP for IntelliJ IDEA, PyCharm, WebStorm, and ot
|
|
|
1233
1389
|
|
|
1234
1390
|
```json
|
|
1235
1391
|
{
|
|
1236
|
-
"name": "
|
|
1392
|
+
"name": "ruflo",
|
|
1237
1393
|
"command": "npx",
|
|
1238
|
-
"args": ["
|
|
1394
|
+
"args": ["ruflo@v3alpha", "mcp", "start"]
|
|
1239
1395
|
}
|
|
1240
1396
|
```
|
|
1241
1397
|
|
|
@@ -1465,16 +1621,86 @@ The Hive Mind system implements queen-led hierarchical coordination where strate
|
|
|
1465
1621
|
|
|
1466
1622
|
**CLI Commands:**
|
|
1467
1623
|
```bash
|
|
1468
|
-
npx
|
|
1469
|
-
npx
|
|
1470
|
-
npx
|
|
1471
|
-
npx
|
|
1472
|
-
npx
|
|
1473
|
-
npx
|
|
1474
|
-
npx
|
|
1624
|
+
npx ruflo hive-mind init # Initialize hive mind
|
|
1625
|
+
npx ruflo hive-mind spawn "Build API" # Spawn with objective
|
|
1626
|
+
npx ruflo hive-mind spawn "..." --queen-type strategic --consensus byzantine
|
|
1627
|
+
npx ruflo hive-mind status # Check status
|
|
1628
|
+
npx ruflo hive-mind metrics # Performance metrics
|
|
1629
|
+
npx ruflo hive-mind memory # Collective memory stats
|
|
1630
|
+
npx ruflo hive-mind sessions # List active sessions
|
|
1631
|
+
```
|
|
1632
|
+
|
|
1633
|
+
**Performance:** Fast batch spawning with parallel agent coordination
|
|
1634
|
+
|
|
1635
|
+
</details>
|
|
1636
|
+
|
|
1637
|
+
<details>
|
|
1638
|
+
<summary>👥 <strong>Agent Teams</strong> — Claude Code multi-instance coordination</summary>
|
|
1639
|
+
|
|
1640
|
+
Native integration with Claude Code's experimental Agent Teams feature for spawning and coordinating multiple Claude instances.
|
|
1641
|
+
|
|
1642
|
+
**Enable Agent Teams:**
|
|
1643
|
+
```bash
|
|
1644
|
+
# Automatically enabled with ruflo init
|
|
1645
|
+
npx ruflo@latest init
|
|
1646
|
+
|
|
1647
|
+
# Or manually add to .claude/settings.json
|
|
1648
|
+
{
|
|
1649
|
+
"env": {
|
|
1650
|
+
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
```
|
|
1654
|
+
|
|
1655
|
+
**Agent Teams Components:**
|
|
1656
|
+
|
|
1657
|
+
| Component | Tool | Purpose |
|
|
1658
|
+
|-----------|------|---------|
|
|
1659
|
+
| **Team Lead** | Main Claude | Coordinates teammates, assigns tasks, reviews results |
|
|
1660
|
+
| **Teammates** | `Task` tool | Sub-agents spawned to work on specific tasks |
|
|
1661
|
+
| **Task List** | `TaskCreate/TaskList/TaskUpdate` | Shared todos visible to all team members |
|
|
1662
|
+
| **Mailbox** | `SendMessage` | Inter-agent messaging for coordination |
|
|
1663
|
+
|
|
1664
|
+
**Quick Start:**
|
|
1665
|
+
```javascript
|
|
1666
|
+
// Create a team
|
|
1667
|
+
TeamCreate({ team_name: "feature-dev", description: "Building feature" })
|
|
1668
|
+
|
|
1669
|
+
// Create shared tasks
|
|
1670
|
+
TaskCreate({ subject: "Design API", description: "..." })
|
|
1671
|
+
TaskCreate({ subject: "Implement endpoints", description: "..." })
|
|
1672
|
+
|
|
1673
|
+
// Spawn teammates (parallel background work)
|
|
1674
|
+
Task({ prompt: "Work on task #1...", subagent_type: "architect",
|
|
1675
|
+
team_name: "feature-dev", name: "architect", run_in_background: true })
|
|
1676
|
+
Task({ prompt: "Work on task #2...", subagent_type: "coder",
|
|
1677
|
+
team_name: "feature-dev", name: "developer", run_in_background: true })
|
|
1678
|
+
|
|
1679
|
+
// Message teammates
|
|
1680
|
+
SendMessage({ type: "message", recipient: "developer",
|
|
1681
|
+
content: "Prioritize auth", summary: "Priority update" })
|
|
1682
|
+
|
|
1683
|
+
// Cleanup when done
|
|
1684
|
+
SendMessage({ type: "shutdown_request", recipient: "developer" })
|
|
1685
|
+
TeamDelete()
|
|
1686
|
+
```
|
|
1687
|
+
|
|
1688
|
+
**Agent Teams Hooks:**
|
|
1689
|
+
|
|
1690
|
+
| Hook | Trigger | Purpose |
|
|
1691
|
+
|------|---------|---------|
|
|
1692
|
+
| `teammate-idle` | Teammate finishes turn | Auto-assign pending tasks |
|
|
1693
|
+
| `task-completed` | Task marked complete | Train patterns, notify lead |
|
|
1694
|
+
|
|
1695
|
+
```bash
|
|
1696
|
+
# Handle idle teammate
|
|
1697
|
+
npx ruflo@latest hooks teammate-idle --auto-assign true
|
|
1698
|
+
|
|
1699
|
+
# Handle task completion
|
|
1700
|
+
npx ruflo@latest hooks task-completed --task-id <id> --train-patterns
|
|
1475
1701
|
```
|
|
1476
1702
|
|
|
1477
|
-
**
|
|
1703
|
+
**Display Modes:** `auto` (default), `in-process`, `tmux` (split-pane)
|
|
1478
1704
|
|
|
1479
1705
|
</details>
|
|
1480
1706
|
|
|
@@ -1490,7 +1716,7 @@ Full MCP server with tools for coordination, monitoring, memory, and GitHub inte
|
|
|
1490
1716
|
| **Memory & Neural** | `memory_usage`, `neural_status`, `neural_train`, `neural_patterns` | Memory operations and learning |
|
|
1491
1717
|
| **GitHub** | `github_swarm`, `repo_analyze`, `pr_enhance`, `issue_triage`, `code_review` | Repository integration |
|
|
1492
1718
|
| **Workers** | `worker/run`, `worker/status`, `worker/alerts`, `worker/history` | Background task management |
|
|
1493
|
-
| **Hooks** | `hooks/pre-*`, `hooks/post-*`, `hooks/route`, `hooks/session-*`, `hooks/
|
|
1719
|
+
| **Hooks** | `hooks/pre-*`, `hooks/post-*`, `hooks/route`, `hooks/session-*`, `hooks/teammate-*`, `hooks/task-*` | 33 lifecycle hooks |
|
|
1494
1720
|
| **Progress** | `progress/check`, `progress/sync`, `progress/summary`, `progress/watch` | V3 implementation tracking |
|
|
1495
1721
|
|
|
1496
1722
|
</details>
|
|
@@ -1548,14 +1774,14 @@ Build custom plugins with the fluent builder API. Create MCP tools, hooks, worke
|
|
|
1548
1774
|
|
|
1549
1775
|
### 📦 Available Optional Plugins
|
|
1550
1776
|
|
|
1551
|
-
Install these optional plugins to extend
|
|
1777
|
+
Install these optional plugins to extend Ruflo capabilities:
|
|
1552
1778
|
|
|
1553
1779
|
| Plugin | Version | Description | Install Command |
|
|
1554
1780
|
|--------|---------|-------------|-----------------|
|
|
1555
1781
|
| **@claude-flow/plugin-agentic-qe** | 3.0.0-alpha.2 | Quality Engineering with 58 AI agents across 12 DDD contexts. TDD, coverage analysis, security scanning, chaos engineering, accessibility testing. | `npm install @claude-flow/plugin-agentic-qe` |
|
|
1556
1782
|
| **@claude-flow/plugin-prime-radiant** | 0.1.4 | Mathematical AI interpretability with 6 engines: sheaf cohomology, spectral analysis, causal inference, quantum topology, category theory, HoTT proofs. | `npm install @claude-flow/plugin-prime-radiant` |
|
|
1557
|
-
| **@claude-flow/plugin-gastown-bridge** | 0.1.0 | Gas Town orchestrator integration with WASM-accelerated formula parsing (352x faster), Beads sync, convoy management, and graph analysis. 20 MCP tools. | `npx
|
|
1558
|
-
| **@claude-flow/teammate-plugin** | 1.0.0-alpha.1 | Native TeammateTool integration for Claude Code v2.1.19+. BMSSP WASM acceleration, rate limiting, circuit breaker, semantic routing. 21 MCP tools. | `npx
|
|
1783
|
+
| **@claude-flow/plugin-gastown-bridge** | 0.1.0 | Gas Town orchestrator integration with WASM-accelerated formula parsing (352x faster), Beads sync, convoy management, and graph analysis. 20 MCP tools. | `npx ruflo@latest plugins install -n @claude-flow/plugin-gastown-bridge` |
|
|
1784
|
+
| **@claude-flow/teammate-plugin** | 1.0.0-alpha.1 | Native TeammateTool integration for Claude Code v2.1.19+. BMSSP WASM acceleration, rate limiting, circuit breaker, semantic routing. 21 MCP tools. | `npx ruflo@latest plugins install -n @claude-flow/teammate-plugin` |
|
|
1559
1785
|
|
|
1560
1786
|
#### 🏥 Domain-Specific Plugins
|
|
1561
1787
|
|
|
@@ -1625,7 +1851,7 @@ npm install @claude-flow/plugin-agentic-qe
|
|
|
1625
1851
|
npm install @claude-flow/plugin-prime-radiant
|
|
1626
1852
|
|
|
1627
1853
|
# Install Gas Town Bridge plugin (WASM-accelerated orchestration)
|
|
1628
|
-
npx
|
|
1854
|
+
npx ruflo@latest plugins install -n @claude-flow/plugin-gastown-bridge
|
|
1629
1855
|
|
|
1630
1856
|
# Install domain-specific plugins
|
|
1631
1857
|
npm install @claude-flow/plugin-healthcare-clinical
|
|
@@ -1644,7 +1870,7 @@ npm install @claude-flow/plugin-quantum-optimizer
|
|
|
1644
1870
|
npm install @claude-flow/plugin-hyperbolic-reasoning
|
|
1645
1871
|
|
|
1646
1872
|
# List all installed plugins
|
|
1647
|
-
npx
|
|
1873
|
+
npx ruflo plugins list --installed
|
|
1648
1874
|
```
|
|
1649
1875
|
|
|
1650
1876
|
</details>
|
|
@@ -1813,8 +2039,8 @@ Workers run automatically based on context, or dispatch manually via MCP tools.
|
|
|
1813
2039
|
| **TestGaps** | `testgaps` | Test coverage analysis | Code changes without tests |
|
|
1814
2040
|
|
|
1815
2041
|
```bash
|
|
1816
|
-
npx
|
|
1817
|
-
npx
|
|
2042
|
+
npx ruflo@v3alpha worker dispatch --trigger audit --context "./src"
|
|
2043
|
+
npx ruflo@v3alpha worker status
|
|
1818
2044
|
```
|
|
1819
2045
|
|
|
1820
2046
|
</details>
|
|
@@ -1822,14 +2048,14 @@ npx claude-flow@v3alpha worker status
|
|
|
1822
2048
|
<details>
|
|
1823
2049
|
<summary>☁️ <strong>LLM Providers</strong> — 6 providers with automatic failover</summary>
|
|
1824
2050
|
|
|
1825
|
-
| Provider | Models
|
|
2051
|
+
| Provider | Models | Features | Cost |
|
|
1826
2052
|
|----------|--------|----------|------|
|
|
1827
|
-
| **Anthropic** | Claude Opus 4
|
|
1828
|
-
| **OpenAI** | GPT-
|
|
1829
|
-
| **Google** | Gemini
|
|
1830
|
-
| **xAI** | Grok
|
|
1831
|
-
| **Mistral** | Mistral Large
|
|
1832
|
-
| **Meta/Ollama** | Llama
|
|
2053
|
+
| **Anthropic** | Claude Opus 4, Claude Sonnet 4, Claude Haiku 3.5 | Native, streaming, tool calling, extended thinking | $1-15/1M tokens |
|
|
2054
|
+
| **OpenAI** | GPT-4o, o3-mini, o1 | 128K context, reasoning chains, function calling | $0.15-60/1M tokens |
|
|
2055
|
+
| **Google** | Gemini 2.0 Flash, Gemini 1.5 Pro | 1M+ context, multimodal, grounding | $0.075-7/1M tokens |
|
|
2056
|
+
| **xAI** | Grok 3, Grok 3 Mini | Real-time data, reasoning, large context | $2-10/1M tokens |
|
|
2057
|
+
| **Mistral** | Mistral Large 2, Codestral | Open-weight, efficient MoE architecture | $0.50-8/1M tokens |
|
|
2058
|
+
| **Meta/Ollama** | Llama 3.3, DeepSeek V3, Qwen 2.5 | Local, free, open-weight | Free |
|
|
1833
2059
|
|
|
1834
2060
|
<details>
|
|
1835
2061
|
<summary>⚖️ <strong>Provider Load Balancing</strong> — 4 strategies for optimal cost and performance</summary>
|
|
@@ -2038,7 +2264,7 @@ npx claude-flow@v3alpha worker status
|
|
|
2038
2264
|
| Feature | Description | Performance |
|
|
2039
2265
|
|---------|-------------|-------------|
|
|
2040
2266
|
| **Multi-Provider** | Agentic-Flow (ONNX), OpenAI, Transformers.js, Mock | 4 providers |
|
|
2041
|
-
| **Auto-Install** | `
|
|
2267
|
+
| **Auto-Install** | `ruflo embeddings init` or `createEmbeddingServiceAsync()` | Zero config |
|
|
2042
2268
|
| **75x Faster** | Agentic-flow ONNX SIMD vs Transformers.js | 3ms vs 230ms |
|
|
2043
2269
|
| **Hyperbolic Space** | Poincaré ball model for hierarchical data | Exponential capacity |
|
|
2044
2270
|
| **Dimensions** | 384 to 3072 configurable | Quality vs speed tradeoff |
|
|
@@ -2048,13 +2274,13 @@ npx claude-flow@v3alpha worker status
|
|
|
2048
2274
|
|
|
2049
2275
|
```bash
|
|
2050
2276
|
# Initialize ONNX embeddings with hyperbolic config
|
|
2051
|
-
|
|
2277
|
+
ruflo embeddings init
|
|
2052
2278
|
|
|
2053
2279
|
# Use larger model for higher quality
|
|
2054
|
-
|
|
2280
|
+
ruflo embeddings init --model all-mpnet-base-v2
|
|
2055
2281
|
|
|
2056
2282
|
# Semantic search
|
|
2057
|
-
|
|
2283
|
+
ruflo embeddings search -q "authentication patterns"
|
|
2058
2284
|
```
|
|
2059
2285
|
|
|
2060
2286
|
| Mode | Adaptation | Quality | Memory | Use Case |
|
|
@@ -2091,22 +2317,22 @@ claude-flow embeddings search -q "authentication patterns"
|
|
|
2091
2317
|
|
|
2092
2318
|
```bash
|
|
2093
2319
|
# Initialize RuVector in PostgreSQL
|
|
2094
|
-
|
|
2320
|
+
ruflo ruvector init --database mydb --user admin
|
|
2095
2321
|
|
|
2096
2322
|
# Check connection and schema status
|
|
2097
|
-
|
|
2323
|
+
ruflo ruvector status --verbose
|
|
2098
2324
|
|
|
2099
2325
|
# Run pending migrations
|
|
2100
|
-
|
|
2326
|
+
ruflo ruvector migrate --up
|
|
2101
2327
|
|
|
2102
2328
|
# Performance benchmark
|
|
2103
|
-
|
|
2329
|
+
ruflo ruvector benchmark --iterations 1000
|
|
2104
2330
|
|
|
2105
2331
|
# Optimize indices and vacuum
|
|
2106
|
-
|
|
2332
|
+
ruflo ruvector optimize --analyze
|
|
2107
2333
|
|
|
2108
2334
|
# Backup vector data
|
|
2109
|
-
|
|
2335
|
+
ruflo ruvector backup --output ./backup.sql
|
|
2110
2336
|
```
|
|
2111
2337
|
|
|
2112
2338
|
| Migration | Purpose | Features |
|
|
@@ -2138,15 +2364,15 @@ claude-flow ruvector backup --output ./backup.sql
|
|
|
2138
2364
|
|
|
2139
2365
|
**Quick Commands:**
|
|
2140
2366
|
```bash
|
|
2141
|
-
npx
|
|
2142
|
-
npx
|
|
2143
|
-
npx
|
|
2144
|
-
npx
|
|
2367
|
+
npx ruflo hive-mind init # Initialize
|
|
2368
|
+
npx ruflo hive-mind spawn "Build API" --queen-type tactical # Spawn swarm
|
|
2369
|
+
npx ruflo hive-mind spawn "Research AI" --consensus byzantine --claude
|
|
2370
|
+
npx ruflo hive-mind status # Check status
|
|
2145
2371
|
```
|
|
2146
2372
|
|
|
2147
|
-
**
|
|
2373
|
+
**Ruflo Skill:** `/hive-mind-advanced` — Full hive mind orchestration
|
|
2148
2374
|
|
|
2149
|
-
**Performance:**
|
|
2375
|
+
**Performance:** Fast batch spawning with token reduction via intelligent routing
|
|
2150
2376
|
|
|
2151
2377
|
</details>
|
|
2152
2378
|
|
|
@@ -2252,85 +2478,83 @@ npx claude-flow hive-mind status # Check status
|
|
|
2252
2478
|
<details>
|
|
2253
2479
|
<summary>📊 <strong>V3 Statusline</strong> — Real-time development status for Claude Code</summary>
|
|
2254
2480
|
|
|
2255
|
-
Real-time development status display
|
|
2481
|
+
Real-time development status display integrated directly into Claude Code's status bar. Shows DDD progress, swarm activity, security status, AgentDB metrics, and live session data (model, context usage, cost).
|
|
2482
|
+
|
|
2483
|
+
**How It Works:**
|
|
2484
|
+
|
|
2485
|
+
Claude Code pipes JSON session data via **stdin** to the statusline script after each assistant message (debounced ~300ms). The script reads this data and combines it with local project metrics to produce a single-line status output.
|
|
2256
2486
|
|
|
2257
2487
|
**Output Format:**
|
|
2258
2488
|
```
|
|
2259
|
-
▊
|
|
2260
|
-
|
|
2261
|
-
🏗️ DDD Domains [●●●●●] 5/5 ⚡ 1.0x → 2.49x-7.47x
|
|
2262
|
-
🤖 Swarm ◉ [58/15] 👥 0 🟢 CVE 3/3 💾 22282MB 📂 47% 🧠 10%
|
|
2263
|
-
🔧 Architecture DDD ● 98% │ Security ●CLEAN │ Memory ●AgentDB │ Integration ●
|
|
2489
|
+
▊ Ruflo V3 ● ruvnet │ ⎇ main │ Opus 4.6 | ●42% ctx | $0.15
|
|
2490
|
+
🏗️ DDD [●●●●○] 4/5 ⚡ HNSW 150x 🤖 ◉ [12/8] 👥 3 🟢 CVE 3/3 💾 512MB 🧠 15% 📦 AgentDB ●1.2K vectors
|
|
2264
2491
|
```
|
|
2265
2492
|
|
|
2266
|
-
| Indicator | Description |
|
|
2493
|
+
| Indicator | Description | Source |
|
|
2267
2494
|
|-----------|-------------|--------|
|
|
2268
|
-
| `▊
|
|
2269
|
-
| `● ruvnet` | GitHub user
|
|
2270
|
-
| `⎇
|
|
2271
|
-
| `Opus 4.
|
|
2272
|
-
| `
|
|
2273
|
-
|
|
|
2274
|
-
|
|
|
2275
|
-
| `
|
|
2276
|
-
|
|
|
2277
|
-
|
|
|
2278
|
-
|
|
|
2279
|
-
|
|
|
2280
|
-
|
|
|
2281
|
-
|
|
|
2282
|
-
|
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2495
|
+
| `▊ Ruflo V3` | Project header | Always shown |
|
|
2496
|
+
| `● ruvnet` | GitHub user | `gh api user` CLI |
|
|
2497
|
+
| `⎇ main` | Current git branch | `git branch --show-current` |
|
|
2498
|
+
| `Opus 4.6` | Claude model name | Stdin JSON `model.display_name` |
|
|
2499
|
+
| `●42% ctx` | Context window usage | Stdin JSON `context_window.used_percentage` |
|
|
2500
|
+
| `$0.15` | Session cost | Stdin JSON `cost.total_cost_usd` |
|
|
2501
|
+
| `[●●●●○]` | DDD domain progress bar | `.claude-flow/metrics/v3-progress.json` |
|
|
2502
|
+
| `⚡ HNSW 150x` | HNSW search speedup | AgentDB file stats |
|
|
2503
|
+
| `◉/○` | Swarm coordination status | Process detection |
|
|
2504
|
+
| `[12/8]` | Active agents / max agents | `ps aux` process count |
|
|
2505
|
+
| `👥 3` | Sub-agents spawned | Task tool agent count |
|
|
2506
|
+
| `🟢 CVE 3/3` | Security CVE remediation | `.claude-flow/security/audit-status.json` |
|
|
2507
|
+
| `💾 512MB` | Memory usage | Node.js process RSS |
|
|
2508
|
+
| `🧠 15%` | Intelligence score | Pattern count from AgentDB |
|
|
2509
|
+
| `📦 AgentDB ●1.2K` | AgentDB vector count | File size estimate (`size / 2KB`) |
|
|
2510
|
+
|
|
2511
|
+
**Setup (Automatic):**
|
|
2512
|
+
|
|
2513
|
+
Run `npx ruflo@alpha init` — this generates `.claude/settings.json` with the correct statusline config and creates the helper script at `.claude/helpers/statusline.cjs`.
|
|
2514
|
+
|
|
2515
|
+
The generated config uses a **fast local script** (no `npx` cold-start):
|
|
2516
|
+
```json
|
|
2517
|
+
{
|
|
2518
|
+
"statusLine": {
|
|
2519
|
+
"type": "command",
|
|
2520
|
+
"command": "node .claude/helpers/statusline.cjs"
|
|
2521
|
+
}
|
|
2522
|
+
}
|
|
2523
|
+
```
|
|
2293
2524
|
|
|
2294
|
-
|
|
2295
|
-
npx claude-flow@v3alpha hooks statusline --legacy
|
|
2525
|
+
> **Note:** Only `type`, `command`, and `padding` are valid statusLine fields. Do not add `refreshMs`, `enabled`, or other fields — Claude Code will ignore them.
|
|
2296
2526
|
|
|
2297
|
-
|
|
2298
|
-
npx claude-flow@v3alpha hooks statusline --json
|
|
2527
|
+
**For Existing Users:**
|
|
2299
2528
|
|
|
2300
|
-
|
|
2301
|
-
|
|
2529
|
+
If your statusline is not updating, run the upgrade command to regenerate helpers and fix the config:
|
|
2530
|
+
```bash
|
|
2531
|
+
npx ruflo@alpha init --update --settings
|
|
2302
2532
|
```
|
|
2303
2533
|
|
|
2304
|
-
|
|
2534
|
+
This removes invalid config fields and regenerates the statusline helper with stdin support.
|
|
2305
2535
|
|
|
2306
|
-
|
|
2536
|
+
**Stdin JSON Protocol:**
|
|
2307
2537
|
|
|
2308
|
-
|
|
2309
|
-
|--------|-------------|
|
|
2310
|
-
| (default) | Safe multi-line with collision zone avoidance |
|
|
2311
|
-
| `--single` | Single-line output (complete collision avoidance) |
|
|
2312
|
-
| `--legacy` | Original multi-line (may cause bleeding) |
|
|
2313
|
-
| `--json` | JSON output with pretty printing |
|
|
2314
|
-
| `--compact` | JSON output without formatting |
|
|
2315
|
-
|
|
2316
|
-
**Claude Code Integration:**
|
|
2317
|
-
|
|
2318
|
-
Add to `.claude/settings.json`:
|
|
2538
|
+
Claude Code provides session data via stdin in this format:
|
|
2319
2539
|
```json
|
|
2320
2540
|
{
|
|
2321
|
-
"
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
}
|
|
2541
|
+
"model": { "display_name": "Opus 4.6" },
|
|
2542
|
+
"context_window": { "used_percentage": 42, "remaining_percentage": 58 },
|
|
2543
|
+
"cost": { "total_cost_usd": 0.15, "total_duration_ms": 45000 },
|
|
2544
|
+
"workspace": { "current_dir": "/path/to/project" },
|
|
2545
|
+
"session_id": "abc-123"
|
|
2325
2546
|
}
|
|
2326
2547
|
```
|
|
2327
2548
|
|
|
2549
|
+
The statusline script reads stdin synchronously, falls back to local detection when run manually (TTY mode).
|
|
2550
|
+
|
|
2328
2551
|
**Data Sources:**
|
|
2329
|
-
-
|
|
2330
|
-
- `.claude-flow/metrics/
|
|
2331
|
-
- `.claude-flow/
|
|
2332
|
-
- `.claude-flow/
|
|
2333
|
-
-
|
|
2552
|
+
- **Stdin JSON** — Model name, context %, cost, duration (from Claude Code)
|
|
2553
|
+
- `.claude-flow/metrics/v3-progress.json` — DDD domain progress
|
|
2554
|
+
- `.claude-flow/metrics/swarm-activity.json` — Active agent counts
|
|
2555
|
+
- `.claude-flow/security/audit-status.json` — CVE remediation status
|
|
2556
|
+
- **AgentDB files** — Vector count (estimated from file size), HNSW index status
|
|
2557
|
+
- Process detection via `ps aux` — Real-time memory and agent counts
|
|
2334
2558
|
- Git branch via `git branch --show-current`
|
|
2335
2559
|
- GitHub user via `gh api user`
|
|
2336
2560
|
|
|
@@ -2354,19 +2578,19 @@ Cross-platform TypeScript-based daemon service with auto-scheduling:
|
|
|
2354
2578
|
**Commands:**
|
|
2355
2579
|
```bash
|
|
2356
2580
|
# Start daemon (auto-runs on SessionStart hooks)
|
|
2357
|
-
npx
|
|
2581
|
+
npx ruflo@v3alpha daemon start
|
|
2358
2582
|
|
|
2359
2583
|
# Check status with worker history
|
|
2360
|
-
npx
|
|
2584
|
+
npx ruflo@v3alpha daemon status
|
|
2361
2585
|
|
|
2362
2586
|
# Manually trigger a worker
|
|
2363
|
-
npx
|
|
2587
|
+
npx ruflo@v3alpha daemon trigger map
|
|
2364
2588
|
|
|
2365
2589
|
# Enable/disable workers
|
|
2366
|
-
npx
|
|
2590
|
+
npx ruflo@v3alpha daemon enable map audit optimize
|
|
2367
2591
|
|
|
2368
2592
|
# Stop daemon
|
|
2369
|
-
npx
|
|
2593
|
+
npx ruflo@v3alpha daemon stop
|
|
2370
2594
|
```
|
|
2371
2595
|
|
|
2372
2596
|
**Daemon Status Output:**
|
|
@@ -2440,7 +2664,7 @@ Shell-based daemons for monitoring (Linux/macOS only):
|
|
|
2440
2664
|
<details>
|
|
2441
2665
|
<summary>⌨️ <strong>V3 CLI Commands</strong> — 26 commands with 140+ subcommands</summary>
|
|
2442
2666
|
|
|
2443
|
-
Complete command-line interface for all
|
|
2667
|
+
Complete command-line interface for all Ruflo operations.
|
|
2444
2668
|
|
|
2445
2669
|
**Core Commands:**
|
|
2446
2670
|
|
|
@@ -2482,25 +2706,25 @@ Complete command-line interface for all Claude-Flow operations.
|
|
|
2482
2706
|
|
|
2483
2707
|
```bash
|
|
2484
2708
|
# Initialize project with wizard
|
|
2485
|
-
npx
|
|
2709
|
+
npx ruflo@v3alpha init --wizard
|
|
2486
2710
|
|
|
2487
2711
|
# Start daemon with background workers
|
|
2488
|
-
npx
|
|
2712
|
+
npx ruflo@v3alpha daemon start
|
|
2489
2713
|
|
|
2490
2714
|
# Spawn an agent with specific type
|
|
2491
|
-
npx
|
|
2715
|
+
npx ruflo@v3alpha agent spawn -t coder --name my-coder
|
|
2492
2716
|
|
|
2493
2717
|
# Initialize swarm with V3 mode
|
|
2494
|
-
npx
|
|
2718
|
+
npx ruflo@v3alpha swarm init --v3-mode
|
|
2495
2719
|
|
|
2496
2720
|
# Search memory (HNSW-indexed, 150x faster)
|
|
2497
|
-
npx
|
|
2721
|
+
npx ruflo@v3alpha memory search -q "authentication patterns"
|
|
2498
2722
|
|
|
2499
2723
|
# Run security scan
|
|
2500
|
-
npx
|
|
2724
|
+
npx ruflo@v3alpha security scan --depth full
|
|
2501
2725
|
|
|
2502
2726
|
# Performance benchmark
|
|
2503
|
-
npx
|
|
2727
|
+
npx ruflo@v3alpha performance benchmark --suite all
|
|
2504
2728
|
```
|
|
2505
2729
|
|
|
2506
2730
|
</details>
|
|
@@ -2508,7 +2732,7 @@ npx claude-flow@v3alpha performance benchmark --suite all
|
|
|
2508
2732
|
<details>
|
|
2509
2733
|
<summary>🩺 <strong>Doctor Health Checks</strong> — System diagnostics with auto-fix</summary>
|
|
2510
2734
|
|
|
2511
|
-
Run `npx
|
|
2735
|
+
Run `npx ruflo@v3alpha doctor` to diagnose and fix common issues.
|
|
2512
2736
|
|
|
2513
2737
|
**Health Checks Performed:**
|
|
2514
2738
|
|
|
@@ -2529,22 +2753,22 @@ Run `npx claude-flow@v3alpha doctor` to diagnose and fix common issues.
|
|
|
2529
2753
|
|
|
2530
2754
|
```bash
|
|
2531
2755
|
# Run full diagnostics
|
|
2532
|
-
npx
|
|
2756
|
+
npx ruflo@v3alpha doctor
|
|
2533
2757
|
|
|
2534
2758
|
# Run diagnostics with auto-fix
|
|
2535
|
-
npx
|
|
2759
|
+
npx ruflo@v3alpha doctor --fix
|
|
2536
2760
|
|
|
2537
2761
|
# Check specific component
|
|
2538
|
-
npx
|
|
2762
|
+
npx ruflo@v3alpha doctor --component memory
|
|
2539
2763
|
|
|
2540
2764
|
# Verbose output
|
|
2541
|
-
npx
|
|
2765
|
+
npx ruflo@v3alpha doctor --verbose
|
|
2542
2766
|
```
|
|
2543
2767
|
|
|
2544
2768
|
**Output Example:**
|
|
2545
2769
|
|
|
2546
2770
|
```
|
|
2547
|
-
🩺
|
|
2771
|
+
🩺 Ruflo Doctor v3.0.0-alpha
|
|
2548
2772
|
|
|
2549
2773
|
✅ Node.js 20.11.0 (required: 20+)
|
|
2550
2774
|
✅ npm 10.2.4 (required: 9+)
|
|
@@ -2588,16 +2812,16 @@ The embeddings package (v3.0.0-alpha.12) provides high-performance vector embedd
|
|
|
2588
2812
|
|
|
2589
2813
|
```bash
|
|
2590
2814
|
# Initialize embeddings system
|
|
2591
|
-
npx
|
|
2815
|
+
npx ruflo@v3alpha embeddings init
|
|
2592
2816
|
|
|
2593
2817
|
# Generate embedding for text
|
|
2594
|
-
npx
|
|
2818
|
+
npx ruflo@v3alpha embeddings embed "authentication patterns"
|
|
2595
2819
|
|
|
2596
2820
|
# Batch embed multiple texts
|
|
2597
|
-
npx
|
|
2821
|
+
npx ruflo@v3alpha embeddings batch --file texts.txt
|
|
2598
2822
|
|
|
2599
2823
|
# Search with semantic similarity
|
|
2600
|
-
npx
|
|
2824
|
+
npx ruflo@v3alpha embeddings search "login flow" --top-k 5
|
|
2601
2825
|
```
|
|
2602
2826
|
|
|
2603
2827
|
**Programmatic:**
|
|
@@ -2634,59 +2858,173 @@ Real-world scenarios and pre-built workflows for common tasks.
|
|
|
2634
2858
|
|
|
2635
2859
|
| Scenario | What It Solves | How To Do It |
|
|
2636
2860
|
|----------|----------------|--------------|
|
|
2637
|
-
| **Code Review** | Get thorough reviews with security, performance, and style checks | `npx
|
|
2638
|
-
| **Test Generation** | Auto-generate unit, integration, and e2e tests for existing code | `npx
|
|
2639
|
-
| **Refactoring** | Safely restructure code while maintaining behavior | `npx
|
|
2640
|
-
| **Bug Fixing** | Diagnose and fix bugs with full context analysis | `npx
|
|
2861
|
+
| **Code Review** | Get thorough reviews with security, performance, and style checks | `npx ruflo@v3alpha --agent reviewer --task "Review PR #123"` |
|
|
2862
|
+
| **Test Generation** | Auto-generate unit, integration, and e2e tests for existing code | `npx ruflo@v3alpha --agent tester --task "Write tests for auth module"` |
|
|
2863
|
+
| **Refactoring** | Safely restructure code while maintaining behavior | `npx ruflo@v3alpha --agent coder --task "Refactor user service to use repository pattern"` |
|
|
2864
|
+
| **Bug Fixing** | Diagnose and fix bugs with full context analysis | `npx ruflo@v3alpha --agent coder --task "Fix race condition in checkout flow"` |
|
|
2641
2865
|
|
|
2642
2866
|
### 🔒 Security & Compliance
|
|
2643
2867
|
|
|
2644
2868
|
| Scenario | What It Solves | How To Do It |
|
|
2645
2869
|
|----------|----------------|--------------|
|
|
2646
|
-
| **Security Audit** | Find vulnerabilities before attackers do | `npx
|
|
2647
|
-
| **Dependency Scan** | Identify vulnerable packages and suggest upgrades | `npx
|
|
2648
|
-
| **Compliance Check** | Ensure code meets security standards | `npx
|
|
2870
|
+
| **Security Audit** | Find vulnerabilities before attackers do | `npx ruflo@v3alpha --agent security-architect --task "Audit for OWASP Top 10"` |
|
|
2871
|
+
| **Dependency Scan** | Identify vulnerable packages and suggest upgrades | `npx ruflo@v3alpha security scan --depth full` |
|
|
2872
|
+
| **Compliance Check** | Ensure code meets security standards | `npx ruflo@v3alpha --agent security-architect --task "Check PCI-DSS compliance"` |
|
|
2649
2873
|
|
|
2650
2874
|
### 🐝 Multi-Agent Swarms
|
|
2651
2875
|
|
|
2652
2876
|
| Scenario | What It Solves | How To Do It |
|
|
2653
2877
|
|----------|----------------|--------------|
|
|
2654
|
-
| **Feature Development** | Coordinate multiple agents on complex features | `npx
|
|
2655
|
-
| **Large Refactors** | Parallel refactoring across many files without conflicts | `npx
|
|
2656
|
-
| **Codebase Migration** | Migrate frameworks, languages, or patterns systematically | `npx
|
|
2878
|
+
| **Feature Development** | Coordinate multiple agents on complex features | `npx ruflo@v3alpha swarm init --topology hierarchical && npx ruflo@v3alpha task orchestrate "Build user dashboard"` |
|
|
2879
|
+
| **Large Refactors** | Parallel refactoring across many files without conflicts | `npx ruflo@v3alpha swarm init --topology mesh --max-agents 8` |
|
|
2880
|
+
| **Codebase Migration** | Migrate frameworks, languages, or patterns systematically | `npx ruflo@v3alpha task orchestrate "Migrate from Express to Fastify" --strategy adaptive` |
|
|
2657
2881
|
|
|
2658
2882
|
### 📊 Performance & Optimization
|
|
2659
2883
|
|
|
2660
2884
|
| Scenario | What It Solves | How To Do It |
|
|
2661
2885
|
|----------|----------------|--------------|
|
|
2662
|
-
| **Performance Profiling** | Find and fix bottlenecks in your application | `npx
|
|
2663
|
-
| **Query Optimization** | Speed up slow database queries | `npx
|
|
2664
|
-
| **Memory Analysis** | Reduce memory usage and fix leaks | `npx
|
|
2886
|
+
| **Performance Profiling** | Find and fix bottlenecks in your application | `npx ruflo@v3alpha --agent perf-analyzer --task "Profile API endpoints"` |
|
|
2887
|
+
| **Query Optimization** | Speed up slow database queries | `npx ruflo@v3alpha hooks route "Optimize database queries"` |
|
|
2888
|
+
| **Memory Analysis** | Reduce memory usage and fix leaks | `npx ruflo@v3alpha --agent perf-analyzer --task "Analyze memory usage patterns"` |
|
|
2665
2889
|
|
|
2666
2890
|
### 🔄 GitHub & DevOps
|
|
2667
2891
|
|
|
2668
2892
|
| Scenario | What It Solves | How To Do It |
|
|
2669
2893
|
|----------|----------------|--------------|
|
|
2670
|
-
| **PR Management** | Review, approve, and merge PRs efficiently | `npx
|
|
2671
|
-
| **Issue Triage** | Categorize, prioritize, and assign issues automatically | `npx
|
|
2672
|
-
| **Release Management** | Coordinate releases with changelogs and versioning | `npx
|
|
2673
|
-
| **CI/CD Optimization** | Speed up pipelines and reduce flaky tests | `npx
|
|
2894
|
+
| **PR Management** | Review, approve, and merge PRs efficiently | `npx ruflo@v3alpha --agent pr-manager --task "Review open PRs"` |
|
|
2895
|
+
| **Issue Triage** | Categorize, prioritize, and assign issues automatically | `npx ruflo@v3alpha --agent issue-tracker --task "Triage new issues"` |
|
|
2896
|
+
| **Release Management** | Coordinate releases with changelogs and versioning | `npx ruflo@v3alpha --agent release-manager --task "Prepare v2.0 release"` |
|
|
2897
|
+
| **CI/CD Optimization** | Speed up pipelines and reduce flaky tests | `npx ruflo@v3alpha --agent cicd-engineer --task "Optimize GitHub Actions workflow"` |
|
|
2674
2898
|
|
|
2675
2899
|
### 📋 Spec-Driven Development
|
|
2676
2900
|
|
|
2677
2901
|
| Scenario | What It Solves | How To Do It |
|
|
2678
2902
|
|----------|----------------|--------------|
|
|
2679
|
-
| **Generate Specs** | Create complete specifications before coding | `npx
|
|
2680
|
-
| **Validate Implementation** | Ensure code matches specifications | `npx
|
|
2681
|
-
| **Track Compliance** | Monitor spec adherence across the team | `npx
|
|
2903
|
+
| **Generate Specs** | Create complete specifications before coding | `npx ruflo@v3alpha --agent architect --task "Create ADR for authentication system"` |
|
|
2904
|
+
| **Validate Implementation** | Ensure code matches specifications | `npx ruflo@v3alpha hooks progress --detailed` |
|
|
2905
|
+
| **Track Compliance** | Monitor spec adherence across the team | `npx ruflo@v3alpha progress sync` |
|
|
2682
2906
|
|
|
2683
2907
|
### 🧠 Learning & Intelligence
|
|
2684
2908
|
|
|
2685
2909
|
| Scenario | What It Solves | How To Do It |
|
|
2686
2910
|
|----------|----------------|--------------|
|
|
2687
|
-
| **Bootstrap Intelligence** | Train the system on your codebase patterns | `npx
|
|
2688
|
-
| **Optimize Routing** | Improve task-to-agent matching over time | `npx
|
|
2689
|
-
| **Transfer Learning** | Apply patterns learned from other projects | `npx
|
|
2911
|
+
| **Bootstrap Intelligence** | Train the system on your codebase patterns | `npx ruflo@v3alpha hooks pretrain --depth deep` |
|
|
2912
|
+
| **Optimize Routing** | Improve task-to-agent matching over time | `npx ruflo@v3alpha hooks route "<task>" --include-explanation` |
|
|
2913
|
+
| **Transfer Learning** | Apply patterns learned from other projects | `npx ruflo@v3alpha hooks transfer <sourceProject>` |
|
|
2914
|
+
|
|
2915
|
+
</details>
|
|
2916
|
+
|
|
2917
|
+
---
|
|
2918
|
+
|
|
2919
|
+
## 🧠 Infinite Context & Memory Optimization
|
|
2920
|
+
|
|
2921
|
+
Ruflo eliminates Claude Code's context window ceiling with a real-time memory management system that archives, optimizes, and restores conversation context automatically.
|
|
2922
|
+
|
|
2923
|
+
<details>
|
|
2924
|
+
<summary>♾️ <strong>Context Autopilot</strong> — Never lose context to compaction again</summary>
|
|
2925
|
+
|
|
2926
|
+
### The Problem
|
|
2927
|
+
|
|
2928
|
+
Claude Code has a finite context window (~200K tokens). When full, it **compacts** — summarizing the conversation and discarding details like exact file paths, tool outputs, decision reasoning, and code snippets. This creates a "context cliff" where Claude loses the ability to reference earlier work.
|
|
2929
|
+
|
|
2930
|
+
### The Solution: Context Autopilot (ADR-051)
|
|
2931
|
+
|
|
2932
|
+
Ruflo intercepts the compaction lifecycle with three hooks that make context loss invisible:
|
|
2933
|
+
|
|
2934
|
+
```
|
|
2935
|
+
Every Prompt Context Full After Compact
|
|
2936
|
+
│ │ │
|
|
2937
|
+
▼ ▼ ▼
|
|
2938
|
+
UserPromptSubmit PreCompact SessionStart
|
|
2939
|
+
│ │ │
|
|
2940
|
+
Archive turns Archive + BLOCK Restore from archive
|
|
2941
|
+
to SQLite auto-compaction via additionalContext
|
|
2942
|
+
(incremental) (exit code 2) (importance-ranked)
|
|
2943
|
+
│ │ │
|
|
2944
|
+
▼ ▼ ▼
|
|
2945
|
+
Track tokens Manual /compact Seamless continuation
|
|
2946
|
+
Report % used still allowed with full history
|
|
2947
|
+
```
|
|
2948
|
+
|
|
2949
|
+
### How Memory is Optimized
|
|
2950
|
+
|
|
2951
|
+
| Layer | What It Does | When |
|
|
2952
|
+
|-------|-------------|------|
|
|
2953
|
+
| **Proactive Archiving** | Every user prompt archives new turns to SQLite with SHA-256 dedup | Every prompt |
|
|
2954
|
+
| **Token Tracking** | Reads actual API `usage` data (input + cache tokens) for accurate % | Every prompt |
|
|
2955
|
+
| **Compaction Blocking** | PreCompact hook returns exit code 2 to cancel auto-compaction | When context fills |
|
|
2956
|
+
| **Manual Compact** | `/compact` is allowed — archives first, resets autopilot, then compresses | On user request |
|
|
2957
|
+
| **Importance Ranking** | Entries scored by `recency × frequency × richness` for smart retrieval | On restore |
|
|
2958
|
+
| **Access Tracking** | Restored entries get access_count++ creating a relevance feedback loop | On restore |
|
|
2959
|
+
| **Auto-Pruning** | Never-accessed entries older than 30 days are automatically removed | On PreCompact |
|
|
2960
|
+
| **Content Compaction** | Old session entries trimmed to summaries, reducing archive storage | Manual or scheduled |
|
|
2961
|
+
| **RuVector Sync** | SQLite entries auto-replicated to PostgreSQL when configured | On PreCompact |
|
|
2962
|
+
|
|
2963
|
+
### Optimization Thresholds
|
|
2964
|
+
|
|
2965
|
+
| Zone | Threshold | Statusline | Action |
|
|
2966
|
+
|------|-----------|-----------|--------|
|
|
2967
|
+
| OK | <70% | `🛡️ 43% 86.7K ⊘` (green) | Normal operation, track growth trend |
|
|
2968
|
+
| Warning | 70-85% | `🛡️ 72% 144K ⊘` (yellow) | Flag approaching limit, archive aggressively |
|
|
2969
|
+
| Optimize | 85%+ | `🛡️ 88% 176K ⟳2` (red) | Prune stale entries, keep responses concise |
|
|
2970
|
+
|
|
2971
|
+
### Real-Time Statusline
|
|
2972
|
+
|
|
2973
|
+
The statusline shows live context metrics read from `autopilot-state.json`:
|
|
2974
|
+
|
|
2975
|
+
```
|
|
2976
|
+
🛡️ 45% 89.2K ⊘ 🧠 86%
|
|
2977
|
+
│ │ │ │ │ │
|
|
2978
|
+
│ │ │ │ │ └─ Intelligence score (learning.json + patterns + archive)
|
|
2979
|
+
│ │ │ │ └──── Intelligence indicator
|
|
2980
|
+
│ │ │ └───────── No prune cycles (⊘) or prune count (⟳N)
|
|
2981
|
+
│ │ └─────────────── Token count (actual API usage)
|
|
2982
|
+
│ └─────────────────── Context percentage used
|
|
2983
|
+
└──────────────────────── Autopilot active (shield icon)
|
|
2984
|
+
```
|
|
2985
|
+
|
|
2986
|
+
### Storage Tiers
|
|
2987
|
+
|
|
2988
|
+
| Tier | Backend | Storage | Features |
|
|
2989
|
+
|------|---------|---------|----------|
|
|
2990
|
+
| 1 | **SQLite** (default) | `.claude-flow/data/transcript-archive.db` | WAL mode, indexed queries, ACID, importance ranking |
|
|
2991
|
+
| 2 | **RuVector PostgreSQL** | Configurable remote | TB-scale, pgvector embeddings, GNN search |
|
|
2992
|
+
| 3 | **AgentDB + HNSW** | In-memory + persist | 150x-12,500x faster semantic search |
|
|
2993
|
+
| 4 | **JSON** (fallback) | `.claude-flow/data/transcript-archive.json` | Zero dependencies, always works |
|
|
2994
|
+
|
|
2995
|
+
### Configuration
|
|
2996
|
+
|
|
2997
|
+
```bash
|
|
2998
|
+
# Context Autopilot (all have sensible defaults)
|
|
2999
|
+
CLAUDE_FLOW_CONTEXT_AUTOPILOT=true # Enable/disable autopilot (default: true)
|
|
3000
|
+
CLAUDE_FLOW_CONTEXT_WINDOW=200000 # Context window size in tokens
|
|
3001
|
+
CLAUDE_FLOW_AUTOPILOT_WARN=0.70 # Warning threshold (70%)
|
|
3002
|
+
CLAUDE_FLOW_AUTOPILOT_PRUNE=0.85 # Optimization threshold (85%)
|
|
3003
|
+
CLAUDE_FLOW_COMPACT_RESTORE_BUDGET=4000 # Max chars restored after compaction
|
|
3004
|
+
CLAUDE_FLOW_RETENTION_DAYS=30 # Auto-prune never-accessed entries
|
|
3005
|
+
CLAUDE_FLOW_AUTO_OPTIMIZE=true # Importance ranking + pruning + sync
|
|
3006
|
+
```
|
|
3007
|
+
|
|
3008
|
+
### Commands
|
|
3009
|
+
|
|
3010
|
+
```bash
|
|
3011
|
+
# Check archive status and autopilot state
|
|
3012
|
+
node .claude/helpers/context-persistence-hook.mjs status
|
|
3013
|
+
|
|
3014
|
+
# Manual compact (archives first, then allows Claude Code to compress)
|
|
3015
|
+
# Use /compact in Claude Code — autopilot allows manual, blocks auto
|
|
3016
|
+
|
|
3017
|
+
# Query archive directly
|
|
3018
|
+
sqlite3 .claude-flow/data/transcript-archive.db \
|
|
3019
|
+
"SELECT COUNT(*), SUM(LENGTH(content)) FROM transcript_entries;"
|
|
3020
|
+
```
|
|
3021
|
+
|
|
3022
|
+
### Architecture Reference
|
|
3023
|
+
|
|
3024
|
+
- **ADR-051**: Infinite Context via Compaction-to-Memory Bridge
|
|
3025
|
+
- **ADR-052**: Statusline Observability System
|
|
3026
|
+
- **Implementation**: `.claude/helpers/context-persistence-hook.mjs` (~1560 lines)
|
|
3027
|
+
- **Settings**: `.claude/settings.json` (PreCompact, SessionStart, UserPromptSubmit hooks)
|
|
2690
3028
|
|
|
2691
3029
|
</details>
|
|
2692
3030
|
|
|
@@ -2744,7 +3082,7 @@ When hooks run, they emit signals that guide routing decisions. Watch for these
|
|
|
2744
3082
|
|
|
2745
3083
|
**Example Hook Output:**
|
|
2746
3084
|
```bash
|
|
2747
|
-
$ npx
|
|
3085
|
+
$ npx ruflo@v3alpha hooks pre-task --description "convert var to const in utils.ts"
|
|
2748
3086
|
|
|
2749
3087
|
[AGENT_BOOSTER_AVAILABLE] Intent: var-to-const
|
|
2750
3088
|
Recommendation: Use Edit tool directly
|
|
@@ -2752,6 +3090,101 @@ Performance: <1ms (352x faster than LLM)
|
|
|
2752
3090
|
Cost: $0
|
|
2753
3091
|
```
|
|
2754
3092
|
|
|
3093
|
+
### Intelligence Loop (ADR-050)
|
|
3094
|
+
|
|
3095
|
+
The intelligence loop wires PageRank-ranked memory into the hook system. Every session builds a knowledge graph that improves over time:
|
|
3096
|
+
|
|
3097
|
+
```
|
|
3098
|
+
SessionStart:
|
|
3099
|
+
session-restore → intelligence.init()
|
|
3100
|
+
→ Read MEMORY.md / auto-memory-store.json
|
|
3101
|
+
→ Build graph (nodes + similarity/temporal edges)
|
|
3102
|
+
→ Compute PageRank
|
|
3103
|
+
→ "[INTELLIGENCE] Loaded 13 patterns, 12 edges"
|
|
3104
|
+
|
|
3105
|
+
UserPrompt:
|
|
3106
|
+
route → intelligence.getContext(prompt)
|
|
3107
|
+
→ Jaccard-match prompt against pre-ranked entries
|
|
3108
|
+
→ Inject top-5 patterns into Claude's context:
|
|
3109
|
+
|
|
3110
|
+
[INTELLIGENCE] Relevant patterns for this task:
|
|
3111
|
+
* (0.95) HNSW gives 150x-12,500x speedup [rank #1, 12x accessed]
|
|
3112
|
+
* (0.88) London School TDD preferred [rank #3, 8x accessed]
|
|
3113
|
+
|
|
3114
|
+
PostEdit:
|
|
3115
|
+
post-edit → intelligence.recordEdit(file)
|
|
3116
|
+
→ Append to pending-insights.jsonl (<2ms)
|
|
3117
|
+
|
|
3118
|
+
SessionEnd:
|
|
3119
|
+
session-end → intelligence.consolidate()
|
|
3120
|
+
→ Process pending insights (3+ edits → new entry)
|
|
3121
|
+
→ Confidence boost for accessed patterns (+0.03)
|
|
3122
|
+
→ Confidence decay for unused patterns (-0.005/day)
|
|
3123
|
+
→ Recompute PageRank, rebuild edges
|
|
3124
|
+
→ Save snapshot for trend tracking
|
|
3125
|
+
```
|
|
3126
|
+
|
|
3127
|
+
**Measuring improvement:**
|
|
3128
|
+
|
|
3129
|
+
```bash
|
|
3130
|
+
# Human-readable diagnostics
|
|
3131
|
+
node .claude/helpers/hook-handler.cjs stats
|
|
3132
|
+
|
|
3133
|
+
# JSON output for scripting
|
|
3134
|
+
node .claude/helpers/hook-handler.cjs stats --json
|
|
3135
|
+
|
|
3136
|
+
# Or via intelligence.cjs directly
|
|
3137
|
+
node .claude/helpers/intelligence.cjs stats
|
|
3138
|
+
```
|
|
3139
|
+
|
|
3140
|
+
The stats command shows:
|
|
3141
|
+
|
|
3142
|
+
| Section | What It Tells You |
|
|
3143
|
+
|---------|-------------------|
|
|
3144
|
+
| **Graph** | Node/edge count, density % |
|
|
3145
|
+
| **Confidence** | Min/max/mean/median across all patterns |
|
|
3146
|
+
| **Access** | Total accesses, patterns used vs never accessed |
|
|
3147
|
+
| **PageRank** | Sum (~1.0), highest-ranked node |
|
|
3148
|
+
| **Top Patterns** | Top 10 by composite score with access counts |
|
|
3149
|
+
| **Last Delta** | Changes since previous session (confidence shift, access delta) |
|
|
3150
|
+
| **Trend** | Over all sessions: IMPROVING / DECLINING / STABLE |
|
|
3151
|
+
|
|
3152
|
+
**Example output:**
|
|
3153
|
+
```
|
|
3154
|
+
+--------------------------------------------------------------+
|
|
3155
|
+
| Intelligence Diagnostics (ADR-050) |
|
|
3156
|
+
+--------------------------------------------------------------+
|
|
3157
|
+
|
|
3158
|
+
Graph
|
|
3159
|
+
Nodes: 9
|
|
3160
|
+
Edges: 8 (7 temporal, 1 similar)
|
|
3161
|
+
Density: 22.2%
|
|
3162
|
+
|
|
3163
|
+
Confidence
|
|
3164
|
+
Min: 0.490 Max: 0.600
|
|
3165
|
+
Mean: 0.556 Median: 0.580
|
|
3166
|
+
|
|
3167
|
+
Access
|
|
3168
|
+
Total accesses: 11
|
|
3169
|
+
Patterns used: 6/9
|
|
3170
|
+
Never accessed: 3
|
|
3171
|
+
|
|
3172
|
+
Top Patterns (by composite score)
|
|
3173
|
+
#1 HNSW gives 150x-12,500x speedup
|
|
3174
|
+
conf=0.600 pr=0.2099 score=0.3659 accessed=2x
|
|
3175
|
+
#2 London School TDD preferred
|
|
3176
|
+
conf=0.600 pr=0.1995 score=0.3597 accessed=2x
|
|
3177
|
+
|
|
3178
|
+
Last Delta (5m ago)
|
|
3179
|
+
Confidence: +0.0300
|
|
3180
|
+
Accesses: +6
|
|
3181
|
+
|
|
3182
|
+
Trend (3 snapshots)
|
|
3183
|
+
Confidence drift: +0.0422
|
|
3184
|
+
Direction: IMPROVING
|
|
3185
|
+
+--------------------------------------------------------------+
|
|
3186
|
+
```
|
|
3187
|
+
|
|
2755
3188
|
### All 27 Hooks by Category
|
|
2756
3189
|
|
|
2757
3190
|
#### 🔧 Tool Lifecycle Hooks (6 hooks)
|
|
@@ -2767,8 +3200,8 @@ Cost: $0
|
|
|
2767
3200
|
|
|
2768
3201
|
```bash
|
|
2769
3202
|
# Example: Edit with pattern learning
|
|
2770
|
-
npx
|
|
2771
|
-
npx
|
|
3203
|
+
npx ruflo@v3alpha hooks pre-edit ./src/auth.ts
|
|
3204
|
+
npx ruflo@v3alpha hooks post-edit ./src/auth.ts --success true --train-patterns
|
|
2772
3205
|
```
|
|
2773
3206
|
|
|
2774
3207
|
#### 🧠 Intelligence & Routing Hooks (8 hooks)
|
|
@@ -2786,10 +3219,10 @@ npx claude-flow@v3alpha hooks post-edit ./src/auth.ts --success true --train-pat
|
|
|
2786
3219
|
|
|
2787
3220
|
```bash
|
|
2788
3221
|
# Route a task with explanation
|
|
2789
|
-
npx
|
|
3222
|
+
npx ruflo@v3alpha hooks route "refactor authentication to use JWT" --include-explanation
|
|
2790
3223
|
|
|
2791
3224
|
# Bootstrap intelligence from your codebase
|
|
2792
|
-
npx
|
|
3225
|
+
npx ruflo@v3alpha hooks pretrain --depth deep --model-type moe
|
|
2793
3226
|
```
|
|
2794
3227
|
|
|
2795
3228
|
#### 📅 Session Management Hooks (4 hooks)
|
|
@@ -2803,10 +3236,10 @@ npx claude-flow@v3alpha hooks pretrain --depth deep --model-type moe
|
|
|
2803
3236
|
|
|
2804
3237
|
```bash
|
|
2805
3238
|
# Start session with auto-daemon
|
|
2806
|
-
npx
|
|
3239
|
+
npx ruflo@v3alpha hooks session-start --session-id "feature-auth" --start-daemon
|
|
2807
3240
|
|
|
2808
3241
|
# End session and export learnings
|
|
2809
|
-
npx
|
|
3242
|
+
npx ruflo@v3alpha hooks session-end --export-metrics --persist-patterns
|
|
2810
3243
|
```
|
|
2811
3244
|
|
|
2812
3245
|
#### 🤖 Intelligence System Hooks (9 hooks)
|
|
@@ -2820,18 +3253,22 @@ npx claude-flow@v3alpha hooks session-end --export-metrics --persist-patterns
|
|
|
2820
3253
|
| `trajectory-end` | RL | Finish recording, trigger learning |
|
|
2821
3254
|
| `pattern-store` | Memory | Store a pattern with HNSW indexing |
|
|
2822
3255
|
| `pattern-search` | Memory | Find similar patterns (150x faster) |
|
|
2823
|
-
| `stats` | Analytics |
|
|
3256
|
+
| `stats` | Analytics | Intelligence diagnostics, confidence trends, improvement tracking |
|
|
2824
3257
|
| `attention` | Focus | Compute attention-weighted similarity |
|
|
2825
3258
|
|
|
2826
3259
|
```bash
|
|
2827
3260
|
# Start trajectory for complex task
|
|
2828
|
-
npx
|
|
3261
|
+
npx ruflo@v3alpha hooks intelligence trajectory-start --task "implement OAuth2"
|
|
2829
3262
|
|
|
2830
3263
|
# Record successful action
|
|
2831
|
-
npx
|
|
3264
|
+
npx ruflo@v3alpha hooks intelligence trajectory-step --action "created token service" --quality 0.9
|
|
2832
3265
|
|
|
2833
3266
|
# End trajectory and trigger learning
|
|
2834
|
-
npx
|
|
3267
|
+
npx ruflo@v3alpha hooks intelligence trajectory-end --success true
|
|
3268
|
+
|
|
3269
|
+
# View intelligence diagnostics and improvement trends (ADR-050)
|
|
3270
|
+
node .claude/helpers/hook-handler.cjs stats
|
|
3271
|
+
node .claude/helpers/intelligence.cjs stats --json
|
|
2835
3272
|
```
|
|
2836
3273
|
|
|
2837
3274
|
### 12 Background Workers (Auto-Triggered)
|
|
@@ -2855,13 +3292,13 @@ Workers run automatically based on context, or dispatch manually.
|
|
|
2855
3292
|
|
|
2856
3293
|
```bash
|
|
2857
3294
|
# List all workers
|
|
2858
|
-
npx
|
|
3295
|
+
npx ruflo@v3alpha hooks worker list
|
|
2859
3296
|
|
|
2860
3297
|
# Manually dispatch security audit
|
|
2861
|
-
npx
|
|
3298
|
+
npx ruflo@v3alpha hooks worker dispatch --trigger audit --context "./src/auth"
|
|
2862
3299
|
|
|
2863
3300
|
# Check worker status
|
|
2864
|
-
npx
|
|
3301
|
+
npx ruflo@v3alpha hooks worker status
|
|
2865
3302
|
```
|
|
2866
3303
|
|
|
2867
3304
|
### Model Routing Hooks (3 hooks)
|
|
@@ -2876,10 +3313,10 @@ Automatically selects haiku/sonnet/opus based on task complexity.
|
|
|
2876
3313
|
|
|
2877
3314
|
```bash
|
|
2878
3315
|
# Get model recommendation
|
|
2879
|
-
npx
|
|
3316
|
+
npx ruflo@v3alpha hooks model-route --task "fix typo in README"
|
|
2880
3317
|
# → Recommends: haiku (simple task, low complexity)
|
|
2881
3318
|
|
|
2882
|
-
npx
|
|
3319
|
+
npx ruflo@v3alpha hooks model-route --task "design distributed consensus system"
|
|
2883
3320
|
# → Recommends: opus (complex architecture, high reasoning)
|
|
2884
3321
|
```
|
|
2885
3322
|
|
|
@@ -2899,22 +3336,27 @@ npx claude-flow@v3alpha hooks model-route --task "design distributed consensus s
|
|
|
2899
3336
|
# MOST COMMON HOOKS
|
|
2900
3337
|
# ══════════════════════════════════════════════════════════════════
|
|
2901
3338
|
|
|
2902
|
-
# Route task to best agent
|
|
2903
|
-
npx
|
|
3339
|
+
# Route task to best agent (with intelligence context injection)
|
|
3340
|
+
npx ruflo@v3alpha hooks route "<task>" --include-explanation
|
|
2904
3341
|
|
|
2905
3342
|
# Start/end session with learning
|
|
2906
|
-
npx
|
|
2907
|
-
npx
|
|
3343
|
+
npx ruflo@v3alpha hooks session-start --start-daemon
|
|
3344
|
+
npx ruflo@v3alpha hooks session-end --persist-patterns
|
|
2908
3345
|
|
|
2909
3346
|
# View what the system has learned
|
|
2910
|
-
npx
|
|
2911
|
-
npx
|
|
3347
|
+
npx ruflo@v3alpha hooks metrics
|
|
3348
|
+
npx ruflo@v3alpha hooks intelligence stats
|
|
3349
|
+
|
|
3350
|
+
# Intelligence diagnostics — see if intelligence is improving
|
|
3351
|
+
node .claude/helpers/hook-handler.cjs stats # Human-readable
|
|
3352
|
+
node .claude/helpers/hook-handler.cjs stats --json # JSON for scripting
|
|
3353
|
+
node .claude/helpers/intelligence.cjs stats # Direct access
|
|
2912
3354
|
|
|
2913
3355
|
# Bootstrap on new project
|
|
2914
|
-
npx
|
|
3356
|
+
npx ruflo@v3alpha hooks pretrain --depth deep
|
|
2915
3357
|
|
|
2916
3358
|
# Dispatch background worker
|
|
2917
|
-
npx
|
|
3359
|
+
npx ruflo@v3alpha hooks worker dispatch --trigger audit
|
|
2918
3360
|
```
|
|
2919
3361
|
|
|
2920
3362
|
</details>
|
|
@@ -2940,38 +3382,38 @@ Share learned patterns across projects, teams, and the community via the decentr
|
|
|
2940
3382
|
|
|
2941
3383
|
```bash
|
|
2942
3384
|
# Export learned patterns to file
|
|
2943
|
-
npx
|
|
3385
|
+
npx ruflo@v3alpha memory export --format json --output ./patterns.json
|
|
2944
3386
|
|
|
2945
3387
|
# Export specific namespace
|
|
2946
|
-
npx
|
|
3388
|
+
npx ruflo@v3alpha memory export --namespace "security" --output ./security-patterns.json
|
|
2947
3389
|
|
|
2948
3390
|
# Export with embeddings (larger file, faster import)
|
|
2949
|
-
npx
|
|
3391
|
+
npx ruflo@v3alpha memory export --include-embeddings --output ./full-export.json
|
|
2950
3392
|
|
|
2951
3393
|
# Export agent configurations
|
|
2952
|
-
npx
|
|
3394
|
+
npx ruflo@v3alpha config export --scope project --output ./agent-configs.json
|
|
2953
3395
|
|
|
2954
3396
|
# Export session state
|
|
2955
|
-
npx
|
|
3397
|
+
npx ruflo@v3alpha session export --session-id "my-session" --output ./session.json
|
|
2956
3398
|
```
|
|
2957
3399
|
|
|
2958
3400
|
### Import Commands
|
|
2959
3401
|
|
|
2960
3402
|
```bash
|
|
2961
3403
|
# Import patterns from file
|
|
2962
|
-
npx
|
|
3404
|
+
npx ruflo@v3alpha memory import --input ./patterns.json
|
|
2963
3405
|
|
|
2964
3406
|
# Import and merge with existing (don't overwrite)
|
|
2965
|
-
npx
|
|
3407
|
+
npx ruflo@v3alpha memory import --input ./patterns.json --merge
|
|
2966
3408
|
|
|
2967
3409
|
# Import from another project
|
|
2968
|
-
npx
|
|
3410
|
+
npx ruflo@v3alpha hooks transfer --source-path ../other-project
|
|
2969
3411
|
|
|
2970
3412
|
# Import agent configurations
|
|
2971
|
-
npx
|
|
3413
|
+
npx ruflo@v3alpha config import --input ./agent-configs.json --scope project
|
|
2972
3414
|
|
|
2973
3415
|
# Restore session
|
|
2974
|
-
npx
|
|
3416
|
+
npx ruflo@v3alpha session restore --session-id "my-session"
|
|
2975
3417
|
```
|
|
2976
3418
|
|
|
2977
3419
|
### Pattern Store (IPFS Marketplace)
|
|
@@ -2989,13 +3431,13 @@ Decentralized pattern marketplace for sharing and discovering community patterns
|
|
|
2989
3431
|
|
|
2990
3432
|
```bash
|
|
2991
3433
|
# Search for authentication patterns
|
|
2992
|
-
npx
|
|
3434
|
+
npx ruflo@v3alpha transfer-store search --query "authentication" --min-rating 4.0
|
|
2993
3435
|
|
|
2994
3436
|
# Download a pattern
|
|
2995
|
-
npx
|
|
3437
|
+
npx ruflo@v3alpha transfer-store download --id "auth-jwt-patterns-v2" --verify
|
|
2996
3438
|
|
|
2997
3439
|
# Publish your patterns
|
|
2998
|
-
npx
|
|
3440
|
+
npx ruflo@v3alpha transfer-store publish --input ./my-patterns.json --category "security"
|
|
2999
3441
|
```
|
|
3000
3442
|
|
|
3001
3443
|
### Plugin Store
|
|
@@ -3013,22 +3455,22 @@ Discover and install community plugins from the **live IPFS registry** with 19 o
|
|
|
3013
3455
|
|
|
3014
3456
|
```bash
|
|
3015
3457
|
# List plugins with live ratings from Cloud Function
|
|
3016
|
-
npx
|
|
3458
|
+
npx ruflo@v3alpha plugins list
|
|
3017
3459
|
|
|
3018
3460
|
# Filter by type
|
|
3019
|
-
npx
|
|
3461
|
+
npx ruflo@v3alpha plugins list --type integration
|
|
3020
3462
|
|
|
3021
3463
|
# Rate a plugin
|
|
3022
|
-
npx
|
|
3464
|
+
npx ruflo@v3alpha plugins rate --name @claude-flow/embeddings --rating 5
|
|
3023
3465
|
|
|
3024
3466
|
# Search for MCP tool plugins
|
|
3025
|
-
npx
|
|
3467
|
+
npx ruflo@v3alpha transfer plugin-search --type "mcp-tool" --verified
|
|
3026
3468
|
|
|
3027
3469
|
# Get plugin info
|
|
3028
|
-
npx
|
|
3470
|
+
npx ruflo@v3alpha transfer plugin-info --name "semantic-code-search"
|
|
3029
3471
|
|
|
3030
3472
|
# List official plugins
|
|
3031
|
-
npx
|
|
3473
|
+
npx ruflo@v3alpha transfer plugin-official
|
|
3032
3474
|
```
|
|
3033
3475
|
|
|
3034
3476
|
#### Live IPFS Plugin Registry
|
|
@@ -3061,10 +3503,10 @@ Patterns and models are distributed via IPFS for decentralization and integrity.
|
|
|
3061
3503
|
|
|
3062
3504
|
```bash
|
|
3063
3505
|
# Resolve IPNS name to CID
|
|
3064
|
-
npx
|
|
3506
|
+
npx ruflo@v3alpha transfer ipfs-resolve --name "/ipns/patterns.ruflo.io"
|
|
3065
3507
|
|
|
3066
3508
|
# Detect PII before publishing
|
|
3067
|
-
npx
|
|
3509
|
+
npx ruflo@v3alpha transfer detect-pii --content "$(cat ./patterns.json)"
|
|
3068
3510
|
```
|
|
3069
3511
|
|
|
3070
3512
|
### Model & Learning Pattern Import/Export
|
|
@@ -3087,7 +3529,7 @@ curl -X POST "https://api.pinata.cloud/pinning/pinJSONToIPFS" \
|
|
|
3087
3529
|
"name": "my-patterns",
|
|
3088
3530
|
"patterns": [...]
|
|
3089
3531
|
},
|
|
3090
|
-
"pinataMetadata": {"name": "
|
|
3532
|
+
"pinataMetadata": {"name": "ruflo-learning-pattern"}
|
|
3091
3533
|
}'
|
|
3092
3534
|
|
|
3093
3535
|
# Import a pattern from IPFS CID
|
|
@@ -3129,13 +3571,13 @@ Import pre-trained learning patterns for common tasks. **90.5% average accuracy*
|
|
|
3129
3571
|
curl -s "https://gateway.pinata.cloud/ipfs/QmNr1yYMKi7YBaL8JSztQyuB5ZUaTdRMLxJC1pBpGbjsTc" | jq '.models[].name'
|
|
3130
3572
|
|
|
3131
3573
|
# Import all models
|
|
3132
|
-
npx
|
|
3574
|
+
npx ruflo@v3alpha transfer import --cid QmNr1yYMKi7YBaL8JSztQyuB5ZUaTdRMLxJC1pBpGbjsTc
|
|
3133
3575
|
|
|
3134
3576
|
# Import specific category
|
|
3135
|
-
npx
|
|
3577
|
+
npx ruflo@v3alpha neural import --model security-review-patterns --source ipfs
|
|
3136
3578
|
|
|
3137
3579
|
# Use patterns in routing
|
|
3138
|
-
npx
|
|
3580
|
+
npx ruflo@v3alpha hooks route --task "review authentication code" --use-patterns
|
|
3139
3581
|
```
|
|
3140
3582
|
|
|
3141
3583
|
#### Benefits vs Fresh Install
|
|
@@ -3160,7 +3602,7 @@ npx claude-flow@v3alpha hooks route --task "review authentication code" --use-pa
|
|
|
3160
3602
|
|
|
3161
3603
|
```bash
|
|
3162
3604
|
# Install a pattern pack
|
|
3163
|
-
npx
|
|
3605
|
+
npx ruflo@v3alpha transfer-store download --id "security-essentials" --apply
|
|
3164
3606
|
```
|
|
3165
3607
|
|
|
3166
3608
|
### RuVector WASM Neural Training
|
|
@@ -3178,25 +3620,25 @@ Real WASM-accelerated neural training using `@ruvector/learning-wasm` and `@ruve
|
|
|
3178
3620
|
|
|
3179
3621
|
```bash
|
|
3180
3622
|
# List available pre-trained models from IPFS registry
|
|
3181
|
-
npx
|
|
3623
|
+
npx ruflo@v3alpha neural list
|
|
3182
3624
|
|
|
3183
3625
|
# List models by category
|
|
3184
|
-
npx
|
|
3626
|
+
npx ruflo@v3alpha neural list --category security
|
|
3185
3627
|
|
|
3186
3628
|
# Train with WASM acceleration
|
|
3187
|
-
npx
|
|
3629
|
+
npx ruflo@v3alpha neural train -p coordination -e 100 --wasm --flash --contrastive
|
|
3188
3630
|
|
|
3189
3631
|
# Train security patterns
|
|
3190
|
-
npx
|
|
3632
|
+
npx ruflo@v3alpha neural train -p security --wasm --contrastive
|
|
3191
3633
|
|
|
3192
3634
|
# Benchmark WASM performance
|
|
3193
|
-
npx
|
|
3635
|
+
npx ruflo@v3alpha neural benchmark -d 256 -i 1000
|
|
3194
3636
|
|
|
3195
3637
|
# Import pre-trained models
|
|
3196
|
-
npx
|
|
3638
|
+
npx ruflo@v3alpha neural import --cid QmNr1yYMKi7YBaL8JSztQyuB5ZUaTdRMLxJC1pBpGbjsTc
|
|
3197
3639
|
|
|
3198
3640
|
# Export trained patterns to IPFS
|
|
3199
|
-
npx
|
|
3641
|
+
npx ruflo@v3alpha neural export --ipfs --sign
|
|
3200
3642
|
```
|
|
3201
3643
|
|
|
3202
3644
|
#### Benchmark Results
|
|
@@ -3404,7 +3846,7 @@ Skills are **reusable workflows** that combine agents, hooks, and patterns into
|
|
|
3404
3846
|
| Skill | What It Does | When To Use |
|
|
3405
3847
|
|-------|--------------|-------------|
|
|
3406
3848
|
| `agentdb-vector-search` | Semantic search with 150x faster retrieval | Building RAG systems, knowledge bases |
|
|
3407
|
-
| `agentdb-memory-patterns` | Session memory,
|
|
3849
|
+
| `agentdb-memory-patterns` | Session memory, persistent storage, context management | Stateful agents, chat systems |
|
|
3408
3850
|
| `agentdb-learning` | 9 RL algorithms (PPO, DQN, SARSA, etc.) | Self-learning agents, behavior optimization |
|
|
3409
3851
|
| `agentdb-optimization` | Quantization (4-32x memory reduction), HNSW indexing | Scaling to millions of vectors |
|
|
3410
3852
|
| `agentdb-advanced` | QUIC sync, multi-database, custom distance metrics | Distributed AI systems |
|
|
@@ -3515,7 +3957,7 @@ Skills are **reusable workflows** that combine agents, hooks, and patterns into
|
|
|
3515
3957
|
|
|
3516
3958
|
| Skill | What It Does | When To Use |
|
|
3517
3959
|
|-------|--------------|-------------|
|
|
3518
|
-
| `agentic-jujutsu` |
|
|
3960
|
+
| `agentic-jujutsu` | Self-learning version control for AI agents | Multi-agent coordination |
|
|
3519
3961
|
| `worker-benchmarks` | Performance benchmarking framework | Measuring improvements |
|
|
3520
3962
|
| `worker-integration` | Worker-agent coordination patterns | Background processing |
|
|
3521
3963
|
|
|
@@ -3535,9 +3977,9 @@ Skills are **reusable workflows** that combine agents, hooks, and patterns into
|
|
|
3535
3977
|
/v3-security-overhaul
|
|
3536
3978
|
|
|
3537
3979
|
# Via CLI
|
|
3538
|
-
npx
|
|
3539
|
-
npx
|
|
3540
|
-
npx
|
|
3980
|
+
npx ruflo@v3alpha skill run github-code-review
|
|
3981
|
+
npx ruflo@v3alpha skill list
|
|
3982
|
+
npx ruflo@v3alpha skill info sparc-methodology
|
|
3541
3983
|
```
|
|
3542
3984
|
|
|
3543
3985
|
### Creating Custom Skills
|
|
@@ -3594,21 +4036,21 @@ The Claims system manages **who is working on what** — whether human or agent.
|
|
|
3594
4036
|
|
|
3595
4037
|
| Command | What It Does | Example |
|
|
3596
4038
|
|---------|--------------|---------|
|
|
3597
|
-
| `issues list` | See all issues and their status | `npx
|
|
3598
|
-
| `issues claim` | Claim an issue for yourself/agent | `npx
|
|
3599
|
-
| `issues release` | Release your claim | `npx
|
|
3600
|
-
| `issues handoff` | Hand off to another worker | `npx
|
|
3601
|
-
| `issues status` | Update progress on claimed work | `npx
|
|
3602
|
-
| `issues stealable` | List abandoned/stuck issues | `npx
|
|
3603
|
-
| `issues steal` | Take over stealable issue | `npx
|
|
3604
|
-
| `issues load` | View agent workloads | `npx
|
|
3605
|
-
| `issues rebalance` | Redistribute work evenly | `npx
|
|
3606
|
-
| `issues board` | Visual board view | `npx
|
|
4039
|
+
| `issues list` | See all issues and their status | `npx ruflo@v3alpha issues list` |
|
|
4040
|
+
| `issues claim` | Claim an issue for yourself/agent | `npx ruflo@v3alpha issues claim #123 --as coder-1` |
|
|
4041
|
+
| `issues release` | Release your claim | `npx ruflo@v3alpha issues release #123` |
|
|
4042
|
+
| `issues handoff` | Hand off to another worker | `npx ruflo@v3alpha issues handoff #123 --to reviewer` |
|
|
4043
|
+
| `issues status` | Update progress on claimed work | `npx ruflo@v3alpha issues status #123 --progress 75` |
|
|
4044
|
+
| `issues stealable` | List abandoned/stuck issues | `npx ruflo@v3alpha issues stealable` |
|
|
4045
|
+
| `issues steal` | Take over stealable issue | `npx ruflo@v3alpha issues steal #123` |
|
|
4046
|
+
| `issues load` | View agent workloads | `npx ruflo@v3alpha issues load` |
|
|
4047
|
+
| `issues rebalance` | Redistribute work evenly | `npx ruflo@v3alpha issues rebalance --dry-run` |
|
|
4048
|
+
| `issues board` | Visual board view | `npx ruflo@v3alpha issues board` |
|
|
3607
4049
|
|
|
3608
4050
|
### Visual Board View
|
|
3609
4051
|
|
|
3610
4052
|
```bash
|
|
3611
|
-
npx
|
|
4053
|
+
npx ruflo@v3alpha issues board
|
|
3612
4054
|
```
|
|
3613
4055
|
|
|
3614
4056
|
```
|
|
@@ -3630,13 +4072,13 @@ When you need to pass work to someone else:
|
|
|
3630
4072
|
|
|
3631
4073
|
```bash
|
|
3632
4074
|
# 1. Request handoff with context
|
|
3633
|
-
npx
|
|
4075
|
+
npx ruflo@v3alpha issues handoff #123 \
|
|
3634
4076
|
--to security-architect \
|
|
3635
4077
|
--reason "Needs security review" \
|
|
3636
4078
|
--progress 80
|
|
3637
4079
|
|
|
3638
4080
|
# 2. Target accepts handoff
|
|
3639
|
-
npx
|
|
4081
|
+
npx ruflo@v3alpha issues accept #123 --as security-architect
|
|
3640
4082
|
|
|
3641
4083
|
# 3. Work continues with full context
|
|
3642
4084
|
```
|
|
@@ -3645,7 +4087,7 @@ npx claude-flow@v3alpha issues accept #123 --as security-architect
|
|
|
3645
4087
|
|
|
3646
4088
|
```bash
|
|
3647
4089
|
# View current load
|
|
3648
|
-
npx
|
|
4090
|
+
npx ruflo@v3alpha issues load
|
|
3649
4091
|
|
|
3650
4092
|
# Output:
|
|
3651
4093
|
# Agent | Claims | Load | Status
|
|
@@ -3656,7 +4098,7 @@ npx claude-flow@v3alpha issues load
|
|
|
3656
4098
|
# security-arch | 0 | 0% | 🟢 Available
|
|
3657
4099
|
|
|
3658
4100
|
# Auto-rebalance
|
|
3659
|
-
npx
|
|
4101
|
+
npx ruflo@v3alpha issues rebalance
|
|
3660
4102
|
```
|
|
3661
4103
|
|
|
3662
4104
|
### MCP Tools
|
|
@@ -3717,14 +4159,14 @@ The Route system uses **Q-Learning** to automatically assign tasks to the best a
|
|
|
3717
4159
|
|
|
3718
4160
|
| Command | What It Does | Example |
|
|
3719
4161
|
|---------|--------------|---------|
|
|
3720
|
-
| `route task` | Get agent recommendation | `npx
|
|
3721
|
-
| `route explain` | Understand routing decision | `npx
|
|
3722
|
-
| `route coverage` | Route based on test coverage | `npx
|
|
4162
|
+
| `route task` | Get agent recommendation | `npx ruflo@v3alpha route task "implement OAuth2"` |
|
|
4163
|
+
| `route explain` | Understand routing decision | `npx ruflo@v3alpha route explain "task"` |
|
|
4164
|
+
| `route coverage` | Route based on test coverage | `npx ruflo@v3alpha route coverage` |
|
|
3723
4165
|
|
|
3724
4166
|
### Example: Route a Task
|
|
3725
4167
|
|
|
3726
4168
|
```bash
|
|
3727
|
-
npx
|
|
4169
|
+
npx ruflo@v3alpha route task "refactor authentication to use JWT"
|
|
3728
4170
|
|
|
3729
4171
|
# Output:
|
|
3730
4172
|
# ╔══════════════════════════════════════════════════════════════╗
|
|
@@ -3751,7 +4193,7 @@ npx claude-flow@v3alpha route task "refactor authentication to use JWT"
|
|
|
3751
4193
|
Routes tasks to agents based on **test coverage gaps**:
|
|
3752
4194
|
|
|
3753
4195
|
```bash
|
|
3754
|
-
npx
|
|
4196
|
+
npx ruflo@v3alpha route coverage
|
|
3755
4197
|
|
|
3756
4198
|
# Finds untested code and routes to tester agent:
|
|
3757
4199
|
# • src/auth/jwt.ts - 23% coverage → tester
|
|
@@ -3763,10 +4205,10 @@ npx claude-flow@v3alpha route coverage
|
|
|
3763
4205
|
|
|
3764
4206
|
```bash
|
|
3765
4207
|
# Route via hooks (preferred)
|
|
3766
|
-
npx
|
|
4208
|
+
npx ruflo@v3alpha hooks route "implement caching layer" --include-explanation
|
|
3767
4209
|
|
|
3768
4210
|
# Record outcome for learning
|
|
3769
|
-
npx
|
|
4211
|
+
npx ruflo@v3alpha hooks post-task --task-id "task-123" --success true --agent coder
|
|
3770
4212
|
```
|
|
3771
4213
|
|
|
3772
4214
|
### How Q-Learning Improves Over Time
|
|
@@ -3786,12 +4228,12 @@ The system **remembers** what works and applies it to future similar tasks.
|
|
|
3786
4228
|
|
|
3787
4229
|
## 💻 Programmatic Usage
|
|
3788
4230
|
|
|
3789
|
-
Use
|
|
4231
|
+
Use Ruflo packages directly in your applications.
|
|
3790
4232
|
|
|
3791
4233
|
<details>
|
|
3792
|
-
<summary>💻 <strong>Programmatic SDK</strong> — Use
|
|
4234
|
+
<summary>💻 <strong>Programmatic SDK</strong> — Use Ruflo in Your Code</summary>
|
|
3793
4235
|
|
|
3794
|
-
Use
|
|
4236
|
+
Use Ruflo packages directly in your TypeScript/JavaScript applications.
|
|
3795
4237
|
|
|
3796
4238
|
### Installation
|
|
3797
4239
|
|
|
@@ -3800,7 +4242,7 @@ Use Claude-Flow packages directly in your TypeScript/JavaScript applications.
|
|
|
3800
4242
|
npm install @claude-flow/cli @claude-flow/memory @claude-flow/swarm
|
|
3801
4243
|
|
|
3802
4244
|
# Or install everything
|
|
3803
|
-
npm install
|
|
4245
|
+
npm install ruflo@v3alpha
|
|
3804
4246
|
```
|
|
3805
4247
|
|
|
3806
4248
|
### Quick Examples
|
|
@@ -3837,21 +4279,21 @@ console.log(results);
|
|
|
3837
4279
|
**CLI Commands:**
|
|
3838
4280
|
```bash
|
|
3839
4281
|
# Initialize memory database
|
|
3840
|
-
npx
|
|
4282
|
+
npx ruflo@alpha memory init --force
|
|
3841
4283
|
|
|
3842
4284
|
# Store patterns
|
|
3843
|
-
npx
|
|
3844
|
-
npx
|
|
4285
|
+
npx ruflo@alpha memory store --key "pattern-auth" --value "JWT authentication with refresh tokens"
|
|
4286
|
+
npx ruflo@alpha memory store --key "pattern-cache" --value "Redis caching for API responses"
|
|
3845
4287
|
|
|
3846
4288
|
# Build HNSW index for 150x-12,500x faster search
|
|
3847
|
-
npx
|
|
4289
|
+
npx ruflo@alpha memory search --query "authentication" --build-hnsw
|
|
3848
4290
|
|
|
3849
4291
|
# Semantic search (uses HNSW if built)
|
|
3850
|
-
npx
|
|
4292
|
+
npx ruflo@alpha memory search --query "how to cache data" --limit 5
|
|
3851
4293
|
|
|
3852
4294
|
# List and manage entries
|
|
3853
|
-
npx
|
|
3854
|
-
npx
|
|
4295
|
+
npx ruflo@alpha memory list --namespace patterns
|
|
4296
|
+
npx ruflo@alpha memory stats
|
|
3855
4297
|
```
|
|
3856
4298
|
|
|
3857
4299
|
</details>
|
|
@@ -4085,35 +4527,35 @@ console.log(`Hit rate: ${(stats.hitRate * 100).toFixed(1)}%`);
|
|
|
4085
4527
|
|
|
4086
4528
|
```bash
|
|
4087
4529
|
# Generate embedding
|
|
4088
|
-
|
|
4530
|
+
ruflo embeddings embed "Your text here"
|
|
4089
4531
|
|
|
4090
4532
|
# Batch embed from file
|
|
4091
|
-
|
|
4533
|
+
ruflo embeddings batch documents.txt -o embeddings.json
|
|
4092
4534
|
|
|
4093
4535
|
# Similarity search
|
|
4094
|
-
|
|
4536
|
+
ruflo embeddings search "query" --index ./vectors
|
|
4095
4537
|
|
|
4096
4538
|
# Document chunking
|
|
4097
|
-
|
|
4539
|
+
ruflo embeddings chunk document.txt --strategy sentence --max-size 512
|
|
4098
4540
|
|
|
4099
4541
|
# Normalize embeddings
|
|
4100
|
-
|
|
4542
|
+
ruflo embeddings normalize embeddings.json --type l2 -o normalized.json
|
|
4101
4543
|
|
|
4102
4544
|
# Convert to hyperbolic
|
|
4103
|
-
|
|
4545
|
+
ruflo embeddings hyperbolic embeddings.json -o poincare.json
|
|
4104
4546
|
|
|
4105
4547
|
# Neural operations
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4548
|
+
ruflo embeddings neural drift --baseline "context" --input "check"
|
|
4549
|
+
ruflo embeddings neural store --id mem-1 --content "data"
|
|
4550
|
+
ruflo embeddings neural recall "query" --top-k 5
|
|
4109
4551
|
|
|
4110
4552
|
# Model management
|
|
4111
|
-
|
|
4112
|
-
|
|
4553
|
+
ruflo embeddings models list
|
|
4554
|
+
ruflo embeddings models download all-MiniLM-L6-v2
|
|
4113
4555
|
|
|
4114
4556
|
# Cache management
|
|
4115
|
-
|
|
4116
|
-
|
|
4557
|
+
ruflo embeddings cache stats
|
|
4558
|
+
ruflo embeddings cache clear --older-than 7d
|
|
4117
4559
|
```
|
|
4118
4560
|
|
|
4119
4561
|
### Available Models
|
|
@@ -4164,7 +4606,7 @@ await hooks.endTrajectory(trajectory, { success: true });
|
|
|
4164
4606
|
|
|
4165
4607
|
| Package | Purpose | Main Exports |
|
|
4166
4608
|
|---------|---------|--------------|
|
|
4167
|
-
| `@claude-flow/memory` | Vector storage, HNSW | `AgentDB`, `
|
|
4609
|
+
| `@claude-flow/memory` | Vector storage, HNSW, self-learning graph | `AgentDB`, `AutoMemoryBridge`, `LearningBridge`, `MemoryGraph` |
|
|
4168
4610
|
| `@claude-flow/swarm` | Agent coordination | `createSwarm`, `Swarm` |
|
|
4169
4611
|
| `@claude-flow/aidefence` | Threat detection | `isSafe`, `checkThreats`, `createAIDefence` |
|
|
4170
4612
|
| `@claude-flow/embeddings` | Vector embeddings | `createEmbeddingService` |
|
|
@@ -4180,7 +4622,7 @@ await hooks.endTrajectory(trajectory, { success: true });
|
|
|
4180
4622
|
|
|
4181
4623
|
## 🔗 Ecosystem & Integrations
|
|
4182
4624
|
|
|
4183
|
-
Core infrastructure packages powering
|
|
4625
|
+
Core infrastructure packages powering Ruflo's intelligence layer.
|
|
4184
4626
|
|
|
4185
4627
|
<details>
|
|
4186
4628
|
<summary>⚡ <strong>Agentic-Flow Integration</strong> — Core AI Infrastructure</summary>
|
|
@@ -4189,7 +4631,7 @@ Core infrastructure packages powering Claude-Flow's intelligence layer.
|
|
|
4189
4631
|
[](https://www.npmjs.com/package/agentic-flow)
|
|
4190
4632
|
[](https://github.com/ruvnet/agentic-flow)
|
|
4191
4633
|
|
|
4192
|
-
|
|
4634
|
+
Ruflo v3 is built on top of **[agentic-flow](https://github.com/ruvnet/agentic-flow)**, a production-ready AI agent orchestration platform. This deep integration provides 352x faster code transformations, learning memory, and geometric intelligence.
|
|
4193
4635
|
|
|
4194
4636
|
### Quick Start
|
|
4195
4637
|
|
|
@@ -4470,9 +4912,9 @@ claude mcp add agentic-flow -- npx agentic-flow mcp start
|
|
|
4470
4912
|
|
|
4471
4913
|
</details>
|
|
4472
4914
|
|
|
4473
|
-
### Integration with
|
|
4915
|
+
### Integration with Ruflo
|
|
4474
4916
|
|
|
4475
|
-
|
|
4917
|
+
Ruflo automatically leverages agentic-flow for:
|
|
4476
4918
|
|
|
4477
4919
|
| Feature | How It's Used |
|
|
4478
4920
|
|---------|---------------|
|
|
@@ -4483,7 +4925,7 @@ Claude-Flow automatically leverages agentic-flow for:
|
|
|
4483
4925
|
| **Embedding Search** | HNSW-indexed vector search (150x faster) |
|
|
4484
4926
|
|
|
4485
4927
|
```typescript
|
|
4486
|
-
//
|
|
4928
|
+
// Ruflo automatically uses agentic-flow optimizations
|
|
4487
4929
|
import { getTokenOptimizer } from '@claude-flow/integration';
|
|
4488
4930
|
|
|
4489
4931
|
const optimizer = await getTokenOptimizer();
|
|
@@ -4503,13 +4945,13 @@ const config = optimizer.getOptimalConfig(agentCount);
|
|
|
4503
4945
|
---
|
|
4504
4946
|
|
|
4505
4947
|
<details>
|
|
4506
|
-
<summary>🥋 <strong>Agentic-Jujutsu</strong> —
|
|
4948
|
+
<summary>🥋 <strong>Agentic-Jujutsu</strong> — Self-Learning AI Version Control</summary>
|
|
4507
4949
|
|
|
4508
4950
|
[](https://www.npmjs.com/package/agentic-jujutsu)
|
|
4509
4951
|
[](https://www.npmjs.com/package/agentic-jujutsu)
|
|
4510
4952
|
[](https://github.com/ruvnet/agentic-flow/tree/main/packages/agentic-jujutsu)
|
|
4511
4953
|
|
|
4512
|
-
**Agentic-Jujutsu** is
|
|
4954
|
+
**Agentic-Jujutsu** is self-learning version control designed for multiple AI agents working simultaneously without conflicts. Built on [Jujutsu](https://github.com/martinvonz/jj), it provides faster performance than Git with automatic conflict resolution.
|
|
4513
4955
|
|
|
4514
4956
|
### Quick Start
|
|
4515
4957
|
|
|
@@ -4540,7 +4982,7 @@ npx agentic-jujutsu compare-git
|
|
|
4540
4982
|
| **AI integration** | Manual work | Built-in (MCP protocol) |
|
|
4541
4983
|
| **Self-learning capabilities** | ❌ None | ✅ ReasoningBank |
|
|
4542
4984
|
| **Automatic conflict resolution** | 30-40% auto | **87% auto** |
|
|
4543
|
-
| **
|
|
4985
|
+
| **Cryptographic security** | Basic | SHA3-512 fingerprints |
|
|
4544
4986
|
|
|
4545
4987
|
### Core Capabilities
|
|
4546
4988
|
|
|
@@ -4586,7 +5028,7 @@ console.log('Confidence:', (suggestion.confidence * 100).toFixed(1) + '%');
|
|
|
4586
5028
|
</details>
|
|
4587
5029
|
|
|
4588
5030
|
<details>
|
|
4589
|
-
<summary>🤝 <strong>Multi-Agent Coordination</strong> —
|
|
5031
|
+
<summary>🤝 <strong>Multi-Agent Coordination</strong> — DAG architecture for conflict-free collaboration</summary>
|
|
4590
5032
|
|
|
4591
5033
|
```javascript
|
|
4592
5034
|
// All agents work concurrently (no conflicts!)
|
|
@@ -4622,12 +5064,12 @@ console.log('All agents completed:', results);
|
|
|
4622
5064
|
| Context switching | 500-1000ms | **50-100ms (10x)** |
|
|
4623
5065
|
| Conflict resolution | 30-40% auto | **87% auto (2.5x)** |
|
|
4624
5066
|
| Lock waiting | 50 min/day | **0 min (∞)** |
|
|
4625
|
-
|
|
|
5067
|
+
| SHA3-512 fingerprints | N/A | **<1ms** |
|
|
4626
5068
|
|
|
4627
5069
|
</details>
|
|
4628
5070
|
|
|
4629
5071
|
<details>
|
|
4630
|
-
<summary>🔐 <strong>
|
|
5072
|
+
<summary>🔐 <strong>Cryptographic Security</strong> — SHA3-512 fingerprints and AES-256 encryption</summary>
|
|
4631
5073
|
|
|
4632
5074
|
```javascript
|
|
4633
5075
|
const { generateQuantumFingerprint, verifyQuantumFingerprint } = require('agentic-jujutsu');
|
|
@@ -4648,7 +5090,7 @@ const key = crypto.randomBytes(32).toString('base64');
|
|
|
4648
5090
|
jj.enableEncryption(key);
|
|
4649
5091
|
```
|
|
4650
5092
|
|
|
4651
|
-
**
|
|
5093
|
+
**Security Methods:**
|
|
4652
5094
|
|
|
4653
5095
|
| Method | Description | Returns |
|
|
4654
5096
|
|--------|-------------|---------|
|
|
@@ -4659,9 +5101,9 @@ jj.enableEncryption(key);
|
|
|
4659
5101
|
|
|
4660
5102
|
</details>
|
|
4661
5103
|
|
|
4662
|
-
###
|
|
5104
|
+
### Ruflo Skill
|
|
4663
5105
|
|
|
4664
|
-
|
|
5106
|
+
Ruflo includes a dedicated `/agentic-jujutsu` skill for AI-powered version control:
|
|
4665
5107
|
|
|
4666
5108
|
```bash
|
|
4667
5109
|
# Invoke the skill
|
|
@@ -4670,9 +5112,9 @@ Claude-Flow includes a dedicated `/agentic-jujutsu` skill for AI-powered version
|
|
|
4670
5112
|
|
|
4671
5113
|
**Use this skill when you need:**
|
|
4672
5114
|
- ✅ Multiple AI agents modifying code simultaneously
|
|
4673
|
-
- ✅ Lock-free version control (
|
|
5115
|
+
- ✅ Lock-free version control (faster than Git for concurrent agents)
|
|
4674
5116
|
- ✅ Self-learning AI that improves from experience
|
|
4675
|
-
- ✅
|
|
5117
|
+
- ✅ SHA3-512 cryptographic integrity verification
|
|
4676
5118
|
- ✅ Automatic conflict resolution (87% success rate)
|
|
4677
5119
|
- ✅ Pattern recognition and intelligent suggestions
|
|
4678
5120
|
|
|
@@ -4729,7 +5171,7 @@ npx agentic-jujutsu examples # Show usage examples
|
|
|
4729
5171
|
| **v1.x** | Required separate jj install |
|
|
4730
5172
|
| **v2.0** | Zero-dependency (jj binary embedded) |
|
|
4731
5173
|
| **v2.1** | Self-learning AI with ReasoningBank |
|
|
4732
|
-
| **v2.2** | Multi-agent coordination +
|
|
5174
|
+
| **v2.2** | Multi-agent coordination + cryptographic security |
|
|
4733
5175
|
| **v2.3** | Kubernetes GitOps + production stability |
|
|
4734
5176
|
|
|
4735
5177
|
</details>
|
|
@@ -4744,7 +5186,7 @@ npx agentic-jujutsu examples # Show usage examples
|
|
|
4744
5186
|
[](https://github.com/ruvnet/ruvector)
|
|
4745
5187
|
[](https://hub.docker.com/r/ruvnet/ruvector-postgres)
|
|
4746
5188
|
|
|
4747
|
-
**RuVector** is a high-performance distributed vector database combining vector search, graph queries, and self-learning neural networks. Written in Rust with Node.js/WASM bindings, it powers
|
|
5189
|
+
**RuVector** is a high-performance distributed vector database combining vector search, graph queries, and self-learning neural networks. Written in Rust with Node.js/WASM bindings, it powers Ruflo's intelligence layer with native speed.
|
|
4748
5190
|
|
|
4749
5191
|
### Key Capabilities
|
|
4750
5192
|
|
|
@@ -4812,21 +5254,21 @@ const compressed = ruvector.compress(embedding, 0.3); // 30% quality threshold
|
|
|
4812
5254
|
|
|
4813
5255
|
| Package | Description | Performance |
|
|
4814
5256
|
|---------|-------------|-------------|
|
|
4815
|
-
| **[ruvector](https://www.npmjs.com/package/ruvector)** | Core vector database with HNSW |
|
|
4816
|
-
| **[@ruvector/attention](https://www.npmjs.com/package/@ruvector/attention)** | Flash Attention mechanisms | 2
|
|
4817
|
-
| **[@ruvector/sona](https://www.npmjs.com/package/@ruvector/sona)** | SONA adaptive learning (LoRA, EWC++) |
|
|
5257
|
+
| **[ruvector](https://www.npmjs.com/package/ruvector)** | Core vector database with HNSW | Fast vector search |
|
|
5258
|
+
| **[@ruvector/attention](https://www.npmjs.com/package/@ruvector/attention)** | Flash Attention mechanisms | 2-7x speedup |
|
|
5259
|
+
| **[@ruvector/sona](https://www.npmjs.com/package/@ruvector/sona)** | SONA adaptive learning (LoRA, EWC++) | Fast adaptation |
|
|
4818
5260
|
| **[@ruvector/gnn](https://www.npmjs.com/package/@ruvector/gnn)** | Graph Neural Networks (15 layer types) | Native NAPI bindings |
|
|
4819
|
-
| **[@ruvector/graph-node](https://www.npmjs.com/package/@ruvector/graph-node)** | Graph DB with Cypher queries |
|
|
5261
|
+
| **[@ruvector/graph-node](https://www.npmjs.com/package/@ruvector/graph-node)** | Graph DB with Cypher queries | Native NAPI |
|
|
4820
5262
|
| **[@ruvector/rvlite](https://www.npmjs.com/package/@ruvector/rvlite)** | Standalone DB (SQL, SPARQL, Cypher) | All-in-one solution |
|
|
4821
|
-
| **[ruvector
|
|
5263
|
+
| **[@ruvector/router](https://www.npmjs.com/package/@ruvector/router)** | Semantic intent routing | Fast routing |
|
|
4822
5264
|
|
|
4823
5265
|
### 🐘 RuVector PostgreSQL — Enterprise Vector Database
|
|
4824
5266
|
|
|
4825
|
-
**77+ SQL functions** for AI operations directly in PostgreSQL with
|
|
5267
|
+
**77+ SQL functions** for AI operations directly in PostgreSQL with fast vector search.
|
|
4826
5268
|
|
|
4827
5269
|
```bash
|
|
4828
5270
|
# Quick setup with CLI (recommended)
|
|
4829
|
-
npx
|
|
5271
|
+
npx ruflo ruvector setup --output ./my-ruvector
|
|
4830
5272
|
cd my-ruvector && docker-compose up -d
|
|
4831
5273
|
|
|
4832
5274
|
# Or pull directly from Docker Hub
|
|
@@ -4834,12 +5276,12 @@ docker run -d \
|
|
|
4834
5276
|
--name ruvector-postgres \
|
|
4835
5277
|
-p 5432:5432 \
|
|
4836
5278
|
-e POSTGRES_USER=claude \
|
|
4837
|
-
-e POSTGRES_PASSWORD=
|
|
5279
|
+
-e POSTGRES_PASSWORD=ruflo-test \
|
|
4838
5280
|
-e POSTGRES_DB=claude_flow \
|
|
4839
5281
|
ruvnet/ruvector-postgres
|
|
4840
5282
|
|
|
4841
5283
|
# Migrate existing memory to PostgreSQL
|
|
4842
|
-
npx
|
|
5284
|
+
npx ruflo ruvector import --input memory-export.json
|
|
4843
5285
|
```
|
|
4844
5286
|
|
|
4845
5287
|
**RuVector PostgreSQL vs pgvector:**
|
|
@@ -4996,12 +5438,12 @@ await db.createHyperedge(['agent-1', 'agent-2', 'agent-3'], {
|
|
|
4996
5438
|
|
|
4997
5439
|
</details>
|
|
4998
5440
|
|
|
4999
|
-
### Integration with
|
|
5441
|
+
### Integration with Ruflo
|
|
5000
5442
|
|
|
5001
|
-
|
|
5443
|
+
Ruflo automatically uses RuVector when available:
|
|
5002
5444
|
|
|
5003
5445
|
```typescript
|
|
5004
|
-
//
|
|
5446
|
+
// Ruflo detects and uses native ruvector
|
|
5005
5447
|
import { getVectorStore } from '@claude-flow/memory';
|
|
5006
5448
|
|
|
5007
5449
|
const store = await getVectorStore();
|
|
@@ -5019,19 +5461,19 @@ const similarity = attention.attention(queries, keys, values);
|
|
|
5019
5461
|
|
|
5020
5462
|
```bash
|
|
5021
5463
|
# RuVector PostgreSQL Setup (generates Docker files + SQL)
|
|
5022
|
-
npx
|
|
5023
|
-
npx
|
|
5024
|
-
npx
|
|
5464
|
+
npx ruflo ruvector setup # Output to ./ruvector-postgres
|
|
5465
|
+
npx ruflo ruvector setup --output ./mydir # Custom directory
|
|
5466
|
+
npx ruflo ruvector setup --print # Preview files
|
|
5025
5467
|
|
|
5026
5468
|
# Import from sql.js/JSON to PostgreSQL
|
|
5027
|
-
npx
|
|
5028
|
-
npx
|
|
5469
|
+
npx ruflo ruvector import --input data.json # Direct import
|
|
5470
|
+
npx ruflo ruvector import --input data.json --output sql # Dry-run (generate SQL)
|
|
5029
5471
|
|
|
5030
5472
|
# Other RuVector commands
|
|
5031
|
-
npx
|
|
5032
|
-
npx
|
|
5033
|
-
npx
|
|
5034
|
-
npx
|
|
5473
|
+
npx ruflo ruvector status --verbose # Check connection
|
|
5474
|
+
npx ruflo ruvector benchmark --vectors 10000 # Performance test
|
|
5475
|
+
npx ruflo ruvector optimize --analyze # Optimization suggestions
|
|
5476
|
+
npx ruflo ruvector backup --output backup.sql # Backup data
|
|
5035
5477
|
|
|
5036
5478
|
# Native ruvector CLI
|
|
5037
5479
|
npx ruvector status # Check installation
|
|
@@ -5058,11 +5500,11 @@ Cloud platform integration and deployment tools.
|
|
|
5058
5500
|
<details>
|
|
5059
5501
|
<summary>☁️ <strong>Flow Nexus</strong> — Cloud Platform Integration</summary>
|
|
5060
5502
|
|
|
5061
|
-
Flow Nexus is a **cloud platform** for deploying and scaling
|
|
5503
|
+
Flow Nexus is a **cloud platform** for deploying and scaling Ruflo beyond your local machine.
|
|
5062
5504
|
|
|
5063
5505
|
### What Flow Nexus Provides
|
|
5064
5506
|
|
|
5065
|
-
| Feature | Local
|
|
5507
|
+
| Feature | Local Ruflo | + Flow Nexus |
|
|
5066
5508
|
|---------|-------------------|--------------|
|
|
5067
5509
|
| **Swarm Scale** | 15 agents (local resources) | 100+ agents (cloud resources) |
|
|
5068
5510
|
| **Neural Training** | Limited by local GPU/CPU | Distributed GPU clusters |
|
|
@@ -5111,7 +5553,7 @@ Flow Nexus is a **cloud platform** for deploying and scaling Claude-Flow beyond
|
|
|
5111
5553
|
/flow-nexus-swarm
|
|
5112
5554
|
|
|
5113
5555
|
# Or via CLI
|
|
5114
|
-
npx
|
|
5556
|
+
npx ruflo@v3alpha nexus swarm deploy \
|
|
5115
5557
|
--topology hierarchical \
|
|
5116
5558
|
--max-agents 50 \
|
|
5117
5559
|
--region us-east-1
|
|
@@ -5123,13 +5565,13 @@ Isolated execution environments for running untrusted code:
|
|
|
5123
5565
|
|
|
5124
5566
|
```bash
|
|
5125
5567
|
# Create sandbox
|
|
5126
|
-
npx
|
|
5568
|
+
npx ruflo@v3alpha nexus sandbox create --language python
|
|
5127
5569
|
|
|
5128
5570
|
# Execute code safely
|
|
5129
|
-
npx
|
|
5571
|
+
npx ruflo@v3alpha nexus sandbox exec --code "print('Hello')"
|
|
5130
5572
|
|
|
5131
5573
|
# Cleanup
|
|
5132
|
-
npx
|
|
5574
|
+
npx ruflo@v3alpha nexus sandbox destroy
|
|
5133
5575
|
```
|
|
5134
5576
|
|
|
5135
5577
|
### Event-Driven Workflows
|
|
@@ -5155,10 +5597,10 @@ steps:
|
|
|
5155
5597
|
# 1. Sign up at flow-nexus.io
|
|
5156
5598
|
# 2. Get API key
|
|
5157
5599
|
# 3. Configure
|
|
5158
|
-
npx
|
|
5600
|
+
npx ruflo@v3alpha nexus configure --api-key <key>
|
|
5159
5601
|
|
|
5160
5602
|
# 4. Deploy
|
|
5161
|
-
npx
|
|
5603
|
+
npx ruflo@v3alpha nexus swarm deploy
|
|
5162
5604
|
```
|
|
5163
5605
|
|
|
5164
5606
|
</details>
|
|
@@ -5192,7 +5634,7 @@ Stream-Chain enables **sequential processing** where the output of one agent bec
|
|
|
5192
5634
|
/stream-chain
|
|
5193
5635
|
|
|
5194
5636
|
# Define pipeline
|
|
5195
|
-
npx
|
|
5637
|
+
npx ruflo@v3alpha stream-chain create \
|
|
5196
5638
|
--name "feature-pipeline" \
|
|
5197
5639
|
--stages "researcher,architect,coder,tester,reviewer"
|
|
5198
5640
|
```
|
|
@@ -5234,11 +5676,11 @@ stages:
|
|
|
5234
5676
|
|
|
5235
5677
|
```bash
|
|
5236
5678
|
# Run the pipeline
|
|
5237
|
-
npx
|
|
5679
|
+
npx ruflo@v3alpha stream-chain run feature-pipeline \
|
|
5238
5680
|
--input '{"requirements": "Add user dashboard with analytics"}'
|
|
5239
5681
|
|
|
5240
5682
|
# Monitor progress
|
|
5241
|
-
npx
|
|
5683
|
+
npx ruflo@v3alpha stream-chain status feature-pipeline
|
|
5242
5684
|
```
|
|
5243
5685
|
|
|
5244
5686
|
### Use Cases
|
|
@@ -5278,7 +5720,7 @@ The Pair Programming skill provides **human-AI collaborative coding** with role
|
|
|
5278
5720
|
/pair-programming --mode tdd
|
|
5279
5721
|
|
|
5280
5722
|
# Via CLI
|
|
5281
|
-
npx
|
|
5723
|
+
npx ruflo@v3alpha pair start --mode navigator
|
|
5282
5724
|
```
|
|
5283
5725
|
|
|
5284
5726
|
### TDD Mode Workflow
|
|
@@ -5318,16 +5760,16 @@ npx claude-flow@v3alpha pair start --mode navigator
|
|
|
5318
5760
|
|
|
5319
5761
|
```bash
|
|
5320
5762
|
# Switch roles mid-session
|
|
5321
|
-
npx
|
|
5763
|
+
npx ruflo@v3alpha pair switch
|
|
5322
5764
|
|
|
5323
5765
|
# Get AI explanation
|
|
5324
|
-
npx
|
|
5766
|
+
npx ruflo@v3alpha pair explain
|
|
5325
5767
|
|
|
5326
5768
|
# Run tests
|
|
5327
|
-
npx
|
|
5769
|
+
npx ruflo@v3alpha pair test
|
|
5328
5770
|
|
|
5329
5771
|
# End session with summary
|
|
5330
|
-
npx
|
|
5772
|
+
npx ruflo@v3alpha pair end
|
|
5331
5773
|
```
|
|
5332
5774
|
|
|
5333
5775
|
</details>
|
|
@@ -5384,22 +5826,22 @@ Detection Time: 0.04ms | 50+ Patterns | Self-Learning | HNSW Vector Search
|
|
|
5384
5826
|
|
|
5385
5827
|
```bash
|
|
5386
5828
|
# Basic threat scan
|
|
5387
|
-
npx
|
|
5829
|
+
npx ruflo@v3alpha security defend -i "ignore previous instructions"
|
|
5388
5830
|
|
|
5389
5831
|
# Scan a file
|
|
5390
|
-
npx
|
|
5832
|
+
npx ruflo@v3alpha security defend -f ./user-prompts.txt
|
|
5391
5833
|
|
|
5392
5834
|
# Quick scan (faster)
|
|
5393
|
-
npx
|
|
5835
|
+
npx ruflo@v3alpha security defend -i "some text" --quick
|
|
5394
5836
|
|
|
5395
5837
|
# JSON output
|
|
5396
|
-
npx
|
|
5838
|
+
npx ruflo@v3alpha security defend -i "test" -o json
|
|
5397
5839
|
|
|
5398
5840
|
# View statistics
|
|
5399
|
-
npx
|
|
5841
|
+
npx ruflo@v3alpha security defend --stats
|
|
5400
5842
|
|
|
5401
5843
|
# Full security audit
|
|
5402
|
-
npx
|
|
5844
|
+
npx ruflo@v3alpha security scan --depth full
|
|
5403
5845
|
```
|
|
5404
5846
|
|
|
5405
5847
|
### MCP Tools
|
|
@@ -5531,7 +5973,7 @@ Domain-Driven Design with bounded contexts, clean architecture, and measured per
|
|
|
5531
5973
|
| Module | Purpose | Key Features |
|
|
5532
5974
|
|--------|---------|--------------|
|
|
5533
5975
|
| `@claude-flow/hooks` | Event-driven lifecycle | ReasoningBank, 27 hooks, pattern learning |
|
|
5534
|
-
| `@claude-flow/memory` | Unified vector storage | AgentDB, HNSW indexing, 150x faster search |
|
|
5976
|
+
| `@claude-flow/memory` | Unified vector storage | AgentDB, HNSW indexing, 150x faster search, LearningBridge, MemoryGraph, AgentMemoryScope |
|
|
5535
5977
|
| `@claude-flow/security` | CVE remediation | Input validation, path security, AIDefence |
|
|
5536
5978
|
| `@claude-flow/swarm` | Multi-agent coordination | 6 topologies, Byzantine consensus, auto-scaling |
|
|
5537
5979
|
| `@claude-flow/plugins` | WASM extensions | RuVector plugins, semantic search, intent routing |
|
|
@@ -5554,16 +5996,22 @@ Domain-Driven Design with bounded contexts, clean architecture, and measured per
|
|
|
5554
5996
|
|
|
5555
5997
|
### Performance Benchmarks
|
|
5556
5998
|
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
|
|
|
5560
|
-
|
|
5561
|
-
| **
|
|
5562
|
-
| **
|
|
5563
|
-
| **
|
|
5564
|
-
| **
|
|
5565
|
-
| **
|
|
5566
|
-
| **
|
|
5999
|
+
*Benchmarks measured on Node.js 20+ with local SQLite. Results vary by hardware and workload.*
|
|
6000
|
+
|
|
6001
|
+
| Category | Metric | Target | Status |
|
|
6002
|
+
|----------|--------|--------|--------|
|
|
6003
|
+
| **Startup** | CLI cold start | <500ms | ✅ Met |
|
|
6004
|
+
| **Startup** | MCP server init | <400ms | ✅ Met |
|
|
6005
|
+
| **Memory** | HNSW search | <1ms | ✅ Sub-ms |
|
|
6006
|
+
| **Memory** | Pattern retrieval | <10ms | ✅ Met |
|
|
6007
|
+
| **Swarm** | Agent spawn | <200ms | ✅ Met |
|
|
6008
|
+
| **Swarm** | Consensus latency | <100ms | ✅ Met |
|
|
6009
|
+
| **Neural** | SONA adaptation | <0.05ms | ✅ Met |
|
|
6010
|
+
| **Graph** | Build (1k nodes) | <200ms | ✅ Met |
|
|
6011
|
+
| **Graph** | PageRank (1k nodes) | <100ms | ✅ Met |
|
|
6012
|
+
| **Learning** | Insight recording | <5ms | ✅ Met |
|
|
6013
|
+
| **Learning** | Consolidation | <500ms | ✅ Met |
|
|
6014
|
+
| **Task** | Success rate | 95%+ | ✅ Met |
|
|
5567
6015
|
|
|
5568
6016
|
### Topology Performance
|
|
5569
6017
|
|
|
@@ -5585,7 +6033,7 @@ Domain-Driven Design with bounded contexts, clean architecture, and measured per
|
|
|
5585
6033
|
|
|
5586
6034
|
[](https://www.npmjs.com/package/@claude-flow/browser)
|
|
5587
6035
|
|
|
5588
|
-
AI-optimized browser automation integrating [agent-browser](https://github.com/AugmentCode/agent-browser) with
|
|
6036
|
+
AI-optimized browser automation integrating [agent-browser](https://github.com/AugmentCode/agent-browser) with ruflo for intelligent web automation, trajectory learning, and multi-agent browser coordination.
|
|
5589
6037
|
|
|
5590
6038
|
### Installation
|
|
5591
6039
|
|
|
@@ -5612,7 +6060,7 @@ browser.startTrajectory('Login to dashboard');
|
|
|
5612
6060
|
|
|
5613
6061
|
await browser.open('https://example.com/login');
|
|
5614
6062
|
|
|
5615
|
-
// Use element refs (
|
|
6063
|
+
// Use element refs (shorter tokens vs full CSS selectors)
|
|
5616
6064
|
const snapshot = await browser.snapshot({ interactive: true });
|
|
5617
6065
|
await browser.fill('@e1', 'user@example.com');
|
|
5618
6066
|
await browser.fill('@e2', 'password');
|
|
@@ -5627,7 +6075,7 @@ await browser.close();
|
|
|
5627
6075
|
| Feature | Description |
|
|
5628
6076
|
|---------|-------------|
|
|
5629
6077
|
| **59 MCP Tools** | Complete browser automation via MCP protocol |
|
|
5630
|
-
| **Element Refs** |
|
|
6078
|
+
| **Element Refs** | Compact `@e1`, `@e2` refs instead of verbose CSS selectors |
|
|
5631
6079
|
| **Trajectory Learning** | Records actions for ReasoningBank/SONA |
|
|
5632
6080
|
| **Security Scanning** | URL validation, PII detection, XSS/SQL injection prevention |
|
|
5633
6081
|
| **9 Workflow Templates** | Login, OAuth, scraping, testing, monitoring |
|
|
@@ -5670,7 +6118,7 @@ const template = getWorkflow('login-basic');
|
|
|
5670
6118
|
<details>
|
|
5671
6119
|
<summary>📦 <strong>Release Management</strong> — @claude-flow/deployment</summary>
|
|
5672
6120
|
|
|
5673
|
-
Automated release management, versioning, and CI/CD for
|
|
6121
|
+
Automated release management, versioning, and CI/CD for Ruflo packages.
|
|
5674
6122
|
|
|
5675
6123
|
### Features
|
|
5676
6124
|
|
|
@@ -5984,10 +6432,10 @@ npm run bench:attention
|
|
|
5984
6432
|
npm run bench:startup
|
|
5985
6433
|
|
|
5986
6434
|
# Performance report
|
|
5987
|
-
npx
|
|
6435
|
+
npx ruflo@v3alpha performance report
|
|
5988
6436
|
|
|
5989
6437
|
# Benchmark specific suite
|
|
5990
|
-
npx
|
|
6438
|
+
npx ruflo@v3alpha performance benchmark --suite memory
|
|
5991
6439
|
```
|
|
5992
6440
|
|
|
5993
6441
|
</details>
|
|
@@ -6368,7 +6816,7 @@ export CLAUDE_FLOW_MEMORY_PATH="./data"
|
|
|
6368
6816
|
| `GCS_PROJECT_ID` | GCS project ID | Optional |
|
|
6369
6817
|
| `GOOGLE_CLOUD_PROJECT` | Alternative project ID variable | Optional |
|
|
6370
6818
|
| `GOOGLE_APPLICATION_CREDENTIALS` | Path to GCS service account JSON | Optional |
|
|
6371
|
-
| `GCS_PREFIX` | Prefix for stored files | `
|
|
6819
|
+
| `GCS_PREFIX` | Prefix for stored files | `ruflo-patterns` |
|
|
6372
6820
|
|
|
6373
6821
|
### Auto-Update System
|
|
6374
6822
|
|
|
@@ -6439,9 +6887,9 @@ CLAUDE_FLOW_HNSW_EF=200
|
|
|
6439
6887
|
|
|
6440
6888
|
### Configuration File Location
|
|
6441
6889
|
|
|
6442
|
-
|
|
6890
|
+
Ruflo looks for configuration in this order:
|
|
6443
6891
|
1. `./claude-flow.config.json` (project root)
|
|
6444
|
-
2. `~/.config/
|
|
6892
|
+
2. `~/.config/ruflo/config.json` (user config)
|
|
6445
6893
|
3. Environment variables (override any file config)
|
|
6446
6894
|
|
|
6447
6895
|
### Complete Configuration Schema
|
|
@@ -6541,7 +6989,7 @@ Claude Flow looks for configuration in this order:
|
|
|
6541
6989
|
"level": "info",
|
|
6542
6990
|
"format": "json",
|
|
6543
6991
|
"destination": "console",
|
|
6544
|
-
"filePath": "./logs/
|
|
6992
|
+
"filePath": "./logs/ruflo.log",
|
|
6545
6993
|
"maxFileSize": "100MB",
|
|
6546
6994
|
"maxFiles": 10
|
|
6547
6995
|
},
|
|
@@ -6560,7 +7008,7 @@ Claude Flow looks for configuration in this order:
|
|
|
6560
7008
|
"default": "anthropic",
|
|
6561
7009
|
"fallback": ["openai", "google"],
|
|
6562
7010
|
"anthropic": {
|
|
6563
|
-
"model": "claude-sonnet-4-20250514",
|
|
7011
|
+
"model": "claude-sonnet-4-6-20250514",
|
|
6564
7012
|
"maxTokens": 8192
|
|
6565
7013
|
},
|
|
6566
7014
|
"openai": {
|
|
@@ -6608,7 +7056,7 @@ Claude Flow looks for configuration in this order:
|
|
|
6608
7056
|
"version": "3.0.0",
|
|
6609
7057
|
"memory": {
|
|
6610
7058
|
"type": "hybrid",
|
|
6611
|
-
"path": "/var/lib/
|
|
7059
|
+
"path": "/var/lib/ruflo/data",
|
|
6612
7060
|
"encryption": { "enabled": true, "algorithm": "aes-256-gcm" }
|
|
6613
7061
|
},
|
|
6614
7062
|
"swarm": { "topology": "hierarchical", "maxAgents": 15 },
|
|
@@ -6620,7 +7068,7 @@ Claude Flow looks for configuration in this order:
|
|
|
6620
7068
|
"level": "warn",
|
|
6621
7069
|
"format": "json",
|
|
6622
7070
|
"destination": "file",
|
|
6623
|
-
"filePath": "/var/log/
|
|
7071
|
+
"filePath": "/var/log/ruflo/production.log"
|
|
6624
7072
|
},
|
|
6625
7073
|
"monitoring": { "enabled": true, "metricsInterval": 30000 }
|
|
6626
7074
|
}
|
|
@@ -6664,25 +7112,25 @@ Claude Flow looks for configuration in this order:
|
|
|
6664
7112
|
|
|
6665
7113
|
```bash
|
|
6666
7114
|
# View current configuration
|
|
6667
|
-
npx
|
|
7115
|
+
npx ruflo@v3alpha config list
|
|
6668
7116
|
|
|
6669
7117
|
# Get specific value
|
|
6670
|
-
npx
|
|
7118
|
+
npx ruflo@v3alpha config get --key memory.type
|
|
6671
7119
|
|
|
6672
7120
|
# Set configuration value
|
|
6673
|
-
npx
|
|
7121
|
+
npx ruflo@v3alpha config set --key swarm.maxAgents --value 10
|
|
6674
7122
|
|
|
6675
7123
|
# Export configuration
|
|
6676
|
-
npx
|
|
7124
|
+
npx ruflo@v3alpha config export > my-config.json
|
|
6677
7125
|
|
|
6678
7126
|
# Import configuration
|
|
6679
|
-
npx
|
|
7127
|
+
npx ruflo@v3alpha config import --file my-config.json
|
|
6680
7128
|
|
|
6681
7129
|
# Reset to defaults
|
|
6682
|
-
npx
|
|
7130
|
+
npx ruflo@v3alpha config reset --key swarm
|
|
6683
7131
|
|
|
6684
7132
|
# Initialize with wizard
|
|
6685
|
-
npx
|
|
7133
|
+
npx ruflo@v3alpha init --wizard
|
|
6686
7134
|
```
|
|
6687
7135
|
|
|
6688
7136
|
</details>
|
|
@@ -6706,7 +7154,7 @@ lsof -i :3000
|
|
|
6706
7154
|
# Kill existing process
|
|
6707
7155
|
kill -9 <PID>
|
|
6708
7156
|
# Restart MCP server
|
|
6709
|
-
npx
|
|
7157
|
+
npx ruflo@v3alpha mcp start
|
|
6710
7158
|
```
|
|
6711
7159
|
|
|
6712
7160
|
**Agent spawn failures**
|
|
@@ -6720,9 +7168,9 @@ export CLAUDE_FLOW_MAX_AGENTS=5
|
|
|
6720
7168
|
**Pattern search returning no results**
|
|
6721
7169
|
```bash
|
|
6722
7170
|
# Verify patterns are stored
|
|
6723
|
-
npx
|
|
7171
|
+
npx ruflo@v3alpha hooks metrics
|
|
6724
7172
|
# Re-run pretraining if empty
|
|
6725
|
-
npx
|
|
7173
|
+
npx ruflo@v3alpha hooks pretrain
|
|
6726
7174
|
```
|
|
6727
7175
|
|
|
6728
7176
|
**Windows path issues**
|
|
@@ -6730,7 +7178,7 @@ npx claude-flow@v3alpha hooks pretrain
|
|
|
6730
7178
|
# Use forward slashes or escape backslashes
|
|
6731
7179
|
$env:CLAUDE_FLOW_MEMORY_PATH = "./data"
|
|
6732
7180
|
# Or use absolute path
|
|
6733
|
-
$env:CLAUDE_FLOW_MEMORY_PATH = "C:/Users/name/
|
|
7181
|
+
$env:CLAUDE_FLOW_MEMORY_PATH = "C:/Users/name/ruflo/data"
|
|
6734
7182
|
```
|
|
6735
7183
|
|
|
6736
7184
|
**Permission denied errors**
|
|
@@ -6743,7 +7191,7 @@ sudo chown -R $(whoami) ~/.npm
|
|
|
6743
7191
|
**High memory usage**
|
|
6744
7192
|
```bash
|
|
6745
7193
|
# Enable garbage collection
|
|
6746
|
-
node --expose-gc node_modules/.bin/
|
|
7194
|
+
node --expose-gc node_modules/.bin/ruflo
|
|
6747
7195
|
# Reduce HNSW parameters for lower memory
|
|
6748
7196
|
export CLAUDE_FLOW_HNSW_M=8
|
|
6749
7197
|
export CLAUDE_FLOW_HNSW_EF=100
|
|
@@ -6775,45 +7223,45 @@ export CLAUDE_FLOW_HNSW_EF=100
|
|
|
6775
7223
|
|
|
6776
7224
|
| Change | V2 | V3 | Impact |
|
|
6777
7225
|
|--------|----|----|--------|
|
|
6778
|
-
| **Package Structure** | `
|
|
7226
|
+
| **Package Structure** | `ruflo` | `@claude-flow/*` (scoped) | Update imports |
|
|
6779
7227
|
| **Memory Backend** | JSON files | AgentDB + HNSW | Faster search |
|
|
6780
7228
|
| **Hooks System** | Basic patterns | ReasoningBank + SONA | Self-learning |
|
|
6781
7229
|
| **Security** | Manual validation | Automatic strict mode | More secure |
|
|
6782
7230
|
| **CLI Commands** | Flat structure | Nested subcommands | New syntax |
|
|
6783
|
-
| **Config Format** | `.
|
|
7231
|
+
| **Config Format** | `.ruflo/config.json` | `claude-flow.config.json` | Update path |
|
|
6784
7232
|
|
|
6785
7233
|
### Step-by-Step Migration
|
|
6786
7234
|
|
|
6787
7235
|
```bash
|
|
6788
7236
|
# STEP 1: Backup existing data (CRITICAL)
|
|
6789
7237
|
cp -r ./data ./data-backup-v2
|
|
6790
|
-
cp -r ./.
|
|
7238
|
+
cp -r ./.ruflo ./.ruflo-backup-v2
|
|
6791
7239
|
|
|
6792
7240
|
# STEP 2: Check migration status
|
|
6793
|
-
npx
|
|
7241
|
+
npx ruflo@v3alpha migrate status
|
|
6794
7242
|
|
|
6795
7243
|
# STEP 3: Run migration with dry-run first
|
|
6796
|
-
npx
|
|
7244
|
+
npx ruflo@v3alpha migrate run --dry-run
|
|
6797
7245
|
|
|
6798
7246
|
# STEP 4: Execute migration
|
|
6799
|
-
npx
|
|
7247
|
+
npx ruflo@v3alpha migrate run --from v2
|
|
6800
7248
|
|
|
6801
7249
|
# STEP 5: Verify migration
|
|
6802
|
-
npx
|
|
7250
|
+
npx ruflo@v3alpha migrate verify
|
|
6803
7251
|
|
|
6804
7252
|
# STEP 6: Initialize V3 learning
|
|
6805
|
-
npx
|
|
6806
|
-
npx
|
|
7253
|
+
npx ruflo@v3alpha hooks pretrain
|
|
7254
|
+
npx ruflo@v3alpha doctor --fix
|
|
6807
7255
|
```
|
|
6808
7256
|
|
|
6809
7257
|
### Command Changes Reference
|
|
6810
7258
|
|
|
6811
7259
|
| V2 Command | V3 Command | Notes |
|
|
6812
7260
|
|------------|------------|-------|
|
|
6813
|
-
| `
|
|
6814
|
-
| `
|
|
6815
|
-
| `
|
|
6816
|
-
| `
|
|
7261
|
+
| `ruflo start` | `ruflo mcp start` | MCP is explicit |
|
|
7262
|
+
| `ruflo init` | `ruflo init --wizard` | Interactive mode |
|
|
7263
|
+
| `ruflo spawn <type>` | `ruflo agent spawn -t <type>` | Nested under `agent` |
|
|
7264
|
+
| `ruflo swarm create` | `ruflo swarm init --topology mesh` | Explicit topology |
|
|
6817
7265
|
| `--pattern-store path` | `--memory-backend agentdb` | Backend selection |
|
|
6818
7266
|
| `hooks record` | `hooks post-edit --success true` | Explicit success flag |
|
|
6819
7267
|
| `memory get <key>` | `memory retrieve --key <key>` | Explicit flag |
|
|
@@ -6823,7 +7271,7 @@ npx claude-flow@v3alpha doctor --fix
|
|
|
6823
7271
|
|
|
6824
7272
|
### Configuration Migration
|
|
6825
7273
|
|
|
6826
|
-
**V2 Config (`.
|
|
7274
|
+
**V2 Config (`.ruflo/config.json`)**:
|
|
6827
7275
|
```json
|
|
6828
7276
|
{
|
|
6829
7277
|
"mode": "basic",
|
|
@@ -6855,7 +7303,7 @@ npx claude-flow@v3alpha doctor --fix
|
|
|
6855
7303
|
|
|
6856
7304
|
```typescript
|
|
6857
7305
|
// V2 (deprecated)
|
|
6858
|
-
import { ClaudeFlow, Agent, Memory } from '
|
|
7306
|
+
import { ClaudeFlow, Agent, Memory } from 'ruflo';
|
|
6859
7307
|
|
|
6860
7308
|
// V3 (new)
|
|
6861
7309
|
import { ClaudeFlowClient } from '@claude-flow/cli';
|
|
@@ -6870,10 +7318,10 @@ If migration fails, you can rollback:
|
|
|
6870
7318
|
|
|
6871
7319
|
```bash
|
|
6872
7320
|
# Check rollback options
|
|
6873
|
-
npx
|
|
7321
|
+
npx ruflo@v3alpha migrate rollback --list
|
|
6874
7322
|
|
|
6875
7323
|
# Rollback to V2
|
|
6876
|
-
npx
|
|
7324
|
+
npx ruflo@v3alpha migrate rollback --to v2
|
|
6877
7325
|
|
|
6878
7326
|
# Restore backup manually if needed
|
|
6879
7327
|
rm -rf ./data
|
|
@@ -6882,12 +7330,12 @@ cp -r ./data-backup-v2 ./data
|
|
|
6882
7330
|
|
|
6883
7331
|
### Post-Migration Checklist
|
|
6884
7332
|
|
|
6885
|
-
- [ ] Verify all agents spawn correctly: `npx
|
|
6886
|
-
- [ ] Check memory search works: `npx
|
|
6887
|
-
- [ ] Confirm MCP server starts: `npx
|
|
6888
|
-
- [ ] Run doctor diagnostics: `npx
|
|
6889
|
-
- [ ] Test a simple swarm: `npx
|
|
6890
|
-
- [ ] Bootstrap learning: `npx
|
|
7333
|
+
- [ ] Verify all agents spawn correctly: `npx ruflo@v3alpha agent list`
|
|
7334
|
+
- [ ] Check memory search works: `npx ruflo@v3alpha memory search -q "test"`
|
|
7335
|
+
- [ ] Confirm MCP server starts: `npx ruflo@v3alpha mcp start`
|
|
7336
|
+
- [ ] Run doctor diagnostics: `npx ruflo@v3alpha doctor`
|
|
7337
|
+
- [ ] Test a simple swarm: `npx ruflo@v3alpha swarm init --topology mesh`
|
|
7338
|
+
- [ ] Bootstrap learning: `npx ruflo@v3alpha hooks pretrain`
|
|
6891
7339
|
|
|
6892
7340
|
### Common Migration Issues
|
|
6893
7341
|
|