v3.9.0
ruvnet/ruflov3.9.0May 25, 2026by ruvnet
AI Summary
This release (v3.9.0) implements ADR-130 — a Unified Knowledge Graph Backend across all 4 existing graph layers, introducing a shared graph_edges SQL table with PQ-encoded embeddings, two new MCP tools for graph querying and pathfinding, SONA trajectory hooks for automatic edge creation, and a plugin adapter contract. All 6 benchmark targets were met with excellent performance metrics.
Key Highlights
- New graph_edges table with temporal columns (confidence, decay_rate, last_reinforced, witness_id, embedding_ref) and Int8 global-scalar PQ encoding
- Two new MCP tools: agentdb_graph-query (k-hop traversal, PPR, semantic cosine ranking) and agentdb_graph-pathfinder (6 algorithm variants)
- SONA trajectory hooks for automatic edge writing without blocking tool response (<200ms latency)
- Plugin adapter contract with GraphEdgesSource class and createAutoGraphAdapter() for zero-boilerplate registration
- All 6 benchmark targets met: 2345 ops/sec write, 578 bytes/edge, k-hop depth=1 p99=4.9ms
New Features
- graph_edges table with temporal columns and PQ-encoded embeddings (400 bytes/384-dim)
- inlineCosine() for zero-decode similarity on PQ embeddings
- agentdb_graph-query MCP tool with k-hop traversal via recursive CTE, Personalized PageRank, and complexityBudget enforcement
- hooks_intelligence_trajectory-step for writing trajectory-caused edges
- hooks_post-task for writing reinforced-by edges on task success
- GraphEdgesSource class and createAutoGraphAdapter() for plugin integration
- agentdb_graph-pathfinder with 6 algorithm variants (personalized-pagerank, dynamic-mincut, spectral-sparsify, temporal-centrality, connected-component-churn, witness-chain-divergence)
- benchmark-graph.mjs with all 6 targets met
- 5 new CI jobs in v3-ci.yml gating all phases
Full Release Notes
## ADR-130 — Unified Knowledge Graph Backend (All 6 Phases) Gives all 4 existing graph layers (`graph-node`, `AgentDB`, `ruflo-knowledge-graph`, `ruflo-graph-intelligence`) a shared `graph_edges` sql.js table with PQ-encoded embeddings, two new MCP tools, SONA trajectory hooks, and a plugin adapter contract. ### New features **Phase 1 — graph_edges schema + PQ encoder** - `graph_edges` table with temporal columns: `confidence`, `decay_rate`, `last_reinforced`, `witness_id`, `embedding_ref` - `embedding-quantization.ts`: Int8 global-scalar PQ (400 bytes/384-dim); `inlineCosine()` for zero-decode similarity - `graph-edge-writer.ts`: thin sql.js accessor with fire-and-forget writes **Phase 2 — `agentdb_graph-query` MCP tool** - k-hop traversal via recursive CTE (sql-cte backend) - Personalized PageRank (PPR) power iteration - Semantic cosine ranking on inline PQ embeddings - `complexityBudget` enforcement: `maxNodesVisited`, `maxDepth`, `maxMillis` **Phase 3 — SONA trajectory-to-graph hooks** - `hooks_intelligence_trajectory-step`: writes `trajectory-caused` edges fire-and-forget - `hooks_post-task` (success=true): writes `reinforced-by` edges fire-and-forget - Neither write blocks tool response (<200ms latency preserved) **Phase 4 — Plugin adapter contract** - `GraphEdgesSource` class: default `KnowledgeGraphSource` reading from `graph_edges` - `createAutoGraphAdapter()`: zero-boilerplate autoRegister path - `graph_adapter` field in plugin.json schema (documented in ruflo-plugin-creator SKILL.md) **Phase 5 — `agentdb_graph-pathfinder` MCP tool** - 6 algorithm variants: `personalized-pagerank`, `dynamic-mincut`, `spectral-sparsify`, `temporal-centrality`, `connected-component-churn`, `witness-chain-divergence` - Depth > 5 clamped; non-existent seed returns empty paths not error **Phase 6 — Benchmark + CI** - `benchmark-graph.mjs`: 6/6 targets met (2345 ops/sec write, 578 bytes/edge, k-hop depth=1 p99=4.9ms) - 5 new CI jobs in `v3-ci.yml` gating all phases ### Benchmark | Metric | Result | Target | |--------|--------|--------| | Write throughput | 2345 ops/sec | ≥500 ✓ | | SQLite footprint | 578 bytes/edge | ≤1024 ✓ | | k-hop depth=1 p99 | 4.9ms | <10ms ✓ | | k-hop depth=3 p99 | 0.1ms | <50ms ✓ | | PQ encode p99 | 0.063ms | <1ms ✓ | | PQ decode p99 | 0.031ms | <0.5ms ✓ | ### Test baseline 1999 passed | 46 skipped — no regression PR: #2129 | Tracking: #2128