The bug is a truncated label. The diff also rewrites the file from CSS Modules to Tailwind “so it matches the newer pages,” or from a styled component to a stack of inline styles “to keep it local.” The visual fix is one min-width. The rest is a styling migration with no design review.
I’ve started telling agents to keep the styling approach the file already uses. A bugfix is not the moment to introduce a second (or third) styling system in the same folder.
Why the rewrite looks helpful
The model wants consistency with whatever examples it has seen most recently. If the prompt or the nearby tab is Tailwind, it will “helpfully” convert the file you asked it to patch. The conversion often almost works: a few tokens get inlined as magic values, a media query is dropped, and a CSS Module that other files still import is left half-deleted.
You also lose review signal. A 200-line style rewrite buries the text-overflow change. Snapshot and visual tests churn for reasons that have nothing to do with the bug.
This is the same discipline as “don’t clean up unrelated imports” and “don’t rename CSS Module classes in a bugfix,” applied to the styling system itself.
A simple styling-system policy
- Patch the file in the system it already uses (CSS Modules, Tailwind, styled-components, vanilla-extract, and so on)
- A migration is its own PR, with a stated target system and a scope
- New files follow the folder convention, not the agent’s favorite library
- Do not add a new styling library to
package.jsonto style one component
If the team is mid-migration, point the agent at the migration doc or the target folder’s convention. Do not let it convert a random file because it was already open.
What to put in the prompt
Keep this file in its current styling approach (CSS Modules in this folder). Do not convert it to Tailwind, inline styles, or styled-components as part of this change. Do not add a new styling library. You may add or adjust classes in the existing system. Do not rewrite the whole stylesheet. In review, if the diff touches the styling system (new runtime, deleted module, a mass class conversion) and the ticket was a typo or a layout bug, send it back.
Reject / send back
Reject
- A CSS Module rewritten to Tailwind in a typography bugfix
- A styled-component converted to inline styles “to simplify”
- A new CSS-in-JS library added for one component
- A half-migration that leaves both systems in the same file without a plan
Accept
- A small class or styled-rule change in the existing system
- A new file that follows the folder’s convention
- A dedicated migration PR that converts a stated set of files and nothing else

