

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 free-text descriptions to their lead6sentence **plus every constraint-bearing sentence**, while keeping every **selection token** —7tool and parameter names, types, enums, required — and every **argument-construction value** —8`default`, `const`, `$ref` targets — byte-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` pick the recovery store; default is the shared `CAVEMAN_CCR_DB` / `~/.caveman/ccr.db`.12- `cmd/caveman-shrink/` — the CLI: `caveman-shrink` / `shrink` (stdin→stdout), `lint <file>`, and `recover <handle>` (prints the original catalog for a handle a prior shrink minted).13- `bin/caveman-shrink.mjs` + `package.json` — the `npx caveman-shrink` launcher around the prebuilt binary.1415## Two correctness boundaries161. **structural selection surface** — `SelectionProfile(input)` ==17 `SelectionProfile(Shrink(input).Output)` always. This proves names/params/enums/required survive18 byte-for-byte. It does **not** prove the model selects the same tool: descriptions are19 model-visible and long descriptions are lossy. Behavioral equivalence requires model-eval20 fixtures; current results stay `inferred`.212. **argument validity** — agents build tool *arguments* from descriptions, so shrink preserves22 selection but **does not by itself guarantee argument validity**. What it guarantees, biased23 to over-keep: (a) a description that already fits a small budget (≤ `maxDescLen*2` bytes) is24 kept **whole** — no sentence is elided, so a constraint phrased without a recognised marker25 still survives; (b) in a genuinely large description, the lead sentence plus every sentence26 carrying a constraint marker (must / cannot / required / rejected / invalid / not allowed /27 exactly one / at least / at most / max / min / range / between / greater-than / over / above /28 unique / mutually exclusive / format / ISO / RFC / absolute …) is retained in full. Truncating29 an abbreviation ("Target path, e.g. /srv…" → "Target path, e.") or dropping30 `default`/RFC3339/bound rules would produce invalid calls the structural profile cannot see;31 the call-validity conformance test (`engine/compressors`, golden fixture + reproduced32 under-keep cases) locks recognised constraint tokens in place. Over-keep is the rule — never33 knowingly under-keep.3435## Conventions36- Build/test: `make product-build PRODUCT=shrink` / `make product-test PRODUCT=shrink`.37- The structural compressor lives in the **engine** (`compressors/toolschema.go`); shrink reuses it, never forks it.38- **This is the dedicated product surface for the `toolschema` compressor.** Engine API/CLI callers39 can also force it locally. Managed-gateway adapters keep tool arrays in the frozen prompt-cache40 prefix and never hand them to it; gateway's separate S2 tool-search/deferral path is not41 compression. Local reductions stay `inferred`. A future billed route for this transform needs42 cache-versus-schema cost proof, stable byte-identical prefix output, and an eval gate.4344## Gotchas (honesty invariants)45- **S4 lossy, fail-open** — successful compression changes model-visible bytes; malformed/incompressible catalogs pass through unchanged (`ratio:0`, no handle).46- **inferred-only** — token counts are estimates via the engine's offline counter; never `verified`, never re-projected.47- **reversible for real** — a compressing shrink writes the exact original to the **durable** store (`engine.Compress` commits the recovery row before it publishes transformed bytes), so a printed handle resolves later, from a separate process, via `Recover` / `caveman-shrink recover`. It is NOT an in-memory store discarded on return — that minted handles that were unresolvable the instant `Shrink` returned. If the durable store cannot be opened, `Shrink` returns an error and the CLI forwards the original bytes: no handle, no reversibility claim.4849See ../../CLAUDE.md (root) · ../engine/CLAUDE.md50
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 |
|---|---|---|---|---|---|
| stacklok/toolhiveCLAUDE.md · 2.0k | CLAUDE.md | buildteststylearch+4 | 100/100 | 14 days ago | |
| Adit-Jain-srm/NightmareNetCLAUDE.md · 46 | CLAUDE.md | buildtestlint-formatstyle+6 | 100/100 | 14 days ago | |
| microsoft/playwrightCLAUDE.md · 95k | CLAUDE.md | buildtestlint-formatstyle+7 | 100/100 | 7 days ago | |
| nimbalyst/nimbalystpackages/android/CLAUDE.md · 1.5k | CLAUDE.md | setupbuildstylearch+2 | 100/100 | 14 days ago | |
| 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 | |
| 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-shrink-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.