Back to Ruflo

Vector

plugins/ruflo-ruvector/commands/vector.md

3.6.309.6 KB
Original Source

$ARGUMENTS Vector operations via the ruvector npm package (pinned to 0.2.25). Parse subcommand from $ARGUMENTS.

Pinned version: [email protected] — every command below uses npx -y [email protected] ....

Usage: /vector <subcommand> [options]

Embedding

  1. embed <text>npx -y [email protected] embed text "TEXT" 384-dim ONNX vector. If ONNX WASM files not bundled, run /vector setup.
  2. embed-adaptive <text>npx -y [email protected] embed text "TEXT" --adaptive --domain code LoRA-adapted embedding tuned to a domain.
  3. embed-file <path> — Read file, then npx -y [email protected] embed text "$(cat <path>)" -o <path>.vec.json
  4. embed-benchmarknpx -y [email protected] embed benchmark (compares base vs adaptive).

Database lifecycle

  1. db create <path>npx -y [email protected] create <path> -d 384 -m cosine
  2. db stats <path>npx -y [email protected] stats <path>
  3. insert <database> <json-file>npx -y [email protected] insert <database> <json-file>
  4. search <database> <vector-json> [-k N]npx -y [email protected] search <database> -v '[0.1,...]' -k N
  5. export <database> [-o file] [-f json|binary|parquet] [--compress]npx -y [email protected] export <database> -o backup.json
  6. import <file> [-d database]npx -y [email protected] import <file> -d <database> [--merge|--replace]

RVF (cognitive containers)

  1. rvf create <path>npx -y [email protected] rvf create <path>
  2. rvf ingest <path>npx -y [email protected] rvf ingest <path>
  3. rvf query <path>npx -y [email protected] rvf query <path> (nearest neighbors)
  4. rvf status <path>npx -y [email protected] rvf status <path>
  5. rvf segments <path>npx -y [email protected] rvf segments <path>
  6. rvf derive <parent> <child>npx -y [email protected] rvf derive <parent> <child> (lineage tracking)
  7. rvf compact <path>npx -y [email protected] rvf compact <path> (reclaim deleted space)
  8. rvf examplesnpx -y [email protected] rvf examples (45 reference stores)
  9. rvf download <name>npx -y [email protected] rvf download <name> (e.g. agent_memory, swarm_knowledge)

GNN (Graph Neural Networks)

  1. gnn infonpx -y [email protected] gnn info
  2. gnn layernpx -y [email protected] gnn layer (build/test a multi-head attention GNN layer)
  3. gnn searchnpx -y [email protected] gnn search (differentiable soft-attention search)
  4. gnn compressnpx -y [email protected] gnn compress (5-level adaptive tensor compression)

Attention mechanisms

  1. attention listnpx -y [email protected] attention list Lists ALL available mechanisms: DotProduct, MultiHead, Flash, Hyperbolic, Linear, MoE, GraphRoPe, EdgeFeatured, DualSpace, LocalGlobal.
  2. attention computenpx -y [email protected] attention compute
  3. attention benchmarknpx -y [email protected] attention benchmark
  4. attention hyperbolicnpx -y [email protected] attention hyperbolic (Poincare-ball geometry ops; the real hyperbolic surface in 0.2.25)
  5. attention infonpx -y [email protected] attention info

Code intelligence (hooks)

  1. hooks initnpx -y [email protected] hooks init --pretrain --build-agents quality
  2. hooks statsnpx -y [email protected] hooks stats (Q-learning patterns, vector memories, trajectories)
  3. hooks route <task>npx -y [email protected] hooks route "DESCRIPTION" (positional)
  4. hooks route-enhanced <task>npx -y [email protected] hooks route-enhanced "DESCRIPTION"
  5. hooks suggest-contextnpx -y [email protected] hooks suggest-context
  6. hooks ast-analyze <file>npx -y [email protected] hooks ast-analyze <file> (positional)
  7. hooks ast-complexity <files...>npx -y [email protected] hooks ast-complexity <files...>
  8. hooks diff-analyze [commit]npx -y [email protected] hooks diff-analyze HEAD
  9. hooks diff-classify [commit]npx -y [email protected] hooks diff-classify HEAD
  10. hooks diff-similarnpx -y [email protected] hooks diff-similar
  11. hooks coverage-route <file>npx -y [email protected] hooks coverage-route <file>
  12. hooks coverage-suggest <files...>npx -y [email protected] hooks coverage-suggest <files...>
  13. hooks graph-cluster <files...>npx -y [email protected] hooks graph-cluster <files...> (spectral/Louvain)
  14. hooks rag-context <query>npx -y [email protected] hooks rag-context "QUERY"
  15. hooks security-scan <files...>npx -y [email protected] hooks security-scan <files...> (run hooks init first)
  16. hooks remember <content>npx -y [email protected] hooks remember "CONTENT"
  17. hooks recall <query>npx -y [email protected] hooks recall "QUERY"
  18. hooks coedit-record / coedit-suggest — record + retrieve files edited together.
  19. hooks error-record / error-suggest — learn error→fix pairs and retrieve.
  20. hooks trajectory-begin / trajectory-step / trajectory-end — record an execution trajectory.
  21. hooks pre-edit / post-edit / pre-command / post-command / session-start / session-end — Claude Code hook lifecycle.

