diffdiet: A CI Gate That Scores AI Coding Agents' Diffs for Bloat
An AI coding agent fixing a one-line greeting bug can produce a correct fix that adds unnecessary code, such as new modules, abstractions, and dependencies, which tests and linters don't catch. The author built diffdiet, a zero-dependency Python tool that grades unified diffs with a transparent 0-100 score and enforces a budget gate in CI. Its companion rules pack for agent config files discourages single-use abstractions, unneeded dependencies, and commented-out dead code. The repository includes a lean and a bloated version of the same fix, which score 100 and 57 respectively, with only the lean one passing the default gate of 60. The tool is MIT-licensed, requires Python 3.10+, and its budgets are tunable through a configuration file.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in