

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1# shrink — caveman-shrink, the tool-catalog compressor (commercial Go core + MIT launcher)23Compress MCP/OpenAI **tool definitions** before they fill the context window. A thin Go wrapper4over the [engine](../engine/CLAUDE.md)'s `toolschema` compressor: it drops annotation metadata5(examples, titles, `$comment`, `$schema`) and reduces long descriptions to their lead plus every6constraint-bearing sentence. It keeps every **selection token** (tool/parameter names, types,7enums, required) and argument-construction value (`default`, `const`, `$ref` targets)8byte-for-byte. Everything is `inferred`.910## Layout11- `shrink.go` — the library: `Shrink` (catalog → compressed, fail-open S4 transform, durable-CCR-backed), `Recover` (handle → original bytes), `Lint` (per-tool inferred token reductions), `SelectionProfile` (the structural surface — what must survive). `WithStore`/`WithStorePath` select recovery storage; default is `CAVEMAN_CCR_DB` / `~/.caveman/ccr.db`.12- `cmd/caveman-shrink/` — the CLI: `caveman-shrink` / `shrink` (stdin→stdout), `lint <file>`, and `recover <handle>`.13- `bin/caveman-shrink.mjs` + `package.json` — the `npx caveman-shrink` launcher around the prebuilt binary.1415## Two correctness boundaries16`SelectionProfile(input)` == `SelectionProfile(Shrink(input).Output)` always. This proves the17structural selection surface (names/params/enums/required) survives byte-for-byte. It does **not**18prove the model selects the same tool: descriptions are model-visible and long descriptions are19lossy. Behavioral selection equivalence requires model-eval fixtures; keep results `inferred`.2021Selection alone does not guarantee valid arguments. Short descriptions stay whole; long ones22keep the lead plus every recognised constraint sentence (must/cannot/required/bounds/format/23ISO/RFC/absolute/etc.). `default`, `const`, and internal `$ref` targets survive. Golden and24adversarial conformance tests lock these construction surfaces; over-keep is safer than a retry.2526## Conventions27- Build/test: `make product-build PRODUCT=shrink` / `make product-test PRODUCT=shrink`.28- The structural compressor lives in the **engine** (`compressors/toolschema.go`); shrink reuses it, never forks it.29- **This is the dedicated product surface for the `toolschema` compressor.** Engine API/CLI callers30 can also force it locally. Managed-gateway adapters keep tool arrays in the frozen prompt-cache31 prefix and never hand them to it; gateway's separate S2 tool-search/deferral path is not32 compression. Local reductions stay `inferred`. A future billed route for this transform needs33 cache-versus-schema cost proof, stable byte-identical prefix output, and an eval gate.3435## Gotchas (honesty invariants)36- **S4 lossy, fail-open** — successful compression changes model-visible bytes; malformed/incompressible catalogs pass through unchanged (`ratio:0`, no handle).37- **inferred-only** — token counts are estimates via the engine's offline counter; never `verified`, never re-projected.38- **reversible for real** — a compressing shrink commits the exact original to the durable shared39 CCR store before returning a handle. A separate process resolves it through `Recover` /40 `caveman-shrink recover`; failure to open storage makes library `Shrink` return an error, while41 the CLI catches that error and forwards the original bytes with no handle.4243See ../../CLAUDE.md (root) · ../engine/CLAUDE.md44
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/cavemanmem/CLAUDE.md · 98k | CLAUDE.md | stylearchperformanceagent-behaviour | 71/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 |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| ethereum/go-ethereumAGENTS.md · 51k | AGENTS.md | buildtestlint-formatgit+1 | 100/100 | 14 days ago | |
| mui/material-uiAGENTS.md · 99k | AGENTS.md | setupbuildtestlint-format+9 | 100/100 | 14 days ago | |
| TryGhost/Ghoste2e/AGENTS.md · 55k | AGENTS.md | setupteststylearch+2 | 100/100 | today | |
| code-yeongyu/oh-my-openagentpackages/web/AGENTS.md · 68k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 13 days ago | |
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 201k | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago | |
| deepseek-ai/deepseek-harnessnative/landlock-run/AGENTS.md · 104k | AGENTS.md | setupteststylearch+3 | 100/100 | today | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago | |
| elastic/elasticsearchx-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/AGENTS.md · 78k | AGENTS.md | buildtestlint-formatstyle+2 | 100/100 | 14 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-shrink-agents)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.