Skip to content
Ship with agents · step 6 of 7

Cut it down without changing it

Agents add code by default. Taking it out is your job.

Oct 31, 2026 · 1 min read

I had an agent clean up a catalog I’d been building, and about 73% of the code went, 35,100 lines down to 9,500. All five packages still passed type checks and tests.

Agents almost never suggest that on their own. Left alone they just keep adding.

The habit

Simplifying only counts if behavior stays the same, so run the same checks before and after. Remove things in small, clear steps, and keep validation, error handling and security.

If the same rule lives in two places, keep one owner and delete the other, otherwise one of them eventually gets forgotten.

Try it

Find code in this change that can go without changing behavior, like duplicated rules or things nothing uses. Keep validation, error handling and security. Show the diff and run the same checks before and after. Do not add anything.

Install it

lean does this for you.