AI: Design Tokens and Agent Instructions
Token System + Instruction File.
Turned my hand-built Dodge & Cox spec into a four-tier token system using Claude Code and the Figma MCP, then wrote an instruction file that teaches AI to build with it correctly.
Role
Designer (self-directed exercise)
Scope
Color, type and spacing tokens for the D&C Design Kit with Desktop, Tablet and Mobile modes, 20 text styles, and an instruction file tested on the Contact component
Key Contributions
Original spec and decisions · Token structure · Reviewing AI output · Agent instructions
Constraints
Old styles deprecated, not deleted · Spacing kept as guides on existing components · Original components untouched
Built by hand: the colors, type scale, and usage rules every token traces back to.
Claude Code asked five questions before building the type system. I set the mobile H5 size, the button case and the serif scaling, and chose to deprecate old styles rather than delete them.
Raw values feed primitives, primitives feed semantic tokens, and semantic tokens feed components. 20 text styles switch size by Desktop, Tablet and Mobile mode.
Linking the nested secondary button connected all 25 Contact borders. I kept the new spacing tokens as guides rather than restructuring components before deciding how to apply them.
I wrote an instruction file covering which tokens to use, what never to edit, layout by viewport, and accessibility, so any AI tool builds this component correctly by default.
Following the file, Claude Code built 30 variants without touching my originals, with every color and spacing value on tokens.
Team
Solo, using Claude Code with the Figma MCP