# Tokens-only Guardrail

> A rule that keeps AI tools building UI from your design tokens and nothing else.

- Drop: Rule (common)
- Season 1 – The AI-ready Design System
- Status: Tested (used on real work)
- Published: 2026-08-28
- URL: https://www.mlynarz.com/grist/tokens-only-guardrail
- Curated by: Dawid Młynarz

**Hint:** Add it to the rules file of any repo with a design system, and the AI builds from your tokens and asks you before it adds a new value.

## Why

I want control over the output. I don't want stray styles flying around the codebase.

So I give it a guardrail, a rule it reads before writing any code. Without one, agents make styles up on the spot or hard-code everything. With it, colours, spacing and sizes all come from the system. When something really does need a custom style, the agent asks me first, and if I agree we add a token.

## The drop

````markdown
When writing UI, use the design system's tokens for every colour, spacing, size, radius, shadow and font. Never write a raw value (hex, px, rem) if a token exists. If no token fits, stop and tell me which value you need instead of inventing one.
````
