Why AI-generated UI drifts from design systems and how token discipline fixes it
A software developer discovered 127 raw color values in a UI codebase that bypassed the design system's named roles, all of which passed visual review but broke when dark mode was introduced. The core problem is that AI agents reliably use existing design tokens when available, but silently invent plausible-sounding new ones when the system has gaps, making fabricated tokens nearly impossible to catch by eye. The author argues that a truly closed design system must cause failures loudly when values fall outside defined roles, rather than allowing quiet drift that becomes untraceable over time. Token layers — base values, named roles, and product bindings — exist precisely so that theme changes require a simple switch rather than a full rebuild. The most practical audit, the developer suggests, is toggling dark mode, which immediately reveals whether values are bound to meaningful roles or just hardcoded appearances.
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