Work studies / Teardown
How Clippy and ESLint decide which fixes are safe to apply
When a tool finds a mistake, how does it know whether it can fix it without asking?
Rust’s Clippy and JavaScript’s ESLint fix some problems on their own and only suggest fixes for others. I want to understand which fixes a tool may apply on its own and why, then spend a week building that split into a checker for interface code.
- Format
- Teardown
- What I’ll build
- A rule checker for interface code that applies a fix only when nothing else changes, offers the rest as suggestions, and words every message so an AI agent can act on it without guessing.
- What I’ll reuse
- A fix-safety rubric and message format for a design system’s rules, read the same way by people and by AI agents.
- Used by
- kbui
- Status
- Planned · Nov 2026
What I’ll look at
How the Rust compiler grades each suggestion by how sure it is, and which grades a tool like cargo fix will apply by itself. How ESLint keeps “fix” and “suggest” apart, and what a rule’s author has to promise before a fix runs automatically. And how both word a message: what’s wrong, where, and what to change.
My guess
I expect a fix counts as safe only when it’s local and changes nothing else, like swapping a raw colour for the design token with the same value. Anything that needs judgement, like choosing the right heading level, is probably always a suggestion.
How I’ll prove it
I’ll write rules for a handful of common interface mistakes and run them on screens written by AI agents. Every automatic fix must leave the rendered page unchanged apart from the problem it fixed.
Then I’ll hand the messages to an agent and count how often it fixes the problem on the first try.