Design systems4 min read
Turn your style guide into design tokens agents use by name
Hex codes copied from a PDF drift. Named tokens do not. Here is how to set up a design system that agents use by name.

A style guide usually lists colors as hex codes and fonts as names. People read it once and copy values by hand. Agents do the same, and every copy is a chance to drift: a blue two shades off, a button radius that does not match the cards. Design tokens fix that by giving every value a name. When an agent writes var(--color-semantic-primary) instead of a hex code, the value can only come from one place.
This guide takes a style guide and turns it into a design system in brandmetis that agents use by name.
Tokens, briefly
A token is a named value. color/primary/500 is a color, spacing/md is a distance, and radius/md is a corner. brandmetis names tokens with / for groups, and each token has a CSS name built from it:
color/primary/500 --color-primary-500
color/semantic/primary --color-semantic-primary
spacing/md --spacing-md
radius/md --radius-mdTwo kinds are worth telling apart.
- Scale tokens hold raw values.
color/primary/50tocolor/primary/950is your primary color from lightest to darkest. - Semantic tokens describe a job.
color/semantic/primaryis the color for main actions, andcolor/semantic/backgroundis the page background. Each points at a scale token, with a value for light and for dark.
Agents should use semantic tokens almost everywhere. If you later change the brand color, the jobs stay the same, and every screen built with them follows.
Step 1: pull the values out of the guide
Before you open brandmetis, list what the guide actually specifies:
- Brand colors with hex codes. Note which one is the primary.
- The heading font and the body font.
- How round corners are, if the guide shows buttons or cards.
- Whether cards and menus have shadows.
- Any written rules about the logo, photos and layout.
If the guide has more than 8 brand colors, pick the 8 that carry the brand. Grays and status colors, such as red for errors, come with the color system, so you do not need to add them.
Step 2: run the design step
Open the brand's Design page and choose Edit setup, or reach the step during brand setup. It has four pages.
- Logo: pick the primary logo.
- Colors: add each brand color with a name and a hex. The first is the primary. Name colors for what they are, such as Primary or Sand, not Blue 2. The name becomes part of the token name.
- Type and shape: set the heading and body fonts, then pick corners (sharp, soft, round or pill) and shadows (none, subtle, medium or strong) that match the guide.
- Notes for designers: write the logo rules, imagery and layout notes in short sentences.
Choose Confirm design. brandmetis builds the variables: a full scale for each brand color, a theme with light and dark modes, text styles from display to caption, spacing steps, corner sizes and shadows.
Redoing the design step rebuilds the variables from your answers. Make fine edits in the Variables table after the step, not before.
Step 3: check and adjust the variables
Open Variables on the design page. Variables sit in collections, such as Primitives, Theme and Spacing. The Theme collection has a Light and a Dark column.
Check a few things against the guide:
color/primary/500is your exact primary hex.color/semantic/primarypoints at the shade you want for buttons, in each mode.font/family/headingandfont/family/bodymatch the guide.
To change a semantic color, edit its value in a mode and point it at another variable. To add a token the guide defines but setup does not, choose New variable, name it with / for groups, and add a description.
Descriptions matter more than they look. An agent searching for "card border" finds a token whose description says it is for card borders. If your codebase already uses different names, say so in the description, for example Matches --brand-accent in the web app.
Step 4: tell agents how to read it
Agents read the design system with get_design_system. It comes in three formats:
json, the default, for an agent that reasons about values. Each token has its name, CSS name, collection, values per mode, and description.cssfor a stylesheet: custom properties under:root, and each other mode under adata-themeselector.dtcgfor tools that read W3C design tokens.
A semantic color in the JSON format looks like this. The values are an example.
{
"name": "color/semantic/primary",
"category": "color",
"type": "color",
"collection": "Theme",
"cssVariable": "--color-semantic-primary",
"values": { "Light": "#1d4ed8", "Dark": "#3b82f6" },
"aliases": { "Light": "color/primary/600", "Dark": "color/primary/500" },
"description": "Main actions."
}For one value, agents call search_design_system. "brand blue" or "radius small" works, words can be out of order, and a small typo still matches. A prompt that keeps an agent honest:
Use the North design system from brandmetis. Use only its CSS variables for color, spacing and radius. If a value you need is missing, say so instead of inventing one.Step 5: keep it the one source
- Confirm the design system. Agents read only a confirmed one, on a published brand.
- Once confirmed, it replaces the older color and type fields for agents, so there is one answer.
- Change values in brandmetis, not in each project. Agents pick up the change on their next read.
- Keep the style guide PDF in Assets for people, and treat the design system as the source.
A checklist
- Brand colors named for what they are, primary first.
- Heading and body fonts match the guide.
- Corners and shadows match real components.
- Semantic colors checked in light and dark.
- Descriptions on any token an agent might search for.
- Design confirmed and brand published.
For the reference, see Design system. To use the tokens in an editor, read Set up Cursor so generated UI matches your design system.


