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

docs: update ADR-073 to reflect v3.5.55 — no simulations remain

Reuven62a869c29a46
diff --git a/v3/implementation/adrs/ADR-073-stub-tool-honesty-real-predictions.md b/v3/implementation/adrs/ADR-073-stub-tool-honesty-real-predictions.md
index 51ec379fe3..7c984e0a78 100644
--- a/v3/implementation/adrs/ADR-073-stub-tool-honesty-real-predictions.md
+++ b/v3/implementation/adrs/ADR-073-stub-tool-honesty-real-predictions.md
@@ -1,7 +1,7 @@
# ADR-073: Stub Tool Honesty & Real Predictions
**Status**: Accepted
-**Date**: 2026-04-06
+**Date**: 2026-04-06 (updated v3.5.55)
**Context**: Issue #1514 (independent audit), Issues #1516, #1518, #1521, #1526
## Decision
@@ -21,12 +21,16 @@ The `TokenOptimizer` class (`@claude-flow/integration`) contained hardcoded savi
Previously returned identical config regardless of input. Now scales:
-| Agent Count | Batch Size | Topology | Cache |
-|-------------|-----------|----------|-------|
-| 1-4 | 2 | hierarchical | 25MB |
-| 5-8 | 4 | hierarchical | 50MB |
-| 9-12 | 6 | hierarchical-mesh | 75MB |
-| 13+ | 6 | mesh | 100MB+ |
+| Agent Count | Batch Size | Topology | Cache (MB) |
+|-------------|-----------|----------|------------|
+| 1-2 | 2 | hierarchical | 25 |
+| 3-4 | 2 | hierarchical | 50 |
+| 5-6 | 4 | hierarchical | 75 |
+| 7-8 | 4 | hierarchical-mesh | 100 |
+| 9-12 | 6 | hierarchical-mesh | 125-150 |
+| 13+ | 6 | mesh | 175-200 |
+
+Formula: `batchSize = agentCount<=4?2 : agentCount<=8?4 : 6`, `cacheSizeMB = min(200, 25*ceil(agentCount/2))`
### 3. Wire `neural_predict` to real embedding similarity
@@ -34,12 +38,12 @@ Previously: hardcoded labels `['coder', 'researcher', 'reviewer', 'tester']` wit
Now:
- If stored patterns exist: generates real embedding for input, computes cosine similarity against all stored pattern embeddings, returns top-K nearest neighbors
-- If no patterns stored: returns defaults with `_simulated: true` flag
-- All results include `_realEmbedding` and `_hasStoredPatterns` transparency flags
+- If no patterns stored: returns empty array `[]` (no fake labels, no simulated data)
+- All results include `_realEmbedding` (bool: ML model loaded) and `_hasStoredPatterns` (bool: patterns available) transparency flags
-### 4. Mark `neural_train` as stub
+### 4. `neural_train` stores real embeddings
-Added clear code comment that training is simulated (no real ML occurs). Accuracy numbers are random. This is honest about current state while the real training pipeline is developed.
+Training now generates real embeddings for each training data entry (via ML model or deterministic hash fallback) and stores them as searchable patterns. Accuracy is `1.0` if patterns were stored, `0` otherwise — not simulated. Cosine similarity search against these stored embeddings produces real nearest-neighbor results.
### 5. Fix bare model names (#1516)
@@ -47,16 +51,19 @@ All embedding model defaults now use `Xenova/` prefix (e.g., `Xenova/all-MiniLM-
### 6. Fix intelligence data bloat (#1518, #1526)
-- Deduplicate store entries by ID before building graph
+- Deduplicate store entries by ID before building graph (v3.5.54: also persist deduped store in consolidate via `preDedupCount` tracking)
+- Applied dedup to both v3 and root intelligence.cjs copies
- Scope `bootstrapFromMemoryFiles()` to current project only (was scanning all 51+ project dirs)
- Fix `tool_input` snake_case mismatch in hook-handler
## Consequences
- Token optimizer reports honest numbers (will show 0 savings when agentic-flow is not installed)
-- `neural_predict` returns meaningful results when patterns are stored
-- Stub tools clearly marked in code and API responses
-- Users can distinguish real vs simulated behavior via `_simulated` and `_realEmbedding` flags
+- `neural_predict` returns real cosine similarity results when patterns stored, empty array when not
+- `neural_train` stores real embeddings, no simulated accuracy
+- Zero instances of `Math.random()` for confidence/accuracy/metrics in shipped code
+- Users can distinguish real ML vs hash-based embedding via `_realEmbedding` flag
+- `hooks explain` matchScore uses real keyword ratio instead of random
## Tools Status (Post-Fix)
@@ -65,8 +72,8 @@ All embedding model defaults now use `Xenova/` prefix (e.g., `Xenova/all-MiniLM-
| Memory/HNSW | Real | Vector search, persistence, embeddings |
| AgentDB | Real | Pattern store, hierarchical recall, HNSW |
| Embeddings | Real | Xenova/transformers, cosine similarity |
-| Neural predict | Real (with patterns) | Embedding-based nearest-neighbor search |
-| Neural train | Stub | Simulated, marked as such |
+| Neural predict | Real (with patterns) | Cosine similarity search; empty array when no patterns |
+| Neural train | Real | Embeds training data, stores as searchable patterns |
| Token optimizer | Honest metrics | No fabricated numbers |
| Agent spawn/task | Coordination stubs | State tracking, no LLM execution |
| WASM agents | Stub | Echo-based, no WASM runtime |