@sparkleideas/cli 3.1.0-alpha.21 → 3.1.0-alpha.23
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 +365 -0
- package/.claude/helpers/hook-handler.cjs +271 -0
- package/.claude/helpers/intelligence.cjs +916 -0
- package/.claude/helpers/learning-service.mjs +7 -7
- package/.claude/helpers/memory.js +1 -1
- package/.claude/helpers/metrics-db.mjs +4 -4
- package/.claude/helpers/session.js +9 -1
- package/.claude/helpers/statusline.cjs +100 -32
- package/.claude/helpers/statusline.js +2 -2
- package/.claude/settings.json +86 -141
- package/.claude/skills/reasoningbank-intelligence/SKILL.md +2 -2
- package/.claude/skills/skill-builder/.claude-flow/metrics/agent-metrics.json +1 -0
- package/.claude/skills/skill-builder/.claude-flow/metrics/performance.json +87 -0
- package/.claude/skills/skill-builder/.claude-flow/metrics/task-metrics.json +10 -0
- package/.claude/skills/swarm-orchestration/SKILL.md +1 -1
- package/README.md +952 -481
- package/bin/cli.js +2 -2
- package/bin/mcp-server.js +1 -1
- package/bin/preinstall.cjs +2 -0
- package/dist/src/appliance/rvfa-builder.js +4 -4
- package/dist/src/appliance/rvfa-format.d.ts +1 -1
- package/dist/src/appliance/rvfa-format.js +1 -1
- package/dist/src/appliance/rvfa-runner.js +8 -8
- package/dist/src/commands/agent.js +15 -15
- package/dist/src/commands/analyze.js +52 -52
- package/dist/src/commands/appliance-advanced.js +1 -1
- package/dist/src/commands/appliance.js +16 -16
- package/dist/src/commands/benchmark.js +14 -14
- package/dist/src/commands/categories.js +1 -1
- package/dist/src/commands/claims.js +16 -16
- package/dist/src/commands/completions.js +37 -37
- package/dist/src/commands/config.js +9 -9
- package/dist/src/commands/daemon.js +21 -21
- package/dist/src/commands/deployment.js +15 -15
- package/dist/src/commands/doctor.js +26 -26
- package/dist/src/commands/embeddings.js +48 -48
- package/dist/src/commands/guidance.js +22 -22
- package/dist/src/commands/hive-mind.js +21 -21
- package/dist/src/commands/hooks.js +105 -105
- package/dist/src/commands/init.js +32 -32
- package/dist/src/commands/issues.js +6 -6
- package/dist/src/commands/mcp.js +13 -13
- package/dist/src/commands/memory.js +35 -35
- package/dist/src/commands/migrate.js +6 -6
- package/dist/src/commands/neural.js +31 -31
- package/dist/src/commands/performance.js +13 -13
- package/dist/src/commands/plugins.js +26 -26
- package/dist/src/commands/process.js +32 -32
- package/dist/src/commands/progress.js +5 -5
- package/dist/src/commands/providers.js +13 -13
- package/dist/src/commands/route.js +26 -26
- package/dist/src/commands/ruvector/backup.js +9 -9
- package/dist/src/commands/ruvector/benchmark.js +4 -4
- package/dist/src/commands/ruvector/import.d.ts +3 -3
- package/dist/src/commands/ruvector/import.js +11 -11
- package/dist/src/commands/ruvector/index.js +9 -9
- package/dist/src/commands/ruvector/init.js +7 -7
- package/dist/src/commands/ruvector/migrate.js +5 -5
- package/dist/src/commands/ruvector/optimize.js +7 -7
- package/dist/src/commands/ruvector/setup.d.ts +3 -3
- package/dist/src/commands/ruvector/setup.js +9 -9
- package/dist/src/commands/ruvector/status.js +4 -4
- package/dist/src/commands/security.js +19 -19
- package/dist/src/commands/session.js +13 -13
- package/dist/src/commands/start.js +13 -13
- package/dist/src/commands/status.js +9 -9
- package/dist/src/commands/swarm.js +7 -7
- package/dist/src/commands/task.js +9 -9
- package/dist/src/commands/transfer-store.js +16 -16
- package/dist/src/commands/update.js +2 -2
- package/dist/src/commands/workflow.js +13 -13
- package/dist/src/config-adapter.js +3 -3
- package/dist/src/index.js +1 -1
- package/dist/src/init/claudemd-generator.js +1 -1
- package/dist/src/init/executor.js +6 -6
- package/dist/src/init/helpers-generator.js +4 -4
- package/dist/src/init/mcp-generator.js +7 -7
- package/dist/src/init/settings-generator.js +4 -4
- package/dist/src/init/statusline-generator.js +12 -12
- package/dist/src/init/types.d.ts +4 -4
- package/dist/src/init/types.js +3 -3
- package/dist/src/mcp-server.js +2 -2
- package/dist/src/mcp-tools/auto-install.js +5 -5
- package/dist/src/mcp-tools/hooks-tools.js +1 -1
- package/dist/src/mcp-tools/neural-tools.js +6 -6
- package/dist/src/mcp-tools/security-tools.js +2 -2
- package/dist/src/memory/memory-bridge.d.ts +4 -4
- package/dist/src/memory/memory-bridge.js +15 -15
- package/dist/src/memory/memory-initializer.js +10 -10
- package/dist/src/plugins/manager.js +8 -8
- package/dist/src/plugins/tests/demo-plugin-store.js +6 -6
- package/dist/src/ruvector/enhanced-model-router.js +3 -3
- package/dist/src/services/agentic-flow-bridge.d.ts +11 -11
- package/dist/src/services/agentic-flow-bridge.js +11 -11
- package/dist/src/services/container-worker-pool.js +2 -2
- package/dist/src/services/worker-queue.js +1 -1
- package/dist/src/suggest.js +1 -1
- package/dist/src/transfer/models/seraphine.js +1 -1
- package/dist/src/transfer/serialization/cfp.js +1 -1
- package/dist/src/transfer/store/discovery.js +1 -1
- package/dist/src/types.d.ts +1 -1
- package/dist/src/update/validator.js +1 -1
- package/package.json +10 -7
package/README.md
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
# 🌊
|
|
1
|
+
# 🌊 RuFlo v3.5: 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@latest 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@latest 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,14 +481,14 @@ curl ... | bash -s -- --full
|
|
|
475
481
|
|
|
476
482
|
```bash
|
|
477
483
|
# Quick start (no install needed)
|
|
478
|
-
npx
|
|
484
|
+
npx ruflo@latest init
|
|
479
485
|
|
|
480
486
|
# Or install globally
|
|
481
|
-
npm install -g
|
|
482
|
-
|
|
487
|
+
npm install -g ruflo@latest
|
|
488
|
+
ruflo init
|
|
483
489
|
|
|
484
490
|
# With Bun (faster)
|
|
485
|
-
bunx
|
|
491
|
+
bunx ruflo@latest init
|
|
486
492
|
```
|
|
487
493
|
|
|
488
494
|
#### Install Profiles
|
|
@@ -494,25 +500,25 @@ bunx claude-flow@alpha init
|
|
|
494
500
|
|
|
495
501
|
```bash
|
|
496
502
|
# Minimal install (skip ML/embeddings)
|
|
497
|
-
npm install -g
|
|
503
|
+
npm install -g ruflo@latest --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@latest init --codex
|
|
510
516
|
|
|
511
517
|
# Full Codex setup with all 137+ skills
|
|
512
|
-
npx
|
|
518
|
+
npx ruflo@latest init --codex --full
|
|
513
519
|
|
|
514
520
|
# Initialize for both platforms (dual mode)
|
|
515
|
-
npx
|
|
521
|
+
npx ruflo@latest init --dual
|
|
516
522
|
```
|
|
517
523
|
|
|
518
524
|
### Platform Comparison
|
|
@@ -570,16 +576,16 @@ wait # Wait for all to complete
|
|
|
570
576
|
|
|
571
577
|
```bash
|
|
572
578
|
# List collaboration templates
|
|
573
|
-
npx claude-flow
|
|
579
|
+
npx @claude-flow/codex dual templates
|
|
574
580
|
|
|
575
581
|
# Run feature development swarm (architect → coder → tester → reviewer)
|
|
576
|
-
npx claude-flow
|
|
582
|
+
npx @claude-flow/codex dual run --template feature --task "Add user auth"
|
|
577
583
|
|
|
578
584
|
# Run security audit swarm (scanner → analyzer → fixer)
|
|
579
|
-
npx claude-flow
|
|
585
|
+
npx @claude-flow/codex dual run --template security --task "src/auth/"
|
|
580
586
|
|
|
581
587
|
# Run refactoring swarm (analyzer → planner → refactorer → validator)
|
|
582
|
-
npx claude-flow
|
|
588
|
+
npx @claude-flow/codex dual run --template refactor --task "src/legacy/"
|
|
583
589
|
```
|
|
584
590
|
|
|
585
591
|
### Pre-Built Collaboration Templates
|
|
@@ -599,7 +605,7 @@ When you run `init --codex`, the MCP server is automatically registered:
|
|
|
599
605
|
codex mcp list
|
|
600
606
|
|
|
601
607
|
# If not present, add manually:
|
|
602
|
-
codex mcp add
|
|
608
|
+
codex mcp add ruflo -- npx ruflo mcp start
|
|
603
609
|
```
|
|
604
610
|
|
|
605
611
|
### Self-Learning Workflow
|
|
@@ -611,6 +617,13 @@ codex mcp add claude-flow -- npx claude-flow mcp start
|
|
|
611
617
|
4. REMEMBER: memory_store(key, value, namespace="patterns") → Save for future
|
|
612
618
|
```
|
|
613
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
|
+
|
|
614
627
|
### MCP Tools for Learning
|
|
615
628
|
|
|
616
629
|
| Tool | Purpose | When to Use |
|
|
@@ -636,7 +649,7 @@ codex mcp add claude-flow -- npx claude-flow mcp start
|
|
|
636
649
|
### Vector Search Details
|
|
637
650
|
|
|
638
651
|
- **Embedding Dimensions**: 384
|
|
639
|
-
- **Search Algorithm**: HNSW (
|
|
652
|
+
- **Search Algorithm**: HNSW (sub-millisecond)
|
|
640
653
|
- **Similarity Scoring**: 0-1 (higher = better)
|
|
641
654
|
- Score > 0.7: Strong match, use pattern
|
|
642
655
|
- Score 0.5-0.7: Partial match, adapt
|
|
@@ -648,46 +661,46 @@ codex mcp add claude-flow -- npx claude-flow mcp start
|
|
|
648
661
|
|
|
649
662
|
```bash
|
|
650
663
|
# Initialize project
|
|
651
|
-
npx
|
|
664
|
+
npx ruflo@latest init
|
|
652
665
|
|
|
653
666
|
# Start MCP server for Claude Code integration
|
|
654
|
-
npx
|
|
667
|
+
npx ruflo@latest mcp start
|
|
655
668
|
|
|
656
669
|
# Run a task with agents
|
|
657
|
-
npx
|
|
670
|
+
npx ruflo@latest --agent coder --task "Implement user authentication"
|
|
658
671
|
|
|
659
672
|
# List available agents
|
|
660
|
-
npx
|
|
673
|
+
npx ruflo@latest --list
|
|
661
674
|
```
|
|
662
675
|
|
|
663
676
|
### Upgrading
|
|
664
677
|
|
|
665
678
|
```bash
|
|
666
679
|
# Update helpers and statusline (preserves your data)
|
|
667
|
-
npx
|
|
680
|
+
npx ruflo@v3alpha init upgrade
|
|
668
681
|
|
|
669
682
|
# Update AND add any missing skills/agents/commands
|
|
670
|
-
npx
|
|
683
|
+
npx ruflo@v3alpha init upgrade --add-missing
|
|
671
684
|
```
|
|
672
685
|
|
|
673
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.
|
|
674
687
|
|
|
675
688
|
### Claude Code MCP Integration
|
|
676
689
|
|
|
677
|
-
Add
|
|
690
|
+
Add ruflo as an MCP server for seamless integration:
|
|
678
691
|
|
|
679
692
|
```bash
|
|
680
|
-
# Add
|
|
681
|
-
claude mcp add
|
|
693
|
+
# Add ruflo MCP server to Claude Code
|
|
694
|
+
claude mcp add ruflo -- npx -y ruflo@latest mcp start
|
|
682
695
|
|
|
683
696
|
# Verify installation
|
|
684
697
|
claude mcp list
|
|
685
698
|
```
|
|
686
699
|
|
|
687
|
-
Once added, Claude Code can use all 175+
|
|
700
|
+
Once added, Claude Code can use all 175+ ruflo MCP tools directly:
|
|
688
701
|
- `swarm_init` - Initialize agent swarms
|
|
689
702
|
- `agent_spawn` - Spawn specialized agents
|
|
690
|
-
- `memory_search` - Search patterns with HNSW
|
|
703
|
+
- `memory_search` - Search patterns with HNSW vector search
|
|
691
704
|
- `hooks_route` - Intelligent task routing
|
|
692
705
|
- And 170+ more tools...
|
|
693
706
|
|
|
@@ -695,13 +708,13 @@ Once added, Claude Code can use all 175+ claude-flow MCP tools directly:
|
|
|
695
708
|
## What is it exactly? Agents that learn, build and work perpetually.
|
|
696
709
|
|
|
697
710
|
<details>
|
|
698
|
-
<summary>🆚 <strong>Why
|
|
711
|
+
<summary>🆚 <strong>Why Ruflo v3?</strong></summary>
|
|
699
712
|
|
|
700
|
-
|
|
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.
|
|
701
714
|
|
|
702
715
|
#### 🧠 Neural & Learning
|
|
703
716
|
|
|
704
|
-
| Feature |
|
|
717
|
+
| Feature | Ruflo v3 | CrewAI | LangGraph | AutoGen | Manus |
|
|
705
718
|
|---------|----------------|--------|-----------|---------|-------|
|
|
706
719
|
| **Self-Learning** | ✅ SONA + EWC++ | ⛔ | ⛔ | ⛔ | ⛔ |
|
|
707
720
|
| **Prevents Forgetting** | ✅ EWC++ consolidation | ⛔ | ⛔ | ⛔ | ⛔ |
|
|
@@ -712,19 +725,22 @@ Claude-Flow v3 introduces **self-learning neural capabilities** that no other ag
|
|
|
712
725
|
|
|
713
726
|
#### 💾 Memory & Embeddings
|
|
714
727
|
|
|
715
|
-
| Feature |
|
|
728
|
+
| Feature | Ruflo v3 | CrewAI | LangGraph | AutoGen | Manus |
|
|
716
729
|
|---------|----------------|--------|-----------|---------|-------|
|
|
717
|
-
| **Vector Memory** | ✅ HNSW (
|
|
718
|
-
| **
|
|
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 | ⛔ | ⛔ |
|
|
719
735
|
| **Hyperbolic Embeddings** | ✅ Poincaré ball (native + SQL) | ⛔ | ⛔ | ⛔ | ⛔ |
|
|
720
|
-
| **Quantization** | ✅ Int8 (
|
|
736
|
+
| **Quantization** | ✅ Int8 (~4x savings) | ⛔ | ⛔ | ⛔ | ⛔ |
|
|
721
737
|
| **Persistent Memory** | ✅ SQLite + AgentDB + PostgreSQL | ⛔ | ⛔ | ⛔ | Limited |
|
|
722
738
|
| **Cross-Session Context** | ✅ Full restoration | ⛔ | ⛔ | ⛔ | ⛔ |
|
|
723
739
|
| **GNN/Attention in SQL** | ✅ 39 attention mechanisms | ⛔ | ⛔ | ⛔ | ⛔ |
|
|
724
740
|
|
|
725
741
|
#### 🐝 Swarm & Coordination
|
|
726
742
|
|
|
727
|
-
| Feature |
|
|
743
|
+
| Feature | Ruflo v3 | CrewAI | LangGraph | AutoGen | Manus |
|
|
728
744
|
|---------|----------------|--------|-----------|---------|-------|
|
|
729
745
|
| **Swarm Topologies** | ✅ 4 types | 1 | 1 | 1 | 1 |
|
|
730
746
|
| **Consensus Protocols** | ✅ 5 (Raft, BFT, etc.) | ⛔ | ⛔ | ⛔ | ⛔ |
|
|
@@ -734,7 +750,7 @@ Claude-Flow v3 introduces **self-learning neural capabilities** that no other ag
|
|
|
734
750
|
|
|
735
751
|
#### 🔧 Developer Experience
|
|
736
752
|
|
|
737
|
-
| Feature |
|
|
753
|
+
| Feature | Ruflo v3 | CrewAI | LangGraph | AutoGen | Manus |
|
|
738
754
|
|---------|----------------|--------|-----------|---------|-------|
|
|
739
755
|
| **MCP Integration** | ✅ Native (170+ tools) | ⛔ | ⛔ | ⛔ | ⛔ |
|
|
740
756
|
| **Skills System** | ✅ 42+ pre-built | ⛔ | ⛔ | ⛔ | Limited |
|
|
@@ -744,41 +760,41 @@ Claude-Flow v3 introduces **self-learning neural capabilities** that no other ag
|
|
|
744
760
|
|
|
745
761
|
#### 🛡️ Security & Platform
|
|
746
762
|
|
|
747
|
-
| Feature |
|
|
763
|
+
| Feature | Ruflo v3 | CrewAI | LangGraph | AutoGen | Manus |
|
|
748
764
|
|---------|----------------|--------|-----------|---------|-------|
|
|
749
765
|
| **Threat Detection** | ✅ AIDefence (<10ms) | ⛔ | ⛔ | ⛔ | ⛔ |
|
|
750
766
|
| **Cloud Platform** | ✅ Flow Nexus | ⛔ | ⛔ | ⛔ | ⛔ |
|
|
751
|
-
| **Code Transforms** | ✅ Agent Booster (
|
|
767
|
+
| **Code Transforms** | ✅ Agent Booster (WASM) | ⛔ | ⛔ | ⛔ | ⛔ |
|
|
752
768
|
| **Input Validation** | ✅ Zod + Path security | ⛔ | ⛔ | ⛔ | ⛔ |
|
|
753
769
|
|
|
754
|
-
<sub>*Comparison updated
|
|
770
|
+
<sub>*Comparison updated February 2026. Feature availability based on public documentation.*</sub>
|
|
755
771
|
|
|
756
772
|
</details>
|
|
757
773
|
|
|
758
774
|
<details>
|
|
759
775
|
<summary>🚀 <strong>Key Differentiators</strong> — Self-learning, memory optimization, fault tolerance</summary>
|
|
760
776
|
|
|
761
|
-
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.
|
|
762
778
|
|
|
763
779
|
| | Feature | What It Does | Technical Details |
|
|
764
780
|
|---|---------|--------------|-------------------|
|
|
765
|
-
| 🧠 | **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 |
|
|
766
782
|
| 🔒 | **EWC++** | Preserves learned patterns when training on new ones — no forgetting | Elastic Weight Consolidation prevents catastrophic forgetting |
|
|
767
783
|
| 🎯 | **MoE** | Routes tasks through 8 specialized expert networks based on task type | Mixture of 8 Experts with dynamic gating |
|
|
768
|
-
| ⚡ | **Flash Attention** | Accelerates attention computation
|
|
769
|
-
| 🌐 | **Hyperbolic Embeddings** | Represents hierarchical code relationships in compact vector space |
|
|
770
|
-
| 📦 | **LoRA** |
|
|
771
|
-
| 🗜️ | **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 |
|
|
772
788
|
| 🤝 | **Claims System** | Manages task ownership between humans and agents with handoff support | Work ownership with claim/release/handoff protocols |
|
|
773
789
|
| 🛡️ | **Byzantine Consensus** | Coordinates agents even when some fail or return bad results | Fault-tolerant, handles up to 1/3 failing agents |
|
|
774
|
-
| 🐘 | **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 |
|
|
775
791
|
|
|
776
792
|
</details>
|
|
777
793
|
|
|
778
794
|
<details>
|
|
779
795
|
<summary>💰 <strong>Intelligent 3-Tier Model Routing</strong> — Save 75% on API costs, extend Claude Max 2.5x</summary>
|
|
780
796
|
|
|
781
|
-
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.
|
|
782
798
|
|
|
783
799
|
**Cost & Usage Benefits:**
|
|
784
800
|
|
|
@@ -804,7 +820,7 @@ Not every task needs the most powerful (and expensive) model. Claude-Flow analyz
|
|
|
804
820
|
<details>
|
|
805
821
|
<summary>📋 <strong>Spec-Driven Development</strong> — Build complete specs, implement without drift</summary>
|
|
806
822
|
|
|
807
|
-
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.
|
|
808
824
|
|
|
809
825
|
**How It Prevents Drift:**
|
|
810
826
|
|
|
@@ -847,6 +863,8 @@ Complex projects fail when implementation drifts from the original plan. Claude-
|
|
|
847
863
|
- **ADR-008**: Vitest testing framework (10x faster than Jest)
|
|
848
864
|
- **ADR-009**: Hybrid Memory Backend (SQLite + HNSW)
|
|
849
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)
|
|
850
868
|
|
|
851
869
|
</details>
|
|
852
870
|
|
|
@@ -943,28 +961,32 @@ sequenceDiagram
|
|
|
943
961
|
</details>
|
|
944
962
|
|
|
945
963
|
<details>
|
|
946
|
-
<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>
|
|
947
965
|
|
|
948
966
|
```mermaid
|
|
949
967
|
flowchart LR
|
|
950
968
|
subgraph Input["📥 Input"]
|
|
951
969
|
Query[Query/Pattern]
|
|
970
|
+
Insight[New Insight]
|
|
952
971
|
end
|
|
953
972
|
|
|
954
973
|
subgraph Processing["⚙️ Processing"]
|
|
955
974
|
Embed[ONNX Embeddings]
|
|
956
975
|
Normalize[Normalization]
|
|
976
|
+
Learn[LearningBridge<br/>SONA + ReasoningBank]
|
|
957
977
|
end
|
|
958
978
|
|
|
959
979
|
subgraph Storage["💾 Storage"]
|
|
960
980
|
HNSW[(HNSW Index<br/>150x faster)]
|
|
961
981
|
SQLite[(SQLite Cache)]
|
|
962
982
|
AgentDB[(AgentDB)]
|
|
983
|
+
Graph[MemoryGraph<br/>PageRank + Communities]
|
|
963
984
|
end
|
|
964
985
|
|
|
965
986
|
subgraph Retrieval["🔍 Retrieval"]
|
|
966
987
|
Vector[Vector Search]
|
|
967
988
|
Semantic[Semantic Match]
|
|
989
|
+
Rank[Graph-Aware Ranking]
|
|
968
990
|
Results[Top-K Results]
|
|
969
991
|
end
|
|
970
992
|
|
|
@@ -972,11 +994,108 @@ flowchart LR
|
|
|
972
994
|
Embed --> Normalize
|
|
973
995
|
Normalize --> HNSW
|
|
974
996
|
Normalize --> SQLite
|
|
997
|
+
Insight --> Learn
|
|
998
|
+
Learn --> AgentDB
|
|
999
|
+
AgentDB --> Graph
|
|
975
1000
|
HNSW --> Vector
|
|
976
1001
|
SQLite --> Vector
|
|
977
1002
|
AgentDB --> Semantic
|
|
978
|
-
Vector -->
|
|
979
|
-
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
|
+
└─────────────────────────────────────────────┘
|
|
980
1099
|
```
|
|
981
1100
|
|
|
982
1101
|
</details>
|
|
@@ -1051,18 +1170,18 @@ flowchart TB
|
|
|
1051
1170
|
|
|
1052
1171
|
## 🔌 Setup & Configuration
|
|
1053
1172
|
|
|
1054
|
-
Connect
|
|
1173
|
+
Connect Ruflo to your development environment.
|
|
1055
1174
|
|
|
1056
1175
|
<details>
|
|
1057
|
-
<summary>🔌 <strong>MCP Setup</strong> — Connect
|
|
1176
|
+
<summary>🔌 <strong>MCP Setup</strong> — Connect Ruflo to Any AI Environment</summary>
|
|
1058
1177
|
|
|
1059
|
-
|
|
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.
|
|
1060
1179
|
|
|
1061
1180
|
### Quick Add Command
|
|
1062
1181
|
|
|
1063
1182
|
```bash
|
|
1064
|
-
# Start
|
|
1065
|
-
npx
|
|
1183
|
+
# Start Ruflo MCP server in any environment
|
|
1184
|
+
npx ruflo@v3alpha mcp start
|
|
1066
1185
|
```
|
|
1067
1186
|
|
|
1068
1187
|
<details open>
|
|
@@ -1077,9 +1196,9 @@ npx claude-flow@v3alpha mcp start
|
|
|
1077
1196
|
```json
|
|
1078
1197
|
{
|
|
1079
1198
|
"mcpServers": {
|
|
1080
|
-
"
|
|
1199
|
+
"ruflo": {
|
|
1081
1200
|
"command": "npx",
|
|
1082
|
-
"args": ["
|
|
1201
|
+
"args": ["ruflo@v3alpha", "mcp", "start"],
|
|
1083
1202
|
"env": {
|
|
1084
1203
|
"ANTHROPIC_API_KEY": "sk-ant-..."
|
|
1085
1204
|
}
|
|
@@ -1099,12 +1218,12 @@ Restart Claude Desktop after saving. Look for the MCP indicator (hammer icon) in
|
|
|
1099
1218
|
|
|
1100
1219
|
```bash
|
|
1101
1220
|
# Add via CLI (recommended)
|
|
1102
|
-
claude mcp add
|
|
1221
|
+
claude mcp add ruflo -- npx ruflo@v3alpha mcp start
|
|
1103
1222
|
|
|
1104
1223
|
# Or add with environment variables
|
|
1105
|
-
claude mcp add
|
|
1224
|
+
claude mcp add ruflo \
|
|
1106
1225
|
--env ANTHROPIC_API_KEY=sk-ant-... \
|
|
1107
|
-
-- npx
|
|
1226
|
+
-- npx ruflo@v3alpha mcp start
|
|
1108
1227
|
|
|
1109
1228
|
# Verify installation
|
|
1110
1229
|
claude mcp list
|
|
@@ -1131,9 +1250,9 @@ Create `.vscode/mcp.json` in your project:
|
|
|
1131
1250
|
```json
|
|
1132
1251
|
{
|
|
1133
1252
|
"mcpServers": {
|
|
1134
|
-
"
|
|
1253
|
+
"ruflo": {
|
|
1135
1254
|
"command": "npx",
|
|
1136
|
-
"args": ["
|
|
1255
|
+
"args": ["ruflo@v3alpha", "mcp", "start"],
|
|
1137
1256
|
"env": {
|
|
1138
1257
|
"ANTHROPIC_API_KEY": "sk-ant-..."
|
|
1139
1258
|
}
|
|
@@ -1158,9 +1277,9 @@ Create `.cursor/mcp.json` in your project (or global config):
|
|
|
1158
1277
|
```json
|
|
1159
1278
|
{
|
|
1160
1279
|
"mcpServers": {
|
|
1161
|
-
"
|
|
1280
|
+
"ruflo": {
|
|
1162
1281
|
"command": "npx",
|
|
1163
|
-
"args": ["
|
|
1282
|
+
"args": ["ruflo@v3alpha", "mcp", "start"],
|
|
1164
1283
|
"env": {
|
|
1165
1284
|
"ANTHROPIC_API_KEY": "sk-ant-..."
|
|
1166
1285
|
}
|
|
@@ -1185,9 +1304,9 @@ Create `.cursor/mcp.json` in your project (or global config):
|
|
|
1185
1304
|
```json
|
|
1186
1305
|
{
|
|
1187
1306
|
"mcpServers": {
|
|
1188
|
-
"
|
|
1307
|
+
"ruflo": {
|
|
1189
1308
|
"command": "npx",
|
|
1190
|
-
"args": ["
|
|
1309
|
+
"args": ["ruflo@v3alpha", "mcp", "start"],
|
|
1191
1310
|
"env": {
|
|
1192
1311
|
"ANTHROPIC_API_KEY": "sk-ant-..."
|
|
1193
1312
|
}
|
|
@@ -1214,11 +1333,11 @@ Click **Refresh** in the MCP settings to connect. Windsurf supports up to 100 MC
|
|
|
1214
1333
|
|
|
1215
1334
|
**Remote Server Setup:**
|
|
1216
1335
|
|
|
1217
|
-
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:
|
|
1218
1337
|
|
|
1219
1338
|
```bash
|
|
1220
1339
|
# Start with HTTP transport
|
|
1221
|
-
npx
|
|
1340
|
+
npx ruflo@v3alpha mcp start --transport http --port 3000
|
|
1222
1341
|
```
|
|
1223
1342
|
|
|
1224
1343
|
Then add the server URL in ChatGPT Connectors settings.
|
|
@@ -1234,7 +1353,7 @@ Google AI Studio supports MCP natively since May 2025, with managed MCP servers
|
|
|
1234
1353
|
|
|
1235
1354
|
**Using MCP SuperAssistant Extension:**
|
|
1236
1355
|
1. Install [MCP SuperAssistant](https://chrome.google.com/webstore) Chrome extension
|
|
1237
|
-
2. Configure your
|
|
1356
|
+
2. Configure your ruflo MCP server
|
|
1238
1357
|
3. Use with Google AI Studio, Gemini, and other AI platforms
|
|
1239
1358
|
|
|
1240
1359
|
**Native SDK Integration:**
|
|
@@ -1247,9 +1366,9 @@ const ai = new GoogleGenAI({ apiKey: 'YOUR_API_KEY' });
|
|
|
1247
1366
|
// MCP definitions are natively supported in the Gen AI SDK
|
|
1248
1367
|
const mcpConfig = {
|
|
1249
1368
|
servers: [{
|
|
1250
|
-
name: '
|
|
1369
|
+
name: 'ruflo',
|
|
1251
1370
|
command: 'npx',
|
|
1252
|
-
args: ['
|
|
1371
|
+
args: ['ruflo@v3alpha', 'mcp', 'start']
|
|
1253
1372
|
}]
|
|
1254
1373
|
};
|
|
1255
1374
|
```
|
|
@@ -1270,9 +1389,9 @@ JetBrains AI Assistant supports MCP for IntelliJ IDEA, PyCharm, WebStorm, and ot
|
|
|
1270
1389
|
|
|
1271
1390
|
```json
|
|
1272
1391
|
{
|
|
1273
|
-
"name": "
|
|
1392
|
+
"name": "ruflo",
|
|
1274
1393
|
"command": "npx",
|
|
1275
|
-
"args": ["
|
|
1394
|
+
"args": ["ruflo@v3alpha", "mcp", "start"]
|
|
1276
1395
|
}
|
|
1277
1396
|
```
|
|
1278
1397
|
|
|
@@ -1502,16 +1621,16 @@ The Hive Mind system implements queen-led hierarchical coordination where strate
|
|
|
1502
1621
|
|
|
1503
1622
|
**CLI Commands:**
|
|
1504
1623
|
```bash
|
|
1505
|
-
npx
|
|
1506
|
-
npx
|
|
1507
|
-
npx
|
|
1508
|
-
npx
|
|
1509
|
-
npx
|
|
1510
|
-
npx
|
|
1511
|
-
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
|
|
1512
1631
|
```
|
|
1513
1632
|
|
|
1514
|
-
**Performance:**
|
|
1633
|
+
**Performance:** Fast batch spawning with parallel agent coordination
|
|
1515
1634
|
|
|
1516
1635
|
</details>
|
|
1517
1636
|
|
|
@@ -1522,8 +1641,8 @@ Native integration with Claude Code's experimental Agent Teams feature for spawn
|
|
|
1522
1641
|
|
|
1523
1642
|
**Enable Agent Teams:**
|
|
1524
1643
|
```bash
|
|
1525
|
-
# Automatically enabled with
|
|
1526
|
-
npx
|
|
1644
|
+
# Automatically enabled with ruflo init
|
|
1645
|
+
npx ruflo@latest init
|
|
1527
1646
|
|
|
1528
1647
|
# Or manually add to .claude/settings.json
|
|
1529
1648
|
{
|
|
@@ -1575,10 +1694,10 @@ TeamDelete()
|
|
|
1575
1694
|
|
|
1576
1695
|
```bash
|
|
1577
1696
|
# Handle idle teammate
|
|
1578
|
-
npx
|
|
1697
|
+
npx ruflo@latest hooks teammate-idle --auto-assign true
|
|
1579
1698
|
|
|
1580
1699
|
# Handle task completion
|
|
1581
|
-
npx
|
|
1700
|
+
npx ruflo@latest hooks task-completed --task-id <id> --train-patterns
|
|
1582
1701
|
```
|
|
1583
1702
|
|
|
1584
1703
|
**Display Modes:** `auto` (default), `in-process`, `tmux` (split-pane)
|
|
@@ -1655,14 +1774,14 @@ Build custom plugins with the fluent builder API. Create MCP tools, hooks, worke
|
|
|
1655
1774
|
|
|
1656
1775
|
### 📦 Available Optional Plugins
|
|
1657
1776
|
|
|
1658
|
-
Install these optional plugins to extend
|
|
1777
|
+
Install these optional plugins to extend Ruflo capabilities:
|
|
1659
1778
|
|
|
1660
1779
|
| Plugin | Version | Description | Install Command |
|
|
1661
1780
|
|--------|---------|-------------|-----------------|
|
|
1662
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` |
|
|
1663
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` |
|
|
1664
|
-
| **@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
|
|
1665
|
-
| **@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` |
|
|
1666
1785
|
|
|
1667
1786
|
#### 🏥 Domain-Specific Plugins
|
|
1668
1787
|
|
|
@@ -1732,7 +1851,7 @@ npm install @claude-flow/plugin-agentic-qe
|
|
|
1732
1851
|
npm install @claude-flow/plugin-prime-radiant
|
|
1733
1852
|
|
|
1734
1853
|
# Install Gas Town Bridge plugin (WASM-accelerated orchestration)
|
|
1735
|
-
npx
|
|
1854
|
+
npx ruflo@latest plugins install -n @claude-flow/plugin-gastown-bridge
|
|
1736
1855
|
|
|
1737
1856
|
# Install domain-specific plugins
|
|
1738
1857
|
npm install @claude-flow/plugin-healthcare-clinical
|
|
@@ -1751,7 +1870,7 @@ npm install @claude-flow/plugin-quantum-optimizer
|
|
|
1751
1870
|
npm install @claude-flow/plugin-hyperbolic-reasoning
|
|
1752
1871
|
|
|
1753
1872
|
# List all installed plugins
|
|
1754
|
-
npx
|
|
1873
|
+
npx ruflo plugins list --installed
|
|
1755
1874
|
```
|
|
1756
1875
|
|
|
1757
1876
|
</details>
|
|
@@ -1920,8 +2039,8 @@ Workers run automatically based on context, or dispatch manually via MCP tools.
|
|
|
1920
2039
|
| **TestGaps** | `testgaps` | Test coverage analysis | Code changes without tests |
|
|
1921
2040
|
|
|
1922
2041
|
```bash
|
|
1923
|
-
npx
|
|
1924
|
-
npx
|
|
2042
|
+
npx ruflo@v3alpha worker dispatch --trigger audit --context "./src"
|
|
2043
|
+
npx ruflo@v3alpha worker status
|
|
1925
2044
|
```
|
|
1926
2045
|
|
|
1927
2046
|
</details>
|
|
@@ -1929,14 +2048,14 @@ npx claude-flow@v3alpha worker status
|
|
|
1929
2048
|
<details>
|
|
1930
2049
|
<summary>☁️ <strong>LLM Providers</strong> — 6 providers with automatic failover</summary>
|
|
1931
2050
|
|
|
1932
|
-
| Provider | Models
|
|
2051
|
+
| Provider | Models | Features | Cost |
|
|
1933
2052
|
|----------|--------|----------|------|
|
|
1934
|
-
| **Anthropic** | Claude Opus 4
|
|
1935
|
-
| **OpenAI** | GPT-
|
|
1936
|
-
| **Google** | Gemini
|
|
1937
|
-
| **xAI** | Grok
|
|
1938
|
-
| **Mistral** | Mistral Large
|
|
1939
|
-
| **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 |
|
|
1940
2059
|
|
|
1941
2060
|
<details>
|
|
1942
2061
|
<summary>⚖️ <strong>Provider Load Balancing</strong> — 4 strategies for optimal cost and performance</summary>
|
|
@@ -2145,7 +2264,7 @@ npx claude-flow@v3alpha worker status
|
|
|
2145
2264
|
| Feature | Description | Performance |
|
|
2146
2265
|
|---------|-------------|-------------|
|
|
2147
2266
|
| **Multi-Provider** | Agentic-Flow (ONNX), OpenAI, Transformers.js, Mock | 4 providers |
|
|
2148
|
-
| **Auto-Install** | `
|
|
2267
|
+
| **Auto-Install** | `ruflo embeddings init` or `createEmbeddingServiceAsync()` | Zero config |
|
|
2149
2268
|
| **75x Faster** | Agentic-flow ONNX SIMD vs Transformers.js | 3ms vs 230ms |
|
|
2150
2269
|
| **Hyperbolic Space** | Poincaré ball model for hierarchical data | Exponential capacity |
|
|
2151
2270
|
| **Dimensions** | 384 to 3072 configurable | Quality vs speed tradeoff |
|
|
@@ -2155,13 +2274,13 @@ npx claude-flow@v3alpha worker status
|
|
|
2155
2274
|
|
|
2156
2275
|
```bash
|
|
2157
2276
|
# Initialize ONNX embeddings with hyperbolic config
|
|
2158
|
-
|
|
2277
|
+
ruflo embeddings init
|
|
2159
2278
|
|
|
2160
2279
|
# Use larger model for higher quality
|
|
2161
|
-
|
|
2280
|
+
ruflo embeddings init --model all-mpnet-base-v2
|
|
2162
2281
|
|
|
2163
2282
|
# Semantic search
|
|
2164
|
-
|
|
2283
|
+
ruflo embeddings search -q "authentication patterns"
|
|
2165
2284
|
```
|
|
2166
2285
|
|
|
2167
2286
|
| Mode | Adaptation | Quality | Memory | Use Case |
|
|
@@ -2198,22 +2317,22 @@ claude-flow embeddings search -q "authentication patterns"
|
|
|
2198
2317
|
|
|
2199
2318
|
```bash
|
|
2200
2319
|
# Initialize RuVector in PostgreSQL
|
|
2201
|
-
|
|
2320
|
+
ruflo ruvector init --database mydb --user admin
|
|
2202
2321
|
|
|
2203
2322
|
# Check connection and schema status
|
|
2204
|
-
|
|
2323
|
+
ruflo ruvector status --verbose
|
|
2205
2324
|
|
|
2206
2325
|
# Run pending migrations
|
|
2207
|
-
|
|
2326
|
+
ruflo ruvector migrate --up
|
|
2208
2327
|
|
|
2209
2328
|
# Performance benchmark
|
|
2210
|
-
|
|
2329
|
+
ruflo ruvector benchmark --iterations 1000
|
|
2211
2330
|
|
|
2212
2331
|
# Optimize indices and vacuum
|
|
2213
|
-
|
|
2332
|
+
ruflo ruvector optimize --analyze
|
|
2214
2333
|
|
|
2215
2334
|
# Backup vector data
|
|
2216
|
-
|
|
2335
|
+
ruflo ruvector backup --output ./backup.sql
|
|
2217
2336
|
```
|
|
2218
2337
|
|
|
2219
2338
|
| Migration | Purpose | Features |
|
|
@@ -2245,15 +2364,15 @@ claude-flow ruvector backup --output ./backup.sql
|
|
|
2245
2364
|
|
|
2246
2365
|
**Quick Commands:**
|
|
2247
2366
|
```bash
|
|
2248
|
-
npx
|
|
2249
|
-
npx
|
|
2250
|
-
npx
|
|
2251
|
-
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
|
|
2252
2371
|
```
|
|
2253
2372
|
|
|
2254
|
-
**
|
|
2373
|
+
**Ruflo Skill:** `/hive-mind-advanced` — Full hive mind orchestration
|
|
2255
2374
|
|
|
2256
|
-
**Performance:**
|
|
2375
|
+
**Performance:** Fast batch spawning with token reduction via intelligent routing
|
|
2257
2376
|
|
|
2258
2377
|
</details>
|
|
2259
2378
|
|
|
@@ -2359,85 +2478,83 @@ npx claude-flow hive-mind status # Check status
|
|
|
2359
2478
|
<details>
|
|
2360
2479
|
<summary>📊 <strong>V3 Statusline</strong> — Real-time development status for Claude Code</summary>
|
|
2361
2480
|
|
|
2362
|
-
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.
|
|
2363
2486
|
|
|
2364
2487
|
**Output Format:**
|
|
2365
2488
|
```
|
|
2366
|
-
▊
|
|
2367
|
-
|
|
2368
|
-
🏗️ DDD Domains [●●●●●] 5/5 ⚡ 1.0x → 2.49x-7.47x
|
|
2369
|
-
🤖 Swarm ◉ [58/15] 👥 0 🟢 CVE 3/3 💾 22282MB 📂 47% 🧠 10%
|
|
2370
|
-
🔧 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
|
|
2371
2491
|
```
|
|
2372
2492
|
|
|
2373
|
-
| Indicator | Description |
|
|
2493
|
+
| Indicator | Description | Source |
|
|
2374
2494
|
|-----------|-------------|--------|
|
|
2375
|
-
| `▊
|
|
2376
|
-
| `● ruvnet` | GitHub user
|
|
2377
|
-
| `⎇
|
|
2378
|
-
| `Opus 4.
|
|
2379
|
-
| `
|
|
2380
|
-
|
|
|
2381
|
-
|
|
|
2382
|
-
| `
|
|
2383
|
-
|
|
|
2384
|
-
|
|
|
2385
|
-
|
|
|
2386
|
-
|
|
|
2387
|
-
|
|
|
2388
|
-
|
|
|
2389
|
-
|
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
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@latest 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
|
+
```
|
|
2400
2524
|
|
|
2401
|
-
|
|
2402
|
-
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.
|
|
2403
2526
|
|
|
2404
|
-
|
|
2405
|
-
npx claude-flow@v3alpha hooks statusline --json
|
|
2527
|
+
**For Existing Users:**
|
|
2406
2528
|
|
|
2407
|
-
|
|
2408
|
-
|
|
2529
|
+
If your statusline is not updating, run the upgrade command to regenerate helpers and fix the config:
|
|
2530
|
+
```bash
|
|
2531
|
+
npx ruflo@latest init --update --settings
|
|
2409
2532
|
```
|
|
2410
2533
|
|
|
2411
|
-
|
|
2534
|
+
This removes invalid config fields and regenerates the statusline helper with stdin support.
|
|
2412
2535
|
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
| Option | Description |
|
|
2416
|
-
|--------|-------------|
|
|
2417
|
-
| (default) | Safe multi-line with collision zone avoidance |
|
|
2418
|
-
| `--single` | Single-line output (complete collision avoidance) |
|
|
2419
|
-
| `--legacy` | Original multi-line (may cause bleeding) |
|
|
2420
|
-
| `--json` | JSON output with pretty printing |
|
|
2421
|
-
| `--compact` | JSON output without formatting |
|
|
2536
|
+
**Stdin JSON Protocol:**
|
|
2422
2537
|
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
Add to `.claude/settings.json`:
|
|
2538
|
+
Claude Code provides session data via stdin in this format:
|
|
2426
2539
|
```json
|
|
2427
2540
|
{
|
|
2428
|
-
"
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
}
|
|
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"
|
|
2432
2546
|
}
|
|
2433
2547
|
```
|
|
2434
2548
|
|
|
2549
|
+
The statusline script reads stdin synchronously, falls back to local detection when run manually (TTY mode).
|
|
2550
|
+
|
|
2435
2551
|
**Data Sources:**
|
|
2436
|
-
-
|
|
2437
|
-
- `.claude-flow/metrics/
|
|
2438
|
-
- `.claude-flow/
|
|
2439
|
-
- `.claude-flow/
|
|
2440
|
-
-
|
|
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
|
|
2441
2558
|
- Git branch via `git branch --show-current`
|
|
2442
2559
|
- GitHub user via `gh api user`
|
|
2443
2560
|
|
|
@@ -2461,19 +2578,19 @@ Cross-platform TypeScript-based daemon service with auto-scheduling:
|
|
|
2461
2578
|
**Commands:**
|
|
2462
2579
|
```bash
|
|
2463
2580
|
# Start daemon (auto-runs on SessionStart hooks)
|
|
2464
|
-
npx
|
|
2581
|
+
npx ruflo@v3alpha daemon start
|
|
2465
2582
|
|
|
2466
2583
|
# Check status with worker history
|
|
2467
|
-
npx
|
|
2584
|
+
npx ruflo@v3alpha daemon status
|
|
2468
2585
|
|
|
2469
2586
|
# Manually trigger a worker
|
|
2470
|
-
npx
|
|
2587
|
+
npx ruflo@v3alpha daemon trigger map
|
|
2471
2588
|
|
|
2472
2589
|
# Enable/disable workers
|
|
2473
|
-
npx
|
|
2590
|
+
npx ruflo@v3alpha daemon enable map audit optimize
|
|
2474
2591
|
|
|
2475
2592
|
# Stop daemon
|
|
2476
|
-
npx
|
|
2593
|
+
npx ruflo@v3alpha daemon stop
|
|
2477
2594
|
```
|
|
2478
2595
|
|
|
2479
2596
|
**Daemon Status Output:**
|
|
@@ -2547,7 +2664,7 @@ Shell-based daemons for monitoring (Linux/macOS only):
|
|
|
2547
2664
|
<details>
|
|
2548
2665
|
<summary>⌨️ <strong>V3 CLI Commands</strong> — 26 commands with 140+ subcommands</summary>
|
|
2549
2666
|
|
|
2550
|
-
Complete command-line interface for all
|
|
2667
|
+
Complete command-line interface for all Ruflo operations.
|
|
2551
2668
|
|
|
2552
2669
|
**Core Commands:**
|
|
2553
2670
|
|
|
@@ -2589,25 +2706,25 @@ Complete command-line interface for all Claude-Flow operations.
|
|
|
2589
2706
|
|
|
2590
2707
|
```bash
|
|
2591
2708
|
# Initialize project with wizard
|
|
2592
|
-
npx
|
|
2709
|
+
npx ruflo@v3alpha init --wizard
|
|
2593
2710
|
|
|
2594
2711
|
# Start daemon with background workers
|
|
2595
|
-
npx
|
|
2712
|
+
npx ruflo@v3alpha daemon start
|
|
2596
2713
|
|
|
2597
2714
|
# Spawn an agent with specific type
|
|
2598
|
-
npx
|
|
2715
|
+
npx ruflo@v3alpha agent spawn -t coder --name my-coder
|
|
2599
2716
|
|
|
2600
2717
|
# Initialize swarm with V3 mode
|
|
2601
|
-
npx
|
|
2718
|
+
npx ruflo@v3alpha swarm init --v3-mode
|
|
2602
2719
|
|
|
2603
2720
|
# Search memory (HNSW-indexed, 150x faster)
|
|
2604
|
-
npx
|
|
2721
|
+
npx ruflo@v3alpha memory search -q "authentication patterns"
|
|
2605
2722
|
|
|
2606
2723
|
# Run security scan
|
|
2607
|
-
npx
|
|
2724
|
+
npx ruflo@v3alpha security scan --depth full
|
|
2608
2725
|
|
|
2609
2726
|
# Performance benchmark
|
|
2610
|
-
npx
|
|
2727
|
+
npx ruflo@v3alpha performance benchmark --suite all
|
|
2611
2728
|
```
|
|
2612
2729
|
|
|
2613
2730
|
</details>
|
|
@@ -2615,7 +2732,7 @@ npx claude-flow@v3alpha performance benchmark --suite all
|
|
|
2615
2732
|
<details>
|
|
2616
2733
|
<summary>🩺 <strong>Doctor Health Checks</strong> — System diagnostics with auto-fix</summary>
|
|
2617
2734
|
|
|
2618
|
-
Run `npx
|
|
2735
|
+
Run `npx ruflo@v3alpha doctor` to diagnose and fix common issues.
|
|
2619
2736
|
|
|
2620
2737
|
**Health Checks Performed:**
|
|
2621
2738
|
|
|
@@ -2636,22 +2753,22 @@ Run `npx claude-flow@v3alpha doctor` to diagnose and fix common issues.
|
|
|
2636
2753
|
|
|
2637
2754
|
```bash
|
|
2638
2755
|
# Run full diagnostics
|
|
2639
|
-
npx
|
|
2756
|
+
npx ruflo@v3alpha doctor
|
|
2640
2757
|
|
|
2641
2758
|
# Run diagnostics with auto-fix
|
|
2642
|
-
npx
|
|
2759
|
+
npx ruflo@v3alpha doctor --fix
|
|
2643
2760
|
|
|
2644
2761
|
# Check specific component
|
|
2645
|
-
npx
|
|
2762
|
+
npx ruflo@v3alpha doctor --component memory
|
|
2646
2763
|
|
|
2647
2764
|
# Verbose output
|
|
2648
|
-
npx
|
|
2765
|
+
npx ruflo@v3alpha doctor --verbose
|
|
2649
2766
|
```
|
|
2650
2767
|
|
|
2651
2768
|
**Output Example:**
|
|
2652
2769
|
|
|
2653
2770
|
```
|
|
2654
|
-
🩺
|
|
2771
|
+
🩺 Ruflo Doctor v3.0.0-alpha
|
|
2655
2772
|
|
|
2656
2773
|
✅ Node.js 20.11.0 (required: 20+)
|
|
2657
2774
|
✅ npm 10.2.4 (required: 9+)
|
|
@@ -2695,16 +2812,16 @@ The embeddings package (v3.0.0-alpha.12) provides high-performance vector embedd
|
|
|
2695
2812
|
|
|
2696
2813
|
```bash
|
|
2697
2814
|
# Initialize embeddings system
|
|
2698
|
-
npx
|
|
2815
|
+
npx ruflo@v3alpha embeddings init
|
|
2699
2816
|
|
|
2700
2817
|
# Generate embedding for text
|
|
2701
|
-
npx
|
|
2818
|
+
npx ruflo@v3alpha embeddings embed "authentication patterns"
|
|
2702
2819
|
|
|
2703
2820
|
# Batch embed multiple texts
|
|
2704
|
-
npx
|
|
2821
|
+
npx ruflo@v3alpha embeddings batch --file texts.txt
|
|
2705
2822
|
|
|
2706
2823
|
# Search with semantic similarity
|
|
2707
|
-
npx
|
|
2824
|
+
npx ruflo@v3alpha embeddings search "login flow" --top-k 5
|
|
2708
2825
|
```
|
|
2709
2826
|
|
|
2710
2827
|
**Programmatic:**
|
|
@@ -2741,59 +2858,303 @@ Real-world scenarios and pre-built workflows for common tasks.
|
|
|
2741
2858
|
|
|
2742
2859
|
| Scenario | What It Solves | How To Do It |
|
|
2743
2860
|
|----------|----------------|--------------|
|
|
2744
|
-
| **Code Review** | Get thorough reviews with security, performance, and style checks | `npx
|
|
2745
|
-
| **Test Generation** | Auto-generate unit, integration, and e2e tests for existing code | `npx
|
|
2746
|
-
| **Refactoring** | Safely restructure code while maintaining behavior | `npx
|
|
2747
|
-
| **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"` |
|
|
2748
2865
|
|
|
2749
2866
|
### 🔒 Security & Compliance
|
|
2750
2867
|
|
|
2751
2868
|
| Scenario | What It Solves | How To Do It |
|
|
2752
2869
|
|----------|----------------|--------------|
|
|
2753
|
-
| **Security Audit** | Find vulnerabilities before attackers do | `npx
|
|
2754
|
-
| **Dependency Scan** | Identify vulnerable packages and suggest upgrades | `npx
|
|
2755
|
-
| **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"` |
|
|
2756
2873
|
|
|
2757
2874
|
### 🐝 Multi-Agent Swarms
|
|
2758
2875
|
|
|
2759
2876
|
| Scenario | What It Solves | How To Do It |
|
|
2760
2877
|
|----------|----------------|--------------|
|
|
2761
|
-
| **Feature Development** | Coordinate multiple agents on complex features | `npx
|
|
2762
|
-
| **Large Refactors** | Parallel refactoring across many files without conflicts | `npx
|
|
2763
|
-
| **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` |
|
|
2764
2881
|
|
|
2765
2882
|
### 📊 Performance & Optimization
|
|
2766
2883
|
|
|
2767
2884
|
| Scenario | What It Solves | How To Do It |
|
|
2768
2885
|
|----------|----------------|--------------|
|
|
2769
|
-
| **Performance Profiling** | Find and fix bottlenecks in your application | `npx
|
|
2770
|
-
| **Query Optimization** | Speed up slow database queries | `npx
|
|
2771
|
-
| **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"` |
|
|
2772
2889
|
|
|
2773
2890
|
### 🔄 GitHub & DevOps
|
|
2774
2891
|
|
|
2775
2892
|
| Scenario | What It Solves | How To Do It |
|
|
2776
2893
|
|----------|----------------|--------------|
|
|
2777
|
-
| **PR Management** | Review, approve, and merge PRs efficiently | `npx
|
|
2778
|
-
| **Issue Triage** | Categorize, prioritize, and assign issues automatically | `npx
|
|
2779
|
-
| **Release Management** | Coordinate releases with changelogs and versioning | `npx
|
|
2780
|
-
| **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"` |
|
|
2781
2898
|
|
|
2782
2899
|
### 📋 Spec-Driven Development
|
|
2783
2900
|
|
|
2784
2901
|
| Scenario | What It Solves | How To Do It |
|
|
2785
2902
|
|----------|----------------|--------------|
|
|
2786
|
-
| **Generate Specs** | Create complete specifications before coding | `npx
|
|
2787
|
-
| **Validate Implementation** | Ensure code matches specifications | `npx
|
|
2788
|
-
| **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` |
|
|
2789
2906
|
|
|
2790
2907
|
### 🧠 Learning & Intelligence
|
|
2791
2908
|
|
|
2792
2909
|
| Scenario | What It Solves | How To Do It |
|
|
2793
2910
|
|----------|----------------|--------------|
|
|
2794
|
-
| **Bootstrap Intelligence** | Train the system on your codebase patterns | `npx
|
|
2795
|
-
| **Optimize Routing** | Improve task-to-agent matching over time | `npx
|
|
2796
|
-
| **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)
|
|
3028
|
+
|
|
3029
|
+
</details>
|
|
3030
|
+
|
|
3031
|
+
---
|
|
3032
|
+
|
|
3033
|
+
## 💾 Storage: RVF (RuVector Format)
|
|
3034
|
+
|
|
3035
|
+
Ruflo uses RVF — a compact binary storage format that replaces the 18MB sql.js WASM dependency with pure TypeScript. No native compilation, no WASM downloads, works everywhere Node.js runs.
|
|
3036
|
+
|
|
3037
|
+
<details>
|
|
3038
|
+
<summary>💾 <strong>RVF Storage</strong> — Binary format, vector search, migration, and auto-selection</summary>
|
|
3039
|
+
|
|
3040
|
+
### Why RVF?
|
|
3041
|
+
|
|
3042
|
+
Previous versions shipped sql.js (18MB WASM blob) for persistent storage. This caused slow cold starts, large installs, and compatibility issues on ARM/Alpine. RVF eliminates all of that:
|
|
3043
|
+
|
|
3044
|
+
| | Before (sql.js) | After (RVF) |
|
|
3045
|
+
|---|---|---|
|
|
3046
|
+
| **Install size** | +18MB WASM | 0 extra deps |
|
|
3047
|
+
| **Cold start** | ~2s (WASM compile) | <50ms |
|
|
3048
|
+
| **Platform support** | x86/ARM issues | Runs everywhere |
|
|
3049
|
+
| **Native deps** | Optional hnswlib-node | Pure TypeScript fallback |
|
|
3050
|
+
|
|
3051
|
+
### How it works
|
|
3052
|
+
|
|
3053
|
+
RVF files use a simple binary layout: a 4-byte magic header (`RVF\0`), a JSON metadata section, then packed entries. Each module has its own format variant:
|
|
3054
|
+
|
|
3055
|
+
| Format | Magic Bytes | Used By | Purpose |
|
|
3056
|
+
|--------|-------------|---------|---------|
|
|
3057
|
+
| `RVF\0` | `0x52564600` | Memory backend | Entries + HNSW index |
|
|
3058
|
+
| `RVEC` | `0x52564543` | Embedding cache | Cached vectors with LRU eviction |
|
|
3059
|
+
| `RVFL` | `0x5256464C` | Event log | Append-only domain events |
|
|
3060
|
+
| `RVLS` | — | Learning store | SONA patterns + trajectories |
|
|
3061
|
+
|
|
3062
|
+
### Storage auto-selection
|
|
3063
|
+
|
|
3064
|
+
You don't need to pick a backend. The `DatabaseProvider` tries each option in order and uses the first one available:
|
|
3065
|
+
|
|
3066
|
+
```
|
|
3067
|
+
RVF (pure TypeScript) → better-sqlite3 (native) → sql.js (WASM) → JSON (fallback)
|
|
3068
|
+
```
|
|
3069
|
+
|
|
3070
|
+
RVF is always available since it has zero dependencies, so it wins by default. If you have `better-sqlite3` installed (e.g., for advanced queries), it gets priority.
|
|
3071
|
+
|
|
3072
|
+
### Vector search with HnswLite
|
|
3073
|
+
|
|
3074
|
+
RVF includes `HnswLite` — a pure TypeScript implementation of the HNSW (Hierarchical Navigable Small World) algorithm for fast nearest-neighbor search. It's used automatically when storing entries with embeddings.
|
|
3075
|
+
|
|
3076
|
+
```typescript
|
|
3077
|
+
import { RvfBackend } from '@claude-flow/memory';
|
|
3078
|
+
|
|
3079
|
+
const backend = new RvfBackend({ databasePath: './memory.rvf' });
|
|
3080
|
+
await backend.initialize();
|
|
3081
|
+
|
|
3082
|
+
// Store entries — embeddings are indexed automatically
|
|
3083
|
+
await backend.store({ id: '1', key: 'auth-pattern', content: '...', embedding: vector });
|
|
3084
|
+
|
|
3085
|
+
// Search by similarity
|
|
3086
|
+
const results = await backend.search({ embedding: queryVector, limit: 10 });
|
|
3087
|
+
```
|
|
3088
|
+
|
|
3089
|
+
Supports cosine, dot product, and Euclidean distance metrics. For large datasets (100K+ entries), install `hnswlib-node` for the native implementation — the backend switches automatically.
|
|
3090
|
+
|
|
3091
|
+
### Migrating from older formats
|
|
3092
|
+
|
|
3093
|
+
The `RvfMigrator` converts between JSON files, SQLite databases, and RVF:
|
|
3094
|
+
|
|
3095
|
+
```typescript
|
|
3096
|
+
import { RvfMigrator } from '@claude-flow/memory';
|
|
3097
|
+
|
|
3098
|
+
// Auto-detect format and migrate
|
|
3099
|
+
await RvfMigrator.autoMigrate('./old-memory.db', './memory.rvf');
|
|
3100
|
+
|
|
3101
|
+
// Or be explicit
|
|
3102
|
+
await RvfMigrator.fromJsonFile('./backup.json', './memory.rvf');
|
|
3103
|
+
await RvfMigrator.fromSqlite('./legacy.db', './memory.rvf');
|
|
3104
|
+
|
|
3105
|
+
// Export back to JSON for inspection
|
|
3106
|
+
await RvfMigrator.toJsonFile('./memory.rvf', './export.json');
|
|
3107
|
+
```
|
|
3108
|
+
|
|
3109
|
+
Format detection works by reading the first few bytes of the file — no file extension guessing.
|
|
3110
|
+
|
|
3111
|
+
### Crash safety
|
|
3112
|
+
|
|
3113
|
+
All write operations use atomic writes: data goes to a temporary file first, then a single `rename()` call swaps it into place. If the process crashes mid-write, the old file stays intact.
|
|
3114
|
+
|
|
3115
|
+
- **Memory backend**: `file.rvf.tmp` → `file.rvf`
|
|
3116
|
+
- **Embedding cache**: `file.rvec.tmp.{random}` → `file.rvec`
|
|
3117
|
+
- **Event log**: Append-only (no overwrite needed)
|
|
3118
|
+
|
|
3119
|
+
### SONA learning persistence
|
|
3120
|
+
|
|
3121
|
+
The `PersistentSonaCoordinator` stores learning patterns and trajectories in RVF format, so agents retain knowledge across sessions:
|
|
3122
|
+
|
|
3123
|
+
```typescript
|
|
3124
|
+
import { PersistentSonaCoordinator } from '@claude-flow/memory';
|
|
3125
|
+
|
|
3126
|
+
const sona = new PersistentSonaCoordinator({
|
|
3127
|
+
storePath: './data/sona-learning.rvls',
|
|
3128
|
+
});
|
|
3129
|
+
await sona.initialize();
|
|
3130
|
+
|
|
3131
|
+
// Patterns survive restarts
|
|
3132
|
+
const similar = sona.findSimilarPatterns(embedding, 5);
|
|
3133
|
+
sona.storePattern('routing', embedding);
|
|
3134
|
+
await sona.shutdown(); // persists to disk
|
|
3135
|
+
```
|
|
3136
|
+
|
|
3137
|
+
### Security
|
|
3138
|
+
|
|
3139
|
+
RVF validates inputs at every boundary:
|
|
3140
|
+
|
|
3141
|
+
- **Path validation** — null bytes and traversal attempts are rejected
|
|
3142
|
+
- **Header validation** — corrupted files are detected before parsing
|
|
3143
|
+
- **Payload limits** — event log entries cap at 100MB to prevent memory exhaustion
|
|
3144
|
+
- **Dimension validation** — embedding dimensions must be between 1 and 10,000
|
|
3145
|
+
- **Concurrent write protection** — a lock flag prevents overlapping disk flushes
|
|
3146
|
+
|
|
3147
|
+
### Configuration
|
|
3148
|
+
|
|
3149
|
+
```bash
|
|
3150
|
+
# Environment variables
|
|
3151
|
+
CLAUDE_FLOW_MEMORY_BACKEND=hybrid # auto-selects RVF
|
|
3152
|
+
CLAUDE_FLOW_MEMORY_PATH=./data/memory
|
|
3153
|
+
|
|
3154
|
+
# Or via CLI
|
|
3155
|
+
ruflo memory init --force
|
|
3156
|
+
ruflo config set memory.backend hybrid
|
|
3157
|
+
```
|
|
2797
3158
|
|
|
2798
3159
|
</details>
|
|
2799
3160
|
|
|
@@ -2851,7 +3212,7 @@ When hooks run, they emit signals that guide routing decisions. Watch for these
|
|
|
2851
3212
|
|
|
2852
3213
|
**Example Hook Output:**
|
|
2853
3214
|
```bash
|
|
2854
|
-
$ npx
|
|
3215
|
+
$ npx ruflo@v3alpha hooks pre-task --description "convert var to const in utils.ts"
|
|
2855
3216
|
|
|
2856
3217
|
[AGENT_BOOSTER_AVAILABLE] Intent: var-to-const
|
|
2857
3218
|
Recommendation: Use Edit tool directly
|
|
@@ -2859,6 +3220,101 @@ Performance: <1ms (352x faster than LLM)
|
|
|
2859
3220
|
Cost: $0
|
|
2860
3221
|
```
|
|
2861
3222
|
|
|
3223
|
+
### Intelligence Loop (ADR-050)
|
|
3224
|
+
|
|
3225
|
+
The intelligence loop wires PageRank-ranked memory into the hook system. Every session builds a knowledge graph that improves over time:
|
|
3226
|
+
|
|
3227
|
+
```
|
|
3228
|
+
SessionStart:
|
|
3229
|
+
session-restore → intelligence.init()
|
|
3230
|
+
→ Read MEMORY.md / auto-memory-store.json
|
|
3231
|
+
→ Build graph (nodes + similarity/temporal edges)
|
|
3232
|
+
→ Compute PageRank
|
|
3233
|
+
→ "[INTELLIGENCE] Loaded 13 patterns, 12 edges"
|
|
3234
|
+
|
|
3235
|
+
UserPrompt:
|
|
3236
|
+
route → intelligence.getContext(prompt)
|
|
3237
|
+
→ Jaccard-match prompt against pre-ranked entries
|
|
3238
|
+
→ Inject top-5 patterns into Claude's context:
|
|
3239
|
+
|
|
3240
|
+
[INTELLIGENCE] Relevant patterns for this task:
|
|
3241
|
+
* (0.95) HNSW gives 150x-12,500x speedup [rank #1, 12x accessed]
|
|
3242
|
+
* (0.88) London School TDD preferred [rank #3, 8x accessed]
|
|
3243
|
+
|
|
3244
|
+
PostEdit:
|
|
3245
|
+
post-edit → intelligence.recordEdit(file)
|
|
3246
|
+
→ Append to pending-insights.jsonl (<2ms)
|
|
3247
|
+
|
|
3248
|
+
SessionEnd:
|
|
3249
|
+
session-end → intelligence.consolidate()
|
|
3250
|
+
→ Process pending insights (3+ edits → new entry)
|
|
3251
|
+
→ Confidence boost for accessed patterns (+0.03)
|
|
3252
|
+
→ Confidence decay for unused patterns (-0.005/day)
|
|
3253
|
+
→ Recompute PageRank, rebuild edges
|
|
3254
|
+
→ Save snapshot for trend tracking
|
|
3255
|
+
```
|
|
3256
|
+
|
|
3257
|
+
**Measuring improvement:**
|
|
3258
|
+
|
|
3259
|
+
```bash
|
|
3260
|
+
# Human-readable diagnostics
|
|
3261
|
+
node .claude/helpers/hook-handler.cjs stats
|
|
3262
|
+
|
|
3263
|
+
# JSON output for scripting
|
|
3264
|
+
node .claude/helpers/hook-handler.cjs stats --json
|
|
3265
|
+
|
|
3266
|
+
# Or via intelligence.cjs directly
|
|
3267
|
+
node .claude/helpers/intelligence.cjs stats
|
|
3268
|
+
```
|
|
3269
|
+
|
|
3270
|
+
The stats command shows:
|
|
3271
|
+
|
|
3272
|
+
| Section | What It Tells You |
|
|
3273
|
+
|---------|-------------------|
|
|
3274
|
+
| **Graph** | Node/edge count, density % |
|
|
3275
|
+
| **Confidence** | Min/max/mean/median across all patterns |
|
|
3276
|
+
| **Access** | Total accesses, patterns used vs never accessed |
|
|
3277
|
+
| **PageRank** | Sum (~1.0), highest-ranked node |
|
|
3278
|
+
| **Top Patterns** | Top 10 by composite score with access counts |
|
|
3279
|
+
| **Last Delta** | Changes since previous session (confidence shift, access delta) |
|
|
3280
|
+
| **Trend** | Over all sessions: IMPROVING / DECLINING / STABLE |
|
|
3281
|
+
|
|
3282
|
+
**Example output:**
|
|
3283
|
+
```
|
|
3284
|
+
+--------------------------------------------------------------+
|
|
3285
|
+
| Intelligence Diagnostics (ADR-050) |
|
|
3286
|
+
+--------------------------------------------------------------+
|
|
3287
|
+
|
|
3288
|
+
Graph
|
|
3289
|
+
Nodes: 9
|
|
3290
|
+
Edges: 8 (7 temporal, 1 similar)
|
|
3291
|
+
Density: 22.2%
|
|
3292
|
+
|
|
3293
|
+
Confidence
|
|
3294
|
+
Min: 0.490 Max: 0.600
|
|
3295
|
+
Mean: 0.556 Median: 0.580
|
|
3296
|
+
|
|
3297
|
+
Access
|
|
3298
|
+
Total accesses: 11
|
|
3299
|
+
Patterns used: 6/9
|
|
3300
|
+
Never accessed: 3
|
|
3301
|
+
|
|
3302
|
+
Top Patterns (by composite score)
|
|
3303
|
+
#1 HNSW gives 150x-12,500x speedup
|
|
3304
|
+
conf=0.600 pr=0.2099 score=0.3659 accessed=2x
|
|
3305
|
+
#2 London School TDD preferred
|
|
3306
|
+
conf=0.600 pr=0.1995 score=0.3597 accessed=2x
|
|
3307
|
+
|
|
3308
|
+
Last Delta (5m ago)
|
|
3309
|
+
Confidence: +0.0300
|
|
3310
|
+
Accesses: +6
|
|
3311
|
+
|
|
3312
|
+
Trend (3 snapshots)
|
|
3313
|
+
Confidence drift: +0.0422
|
|
3314
|
+
Direction: IMPROVING
|
|
3315
|
+
+--------------------------------------------------------------+
|
|
3316
|
+
```
|
|
3317
|
+
|
|
2862
3318
|
### All 27 Hooks by Category
|
|
2863
3319
|
|
|
2864
3320
|
#### 🔧 Tool Lifecycle Hooks (6 hooks)
|
|
@@ -2874,8 +3330,8 @@ Cost: $0
|
|
|
2874
3330
|
|
|
2875
3331
|
```bash
|
|
2876
3332
|
# Example: Edit with pattern learning
|
|
2877
|
-
npx
|
|
2878
|
-
npx
|
|
3333
|
+
npx ruflo@v3alpha hooks pre-edit ./src/auth.ts
|
|
3334
|
+
npx ruflo@v3alpha hooks post-edit ./src/auth.ts --success true --train-patterns
|
|
2879
3335
|
```
|
|
2880
3336
|
|
|
2881
3337
|
#### 🧠 Intelligence & Routing Hooks (8 hooks)
|
|
@@ -2893,10 +3349,10 @@ npx claude-flow@v3alpha hooks post-edit ./src/auth.ts --success true --train-pat
|
|
|
2893
3349
|
|
|
2894
3350
|
```bash
|
|
2895
3351
|
# Route a task with explanation
|
|
2896
|
-
npx
|
|
3352
|
+
npx ruflo@v3alpha hooks route "refactor authentication to use JWT" --include-explanation
|
|
2897
3353
|
|
|
2898
3354
|
# Bootstrap intelligence from your codebase
|
|
2899
|
-
npx
|
|
3355
|
+
npx ruflo@v3alpha hooks pretrain --depth deep --model-type moe
|
|
2900
3356
|
```
|
|
2901
3357
|
|
|
2902
3358
|
#### 📅 Session Management Hooks (4 hooks)
|
|
@@ -2910,10 +3366,10 @@ npx claude-flow@v3alpha hooks pretrain --depth deep --model-type moe
|
|
|
2910
3366
|
|
|
2911
3367
|
```bash
|
|
2912
3368
|
# Start session with auto-daemon
|
|
2913
|
-
npx
|
|
3369
|
+
npx ruflo@v3alpha hooks session-start --session-id "feature-auth" --start-daemon
|
|
2914
3370
|
|
|
2915
3371
|
# End session and export learnings
|
|
2916
|
-
npx
|
|
3372
|
+
npx ruflo@v3alpha hooks session-end --export-metrics --persist-patterns
|
|
2917
3373
|
```
|
|
2918
3374
|
|
|
2919
3375
|
#### 🤖 Intelligence System Hooks (9 hooks)
|
|
@@ -2927,18 +3383,22 @@ npx claude-flow@v3alpha hooks session-end --export-metrics --persist-patterns
|
|
|
2927
3383
|
| `trajectory-end` | RL | Finish recording, trigger learning |
|
|
2928
3384
|
| `pattern-store` | Memory | Store a pattern with HNSW indexing |
|
|
2929
3385
|
| `pattern-search` | Memory | Find similar patterns (150x faster) |
|
|
2930
|
-
| `stats` | Analytics |
|
|
3386
|
+
| `stats` | Analytics | Intelligence diagnostics, confidence trends, improvement tracking |
|
|
2931
3387
|
| `attention` | Focus | Compute attention-weighted similarity |
|
|
2932
3388
|
|
|
2933
3389
|
```bash
|
|
2934
3390
|
# Start trajectory for complex task
|
|
2935
|
-
npx
|
|
3391
|
+
npx ruflo@v3alpha hooks intelligence trajectory-start --task "implement OAuth2"
|
|
2936
3392
|
|
|
2937
3393
|
# Record successful action
|
|
2938
|
-
npx
|
|
3394
|
+
npx ruflo@v3alpha hooks intelligence trajectory-step --action "created token service" --quality 0.9
|
|
2939
3395
|
|
|
2940
3396
|
# End trajectory and trigger learning
|
|
2941
|
-
npx
|
|
3397
|
+
npx ruflo@v3alpha hooks intelligence trajectory-end --success true
|
|
3398
|
+
|
|
3399
|
+
# View intelligence diagnostics and improvement trends (ADR-050)
|
|
3400
|
+
node .claude/helpers/hook-handler.cjs stats
|
|
3401
|
+
node .claude/helpers/intelligence.cjs stats --json
|
|
2942
3402
|
```
|
|
2943
3403
|
|
|
2944
3404
|
### 12 Background Workers (Auto-Triggered)
|
|
@@ -2962,13 +3422,13 @@ Workers run automatically based on context, or dispatch manually.
|
|
|
2962
3422
|
|
|
2963
3423
|
```bash
|
|
2964
3424
|
# List all workers
|
|
2965
|
-
npx
|
|
3425
|
+
npx ruflo@v3alpha hooks worker list
|
|
2966
3426
|
|
|
2967
3427
|
# Manually dispatch security audit
|
|
2968
|
-
npx
|
|
3428
|
+
npx ruflo@v3alpha hooks worker dispatch --trigger audit --context "./src/auth"
|
|
2969
3429
|
|
|
2970
3430
|
# Check worker status
|
|
2971
|
-
npx
|
|
3431
|
+
npx ruflo@v3alpha hooks worker status
|
|
2972
3432
|
```
|
|
2973
3433
|
|
|
2974
3434
|
### Model Routing Hooks (3 hooks)
|
|
@@ -2983,10 +3443,10 @@ Automatically selects haiku/sonnet/opus based on task complexity.
|
|
|
2983
3443
|
|
|
2984
3444
|
```bash
|
|
2985
3445
|
# Get model recommendation
|
|
2986
|
-
npx
|
|
3446
|
+
npx ruflo@v3alpha hooks model-route --task "fix typo in README"
|
|
2987
3447
|
# → Recommends: haiku (simple task, low complexity)
|
|
2988
3448
|
|
|
2989
|
-
npx
|
|
3449
|
+
npx ruflo@v3alpha hooks model-route --task "design distributed consensus system"
|
|
2990
3450
|
# → Recommends: opus (complex architecture, high reasoning)
|
|
2991
3451
|
```
|
|
2992
3452
|
|
|
@@ -3006,22 +3466,27 @@ npx claude-flow@v3alpha hooks model-route --task "design distributed consensus s
|
|
|
3006
3466
|
# MOST COMMON HOOKS
|
|
3007
3467
|
# ══════════════════════════════════════════════════════════════════
|
|
3008
3468
|
|
|
3009
|
-
# Route task to best agent
|
|
3010
|
-
npx
|
|
3469
|
+
# Route task to best agent (with intelligence context injection)
|
|
3470
|
+
npx ruflo@v3alpha hooks route "<task>" --include-explanation
|
|
3011
3471
|
|
|
3012
3472
|
# Start/end session with learning
|
|
3013
|
-
npx
|
|
3014
|
-
npx
|
|
3473
|
+
npx ruflo@v3alpha hooks session-start --start-daemon
|
|
3474
|
+
npx ruflo@v3alpha hooks session-end --persist-patterns
|
|
3015
3475
|
|
|
3016
3476
|
# View what the system has learned
|
|
3017
|
-
npx
|
|
3018
|
-
npx
|
|
3477
|
+
npx ruflo@v3alpha hooks metrics
|
|
3478
|
+
npx ruflo@v3alpha hooks intelligence stats
|
|
3479
|
+
|
|
3480
|
+
# Intelligence diagnostics — see if intelligence is improving
|
|
3481
|
+
node .claude/helpers/hook-handler.cjs stats # Human-readable
|
|
3482
|
+
node .claude/helpers/hook-handler.cjs stats --json # JSON for scripting
|
|
3483
|
+
node .claude/helpers/intelligence.cjs stats # Direct access
|
|
3019
3484
|
|
|
3020
3485
|
# Bootstrap on new project
|
|
3021
|
-
npx
|
|
3486
|
+
npx ruflo@v3alpha hooks pretrain --depth deep
|
|
3022
3487
|
|
|
3023
3488
|
# Dispatch background worker
|
|
3024
|
-
npx
|
|
3489
|
+
npx ruflo@v3alpha hooks worker dispatch --trigger audit
|
|
3025
3490
|
```
|
|
3026
3491
|
|
|
3027
3492
|
</details>
|
|
@@ -3047,38 +3512,38 @@ Share learned patterns across projects, teams, and the community via the decentr
|
|
|
3047
3512
|
|
|
3048
3513
|
```bash
|
|
3049
3514
|
# Export learned patterns to file
|
|
3050
|
-
npx
|
|
3515
|
+
npx ruflo@v3alpha memory export --format json --output ./patterns.json
|
|
3051
3516
|
|
|
3052
3517
|
# Export specific namespace
|
|
3053
|
-
npx
|
|
3518
|
+
npx ruflo@v3alpha memory export --namespace "security" --output ./security-patterns.json
|
|
3054
3519
|
|
|
3055
3520
|
# Export with embeddings (larger file, faster import)
|
|
3056
|
-
npx
|
|
3521
|
+
npx ruflo@v3alpha memory export --include-embeddings --output ./full-export.json
|
|
3057
3522
|
|
|
3058
3523
|
# Export agent configurations
|
|
3059
|
-
npx
|
|
3524
|
+
npx ruflo@v3alpha config export --scope project --output ./agent-configs.json
|
|
3060
3525
|
|
|
3061
3526
|
# Export session state
|
|
3062
|
-
npx
|
|
3527
|
+
npx ruflo@v3alpha session export --session-id "my-session" --output ./session.json
|
|
3063
3528
|
```
|
|
3064
3529
|
|
|
3065
3530
|
### Import Commands
|
|
3066
3531
|
|
|
3067
3532
|
```bash
|
|
3068
3533
|
# Import patterns from file
|
|
3069
|
-
npx
|
|
3534
|
+
npx ruflo@v3alpha memory import --input ./patterns.json
|
|
3070
3535
|
|
|
3071
3536
|
# Import and merge with existing (don't overwrite)
|
|
3072
|
-
npx
|
|
3537
|
+
npx ruflo@v3alpha memory import --input ./patterns.json --merge
|
|
3073
3538
|
|
|
3074
3539
|
# Import from another project
|
|
3075
|
-
npx
|
|
3540
|
+
npx ruflo@v3alpha hooks transfer --source-path ../other-project
|
|
3076
3541
|
|
|
3077
3542
|
# Import agent configurations
|
|
3078
|
-
npx
|
|
3543
|
+
npx ruflo@v3alpha config import --input ./agent-configs.json --scope project
|
|
3079
3544
|
|
|
3080
3545
|
# Restore session
|
|
3081
|
-
npx
|
|
3546
|
+
npx ruflo@v3alpha session restore --session-id "my-session"
|
|
3082
3547
|
```
|
|
3083
3548
|
|
|
3084
3549
|
### Pattern Store (IPFS Marketplace)
|
|
@@ -3096,13 +3561,13 @@ Decentralized pattern marketplace for sharing and discovering community patterns
|
|
|
3096
3561
|
|
|
3097
3562
|
```bash
|
|
3098
3563
|
# Search for authentication patterns
|
|
3099
|
-
npx
|
|
3564
|
+
npx ruflo@v3alpha transfer-store search --query "authentication" --min-rating 4.0
|
|
3100
3565
|
|
|
3101
3566
|
# Download a pattern
|
|
3102
|
-
npx
|
|
3567
|
+
npx ruflo@v3alpha transfer-store download --id "auth-jwt-patterns-v2" --verify
|
|
3103
3568
|
|
|
3104
3569
|
# Publish your patterns
|
|
3105
|
-
npx
|
|
3570
|
+
npx ruflo@v3alpha transfer-store publish --input ./my-patterns.json --category "security"
|
|
3106
3571
|
```
|
|
3107
3572
|
|
|
3108
3573
|
### Plugin Store
|
|
@@ -3120,22 +3585,22 @@ Discover and install community plugins from the **live IPFS registry** with 19 o
|
|
|
3120
3585
|
|
|
3121
3586
|
```bash
|
|
3122
3587
|
# List plugins with live ratings from Cloud Function
|
|
3123
|
-
npx
|
|
3588
|
+
npx ruflo@v3alpha plugins list
|
|
3124
3589
|
|
|
3125
3590
|
# Filter by type
|
|
3126
|
-
npx
|
|
3591
|
+
npx ruflo@v3alpha plugins list --type integration
|
|
3127
3592
|
|
|
3128
3593
|
# Rate a plugin
|
|
3129
|
-
npx
|
|
3594
|
+
npx ruflo@v3alpha plugins rate --name @claude-flow/embeddings --rating 5
|
|
3130
3595
|
|
|
3131
3596
|
# Search for MCP tool plugins
|
|
3132
|
-
npx
|
|
3597
|
+
npx ruflo@v3alpha transfer plugin-search --type "mcp-tool" --verified
|
|
3133
3598
|
|
|
3134
3599
|
# Get plugin info
|
|
3135
|
-
npx
|
|
3600
|
+
npx ruflo@v3alpha transfer plugin-info --name "semantic-code-search"
|
|
3136
3601
|
|
|
3137
3602
|
# List official plugins
|
|
3138
|
-
npx
|
|
3603
|
+
npx ruflo@v3alpha transfer plugin-official
|
|
3139
3604
|
```
|
|
3140
3605
|
|
|
3141
3606
|
#### Live IPFS Plugin Registry
|
|
@@ -3168,10 +3633,10 @@ Patterns and models are distributed via IPFS for decentralization and integrity.
|
|
|
3168
3633
|
|
|
3169
3634
|
```bash
|
|
3170
3635
|
# Resolve IPNS name to CID
|
|
3171
|
-
npx
|
|
3636
|
+
npx ruflo@v3alpha transfer ipfs-resolve --name "/ipns/patterns.ruflo.io"
|
|
3172
3637
|
|
|
3173
3638
|
# Detect PII before publishing
|
|
3174
|
-
npx
|
|
3639
|
+
npx ruflo@v3alpha transfer detect-pii --content "$(cat ./patterns.json)"
|
|
3175
3640
|
```
|
|
3176
3641
|
|
|
3177
3642
|
### Model & Learning Pattern Import/Export
|
|
@@ -3194,7 +3659,7 @@ curl -X POST "https://api.pinata.cloud/pinning/pinJSONToIPFS" \
|
|
|
3194
3659
|
"name": "my-patterns",
|
|
3195
3660
|
"patterns": [...]
|
|
3196
3661
|
},
|
|
3197
|
-
"pinataMetadata": {"name": "
|
|
3662
|
+
"pinataMetadata": {"name": "ruflo-learning-pattern"}
|
|
3198
3663
|
}'
|
|
3199
3664
|
|
|
3200
3665
|
# Import a pattern from IPFS CID
|
|
@@ -3236,13 +3701,13 @@ Import pre-trained learning patterns for common tasks. **90.5% average accuracy*
|
|
|
3236
3701
|
curl -s "https://gateway.pinata.cloud/ipfs/QmNr1yYMKi7YBaL8JSztQyuB5ZUaTdRMLxJC1pBpGbjsTc" | jq '.models[].name'
|
|
3237
3702
|
|
|
3238
3703
|
# Import all models
|
|
3239
|
-
npx
|
|
3704
|
+
npx ruflo@v3alpha transfer import --cid QmNr1yYMKi7YBaL8JSztQyuB5ZUaTdRMLxJC1pBpGbjsTc
|
|
3240
3705
|
|
|
3241
3706
|
# Import specific category
|
|
3242
|
-
npx
|
|
3707
|
+
npx ruflo@v3alpha neural import --model security-review-patterns --source ipfs
|
|
3243
3708
|
|
|
3244
3709
|
# Use patterns in routing
|
|
3245
|
-
npx
|
|
3710
|
+
npx ruflo@v3alpha hooks route --task "review authentication code" --use-patterns
|
|
3246
3711
|
```
|
|
3247
3712
|
|
|
3248
3713
|
#### Benefits vs Fresh Install
|
|
@@ -3267,7 +3732,7 @@ npx claude-flow@v3alpha hooks route --task "review authentication code" --use-pa
|
|
|
3267
3732
|
|
|
3268
3733
|
```bash
|
|
3269
3734
|
# Install a pattern pack
|
|
3270
|
-
npx
|
|
3735
|
+
npx ruflo@v3alpha transfer-store download --id "security-essentials" --apply
|
|
3271
3736
|
```
|
|
3272
3737
|
|
|
3273
3738
|
### RuVector WASM Neural Training
|
|
@@ -3285,25 +3750,25 @@ Real WASM-accelerated neural training using `@ruvector/learning-wasm` and `@ruve
|
|
|
3285
3750
|
|
|
3286
3751
|
```bash
|
|
3287
3752
|
# List available pre-trained models from IPFS registry
|
|
3288
|
-
npx
|
|
3753
|
+
npx ruflo@v3alpha neural list
|
|
3289
3754
|
|
|
3290
3755
|
# List models by category
|
|
3291
|
-
npx
|
|
3756
|
+
npx ruflo@v3alpha neural list --category security
|
|
3292
3757
|
|
|
3293
3758
|
# Train with WASM acceleration
|
|
3294
|
-
npx
|
|
3759
|
+
npx ruflo@v3alpha neural train -p coordination -e 100 --wasm --flash --contrastive
|
|
3295
3760
|
|
|
3296
3761
|
# Train security patterns
|
|
3297
|
-
npx
|
|
3762
|
+
npx ruflo@v3alpha neural train -p security --wasm --contrastive
|
|
3298
3763
|
|
|
3299
3764
|
# Benchmark WASM performance
|
|
3300
|
-
npx
|
|
3765
|
+
npx ruflo@v3alpha neural benchmark -d 256 -i 1000
|
|
3301
3766
|
|
|
3302
3767
|
# Import pre-trained models
|
|
3303
|
-
npx
|
|
3768
|
+
npx ruflo@v3alpha neural import --cid QmNr1yYMKi7YBaL8JSztQyuB5ZUaTdRMLxJC1pBpGbjsTc
|
|
3304
3769
|
|
|
3305
3770
|
# Export trained patterns to IPFS
|
|
3306
|
-
npx
|
|
3771
|
+
npx ruflo@v3alpha neural export --ipfs --sign
|
|
3307
3772
|
```
|
|
3308
3773
|
|
|
3309
3774
|
#### Benchmark Results
|
|
@@ -3511,7 +3976,7 @@ Skills are **reusable workflows** that combine agents, hooks, and patterns into
|
|
|
3511
3976
|
| Skill | What It Does | When To Use |
|
|
3512
3977
|
|-------|--------------|-------------|
|
|
3513
3978
|
| `agentdb-vector-search` | Semantic search with 150x faster retrieval | Building RAG systems, knowledge bases |
|
|
3514
|
-
| `agentdb-memory-patterns` | Session memory,
|
|
3979
|
+
| `agentdb-memory-patterns` | Session memory, persistent storage, context management | Stateful agents, chat systems |
|
|
3515
3980
|
| `agentdb-learning` | 9 RL algorithms (PPO, DQN, SARSA, etc.) | Self-learning agents, behavior optimization |
|
|
3516
3981
|
| `agentdb-optimization` | Quantization (4-32x memory reduction), HNSW indexing | Scaling to millions of vectors |
|
|
3517
3982
|
| `agentdb-advanced` | QUIC sync, multi-database, custom distance metrics | Distributed AI systems |
|
|
@@ -3622,7 +4087,7 @@ Skills are **reusable workflows** that combine agents, hooks, and patterns into
|
|
|
3622
4087
|
|
|
3623
4088
|
| Skill | What It Does | When To Use |
|
|
3624
4089
|
|-------|--------------|-------------|
|
|
3625
|
-
| `agentic-jujutsu` |
|
|
4090
|
+
| `agentic-jujutsu` | Self-learning version control for AI agents | Multi-agent coordination |
|
|
3626
4091
|
| `worker-benchmarks` | Performance benchmarking framework | Measuring improvements |
|
|
3627
4092
|
| `worker-integration` | Worker-agent coordination patterns | Background processing |
|
|
3628
4093
|
|
|
@@ -3642,9 +4107,9 @@ Skills are **reusable workflows** that combine agents, hooks, and patterns into
|
|
|
3642
4107
|
/v3-security-overhaul
|
|
3643
4108
|
|
|
3644
4109
|
# Via CLI
|
|
3645
|
-
npx
|
|
3646
|
-
npx
|
|
3647
|
-
npx
|
|
4110
|
+
npx ruflo@v3alpha skill run github-code-review
|
|
4111
|
+
npx ruflo@v3alpha skill list
|
|
4112
|
+
npx ruflo@v3alpha skill info sparc-methodology
|
|
3648
4113
|
```
|
|
3649
4114
|
|
|
3650
4115
|
### Creating Custom Skills
|
|
@@ -3701,21 +4166,21 @@ The Claims system manages **who is working on what** — whether human or agent.
|
|
|
3701
4166
|
|
|
3702
4167
|
| Command | What It Does | Example |
|
|
3703
4168
|
|---------|--------------|---------|
|
|
3704
|
-
| `issues list` | See all issues and their status | `npx
|
|
3705
|
-
| `issues claim` | Claim an issue for yourself/agent | `npx
|
|
3706
|
-
| `issues release` | Release your claim | `npx
|
|
3707
|
-
| `issues handoff` | Hand off to another worker | `npx
|
|
3708
|
-
| `issues status` | Update progress on claimed work | `npx
|
|
3709
|
-
| `issues stealable` | List abandoned/stuck issues | `npx
|
|
3710
|
-
| `issues steal` | Take over stealable issue | `npx
|
|
3711
|
-
| `issues load` | View agent workloads | `npx
|
|
3712
|
-
| `issues rebalance` | Redistribute work evenly | `npx
|
|
3713
|
-
| `issues board` | Visual board view | `npx
|
|
4169
|
+
| `issues list` | See all issues and their status | `npx ruflo@v3alpha issues list` |
|
|
4170
|
+
| `issues claim` | Claim an issue for yourself/agent | `npx ruflo@v3alpha issues claim #123 --as coder-1` |
|
|
4171
|
+
| `issues release` | Release your claim | `npx ruflo@v3alpha issues release #123` |
|
|
4172
|
+
| `issues handoff` | Hand off to another worker | `npx ruflo@v3alpha issues handoff #123 --to reviewer` |
|
|
4173
|
+
| `issues status` | Update progress on claimed work | `npx ruflo@v3alpha issues status #123 --progress 75` |
|
|
4174
|
+
| `issues stealable` | List abandoned/stuck issues | `npx ruflo@v3alpha issues stealable` |
|
|
4175
|
+
| `issues steal` | Take over stealable issue | `npx ruflo@v3alpha issues steal #123` |
|
|
4176
|
+
| `issues load` | View agent workloads | `npx ruflo@v3alpha issues load` |
|
|
4177
|
+
| `issues rebalance` | Redistribute work evenly | `npx ruflo@v3alpha issues rebalance --dry-run` |
|
|
4178
|
+
| `issues board` | Visual board view | `npx ruflo@v3alpha issues board` |
|
|
3714
4179
|
|
|
3715
4180
|
### Visual Board View
|
|
3716
4181
|
|
|
3717
4182
|
```bash
|
|
3718
|
-
npx
|
|
4183
|
+
npx ruflo@v3alpha issues board
|
|
3719
4184
|
```
|
|
3720
4185
|
|
|
3721
4186
|
```
|
|
@@ -3737,13 +4202,13 @@ When you need to pass work to someone else:
|
|
|
3737
4202
|
|
|
3738
4203
|
```bash
|
|
3739
4204
|
# 1. Request handoff with context
|
|
3740
|
-
npx
|
|
4205
|
+
npx ruflo@v3alpha issues handoff #123 \
|
|
3741
4206
|
--to security-architect \
|
|
3742
4207
|
--reason "Needs security review" \
|
|
3743
4208
|
--progress 80
|
|
3744
4209
|
|
|
3745
4210
|
# 2. Target accepts handoff
|
|
3746
|
-
npx
|
|
4211
|
+
npx ruflo@v3alpha issues accept #123 --as security-architect
|
|
3747
4212
|
|
|
3748
4213
|
# 3. Work continues with full context
|
|
3749
4214
|
```
|
|
@@ -3752,7 +4217,7 @@ npx claude-flow@v3alpha issues accept #123 --as security-architect
|
|
|
3752
4217
|
|
|
3753
4218
|
```bash
|
|
3754
4219
|
# View current load
|
|
3755
|
-
npx
|
|
4220
|
+
npx ruflo@v3alpha issues load
|
|
3756
4221
|
|
|
3757
4222
|
# Output:
|
|
3758
4223
|
# Agent | Claims | Load | Status
|
|
@@ -3763,7 +4228,7 @@ npx claude-flow@v3alpha issues load
|
|
|
3763
4228
|
# security-arch | 0 | 0% | 🟢 Available
|
|
3764
4229
|
|
|
3765
4230
|
# Auto-rebalance
|
|
3766
|
-
npx
|
|
4231
|
+
npx ruflo@v3alpha issues rebalance
|
|
3767
4232
|
```
|
|
3768
4233
|
|
|
3769
4234
|
### MCP Tools
|
|
@@ -3824,14 +4289,14 @@ The Route system uses **Q-Learning** to automatically assign tasks to the best a
|
|
|
3824
4289
|
|
|
3825
4290
|
| Command | What It Does | Example |
|
|
3826
4291
|
|---------|--------------|---------|
|
|
3827
|
-
| `route task` | Get agent recommendation | `npx
|
|
3828
|
-
| `route explain` | Understand routing decision | `npx
|
|
3829
|
-
| `route coverage` | Route based on test coverage | `npx
|
|
4292
|
+
| `route task` | Get agent recommendation | `npx ruflo@v3alpha route task "implement OAuth2"` |
|
|
4293
|
+
| `route explain` | Understand routing decision | `npx ruflo@v3alpha route explain "task"` |
|
|
4294
|
+
| `route coverage` | Route based on test coverage | `npx ruflo@v3alpha route coverage` |
|
|
3830
4295
|
|
|
3831
4296
|
### Example: Route a Task
|
|
3832
4297
|
|
|
3833
4298
|
```bash
|
|
3834
|
-
npx
|
|
4299
|
+
npx ruflo@v3alpha route task "refactor authentication to use JWT"
|
|
3835
4300
|
|
|
3836
4301
|
# Output:
|
|
3837
4302
|
# ╔══════════════════════════════════════════════════════════════╗
|
|
@@ -3858,7 +4323,7 @@ npx claude-flow@v3alpha route task "refactor authentication to use JWT"
|
|
|
3858
4323
|
Routes tasks to agents based on **test coverage gaps**:
|
|
3859
4324
|
|
|
3860
4325
|
```bash
|
|
3861
|
-
npx
|
|
4326
|
+
npx ruflo@v3alpha route coverage
|
|
3862
4327
|
|
|
3863
4328
|
# Finds untested code and routes to tester agent:
|
|
3864
4329
|
# • src/auth/jwt.ts - 23% coverage → tester
|
|
@@ -3870,10 +4335,10 @@ npx claude-flow@v3alpha route coverage
|
|
|
3870
4335
|
|
|
3871
4336
|
```bash
|
|
3872
4337
|
# Route via hooks (preferred)
|
|
3873
|
-
npx
|
|
4338
|
+
npx ruflo@v3alpha hooks route "implement caching layer" --include-explanation
|
|
3874
4339
|
|
|
3875
4340
|
# Record outcome for learning
|
|
3876
|
-
npx
|
|
4341
|
+
npx ruflo@v3alpha hooks post-task --task-id "task-123" --success true --agent coder
|
|
3877
4342
|
```
|
|
3878
4343
|
|
|
3879
4344
|
### How Q-Learning Improves Over Time
|
|
@@ -3893,12 +4358,12 @@ The system **remembers** what works and applies it to future similar tasks.
|
|
|
3893
4358
|
|
|
3894
4359
|
## 💻 Programmatic Usage
|
|
3895
4360
|
|
|
3896
|
-
Use
|
|
4361
|
+
Use Ruflo packages directly in your applications.
|
|
3897
4362
|
|
|
3898
4363
|
<details>
|
|
3899
|
-
<summary>💻 <strong>Programmatic SDK</strong> — Use
|
|
4364
|
+
<summary>💻 <strong>Programmatic SDK</strong> — Use Ruflo in Your Code</summary>
|
|
3900
4365
|
|
|
3901
|
-
Use
|
|
4366
|
+
Use Ruflo packages directly in your TypeScript/JavaScript applications.
|
|
3902
4367
|
|
|
3903
4368
|
### Installation
|
|
3904
4369
|
|
|
@@ -3907,7 +4372,7 @@ Use Claude-Flow packages directly in your TypeScript/JavaScript applications.
|
|
|
3907
4372
|
npm install @claude-flow/cli @claude-flow/memory @claude-flow/swarm
|
|
3908
4373
|
|
|
3909
4374
|
# Or install everything
|
|
3910
|
-
npm install
|
|
4375
|
+
npm install ruflo@v3alpha
|
|
3911
4376
|
```
|
|
3912
4377
|
|
|
3913
4378
|
### Quick Examples
|
|
@@ -3944,21 +4409,21 @@ console.log(results);
|
|
|
3944
4409
|
**CLI Commands:**
|
|
3945
4410
|
```bash
|
|
3946
4411
|
# Initialize memory database
|
|
3947
|
-
npx
|
|
4412
|
+
npx ruflo@latest memory init --force
|
|
3948
4413
|
|
|
3949
4414
|
# Store patterns
|
|
3950
|
-
npx
|
|
3951
|
-
npx
|
|
4415
|
+
npx ruflo@latest memory store --key "pattern-auth" --value "JWT authentication with refresh tokens"
|
|
4416
|
+
npx ruflo@latest memory store --key "pattern-cache" --value "Redis caching for API responses"
|
|
3952
4417
|
|
|
3953
4418
|
# Build HNSW index for 150x-12,500x faster search
|
|
3954
|
-
npx
|
|
4419
|
+
npx ruflo@latest memory search --query "authentication" --build-hnsw
|
|
3955
4420
|
|
|
3956
4421
|
# Semantic search (uses HNSW if built)
|
|
3957
|
-
npx
|
|
4422
|
+
npx ruflo@latest memory search --query "how to cache data" --limit 5
|
|
3958
4423
|
|
|
3959
4424
|
# List and manage entries
|
|
3960
|
-
npx
|
|
3961
|
-
npx
|
|
4425
|
+
npx ruflo@latest memory list --namespace patterns
|
|
4426
|
+
npx ruflo@latest memory stats
|
|
3962
4427
|
```
|
|
3963
4428
|
|
|
3964
4429
|
</details>
|
|
@@ -4192,35 +4657,35 @@ console.log(`Hit rate: ${(stats.hitRate * 100).toFixed(1)}%`);
|
|
|
4192
4657
|
|
|
4193
4658
|
```bash
|
|
4194
4659
|
# Generate embedding
|
|
4195
|
-
|
|
4660
|
+
ruflo embeddings embed "Your text here"
|
|
4196
4661
|
|
|
4197
4662
|
# Batch embed from file
|
|
4198
|
-
|
|
4663
|
+
ruflo embeddings batch documents.txt -o embeddings.json
|
|
4199
4664
|
|
|
4200
4665
|
# Similarity search
|
|
4201
|
-
|
|
4666
|
+
ruflo embeddings search "query" --index ./vectors
|
|
4202
4667
|
|
|
4203
4668
|
# Document chunking
|
|
4204
|
-
|
|
4669
|
+
ruflo embeddings chunk document.txt --strategy sentence --max-size 512
|
|
4205
4670
|
|
|
4206
4671
|
# Normalize embeddings
|
|
4207
|
-
|
|
4672
|
+
ruflo embeddings normalize embeddings.json --type l2 -o normalized.json
|
|
4208
4673
|
|
|
4209
4674
|
# Convert to hyperbolic
|
|
4210
|
-
|
|
4675
|
+
ruflo embeddings hyperbolic embeddings.json -o poincare.json
|
|
4211
4676
|
|
|
4212
4677
|
# Neural operations
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4678
|
+
ruflo embeddings neural drift --baseline "context" --input "check"
|
|
4679
|
+
ruflo embeddings neural store --id mem-1 --content "data"
|
|
4680
|
+
ruflo embeddings neural recall "query" --top-k 5
|
|
4216
4681
|
|
|
4217
4682
|
# Model management
|
|
4218
|
-
|
|
4219
|
-
|
|
4683
|
+
ruflo embeddings models list
|
|
4684
|
+
ruflo embeddings models download all-MiniLM-L6-v2
|
|
4220
4685
|
|
|
4221
4686
|
# Cache management
|
|
4222
|
-
|
|
4223
|
-
|
|
4687
|
+
ruflo embeddings cache stats
|
|
4688
|
+
ruflo embeddings cache clear --older-than 7d
|
|
4224
4689
|
```
|
|
4225
4690
|
|
|
4226
4691
|
### Available Models
|
|
@@ -4271,7 +4736,7 @@ await hooks.endTrajectory(trajectory, { success: true });
|
|
|
4271
4736
|
|
|
4272
4737
|
| Package | Purpose | Main Exports |
|
|
4273
4738
|
|---------|---------|--------------|
|
|
4274
|
-
| `@claude-flow/memory` | Vector storage, HNSW | `AgentDB`, `
|
|
4739
|
+
| `@claude-flow/memory` | Vector storage, HNSW, self-learning graph | `AgentDB`, `AutoMemoryBridge`, `LearningBridge`, `MemoryGraph` |
|
|
4275
4740
|
| `@claude-flow/swarm` | Agent coordination | `createSwarm`, `Swarm` |
|
|
4276
4741
|
| `@claude-flow/aidefence` | Threat detection | `isSafe`, `checkThreats`, `createAIDefence` |
|
|
4277
4742
|
| `@claude-flow/embeddings` | Vector embeddings | `createEmbeddingService` |
|
|
@@ -4287,7 +4752,7 @@ await hooks.endTrajectory(trajectory, { success: true });
|
|
|
4287
4752
|
|
|
4288
4753
|
## 🔗 Ecosystem & Integrations
|
|
4289
4754
|
|
|
4290
|
-
Core infrastructure packages powering
|
|
4755
|
+
Core infrastructure packages powering Ruflo's intelligence layer.
|
|
4291
4756
|
|
|
4292
4757
|
<details>
|
|
4293
4758
|
<summary>⚡ <strong>Agentic-Flow Integration</strong> — Core AI Infrastructure</summary>
|
|
@@ -4296,7 +4761,7 @@ Core infrastructure packages powering Claude-Flow's intelligence layer.
|
|
|
4296
4761
|
[](https://www.npmjs.com/package/agentic-flow)
|
|
4297
4762
|
[](https://github.com/ruvnet/agentic-flow)
|
|
4298
4763
|
|
|
4299
|
-
|
|
4764
|
+
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.
|
|
4300
4765
|
|
|
4301
4766
|
### Quick Start
|
|
4302
4767
|
|
|
@@ -4577,9 +5042,9 @@ claude mcp add agentic-flow -- npx agentic-flow mcp start
|
|
|
4577
5042
|
|
|
4578
5043
|
</details>
|
|
4579
5044
|
|
|
4580
|
-
### Integration with
|
|
5045
|
+
### Integration with Ruflo
|
|
4581
5046
|
|
|
4582
|
-
|
|
5047
|
+
Ruflo automatically leverages agentic-flow for:
|
|
4583
5048
|
|
|
4584
5049
|
| Feature | How It's Used |
|
|
4585
5050
|
|---------|---------------|
|
|
@@ -4590,7 +5055,7 @@ Claude-Flow automatically leverages agentic-flow for:
|
|
|
4590
5055
|
| **Embedding Search** | HNSW-indexed vector search (150x faster) |
|
|
4591
5056
|
|
|
4592
5057
|
```typescript
|
|
4593
|
-
//
|
|
5058
|
+
// Ruflo automatically uses agentic-flow optimizations
|
|
4594
5059
|
import { getTokenOptimizer } from '@claude-flow/integration';
|
|
4595
5060
|
|
|
4596
5061
|
const optimizer = await getTokenOptimizer();
|
|
@@ -4610,13 +5075,13 @@ const config = optimizer.getOptimalConfig(agentCount);
|
|
|
4610
5075
|
---
|
|
4611
5076
|
|
|
4612
5077
|
<details>
|
|
4613
|
-
<summary>🥋 <strong>Agentic-Jujutsu</strong> —
|
|
5078
|
+
<summary>🥋 <strong>Agentic-Jujutsu</strong> — Self-Learning AI Version Control</summary>
|
|
4614
5079
|
|
|
4615
5080
|
[](https://www.npmjs.com/package/agentic-jujutsu)
|
|
4616
5081
|
[](https://www.npmjs.com/package/agentic-jujutsu)
|
|
4617
5082
|
[](https://github.com/ruvnet/agentic-flow/tree/main/packages/agentic-jujutsu)
|
|
4618
5083
|
|
|
4619
|
-
**Agentic-Jujutsu** is
|
|
5084
|
+
**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.
|
|
4620
5085
|
|
|
4621
5086
|
### Quick Start
|
|
4622
5087
|
|
|
@@ -4647,7 +5112,7 @@ npx agentic-jujutsu compare-git
|
|
|
4647
5112
|
| **AI integration** | Manual work | Built-in (MCP protocol) |
|
|
4648
5113
|
| **Self-learning capabilities** | ❌ None | ✅ ReasoningBank |
|
|
4649
5114
|
| **Automatic conflict resolution** | 30-40% auto | **87% auto** |
|
|
4650
|
-
| **
|
|
5115
|
+
| **Cryptographic security** | Basic | SHA3-512 fingerprints |
|
|
4651
5116
|
|
|
4652
5117
|
### Core Capabilities
|
|
4653
5118
|
|
|
@@ -4693,7 +5158,7 @@ console.log('Confidence:', (suggestion.confidence * 100).toFixed(1) + '%');
|
|
|
4693
5158
|
</details>
|
|
4694
5159
|
|
|
4695
5160
|
<details>
|
|
4696
|
-
<summary>🤝 <strong>Multi-Agent Coordination</strong> —
|
|
5161
|
+
<summary>🤝 <strong>Multi-Agent Coordination</strong> — DAG architecture for conflict-free collaboration</summary>
|
|
4697
5162
|
|
|
4698
5163
|
```javascript
|
|
4699
5164
|
// All agents work concurrently (no conflicts!)
|
|
@@ -4729,12 +5194,12 @@ console.log('All agents completed:', results);
|
|
|
4729
5194
|
| Context switching | 500-1000ms | **50-100ms (10x)** |
|
|
4730
5195
|
| Conflict resolution | 30-40% auto | **87% auto (2.5x)** |
|
|
4731
5196
|
| Lock waiting | 50 min/day | **0 min (∞)** |
|
|
4732
|
-
|
|
|
5197
|
+
| SHA3-512 fingerprints | N/A | **<1ms** |
|
|
4733
5198
|
|
|
4734
5199
|
</details>
|
|
4735
5200
|
|
|
4736
5201
|
<details>
|
|
4737
|
-
<summary>🔐 <strong>
|
|
5202
|
+
<summary>🔐 <strong>Cryptographic Security</strong> — SHA3-512 fingerprints and AES-256 encryption</summary>
|
|
4738
5203
|
|
|
4739
5204
|
```javascript
|
|
4740
5205
|
const { generateQuantumFingerprint, verifyQuantumFingerprint } = require('agentic-jujutsu');
|
|
@@ -4755,7 +5220,7 @@ const key = crypto.randomBytes(32).toString('base64');
|
|
|
4755
5220
|
jj.enableEncryption(key);
|
|
4756
5221
|
```
|
|
4757
5222
|
|
|
4758
|
-
**
|
|
5223
|
+
**Security Methods:**
|
|
4759
5224
|
|
|
4760
5225
|
| Method | Description | Returns |
|
|
4761
5226
|
|--------|-------------|---------|
|
|
@@ -4766,9 +5231,9 @@ jj.enableEncryption(key);
|
|
|
4766
5231
|
|
|
4767
5232
|
</details>
|
|
4768
5233
|
|
|
4769
|
-
###
|
|
5234
|
+
### Ruflo Skill
|
|
4770
5235
|
|
|
4771
|
-
|
|
5236
|
+
Ruflo includes a dedicated `/agentic-jujutsu` skill for AI-powered version control:
|
|
4772
5237
|
|
|
4773
5238
|
```bash
|
|
4774
5239
|
# Invoke the skill
|
|
@@ -4777,9 +5242,9 @@ Claude-Flow includes a dedicated `/agentic-jujutsu` skill for AI-powered version
|
|
|
4777
5242
|
|
|
4778
5243
|
**Use this skill when you need:**
|
|
4779
5244
|
- ✅ Multiple AI agents modifying code simultaneously
|
|
4780
|
-
- ✅ Lock-free version control (
|
|
5245
|
+
- ✅ Lock-free version control (faster than Git for concurrent agents)
|
|
4781
5246
|
- ✅ Self-learning AI that improves from experience
|
|
4782
|
-
- ✅
|
|
5247
|
+
- ✅ SHA3-512 cryptographic integrity verification
|
|
4783
5248
|
- ✅ Automatic conflict resolution (87% success rate)
|
|
4784
5249
|
- ✅ Pattern recognition and intelligent suggestions
|
|
4785
5250
|
|
|
@@ -4836,7 +5301,7 @@ npx agentic-jujutsu examples # Show usage examples
|
|
|
4836
5301
|
| **v1.x** | Required separate jj install |
|
|
4837
5302
|
| **v2.0** | Zero-dependency (jj binary embedded) |
|
|
4838
5303
|
| **v2.1** | Self-learning AI with ReasoningBank |
|
|
4839
|
-
| **v2.2** | Multi-agent coordination +
|
|
5304
|
+
| **v2.2** | Multi-agent coordination + cryptographic security |
|
|
4840
5305
|
| **v2.3** | Kubernetes GitOps + production stability |
|
|
4841
5306
|
|
|
4842
5307
|
</details>
|
|
@@ -4851,7 +5316,7 @@ npx agentic-jujutsu examples # Show usage examples
|
|
|
4851
5316
|
[](https://github.com/ruvnet/ruvector)
|
|
4852
5317
|
[](https://hub.docker.com/r/ruvnet/ruvector-postgres)
|
|
4853
5318
|
|
|
4854
|
-
**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
|
|
5319
|
+
**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.
|
|
4855
5320
|
|
|
4856
5321
|
### Key Capabilities
|
|
4857
5322
|
|
|
@@ -4919,21 +5384,21 @@ const compressed = ruvector.compress(embedding, 0.3); // 30% quality threshold
|
|
|
4919
5384
|
|
|
4920
5385
|
| Package | Description | Performance |
|
|
4921
5386
|
|---------|-------------|-------------|
|
|
4922
|
-
| **[ruvector](https://www.npmjs.com/package/ruvector)** | Core vector database with HNSW |
|
|
4923
|
-
| **[@ruvector/attention](https://www.npmjs.com/package/@ruvector/attention)** | Flash Attention mechanisms | 2
|
|
4924
|
-
| **[@ruvector/sona](https://www.npmjs.com/package/@ruvector/sona)** | SONA adaptive learning (LoRA, EWC++) |
|
|
5387
|
+
| **[ruvector](https://www.npmjs.com/package/ruvector)** | Core vector database with HNSW | Fast vector search |
|
|
5388
|
+
| **[@ruvector/attention](https://www.npmjs.com/package/@ruvector/attention)** | Flash Attention mechanisms | 2-7x speedup |
|
|
5389
|
+
| **[@ruvector/sona](https://www.npmjs.com/package/@ruvector/sona)** | SONA adaptive learning (LoRA, EWC++) | Fast adaptation |
|
|
4925
5390
|
| **[@ruvector/gnn](https://www.npmjs.com/package/@ruvector/gnn)** | Graph Neural Networks (15 layer types) | Native NAPI bindings |
|
|
4926
|
-
| **[@ruvector/graph-node](https://www.npmjs.com/package/@ruvector/graph-node)** | Graph DB with Cypher queries |
|
|
5391
|
+
| **[@ruvector/graph-node](https://www.npmjs.com/package/@ruvector/graph-node)** | Graph DB with Cypher queries | Native NAPI |
|
|
4927
5392
|
| **[@ruvector/rvlite](https://www.npmjs.com/package/@ruvector/rvlite)** | Standalone DB (SQL, SPARQL, Cypher) | All-in-one solution |
|
|
4928
|
-
| **[ruvector
|
|
5393
|
+
| **[@ruvector/router](https://www.npmjs.com/package/@ruvector/router)** | Semantic intent routing | Fast routing |
|
|
4929
5394
|
|
|
4930
5395
|
### 🐘 RuVector PostgreSQL — Enterprise Vector Database
|
|
4931
5396
|
|
|
4932
|
-
**77+ SQL functions** for AI operations directly in PostgreSQL with
|
|
5397
|
+
**77+ SQL functions** for AI operations directly in PostgreSQL with fast vector search.
|
|
4933
5398
|
|
|
4934
5399
|
```bash
|
|
4935
5400
|
# Quick setup with CLI (recommended)
|
|
4936
|
-
npx
|
|
5401
|
+
npx ruflo ruvector setup --output ./my-ruvector
|
|
4937
5402
|
cd my-ruvector && docker-compose up -d
|
|
4938
5403
|
|
|
4939
5404
|
# Or pull directly from Docker Hub
|
|
@@ -4941,12 +5406,12 @@ docker run -d \
|
|
|
4941
5406
|
--name ruvector-postgres \
|
|
4942
5407
|
-p 5432:5432 \
|
|
4943
5408
|
-e POSTGRES_USER=claude \
|
|
4944
|
-
-e POSTGRES_PASSWORD=
|
|
5409
|
+
-e POSTGRES_PASSWORD=ruflo-test \
|
|
4945
5410
|
-e POSTGRES_DB=claude_flow \
|
|
4946
5411
|
ruvnet/ruvector-postgres
|
|
4947
5412
|
|
|
4948
5413
|
# Migrate existing memory to PostgreSQL
|
|
4949
|
-
npx
|
|
5414
|
+
npx ruflo ruvector import --input memory-export.json
|
|
4950
5415
|
```
|
|
4951
5416
|
|
|
4952
5417
|
**RuVector PostgreSQL vs pgvector:**
|
|
@@ -5103,12 +5568,12 @@ await db.createHyperedge(['agent-1', 'agent-2', 'agent-3'], {
|
|
|
5103
5568
|
|
|
5104
5569
|
</details>
|
|
5105
5570
|
|
|
5106
|
-
### Integration with
|
|
5571
|
+
### Integration with Ruflo
|
|
5107
5572
|
|
|
5108
|
-
|
|
5573
|
+
Ruflo automatically uses RuVector when available:
|
|
5109
5574
|
|
|
5110
5575
|
```typescript
|
|
5111
|
-
//
|
|
5576
|
+
// Ruflo detects and uses native ruvector
|
|
5112
5577
|
import { getVectorStore } from '@claude-flow/memory';
|
|
5113
5578
|
|
|
5114
5579
|
const store = await getVectorStore();
|
|
@@ -5126,19 +5591,19 @@ const similarity = attention.attention(queries, keys, values);
|
|
|
5126
5591
|
|
|
5127
5592
|
```bash
|
|
5128
5593
|
# RuVector PostgreSQL Setup (generates Docker files + SQL)
|
|
5129
|
-
npx
|
|
5130
|
-
npx
|
|
5131
|
-
npx
|
|
5594
|
+
npx ruflo ruvector setup # Output to ./ruvector-postgres
|
|
5595
|
+
npx ruflo ruvector setup --output ./mydir # Custom directory
|
|
5596
|
+
npx ruflo ruvector setup --print # Preview files
|
|
5132
5597
|
|
|
5133
5598
|
# Import from sql.js/JSON to PostgreSQL
|
|
5134
|
-
npx
|
|
5135
|
-
npx
|
|
5599
|
+
npx ruflo ruvector import --input data.json # Direct import
|
|
5600
|
+
npx ruflo ruvector import --input data.json --output sql # Dry-run (generate SQL)
|
|
5136
5601
|
|
|
5137
5602
|
# Other RuVector commands
|
|
5138
|
-
npx
|
|
5139
|
-
npx
|
|
5140
|
-
npx
|
|
5141
|
-
npx
|
|
5603
|
+
npx ruflo ruvector status --verbose # Check connection
|
|
5604
|
+
npx ruflo ruvector benchmark --vectors 10000 # Performance test
|
|
5605
|
+
npx ruflo ruvector optimize --analyze # Optimization suggestions
|
|
5606
|
+
npx ruflo ruvector backup --output backup.sql # Backup data
|
|
5142
5607
|
|
|
5143
5608
|
# Native ruvector CLI
|
|
5144
5609
|
npx ruvector status # Check installation
|
|
@@ -5165,11 +5630,11 @@ Cloud platform integration and deployment tools.
|
|
|
5165
5630
|
<details>
|
|
5166
5631
|
<summary>☁️ <strong>Flow Nexus</strong> — Cloud Platform Integration</summary>
|
|
5167
5632
|
|
|
5168
|
-
Flow Nexus is a **cloud platform** for deploying and scaling
|
|
5633
|
+
Flow Nexus is a **cloud platform** for deploying and scaling Ruflo beyond your local machine.
|
|
5169
5634
|
|
|
5170
5635
|
### What Flow Nexus Provides
|
|
5171
5636
|
|
|
5172
|
-
| Feature | Local
|
|
5637
|
+
| Feature | Local Ruflo | + Flow Nexus |
|
|
5173
5638
|
|---------|-------------------|--------------|
|
|
5174
5639
|
| **Swarm Scale** | 15 agents (local resources) | 100+ agents (cloud resources) |
|
|
5175
5640
|
| **Neural Training** | Limited by local GPU/CPU | Distributed GPU clusters |
|
|
@@ -5218,7 +5683,7 @@ Flow Nexus is a **cloud platform** for deploying and scaling Claude-Flow beyond
|
|
|
5218
5683
|
/flow-nexus-swarm
|
|
5219
5684
|
|
|
5220
5685
|
# Or via CLI
|
|
5221
|
-
npx
|
|
5686
|
+
npx ruflo@v3alpha nexus swarm deploy \
|
|
5222
5687
|
--topology hierarchical \
|
|
5223
5688
|
--max-agents 50 \
|
|
5224
5689
|
--region us-east-1
|
|
@@ -5230,13 +5695,13 @@ Isolated execution environments for running untrusted code:
|
|
|
5230
5695
|
|
|
5231
5696
|
```bash
|
|
5232
5697
|
# Create sandbox
|
|
5233
|
-
npx
|
|
5698
|
+
npx ruflo@v3alpha nexus sandbox create --language python
|
|
5234
5699
|
|
|
5235
5700
|
# Execute code safely
|
|
5236
|
-
npx
|
|
5701
|
+
npx ruflo@v3alpha nexus sandbox exec --code "print('Hello')"
|
|
5237
5702
|
|
|
5238
5703
|
# Cleanup
|
|
5239
|
-
npx
|
|
5704
|
+
npx ruflo@v3alpha nexus sandbox destroy
|
|
5240
5705
|
```
|
|
5241
5706
|
|
|
5242
5707
|
### Event-Driven Workflows
|
|
@@ -5262,10 +5727,10 @@ steps:
|
|
|
5262
5727
|
# 1. Sign up at flow-nexus.io
|
|
5263
5728
|
# 2. Get API key
|
|
5264
5729
|
# 3. Configure
|
|
5265
|
-
npx
|
|
5730
|
+
npx ruflo@v3alpha nexus configure --api-key <key>
|
|
5266
5731
|
|
|
5267
5732
|
# 4. Deploy
|
|
5268
|
-
npx
|
|
5733
|
+
npx ruflo@v3alpha nexus swarm deploy
|
|
5269
5734
|
```
|
|
5270
5735
|
|
|
5271
5736
|
</details>
|
|
@@ -5299,7 +5764,7 @@ Stream-Chain enables **sequential processing** where the output of one agent bec
|
|
|
5299
5764
|
/stream-chain
|
|
5300
5765
|
|
|
5301
5766
|
# Define pipeline
|
|
5302
|
-
npx
|
|
5767
|
+
npx ruflo@v3alpha stream-chain create \
|
|
5303
5768
|
--name "feature-pipeline" \
|
|
5304
5769
|
--stages "researcher,architect,coder,tester,reviewer"
|
|
5305
5770
|
```
|
|
@@ -5341,11 +5806,11 @@ stages:
|
|
|
5341
5806
|
|
|
5342
5807
|
```bash
|
|
5343
5808
|
# Run the pipeline
|
|
5344
|
-
npx
|
|
5809
|
+
npx ruflo@v3alpha stream-chain run feature-pipeline \
|
|
5345
5810
|
--input '{"requirements": "Add user dashboard with analytics"}'
|
|
5346
5811
|
|
|
5347
5812
|
# Monitor progress
|
|
5348
|
-
npx
|
|
5813
|
+
npx ruflo@v3alpha stream-chain status feature-pipeline
|
|
5349
5814
|
```
|
|
5350
5815
|
|
|
5351
5816
|
### Use Cases
|
|
@@ -5385,7 +5850,7 @@ The Pair Programming skill provides **human-AI collaborative coding** with role
|
|
|
5385
5850
|
/pair-programming --mode tdd
|
|
5386
5851
|
|
|
5387
5852
|
# Via CLI
|
|
5388
|
-
npx
|
|
5853
|
+
npx ruflo@v3alpha pair start --mode navigator
|
|
5389
5854
|
```
|
|
5390
5855
|
|
|
5391
5856
|
### TDD Mode Workflow
|
|
@@ -5425,16 +5890,16 @@ npx claude-flow@v3alpha pair start --mode navigator
|
|
|
5425
5890
|
|
|
5426
5891
|
```bash
|
|
5427
5892
|
# Switch roles mid-session
|
|
5428
|
-
npx
|
|
5893
|
+
npx ruflo@v3alpha pair switch
|
|
5429
5894
|
|
|
5430
5895
|
# Get AI explanation
|
|
5431
|
-
npx
|
|
5896
|
+
npx ruflo@v3alpha pair explain
|
|
5432
5897
|
|
|
5433
5898
|
# Run tests
|
|
5434
|
-
npx
|
|
5899
|
+
npx ruflo@v3alpha pair test
|
|
5435
5900
|
|
|
5436
5901
|
# End session with summary
|
|
5437
|
-
npx
|
|
5902
|
+
npx ruflo@v3alpha pair end
|
|
5438
5903
|
```
|
|
5439
5904
|
|
|
5440
5905
|
</details>
|
|
@@ -5491,22 +5956,22 @@ Detection Time: 0.04ms | 50+ Patterns | Self-Learning | HNSW Vector Search
|
|
|
5491
5956
|
|
|
5492
5957
|
```bash
|
|
5493
5958
|
# Basic threat scan
|
|
5494
|
-
npx
|
|
5959
|
+
npx ruflo@v3alpha security defend -i "ignore previous instructions"
|
|
5495
5960
|
|
|
5496
5961
|
# Scan a file
|
|
5497
|
-
npx
|
|
5962
|
+
npx ruflo@v3alpha security defend -f ./user-prompts.txt
|
|
5498
5963
|
|
|
5499
5964
|
# Quick scan (faster)
|
|
5500
|
-
npx
|
|
5965
|
+
npx ruflo@v3alpha security defend -i "some text" --quick
|
|
5501
5966
|
|
|
5502
5967
|
# JSON output
|
|
5503
|
-
npx
|
|
5968
|
+
npx ruflo@v3alpha security defend -i "test" -o json
|
|
5504
5969
|
|
|
5505
5970
|
# View statistics
|
|
5506
|
-
npx
|
|
5971
|
+
npx ruflo@v3alpha security defend --stats
|
|
5507
5972
|
|
|
5508
5973
|
# Full security audit
|
|
5509
|
-
npx
|
|
5974
|
+
npx ruflo@v3alpha security scan --depth full
|
|
5510
5975
|
```
|
|
5511
5976
|
|
|
5512
5977
|
### MCP Tools
|
|
@@ -5638,7 +6103,7 @@ Domain-Driven Design with bounded contexts, clean architecture, and measured per
|
|
|
5638
6103
|
| Module | Purpose | Key Features |
|
|
5639
6104
|
|--------|---------|--------------|
|
|
5640
6105
|
| `@claude-flow/hooks` | Event-driven lifecycle | ReasoningBank, 27 hooks, pattern learning |
|
|
5641
|
-
| `@claude-flow/memory` | Unified vector storage | AgentDB,
|
|
6106
|
+
| `@claude-flow/memory` | Unified vector storage | AgentDB, RVF binary format, HnswLite, RvfMigrator, SONA persistence, LearningBridge, MemoryGraph |
|
|
5642
6107
|
| `@claude-flow/security` | CVE remediation | Input validation, path security, AIDefence |
|
|
5643
6108
|
| `@claude-flow/swarm` | Multi-agent coordination | 6 topologies, Byzantine consensus, auto-scaling |
|
|
5644
6109
|
| `@claude-flow/plugins` | WASM extensions | RuVector plugins, semantic search, intent routing |
|
|
@@ -5646,7 +6111,7 @@ Domain-Driven Design with bounded contexts, clean architecture, and measured per
|
|
|
5646
6111
|
| `@claude-flow/neural` | Self-learning | SONA, 9 RL algorithms, EWC++ memory preservation |
|
|
5647
6112
|
| `@claude-flow/testing` | Quality assurance | London School TDD, Vitest, fixtures, mocks |
|
|
5648
6113
|
| `@claude-flow/deployment` | Release automation | Versioning, changelogs, NPM publishing |
|
|
5649
|
-
| `@claude-flow/shared` | Common utilities | Types, validation schemas, constants |
|
|
6114
|
+
| `@claude-flow/shared` | Common utilities | Types, validation schemas, RvfEventLog, constants |
|
|
5650
6115
|
| `@claude-flow/browser` | Browser automation | 59 MCP tools, element refs, trajectory learning |
|
|
5651
6116
|
|
|
5652
6117
|
### Architecture Principles
|
|
@@ -5661,16 +6126,22 @@ Domain-Driven Design with bounded contexts, clean architecture, and measured per
|
|
|
5661
6126
|
|
|
5662
6127
|
### Performance Benchmarks
|
|
5663
6128
|
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
|
|
|
5667
|
-
|
|
5668
|
-
| **
|
|
5669
|
-
| **
|
|
5670
|
-
| **
|
|
5671
|
-
| **
|
|
5672
|
-
| **
|
|
5673
|
-
| **
|
|
6129
|
+
*Benchmarks measured on Node.js 20+ with local SQLite. Results vary by hardware and workload.*
|
|
6130
|
+
|
|
6131
|
+
| Category | Metric | Target | Status |
|
|
6132
|
+
|----------|--------|--------|--------|
|
|
6133
|
+
| **Startup** | CLI cold start | <500ms | ✅ Met |
|
|
6134
|
+
| **Startup** | MCP server init | <400ms | ✅ Met |
|
|
6135
|
+
| **Memory** | HNSW search | <1ms | ✅ Sub-ms |
|
|
6136
|
+
| **Memory** | Pattern retrieval | <10ms | ✅ Met |
|
|
6137
|
+
| **Swarm** | Agent spawn | <200ms | ✅ Met |
|
|
6138
|
+
| **Swarm** | Consensus latency | <100ms | ✅ Met |
|
|
6139
|
+
| **Neural** | SONA adaptation | <0.05ms | ✅ Met |
|
|
6140
|
+
| **Graph** | Build (1k nodes) | <200ms | ✅ Met |
|
|
6141
|
+
| **Graph** | PageRank (1k nodes) | <100ms | ✅ Met |
|
|
6142
|
+
| **Learning** | Insight recording | <5ms | ✅ Met |
|
|
6143
|
+
| **Learning** | Consolidation | <500ms | ✅ Met |
|
|
6144
|
+
| **Task** | Success rate | 95%+ | ✅ Met |
|
|
5674
6145
|
|
|
5675
6146
|
### Topology Performance
|
|
5676
6147
|
|
|
@@ -5692,7 +6163,7 @@ Domain-Driven Design with bounded contexts, clean architecture, and measured per
|
|
|
5692
6163
|
|
|
5693
6164
|
[](https://www.npmjs.com/package/@claude-flow/browser)
|
|
5694
6165
|
|
|
5695
|
-
AI-optimized browser automation integrating [agent-browser](https://github.com/AugmentCode/agent-browser) with
|
|
6166
|
+
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.
|
|
5696
6167
|
|
|
5697
6168
|
### Installation
|
|
5698
6169
|
|
|
@@ -5719,7 +6190,7 @@ browser.startTrajectory('Login to dashboard');
|
|
|
5719
6190
|
|
|
5720
6191
|
await browser.open('https://example.com/login');
|
|
5721
6192
|
|
|
5722
|
-
// Use element refs (
|
|
6193
|
+
// Use element refs (shorter tokens vs full CSS selectors)
|
|
5723
6194
|
const snapshot = await browser.snapshot({ interactive: true });
|
|
5724
6195
|
await browser.fill('@e1', 'user@example.com');
|
|
5725
6196
|
await browser.fill('@e2', 'password');
|
|
@@ -5734,7 +6205,7 @@ await browser.close();
|
|
|
5734
6205
|
| Feature | Description |
|
|
5735
6206
|
|---------|-------------|
|
|
5736
6207
|
| **59 MCP Tools** | Complete browser automation via MCP protocol |
|
|
5737
|
-
| **Element Refs** |
|
|
6208
|
+
| **Element Refs** | Compact `@e1`, `@e2` refs instead of verbose CSS selectors |
|
|
5738
6209
|
| **Trajectory Learning** | Records actions for ReasoningBank/SONA |
|
|
5739
6210
|
| **Security Scanning** | URL validation, PII detection, XSS/SQL injection prevention |
|
|
5740
6211
|
| **9 Workflow Templates** | Login, OAuth, scraping, testing, monitoring |
|
|
@@ -5777,7 +6248,7 @@ const template = getWorkflow('login-basic');
|
|
|
5777
6248
|
<details>
|
|
5778
6249
|
<summary>📦 <strong>Release Management</strong> — @claude-flow/deployment</summary>
|
|
5779
6250
|
|
|
5780
|
-
Automated release management, versioning, and CI/CD for
|
|
6251
|
+
Automated release management, versioning, and CI/CD for Ruflo packages.
|
|
5781
6252
|
|
|
5782
6253
|
### Features
|
|
5783
6254
|
|
|
@@ -6091,10 +6562,10 @@ npm run bench:attention
|
|
|
6091
6562
|
npm run bench:startup
|
|
6092
6563
|
|
|
6093
6564
|
# Performance report
|
|
6094
|
-
npx
|
|
6565
|
+
npx ruflo@v3alpha performance report
|
|
6095
6566
|
|
|
6096
6567
|
# Benchmark specific suite
|
|
6097
|
-
npx
|
|
6568
|
+
npx ruflo@v3alpha performance benchmark --suite memory
|
|
6098
6569
|
```
|
|
6099
6570
|
|
|
6100
6571
|
</details>
|
|
@@ -6475,7 +6946,7 @@ export CLAUDE_FLOW_MEMORY_PATH="./data"
|
|
|
6475
6946
|
| `GCS_PROJECT_ID` | GCS project ID | Optional |
|
|
6476
6947
|
| `GOOGLE_CLOUD_PROJECT` | Alternative project ID variable | Optional |
|
|
6477
6948
|
| `GOOGLE_APPLICATION_CREDENTIALS` | Path to GCS service account JSON | Optional |
|
|
6478
|
-
| `GCS_PREFIX` | Prefix for stored files | `
|
|
6949
|
+
| `GCS_PREFIX` | Prefix for stored files | `ruflo-patterns` |
|
|
6479
6950
|
|
|
6480
6951
|
### Auto-Update System
|
|
6481
6952
|
|
|
@@ -6546,9 +7017,9 @@ CLAUDE_FLOW_HNSW_EF=200
|
|
|
6546
7017
|
|
|
6547
7018
|
### Configuration File Location
|
|
6548
7019
|
|
|
6549
|
-
|
|
7020
|
+
Ruflo looks for configuration in this order:
|
|
6550
7021
|
1. `./claude-flow.config.json` (project root)
|
|
6551
|
-
2. `~/.config/
|
|
7022
|
+
2. `~/.config/ruflo/config.json` (user config)
|
|
6552
7023
|
3. Environment variables (override any file config)
|
|
6553
7024
|
|
|
6554
7025
|
### Complete Configuration Schema
|
|
@@ -6648,7 +7119,7 @@ Claude Flow looks for configuration in this order:
|
|
|
6648
7119
|
"level": "info",
|
|
6649
7120
|
"format": "json",
|
|
6650
7121
|
"destination": "console",
|
|
6651
|
-
"filePath": "./logs/
|
|
7122
|
+
"filePath": "./logs/ruflo.log",
|
|
6652
7123
|
"maxFileSize": "100MB",
|
|
6653
7124
|
"maxFiles": 10
|
|
6654
7125
|
},
|
|
@@ -6667,7 +7138,7 @@ Claude Flow looks for configuration in this order:
|
|
|
6667
7138
|
"default": "anthropic",
|
|
6668
7139
|
"fallback": ["openai", "google"],
|
|
6669
7140
|
"anthropic": {
|
|
6670
|
-
"model": "claude-sonnet-4-20250514",
|
|
7141
|
+
"model": "claude-sonnet-4-6-20250514",
|
|
6671
7142
|
"maxTokens": 8192
|
|
6672
7143
|
},
|
|
6673
7144
|
"openai": {
|
|
@@ -6715,7 +7186,7 @@ Claude Flow looks for configuration in this order:
|
|
|
6715
7186
|
"version": "3.0.0",
|
|
6716
7187
|
"memory": {
|
|
6717
7188
|
"type": "hybrid",
|
|
6718
|
-
"path": "/var/lib/
|
|
7189
|
+
"path": "/var/lib/ruflo/data",
|
|
6719
7190
|
"encryption": { "enabled": true, "algorithm": "aes-256-gcm" }
|
|
6720
7191
|
},
|
|
6721
7192
|
"swarm": { "topology": "hierarchical", "maxAgents": 15 },
|
|
@@ -6727,7 +7198,7 @@ Claude Flow looks for configuration in this order:
|
|
|
6727
7198
|
"level": "warn",
|
|
6728
7199
|
"format": "json",
|
|
6729
7200
|
"destination": "file",
|
|
6730
|
-
"filePath": "/var/log/
|
|
7201
|
+
"filePath": "/var/log/ruflo/production.log"
|
|
6731
7202
|
},
|
|
6732
7203
|
"monitoring": { "enabled": true, "metricsInterval": 30000 }
|
|
6733
7204
|
}
|
|
@@ -6771,25 +7242,25 @@ Claude Flow looks for configuration in this order:
|
|
|
6771
7242
|
|
|
6772
7243
|
```bash
|
|
6773
7244
|
# View current configuration
|
|
6774
|
-
npx
|
|
7245
|
+
npx ruflo@v3alpha config list
|
|
6775
7246
|
|
|
6776
7247
|
# Get specific value
|
|
6777
|
-
npx
|
|
7248
|
+
npx ruflo@v3alpha config get --key memory.type
|
|
6778
7249
|
|
|
6779
7250
|
# Set configuration value
|
|
6780
|
-
npx
|
|
7251
|
+
npx ruflo@v3alpha config set --key swarm.maxAgents --value 10
|
|
6781
7252
|
|
|
6782
7253
|
# Export configuration
|
|
6783
|
-
npx
|
|
7254
|
+
npx ruflo@v3alpha config export > my-config.json
|
|
6784
7255
|
|
|
6785
7256
|
# Import configuration
|
|
6786
|
-
npx
|
|
7257
|
+
npx ruflo@v3alpha config import --file my-config.json
|
|
6787
7258
|
|
|
6788
7259
|
# Reset to defaults
|
|
6789
|
-
npx
|
|
7260
|
+
npx ruflo@v3alpha config reset --key swarm
|
|
6790
7261
|
|
|
6791
7262
|
# Initialize with wizard
|
|
6792
|
-
npx
|
|
7263
|
+
npx ruflo@v3alpha init --wizard
|
|
6793
7264
|
```
|
|
6794
7265
|
|
|
6795
7266
|
</details>
|
|
@@ -6813,7 +7284,7 @@ lsof -i :3000
|
|
|
6813
7284
|
# Kill existing process
|
|
6814
7285
|
kill -9 <PID>
|
|
6815
7286
|
# Restart MCP server
|
|
6816
|
-
npx
|
|
7287
|
+
npx ruflo@v3alpha mcp start
|
|
6817
7288
|
```
|
|
6818
7289
|
|
|
6819
7290
|
**Agent spawn failures**
|
|
@@ -6827,9 +7298,9 @@ export CLAUDE_FLOW_MAX_AGENTS=5
|
|
|
6827
7298
|
**Pattern search returning no results**
|
|
6828
7299
|
```bash
|
|
6829
7300
|
# Verify patterns are stored
|
|
6830
|
-
npx
|
|
7301
|
+
npx ruflo@v3alpha hooks metrics
|
|
6831
7302
|
# Re-run pretraining if empty
|
|
6832
|
-
npx
|
|
7303
|
+
npx ruflo@v3alpha hooks pretrain
|
|
6833
7304
|
```
|
|
6834
7305
|
|
|
6835
7306
|
**Windows path issues**
|
|
@@ -6837,7 +7308,7 @@ npx claude-flow@v3alpha hooks pretrain
|
|
|
6837
7308
|
# Use forward slashes or escape backslashes
|
|
6838
7309
|
$env:CLAUDE_FLOW_MEMORY_PATH = "./data"
|
|
6839
7310
|
# Or use absolute path
|
|
6840
|
-
$env:CLAUDE_FLOW_MEMORY_PATH = "C:/Users/name/
|
|
7311
|
+
$env:CLAUDE_FLOW_MEMORY_PATH = "C:/Users/name/ruflo/data"
|
|
6841
7312
|
```
|
|
6842
7313
|
|
|
6843
7314
|
**Permission denied errors**
|
|
@@ -6850,7 +7321,7 @@ sudo chown -R $(whoami) ~/.npm
|
|
|
6850
7321
|
**High memory usage**
|
|
6851
7322
|
```bash
|
|
6852
7323
|
# Enable garbage collection
|
|
6853
|
-
node --expose-gc node_modules/.bin/
|
|
7324
|
+
node --expose-gc node_modules/.bin/ruflo
|
|
6854
7325
|
# Reduce HNSW parameters for lower memory
|
|
6855
7326
|
export CLAUDE_FLOW_HNSW_M=8
|
|
6856
7327
|
export CLAUDE_FLOW_HNSW_EF=100
|
|
@@ -6882,45 +7353,45 @@ export CLAUDE_FLOW_HNSW_EF=100
|
|
|
6882
7353
|
|
|
6883
7354
|
| Change | V2 | V3 | Impact |
|
|
6884
7355
|
|--------|----|----|--------|
|
|
6885
|
-
| **Package Structure** | `
|
|
7356
|
+
| **Package Structure** | `ruflo` | `@claude-flow/*` (scoped) | Update imports |
|
|
6886
7357
|
| **Memory Backend** | JSON files | AgentDB + HNSW | Faster search |
|
|
6887
7358
|
| **Hooks System** | Basic patterns | ReasoningBank + SONA | Self-learning |
|
|
6888
7359
|
| **Security** | Manual validation | Automatic strict mode | More secure |
|
|
6889
7360
|
| **CLI Commands** | Flat structure | Nested subcommands | New syntax |
|
|
6890
|
-
| **Config Format** | `.
|
|
7361
|
+
| **Config Format** | `.ruflo/config.json` | `claude-flow.config.json` | Update path |
|
|
6891
7362
|
|
|
6892
7363
|
### Step-by-Step Migration
|
|
6893
7364
|
|
|
6894
7365
|
```bash
|
|
6895
7366
|
# STEP 1: Backup existing data (CRITICAL)
|
|
6896
7367
|
cp -r ./data ./data-backup-v2
|
|
6897
|
-
cp -r ./.
|
|
7368
|
+
cp -r ./.ruflo ./.ruflo-backup-v2
|
|
6898
7369
|
|
|
6899
7370
|
# STEP 2: Check migration status
|
|
6900
|
-
npx
|
|
7371
|
+
npx ruflo@v3alpha migrate status
|
|
6901
7372
|
|
|
6902
7373
|
# STEP 3: Run migration with dry-run first
|
|
6903
|
-
npx
|
|
7374
|
+
npx ruflo@v3alpha migrate run --dry-run
|
|
6904
7375
|
|
|
6905
7376
|
# STEP 4: Execute migration
|
|
6906
|
-
npx
|
|
7377
|
+
npx ruflo@v3alpha migrate run --from v2
|
|
6907
7378
|
|
|
6908
7379
|
# STEP 5: Verify migration
|
|
6909
|
-
npx
|
|
7380
|
+
npx ruflo@v3alpha migrate verify
|
|
6910
7381
|
|
|
6911
7382
|
# STEP 6: Initialize V3 learning
|
|
6912
|
-
npx
|
|
6913
|
-
npx
|
|
7383
|
+
npx ruflo@v3alpha hooks pretrain
|
|
7384
|
+
npx ruflo@v3alpha doctor --fix
|
|
6914
7385
|
```
|
|
6915
7386
|
|
|
6916
7387
|
### Command Changes Reference
|
|
6917
7388
|
|
|
6918
7389
|
| V2 Command | V3 Command | Notes |
|
|
6919
7390
|
|------------|------------|-------|
|
|
6920
|
-
| `
|
|
6921
|
-
| `
|
|
6922
|
-
| `
|
|
6923
|
-
| `
|
|
7391
|
+
| `ruflo start` | `ruflo mcp start` | MCP is explicit |
|
|
7392
|
+
| `ruflo init` | `ruflo init --wizard` | Interactive mode |
|
|
7393
|
+
| `ruflo spawn <type>` | `ruflo agent spawn -t <type>` | Nested under `agent` |
|
|
7394
|
+
| `ruflo swarm create` | `ruflo swarm init --topology mesh` | Explicit topology |
|
|
6924
7395
|
| `--pattern-store path` | `--memory-backend agentdb` | Backend selection |
|
|
6925
7396
|
| `hooks record` | `hooks post-edit --success true` | Explicit success flag |
|
|
6926
7397
|
| `memory get <key>` | `memory retrieve --key <key>` | Explicit flag |
|
|
@@ -6930,7 +7401,7 @@ npx claude-flow@v3alpha doctor --fix
|
|
|
6930
7401
|
|
|
6931
7402
|
### Configuration Migration
|
|
6932
7403
|
|
|
6933
|
-
**V2 Config (`.
|
|
7404
|
+
**V2 Config (`.ruflo/config.json`)**:
|
|
6934
7405
|
```json
|
|
6935
7406
|
{
|
|
6936
7407
|
"mode": "basic",
|
|
@@ -6962,7 +7433,7 @@ npx claude-flow@v3alpha doctor --fix
|
|
|
6962
7433
|
|
|
6963
7434
|
```typescript
|
|
6964
7435
|
// V2 (deprecated)
|
|
6965
|
-
import { ClaudeFlow, Agent, Memory } from '
|
|
7436
|
+
import { ClaudeFlow, Agent, Memory } from 'ruflo';
|
|
6966
7437
|
|
|
6967
7438
|
// V3 (new)
|
|
6968
7439
|
import { ClaudeFlowClient } from '@claude-flow/cli';
|
|
@@ -6977,10 +7448,10 @@ If migration fails, you can rollback:
|
|
|
6977
7448
|
|
|
6978
7449
|
```bash
|
|
6979
7450
|
# Check rollback options
|
|
6980
|
-
npx
|
|
7451
|
+
npx ruflo@v3alpha migrate rollback --list
|
|
6981
7452
|
|
|
6982
7453
|
# Rollback to V2
|
|
6983
|
-
npx
|
|
7454
|
+
npx ruflo@v3alpha migrate rollback --to v2
|
|
6984
7455
|
|
|
6985
7456
|
# Restore backup manually if needed
|
|
6986
7457
|
rm -rf ./data
|
|
@@ -6989,12 +7460,12 @@ cp -r ./data-backup-v2 ./data
|
|
|
6989
7460
|
|
|
6990
7461
|
### Post-Migration Checklist
|
|
6991
7462
|
|
|
6992
|
-
- [ ] Verify all agents spawn correctly: `npx
|
|
6993
|
-
- [ ] Check memory search works: `npx
|
|
6994
|
-
- [ ] Confirm MCP server starts: `npx
|
|
6995
|
-
- [ ] Run doctor diagnostics: `npx
|
|
6996
|
-
- [ ] Test a simple swarm: `npx
|
|
6997
|
-
- [ ] Bootstrap learning: `npx
|
|
7463
|
+
- [ ] Verify all agents spawn correctly: `npx ruflo@v3alpha agent list`
|
|
7464
|
+
- [ ] Check memory search works: `npx ruflo@v3alpha memory search -q "test"`
|
|
7465
|
+
- [ ] Confirm MCP server starts: `npx ruflo@v3alpha mcp start`
|
|
7466
|
+
- [ ] Run doctor diagnostics: `npx ruflo@v3alpha doctor`
|
|
7467
|
+
- [ ] Test a simple swarm: `npx ruflo@v3alpha swarm init --topology mesh`
|
|
7468
|
+
- [ ] Bootstrap learning: `npx ruflo@v3alpha hooks pretrain`
|
|
6998
7469
|
|
|
6999
7470
|
### Common Migration Issues
|
|
7000
7471
|
|