Known bugs in 0.2.25 hooks: force-learn raises intel.tick is not a function; graph-mincut raises Cannot read properties of undefined; git-churn fails outside a git repo. Avoid these or run inside a git repo with seeded intelligence state.

Native + workers (background analysis)

  1. native listnpx -y [email protected] native list (worker types: security, analysis, learning)
  2. native run <type>npx -y [email protected] native run security (or analysis|learning)
  3. native benchmarknpx -y [email protected] native benchmark
  4. native comparenpx -y [email protected] native compare
  5. workers triggers / presets / phases / dispatch / status / stats / cleanup / cancel / run / create / init-config — all available via npx -y [email protected] workers <subcmd>. First invocation auto-installs agentic-flow (slow).

Collective knowledge (brain) — needs @ruvector/pi-brain

  1. brain statusnpx -y [email protected] brain status
  2. brain search <query>npx -y [email protected] brain search "QUERY"
  3. brain share <title>npx -y [email protected] brain share "TITLE"
  4. brain list / get / vote / delete / drift / partition / transfer / sync / page — full Brainpedia + LoRA-weight management.

SONA (Self-Optimizing Neural Architecture) — needs @ruvector/ruvllm

  1. sona status / info / statsnpx -y [email protected] sona status
  2. sona patterns <query>npx -y [email protected] sona patterns "QUERY"
  3. sona train <data>npx -y [email protected] sona train <data> (record a training trajectory)
  4. sona exportnpx -y [email protected] sona export (export learned weights)

LLM orchestration — needs @ruvector/ruvllm

  1. llm modelsnpx -y [email protected] llm models
  2. llm embed <text>npx -y [email protected] llm embed "TEXT" (RuvLLM-backed embeddings)
  3. llm benchmarknpx -y [email protected] llm benchmark
  4. llm infonpx -y [email protected] llm info

Identity (pi key for brain/edge/MCP)

  1. identity generatenpx -y [email protected] identity generate (creates a 64-hex-char pi key)
  2. identity shownpx -y [email protected] identity show
  3. identity export -o filenpx -y [email protected] identity export -o key.enc (encrypted backup)
  4. identity import <file>npx -y [email protected] identity import <file>

Edge compute network

  1. edge statusnpx -y [email protected] edge status
  2. edge balance [nodeId]npx -y [email protected] edge balance (rUv balance)
  3. edge tasksnpx -y [email protected] edge tasks
  4. edge joinnpx -y [email protected] edge join (join the network as a node)
  5. edge dashboardnpx -y [email protected] edge dashboard (opens in browser)

Server / Decompile / Demo

  1. server [-p 8080] [-g 50051] [-d data-dir]npx -y [email protected] server -p 8080
  2. decompile <target> [-o dir] [-f modules|single|json]npx -y [email protected] decompile <npm-pkg-or-file-or-url>
  3. demo --basic | --gnn | --graphnpx -y [email protected] demo --basic (interactive tutorial)

System

  1. doctornpx -y [email protected] doctor (Node, npm, bindings, Rust)
  2. infonpx -y [email protected] info
  3. benchmarknpx -y [email protected] benchmark (known issue: fails with Missing field 'dimensions' on some installs; use gnn search or attention benchmark as alternatives)
  4. install [pkg|--all]npx -y [email protected] install --all (lists/installs optional add-ons)
  5. setupnpx -y [email protected] setup (Setup Guide)

Setup helper

For first-run users hitting ONNX WASM files not bundled, Brain commands require @ruvector/pi-brain, or SONA not available, invoke the vector-setup skill: /vector-setup.

MCP server (103 tools)

  • Register once: claude mcp add ruvector -- npx -y [email protected] mcp start
  • Verify: claude mcp list | grep ruvector
  • Then call MCP tools directly (e.g. hooks_route, hooks_ast_analyze, hooks_rag_context, brain_search, attention_list).

Not in 0.2.25 (do not invoke)

compare, top-level index, midstream, embed --file, embed --batch --glob, cluster --namespace --k (top-level cluster is "Coming Soon"), embed --model poincare, optimize (per its own message: "not yet shipped in this release"), brain agi * (use brain status directly).