crisp
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
- Rust
- Built with
- Claude, as my pair
- Source
- nqwabuko/crisp
The idea
“This is too complex” was an opinion you could argue with. crisp simplify --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.
One pure, offline Rust binary and the rule tables that drive it. No network, no state. It began as two Python scripts, which retired on 14 October 2026.
Fix versus flag
The split that matters is FIX vs FLAG. A fix has exactly one correct plain equivalent, so crisp applies it (“prior to” becomes “before”). A flag changes meaning, so crisp only locates it and says why; a human or an agent decides. It never quietly reweights 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.