Freezing design tokens so AI agents can't edit shared styling scales
An agent asked to adjust spacing in a checkout header also changed a shared spacing token, which unintentionally affected other pages like settings. The author now freezes token and theme files by default for agent-driven UI work, allowing edits only to named component paths. Token changes require an explicit unlock, such as a human prompt or a separate pull request. When a design needs a new token, the agent is instructed to stop and propose the change in writing rather than editing the shared scale. The approach is paired with PR template checks, CI warnings, and review guidelines to keep token changes separate from feature work.
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