Getting Started
Turn your real design system into specs that AI coding agents can reliably follow. Works with CSS variables, JSON tokens, and DTCG format.
The Problem
AI agents are good at implementation, but weak at consistency. They commonly:
Pick 12px instead of your spacing token, or a plausible blue instead of your semantic link color
Understand a component API but not when and how to combine components
Drift between sessions — each conversation starts from scratch
Creates a stable, local, project-readable source of truth for agents
Installation
Run directly with npx or install globally.
npx design-system-ai-starter init .
Quick Start
Three commands to go from zero to AI-readable specs:
# 1. Scaffold the structure npx design-system-ai-starter init . # 2. Sync your real tokens npx design-system-ai-starter sync-tokens \ --input ./tokens.css --target . # 3. Verify everything is in place npx design-system-ai-starter doctor .
Who This Is For
With existing tokens or theme files that agents should respect
Cursor, Claude Code, Copilot — any agent that writes UI code
That want AI to stop inventing colors, spacing, and component behavior
CLI Commands
init
Scaffolds the AI-readable structure into an existing project.
npx design-system-ai-starter init .
sync-tokens
Reads your real token source and updates markdown specs.
npx design-system-ai-starter sync-tokens \ --input ./tokens.css --target .
doctor
Checks if all AI-readable files exist and are complete.
npx design-system-ai-starter doctor .
Supported Inputs
Before / After
You already have tokens. This tool creates the agent-readable layer on top.
Before
After
CSS Token Example
Input file with CSS custom properties:
:root {
--color-primary: #3b82f6;
--color-secondary: #6366f1;
--color-text: #0a0a0a;
--color-bg: #fafafa;
--color-muted: #737373;
--spacing-xs: 4px;
--spacing-sm: 8px;
--spacing-md: 16px;
--spacing-lg: 24px;
--spacing-xl: 32px;
--spacing-2xl: 48px;
--font-size-sm: 0.875rem;
--font-size-base: 1rem;
--font-size-lg: 1.25rem;
--font-size-xl: 1.5rem;
--font-size-2xl: 2rem;
--font-size-display: 3rem;
}Run sync-tokens → get structured markdown with tables, categories, and agent-readable format.
JSON Token Example
DTCG-format token file:
{
"color": {
"primary": {
"$value": "#3b82f6",
"$type": "color"
},
"bg": {
"$value": "#fafafa",
"$type": "color"
}
},
"spacing": {
"sm": {
"$value": "8px",
"$type": "dimension"
},
"md": {
"$value": "16px",
"$type": "dimension"
}
}
}Output Structure
What each generated file contains:
Pipeline
Pairs with figma-to-design-md for a full Figma-to-AI pipeline: