

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1# mem — cavemem, durable agent memory (commercial Go core + MIT clients)23Durable, cross-session memory: `remember` / `recall` / `supersede` / `history` / `forget`. A local SQLite store holds the4**raw** memories (the source of truth); recall ranks them with deterministic **BM25** behind a5conservative threshold and compresses each hit through the [engine](../engine/CLAUDE.md) so the6inferred token cost is honest and the dropped detail stays recoverable via CCR. Everything is7`inferred`.89## Layout10- `store.go` — `Remember`/`Recall`/`Supersede`/`History`/`Forget`/`Recover` over SQLite + engine; legacy schemas migrate in place.11- `bm25.go` — deterministic tokenizer + BM25 scorer (non-negative scores, so the threshold is meaningful).12- `cmd/cavemem/` — MCP server + `remember`/`recall`/`supersede`/`history`/`forget` CLI subcommands (JSON).13- `js/` + `py/` — thin TS and Python clients that shell out to the binary (mirrored libraries; they reimplement nothing).1415## The cavemem_* MCP tools16`cavemem_remember(text)` · `cavemem_recall(query, limit?, token_budget?)` ·17`cavemem_supersede(id, text)` · `cavemem_history(id)` · `cavemem_forget(id)`,18served through `mcp.NewServer` so the framing matches caveman-mcp exactly.1920## Conventions21- Build/test: `make product-build PRODUCT=mem` / `make product-test PRODUCT=mem`22 for the Go core; root `make test` also runs mirrored JS/Python wrapper tests.23- The wrappers shell memory text to the gated binary through `remember --stdin`24 (never one huge argv element) — keep validation/recall/scoring logic in Go,25 never forked into TS/Python.2627## Gotchas (honesty invariants)28- **byte-safe write** — raw text is written to SQLite before any engine call, so a memory is never lost; compression is transient, at recall time only.29- **single-writer store** — `mem.db` and `ccr.db` open with `SetMaxOpenConns(1)` + a DSN carrying `busy_timeout(5000)` + `journal_mode(WAL)` (`ccr.SQLiteDSN`). The proxy spend store uses the same DSN but does **not** force one pooled connection; mem/CCR's discipline is stricter. Cold-start migration is wrapped in a five-second-wall-budgeted `ccr.RetryOnBusy` because a fan-out of fresh `cavemem remember` processes (the JS client's `Promise.all(facts.map(remember))`) races on the multi-statement DDL; runtime single-statement writes lean on `busy_timeout` alone. Without this, 32 concurrent writes landed 1 and dropped 31 as `SQLITE_BUSY`.30- **bounded recall** — `Recall` packs hits greedily in BM25 rank order under `RecallOptions.TokenBudget` (default `DefaultTokenBudget` = 2000 inferred tokens), reusing `engine/contextwindow` packing. Public CLI/MCP/JS/Python callers must explicitly pass `token_budget=0` to request unlimited recall; adapters map that external zero to `UnlimitedTokenBudget`, while omitted/Go-zero stays bounded. A single top hit whose compressed form alone exceeds the budget is returned as a compressed **head + CCR recovery_handle** (the original is stored even when compression passed it through), never its whole body — this is what stops the measured 440,000-token single recall.31- **bounded remember** — `Remember` caps one memory at `MaxMemoryBytes` (256 KiB), failing closed with `cave_memory_too_large` (`ErrMemoryTooLarge`); CLI exits 65 and both wrappers export `MEMORY_TOO_LARGE_EXIT_CODE`. A memory is a fact to recall, not a file dump.32- **fail toward nothing** — a query below the threshold (or with no term overlap) recalls nothing, never a guess.33- **current-only recall** — superseded versions stay auditable through `History` but never enter normal recall.34- **inferred-only** — `tokens_added`, score, and basis are inferred estimates; never `verified`.35- **reversible** — a compressed recall hit carries a CCR `recovery_handle`; `Recover` returns the byte-exact original.3637See ../../CLAUDE.md (root) · ../engine/CLAUDE.md · ../mcp/CLAUDE.md38
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| JuliusBrussee/cavemanCLAUDE.md · 98k | CLAUDE.md | archgitdo-notagent-behaviour+1 | 73/100 | today | |
| JuliusBrussee/cavemanagents/AGENTS.md · 98k | AGENTS.md | agent-behaviour | 16/100 | today | |
| JuliusBrussee/cavemanagents/CLAUDE.md · 98k | CLAUDE.md | stylearchsecurityagent-behaviour | 64/100 | today | |
| JuliusBrussee/cavemanbrowse/CLAUDE.md · 98k | CLAUDE.md | testarch | 59/100 | today | |
| JuliusBrussee/cavemancacheengine/CLAUDE.md · 98k | CLAUDE.md | testarch | 73/100 | today | |
| JuliusBrussee/cavemanengine/AGENTS.md · 98k | AGENTS.md | stylearch | 66/100 | today | |
| JuliusBrussee/cavemanengine/CLAUDE.md · 98k | CLAUDE.md | stylearch | 58/100 | today | |
| JuliusBrussee/cavemanextension/AGENTS.md · 98k | AGENTS.md | buildteststylearch+1 | 73/100 | today | |
| JuliusBrussee/cavemanextension/CLAUDE.md · 98k | CLAUDE.md | buildteststylearch+1 | 73/100 | today | |
| JuliusBrussee/cavemanintegrations/CLAUDE.md · 98k | CLAUDE.md | stylearch | 55/100 | today | |
| JuliusBrussee/cavemanmcp/AGENTS.md · 98k | AGENTS.md | stylearch | 79/100 | today | |
| JuliusBrussee/cavemanmcp/CLAUDE.md · 98k | CLAUDE.md | stylearch | 79/100 | today | |
| JuliusBrussee/cavemanmem/AGENTS.md · 98k | AGENTS.md | stylearchperformanceagent-behaviour | 67/100 | today | |
| JuliusBrussee/cavemanpackages/agent/CLAUDE.md · 98k | CLAUDE.md | archtesting-strategysecuritydependencies+2 | 34/100 | today | |
| JuliusBrussee/cavemanpackages/cli/AGENTS.md · 98k | AGENTS.md | stylearchdependenciesmonorepo | 71/100 | today | |
| JuliusBrussee/cavemanpackages/cli/CLAUDE.md · 98k | CLAUDE.md | stylearchdependenciesmonorepo | 71/100 | today | |
| JuliusBrussee/cavemanpackages/create-caveman-agent/CLAUDE.md · 98k | CLAUDE.md | archdependenciesmonorepoagent-behaviour | 36/100 | today | |
| JuliusBrussee/cavemanpackages/graders/AGENTS.md · 98k | AGENTS.md | teststylearchtypes+3 | 75/100 | today | |
| JuliusBrussee/cavemanpackages/graders/CLAUDE.md · 98k | CLAUDE.md | teststylearchtypes+3 | 75/100 | today | |
| JuliusBrussee/cavemanpackages/kit/AGENTS.md · 98k | AGENTS.md | stylearchdependenciesmonorepo | 63/100 | today |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| dotCMS/corecore-web/CLAUDE.md · 949 | CLAUDE.md | teststylearchtesting-strategy+3 | 100/100 | 14 days ago | |
| tphakala/birdnet-goCLAUDE.md · 1.6k | CLAUDE.md | buildtestlint-formatstyle+8 | 100/100 | today | |
| tyrchen/geektime-bootcamp-aiw7/genslides/backend/CLAUDE.md · 230 | CLAUDE.md | testlint-formatstylearch+6 | 100/100 | 9 days ago | |
| nimbalyst/nimbalystpackages/android/CLAUDE.md · 1.5k | CLAUDE.md | setupbuildstylearch+2 | 100/100 | 14 days ago | |
| microsoft/playwrightCLAUDE.md · 95k | CLAUDE.md | buildtestlint-formatstyle+7 | 100/100 | 7 days ago | |
| Adit-Jain-srm/NightmareNetCLAUDE.md · 46 | CLAUDE.md | buildtestlint-formatstyle+6 | 100/100 | 14 days ago | |
| stacklok/toolhiveCLAUDE.md · 2.0k | CLAUDE.md | buildteststylearch+4 | 100/100 | 14 days ago | |
| bagisto/bagistoCLAUDE.md · 28k | CLAUDE.md | setupbuildteststyle+5 | 100/100 | 7 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/juliusbrussee-caveman-mem-claude)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.