π The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
id: ADR-0001 title: Pin ruflo-ruvector plugin to [email protected] with optional add-on packages status: Accepted date: 2026-05-04 authors: - reviewer (Claude Code) tags: [plugin, ruvector, versioning, mcp, dependencies]
Context
The ruflo-ruvector plugin wraps the ruvector npm package as a Claude Code plugin. The plugin's documentation (README, agent file, skills, command spec) drifted from the actual CLI surface in two ways:
- Aspirational features. Older docs referenced
FlashAttention-3,Graph RAG,Hybrid Search,DiskANN,ColBERT,Matryoshka,MLA,TurboQuant,Brain AGI, andMidstreamas if they were invokable CLI subcommands. The native Rust bindings expose primitives for most of these, but no CLI subcommand wires them up β onlyattention listenumerates the mechanisms. - Unspecified version. The plugin invoked
npx ruvector ...without a version pin, so a user with[email protected]resolved would silently get a different surface (nobrain, noroute, nosona) than a user on[email protected].
Concretely, this caused:
npx ruvector embed "TEXT"βunknown command 'TEXT'(real form isembed text "TEXT")npx ruvector compare A Bβ command does not existnpx ruvector cluster --namespace ... --k Nβclusteris for distributed cluster ops, not k-meansnpx ruvector hooks route --task Xβ unknown option--task(positional)npx ruvector brain agi statusβ noagisubgroupnpx ruvector midstream statusβ command does not existnpx ruvector index create Nβ command does not exist (usecreate <path>)
A live audit against [email protected] confirmed which subcommands work, which require optional add-on packages, and which are upstream bugs.
Decision
The plugin pins to [email protected] and documents the optional add-on packages required for full functionality.
1. Pin every CLI invocation
All npx calls in the plugin (README, agent, skills, commands, scripts) MUST be of the form:
npx -y [email protected] <subcommand> [args]
Rationale: the -y flag suppresses the npm interactive prompt; the version pin prevents a future ruvector release from breaking the plugin's contract without our knowledge.
2. Treat add-ons as opt-in extensions, not required deps
| Package | Enables | Plugin subcommands gated on it |
|---|---|---|
ruvector-onnx-embeddings-wasm |
ONNX runtime | embed text, embed adaptive, llm embed |
@ruvector/pi-brain |
Collective brain | brain * |
@ruvector/ruvllm |
RuvLLM + SONA JS fallback | sona *, llm * |
@ruvector/graph-node |
Graph database (Cypher) | graph -q ... |
@ruvector/router |
Semantic router | router --route ... |
Rationale: these are heavy dependencies (ONNX runtime alone is large). Forcing them at install time penalizes users who only want hooks routing or RVF storage. Instead we provide a vector-setup skill and document the precise error message β install command mapping.
3. Register MCP server with the same pin
claude mcp add ruvector -- npx -y [email protected] mcp start
Rationale: the MCP transport layer changes between minor versions of ruvector. Pinning the MCP command keeps the 103 exposed tools stable for downstream agents.
4. Removed surface stays removed
The plugin MUST NOT reintroduce the following invocations even if upstream re-adds equivalents under different names without prior coordination:
compare,midstream, top-levelindex(replaced bycreate <path>/stats <path>)embed --file,embed --batch --glob,embed --model poincare(no equivalent flags exist)cluster --namespace --k(replaced byhooks graph-cluster <files>)hooks route --task,hooks ast-analyze --file(use positional arguments)brain agi *(replaced bybrain status,brain search, etc.)
A future ADR may relax this if upstream introduces a stable equivalent and we update the smoke test accordingly.
5. Smoke test as the contract
scripts/smoke.sh verifies the contracted surface against any installed [email protected]. It must remain green on every plugin change. Tests cover:
- Version pin (
--versionreturns0.3.3) - Top-level subcommand visibility (
hooks,embed,rvf,attention,gnn,brain,sona,create,stats,search,insert) hooks routeaccepts a positional task argumenthooks ast-analyzeaccepts a positional file argumenthooks ast-complexity,attention list,rvf examples,gnn info,info,doctorwork- Removed surface (
compare,midstream,index) returnsunknown command
6. Plugin version policy
The plugin's own version field in .claude-plugin/plugin.json is bumped (patch) on every change to the CLI contract β regardless of whether the change is additive (new subcommand exposed) or a fix. This makes plugin version differences observable to downstream consumers.
Consequences
Positive:
- Every documented invocation in the plugin matches a real CLI surface that is verified by a smoke test.
- New users hit a deterministic
vector-setupflow instead of cryptic ONNX/Brain/SONA errors. - Future ruvector releases can be evaluated by running the smoke test against the new version before bumping the pin.
- The "Capabilities" table in README is now a contract, not a wishlist.
Negative:
- Bumping the pin requires a deliberate test pass. New ruvector features land in the plugin only after a manual review.
- Add-on packages (
ruvector-onnx-embeddings-wasm,@ruvector/pi-brain,@ruvector/ruvllm) must be installed manually or via/vector-setup. Users who skip this and tryembed textwill hit the documented error.
Neutral:
- The plugin's "Search Capabilities" feature table now reflects the actual CLI surface. FlashAttention-3 et al. are listed under
attention listrather than as standalone search modes.
Verification
# Plugin contract check
bash plugins/ruflo-ruvector/scripts/smoke.sh
# Expected: "11 passed, 0 failed"
Related
commands/vector.mdβ full subcommand mappingskills/vector-setup/SKILL.mdβ first-run installeragents/vector-engineer.mdβ agent contract with replacement table- Upstream issue 401 (
optimizenot yet shipped)
Addendum (2026-10-14) β pin moved to ruvector 0.3.3 (#4158)
The 0.2.25 pin shipped without dist/core/onnx/pkg, so embed text failed
with ONNX WASM files not bundled and the documented remedy
(ruvector-onnx-embeddings-wasm) did not fix it. 0.3.3 bundles the wasm; in a
throwaway prefix embed text returned a 384-dim vector with no add-on. The pin
is now [email protected] and the ONNX add-on is no longer installed or
documented. Also re-verified on 0.3.3: optimize and hooks force-learn run,
midstream exists, embed text takes --stdin/--input-file, hooks graph-mincut still fails, compare still does not exist, mcp tools lists 97.
@ruvector/pi-brain is still needed for brain; sona falls back to JS. The
filename keeps the original number so links stay valid.