LLMs write code that accretes: duplicated blocks, dead files, stale docs, structural sprawl. CodeEraser measures it, judges it, and gates it with a score that is only allowed to get better.
GitHub Releases: x86_64-windows · x86_64-linux · aarch64-macos · x86_64-macos · aarch64-linux, GUI + CLI + judgment core, SHA256-pinned; the Windows installer runs ce setup, AppImage / dmg users run it oncebrew install skymanbp/codeeraser/codeeraser · winget install skymanbp.CodeEraser (generated from the same pins)cargo install codeeraserce setup, or by hand: /plugin marketplace add skymanbp/CodeEraser@release, then /plugin install codeeraser@codeeraserce update --yesce update compares the latest tag against this build (exit 0 / 1 / 2); --yes replaces ce and ce-core after both SHA256 pins verify (never a copy the plugin or cargo owns, which name their own update), and --installer saves the verified GUI installer. The GUI has an update screen; in Claude Code, /codeeraser:update.
$ ce check --roast check score 945/1000 | axes 0:84 1:0 2:102 3:0 4:0 5:0 6:205 | 34 candidates ratchet: 0 added, 0 removed, 0 over, 0 tolerance drawn -> pass note: 10 blocks collapsed into existing members, 15 intra-file pairs off the sim table roast: suspiciously clean. who did you pay?
Real output: CodeEraser judging its own repository. The ratchet only shrinks: every violation is banked in a baseline, and new entropy fails the gate.
| Without CodeEraser | With CodeEraser | |
|---|---|---|
| writes refused before they reached disk | 0 | 2 |
| duplicate clone blocks left behind | 4 | 0 |
| duplicated doc segments | 1 | 0 |
| removals still owed | 1 | 0 |
| check score | 871 | 979 |
One seven-step task, two identical copies of the seed; the only variable is whether CodeEraser is in the loop — the write-time guard, the Stop audit, and, once the audit refuses, the eraser acting on its own plan. Both runs still end red — not on the same things.
The seed is demo/seed/, a small cent-exact invoicing service in Python and TypeScript, measured clean by the same gates before either run; the task adds discounts, a compact report, CSV and JSON output, and money formatting in the API.



ce join prints.ce check . --fail-under 939 # ratchet + floor; exit 1 turns the pipeline redce precommit # staged net LOC + touched duplicatesce mcp # every report family as a read-only tool for any agentThe gate. One 0–1000 score over seven axes, a shrink-only ratchet against the banked baseline, and a hard floor for CI.
T1/T2 clone detection via winnowing fingerprints, with a clone-block budget your repo can only ratchet down.
T3 near-clones judged by tree edit distance in the Haskell core, renamed and reshaped copies included.
Liveness verdicts on the cached reference graph: no kept in-edge and no entry flag means dead, and the gate says so. Beside it, the unmentioned-declaration advisory, which never reddens a gate.
Duplicated prose across docs and comments, judged by exact Jaccard over live segments.
Tree-scale entropy: layout divergence, doc staleness, redundancy and modularity axes over the whole repository.
Size, complexity and readability per file and function, the classic metrics core-graded against the global table or the file's own [[rules.class]] lines.
Your score across mainline history, cached per commit, rebuildable, honest about direction.
The deterministic two-phase eraser: dead files, verbatim document twins and whole-unit exact clones. Planned first, applied only from a clean worktree, never by asking a model to rewrite code.
Change heat over a git window, attributed per unit, so you see how much of a file is being rewritten rather than added to.
The three-signal join: churn, duplication and liveness folded into one verdict, so a hot duplicated dead corner names itself.
The same-role advisor: integer BM25 over term bags the index already holds, with the core deciding which candidates play the query's role. A deterministic offline retrieval, advice only, never a gate.
As a Claude Code plugin: duplicate writes intercepted at the moment of writing, audits at stop, health at session start.
46 ms671 ms490 ms0.00 per 500 edits17/17 scoped (100%)Every number is produced by replay (cli/tests/it/bench.rs and bench_backfill.rs) from one source, contracts/bench/bench.json — never hand-filled.
Complete evaluation dashboard →
docs/diagrams/architecture.en.json; every component cites its source files. Open the full-size SVG.Open the component-level stack and its enforcement map →
All fifteen release binaries (five platforms × ce / ce-core, plus the five
GUI installers) are pinned by SHA256 in plugin/bin/manifest.env;
the tag phase verifies every pin, waits for a green CI on the tagged commit, and refuses
an unexpected asset before anything publishes. SHA256SUMS covers the set for
offline checking. Code signing is deliberately out of scope; the hash chain is the permanent
anchor. This repository gates itself with its own tool on every commit.