My AI shipped a 1,199-line change nobody understood. I built a CLI that scores how fragile it is.
My AI shipped a 1,199-line change nobody understood. I built a CLI that scores how fragile it is. An essay made the rounds this week: "AI usage generates a fragile codebase." The argument is simple. AI writes code faster than humans can review it, so the bottleneck moved from writing to the review gate. Code that looks right, passes the easy tests, and ships before anyone understands it. I have…
An AI-generated code change exceeding 1,000 lines passed through the review process without anyone fully understanding its implications. In response, the author developed a command-line interface (CLI) tool called fragility, which evaluates the fragility of AI-written code based on four key factors. The tool, available on GitHub, requires no API keys, servers, or model calls and provides a CI verdict.
The four signals measured by fragility include test shallowness, orphan lines, over-abstraction, and comprehension debt. The composite fragility score ranges from 0 to 100, with three possible outcomes: ROBUST, WATCH, or FRAGILE. The tool runs entirely locally and generates no output beyond the command line. In testing, the tool accurately identified a fragile AI-generated change with no tests covering any lines and a high review velocity.
A follow-up update improved the tool to detect AI-marked commits more accurately, addressing a previously missed vulnerability. The author emphasizes that fragility complements existing tools by offering a cheap, offline, and deterministic pre-merge check to measure the gap between AI-generated code and human understanding.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.