Case file CF-004

crisp

active

Turns "this is too complex" from an opinion into a test that exits 1. Strips the AI tells, cuts the clutter, scores against a budget.

Opened
August 2026
Language
Python
Built with
Claude, as my pair

The idea

“This is too complex” was an opinion you could argue with. simplify.py --check turns it into a test that exits 1. --baseline does the same for “this is too long”: measure the rewrite against the source it came from and fail it if fewer than a quarter of the words are gone.

Two small, pure, offline Python scripts and the rule tables that drive them. No dependencies, no network, no state.

Fix versus flag

The split that matters is FIX vs FLAG. A fix has exactly one correct plain equivalent, so a script applies it (“prior to” becomes “before”). A flag changes meaning, so the script only locates it and says why; a human or an agent decides. The scripts never quietly reweight what you said.

Length is the one thing a ratio can’t see

Every other metric is a ratio, so a document can sit inside all of them and still be twice as long as it needs to be. Length is the one thing a per-sentence measure cannot see, and it is usually the biggest win available.

Assert the invariant, not just the output

Three segmentation bugs survived a fixture corpus that passed clean: inline code splitting its own sentence, a bold sentence hiding its full stop, and a greedy link match that once ate 826 characters. What caught all three was a check that the positioned segmentation and the aggregate metrics agree on sentence, paragraph and word counts. It took genuinely messy real prose to break them, so put some in your corpus.

← All case files