Back to Ruflo

ADR-067: RuVector WASM Utilization Improvement Plan

v3/implementation/adrs/ADR-067-ruvector-wasm-utilization.md

3.6.301.8 KB
Original Source

------|--------------|-------------|--------------|-------------------| | @ruvector/router | Imported, never called | 0% | Integrated into hooks route or removed | 100% or removed | | @ruvector/learning-wasm | Always falls back to JS | 0% (WASM) | WASM-first with JS fallback + warning | 80%+ (WASM) | | @ruvector/attention | Benchmark-only | ~5% | Production memory-search + benchmark | 60%+ | | @ruvector/sona | Engine created, rarely invoked | ~10% | Active in hooks pretrain, neural train | 70%+ | | @ruvector/rvagent-wasm | MCP-only | 40% | MCP + CLI (agent wasm-*) | 90%+ | | @ruvector/ruvllm-wasm | MCP-only | 40% | MCP + CLI (neural wasm-infer) | 90%+ |

Consequences

Positive

  • Actually achieve declared performance targets (Flash Attention, SONA adaptation times)
  • Remove dead code that inflates package size and confuses contributors
  • Expose hidden capabilities to CLI users who do not use MCP
  • Real test coverage prevents regressions in WASM integration
  • CI benchmarks make performance claims auditable

Negative

  • Increases the effective dependency surface from optional to semi-required
  • WASM binaries add to package size (~2-5 MB per package)
  • More complex initialization logic with WASM-first loading

Risks

  • WASM packages may not load on all platforms (Alpine, older Node, constrained CI). JS fallback must remain available.
  • WASM binary updates may lag behind JS implementation changes, requiring coordinated releases.
  • CI benchmark results may vary across runner hardware, requiring tolerance bands.
  • ADR-066: v3.5.24 Audit Remediation (prior audit cycle)
  • v3/@claude-flow/cli/package.json -- optionalDependencies declarations
  • v3/@claude-flow/cli/src/hooks/ -- hooks route command
  • v3/@claude-flow/cli/src/mcp/tools/ -- MCP tool definitions for rvagent and ruvllm