@mfjjs/ruflo-setup 0.2.1 → 0.2.2

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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.2.2](https://gitlab.mfj.local:8022/mario/ruflo-setup/compare/v0.2.1...v0.2.2) (2026-03-14)
6
+
7
+
8
+ ### Features
9
+
10
+ * **package:** add ruflo-benefits.md to package files ([28a308a](https://gitlab.mfj.local:8022/mario/ruflo-setup/commit/28a308a005516981b06a213a053a1184c9644963))
11
+
5
12
  ### [0.2.1](https://gitlab.mfj.local:8022/mario/ruflo-setup/compare/v0.2.0...v0.2.1) (2026-03-14)
6
13
 
7
14
 
@@ -0,0 +1,943 @@
1
+ # Ruflo: Complete Feature Enablement & Deep Dive
2
+
3
+ > Research date: 2026-03-14
4
+ > Source: ruvnet/ruflo (GitHub), ruvnet/claude-flow (GitHub), local codebase analysis
5
+
6
+ ---
7
+
8
+ ## Table of Contents
9
+
10
+ 1. [What Ruflo Is](#what-ruflo-is)
11
+ 2. [Complete Feature List](#complete-feature-list)
12
+ 3. [Where Everything Runs](#where-everything-runs)
13
+ 4. [How to Check Feature Status](#how-to-check-feature-status)
14
+ 5. [Step-by-Step Enablement](#step-by-step-enablement)
15
+ 6. [MinCut, RuVector, and RVF Deep Dive](#mincut-ruvector-and-rvf-deep-dive)
16
+ 7. [Full Before/After: What the Combined Stack Changes](#full-beforeafter)
17
+ 8. [Sources](#sources)
18
+ 9. [Agents & Skills: Origin Reference](#agents--skills-origin-reference)
19
+ 10. [How Agents and Skills Are Invoked](#how-agents-and-skills-are-invoked)
20
+
21
+ ---
22
+
23
+ ## What Ruflo Is
24
+
25
+ `ruflo`, `claude-flow`, and `@claude-flow/cli` are the **same codebase** at different abstraction levels:
26
+
27
+ - `ruflo` (npm) — thin wrapper, exposes the `ruflo` CLI binary
28
+ - `claude-flow` (npm) — alternate install path, same code
29
+ - `@claude-flow/cli` — the actual implementation
30
+
31
+ > "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."
32
+ > — ruvnet/ruflo README
33
+
34
+ **Critical clarification:** There are **no Rust source files or Cargo.toml files** to compile. All Rust/WASM components ship as pre-compiled `.wasm` blobs inside `@ruvector/*` npm packages. No `cargo install` is needed.
35
+
36
+ ---
37
+
38
+ ## Complete Feature List
39
+
40
+ ### Layer 0 — Prerequisites
41
+
42
+ | # | Feature | Notes |
43
+ |---|---|---|
44
+ | 0.1 | Node.js 20+ | Minimum requirement |
45
+ | 0.2 | pnpm | Package manager |
46
+ | 0.3 | Claude Code CLI (`@anthropic-ai/claude-code`) | Must be installed globally |
47
+ | 0.4 | `ANTHROPIC_API_KEY` | Required for all LLM calls |
48
+
49
+ ### Layer 1 — Global npm Packages
50
+
51
+ ```bash
52
+ pnpm add -g ruflo@latest
53
+ pnpm add -g @mfjjs/ruflo-setup
54
+ ```
55
+
56
+ These are the only two packages needed globally. Everything else is either:
57
+ - Pulled in as optional dependencies of `ruflo@latest`, or
58
+ - Run ephemerally via `npx`/`pnpm dlx` from `.mcp.json`
59
+
60
+ ### Layer 2 — Optional npm Packages (auto-pulled with full install)
61
+
62
+ These are `optionalDependencies` — installed unless you pass `--omit=optional`.
63
+
64
+ | Package | Purpose | Runs Where |
65
+ |---|---|---|
66
+ | `@claude-flow/aidefence` | Prompt injection / PII detection | Local (Node.js) |
67
+ | `@claude-flow/codex` | OpenAI Codex dual-mode | Local (Node.js) |
68
+ | `@claude-flow/embeddings` | ONNX vector embeddings (all-MiniLM-L6-v2) | Local (Node.js) |
69
+ | `@claude-flow/guidance` | CLAUDE.md compiled to governance gates | Local (Node.js) |
70
+ | `@claude-flow/memory` | AgentDB + HNSW vector index | Local (Node.js) |
71
+ | `agentic-flow` | Agent Booster WASM transforms + ReasoningBank | Local (WASM in Node.js) |
72
+ | `@ruvector/attention` | Flash Attention kernel | Local (WASM in Node.js) |
73
+ | `@ruvector/learning-wasm` | Neural training kernel | Local (WASM in Node.js) |
74
+ | `@ruvector/router` | Q-Learning semantic router | Local (WASM in Node.js) |
75
+ | `@ruvector/router-linux-x64-gnu` | Platform native binding (Linux x64 only) | Local (native) |
76
+ | `@ruvector/sona` | Self-Optimizing Neural Architecture (LoRA/EWC++) | Local (WASM in Node.js) |
77
+
78
+ > **Windows note:** `@ruvector/attention` has a NAPI native binding that requires the **Windows 11 SDK** to compile. Without it, the package falls back to WASM automatically — you do not need the SDK for basic operation.
79
+
80
+ **Install profiles:**
81
+
82
+ | Mode | Command | Approx. Size |
83
+ |---|---|---|
84
+ | Minimal (no ML) | `pnpm add -g ruflo@latest --omit=optional` | ~45 MB |
85
+ | Full (with ML/WASM) | `pnpm add -g ruflo@latest` | ~340 MB |
86
+
87
+ ### Layer 3 — MCP Servers
88
+
89
+ Registered in `.mcp.json`, run ephemerally via `pnpm dlx`:
90
+
91
+ | MCP Server | npm Package | Required? | Auth? |
92
+ |---|---|---|---|
93
+ | `claude-flow` | `@claude-flow/cli@latest` | Yes | No |
94
+ | `ruv-swarm` | `ruv-swarm` | Optional | No |
95
+ | `flow-nexus` | `flow-nexus@latest` | Optional | Yes — account at Cognitum.One |
96
+
97
+ ### Layer 4 — MCP Tool Groups (opt-in via env vars)
98
+
99
+ | Group | Env Var | Tool Count | Default |
100
+ |---|---|---|---|
101
+ | Intelligence | `MCP_GROUP_INTELLIGENCE=true` | 10 | On |
102
+ | Agents | `MCP_GROUP_AGENTS=true` | 50 | On |
103
+ | Memory | `MCP_GROUP_MEMORY=true` | 25 | On |
104
+ | DevTools | `MCP_GROUP_DEVTOOLS=true` | 60 | On |
105
+ | Security | `MCP_GROUP_SECURITY=true` | 25 | **On** (enabled by ruflo-setup) |
106
+ | Browser | `MCP_GROUP_BROWSER=true` | 23 | **On** (enabled by ruflo-setup) |
107
+ | Neural | `MCP_GROUP_NEURAL=true` | 20 | **On** (enabled by ruflo-setup) |
108
+ | Agentic Flow | `MCP_GROUP_AGENTIC_FLOW=true` | 15 | **On** (enabled by ruflo-setup) |
109
+ | Claude Code | `MCP_GROUP_CLAUDE_CODE=true` | varies | Needs `ANTHROPIC_API_KEY` |
110
+ | Gemini | `MCP_GROUP_GEMINI=true` | varies | Needs `GOOGLE_API_KEY` |
111
+ | Codex | `MCP_GROUP_CODEX=true` | varies | Needs `OPENAI_API_KEY` |
112
+
113
+ ### Layer 5 — Environment Variables
114
+
115
+ | Variable | Required? | Purpose |
116
+ |---|---|---|
117
+ | `ANTHROPIC_API_KEY` | **Yes** | Claude model inference |
118
+ | `OPENAI_API_KEY` | Optional | GPT models + Codex |
119
+ | `GOOGLE_API_KEY` | Optional | Gemini models |
120
+ | `OPENROUTER_API_KEY` | Optional | Multi-provider proxy |
121
+ | `CLAUDE_FLOW_MODE` | Set by .mcp.json | Must be `v3` |
122
+ | `CLAUDE_FLOW_HOOKS_ENABLED` | Set by .mcp.json | `true` |
123
+ | `CLAUDE_FLOW_TOPOLOGY` | Set by .mcp.json | `hierarchical-mesh` |
124
+ | `CLAUDE_FLOW_MAX_AGENTS` | Set by .mcp.json | `15` |
125
+ | `CLAUDE_FLOW_MEMORY_BACKEND` | Set by .mcp.json | `hybrid` |
126
+ | `CLAUDE_FLOW_LOG_LEVEL` | Optional | `debug` / `info` / `warn` / `error` |
127
+ | `CLAUDE_FLOW_CONTEXT_WINDOW` | Optional | Default `200000` |
128
+
129
+ ### Layer 6 — Claude Code Hooks (global, one-time)
130
+
131
+ | Hook | File | Purpose |
132
+ |---|---|---|
133
+ | Global `SessionStart` | `~/.claude/settings.json` | `check-ruflo.cjs` warns when project is not configured |
134
+ | Global `/ruflo-setup` command | `~/.claude/commands/ruflo-setup.md` | Slash command available in all projects |
135
+
136
+ ### Layer 7 — Project Scaffolding (`ruflo init --full`)
137
+
138
+ | File / Dir | Purpose |
139
+ |---|---|
140
+ | `.claude/settings.json` | Hooks, permissions, daemon config |
141
+ | `.claude/helpers/statusline.cjs` | Real-time statusline |
142
+ | `.claude/helpers/hook-handler.cjs` | Pattern learning handler |
143
+ | `.claude/helpers/intelligence.cjs` | Intelligence diagnostics |
144
+ | `.claude/agents/` | 120+ agent definitions |
145
+ | `.claude/skills/` | 30+ skill definitions |
146
+ | `.claude/commands/` | Slash commands |
147
+ | `CLAUDE.md` | Project governance rules |
148
+ | `.mcp.json` | MCP server registration |
149
+ | `.claude-flow/` | Runtime data (memory, sessions, neural, logs) |
150
+
151
+ ### Layer 8 — Optional: Docker Chat UI Stack
152
+
153
+ | Component | Purpose |
154
+ |---|---|
155
+ | `ruvocal` (SvelteKit) | Local chat UI |
156
+ | MCP Bridge (Node.js, port 3001) | UI ↔ MCP bridge |
157
+ | MongoDB (or RVF) | Conversation persistence |
158
+ | Nginx (port 3000) | Reverse proxy |
159
+
160
+ ---
161
+
162
+ ## Where Everything Runs
163
+
164
+ ```
165
+ ┌─────────────────────────────────────────────────────────────────┐
166
+ │ ANTHROPIC CLOUD │
167
+ │ • Claude model inference (all agent LLM calls) │
168
+ │ • Claude 3.5 Haiku (tier 2 routing, ~500ms, $0.0002) │
169
+ │ • Claude Sonnet 4 / Opus 4 (tier 3, 2-5s, $0.003-0.015) │
170
+ └─────────────────────────────────────────────────────────────────┘
171
+
172
+ ┌─────────────────────────────────────────────────────────────────┐
173
+ │ FLOW NEXUS CLOUD (Cognitum.One — optional, auth required) │
174
+ │ • User auth, E2B cloud sandboxes, distributed neural training │
175
+ │ • App store, payment/credits (RUV tokens), storage uploads │
176
+ │ • Real-time event subscriptions, swarm templates in cloud │
177
+ └─────────────────────────────────────────────────────────────────┘
178
+
179
+ ┌────────────────────────────────────────────────────────────────┐
180
+ │ LOCAL COMPUTER — Node.js process │
181
+ │ • ruflo CLI (all 26 commands, 140+ subcommands) │
182
+ │ • @claude-flow/cli MCP server (stdio / HTTP port 3000) │
183
+ │ • ruv-swarm MCP server │
184
+ │ • All agent spawning & swarm coordination (up to 15 agents) │
185
+ │ • Memory: SQLite/RVF in .claude-flow/data/ │
186
+ │ • HNSW vector index (AgentDB) │
187
+ │ • ONNX embeddings: all-MiniLM-L6-v2 │
188
+ │ • Background daemon (12 worker types) │
189
+ │ • All hooks (27 hooks + 12 workers) │
190
+ │ • Pattern learning, session persistence │
191
+ │ • Security scanning, code analysis │
192
+ │ • IPFS registry signing (@noble/ed25519) │
193
+ └────────────────────────────────────────────────────────────────┘
194
+
195
+ ┌────────────────────────────────────────────────────────────────┐
196
+ │ LOCAL COMPUTER — Rust compiled to WASM │
197
+ │ (runs inside the Node.js process — no separate install) │
198
+ │ │
199
+ │ • Agent Booster (agentic-flow) │
200
+ │ Tier 1 routing: <1ms, $0 — skips LLM entirely │
201
+ │ Transforms: var→const, add-types, add-error-handling, │
202
+ │ async-await, add-logging, remove-console │
203
+ │ Throughput: 1,000 files/second │
204
+ │ │
205
+ │ • Flash Attention (@ruvector/attention) │
206
+ │ 2.49x–7.47x speedup for vector re-ranking │
207
+ │ O(N) memory via block tiling (block size: 32) │
208
+ │ Sparse attention: top 12% of keys only │
209
+ │ │
210
+ │ • Q-Learning semantic router (@ruvector/router) │
211
+ │ Routes tasks to optimal agent without LLM call │
212
+ │ Combines: SONA + Q-table + coverage signal + MinCut graph │
213
+ │ │
214
+ │ • SONA — Self-Optimizing Neural Architecture (@ruvector/sona) │
215
+ │ LoRA + EWC++ — learns from task outcomes across sessions │
216
+ │ Confidence: +0.1 success / -0.15 failure / -0.01/day decay │
217
+ │ │
218
+ │ • Neural training kernel (@ruvector/learning-wasm) │
219
+ │ JUDGE → DISTILL → CONSOLIDATE pipeline (background) │
220
+ │ │
221
+ │ Runtime selection order: NAPI native → WASM → TypeScript │
222
+ └────────────────────────────────────────────────────────────────┘
223
+
224
+ ┌────────────────────────────────────────────────────────────────┐
225
+ │ LOCAL COMPUTER — Docker (optional chat UI) │
226
+ │ ruvocal (SvelteKit) + MCP Bridge + MongoDB/RVF + Nginx │
227
+ └────────────────────────────────────────────────────────────────┘
228
+ ```
229
+
230
+ ### 3-Tier Model Routing Summary
231
+
232
+ | Tier | Handler | Latency | Cost | Trigger |
233
+ |---|---|---|---|---|
234
+ | 1 | Agent Booster (WASM) | <1ms | $0 | Simple transforms — no LLM call |
235
+ | 2 | Claude Haiku | ~500ms | $0.0002 | Low complexity (<30%) |
236
+ | 3 | Claude Sonnet / Opus | 2–5s | $0.003–0.015 | Complex reasoning, architecture, security |
237
+
238
+ ---
239
+
240
+ ## How to Check Feature Status
241
+
242
+ Run the built-in status command to see which layers are enabled in the current project:
243
+
244
+ ```bash
245
+ ruflo-setup status
246
+ ```
247
+
248
+ This checks all 8 layers and prints a report with `[OK]`, `[--]`, and `[!!]` indicators:
249
+
250
+ - `[OK]` — feature is present and enabled
251
+ - `[--]` — not enabled (acceptable for optional features)
252
+ - `[!!]` — required feature is missing (needs attention)
253
+
254
+ The report covers:
255
+ - **Layer 0**: Node.js 20+, pnpm, Claude Code CLI, `ANTHROPIC_API_KEY`
256
+ - **Layer 1**: Global npm packages (`ruflo`, `@mfjjs/ruflo-setup`)
257
+ - **Layer 2**: Optional WASM/ML packages (`@ruvector/*`, `agentic-flow`, `@claude-flow/*`)
258
+ - **Layer 3**: MCP servers in `.mcp.json` (`claude-flow`, `ruv-swarm`, `flow-nexus`)
259
+ - **Layer 4**: MCP tool groups (`SECURITY`, `BROWSER`, `NEURAL`, `AGENTIC_FLOW` — enabled by default)
260
+ - **Layer 5**: Environment variables (`ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, etc.)
261
+ - **Layer 6**: Claude Code global hooks (SessionStart hook, `/ruflo-setup` command)
262
+ - **Layer 7**: Project scaffolding (`.mcp.json`, `CLAUDE.md`, `.claude/agents/`, etc.)
263
+ - **Layer 8**: Docker chat UI stack (`ruvocal`)
264
+
265
+ A summary line shows `X/Y features enabled` and flags any required items that need action.
266
+
267
+ ---
268
+
269
+ ## Step-by-Step Enablement
270
+
271
+ ```bash
272
+ # 1. Install Node.js 20+
273
+ winget install OpenJS.NodeJS.LTS # Windows
274
+ brew install node # macOS
275
+
276
+ # 2. Install pnpm
277
+ winget install -e --id pnpm.pnpm # Windows
278
+ brew install pnpm # macOS
279
+
280
+ # 3. Install ruflo globally (full, with WASM/ML packages)
281
+ pnpm add -g ruflo@latest
282
+
283
+ # 4. Install ruflo-setup bootstrapper
284
+ pnpm add -g @mfjjs/ruflo-setup
285
+
286
+ # 5. Set your Anthropic API key (required)
287
+ # Windows (permanent):
288
+ setx ANTHROPIC_API_KEY "your-key-here"
289
+ # macOS/Linux:
290
+ echo 'export ANTHROPIC_API_KEY="your-key-here"' >> ~/.zshrc
291
+
292
+ # 6. From each project directory — run full setup:
293
+ ruflo-setup
294
+ # This automatically does:
295
+ # pnpm add -g ruflo@latest
296
+ # ruflo init --full
297
+ # writes .mcp.json (3 MCP servers)
298
+ # installs global SessionStart hook (~/.claude/settings.json)
299
+ # installs global /ruflo-setup command (~/.claude/commands/)
300
+
301
+ # 7. MCP tool groups — already enabled by ruflo-setup
302
+ # SECURITY, BROWSER, NEURAL, and AGENTIC_FLOW are now on by default.
303
+ # To disable any group, set its value to "false" in .mcp.json env.
304
+
305
+ # 8. (Optional) Authenticate with Flow Nexus
306
+ # Sign up at Cognitum.One, then use /flow-nexus-auth in Claude Code
307
+
308
+ # 9. Run diagnostics
309
+ ruflo doctor --fix
310
+
311
+ # 10. Restart Claude Code to load new MCP servers
312
+ ```
313
+
314
+ ---
315
+
316
+ ## MinCut, RuVector, and RVF Deep Dive
317
+
318
+ ### MinCut — Codebase Graph Partitioning
319
+
320
+ MinCut is a real implementation using the **Stoer-Wagner algorithm**, exposed as the MCP tool `hooks_graph_mincut`. It is not a swarm feature — it is a static analysis pass that feeds agent routing decisions.
321
+
322
+ **What it does:**
323
+
324
+ Builds a directed dependency graph from your codebase's import/export statements, then finds the minimum set of edges to cut to split the graph into two natural groups:
325
+
326
+ ```
327
+ partition1: ["src/auth/", "src/users/"]
328
+ partition2: ["src/payments/", "src/orders/"]
329
+ bridges: [{ from: "src/auth/index.ts", to: "src/payments/gateway.ts" }]
330
+ articulationPoints: ["src/auth/index.ts"]
331
+ suggestion: "Natural boundary: auth/users vs payments/orders"
332
+ ```
333
+
334
+ **What changes in the workflow:**
335
+
336
+ | Without MinCut | With MinCut |
337
+ |---|---|
338
+ | Agent assignment by file extension + keywords only | Agent assignment uses graph community membership |
339
+ | Generic refactoring suggestions | Human-readable `suggestion` output: "split here" |
340
+ | Arbitrary task parallelization | Swarm splits tasks along the MinCut boundary — no agent collisions |
341
+ | No structural risk awareness | Articulation points flagged as high-risk for edits |
342
+
343
+ **Relation to sublinear agents:** MinCut is O(V³) and runs *before* the sublinear solvers. It reduces the graph first, then the `consensus-coordinator` runs the Neumann series solver on the smaller partition adjacency matrices. `pagerank-analyzer` scores nodes within each partition for voting influence.
344
+
345
+ ---
346
+
347
+ ### RuVector (`@ruvector/*`) — Four WASM Kernels
348
+
349
+ #### `@ruvector/attention` — Flash Attention
350
+
351
+ Solves O(N²) memory for naive attention over large context.
352
+
353
+ - Processes attention in blocks of 32 vectors (fits CPU L1 cache)
354
+ - Sparse attention: only top 12% of keys (min 16, max 96)
355
+ - 8x loop unrolling for dot products
356
+ - Pre-allocated `Float32Array` buffers — zero GC pressure
357
+ - Runs *after* HNSW returns top-K candidates — re-ranks them
358
+
359
+ | Operation | Without | With | Improvement |
360
+ |---|---|---|---|
361
+ | Re-ranking 1,000 patterns | ~350ms | ~47–140ms | 2.49x–7.47x |
362
+ | Memory for full attention | O(N²) | O(N) via tiling | — |
363
+
364
+ ---
365
+
366
+ #### `@ruvector/sona` — Self-Optimizing Neural Architecture
367
+
368
+ Learns which agent works best for each task class in *your* codebase, persisting across sessions.
369
+
370
+ - On task completion (`hooks_trajectory_end`): extracts keywords, updates routing confidence
371
+ - Success: `+0.1` confidence. Failure: `-0.15`. Time decay: `-0.01/day`
372
+ - **EWC++**: old patterns not overwritten when new ones are learned
373
+ - **LoRA**: fine-tunes routing weights with minimal compute
374
+ - Persists to `.swarm/sona-patterns.json`
375
+
376
+ | Session 1 | After 20+ sessions |
377
+ |---|---|
378
+ | Routes by keyword heuristic every time | High-confidence routes resolve in ~0.045ms |
379
+ | "implement auth" → `coder` (always) | "implement auth" in this codebase → `security-architect` (learned) |
380
+ | No failure learning | Failed routes reduce confidence; alternatives promoted |
381
+ | Cold start every session | Learned context persists across sessions |
382
+
383
+ ---
384
+
385
+ #### `@ruvector/router` — Q-Learning Semantic Router
386
+
387
+ Blends four signals to pick the optimal agent from 60+ options:
388
+
389
+ 1. **SONA pattern match** — learned keyword → agent mappings
390
+ 2. **Q-learning table** — `(task_type, file_context)` → best agent, updated by reward
391
+ 3. **Coverage signal** — if test coverage below threshold, `tester` gets priority
392
+ 4. **MinCut graph signal** — file's community membership and articulation-point status
393
+
394
+ ```
395
+ Without router: "implement OAuth" → coder (always)
396
+ With router: "implement OAuth" in src/auth/ (articulation point, 34% coverage)
397
+ → security-architect (SONA: 0.87) + tester spawned in parallel
398
+ ```
399
+
400
+ The returned result includes `confidence`, `reason`, and `alternates` — the routing decision is inspectable.
401
+
402
+ ---
403
+
404
+ #### `@ruvector/learning-wasm` — Neural Training Kernel
405
+
406
+ Powers the background `ultralearn` worker and `ruflo neural train`. Runs the four-step pipeline:
407
+
408
+ 1. **RETRIEVE** — HNSW pattern search
409
+ 2. **JUDGE** — success/failure verdict stored with embedding
410
+ 3. **DISTILL** — reusable pattern extracted via LoRA weight extraction
411
+ 4. **CONSOLIDATE** — merged into long-term memory via EWC++ (no catastrophic forgetting)
412
+
413
+ Runs in the background. Does not block agent execution.
414
+
415
+ ---
416
+
417
+ ### RVF (RuVector Format) — Two Distinct Uses
418
+
419
+ #### RVF as a Database (Chat UI)
420
+
421
+ A zero-dependency JSON document store replacing MongoDB for the local `ruvocal` chat UI:
422
+
423
+ ```json
424
+ {
425
+ "rvf_version": "2.0",
426
+ "format": "rvf-database",
427
+ "collections": {
428
+ "conversations": { "id1": { ... } }
429
+ },
430
+ "metadata": { "created_at": "...", "doc_count": 1847 }
431
+ }
432
+ ```
433
+
434
+ - In-memory `Map<id, Record>` → O(1) lookup by ID
435
+ - Writes debounced 500ms — no write thrash
436
+ - Implements the full MongoDB Collection interface — 56 UI files work without modification
437
+ - Supports 15 MongoDB operators (`$set`, `$push`, `$or`, `$regex`, etc.)
438
+ - Cold start: ~1.2s vs ~3.5s with MongoDB driver
439
+
440
+ #### RVF as a Package Format (Deployment)
441
+
442
+ The `rvf.manifest.json` describes ruflo's MCP deployment artifact as a segmented container:
443
+
444
+ | Segment | Contents | Security Role |
445
+ |---|---|---|
446
+ | `WASM` | MCP bridge entrypoint | Microkernel runtime boundary |
447
+ | `TOOL_GROUPS` | Active MCP tools per profile | Access control surface |
448
+ | `CRYPTO` | Request signing keys (`@noble/ed25519`) | Every MCP tool call is signed |
449
+ | `META_IDX` | Tool registry cache | Prevents tool substitution attacks |
450
+ | `OVERLAY` | Per-project customization | Tenant isolation |
451
+
452
+ ---
453
+
454
+ ## Full Before/After
455
+
456
+ ```
457
+ WITHOUT ruvector/mincut/rvf:
458
+ ────────────────────────────────────────────────────────────────────
459
+ Task → keyword match → pick agent → Anthropic API call
460
+ Memory search → linear scan → ~400ms per query
461
+ Each session starts cold — no learned patterns
462
+ Agent routing is static, project-agnostic
463
+ Test gaps, boundary files, articulation points: invisible
464
+ Simple edits ("var→const") still hit the LLM
465
+
466
+ WITH full stack enabled:
467
+ ────────────────────────────────────────────────────────────────────
468
+ Task arrives
469
+ → MinCut: which community is this file in? Is it a bridge?
470
+ → SONA: confidence-weighted learned route (cross-session)
471
+ → Q-learning: historical reward signal for (task, context)
472
+ → Coverage signal: spawn tester in parallel if needed?
473
+ → Route decision with confidence score + human-readable reason
474
+
475
+ Memory search
476
+ → HNSW: top-K candidates in ~0.045ms (vs ~400ms linear)
477
+ → Flash Attention: re-rank in O(N) memory with no GC pauses
478
+ → Semantically re-ranked results in <1ms total
479
+
480
+ Simple edit ("var→const", "add types", "add error handling")
481
+ → Agent Booster (WASM): no LLM call at all
482
+ → 1ms per file, 1,000 files/second, $0 cost
483
+
484
+ Session ends
485
+ → SONA: update confidence table from outcomes
486
+ → LearningBridge: JUDGE → DISTILL → CONSOLIDATE (background)
487
+ → EWC++: new patterns stored without overwriting old ones
488
+ → Next session starts with learned context
489
+ ```
490
+
491
+ ### Performance Numbers (Verified)
492
+
493
+ | Metric | Baseline | With Stack | Improvement |
494
+ |---|---|---|---|
495
+ | HNSW vector search (1M vectors) | ~400ms | ~0.045ms | ~8,800x |
496
+ | Memory cache hit | — | ~0.01ms | — |
497
+ | Flash Attention re-ranking | ~350ms | ~47–140ms | 2.49–7.47x |
498
+ | Graph build (1k nodes) | — | 2.78ms | 71.9x under 200ms target |
499
+ | PageRank (1k nodes) | — | 12.21ms | 8.2x under 100ms target |
500
+ | Insight recording | — | 0.12ms | 41x under 5ms target |
501
+ | Knowledge transfer | — | 1.25ms | 80x under 100ms target |
502
+ | Agent Booster edit | ~352ms (Haiku) | <1ms (WASM) | ~350x |
503
+
504
+ ---
505
+
506
+ ## Sources
507
+
508
+ | # | Source | What Was Verified |
509
+ |---|---|---|
510
+ | 1 | `ruvnet/ruflo` GitHub — README | Identity: ruflo = claude-flow, WASM architecture |
511
+ | 2 | `ruflo/package.json` (upstream) | `ruflo` delegates entirely to `@claude-flow/cli` |
512
+ | 3 | `v3/@claude-flow/cli/package.json` | Complete optional dependencies list |
513
+ | 4 | `v3/@claude-flow/cli/src/ruvector/graph-analyzer.ts` | MinCut in agent routing context |
514
+ | 5 | `v3/@claude-flow/cli/src/ruvector/flash-attention.ts` | Block size 32, sparse top 12%, 8x unrolling |
515
+ | 6 | `v3/@claude-flow/cli/src/memory/sona-optimizer.ts` | Confidence ±values, decay rate, EWC++ |
516
+ | 7 | `v3/@claude-flow/cli/src/ruvector/README.md` | `hooks_graph_mincut` API, HNSW benchmark table |
517
+ | 8 | `ruflo/src/ruvocal/src/lib/server/database/rvf.ts` | RVF database implementation (1,079 lines) |
518
+ | 9 | `ruflo/rvf.manifest.json` + ADR-032 | RVF package segments, CRYPTO signing |
519
+ | 10 | `v2/docs/integrations/agent-booster/AGENT-BOOSTER-INTEGRATION.md` | Agent Booster transforms, 1ms/1000 files/sec |
520
+ | 11 | `ruflo/docs/adr/ADR-002-WASM-CORE-PACKAGE.md` | MinCut algorithms, WASM packaging decision |
521
+ | 12 | Local `.claude-flow/CAPABILITIES.md` | Performance targets, agent types, hook system |
522
+ | 13 | Local `.claude-flow/config.yaml` | Runtime config: HNSW, SONA, LearningBridge, MemoryGraph |
523
+ | 14 | Local `.mcp.json` | Three MCP servers, env vars |
524
+ | 15 | Local `.claude-flow/data/auto-memory-store.json` | Windows SDK requirement for `@ruvector/attention` |
525
+ | 16 | npmjs.com — `ruflo` | Version confirmation (3.5.15) |
526
+
527
+ ---
528
+
529
+ ## Agents & Skills: Origin Reference
530
+
531
+ > `[Claude]` = built into Claude Code by Anthropic — always available, no install needed.
532
+ > `[Ruflo]` = installed by `ruflo init --full` into `.claude/agents/` or `.claude/skills/`.
533
+
534
+ ---
535
+
536
+ ### Agents
537
+
538
+ #### Claude Code Built-in Agents
539
+
540
+ | Agent | Description |
541
+ |---|---|
542
+ | `general-purpose` | Default multi-step task agent; used when no specialized type is specified |
543
+ | `Explore` | Fast read-only codebase exploration; searches files, patterns, and answers structure questions |
544
+ | `Plan` | Software architect agent; designs implementation plans and identifies critical files |
545
+ | `statusline-setup` | Configures the Claude Code status line setting in user config |
546
+ | `claude-code-guide` | Answers questions about Claude Code CLI features, hooks, MCP, and the Anthropic API |
547
+
548
+ #### Ruflo Agents — Core Development
549
+
550
+ | Agent | Description |
551
+ |---|---|
552
+ | `coder` | Implementation specialist for writing clean, efficient code with self-learning capabilities |
553
+ | `planner` | Strategic planning and task orchestration agent with AI-powered resource optimization |
554
+ | `researcher` | Deep research and information gathering specialist with AI-enhanced pattern recognition |
555
+ | `reviewer` | Code review and quality assurance specialist with AI-powered pattern detection |
556
+ | `tester` | Comprehensive testing and quality assurance specialist with AI-powered test generation |
557
+
558
+ #### Ruflo Agents — Analysis & Architecture
559
+
560
+ | Agent | Description |
561
+ |---|---|
562
+ | `code-analyzer` | Advanced code quality analysis agent for comprehensive code reviews and improvements |
563
+ | `system-architect` | Expert agent for system architecture design, patterns, and high-level technical decisions |
564
+
565
+ #### Ruflo Agents — Swarm Coordination
566
+
567
+ | Agent | Description |
568
+ |---|---|
569
+ | `hierarchical-coordinator` | Queen-led hierarchical swarm coordination with specialized worker delegation |
570
+ | `mesh-coordinator` | Peer-to-peer mesh network swarm with distributed decision making and fault tolerance |
571
+ | `adaptive-coordinator` | Dynamic topology switching coordinator with self-organizing swarm patterns and real-time optimization |
572
+ | `smart-agent` | Intelligent agent coordination and dynamic spawning specialist |
573
+ | `swarm-init` | Swarm initialization and topology optimization specialist |
574
+ | `task-orchestrator` | Central coordination agent for task decomposition, execution planning, and result synthesis |
575
+ | `memory-coordinator` | Manage persistent memory across sessions and facilitate cross-agent memory sharing |
576
+ | `perf-analyzer` | Performance bottleneck analyzer for identifying and resolving workflow inefficiencies |
577
+
578
+ #### Ruflo Agents — Consensus & Distributed
579
+
580
+ | Agent | Description |
581
+ |---|---|
582
+ | `byzantine-coordinator` | Coordinates Byzantine fault-tolerant consensus protocols with malicious actor detection |
583
+ | `raft-manager` | Manages Raft consensus algorithm with leader election and log replication |
584
+ | `gossip-coordinator` | Coordinates gossip-based consensus protocols for scalable eventually consistent systems |
585
+ | `crdt-synchronizer` | Implements Conflict-free Replicated Data Types for eventually consistent state synchronization |
586
+ | `quorum-manager` | Implements dynamic quorum adjustment and intelligent membership management |
587
+ | `security-manager` | Implements comprehensive security mechanisms for distributed consensus protocols |
588
+ | `performance-benchmarker` | Implements comprehensive performance benchmarking for distributed consensus protocols |
589
+ | `consensus-coordinator` | Distributed consensus agent that uses sublinear solvers for fast agreement protocols in multi-agent systems |
590
+
591
+ #### Ruflo Agents — SPARC Methodology
592
+
593
+ | Agent | Description |
594
+ |---|---|
595
+ | `specification` | SPARC Specification phase specialist for requirements analysis with self-learning |
596
+ | `pseudocode` | SPARC Pseudocode phase specialist for algorithm design with self-learning |
597
+ | `architecture` | SPARC Architecture phase specialist for system design with self-learning |
598
+ | `refinement` | SPARC Refinement phase specialist for iterative improvement with self-learning |
599
+ | `sparc-coord` | Strategic planning and task orchestration agent with AI-powered resource optimization |
600
+ | `sparc-coder` | Implementation specialist for writing clean, efficient code with self-learning capabilities |
601
+ | `sparc-orchestrator` | V3 SPARC methodology orchestrator that coordinates all five SPARC phases with ReasoningBank learning |
602
+
603
+ #### Ruflo Agents — GitHub & Repository
604
+
605
+ | Agent | Description |
606
+ |---|---|
607
+ | `pr-manager` | Comprehensive pull request management with swarm coordination for automated reviews, testing, and merge workflows |
608
+ | `code-review-swarm` | Deploy specialized AI agents to perform comprehensive, intelligent code reviews that go beyond traditional static analysis |
609
+ | `issue-tracker` | Intelligent issue management and project coordination with automated tracking, progress monitoring, and team coordination |
610
+ | `release-manager` | Automated release coordination and deployment with ruv-swarm orchestration for seamless version management, testing, and deployment across multiple packages |
611
+ | `release-swarm` | Orchestrate complex software releases using AI swarms that handle everything from changelog generation to multi-platform deployment |
612
+ | `repo-architect` | Repository structure optimization and multi-repo management with ruv-swarm coordination for scalable project architecture and development workflows |
613
+ | `workflow-automation` | GitHub Actions workflow automation agent that creates intelligent, self-organizing CI/CD pipelines with adaptive multi-agent coordination and automated optimization |
614
+ | `github-modes` | Comprehensive GitHub integration modes for workflow orchestration, PR management, and repository coordination with batch optimization |
615
+ | `multi-repo-swarm` | Cross-repository swarm orchestration for organization-wide automation and intelligent collaboration |
616
+ | `project-board-sync` | Synchronize AI swarms with GitHub Projects for visual task management, progress tracking, and team coordination |
617
+ | `sync-coordinator` | Multi-repository synchronization coordinator that manages version alignment, dependency synchronization, and cross-package integration with intelligent swarm orchestration |
618
+ | `swarm-issue` | GitHub issue-based swarm coordination agent that transforms issues into intelligent multi-agent tasks with automatic decomposition and progress tracking |
619
+ | `swarm-pr` | Pull request swarm management agent that coordinates multi-agent code review, validation, and integration workflows with automated PR lifecycle management |
620
+
621
+ #### Ruflo Agents — Specialized Development
622
+
623
+ | Agent | Description |
624
+ |---|---|
625
+ | `backend-dev` | Specialized agent for backend API development with self-learning and pattern recognition |
626
+ | `ml-developer` | ML developer with self-learning hyperparameter optimization and pattern recognition |
627
+ | `mobile-dev` | Expert agent for React Native mobile application development across iOS and Android |
628
+ | `cicd-engineer` | Specialized agent for GitHub Actions CI/CD pipeline creation and optimization |
629
+ | `api-docs` | Expert agent for creating OpenAPI documentation with pattern learning |
630
+ | `base-template-generator` | Creates foundational templates, boilerplate code, or starter configurations for new projects, components, or features |
631
+ | `test-long-runner` | Test agent that can run for 30+ minutes on complex tasks |
632
+
633
+ #### Ruflo Agents — Performance & Optimization
634
+
635
+ | Agent | Description |
636
+ |---|---|
637
+ | `Benchmark Suite` | Comprehensive performance benchmarking, regression detection and performance validation |
638
+ | `Load Balancing Coordinator` | Dynamic task distribution, work-stealing algorithms and adaptive load balancing |
639
+ | `Performance Monitor` | Real-time metrics collection, bottleneck analysis, SLA monitoring and anomaly detection |
640
+ | `Resource Allocator` | Adaptive resource allocation, predictive scaling and intelligent capacity planning |
641
+ | `Topology Optimizer` | Dynamic swarm topology reconfiguration and communication pattern optimization |
642
+ | `goal-planner` | Goal-Oriented Action Planning (GOAP) specialist that dynamically creates intelligent plans to achieve complex objectives |
643
+ | `sublinear-goal-planner` | Goal-Oriented Action Planning specialist using sublinear solvers for large-scale distributed planning |
644
+ | `matrix-optimizer` | Expert agent for matrix analysis and optimization using sublinear algorithms |
645
+ | `pagerank-analyzer` | Expert agent for graph analysis and PageRank calculations using sublinear algorithms |
646
+ | `performance-optimizer` | System performance optimization agent that identifies bottlenecks and optimizes resource allocation using sublinear algorithms |
647
+ | `trading-predictor` | Advanced financial trading agent that leverages temporal advantage calculations to predict and execute trades before market data arrives |
648
+
649
+ #### Ruflo Agents — V3 Security & Intelligence
650
+
651
+ | Agent | Description |
652
+ |---|---|
653
+ | `security-architect` | V3 Security Architecture specialist with ReasoningBank learning, HNSW threat pattern search, and zero-trust design capabilities |
654
+ | `security-architect-aidefence` | Enhanced V3 Security Architecture specialist with AIMDS integration combining ReasoningBank learning with real-time prompt injection detection and behavioral analysis |
655
+ | `security-auditor` | Advanced security auditor with self-learning vulnerability detection, CVE database search, and compliance auditing |
656
+ | `aidefence-guardian` | AI Defense Guardian agent that monitors all agent inputs/outputs for manipulation attempts using AIMDS |
657
+ | `injection-analyst` | Deep analysis specialist for prompt injection and jailbreak attempts with pattern learning |
658
+ | `pii-detector` | Specialized PII detection agent that scans code and data for sensitive information leaks |
659
+ | `claims-authorizer` | V3 Claims-based authorization specialist implementing ADR-010 for fine-grained access control across swarm agents and MCP tools |
660
+
661
+ #### Ruflo Agents — V3 Memory & Learning
662
+
663
+ | Agent | Description |
664
+ |---|---|
665
+ | `memory-specialist` | V3 memory optimization specialist with HNSW indexing, hybrid backend management, vector quantization, and EWC++ for preventing catastrophic forgetting |
666
+ | `sona-learning-optimizer` | SONA-powered self-optimizing agent with LoRA fine-tuning and EWC++ memory preservation |
667
+ | `reasoningbank-learner` | V3 ReasoningBank integration specialist for trajectory tracking, verdict judgment, pattern distillation, and experience replay using HNSW-indexed memory |
668
+ | `swarm-memory-manager` | V3 distributed memory manager for cross-agent state synchronization, CRDT replication, and namespace coordination across the swarm |
669
+ | `collective-intelligence-coordinator` | Hive-mind collective decision making with Byzantine fault-tolerant consensus, attention-based coordination, and emergent intelligence patterns |
670
+
671
+ #### Ruflo Agents — V3 Architecture & Domain
672
+
673
+ | Agent | Description |
674
+ |---|---|
675
+ | `adr-architect` | V3 Architecture Decision Record specialist that documents, tracks, and enforces architectural decisions with ReasoningBank integration for pattern learning |
676
+ | `ddd-domain-expert` | V3 Domain-Driven Design specialist for bounded context identification, aggregate design, domain modeling, and ubiquitous language enforcement |
677
+ | `v3-integration-architect` | V3 deep agentic-flow@alpha integration specialist implementing ADR-001 for eliminating duplicate code and building claude-flow as a specialized extension |
678
+ | `performance-engineer` | V3 Performance Engineering Agent specialized in Flash Attention optimization, WASM SIMD acceleration, token usage optimization, and comprehensive performance profiling with SONA integration |
679
+
680
+ #### Ruflo Agents — Flow Nexus (cloud)
681
+
682
+ | Agent | Description |
683
+ |---|---|
684
+ | `flow-nexus-app-store` | Application marketplace and template management specialist that handles app publishing, discovery, deployment, and marketplace operations within Flow Nexus |
685
+ | `flow-nexus-auth` | Flow Nexus authentication and user management specialist that handles login, registration, session management, and user account operations |
686
+ | `flow-nexus-challenges` | Coding challenges and gamification specialist that manages challenge creation, solution validation, leaderboards, and achievement systems within Flow Nexus |
687
+ | `flow-nexus-neural` | Neural network training and deployment specialist that manages distributed neural network training, inference, and model lifecycle using Flow Nexus cloud infrastructure |
688
+ | `flow-nexus-payments` | Credit management and billing specialist that handles payment processing, credit systems, tier management, and financial operations within Flow Nexus |
689
+ | `flow-nexus-sandbox` | E2B sandbox deployment and management specialist that creates, configures, and manages isolated execution environments for code development and testing |
690
+ | `flow-nexus-swarm` | AI swarm orchestration and management specialist that deploys, coordinates, and scales multi-agent swarms in the Flow Nexus cloud platform |
691
+ | `flow-nexus-user-tools` | User management and system utilities specialist that handles profile management, storage operations, real-time subscriptions, and platform administration |
692
+ | `flow-nexus-workflow` | Event-driven workflow automation specialist that creates, executes, and manages complex automated workflows with message queue processing and intelligent agent coordination |
693
+
694
+ #### Ruflo Agents — Testing & Validation
695
+
696
+ | Agent | Description |
697
+ |---|---|
698
+ | `tdd-london-swarm` | TDD London School specialist for mock-driven development within swarm coordination |
699
+ | `production-validator` | Production validation specialist ensuring applications are fully implemented and deployment-ready |
700
+ | `agentic-payments` | Multi-agent payment authorization specialist for autonomous AI commerce with cryptographic verification and Byzantine consensus |
701
+
702
+ ---
703
+
704
+ ### Skills
705
+
706
+ #### Claude Code Built-in Skills
707
+
708
+ | Skill | Invoke | Description |
709
+ |---|---|---|
710
+ | `keybindings-help` | `/keybindings-help` | Customize keyboard shortcuts and chord bindings in `~/.claude/keybindings.json` |
711
+ | `simplify` | `/simplify` | Review recently changed code for quality and efficiency, then fix issues found |
712
+ | `loop` | `/loop` | Run a prompt or slash command on a recurring interval (e.g. `/loop 5m /foo`) |
713
+ | `claude-api` | `/claude-api` | Build applications with the Claude API or Anthropic SDK |
714
+
715
+ #### Ruflo Skills — AgentDB & Vector Search
716
+
717
+ | Skill | Invoke | Description |
718
+ |---|---|---|
719
+ | `agentdb-advanced` | `/agentdb-advanced` | Master advanced AgentDB features including QUIC synchronization, multi-database management, custom distance metrics, hybrid search, and distributed systems integration |
720
+ | `agentdb-learning` | `/agentdb-learning` | Create and train AI learning plugins with AgentDB's 9 reinforcement learning algorithms |
721
+ | `agentdb-memory-patterns` | `/agentdb-memory-patterns` | Implement persistent memory patterns for AI agents using AgentDB including session memory, long-term storage, pattern learning, and context management |
722
+ | `agentdb-optimization` | `/agentdb-optimization` | Optimize AgentDB performance with quantization, HNSW indexing, caching, and batch operations |
723
+ | `agentdb-vector-search` | `/agentdb-vector-search` | Implement semantic vector search with AgentDB for intelligent document retrieval, similarity matching, and context-aware querying |
724
+
725
+ #### Ruflo Skills — ReasoningBank & Learning
726
+
727
+ | Skill | Invoke | Description |
728
+ |---|---|---|
729
+ | `reasoningbank-agentdb` | `/reasoningbank-agentdb` | Implement ReasoningBank adaptive learning with AgentDB's 150x faster vector database including trajectory tracking, verdict judgment, memory distillation, and pattern recognition |
730
+ | `reasoningbank-intelligence` | `/reasoningbank-intelligence` | Implement adaptive learning with ReasoningBank for pattern recognition, strategy optimization, and continuous improvement |
731
+
732
+ #### Ruflo Skills — Swarm Orchestration
733
+
734
+ | Skill | Invoke | Description |
735
+ |---|---|---|
736
+ | `swarm-orchestration` | `/swarm-orchestration` | Orchestrate multi-agent swarms with agentic-flow for parallel task execution, dynamic topology, and intelligent coordination |
737
+ | `swarm-advanced` | `/swarm-advanced` | Advanced swarm orchestration patterns for research, development, testing, and complex distributed workflows |
738
+ | `sparc-methodology` | `/sparc-methodology` | SPARC comprehensive development methodology with multi-agent orchestration covering all five phases |
739
+ | `stream-chain` | `/stream-chain` | Stream-JSON chaining for multi-agent pipelines, data transformation, and sequential workflows |
740
+ | `verification-quality` | `/verification-quality` | Comprehensive truth scoring, code quality verification, and automatic rollback system with 0.95 accuracy threshold |
741
+
742
+ #### Ruflo Skills — GitHub Workflows
743
+
744
+ | Skill | Invoke | Description |
745
+ |---|---|---|
746
+ | `github-code-review` | `/github-code-review` | Comprehensive GitHub code review with AI-powered swarm coordination |
747
+ | `github-multi-repo` | `/github-multi-repo` | Multi-repository coordination, synchronization, and architecture management with AI swarm orchestration |
748
+ | `github-project-management` | `/github-project-management` | Comprehensive GitHub project management with swarm-coordinated issue tracking, project board automation, and sprint planning |
749
+ | `github-release-management` | `/github-release-management` | Comprehensive GitHub release orchestration with AI swarm coordination for automated versioning, testing, deployment, and rollback management |
750
+ | `github-workflow-automation` | `/github-workflow-automation` | Advanced GitHub Actions workflow automation with AI swarm coordination, intelligent CI/CD pipelines, and comprehensive repository management |
751
+
752
+ #### Ruflo Skills — Development Tools
753
+
754
+ | Skill | Invoke | Description |
755
+ |---|---|---|
756
+ | `browser` | `/browser` | Web browser automation with AI-optimized snapshots for claude-flow agents |
757
+ | `hooks-automation` | `/hooks-automation` | Automated coordination, formatting, and learning from Claude Code operations using intelligent hooks with MCP integration |
758
+ | `pair-programming` | `/pair-programming` | AI-assisted pair programming with multiple modes, real-time verification, quality monitoring, and comprehensive testing |
759
+ | `skill-builder` | `/skill-builder` | Create new Claude Code Skills with proper YAML frontmatter, progressive disclosure structure, and complete directory organization |
760
+
761
+ #### Ruflo Skills — Flow Nexus (cloud)
762
+
763
+ | Skill | Invoke | Description |
764
+ |---|---|---|
765
+ | `flow-nexus-neural` | `/flow-nexus-neural` | Train and deploy neural networks in distributed E2B sandboxes with Flow Nexus |
766
+ | `flow-nexus-platform` | `/flow-nexus-platform` | Comprehensive Flow Nexus platform management covering authentication, sandboxes, app deployment, payments, and challenges |
767
+ | `flow-nexus-swarm` | `/flow-nexus-swarm` | Cloud-based AI swarm deployment and event-driven workflow automation with Flow Nexus platform |
768
+
769
+ #### Ruflo Skills — V3 Implementation
770
+
771
+ | Skill | Invoke | Description |
772
+ |---|---|---|
773
+ | `v3-cli-modernization` | `/v3-cli-modernization` | CLI modernization and hooks system enhancement for claude-flow v3 with interactive prompts, command decomposition, and intelligent workflow automation |
774
+ | `v3-core-implementation` | `/v3-core-implementation` | Core module implementation for claude-flow v3 implementing DDD domains, clean architecture patterns, dependency injection, and modular TypeScript codebase |
775
+ | `v3-ddd-architecture` | `/v3-ddd-architecture` | Domain-Driven Design architecture for claude-flow v3 implementing modular, bounded context architecture with clean separation of concerns and microkernel pattern |
776
+ | `v3-integration-deep` | `/v3-integration-deep` | Deep agentic-flow@alpha integration implementing ADR-001, eliminating 10,000+ duplicate lines by building claude-flow as a specialized extension |
777
+ | `v3-mcp-optimization` | `/v3-mcp-optimization` | MCP server optimization and transport layer enhancement for claude-flow v3 with connection pooling, load balancing, and sub-100ms response times |
778
+ | `v3-memory-unification` | `/v3-memory-unification` | Unify 6+ memory systems into AgentDB with HNSW indexing for 150x-12,500x search improvements implementing ADR-006 and ADR-009 |
779
+ | `v3-performance-optimization` | `/v3-performance-optimization` | Achieve aggressive v3 performance targets including 2.49x-7.47x Flash Attention speedup, 150x-12,500x search improvements, and 50-75% memory reduction |
780
+ | `v3-security-overhaul` | `/v3-security-overhaul` | Complete security architecture overhaul for claude-flow v3 addressing critical CVEs and implementing secure-by-default patterns |
781
+ | `v3-swarm-coordination` | `/v3-swarm-coordination` | 15-agent hierarchical mesh coordination for v3 implementation orchestrating parallel execution across security, core, and integration domains |
782
+
783
+ #### Ruflo Skills — Slash Commands (from `.claude/commands/`)
784
+
785
+ These are invoked directly as slash commands in Claude Code. All installed by `ruflo init --full`.
786
+
787
+ | Skill | Category | Description |
788
+ |---|---|---|
789
+ | `/claude-flow-help` | Claude Flow | Show Claude Flow commands and usage reference |
790
+ | `/claude-flow-memory` | Claude Flow | Interact with the Claude Flow persistent memory system |
791
+ | `/claude-flow-swarm` | Claude Flow | Coordinate multi-agent swarms for complex parallel tasks |
792
+ | `/ruflo-setup` | Setup | Bootstrap or reconfigure Ruflo + Claude Flow in the current project |
793
+ | `/analysis:bottleneck-detect` | Analysis | Detect performance bottlenecks in code or workflows |
794
+ | `/analysis:performance-bottlenecks` | Analysis | Analyze and report performance bottleneck patterns |
795
+ | `/analysis:performance-report` | Analysis | Generate a formatted performance analysis report |
796
+ | `/analysis:token-efficiency` | Analysis | Optimize Claude API token usage in prompts and responses |
797
+ | `/analysis:token-usage` | Analysis | Report current token consumption and usage patterns |
798
+ | `/automation:auto-agent` | Automation | Automatically select and spawn the best agent for a task |
799
+ | `/automation:self-healing` | Automation | Create self-healing workflows that recover from failures |
800
+ | `/automation:session-memory` | Automation | Persist and restore cross-session agent memory |
801
+ | `/automation:smart-agents` | Automation | Smart agent auto-spawning based on task classification |
802
+ | `/automation:smart-spawn` | Automation | Intelligently spawn agents with task-appropriate configuration |
803
+ | `/automation:workflow-select` | Automation | Select the optimal workflow template for the current task |
804
+ | `/github:code-review` | GitHub | Perform AI-assisted code review on changed files |
805
+ | `/github:code-review-swarm` | GitHub | Deploy a swarm of agents for comprehensive automated code review |
806
+ | `/github:github-modes` | GitHub | Switch between GitHub workflow modes (PR, issue, release, etc.) |
807
+ | `/github:github-swarm` | GitHub | Orchestrate GitHub operations using a coordinated agent swarm |
808
+ | `/github:issue-tracker` | GitHub | Track and manage GitHub issues with AI coordination |
809
+ | `/github:issue-triage` | GitHub | Automatically triage and prioritize incoming GitHub issues |
810
+ | `/github:multi-repo-swarm` | GitHub | Coordinate changes across multiple repositories simultaneously |
811
+ | `/github:pr-enhance` | GitHub | Enhance an existing pull request with AI-generated improvements |
812
+ | `/github:pr-manager` | GitHub | Full pull request lifecycle management and review coordination |
813
+ | `/github:project-board-sync` | GitHub | Sync project state with GitHub Projects boards |
814
+ | `/github:release-manager` | GitHub | Orchestrate versioned software releases end-to-end |
815
+ | `/github:release-swarm` | GitHub | Automated release pipeline using coordinated agent swarms |
816
+ | `/github:repo-analyze` | GitHub | Deep analysis of a repository's structure, quality, and health |
817
+ | `/github:repo-architect` | GitHub | Design and optimize repository structure and organization |
818
+ | `/github:swarm-issue` | GitHub | Convert GitHub issues into coordinated multi-agent tasks |
819
+ | `/github:swarm-pr` | GitHub | Manage pull request lifecycle with swarm agent coordination |
820
+ | `/github:sync-coordinator` | GitHub | Synchronize versions and dependencies across repositories |
821
+ | `/github:workflow-automation` | GitHub | Create and optimize GitHub Actions CI/CD pipelines |
822
+ | `/hooks:overview` | Hooks | Overview of the Claude Code hooks system and available hooks |
823
+ | `/hooks:pre-edit` | Hooks | Configure pre-edit hook for context injection before file edits |
824
+ | `/hooks:post-edit` | Hooks | Configure post-edit hook to record and learn from edit outcomes |
825
+ | `/hooks:pre-task` | Hooks | Configure pre-task hook for agent suggestions and risk checks |
826
+ | `/hooks:post-task` | Hooks | Configure post-task hook for learning and pattern storage |
827
+ | `/hooks:session-end` | Hooks | Configure session-end hook for state persistence |
828
+ | `/hooks:setup` | Hooks | Set up and configure the full ruv-swarm hooks system |
829
+ | `/monitoring:agent-metrics` | Monitoring | Display real-time metrics for all active agents |
830
+ | `/monitoring:agents` | Monitoring | List all active agents and their current status |
831
+ | `/monitoring:real-time-view` | Monitoring | Live dashboard view of swarm activity and performance |
832
+ | `/monitoring:status` | Monitoring | Check overall coordination and swarm health status |
833
+ | `/monitoring:swarm-monitor` | Monitoring | Continuous monitoring and alerting for swarm operations |
834
+ | `/optimization:auto-topology` | Optimization | Automatically select the optimal swarm topology for the task |
835
+ | `/optimization:cache-manage` | Optimization | Manage and optimize the pattern and response cache |
836
+ | `/optimization:parallel-execute` | Optimization | Execute independent tasks in parallel across multiple agents |
837
+ | `/optimization:parallel-execution` | Optimization | Configure and run parallel task execution workflows |
838
+ | `/optimization:topology-optimize` | Optimization | Optimize swarm topology based on current workload profile |
839
+ | `/sparc:sparc` | SPARC | SPARC orchestrator — break down large objectives into delegated phases |
840
+ | `/sparc:spec-pseudocode` | SPARC | Write full specification and pseudocode for a feature or system |
841
+ | `/sparc:architect` | SPARC | Design system architecture with component breakdown and ADRs |
842
+ | `/sparc:code` | SPARC | Generate clean, modular code from pseudocode and architecture |
843
+ | `/sparc:tdd` | SPARC | Test-Driven Development mode with red-green-refactor cycle |
844
+ | `/sparc:debug` | SPARC | Diagnose and fix runtime bugs, logic errors, and failures |
845
+ | `/sparc:security-review` | SPARC | Static and dynamic security audit with vulnerability reporting |
846
+ | `/sparc:docs-writer` | SPARC | Write concise Markdown documentation for APIs and systems |
847
+ | `/sparc:devops` | SPARC | Automate infrastructure deployment and CI/CD management |
848
+ | `/sparc:integration` | SPARC | Merge multi-phase outputs into a working production system |
849
+ | `/sparc:mcp` | SPARC | Integrate external MCP tools and services into a workflow |
850
+ | `/sparc:optimizer` | SPARC | Refactor and modularize code for performance and maintainability |
851
+ | `/sparc:ask` | SPARC | Task formulation guide for delegating to the right agent |
852
+ | `/sparc:tutorial` | SPARC | Interactive SPARC onboarding and guided walkthrough |
853
+
854
+ ---
855
+
856
+ ## How Agents and Skills Are Invoked
857
+
858
+ Agents and skills are fundamentally different mechanisms. One spawns a subprocess; the other expands a prompt.
859
+
860
+ ---
861
+
862
+ ### Agents
863
+
864
+ An agent is an **autonomous subprocess** — it gets its own context window, its own tool permissions, and runs independently from the conversation that spawned it.
865
+
866
+ #### Three ways agents are invoked
867
+
868
+ **1. Claude decides automatically**
869
+
870
+ When Claude encounters a task that matches an agent's `description:` field (from its `.claude/agents/` YAML frontmatter), it may spawn one without being asked. The description is the routing signal.
871
+
872
+ **2. You request one explicitly**
873
+
874
+ ```
875
+ use the security-architect agent to audit src/auth/
876
+ spawn a tester agent for the payment module
877
+ ```
878
+
879
+ Claude calls the `Agent` tool internally with the matching `subagent_type`.
880
+
881
+ **3. Ruflo swarm spawning (CLI or Task tool)**
882
+
883
+ ```bash
884
+ ruflo agent spawn -t coder --name my-coder
885
+ ```
886
+
887
+ In a swarm, agents are spawned in parallel via Claude Code's `Agent` tool, each receiving a full prompt with their instructions and tool list. They run concurrently and report results back to the orchestrator.
888
+
889
+ #### Agent lifecycle
890
+
891
+ ```
892
+ Spawned → Runs its prompt autonomously → Returns one result message → Terminated
893
+ ```
894
+
895
+ ---
896
+
897
+ ### Skills
898
+
899
+ A skill is **a prompt template** — it gets loaded into the *current* conversation as detailed instructions. No subprocess is created. Claude reads the skill content and acts on it within the same context window.
900
+
901
+ #### Two ways skills are invoked
902
+
903
+ **1. Slash command — typed by you**
904
+
905
+ ```
906
+ /commit
907
+ /ruflo-setup
908
+ /sparc:tdd
909
+ /github:code-review
910
+ ```
911
+
912
+ Claude Code resolves the slash command to the skill's Markdown file and injects its content as the task instructions for that turn.
913
+
914
+ **2. Claude triggers one automatically**
915
+
916
+ When a skill defines trigger conditions in its frontmatter (`TRIGGER when:`), Claude calls the `Skill` tool itself before responding. For example, the `claude-api` skill triggers automatically when it detects `import anthropic` in code you share.
917
+
918
+ ---
919
+
920
+ ### Side-by-Side Comparison
921
+
922
+ | | Agent | Skill |
923
+ |---|---|---|
924
+ | **What it is** | Subprocess with its own context window | Prompt template injected into the current context |
925
+ | **Invoked by** | `Agent` tool internally, or `ruflo agent spawn` CLI | Slash command `/name`, or `Skill` tool triggered automatically |
926
+ | **Runs where** | Separate context window, isolated | Same conversation, same context window |
927
+ | **Parallelism** | Yes — multiple agents run concurrently | No — one skill per turn |
928
+ | **Tool access** | Controlled by agent YAML `tools:` list | Same tools as the current conversation |
929
+ | **Defined in** | `.claude/agents/**/*.md` or `.yaml` | `.claude/skills/**/SKILL.md` or `.claude/commands/*.md` |
930
+ | **Returns** | One result message back to the spawner | Continues the conversation with expanded instructions |
931
+ | **Best for** | Long-running, isolated, parallel work | Workflow shortcuts and reusable multi-step procedures |
932
+ | **Source: Claude** | `general-purpose`, `Explore`, `Plan`, `statusline-setup`, `claude-code-guide` | `keybindings-help`, `simplify`, `loop`, `claude-api` |
933
+ | **Source: Ruflo** | All 80+ agents in `.claude/agents/` | All 33 skills + 65 slash commands in `.claude/skills/` and `.claude/commands/` |
934
+
935
+ ---
936
+
937
+ ### Mental Model
938
+
939
+ > **Skill** = "here are my detailed instructions for this task" — Claude reads it and does the work itself in the current conversation.
940
+ >
941
+ > **Agent** = "go do this task independently and come back with the answer" — Claude delegates to a subprocess and waits for the result.
942
+
943
+ A skill can instruct Claude to spawn agents. For example, `/swarm-orchestration` is a skill whose content tells Claude to initialize a swarm and spawn multiple parallel agents. **The skill is the recipe; the agents do the cooking.**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mfjjs/ruflo-setup",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Cross-platform setup CLI for Ruflo + Claude Flow projects",
5
5
  "type": "module",
6
6
  "bin": {
@@ -11,6 +11,7 @@
11
11
  "src",
12
12
  "templates",
13
13
  "CHANGELOG.md",
14
+ "docs/ruflo-benefits.md",
14
15
  "claude-hooks"
15
16
  ],
16
17
  "engines": {