You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(memory): benchmarking harness, cost-sensitive store routing, goal-conditioned write gate (#2485)
Closes#2419, #2444, #2408.
- #2419: Add .local/testing/bench-memory.py — seeds N facts, runs M recall
queries, reports hit_rate/latency/compression/interference as JSON with
CSV append for longitudinal tracking.
- #2444: Add cost-sensitive store routing to zeph-memory. New StoreRouter
trait with HeuristicRouter, LlmRouter, and HybridRouter. HybridRouter
uses heuristic confidence signal and escalates to LLM only when
ambiguous. New [memory.store_routing] config section with
routing_classifier_provider field. Follow-up wiring: #2484.
- #2408: Add CraniMem goal-conditioned write gate to admission control.
goal_utility added as 6th AdmissionFactor. Gate is disabled by default
(goal_conditioned_write = false). Degenerate goal text guard (<10 chars)
prevents arbitrary admission on trivial inputs. New goal_utility_provider
config field. Follow-up wiring: #2483.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
19
19
- feat(skills): ERL experiential reflective learning — `spawn_erl_reflection()` fires a background LLM call after each successful skill+tool turn to extract transferable heuristics; heuristics are stored in `skill_heuristics` table with Jaccard deduplication; at skill matching time `build_erl_heuristics_prompt()` prepends a `## Learned Heuristics` section to the skill context; controlled by `[skills.learning] erl_enabled = false`, `erl_max_heuristics_per_skill = 3`, `erl_min_confidence = 0.5` (closes #2463)
20
20
- feat(db): migrations 057 (`skill_usage_log`) and 058 (`skill_heuristics`) for STEM and ERL storage; both SQLite and Postgres variants
21
21
- feat(config): `LearningConfig` extended with 14 new fields for ARISE/STEM/ERL (all disabled by default); new fields registered in `config/default.toml` as commented-out entries
22
+
- feat(testing): memory benchmarking harness — `.local/testing/bench-memory.py` seeds N facts via agent CLI `--pipe` mode, recalls them, and reports `hit_rate`, `avg_recall_latency_ms`, `p50_ms`, `p99_ms`, `compression_ratio`, `interference_rate` as JSON; token-level hit matching tolerates LLM paraphrase; optional CSV append for longitudinal tracking; stdlib-only Python, no external dependencies (closes #2419)
23
+
- feat(memory): cost-sensitive store routing — new `[memory.store_routing]` config section with `strategy` (`heuristic`/`llm`/`hybrid`), `routing_classifier_provider`, `confidence_threshold`, `fallback_route`; `RoutingDecision` struct carries route + confidence + reasoning; `LlmRouter` calls configured provider with quoted query (injection hardening) and parses structured JSON response; `HybridRouter` runs heuristic first and escalates to LLM only when confidence < threshold; `HeuristicRouter.route_with_confidence()` returns granular confidence (`1.0 / matched_count` for ambiguous queries); `AsyncMemoryRouter` trait for async callers; all LLM paths fall back to heuristic on failure (closes #2444)
24
+
- feat(memory): CraniMem goal-conditioned write gate (#2408) — `goal_utility` sixth factor added to `AdmissionFactors` and `AdmissionWeights`; new config fields `goal_conditioned_write`, `goal_utility_provider`, `goal_utility_threshold` (default 0.4), `goal_utility_weight` (default 0.25) in `[memory.admission]`; `GoalGateConfig` and `AdmissionControl::with_goal_gate()`; embedding-first scoring with optional LLM refinement for borderline cases; minimum goal text length check (< 10 chars treated as absent, W3.1 fix); soft floor of 0.1 prevents off-goal memories from scoring zero above threshold; zero regression when `goal_conditioned_write = false` (closes #2408)
22
25
- feat(core): `/new` slash command — resets conversation context (messages, compaction state, tool caches, focus/sidequest, pending plans) while preserving memory, MCP connections, providers, and skills; creates a new `ConversationId` in SQLite for audit trail; generates a session digest for the outgoing conversation fire-and-forget unless `--no-digest` is passed; active sub-agents and background compression tasks are cancelled; `--keep-plan` preserves a pending plan graph; available in all channels (CLI, TUI, Telegram) via the unified `handle_builtin_command` path (closes #2451)
23
26
- feat(memory): Kumiho AGM-inspired belief revision for graph edges — new `BeliefRevisionConfig` with `similarity_threshold`; `find_superseded_edges()` uses contradiction heuristic (same relation domain + high cosine similarity = supersession); `superseded_by` column added to `graph_edges` for audit trail; `invalidate_edge_with_supersession()` in `GraphStore`; `resolve_edge_typed` accepts optional `BeliefRevisionConfig`; controlled by `[memory.graph.belief_revision] enabled = false` (migration 056, closes #2441)
24
27
- feat(memory): D-MEM RPE-based tiered graph extraction routing — `RpeRouter` computes heuristic surprise score from context similarity and entity novelty; low-RPE turns skip the MAGMA LLM extraction pipeline; `consecutive_skips` safety valve forces extraction after `max_skip_turns` consecutive skips; `extract_candidate_entities()` helper for cheap regex+keyword entity detection; controlled by `[memory.graph.rpe] enabled = false, threshold = 0.3, max_skip_turns = 5` (closes #2442)
0 commit comments