design
Purpose
Design system reasoning layer. Converts a product description into a concrete design system — style, color direction, typography pairing, platform conventions, and an explicit anti-pattern list for this domain. Writes .rune/design-system.md as the persistent design contract that all UI-generating skills read before producing code. Prevents AI-generated UI from defaulting to generic patterns ("purple accent, card grids, centered everything") that signal "not designed by a human."
Triggers
/rune design— manual invocation when starting a new UI project- Called by
cook(L1): frontend task detected, no.rune/design-system.mdexists - Called by
review(L2): AI anti-pattern detected — recommended to run design skill - Called by
perf(L2): Lighthouse Accessibility BLOCK — design foundation may be missing
Calls (outbound)
scout(L2): detect existing design tokens, component library, platform targetsasset-creator(L3): generate base visual assets (logo, OG image) from design systembrowser-pilot(L3): render the surface and inspect it before claiming any visual property holds (Step 5.4)review(L2): accessibility violations found → flag for fix in next code review
Called By (inbound)
cook(L1): before any frontend code generationscaffold(L1): design system for new projectbrainstorm(L2): when selected approach has UI/UX implicationsba(L2): when requirements include UI/UX componentsreview(L2): when AI anti-pattern detected in diffperf(L2): when Lighthouse Accessibility score blocks- User:
/rune designdirect invocation
Output Files
.rune/
└── design-system.md # Design contract for all UI-generating skills
Executable Steps
Step 0 — Load Design Reference
Load the design knowledge base before reasoning:
- Check for user-level override:
~/.claude/docs/design-dna.md
- If exists →
Readit. This is the primary reference (user's curated taste).
- If no user override →
Readthe baseline:skills/design/DESIGN-REFERENCE.md(shipped with Rune) - The loaded reference provides: font pairings, chart selection, component architecture, color principles, UX checklist, interaction patterns, anti-pattern signatures
- Apply reference knowledge throughout Steps 3-5 (domain reasoning, token generation, checklist)
- When the domain involves any UI motion (transitions, animations, gestures, springs, micro-interactions) → also
Readskills/design/MOTION-CRAFT.md. It is the canonical motion authority: the should-it-animate frequency gate, easing/duration budgets (including peak-slope curve selection for large travel, and velocity continuity across keyframe joins), physicality (neverscale(0), origin-aware popovers), spring physics, gesture handoff, motion performance, the role→strategy reduced-motion framework, SVG-specific mechanics (user units,pathLength, SVGO), and a reverse-lookup vocabulary. Cite its exact values in the design-system motion section; never approximate curves or durations. When MOTION-CRAFT.md and DESIGN-REFERENCE.md disagree on a motion detail (easing, duration, interaction timing), MOTION-CRAFT.md wins — it is the deeper, motion-specific source; DESIGN-REFERENCE.md's Animation Timing / Interaction Patterns tables are the general baseline.
Advisory motion-audit mode: When asked to "improve the animations" / "make this feel better" / "what could be animated here", operate read-only — survey the motion surface against MOTION-CRAFT.md, report frequency-gated findings (and deliberately rejected candidates), and hand precise recipes to
cook/fix. Suggesting motion everywhere is worse than useless; expect to reject most candidates.
Why two layers: The baseline ships "good enough" universal design knowledge. Users who care about aesthetics create their own
design-dna.mdwith curated palettes, font pairings, and style preferences. The design skill works well with either — it just works _better_ with a curated reference.
External Data Source
Design intelligence data from UI/UX Pro Max (MIT, 42.8k★).
Located at references/ui-pro-max-data/ — 161 palettes, 84 styles, 73 font pairings, 161 reasoning rules, 99 UX guidelines.
When references/ui-pro-max-data/ is available:
- Step 2: query
styles.csvfor domain-matched visual styles (expands from 10 → 84) - Step 3: query
ui-reasoning.csvfor industry-specific design rules (161 rules) - Step 3: query
colors.csvfor palette alternatives (expands from 10 → 161) - Step 6 (Anti-AI): cross-check proposed style against reasoning DB — if flagged as "AI-generic", suggest 3 alternatives
Step 1 — Discover
Invoke scout to detect:
- Platform target:
web|ios(SwiftUI) |android(Compose) |react-native|multi-platform - Existing design tokens: check for
tokens.json,design-system/,theme.ts,tailwind.config.*,variables.css - Component library in use: shadcn/ui | Radix | MUI | Ant Design | custom | none
- Framework: Next.js | Vite+React | SvelteKit | Vue | SwiftUI | Jetpack Compose | other
If .rune/design-system.md already exists: Read it, check Last Updated date. If < 30 days old, ask user whether to refresh or keep. Do NOT silently overwrite.
Step 2 — Classify Product Domain
From the user's task description + codebase context, classify product type:
| Category | Examples |
|----------|---------|
| Trading/Fintech | trading dashboard, portfolio tracker, payment app, crypto wallet |
| SaaS Dashboard | admin panel, analytics, CRM, project management |
| Landing/Marketing | landing page, product site, marketing page, waitlist |
| Healthcare | patient portal, medical dashboard, health tracker |
| E-commerce | product catalog, cart, checkout, marketplace |
| Developer Tools | IDE plugin, CLI dashboard, API explorer, devtool |
| Creative/Portfolio | portfolio, design showcase, art gallery, agency site |
| Social/Community | social feed, forum, messaging, community platform |
| Mobile Consumer | iOS/Android consumer app — entertainment, productivity, lifestyle |
| AI-Native | AI assistant interface, chatbot, model explorer |
If domain is unclear: ask one clarifying question — "Is this closer to X or Y?"
Step 2.5 — Mood-to-Constraint Mapping
After classifying domain, ask ONE question: "What should users feel when they use this?"
Accept a single mood keyword (or infer from context if obvious). Map mood to concrete design constraints:
| Mood | Color Temp | Typography Weight | Whitespace | Animation | Shadow |
|------|-----------|-------------------|------------|-----------|--------|
| Impressed | Cool (blue-slate) | Heavy display (700-800) | Generous (xl-3xl) | Dramatic reveals (0.8-1.2s ease-out) | Deep, layered |
| Excited | Warm (amber-orange) | Bold contrasts (400 vs 800) | Tight-medium (sm-lg) | Energetic springs (0.4-0.6s spring) | Elevation lifts |
| Calm | Neutral-warm (stone-sage) | Light-medium (300-500) | Very generous (2xl-3xl) | Slow fades (0.6-0.8s ease-out-quad) | Soft, minimal |
| Confident | Cool-neutral (zinc-slate) | Medium-heavy (500-700) | Structured (md-xl) | Precise slides (0.3-0.5s ease) | Crisp, defined |
| Playful | Saturated (multi-hue) | Round + bold (600-700) | Medium, irregular (md-lg) | Bouncy springs (0.4-0.6s spring, overshoot) | Hard/comic (3-5px offset) |
| Techy | Cold (gray-cyan) | Mono-heavy, crisp (400-600) | Dense, grid-aligned (sm-md) | Sharp snaps (0.15-0.3s ease-out) | Minimal or glow |
| Professional | Muted neutrals | System fonts, readable (400-500) | Balanced (md-lg) | Subtle (0.2-0.3s ease) | Standard elevation |
| Inspired | Rich-warm (gold-terracotta) | Editorial display (300-700 range) | Asymmetric, generous | Scroll-driven reveals (0.5-0.8s) | Dramatic, directional |
Mapping rules:
- Mood constraints OVERRIDE generic domain defaults where they conflict (mood is user intent, domain is convention)
- If mood contradicts domain safety (e.g., "Playful" + Healthcare), WARN user: "Playful tone may reduce trust in medical context — proceed?"
- Write selected mood + resolved constraints to
.rune/design-system.mdunder## Moodsection - Downstream skills (
animation-patterns,palette-picker,type-system) read mood constraints from design-system.md
Skip if: User says "no preference" or "just follow domain defaults" — proceed to Step 3 with domain-only reasoning.
Step 2.7 — Tweaks, Not Menus (Default Style Pattern)
Picking from a 10-option style menu is how AI UI gets generic. Instead:
- Propose ONE opinionated default based on domain + mood (from Step 2.5). Describe it in 2-3 lines — style, palette direction, typography pairing.
- Ask for tweaks, not choices. The question is "Any tweaks to this, or ship it?" — not "Which of these do you prefer?"
- Accept natural-language adjustments. Map phrases → design system edits:
- "more professional" → heavier type weights, reduce saturation, tighter spacing
- "less corporate" → looser weights, brighter accent, more whitespace
- "darker" → swap base for darker neutral, raise contrast on elevated surfaces
- "more playful" → add subtle animation, soften corners, bolder accent
- "more trust" → cooler palette (slate/blue), heavier headers, smaller radius
- If the user asks for a menu, provide max 3 options — but mark one as the recommended default. Never present a neutral list of 5+ equivalent styles.
Why: Every menu option dilutes commitment. A single confident default gets committed, tweaked, and shipped. A menu gets deliberated, A/B'd, and abandoned. This is the Tweaks Default pattern from Anthropic's design system guidance — the AI commits first, humans steer second.
Step 2.9 — Universal Anti-AI Rules (apply to ALL domains)
These rules apply regardless of domain, mood, or platform. Every generated design system MUST comply.
Enforcement: rune:review v1.1.0+ reads .rune/design-system.md § Scale Minimums and flags violations of Rules 1–3 below as MEDIUM/HIGH findings. Rules 4–6 (Measurable Constraints, No-Pure-No-Lorem, CJK-First) are design-time guidance — added in design v0.6.0, review enforcement forthcoming. Design defines, review enforces — this is the contract.