Memory categories are profile, preference, episodic, procedural,
project-context, and decision-reference. Every row has transaction time
(learnedAt), valid time (validFrom/validUntil), confidence, importance,
sensitivity, namespace, and provenance.
Explicit writes create active rows and FTS documents. Corrections close the old
valid interval, mark it superseded, and create a linked active row. Historical
recall filters validity at asOf; it does not simply filter on current status.
Forgetting removes canonical content, sources, FTS, vectors, and feedback for the
exact ID, then retains only a content-free deletion audit row.
Keyword recall combines FTS rank, recency, importance, and confidence with the
PRD weights renormalized across available signals. When a provider is configured,
the query is embedded, cosine candidates are merged/deduplicated with keyword
candidates, and the full hybrid formula is used. Vectors remain derived SQLite
blobs and brute-force search is deliberately capped at the V1 10,000-memory
dataset. reindex can rebuild either derived index.
The five score weights default to 0.45/0.25/0.10/0.10/0.10 for semantic,
keyword, recency, importance, and confidence. Configure them with the
retrievalWeights config object, THREADKEEPER_SCORE_* environment variables,
or --score-* flags. Keyword mode renormalizes across its available signals.
Sensitive broad-resource recall is forbidden. Normal recall excludes sensitive
rows unless includeSensitive is explicit. Secret-like input is rejected before
canonical or derived persistence and is never echoed in its error.