Design system creation and audit. Create mode generates a new design system (colors, typography, components, layout patterns). Audit mode reviews an existing design for consistency and accessibility.
Create or audit a design system for the current project. Produces a DESIGN.md as the source of truth, plus framework-specific token files.
Check $ARGUMENTS and the project state:
create is specified, or no design artifacts exist (no DESIGN.md, no design tokens, no theme config): create modeaudit is specified, or DESIGN.md or design tokens already exist: audit modeAskUserQuestionAlso detect the project's UI framework by reading the codebase:
tailwind.config.js/ts, @tailwind directives in CSS.swift files with Color(, Font.system(StyleSheet.createreact-native.tres theme files, theme_override_ in .tscnAsk the user (use AskUserQuestion with all unknowns in a single multi-part question):
| Field | Required | Notes |
|---|---|---|
| Product type | Yes | Web app, mobile app, game, CLI tool, library docs, etc. |
| Target audience | Yes | Developers, consumers, enterprise, gamers, etc. |
| Brand personality | Yes | 3-5 keywords (e.g., "minimal, warm, professional") |
| Existing brand assets | No | Logo, colors, fonts already chosen |
| Competitors or inspiration | No | Links or names for aesthetic research |
Only ask about fields you can't infer from context. If the user said "a dark-themed developer tool", you already know the audience and personality — don't ask again.
If competitors or inspiration URLs are provided, use WebSearch and WebFetch to research their visual language.
Launch two agents in parallel:
subagent_type: "Technical Artist")Tell it to generate visual foundations for the project. Scope the agent to UI design, NOT game engine pipelines. It should produce:
subagent_type: "Software Architect")Tell it to generate structural design patterns for the project. It should produce:
color.primary.500, spacing.4, font.heading.lg)Compile the results into a DESIGN.md at the project root. Structure:
# Design System
> Brief description of the design direction and personality.
## Colors
### Brand
| Token | Light | Dark | Usage |
|-------|-------|------|-------|
| primary.500 | #3B82F6 | #60A5FA | Primary actions, links |
| ... | ... | ... | ... |
### Semantic
| Token | Light | Dark | Usage |
| ... | ... | ... | ... |
### Neutrals
| Step | Light | Dark |
| ... | ... | ... |
## Typography
| Token | Font | Size | Weight | Line Height |
|-------|------|------|--------|-------------|
| heading.xl | Inter | 30px | 700 | 1.2 |
| ... | ... | ... | ... | ... |
## Spacing
Base unit: 4px
| Token | Value |
|-------|-------|
| 1 | 4px |
| 2 | 8px |
| ... | ... |
## Components
Brief inventory of components with their purpose and state variations.
## Layout
Grid system, breakpoints, page templates.
## Accessibility
Minimum contrast ratios, focus states, motion preferences.
Based on the detected UI framework, also generate token files:
| Framework | Output file | Format |
|---|---|---|
| Tailwind CSS | tailwind.config.js theme extension | JS object extending theme.extend |
| CSS/SCSS | design-tokens.css | CSS custom properties (:root { --color-primary: ... }) |
| SwiftUI | DesignTokens.swift | Color and Font extensions |
| React Native | theme.ts | TypeScript theme object |
| Godot | design_tokens.tres | Godot theme resource |
| CLI | colors.sh or colors.rs | ANSI color constants |
| None detected | design-tokens.json | Framework-agnostic JSON tokens |
═══════════════════════════════════════
Design — Complete (Create)
═══════════════════════════════════════
Done:
✓ Generated DESIGN.md
✓ Generated [framework] token file
Files:
• DESIGN.md — colors, typography, spacing, components, layout
• [token file path] — framework-specific tokens
Next:
1. Implement the component inventory
2. Run /design audit after implementation
═══════════════════════════════════════
Read all design-related files in the project:
DESIGN.md — the source of truthBuild an inventory of declared tokens (from DESIGN.md / token files) and used values (from actual code).
Launch all four agents in parallel (single message, multiple Agent tool calls):
subagent_type: "Technical Artist")Tell it to audit visual consistency (scoped to UI, NOT game pipelines):
subagent_type: "Software Architect")Tell it to audit structural consistency:
subagent_type: "Accessibility Auditor")Tell it to perform a comprehensive accessibility audit of the UI, focusing on areas the Technical Artist does not cover. The Technical Artist already handles contrast ratios — do not duplicate that work. This agent should focus on:
prefers-reduced-motion support, animation durations, auto-playing contentsubagent_type: "UX Researcher")Tell it to evaluate the design from a user research perspective:
Present findings grouped by severity:
For simple fixes (replacing a one-off hex value with the design token equivalent):
For structural issues (missing states, component consolidation):
Update DESIGN.md with any new patterns discovered during the audit.
═══════════════════════════════════════
Design — Complete (Audit)
═══════════════════════════════════════
Score: 87/100
Blockers: 1
✗ Text color #666 on #fff — contrast 3.9:1 (needs 4.5:1)
Suggestions: 4
• 3 one-off hex values could use design tokens
• Button component missing loading state
Token coverage:
• Colors: 14/16 used (2 unused)
• Typography: 8/8 used
• Spacing: 10/12 used (2 unused)
Next: fix 1 blocker, then /design audit to re-check
═══════════════════════════════════════