Design Tokens Are a Lie. Here’s What AI Actually Needs.

You’ve seen it happen. You ask an AI to generate a confirmation dialog for deleting a user’s account. It gives you a friendly blue button. Solid fill. No warning. No second confirmation. Just a cheerful “Confirm” in corporate blue — one click away from irreversible destruction.

AI doesn’t have a color problem. It has a meaning problem.

And every design system in the world is trying to fix it with the wrong tool.

The Design Token Trap

Here’s what happened. A few years ago, the design world collectively decided that Design Tokens were the answer to everything. Extract your colors, fonts, spacing into variables. Put them in JSON. Sync between Figma and code. Boom — consistency achieved.

And yes, for a world without AI, that was genuinely useful. Design Tokens are a brilliant visual dictionary. They ensure your red in Figma is the same red in production.

But then AI entered the chat. And suddenly, the gap became glaring.

Because here’s the thing nobody told you: Design Tokens tell a machine WHAT to render. They don’t tell it WHY.

Your token says color: #EF4444. The AI reads that and thinks: “Got it. Use red.” But it has no idea that this particular red means “fatal error, context may be lost, user needs to export their history.” It just knows: red.

So when the AI generates an interface, it applies red like paint — aesthetically consistent, semantically clueless. A fatal system crash and a minor form validation error get the same red treatment. A destructive “Delete Account” button gets the same blue as a “Save Draft” button. Because to the AI, they’re both just… buttons.

This isn’t a bug. It’s a fundamental architecture problem.

The Semantic Layer Nobody Built

The real issue is what I call semantic drift — the gap between what a designer means and what a machine understands. Design Tokens close the visual gap. Nobody closed the meaning gap.

Until now.

The solution isn’t another Design Token framework. It’s an entirely separate layer: semantic tokens — machine-readable meaning identifiers that sit between human design intent and machine execution.

Here’s the difference, made concrete:

A Design Token says: danger: #EF4444
A semantic token says: status.critical → pulse.red.urgent → alert.octagon

The first tells you what color to use. The second tells you what the color means, what motion should accompany it, what icon represents it, and — critically — what the user should understand when they see it.

Design Tokens are a visual dictionary. Semantic tokens are a meaning dictionary. You need both. But if you only have one, the AI revolution leaves your design system behind.

Four Namespaces That Actually Matter

After building and breaking semantic systems across multiple projects, I’ve landed on four namespaces that capture the vast majority of design meaning:

1. status.* — How bad is it?

Not “what color is the error” but “what is the consequence level?” Fatal, transient, retryable, degraded. The same status.critical token can map to different hex values in different design systems — Tailwind red, Ant Design red, whatever. The token doesn’t care. It only cares that the meaning is preserved.

2. phase.* — What’s the AI doing right now?

Ever used Perplexity and seen “Searching… Reading… Wrapping up…” and had no idea whether the AI was still gathering sources or already writing its answer? That’s a phase problem. A phase.retrieval token tells the system: show the user you’re gathering data, cite your sources, make it clear this isn’t hallucination. A phase.synthesis token says: now you’re composing, show a different state.

3. boundary.* — Where are the user’s rights?

When Claude says “I can’t help with that” versus “Claude has ended this chat” — both feel like rejection to the user. But one means “let’s keep talking” and the other means “this conversation is dead.” A boundary.soft_reject token keeps the session alive. A boundary.force_terminate token starts a new one. The user deserves to know which is which.

4. action.* — What happens when they click?

This is the one that would have saved our blue Delete Account button. An action.destructive token tells the system: this is irreversible. Red outline. Second confirmation. Type-to-verify. No exceptions.

Without these four namespaces, your AI is generating interfaces with the semantic awareness of a toddler given a crayon.

Context Changes Everything

But here’s where it gets nuanced — and where most attempts at semantic systems fail. The same component means different things in different contexts.

An Alert component in an observational domain — a system outage notification — means the user passively receives information. No input required. Clear exit path. Consequences stated plainly.

That same Alert in a transactional domain — a form validation error — means the user needs to act. Feedback required. Success and failure must be explicit.

And in a conversational domain — a chat interruption — it means context must be preserved. You can’t just say “error” and wipe the conversation. The user needs to know their history survived.

Without semantic domains, your system applies the same constraints everywhere. Which means the constraints are wrong everywhere.

The Red Lines That Can’t Bend

