CodeEraser
CodeEraser icon: an eraser mid-swipe through rows of code

CodeEraser

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.

Installer GitHub Releases — Windows · Linux · macOS, GUI + CLI + judgment core, SHA256-pinned
Cargo cargo install codeeraser
Claude Code /plugin marketplace add skymanbp/CodeEraser
$ ce check --roast
check score 822/1000 | axes 0:4 1:0 2:42 3:0 4:0 5:0 6:79 | 42 candidates
ratchet: 0 added, 0 removed, 0 over, 5 tolerance drawn -> pass
roast: entropy is losing, slowly. keep the eraser warm.

Real output — CodeEraser judging its own repository. The ratchet only shrinks: every violation is banked in a baseline, and new entropy fails the gate.

See it work

CodeEraser GUI: squarified structure treemap of the CodeEraser repository, tiles heated by findings density, score 872/1000
The structure screen judging this repository: a squarified treemap, tiles heated by findings density, one ratcheted score.
CodeEraser GUI: deletion-candidate browser listing similar file pairs with block and token counts
The deletion-candidate browser: similarity × graph position × churn, the same rows ce join prints.

Wire it in

CI gate ce check . --fail-under 800  # ratchet + floor; exit 1 turns the pipeline red
pre-commit ce precommit  # staged net LOC + touched duplicates
MCP ce mcp  # every report family as a read-only tool for any agent

Judgment families

ce check

The gate. One 0–1000 score over seven axes, a shrink-only ratchet against the banked baseline, and a hard floor for CI.

ce dedup

T1/T2 clone detection via winnowing fingerprints, with a clone-block budget your repo can only ratchet down.

ce clone

T3 near-clones judged by tree edit distance in the Haskell core — renamed and reshaped copies included.

ce deadcode

Liveness verdicts on a cached reference graph: no kept in-edge, no entry flag — dead, and the gate says so.

ce docdup

Duplicated prose across docs and comments, judged by exact Jaccard over live segments.

ce structure

Tree-scale entropy: layout divergence, doc staleness, redundancy axes over the whole repository.

ce scan

Size, complexity and readability per file and function — the classic metrics, core-graded.

ce trend

Your score across mainline history — cached per commit, rebuildable, honest about direction.

Guard hooks

As a Claude Code plugin: duplicate writes intercepted at the moment of writing, audits at stop, health at session start.

Under the hood

Architecture: repository sources measured by the Rust frontend (tree-sitter, winnowing index, reference graph, churn, warm daemon), judged by the Haskell core (entropy, clones, liveness, doc duplication, ratcheted score), rendered by five faces (terminal, GUI, MCP, hooks, CI)
Measurement in Rust, judgment in Haskell — one wire, one report schema per family, five faces.

Trust anchor

The six CLI & core binaries (three platforms × ce / ce-core) are pinned by SHA256 in plugin/bin/manifest.env and verified before publish; every release asset — GUI installers included — is covered by a SHA256SUMS you can check offline. Code signing is deliberately out of scope — the hash chain is the permanent anchor. Measurement lives in Rust, judgment in Haskell, and this repository gates itself with its own tool on every commit.