Repository navigation
BetterDB Memory for Claude Code v0.4.0
Recall-quality release: memories now embed their full structured detail, recall gates honestly instead of confabulating, and a fresh install produces embeddings with zero configuration.
Highlights
- Richer embeddings — decisions, patterns, problems, and open threads are now folded into the embedded text (previously only the one-line summary was embedded), so recall can actually see a session's substance. Bare file paths are excluded as noise.
- Threshold-gated, escalating recall — over-fetch → relative gate → narrow, escalating project+branch → project → cross-project. A miss is honest ("nothing cleared the bar") rather than surfacing the least-bad match, and the reader contract instructs the model not to fabricate or substitute a codebase grep for recall.
- Model-agnostic gate — relative floor/margin/separation instead of a fixed similarity threshold, so it transfers across embed models that compress cosine similarity into different bands.
- Zero-config on-device embeddings — falls back to
all-MiniLM-L6-v2(384-dim, Apache-2.0) when no Ollama/API provider is present; weights download once and cache. - Native branch scope + content-type tags — branch maps to the store's thread scope and content types to tags (
decision/pattern/problem/open-thread);search_contextgains atagsfilter. - Single, configurable recall decay — dropped the dead
decayRateknob and exposed the store's real composite decay (BETTERDB_RECALL_HALF_LIFE_DAYS+ weights). - New ops surface —
statusreports live store stats; a scopedforgetCLI (dry-run by default, refuses unbounded deletes) previews exactly what it will delete. - Local dev Docker setup —
docker composefor valkey-search + Ollama.
Fixes
- Cross-project
scope="all"requests are no longer silently downgraded whenBETTERDB_ALLOW_CROSS_PROJECTis off — the miss message says widening is disabled instead of offering a retry the config would refuse. - Escalating recall no longer reinforces the pre-gate over-fetch pool, so gated-out candidates don't skew composite ranking.
forgetdry-run now previews via the same native scope filterforgetByScopedeletes with, so the preview matches--applyexactly.search_context/session-context excerpts now includepatterntext, so pattern-filtered hits are answerable from the tool output.