Now comes the part that makes this actually work in production: immutable boundaries.

Semantic tokens define what should happen. Immutable boundaries define what must never happen. They’re not suggestions. They’re hard blocks.

Examples:

  • A fatal error and a retryable error can never share the same visual treatment. Block.
  • An error message can never use vague language like “Something went wrong.” Block.
  • A destructive action can never execute without a second confirmation. Block.

When the AI hits one of these boundaries during generation, it doesn’t get a warning. It gets stopped. Returned with a modification request. The boundary is non-negotiable because these are the moments where semantic drift becomes genuinely dangerous — where a wrong color or a missing confirmation doesn’t just look bad, it causes harm.

Semantic tokens are recommendations. Immutable boundaries are law. You need both because AI will push past suggestions every single time.

What This Actually Looks Like

Here’s the before and after. This is the shift that matters.

Before — your YAML contract for an error state:

error:
  color: "#EF4444"
  bg: "solid"
  icon: "warning.svg"
  text: "Something went wrong"
  button: "Retry"

The frontend dev reads this and knows: use red. The AI reads this and knows: generate red. Nobody knows what the red means. And when you update your design system’s red, you’re hunting through every YAML file to change hex codes.

After — the same contract with semantic tokens:

semantic_tokens:
  error_severity:
    fatal:
      visual_mapping:
        color_token: "status.critical"
        motion_token: "pulse.red.urgent"
        icon_token: "alert.octagon"
      user_action: ["Refresh Page", "Export History"]
      llm_constraints:
        - "Must explicitly inform user that conversation context may be lost"
    transient:
      visual_mapping:
        color_token: "status.neutral"
        motion_token: "spinner"
        icon_token: "loader"
      user_action: ["Wait for auto-recovery"]
      llm_constraints:
        - "No red background — avoid emotional overload"

The frontend reads this and knows: fatal maps to status.critical — check the mapping table for the actual hex. The AI reads this and knows: fatal requires a red pulse, an octagon alert icon, a refresh button, and explicit language about context loss. When the design system updates its red, you change one mapping. Every contract stays untouched.

The meaning is portable. The visual is swappable. The intent survives translation.

The Real Shift

Here’s what this all comes down to. For decades, design systems were built for humans. Designers read documentation, internalized patterns, applied judgment. The system worked because humans understand context instinctively.

AI doesn’t.

AI doesn’t know that a delete button should feel different from a save button. It doesn’t know that a fatal error deserves more visual urgency than a network hiccup. It doesn’t know that ending a conversation is different from declining a request. It knows hex codes and component names and nothing else — unless you build the semantic layer that tells it.

Design Tokens were the answer to a question that’s no longer sufficient: “How do we keep our visuals consistent?”

The question now is: “How do we make our design intent machine-executable without losing its nuance?”

Semantic tokens are the answer. Not because they’re more technically elegant — but because they’re the only way your design decisions survive the translation from human intent to machine output without getting flattened into meaninglessness.

Your design system is about to face a choice. You can keep polishing your Design Tokens and watch AI generate interfaces that are visually perfect and semantically dangerous. Or you can build the semantic layer that makes your design intent unambiguous, machine-readable, and impossible to ignore.

The AI doesn’t need your colors. It needs your meaning. Build accordingly.

FAQ

Q: Isn't this just Design Tokens with extra steps?

A: No. Design Tokens map names to visual values (color, font, spacing). Semantic tokens map meaning to context-appropriate visual, motion, and behavioral responses. They're complementary layers — Design Tokens are the visual dictionary, semantic tokens are the meaning dictionary. Without the semantic layer, AI knows 'use red' but not 'red means fatal, add a pulse, show a refresh button, and warn about context loss.'

Q: Do I need to rebuild my entire design system to use this?

A: No. You keep your existing Design Tokens as the visual mapping layer. You add semantic tokens on top — they reference your Design Tokens by name rather than replacing them. When you update a hex value in your Design Token mapping, every semantic token automatically inherits the change. It's additive, not a rewrite.

Q: Won't AI models just get smart enough to infer semantic meaning without all this structure?

A: Unlikely to be reliable enough for production. Even frontier models confidently generate destructive actions with friendly styling because they optimize for visual plausibility, not semantic correctness. Semantic drift isn't a capability gap — it's an architecture gap. You need explicit, machine-readable constraints because 'the AI should just know better' is not a safety strategy.

📎 Source: View Source