Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 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

Checkpoint: File edits

rUv75db3ccf9a74
diff --git a/v3/implementation/adrs/ADR-051-infinite-context-compaction-bridge.md b/v3/implementation/adrs/ADR-051-infinite-context-compaction-bridge.md
index 6c108cf195..58fca4a0ff 100644
--- a/v3/implementation/adrs/ADR-051-infinite-context-compaction-bridge.md
+++ b/v3/implementation/adrs/ADR-051-infinite-context-compaction-bridge.md
@@ -555,18 +555,25 @@ Standard retention policy as safety net:
- **Default retention**: 30 days (configurable via `CLAUDE_FLOW_RETENTION_DAYS`)
- **Never prunes accessed entries**: If it was ever restored, it's kept
-### Stage 4: Embedding Generation
+### Stage 4: ONNX Embedding Generation (384-dim)
-Entries without vector embeddings get 768-dim hash embeddings generated:
+Entries without vector embeddings get 384-dim ONNX embeddings generated using
+`@xenova/transformers` with the `all-MiniLM-L6-v2` model:
```
-Per cycle: up to 20 entries embedded (backfills incrementally)
-Storage: Float32Array β†’ Buffer β†’ BLOB column in SQLite
-Purpose: Enables cross-session semantic search
+Model: Xenova/all-MiniLM-L6-v2 (ONNX, local inference, no API calls)
+Dimension: 384 (down from 768 hash β€” better quality, less storage)
+Pooling: mean pooling + L2 normalization
+Fallback: 384-dim hash embedding if ONNX unavailable
+Per cycle: up to 20 entries embedded (backfills incrementally)
+Storage: Float32Array β†’ Buffer β†’ BLOB column in SQLite (~1.5KB/entry)
```
-Once all entries are embedded, this stage becomes a no-op for existing entries
-and only processes newly archived turns.
+ONNX embeddings provide real semantic understanding vs hash embeddings which
+are purely deterministic approximations. Search for "auth optimization" will
+find entries about "authentication performance" β€” hash embeddings cannot do this.
+
+Once all entries are embedded, this stage only processes newly archived turns.
### Stage 5: RuVector Sync