| id | ADR-0001 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| title | Optimize ruflo-intelligence — surface completeness, 4-step pipeline, IPFS pattern transfer, namespace coordination with ruflo-agentdb | |||||||||||
| status | Proposed | |||||||||||
| date | 2026-05-04 | |||||||||||
| authors |
|
|||||||||||
| tags |
|
The plugin (v0.1.0) wraps "intelligence" capabilities loosely. Six files:
.claude-plugin/plugin.json:4—version: "0.1.0", keywordsintelligence, sona, neural, learning, routingREADME.md:5— claims wrapping ofneural_*,hooks_intelligence_*,hooks_model-*MCP families. No tool inventory or count.agents/intelligence-specialist.md:15-19— names four tool prefixes (neural_*,hooks_intelligence_*,hooks_route/hooks_model-route,ruvllm_sona_*)commands/intelligence.md— callshooks_intelligence_stats,neural_status,hooks_model-statsonlycommands/neural.md— dispatchesneural_train/status/patterns/predict/optimizeskills/intelligence-route/SKILL.md:5—allowed-toolsenumerates 8 toolsskills/neural-train/SKILL.md:5—allowed-toolsenumerates 13 tools
Counted directly from source:
| Family | Plugin coverage | Real count | Source |
|---|---|---|---|
neural_* |
5 of 6 | 6 (neural_train, neural_predict, neural_patterns, neural_compress, neural_status, neural_optimize) |
v3/@claude-flow/cli/src/mcp-tools/neural-tools.ts:195, 312, 413, 539, 651, 706 |
hooks_intelligence_* (and dispatcher / reset) |
6 of 10 | 10 (hooks_intelligence, hooks_intelligence-reset, hooks_intelligence_trajectory-start/step/end, hooks_intelligence_pattern-store, hooks_intelligence_pattern-search, hooks_intelligence_stats, hooks_intelligence_learn, hooks_intelligence_attention) |
v3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts:2093, 2226, 2296, 2355, 2404, 2556, 2634, 2741, 2952, 3027 |
Routing & meta hooks (hooks_route, hooks_explain, hooks_pretrain, hooks_build-agents, hooks_metrics, hooks_transfer) |
1 of 6 (only hooks_route) |
6 | hooks-tools.ts:884, 1062, 1420, 1499, 1593, 1664 |
hooks_model-* |
2 of 3 | 3 (hooks_model-route, hooks_model-outcome, hooks_model-stats) |
hooks-tools.ts:3797, 3844, 3879 |
ruvllm_sona_* + ruvllm_microlora_* |
2 of 4 (only sona_create / sona_adapt) | 4 | v3/@claude-flow/cli/src/mcp-tools/ruvllm-tools.ts:142, 169, 192, 222 |
| Total | ~14 of 29 | 29 | — |
The plugin documents roughly half the intelligence-related surface that the CLI actually exposes. Specifically missing or underspecified:
hooks_intelligence_attention— attention-mechanism dispatch (the same primitiveruflo-ruvectorsurfaces viaattention list). Plugin makes no mention.hooks_intelligence_learn— the "learn from outcomes" tool, the heart of the self-learning loop.hooks_intelligence-reset— clears intelligence state. Useful for testing and fresh runs.hooks_metrics— metrics dashboard. Plugin's/intelligencecommand should call it.hooks_explain— routing-decision rationale. Critical for trust ("why did the system pick this agent?").hooks_build-agents— generates optimized agent configs from learned patterns.hooks_transfer— IPFS-based pattern transfer between projects. Genuine differentiator, totally invisible in the plugin.ruvllm_microlora_create/ruvllm_microlora_adapt— MicroLoRA adaptation. Plugin only mentions SONA.neural_compress— neural-pattern compression for storage efficiency.
README.md:20 claims "EWC++ consolidation" as a feature. The plugin nowhere says how to invoke it. The actual EWC++ semantic lives in agentdb_consolidate and ruvllm_microlora_adapt --consolidate (per the ruvector adaptive embedder). The plugin should map the feature claim to the tool that delivers it.
agents/intelligence-specialist.md:9 mentions "SONA and MoE". SONA gets two tool calls; MoE gets none. hooks_intelligence accepts enableMoe and mode, but the plugin never tells you the modes (balanced, sona, moe, hnsw).
CLAUDE.md describes the 4-step intelligence pipeline (RETRIEVE → JUDGE → DISTILL → CONSOLIDATE). The plugin never surfaces this pipeline in user-facing form, even though it's the conceptual frame the whole substrate revolves around.
ruflo-agentdb ADR-0001 (just landed) introduced a namespace convention with three reserved namespaces: pattern (ReasoningBank fallback), claude-memories (Claude Code bridge), default. The intelligence pipeline writes to pattern (via agentdb_pattern-store and the hooks post-task --train-neural path). The plugin should explicitly cite the convention so consumers don't reinvent it.
There's also a pluralization gotcha worth surfacing here: ruvector's neural/pretrain hooks write to patterns (plural), distinct from ReasoningBank's pattern. ruflo-agentdb documents this; ruflo-intelligence should reference the documentation.
ruflo-intelligence is the user-facing surface for the self-learning system that the rest of the plugin family relies on. Documentation drift here means:
- Agents that follow the plugin's instructions miss half the available learning loop.
hooks_transfer's IPFS-based cross-project pattern sharing — a genuine differentiator — is invisible.- The 4-step pipeline is never operationalized; users invoke
neural_trainwithout understanding RETRIEVE/JUDGE/DISTILL/CONSOLIDATE as distinct steps. - Downstream plugins (
ruflo-browserADR-0001 references trajectory recording;ruflo-agentdbreferencespatternnamespace writes) lose their anchor doc.
We just fixed analogous drift in ruflo-ruvector (ADR-0001) and ruflo-agentdb (ADR-0001). Same pattern applies here.
Six changes. Each is plugin-local; no CLI source modifications.
plugin.json moves 0.1.0 → 0.3.0 (matches the ruflo-agentdb cadence and reflects that this is a substantial scope expansion, not a patch). Keywords gain microlora, ewc, attention, moe, pattern-transfer, model-routing, mcp. Description rewrites to explicitly enumerate the three families and the IPFS transfer.
The README becomes the canonical entry point with these new sections:
- Tool inventory (3-family count table: 6 + 10 + 9 + 4 = 29, with source file:line citations).
- The 4-step intelligence pipeline — operationalized as a section that maps each step (RETRIEVE / JUDGE / DISTILL / CONSOLIDATE) to specific tool calls. Aligns with CLAUDE.md but is now verifiable.
- Cross-project pattern transfer —
hooks_transferdocumented end-to-end (IPFS publish, fetch, apply). This is the single most undersold capability of the plugin family. - Hook integration — table mapping
post-task --train-neural,pretrain,pre-taskto which intelligence tools fire. References ruflo-agentdb's reserved namespaces (patternfor ReasoningBank,patternsfor neural-train). - Namespace coordination — explicit deferral to
ruflo-agentdbADR-0001 §"Namespace convention"; reproduces the pluralization gotcha (patternvspatterns). - EWC++ explanation — no longer just a feature claim. Maps to
agentdb_consolidateandruvllm_microlora_adapt --consolidate. - MoE explanation —
hooks_intelligencemodes (balanced/sona/moe/hnsw) enumerated. - Compatibility — pinned to
@claude-flow/cliv3.6 (matches ruflo-agentdb).
agents/intelligence-specialist.md gains a routing matrix that maps user intent to the specific MCP tool: "user wants routing rationale → hooks_explain"; "user wants pattern compression → neural_compress"; etc. Replaces the bullet list of prefixes with a decision table. Drops the free-form memory store --namespace routing-outcomes line (the tools handle this).
/intelligence— callshooks_intelligence_stats+hooks_metrics+hooks_model-stats+neural_status+hooks_explain(when invoked with a--why <task>arg). Becomes a real dashboard, not a 4-step list./neural— addsneural_compressto the dispatch table.
intelligence-route/SKILL.md— addshooks_explainas the post-routing rationale step. Updates the 3-tier routing table to match the actualhooks_model-routeoutput shape.neural-train/SKILL.md— adds MicroLoRA section (ruvllm_microlora_create/_adapt) with EWC++ consolidation. Addsneural_compressfor pattern compaction.- NEW skill
intelligence-transfer—hooks_transferIPFS workflow. Coverstransfer store,transfer load,transfer from-project. This is the single biggest gap in the current plugin.
scripts/smoke.sh (new file). Structural checks against the documented surface — no live MCP calls. The contract:
- plugin.json declares
0.3.0with the new keywords. - README has all 4 new sections (tool inventory, 4-step pipeline, IPFS transfer, hook integration, namespace coordination, EWC++ explanation).
- All 6
neural_*tools referenced somewhere in plugin docs. - All 10
hooks_intelligence_*-family tools referenced. - All 6 routing/meta hooks (
hooks_route,hooks_explain,hooks_pretrain,hooks_build-agents,hooks_metrics,hooks_transfer) referenced. - All 3
hooks_model-*tools referenced. - All 4 SONA + MicroLoRA tools referenced.
- The 4-step pipeline section names all four phases.
intelligence-transferskill exists with allowed-tools enumerated and referenceshooks_transfer.- Pluralization gotcha referenced (
patternvspatterns) — defers to ruflo-agentdb. - No skill grants wildcard tool access.
- ADR file exists with status Proposed.
- Compatibility section pins to
@claude-flow/cliv3.6.
Plus three doc invariants checked by single-line greps:
grep -q "4-step intelligence pipeline" plugins/ruflo-intelligence/README.mdgrep -q "hooks_transfer" plugins/ruflo-intelligence/skills/intelligence-transfer/SKILL.mdgrep -qE "RETRIEVE.+JUDGE.+DISTILL.+CONSOLIDATE" plugins/ruflo-intelligence/README.md
Positive:
- Every documented capability claim maps to a verifiable MCP tool. No more "EWC++ consolidation" as a phantom feature.
- The 4-step intelligence pipeline (CLAUDE.md's V3 framing) is now operationalized in a user-facing form.
- IPFS pattern transfer becomes discoverable — agents in different projects can share what they've learned.
- Namespace coordination with
ruflo-agentdbis explicit; downstream plugins inherit one consistent story. - A smoke contract makes future drift catchable in CI.
Negative:
- Three downstream agents may currently call the legacy
memory store --namespace routing-outcomespattern from the agent file. Updating them is a separate cleanup. - The new
intelligence-transferskill assumeshooks_transferis wired to a working IPFS endpoint (Pinata or similar). If the endpoint is unconfigured, the skill returns a structured error — but agents reading the skill MD may be surprised. We document the prerequisite. - Plugin v0.1.0 → v0.3.0 is a two-minor jump. Justified by scope (5 new sections + new skill + smoke + ADR), but consumers tracking strict semver should be aware.
Neutral:
- No new MCP tools introduced. All capability is surfacing of existing tools.
- The agent file's "Memory Learning" section (currently writing to a free-form
routing-outcomesnamespace) is replaced. Consumers of that namespace should migrate tohooks_model-outcomewhich is the typed equivalent.
bash plugins/ruflo-intelligence/scripts/smoke.sh
# Expected: "16 passed, 0 failed" (13 contract checks + 3 doc invariants)plugins/ruflo-ruvector/docs/adrs/0001-pin-ruvector-0.2.25.md— pinning + smoke-as-contract precedentplugins/ruflo-agentdb/docs/adrs/0001-agentdb-optimization.md— namespace convention + reserved namespaces (pattern/claude-memories/default); pluralization gotcha; hook integration tableplugins/ruflo-browser/docs/adrs/0001-browser-skills-architecture.md— uses ruvector trajectory hooks (a primary learning input for this plugin)v3/@claude-flow/cli/src/mcp-tools/neural-tools.ts— 6 neural tool definitionsv3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts— 19 hooks-family tools (intelligence, route, model, transfer, metrics, explain, pretrain, build-agents)v3/@claude-flow/cli/src/mcp-tools/ruvllm-tools.ts— 4 SONA + MicroLoRA tools- CLAUDE.md (V3 Performance Targets + 4-step pipeline framing)