Thanks to visit codestin.com
Credit goes to codeeraser.dev

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: 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 once
Homebrew · winget brew install skymanbp/codeeraser/codeeraser · winget install skymanbp.CodeEraser (generated from the same pins)
Cargo cargo install codeeraser
Claude Code ce setup, or by hand: /plugin marketplace add skymanbp/CodeEraser@release, then /plugin install codeeraser@codeeraser
Update ce update --yes

ce 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.

The same task, run twice

Without CodeEraserWith CodeEraser
writes refused before they reached disk02
duplicate clone blocks left behind40
duplicated doc segments10
removals still owed10
check score871979

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.

See it work

Wire it in

CI gate ce check . --fail-under 939  # 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 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.

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 and modularity axes over the whole repository.

ce scan

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.

ce trend

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

ce erase

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.

ce churn

Change heat over a git window, attributed per unit, so you see how much of a file is being rewritten rather than added to.

ce join

The three-signal join: churn, duplication and liveness folded into one verdict, so a hot duplicated dead corner names itself.

ce similar

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.

Guard hooks

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

Measured · v1.7.3

hook probe p50 (two-file fixture)46 ms
full scan p50671 ms
incremental index p50 (warm, dedup_warm)490 ms
guard false positives (630 arbitrated events)0.00 per 500 edits
docdup precision (frozen golden set)17/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 →

Under the hood

Architecture: the repository is parsed and fingerprinted by the Rust measurement side (tree-sitter, the SQLite fingerprint index kept warm by a per-project daemon, the reference graph, git windows), crosses one NDJSON wire of twelve families to the Haskell judgment core with its policy shipped as data, and the same reports are rendered by five faces (terminal, GUI, MCP server, Claude Code hooks, CI)
Measurement in Rust, judgment in Haskell: one wire, one report schema per family, five faces. Rendered from 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 →

Trust anchor

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.