Design Tokens as AI Guardrails: Keeping AI-Generated Screens On-Brand A developer discovered that design tokens serve as effective AI guardrails for keeping AI-generated screens on-brand. By constraining AI coding agents like Cursor, Claude Code, or Lovable to a closed set of named token values instead of an infinite color palette, the agents produce consistently on-brand, theme-aware output without requiring explicit instructions. The coding agents got good at layout. Ask Cursor, Claude Code, or Lovable for a pricing card and you get a recognisable, mostly-correct row of features with a button on the bottom — in about three seconds. The thing they're not good at is the part underneath: which blue, how much spacing, which grey for borders, what radius pairs with what shadow. They pick from an infinite palette and they pick badly. A constrained token set is the cheapest, most reliable guardrail you can put in front of that. The surprise isn't that tokens help. The surprise is how aggressively they help the agent — not the human. Here's what an unconstrained agent produces for "build me a pricing page" in a fresh project, most of the time: