Design system architecture covering design token specification (W3C standard), component library patterns, theming architecture, multi-brand systems, governance models, versioning strategy, and design-to-code integration.
From ux-ui-masterynpx claudepluginhub phazurlabs/ux-ui-mastery --plugin ux-ui-masteryThis skill uses the workspace's default tool permissions.
references/design-token-architecture.mdreferences/governance-scaling.mdreferences/maturity-model-multi-brand.mdreferences/token-specification-guide.mdDesigns and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Enables AI agents to execute x402 payments with per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents pay for APIs, services, or other agents.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
"A design system is not a project. It is a product serving products." — Nathan Curtis
A design system is the single source of truth for how a product family looks, behaves, and communicates. It exists to multiply design and development efficiency while ensuring consistency across teams, platforms, and time. The system must be opinionated enough to ensure coherence yet flexible enough to serve diverse product needs.
Tier 1: Global/Primitive Tokens (Raw Values) Define the complete value palette — all available options.
{
"color": {
"blue": {
"50": { "$value": "#eff6ff" },
"100": { "$value": "#dbeafe" },
"500": { "$value": "#3b82f6" },
"900": { "$value": "#1e3a5a" }
},
"neutral": {
"0": { "$value": "#ffffff" },
"50": { "$value": "#fafafa" },
"900": { "$value": "#171717" }
}
},
"spacing": {
"1": { "$value": "4px" },
"2": { "$value": "8px" },
"4": { "$value": "16px" },
"8": { "$value": "32px" }
}
}
Tier 2: Semantic/Alias Tokens (Contextual Meaning) Map raw values to design intent — what the value means.
{
"color": {
"bg": {
"primary": { "$value": "{color.neutral.0}" },
"secondary": { "$value": "{color.neutral.50}" },
"inverse": { "$value": "{color.neutral.900}" }
},
"text": {
"primary": { "$value": "{color.neutral.900}" },
"secondary": { "$value": "{color.neutral.500}" },
"brand": { "$value": "{color.blue.500}" }
},
"action": {
"primary": { "$value": "{color.blue.500}" },
"primary-hover": { "$value": "{color.blue.600}" }
}
}
}
Tier 3: Component Tokens (Specific Application) Map semantic tokens to component properties — where the value is used.
{
"button": {
"primary": {
"bg": { "$value": "{color.action.primary}" },
"text": { "$value": "{color.neutral.0}" },
"hover-bg": { "$value": "{color.action.primary-hover}" },
"padding-x": { "$value": "{spacing.4}" },
"padding-y": { "$value": "{spacing.2}" },
"border-radius": { "$value": "{radius.md}" }
}
}
}
Follow the W3C Design Tokens Community Group specification:
$value for token values$type to specify value type (color, dimension, fontFamily, fontWeight, duration, cubicBezier, shadow)$description for documentation{} syntax for references/aliases.tokens.json| Category | Examples | Type |
|---|---|---|
| Color | Brand, semantic, surface, text, border | color |
| Spacing | Padding, margin, gap | dimension |
| Typography | Font family, size, weight, line height, letter spacing | mixed |
| Border Radius | Corner rounding per component type | dimension |
| Elevation/Shadow | Box shadow definitions per level | shadow |
| Duration | Animation timing | duration |
| Easing | Animation curves | cubicBezier |
| Sizing | Icon, avatar, touch target sizes | dimension |
| Opacity | Disabled state, overlay, hover | number |
| Z-index | Layering order | number |
Every component has a defined structure:
Component
├── Props/API (inputs and configuration)
├── Variants (visual and behavioral variations)
├── States (default, hover, active, focused, disabled, loading, error)
├── Slots/Children (composition points for custom content)
├── Tokens (design token bindings)
├── Accessibility (ARIA, keyboard, screen reader behavior)
└── Documentation (usage guidelines, do/don't examples)
Level 1 — Defined: Designed in Figma, documented in guidelines Level 2 — Implemented: Coded in component library, props API defined Level 3 — Tested: Unit tests, visual regression tests, accessibility tests pass Level 4 — Documented: Usage guidelines, API docs, examples, do/don't Level 5 — Governed: Change process established, versioning, deprecation path
size, variant, disabled, className)variant="primary" | "secondary" | "ghost" not isPrimary, isSecondary<Card><CardHeader /><CardBody /></Card> not <Card header={} body={} />any types in public APIas prop for semantic HTML flexibility (<Button as="a" href="..." />){
"theme": {
"light": {
"color.bg.primary": "#ffffff",
"color.bg.secondary": "#f5f5f5",
"color.text.primary": "#171717",
"color.text.secondary": "#737373",
"color.action.primary": "#3b82f6"
},
"dark": {
"color.bg.primary": "#171717",
"color.bg.secondary": "#262626",
"color.text.primary": "#f5f5f5",
"color.text.secondary": "#a3a3a3",
"color.action.primary": "#60a5fa"
}
}
}
prefers-color-scheme)For organizations with multiple brands sharing a system:
Centralized: Core team owns and builds all components
Federated: Product teams contribute with core team review
Hybrid (recommended): Core team owns primitives and governance; product teams contribute domain-specific patterns
ui-visual-design-systemaccessibility-inclusive-designinteraction-motion-designmobile-ux-designThe v3.0 upgrade introduces references that extend design system architecture into Figma MCP pipelines, maturity modeling, and modern CSS integration.
Figma MCP Design-to-Code Pipeline
See figma-design-tool-workflows/references/figma-mcp-ai-flywheel.md for the Figma Model Context Protocol (MCP) server integration that enables AI-driven design-to-code workflows. This reference covers the MCP-powered flywheel where AI agents read Figma components, extract design tokens, generate production code, and validate output against the source design — creating a continuous synchronization loop between design and development that supersedes manual handoff processes.
Design System Maturity Model and Multi-Brand Token Architecture
See references/maturity-model-multi-brand.md for the comprehensive 5-level design system maturity model (from Ad Hoc through Optimized), multi-brand token architecture patterns for organizations operating multiple product brands from a shared foundation, and the W3C Design Tokens 2025.10 $extensions specification. The $extensions property enables vendor-specific metadata (Figma constraints, platform overrides, deprecation flags) within standard token files, which is critical for tooling interoperability in mature multi-brand systems. This reference expands significantly on the Multi-Brand Architecture and Component Maturity Model sections above.
CSS @layer Integration with Token Architecture
See component-patterns-code/references/css-modern-patterns.md for modern CSS @layer usage in design system token architecture. Cascade layers (@layer reset, tokens, components, utilities, overrides) provide deterministic specificity management for design systems at scale — eliminating the specificity wars that plague large component libraries. This reference covers how design tokens map to CSS custom properties within a layered cascade, enabling clean component-level theming without !important hacks or excessive nesting.