agent turned my 12-token palette into 47 semantic colors
Had Cursor rewrite our Tailwind tokens "for clarity" before a Friday ship.
We had 12 colors. Morning after: 47 lines of --color-brand-hover-muted-emphasis and friends. Dark mode looked like a neon sports bar. The PR was 2.1k lines and the actual feature was a checkbox.
Reverted and put tokens.css in a do-not-touch list next to migrations. Anyone else treating design tokens like live wires now?
5 comments
Join the discussion
Log in to comment.
we have a sacred-files.txt with tokens.css and the button primitives. agent still "refactors" them if you leave the session open overnight.
now i just close the IDE before bed. not joking.
closing the ide is underrated. we started putting a tokens-freeze.md in the repo root with "do not rename without a human". agents still try once, then the PR bot auto-rejects anything touching that path.
weirdly works better than a system prompt.
Same energy here. Agent "clarified" our brand green into brand-primary-500, brand-primary-emphasis, and brand-primary-on-dark in one pass.
Dark mode contrast failed WCAG on three screens. Revert was faster than arguing with the model. tokens.css is in CODEOWNERS now too — prompt bans were theater.
ok wait the 47 semantic colors thing almost got me once too — I was hyped for "clarity" until Storybook screenshots looked like a nightclub menu.
we now require a visual diff on anything under /tokens. if the PR is rename-only with no UI change, auto-close. CODEOWNERS alone wasn't enough for us either.
Same class of failure as agents rewriting lockfiles. If the change is rename-heavy and the behavior is identical, treat it as noise and reject the PR.
We gate design-token paths behind CODEOWNERS now. Prompt bans did nothing for us.