agentleFS
JuliusBrusseeJuliusBrussee/caveman/engine/AGENTS.md

caveman / engine

AGENTS.md110k starsChanged 8 months agoApache-2.0View on GitHub

Detect a payload's type → route to a safety-classed compressor → count the token reduction → store the original for recovery. The stable four-call API (Compress/Retrieve/Detect/Stats) is what the proxy, CLI, SDKs, MCP, and WASM build all share. Everything it reports is inferred; it never says verified.

Adopted by

Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data

Week of Sep 27: 0 new projectsWeek of Oct 4: 0 new projectsWeek of Oct 11: 0 new projectsWeek of Oct 18: 0 new projectsWeek of Oct 25: 0 new projectsWeek of Nov 1: 0 new projectsWeek of Nov 8: 0 new projectsWeek of Nov 15: 0 new projects
Sep 2026Oct 2026Nov 2026
New projects taking a version of this file each week, over the 8 weeks our latest run read: only 0 in all, so this is a hint, not a trend.

Who's talking about JuliusBrussee/caveman

The biggest 5 of 103 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 103

Talked about on GitHub, Bluesky and Hacker News (103 times).

On GitHub · 50

45 more on GitHub

On Bluesky · 50

45 more on Bluesky

The file

We split this AGENTS.md into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    fail-closed transforms: every compressor passes the original through unchanged on any parse problem.

    line 36

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

engine — the content-aware Caveman Engine (commercial, binary-distributed)

Detect a payload's type → route to a safety-classed compressor → count the token reduction → store the original for recovery. The stable four-call API (Compress/Retrieve/Detect/Stats) is what the proxy, CLI, SDKs, MCP, and WASM build all share. Everything it reports is inferred; it never says verified.

Layout

  • engine.go — the Engine core: detect → route → compress → token ratio → CCR. record mode + miss + parse-fail + not-smaller + no-store all pass through.
  • result.go — Result/Options/Mode; unknown mode fails closed to record.
  • detect.go — content router (json/diff/code/log/search-result/html/tabular/config/terminal/text); low confidence → text.
  • listing.go — strips a read tool's line-number gutter (1\t{, 2\t "unit") before Detect and before the compressor, then restores it after. Agents send file listings, not files; the gutter is presentation, and left in place it made every guttered payload detect as text and compress ~0%. Restoration keeps each surviving line's ORIGINAL number and is declined entirely for transforms that restructure rather than elide (re-encoded JSON), because numbers that describe nothing are worse than none.
  • safety/ — the S0–S4 registry; S4 is lossy and RequiresCCR. Unknown class → fail closed.
  • tokens/ — Counter interface; default is an offline, vocab-embedded BPE tokenizer (o200k_base). inferred always.
  • contextwindow/ — deterministic BM25 context packer with recency/error/priority signals and token-budget accounting.
  • compressors/ — Compressor interface + registry; structural JSON/log/search/diff/text/HTML/table/config/code compressors plus forced-only TOON/tool-schema/accessibility/repetition paths — Default() registers 14. A compressor is a pure byte transform.
  • ccr/ — ~/.caveman/ccr.db SQLite recovery store; content-addressed handles; byte-exact Get.
  • pixel/ — pxpipe port (MIT, see its NOTICE): text→PNG request compression. Embedded glyph atlases + renderer + profitability gate + per-wire-format transforms (Anthropic/OpenAI/Gemini). S4-lossy, allowlist-gated (CAVE_PIXEL_MODELS, default claude-fable-5,gpt-5.6), consumed by the proxy's pixel mode; never wired into Detect and never imported by the WASM build (≈4 MB assets).
  • evals/ — the local eval harness + fail-closed graders + embedded fixtures/. Run() is the quality gate.
  • cmd/caveman-engine/ — the binary the CLI shells out to: compress | detect | retrieve | stats | registry | toon encode|decode | evals run | pixel render|simulate. toon is the stateless (no-CCR) JSON⇄TOON converter; both directions fail closed.

Conventions

  • Build/test: make product-build PRODUCT=engine / make product-test PRODUCT=engine.
  • A new compressor is a self-contained file in compressors/ + tests, registered in Default(). Forced-only compressors such as toolschema and toon must not be added to Detect.
  • Compressors never count tokens, touch CCR, or hit the network — the engine core does that around them.
  • The toolschema transform is client-side-only today. Registration makes it forceable by engine callers; it does not make it reachable from managed-gateway traffic. Provider adapters intentionally keep tool arrays in the frozen prompt-cache prefix, and no billed route invokes this compressor. Engine API/CLI callers may force it locally, and caveman-shrink is its dedicated product surface; those reductions remain local and inferred. Managed gateway has a separate S2 tool-search/deferral path; do not conflate it with compression. Any future gateway route for this transform needs cache-versus-schema cost arithmetic, stable byte-identical prefix output, and an eval gate before activation.

Gotchas (honesty invariants — correctness, not style)

  • fail-closed transforms: every compressor passes the original through unchanged on any parse problem; the engine also passes through when the result is not smaller in tokens. Reserve byte-safe for classes whose safety.Info.ByteSafe is true.
  • CCR-or-pass-through: a lossy (S4) result is only emitted if its original was stored; with no store, the engine fails closed to pass-through.
  • inferred-only: ratios are token estimates labeled inferred; never verified, never re-projected.
  • fail-closed: unknown mode → record; unknown content type → text; unknown grader → passed:false.
  • cgo: full code compression (Python/JS/TS) needs the tree-sitter build; the cgo-free build compresses Go only. The embedded eval fixtures cover all three under cgo.
  • boundary: this is public/ — never import cloud/…. make check-boundaries enforces it.

See ../../CLAUDE.md (root)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.