@rune-kit/rune 2.10.0 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +8 -6
- package/commands/rune.md +168 -168
- package/contexts/dev.md +34 -34
- package/contexts/research.md +43 -43
- package/contexts/review.md +55 -55
- package/extensions/ai-ml/PACK.md +88 -88
- package/extensions/ai-ml/skills/ai-agents.md +172 -172
- package/extensions/ai-ml/skills/code-sandbox.md +187 -187
- package/extensions/ai-ml/skills/deep-research.md +146 -146
- package/extensions/ai-ml/skills/embedding-search.md +66 -66
- package/extensions/ai-ml/skills/fine-tuning-guide.md +74 -74
- package/extensions/ai-ml/skills/llm-architect.md +125 -125
- package/extensions/ai-ml/skills/llm-integration.md +64 -64
- package/extensions/ai-ml/skills/prompt-patterns.md +72 -72
- package/extensions/ai-ml/skills/rag-patterns.md +66 -66
- package/extensions/ai-ml/skills/web-extraction.md +114 -114
- package/extensions/analytics/PACK.md +92 -92
- package/extensions/analytics/skills/ab-testing.md +72 -72
- package/extensions/analytics/skills/dashboard-patterns.md +83 -83
- package/extensions/analytics/skills/data-validation.md +68 -68
- package/extensions/analytics/skills/funnel-analysis.md +81 -81
- package/extensions/analytics/skills/sql-patterns.md +57 -57
- package/extensions/analytics/skills/statistical-analysis.md +79 -79
- package/extensions/analytics/skills/tracking-setup.md +71 -71
- package/extensions/backend/PACK.md +104 -104
- package/extensions/backend/skills/api-patterns.md +84 -84
- package/extensions/backend/skills/async-pipeline.md +193 -193
- package/extensions/backend/skills/auth-patterns.md +97 -97
- package/extensions/backend/skills/background-jobs.md +133 -133
- package/extensions/backend/skills/caching-patterns.md +108 -108
- package/extensions/backend/skills/cli-generation.md +133 -133
- package/extensions/backend/skills/database-patterns.md +87 -87
- package/extensions/backend/skills/middleware-patterns.md +104 -104
- package/extensions/chrome-ext/PACK.md +93 -93
- package/extensions/chrome-ext/skills/cws-preflight.md +143 -143
- package/extensions/chrome-ext/skills/cws-publish.md +104 -104
- package/extensions/chrome-ext/skills/ext-ai-integration.md +251 -251
- package/extensions/chrome-ext/skills/ext-messaging.md +139 -139
- package/extensions/chrome-ext/skills/ext-storage.md +133 -133
- package/extensions/chrome-ext/skills/mv3-scaffold.md +164 -164
- package/extensions/content/PACK.md +96 -96
- package/extensions/content/skills/blog-patterns.md +88 -88
- package/extensions/content/skills/cms-integration.md +131 -131
- package/extensions/content/skills/content-scoring.md +107 -107
- package/extensions/content/skills/i18n.md +83 -83
- package/extensions/content/skills/mdx-authoring.md +137 -137
- package/extensions/content/skills/reference.md +1014 -1014
- package/extensions/content/skills/seo-patterns.md +67 -67
- package/extensions/content/skills/video-repurpose.md +153 -153
- package/extensions/devops/PACK.md +101 -101
- package/extensions/devops/skills/chaos-testing.md +67 -67
- package/extensions/devops/skills/ci-cd.md +75 -75
- package/extensions/devops/skills/docker.md +58 -58
- package/extensions/devops/skills/edge-serverless.md +163 -163
- package/extensions/devops/skills/infra-as-code.md +158 -158
- package/extensions/devops/skills/kubernetes.md +110 -110
- package/extensions/devops/skills/monitoring.md +57 -57
- package/extensions/devops/skills/server-setup.md +64 -64
- package/extensions/devops/skills/ssl-domain.md +42 -42
- package/extensions/ecommerce/PACK.md +116 -116
- package/extensions/ecommerce/skills/cart-system.md +79 -79
- package/extensions/ecommerce/skills/inventory-mgmt.md +102 -102
- package/extensions/ecommerce/skills/order-management.md +126 -126
- package/extensions/ecommerce/skills/payment-integration.md +472 -472
- package/extensions/ecommerce/skills/shopify-dev.md +69 -69
- package/extensions/ecommerce/skills/subscription-billing.md +93 -93
- package/extensions/ecommerce/skills/tax-compliance.md +117 -117
- package/extensions/gamedev/PACK.md +142 -142
- package/extensions/gamedev/skills/asset-pipeline.md +74 -74
- package/extensions/gamedev/skills/audio-system.md +129 -129
- package/extensions/gamedev/skills/camera-system.md +87 -87
- package/extensions/gamedev/skills/ecs.md +98 -98
- package/extensions/gamedev/skills/game-loops.md +72 -72
- package/extensions/gamedev/skills/input-system.md +199 -199
- package/extensions/gamedev/skills/multiplayer.md +180 -180
- package/extensions/gamedev/skills/particles.md +105 -105
- package/extensions/gamedev/skills/physics-engine.md +89 -89
- package/extensions/gamedev/skills/scene-management.md +146 -146
- package/extensions/gamedev/skills/threejs-patterns.md +90 -90
- package/extensions/gamedev/skills/webgl.md +71 -71
- package/extensions/mobile/PACK.md +106 -106
- package/extensions/mobile/skills/app-store-connect.md +152 -152
- package/extensions/mobile/skills/app-store-prep.md +66 -66
- package/extensions/mobile/skills/deep-linking.md +109 -109
- package/extensions/mobile/skills/flutter.md +60 -60
- package/extensions/mobile/skills/ios-build-pipeline.md +142 -142
- package/extensions/mobile/skills/native-bridge.md +66 -66
- package/extensions/mobile/skills/ota-updates.md +97 -97
- package/extensions/mobile/skills/push-notifications.md +111 -111
- package/extensions/mobile/skills/react-native.md +82 -82
- package/extensions/saas/PACK.md +116 -116
- package/extensions/saas/skills/billing-integration.md +200 -200
- package/extensions/saas/skills/feature-flags.md +130 -130
- package/extensions/saas/skills/multi-tenant.md +103 -103
- package/extensions/saas/skills/onboarding-flow.md +139 -139
- package/extensions/saas/skills/subscription-flow.md +95 -95
- package/extensions/saas/skills/team-management.md +144 -144
- package/extensions/security/PACK.md +99 -99
- package/extensions/security/skills/api-security.md +140 -140
- package/extensions/security/skills/compliance.md +68 -68
- package/extensions/security/skills/owasp-audit.md +64 -64
- package/extensions/security/skills/pentest-patterns.md +77 -77
- package/extensions/security/skills/secret-mgmt.md +65 -65
- package/extensions/security/skills/supply-chain.md +65 -65
- package/extensions/trading/PACK.md +80 -80
- package/extensions/trading/skills/chart-components.md +55 -55
- package/extensions/trading/skills/experiment-loop.md +125 -125
- package/extensions/trading/skills/fintech-patterns.md +47 -47
- package/extensions/trading/skills/indicator-library.md +58 -58
- package/extensions/trading/skills/quant-analysis.md +111 -111
- package/extensions/trading/skills/realtime-data.md +58 -58
- package/extensions/trading/skills/trade-logic.md +104 -104
- package/extensions/ui/PACK.md +130 -130
- package/extensions/ui/skills/a11y-audit.md +91 -91
- package/extensions/ui/skills/animation-patterns.md +127 -127
- package/extensions/ui/skills/component-patterns.md +100 -100
- package/extensions/ui/skills/design-decision.md +108 -108
- package/extensions/ui/skills/design-system.md +68 -68
- package/extensions/ui/skills/landing-patterns.md +155 -155
- package/extensions/ui/skills/palette-picker.md +173 -173
- package/extensions/ui/skills/react-health.md +90 -90
- package/extensions/ui/skills/type-system.md +125 -125
- package/extensions/ui/skills/web-vitals.md +153 -153
- package/extensions/zalo/PACK.md +145 -145
- package/extensions/zalo/skills/zalo-oa-mcp.md +317 -317
- package/extensions/zalo/skills/zalo-oa-messaging.md +429 -429
- package/extensions/zalo/skills/zalo-oa-setup.md +236 -236
- package/extensions/zalo/skills/zalo-oa-webhook.md +189 -189
- package/extensions/zalo/skills/zalo-personal-messaging.md +194 -194
- package/extensions/zalo/skills/zalo-personal-setup.md +153 -153
- package/extensions/zalo/skills/zalo-rate-guard.md +219 -219
- package/hooks/auto-format/index.cjs +48 -48
- package/hooks/hooks.json +111 -111
- package/hooks/post-session-reflect/index.cjs +189 -189
- package/hooks/pre-compact/index.cjs +95 -95
- package/hooks/run-hook.cmd +1 -1
- package/hooks/secrets-scan/index.cjs +100 -100
- package/hooks/session-start/index.cjs +71 -71
- package/hooks/typecheck/index.cjs +65 -65
- package/package.json +63 -63
- package/references/ui-pro-max-data/LICENSE-UI-PRO-MAX +21 -21
- package/references/ui-pro-max-data/charts.csv +26 -26
- package/references/ui-pro-max-data/colors.csv +161 -161
- package/references/ui-pro-max-data/styles.csv +68 -68
- package/references/ui-pro-max-data/typography.csv +74 -74
- package/references/ui-pro-max-data/ui-reasoning.csv +162 -162
- package/references/ui-pro-max-data/ux-guidelines.csv +99 -99
- package/skills/adversary/SKILL.md +283 -283
- package/skills/asset-creator/SKILL.md +157 -157
- package/skills/audit/SKILL.md +147 -2
- package/skills/autopsy/SKILL.md +335 -335
- package/skills/brainstorm/SKILL.md +342 -342
- package/skills/browser-pilot/SKILL.md +168 -168
- package/skills/constraint-check/SKILL.md +165 -165
- package/skills/context-engine/SKILL.md +404 -404
- package/skills/cook/SKILL.md +917 -863
- package/skills/db/SKILL.md +273 -273
- package/skills/debug/SKILL.md +465 -465
- package/skills/dependency-doctor/SKILL.md +265 -235
- package/skills/deploy/SKILL.md +274 -231
- package/skills/design/DESIGN-REFERENCE.md +365 -365
- package/skills/design/SKILL.md +589 -589
- package/skills/doc-processor/SKILL.md +254 -254
- package/skills/docs/SKILL.md +374 -374
- package/skills/docs-seeker/SKILL.md +177 -177
- package/skills/fix/SKILL.md +330 -330
- package/skills/git/SKILL.md +339 -339
- package/skills/hallucination-guard/SKILL.md +219 -219
- package/skills/incident/SKILL.md +254 -253
- package/skills/integrity-check/SKILL.md +169 -169
- package/skills/journal/SKILL.md +240 -240
- package/skills/launch/SKILL.md +344 -344
- package/skills/logic-guardian/SKILL.md +251 -251
- package/skills/marketing/SKILL.md +290 -289
- package/skills/mcp-builder/SKILL.md +425 -425
- package/skills/neural-memory/SKILL.md +362 -362
- package/skills/onboard/SKILL.md +404 -403
- package/skills/perf/SKILL.md +346 -346
- package/skills/plan/SKILL.md +433 -428
- package/skills/preflight/SKILL.md +415 -415
- package/skills/problem-solver/SKILL.md +380 -284
- package/skills/rescue/SKILL.md +474 -474
- package/skills/retro/SKILL.md +3 -1
- package/skills/review/SKILL.md +612 -588
- package/skills/review-intake/SKILL.md +249 -249
- package/skills/safeguard/SKILL.md +200 -200
- package/skills/sast/SKILL.md +190 -190
- package/skills/scaffold/SKILL.md +328 -287
- package/skills/scope-guard/SKILL.md +180 -180
- package/skills/scout/SKILL.md +263 -263
- package/skills/sentinel/SKILL.md +382 -381
- package/skills/sentinel-env/SKILL.md +254 -254
- package/skills/sequential-thinking/SKILL.md +234 -234
- package/skills/session-bridge/SKILL.md +543 -543
- package/skills/skill-forge/SKILL.md +581 -581
- package/skills/skill-router/SKILL.md +3 -0
- package/skills/surgeon/SKILL.md +215 -215
- package/skills/team/SKILL.md +556 -537
- package/skills/test/SKILL.md +614 -614
- package/skills/trend-scout/SKILL.md +145 -145
- package/skills/verification/SKILL.md +326 -326
- package/skills/video-creator/SKILL.md +201 -201
- package/skills/watchdog/SKILL.md +168 -168
- package/skills/worktree/SKILL.md +140 -140
package/skills/design/SKILL.md
CHANGED
|
@@ -1,589 +1,589 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: design
|
|
3
|
-
description: Design system reasoning. Maps product domain to style, palette, typography, and platform-specific patterns. Generates .rune/design-system.md as the shared design contract for all UI-generating skills.
|
|
4
|
-
metadata:
|
|
5
|
-
author: runedev
|
|
6
|
-
version: "0.4.0"
|
|
7
|
-
layer: L2
|
|
8
|
-
model: sonnet
|
|
9
|
-
group: creation
|
|
10
|
-
tools: "Read, Write, Edit, Glob, Grep"
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
# design
|
|
14
|
-
|
|
15
|
-
## Purpose
|
|
16
|
-
|
|
17
|
-
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."
|
|
18
|
-
|
|
19
|
-
## Triggers
|
|
20
|
-
|
|
21
|
-
- `/rune design` — manual invocation when starting a new UI project
|
|
22
|
-
- Called by `cook` (L1): frontend task detected, no `.rune/design-system.md` exists
|
|
23
|
-
- Called by `review` (L2): AI anti-pattern detected — recommended to run design skill
|
|
24
|
-
- Called by `perf` (L2): Lighthouse Accessibility BLOCK — design foundation may be missing
|
|
25
|
-
|
|
26
|
-
## Calls (outbound)
|
|
27
|
-
|
|
28
|
-
- `scout` (L2): detect existing design tokens, component library, platform targets
|
|
29
|
-
- `asset-creator` (L3): generate base visual assets (logo, OG image) from design system
|
|
30
|
-
- `review` (L2): accessibility violations found → flag for fix in next code review
|
|
31
|
-
|
|
32
|
-
## Called By (inbound)
|
|
33
|
-
|
|
34
|
-
- `cook` (L1): before any frontend code generation
|
|
35
|
-
- `brainstorm` (L2): when selected approach has UI/UX implications
|
|
36
|
-
- `ba` (L2): when requirements include UI/UX components
|
|
37
|
-
- `review` (L2): when AI anti-pattern detected in diff
|
|
38
|
-
- `perf` (L2): when Lighthouse Accessibility score blocks
|
|
39
|
-
- User: `/rune design` direct invocation
|
|
40
|
-
|
|
41
|
-
## Output Files
|
|
42
|
-
|
|
43
|
-
```
|
|
44
|
-
.rune/
|
|
45
|
-
└── design-system.md # Design contract for all UI-generating skills
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## Executable Steps
|
|
49
|
-
|
|
50
|
-
### Step 0 — Load Design Reference
|
|
51
|
-
|
|
52
|
-
Load the design knowledge base before reasoning:
|
|
53
|
-
|
|
54
|
-
1. Check for user-level override: `~/.claude/docs/design-dna.md`
|
|
55
|
-
- If exists → `Read` it. This is the primary reference (user's curated taste).
|
|
56
|
-
2. If no user override → `Read` the baseline: `skills/design/DESIGN-REFERENCE.md` (shipped with Rune)
|
|
57
|
-
3. The loaded reference provides: font pairings, chart selection, component architecture, color principles, UX checklist, interaction patterns, anti-pattern signatures
|
|
58
|
-
4. Apply reference knowledge throughout Steps 3-5 (domain reasoning, token generation, checklist)
|
|
59
|
-
|
|
60
|
-
> **Why two layers**: The baseline ships "good enough" universal design knowledge. Users who care about aesthetics create their own `design-dna.md` with curated palettes, font pairings, and style preferences. The design skill works well with either — it just works _better_ with a curated reference.
|
|
61
|
-
|
|
62
|
-
### External Data Source
|
|
63
|
-
|
|
64
|
-
Design intelligence data from [UI/UX Pro Max](https://github.com/nextlevelbuilder/ui-ux-pro-max-skill) (MIT, 42.8k★).
|
|
65
|
-
Located at `references/ui-pro-max-data/` — 161 palettes, 84 styles, 73 font pairings, 161 reasoning rules, 99 UX guidelines.
|
|
66
|
-
|
|
67
|
-
When `references/ui-pro-max-data/` is available:
|
|
68
|
-
- Step 2: query `styles.csv` for domain-matched visual styles (expands from 10 → 84)
|
|
69
|
-
- Step 3: query `ui-reasoning.csv` for industry-specific design rules (161 rules)
|
|
70
|
-
- Step 3: query `colors.csv` for palette alternatives (expands from 10 → 161)
|
|
71
|
-
- Step 6 (Anti-AI): cross-check proposed style against reasoning DB — if flagged as "AI-generic", suggest 3 alternatives
|
|
72
|
-
|
|
73
|
-
### Step 1 — Discover
|
|
74
|
-
|
|
75
|
-
Invoke `scout` to detect:
|
|
76
|
-
- **Platform target**: `web` | `ios` (SwiftUI) | `android` (Compose) | `react-native` | `multi-platform`
|
|
77
|
-
- **Existing design tokens**: check for `tokens.json`, `design-system/`, `theme.ts`, `tailwind.config.*`, `variables.css`
|
|
78
|
-
- **Component library in use**: shadcn/ui | Radix | MUI | Ant Design | custom | none
|
|
79
|
-
- **Framework**: Next.js | Vite+React | SvelteKit | Vue | SwiftUI | Jetpack Compose | other
|
|
80
|
-
|
|
81
|
-
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.
|
|
82
|
-
|
|
83
|
-
### Step 2 — Classify Product Domain
|
|
84
|
-
|
|
85
|
-
From the user's task description + codebase context, classify product type:
|
|
86
|
-
|
|
87
|
-
| Category | Examples |
|
|
88
|
-
|----------|---------|
|
|
89
|
-
| **Trading/Fintech** | trading dashboard, portfolio tracker, payment app, crypto wallet |
|
|
90
|
-
| **SaaS Dashboard** | admin panel, analytics, CRM, project management |
|
|
91
|
-
| **Landing/Marketing** | landing page, product site, marketing page, waitlist |
|
|
92
|
-
| **Healthcare** | patient portal, medical dashboard, health tracker |
|
|
93
|
-
| **E-commerce** | product catalog, cart, checkout, marketplace |
|
|
94
|
-
| **Developer Tools** | IDE plugin, CLI dashboard, API explorer, devtool |
|
|
95
|
-
| **Creative/Portfolio** | portfolio, design showcase, art gallery, agency site |
|
|
96
|
-
| **Social/Community** | social feed, forum, messaging, community platform |
|
|
97
|
-
| **Mobile Consumer** | iOS/Android consumer app — entertainment, productivity, lifestyle |
|
|
98
|
-
| **AI-Native** | AI assistant interface, chatbot, model explorer |
|
|
99
|
-
|
|
100
|
-
If domain is unclear: ask one clarifying question — "Is this closer to X or Y?"
|
|
101
|
-
|
|
102
|
-
### Step 2.5 — Mood-to-Constraint Mapping
|
|
103
|
-
|
|
104
|
-
After classifying domain, ask ONE question: **"What should users feel when they use this?"**
|
|
105
|
-
|
|
106
|
-
Accept a single mood keyword (or infer from context if obvious). Map mood to concrete design constraints:
|
|
107
|
-
|
|
108
|
-
| Mood | Color Temp | Typography Weight | Whitespace | Animation | Shadow |
|
|
109
|
-
|------|-----------|-------------------|------------|-----------|--------|
|
|
110
|
-
| **Impressed** | Cool (blue-slate) | Heavy display (700-800) | Generous (xl-3xl) | Dramatic reveals (0.8-1.2s ease-out) | Deep, layered |
|
|
111
|
-
| **Excited** | Warm (amber-orange) | Bold contrasts (400 vs 800) | Tight-medium (sm-lg) | Energetic springs (0.4-0.6s spring) | Elevation lifts |
|
|
112
|
-
| **Calm** | Neutral-warm (stone-sage) | Light-medium (300-500) | Very generous (2xl-3xl) | Slow fades (0.6-0.8s ease-out-quad) | Soft, minimal |
|
|
113
|
-
| **Confident** | Cool-neutral (zinc-slate) | Medium-heavy (500-700) | Structured (md-xl) | Precise slides (0.3-0.5s ease) | Crisp, defined |
|
|
114
|
-
| **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) |
|
|
115
|
-
| **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 |
|
|
116
|
-
| **Professional** | Muted neutrals | System fonts, readable (400-500) | Balanced (md-lg) | Subtle (0.2-0.3s ease) | Standard elevation |
|
|
117
|
-
| **Inspired** | Rich-warm (gold-terracotta) | Editorial display (300-700 range) | Asymmetric, generous | Scroll-driven reveals (0.5-0.8s) | Dramatic, directional |
|
|
118
|
-
|
|
119
|
-
**Mapping rules:**
|
|
120
|
-
1. Mood constraints OVERRIDE generic domain defaults where they conflict (mood is user intent, domain is convention)
|
|
121
|
-
2. If mood contradicts domain safety (e.g., "Playful" + Healthcare), WARN user: "Playful tone may reduce trust in medical context — proceed?"
|
|
122
|
-
3. Write selected mood + resolved constraints to `.rune/design-system.md` under `## Mood` section
|
|
123
|
-
4. Downstream skills (`animation-patterns`, `palette-picker`, `type-system`) read mood constraints from design-system.md
|
|
124
|
-
|
|
125
|
-
**Skip if**: User says "no preference" or "just follow domain defaults" — proceed to Step 3 with domain-only reasoning.
|
|
126
|
-
|
|
127
|
-
### Step 3 — Apply Domain Reasoning Rules
|
|
128
|
-
|
|
129
|
-
Map domain to design system parameters:
|
|
130
|
-
|
|
131
|
-
**Trading/Fintech:**
|
|
132
|
-
```
|
|
133
|
-
Style: Data-Dense Dark
|
|
134
|
-
Palette: Neutral dark (#0c1419 bg), semantic colors ONLY for profit/loss
|
|
135
|
-
Profit: #00d084 (green) | Loss: #ff6b6b (red)
|
|
136
|
-
Accent: #2196f3 (data highlight) — NOT purple
|
|
137
|
-
Typography: JetBrains Mono 700 for ALL numeric values (prices, P&L, %)
|
|
138
|
-
Inter 400 for labels, Inter 600 for headings
|
|
139
|
-
Effects: Subtle grid lines, real-time pulse animations on live data
|
|
140
|
-
Anti-patterns:
|
|
141
|
-
❌ Gradient washes on data tables (obscures precision)
|
|
142
|
-
❌ Accent colors that conflict with profit/loss signal colors
|
|
143
|
-
❌ Decorative motion (distracts from live data)
|
|
144
|
-
❌ Dark-on-dark text for secondary labels (contrast required)
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
**SaaS Dashboard:**
|
|
148
|
-
```
|
|
149
|
-
Style: Minimalism or Flat Design
|
|
150
|
-
Palette: Professional neutrals, single brand accent (NOT purple unless brand)
|
|
151
|
-
Light: #ffffff bg, #f8fafc surface | Dark: #0f172a bg, #1e293b surface
|
|
152
|
-
Accent: brand-defined — default #6366f1 is acceptable here as a SaaS pattern
|
|
153
|
-
Typography: Inter 400/500/600 throughout — consistent, readable, data-friendly
|
|
154
|
-
Space Grotesk 700 for hero/display only
|
|
155
|
-
Effects: Skeleton loaders, subtle hover states, clean data tables
|
|
156
|
-
Anti-patterns:
|
|
157
|
-
❌ Card-grid monotony (every section same layout)
|
|
158
|
-
❌ Animations that delay data visibility
|
|
159
|
-
❌ Missing empty/error states in data tables
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
**Landing/Marketing:**
|
|
163
|
-
```
|
|
164
|
-
Style: Glassmorphism (current era) or Aurora/Mesh
|
|
165
|
-
Palette: Brand-expressive — this is the ONE context where bold palette is correct
|
|
166
|
-
High-contrast CTAs (must pass 4.5:1 contrast on all backgrounds)
|
|
167
|
-
Typography: Space Grotesk 700 for hero display (48–72px)
|
|
168
|
-
Inter 400/500 for body — max line-width 720px
|
|
169
|
-
Effects: Animated mesh gradients, floating glass cards, scroll-triggered reveals
|
|
170
|
-
Anti-patterns:
|
|
171
|
-
❌ Generic hero: "big text + diagonal purple-to-blue gradient" — AI signature
|
|
172
|
-
❌ Centered layout throughout (breaks directional reading flow)
|
|
173
|
-
❌ Missing scroll animations on a static page
|
|
174
|
-
❌ CTAs that don't stand out from body copy
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
**Healthcare:**
|
|
178
|
-
```
|
|
179
|
-
Style: Trust & Authority (clean, clinical, accessible)
|
|
180
|
-
Palette: Clean blue/white/green — NO red except clinical alerts
|
|
181
|
-
#f0f9ff bg, #1e40af accent, #059669 success, #dc2626 CRITICAL_ONLY
|
|
182
|
-
Typography: Inter throughout — never decorative fonts
|
|
183
|
-
Body minimum 16px for readability by older/impaired users
|
|
184
|
-
Effects: Minimal — subtle hover, no motion by default
|
|
185
|
-
Anti-patterns:
|
|
186
|
-
❌ Dark mode as default (patients/elderly → light mode)
|
|
187
|
-
❌ Gamification patterns (inappropriate for medical context)
|
|
188
|
-
❌ Red for informational messages (reserved for clinical alerts)
|
|
189
|
-
❌ Dense data layouts without clear visual hierarchy
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
**E-commerce:**
|
|
193
|
-
```
|
|
194
|
-
Style: Conversion-Optimized (Warm Minimalism)
|
|
195
|
-
Palette: Warm neutrals, high-contrast CTAs
|
|
196
|
-
Urgency signals: #ef4444 for "low stock", #f59e0b for "sale"
|
|
197
|
-
Typography: Bold product names (Space Grotesk 600+), readable descriptions (Inter 400)
|
|
198
|
-
Effects: Hover zoom on product images, add-to-cart pulse, trust badges
|
|
199
|
-
Anti-patterns:
|
|
200
|
-
❌ Cluttered above-fold (too many competing CTAs)
|
|
201
|
-
❌ Add to cart button that doesn't stand out
|
|
202
|
-
❌ Missing product image zoom/gallery
|
|
203
|
-
❌ Checkout flow with more than 3 steps visible at once
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
**Developer Tools:**
|
|
207
|
-
```
|
|
208
|
-
Style: Minimalism or Neubrutalism
|
|
209
|
-
Palette: Dark mode default — #0d1117 bg (GitHub-scale), #161b22 surface
|
|
210
|
-
Syntax highlighting colors as accent palette
|
|
211
|
-
No heavy gradients — developers recognize and distrust decorative UI
|
|
212
|
-
Typography: JetBrains Mono for code/commands, Inter for prose
|
|
213
|
-
Effects: Keyboard shortcuts visible, dense information layout OK
|
|
214
|
-
Anti-patterns:
|
|
215
|
-
❌ Decorative animations that delay tool response
|
|
216
|
-
❌ Non-monospace font for code blocks or command output
|
|
217
|
-
❌ Light mode only (developer tools default to dark)
|
|
218
|
-
❌ Visual noise around core functionality
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
**Creative/Portfolio:**
|
|
222
|
-
```
|
|
223
|
-
Style: Editorial Grid or Glassmorphism or Brutalism (brand-specific)
|
|
224
|
-
Palette: MUST be distinctive — generic palettes are disqualifying
|
|
225
|
-
This is the one category where custom/unusual palettes are required
|
|
226
|
-
Typography: Custom or display font as headline (NOT Inter alone)
|
|
227
|
-
Font pairing must have contrast: Display + neutral body
|
|
228
|
-
Effects: Curated — hover reveals, scroll-based reveals, cursor effects
|
|
229
|
-
Anti-patterns:
|
|
230
|
-
❌ Generic card grid with equal padding everywhere
|
|
231
|
-
❌ Inter-only typography (zero personality)
|
|
232
|
-
❌ Stock photo backgrounds
|
|
233
|
-
❌ Navigation that looks like every other portfolio
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
**AI-Native:**
|
|
237
|
-
```
|
|
238
|
-
Style: Minimal Functional or Glassmorphism
|
|
239
|
-
Palette: Purple/violet IS acceptable here (it is the AI-native signal)
|
|
240
|
-
#7c3aed accent, dark neutral bg, subtle gradients
|
|
241
|
-
Typography: Inter throughout — clarity over personality
|
|
242
|
-
Effects: Typing indicators, streaming text, thinking states
|
|
243
|
-
Anti-patterns:
|
|
244
|
-
❌ Purple on non-AI product (exports the AI signal to inappropriate contexts)
|
|
245
|
-
❌ Static empty states — AI interfaces must show "thinking" states
|
|
246
|
-
❌ Missing latency UX (skeleton during generation, cancel button)
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
### Step 4 — Platform-Specific Overrides
|
|
250
|
-
|
|
251
|
-
Apply platform conventions on top of domain rules:
|
|
252
|
-
|
|
253
|
-
**iOS (SwiftUI / iOS 26+):**
|
|
254
|
-
```
|
|
255
|
-
Visual language: Liquid Glass — translucent surfaces with backdrop blur
|
|
256
|
-
background: UIBlurEffect or .regularMaterial
|
|
257
|
-
border: subtle 1px rgba(white, 0.15) — NOT solid
|
|
258
|
-
roundness: aggressive corner radius (16–24px on cards, full on buttons)
|
|
259
|
-
Icons: SF Symbols ONLY — not Heroicons, not Lucide
|
|
260
|
-
Typography: SF Pro family — Dynamic Type scaling is mandatory
|
|
261
|
-
Safe areas: Content must respect safeAreaInsets on all edges
|
|
262
|
-
Anti-patterns:
|
|
263
|
-
❌ Solid-background cards (deprecated in iOS 26 Liquid Glass era)
|
|
264
|
-
❌ Custom icon fonts (SF Symbols is the platform contract)
|
|
265
|
-
❌ Fixed font sizes (Dynamic Type must be supported)
|
|
266
|
-
```
|
|
267
|
-
|
|
268
|
-
**Android (Jetpack Compose / Material 3 Expressive):**
|
|
269
|
-
```
|
|
270
|
-
Color: MaterialTheme.colorScheme — dynamic color derived from wallpaper
|
|
271
|
-
NEVER hardcode hex colors in Compose — use semantic tokens
|
|
272
|
-
Shape: Extreme corner expressiveness — use shape variation as affordance signal
|
|
273
|
-
Small interactive: RoundedCornerShape(4dp)
|
|
274
|
-
Cards/surfaces: RoundedCornerShape(16dp)
|
|
275
|
-
FABs: CircleShape
|
|
276
|
-
Motion: Spring physics — tween() is almost never the right choice
|
|
277
|
-
spring(dampingRatio = Spring.DampingRatioMediumBouncy)
|
|
278
|
-
Anti-patterns:
|
|
279
|
-
❌ Hardcoded hex colors (breaks dynamic color contract)
|
|
280
|
-
❌ Linear easing (Material 3 Expressive uses spring physics)
|
|
281
|
-
❌ Small corner radii (shape expressiveness is a key M3 Expressive principle)
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
**Web:**
|
|
285
|
-
- Apply domain rules from Step 3
|
|
286
|
-
- Default: dark mode support required (`prefers-color-scheme: dark`)
|
|
287
|
-
- Responsive: must design for 375px, 768px, 1024px, 1440px breakpoints
|
|
288
|
-
- Accessibility: WCAG 2.2 AA minimum
|
|
289
|
-
|
|
290
|
-
### Step 5 — Generate Design System File
|
|
291
|
-
|
|
292
|
-
Use `Write` to create `.rune/design-system.md`:
|
|
293
|
-
|
|
294
|
-
```markdown
|
|
295
|
-
# Design System: [Project Name]
|
|
296
|
-
Last Updated: [YYYY-MM-DD]
|
|
297
|
-
Platform: [web | ios | android | multi-platform]
|
|
298
|
-
Domain: [product category]
|
|
299
|
-
Style: [chosen style]
|
|
300
|
-
|
|
301
|
-
## Color Tokens
|
|
302
|
-
|
|
303
|
-
### Primitive (raw values)
|
|
304
|
-
--color-[name]-[scale]: [hex]
|
|
305
|
-
|
|
306
|
-
### Semantic (meaning-mapped)
|
|
307
|
-
--bg-base: [value] — page background
|
|
308
|
-
--bg-surface: [value] — card/panel background
|
|
309
|
-
--bg-elevated: [value] — modal/dropdown background
|
|
310
|
-
--text-primary: [value] — primary text
|
|
311
|
-
--text-secondary: [value] — secondary/muted text
|
|
312
|
-
--border: [value] — default border
|
|
313
|
-
--accent: [value] — primary action/brand
|
|
314
|
-
--success: [value] — positive/profit signal
|
|
315
|
-
--danger: [value] — error/loss signal
|
|
316
|
-
--warning: [value] — caution signal
|
|
317
|
-
|
|
318
|
-
## Typography
|
|
319
|
-
|
|
320
|
-
| Role | Font | Weight | Size |
|
|
321
|
-
|------|------|--------|------|
|
|
322
|
-
| Display | [font] | [weight] | [px range] |
|
|
323
|
-
| H1 | [font] | [weight] | [px] |
|
|
324
|
-
| H2/H3 | [font] | [weight] | [px] |
|
|
325
|
-
| Body | [font] | [weight] | [px] |
|
|
326
|
-
| Mono/Numbers | [font] | [weight] | [px] |
|
|
327
|
-
|
|
328
|
-
Numbers rule: [monospace font] for ALL numeric values in this domain (prices, metrics, IDs)
|
|
329
|
-
|
|
330
|
-
## Spacing (8px base)
|
|
331
|
-
xs: 4px | sm: 8px | md: 16px | lg: 24px | xl: 32px | 2xl: 48px | 3xl: 64px
|
|
332
|
-
|
|
333
|
-
## Border Radius
|
|
334
|
-
sm: 6px | md: 8px | lg: 12px | xl: 16px | full: 9999px
|
|
335
|
-
|
|
336
|
-
## Effects
|
|
337
|
-
[signature effects for this style — gradients, shadows, blur, etc.]
|
|
338
|
-
|
|
339
|
-
## Anti-Patterns (MUST NOT generate these)
|
|
340
|
-
[domain-specific list from Step 3 + platform overrides]
|
|
341
|
-
- ❌ [anti-pattern 1] — [why it fails in this domain]
|
|
342
|
-
- ❌ [anti-pattern 2]
|
|
343
|
-
|
|
344
|
-
## Platform Notes
|
|
345
|
-
[platform-specific implementation requirements from Step 4]
|
|
346
|
-
|
|
347
|
-
## Component Library
|
|
348
|
-
[detected library or "custom"]
|
|
349
|
-
|
|
350
|
-
## Pre-Delivery Checklist
|
|
351
|
-
- [ ] Color contrast ≥ 4.5:1 for all text
|
|
352
|
-
- [ ] Focus-visible ring on ALL interactive elements (never outline-none alone)
|
|
353
|
-
- [ ] Touch targets ≥ 24×24px with 8px gap between targets
|
|
354
|
-
- [ ] All icon-only buttons have aria-label
|
|
355
|
-
- [ ] All inputs have associated <label> or aria-label
|
|
356
|
-
- [ ] Empty state, error state, loading state for all async data
|
|
357
|
-
- [ ] cursor-pointer on all clickable non-button elements
|
|
358
|
-
- [ ] prefers-reduced-motion respected for all animations
|
|
359
|
-
- [ ] Dark mode support (or explicit reasoning why not)
|
|
360
|
-
- [ ] Responsive tested at 375px / 768px / 1024px / 1440px
|
|
361
|
-
```
|
|
362
|
-
|
|
363
|
-
### Step 5.5 — UI Design Contract (UI-SPEC.md)
|
|
364
|
-
|
|
365
|
-
After generating the design system, lock key visual decisions in `.rune/ui-spec.md` — a binding contract that prevents design drift during implementation.
|
|
366
|
-
|
|
367
|
-
**Why**: design-system.md defines tokens (what's available). UI-SPEC locks decisions (what was chosen and WHY). Without a spec, each component re-decides layout, density, and hierarchy — causing visual inconsistency.
|
|
368
|
-
|
|
369
|
-
**Generate `.rune/ui-spec.md`:**
|
|
370
|
-
|
|
371
|
-
```markdown
|
|
372
|
-
# UI Specification: [Project Name]
|
|
373
|
-
Locked: [YYYY-MM-DD] | Mood: [selected mood]
|
|
374
|
-
|
|
375
|
-
## Layout Decisions
|
|
376
|
-
- Page max-width: [value]px
|
|
377
|
-
- Sidebar: [yes/no] — [width]px [fixed/collapsible]
|
|
378
|
-
- Content density: [compact/balanced/spacious]
|
|
379
|
-
- Card sizing: [uniform/varied] — if varied, specify hierarchy rules
|
|
380
|
-
|
|
381
|
-
## Visual Hierarchy Rules
|
|
382
|
-
- Primary action: [color] [size] [weight] — ONE per viewport
|
|
383
|
-
- Secondary action: [ghost/outline] style — max 2 per section
|
|
384
|
-
- Data emphasis: [monospace + bold] for numbers, [color accent] for status
|
|
385
|
-
- Section separation: [border/spacing/background] — pick ONE, be consistent
|
|
386
|
-
|
|
387
|
-
## Component Decisions
|
|
388
|
-
- Card style: [elevated/bordered/glass] — reasoning: [why]
|
|
389
|
-
- Table style: [striped/bordered/minimal] — reasoning: [why]
|
|
390
|
-
- Form layout: [stacked/inline/grid] — reasoning: [why]
|
|
391
|
-
- Navigation: [sidebar/topbar/tabs] — reasoning: [why]
|
|
392
|
-
|
|
393
|
-
## Locked Anti-Decisions (things we explicitly chose NOT to do)
|
|
394
|
-
- ❌ [rejected option] — because [reason]
|
|
395
|
-
```
|
|
396
|
-
|
|
397
|
-
<HARD-GATE>
|
|
398
|
-
UI-SPEC.md is a contract. Once written, changes require explicit user approval ("I want to change the card style"). Skills that generate UI (`cook`, `fix`, `scaffold`) MUST read UI-SPEC.md before producing components. Drift from spec = review finding.
|
|
399
|
-
</HARD-GATE>
|
|
400
|
-
|
|
401
|
-
### Step 6 — Accessibility Review
|
|
402
|
-
|
|
403
|
-
Run a focused accessibility audit on the design system and any existing UI code. This step ensures the design contract doesn't produce inaccessible outputs.
|
|
404
|
-
|
|
405
|
-
**Automated checks** (use Grep on codebase):
|
|
406
|
-
1. **Color contrast**: Verify all text/bg combinations in the design system meet WCAG 2.2 AA (4.5:1 normal text, 3:1 large text). Flag any semantic color pair that fails.
|
|
407
|
-
2. **Focus indicators**: Search for `outline-none`, `outline: none`, `focus:outline-none` without a replacement `focus-visible` ring. Every instance is a violation.
|
|
408
|
-
3. **Touch targets**: Search for buttons/links with explicit small sizing (`w-6 h-6`, `p-1` on interactive elements). Flag anything < 24x24px.
|
|
409
|
-
4. **Missing labels**: Search for `<input` without adjacent `<label` or `aria-label`. Search for icon-only buttons without `aria-label`.
|
|
410
|
-
5. **Semantic HTML**: Flag `<div onClick`, `<span onClick` (should be `<button>`). Flag missing `<nav>`, `<main>`, `<header>` landmarks.
|
|
411
|
-
6. **Motion safety**: Check for animations/transitions without `prefers-reduced-motion` media query or Tailwind `motion-reduce:` variant.
|
|
412
|
-
|
|
413
|
-
**Output**: Accessibility audit section in Design Report with pass/fail per check and specific file:line violations.
|
|
414
|
-
|
|
415
|
-
If violations found → add them to `.rune/design-system.md` Anti-Patterns section as concrete rules.
|
|
416
|
-
|
|
417
|
-
### Step 6.5 — 6-Pillar Visual Audit
|
|
418
|
-
|
|
419
|
-
Score the generated design system across 6 pillars. Each pillar scored 1-4 (1=Poor, 2=Fair, 3=Good, 4=Excellent). Minimum passing score: **18/24** (average 3.0).
|
|
420
|
-
|
|
421
|
-
| Pillar | Score 1 (Poor) | Score 2 (Fair) | Score 3 (Good) | Score 4 (Excellent) |
|
|
422
|
-
|--------|---------------|----------------|----------------|---------------------|
|
|
423
|
-
| **Copy** | Placeholder text, generic CTAs ("Submit"), no voice | Real copy but inconsistent tone | Consistent voice, domain-appropriate, clear CTAs | Personality-rich, scannable, microcopy for every state |
|
|
424
|
-
| **Visuals** | Stock photos, generic icons, no visual identity | Consistent icon set, basic imagery | Custom illustrations or curated photography, clear hierarchy | Distinctive visual language, icons tell stories, zero stock |
|
|
425
|
-
| **Color** | Default framework palette, no semantic meaning | Brand colors defined but inconsistent usage | Full semantic palette, dark mode, accessible contrast | Mood-aligned, colorblind-safe, context-adaptive (profit/loss/status) |
|
|
426
|
-
| **Typography** | Single font, no scale | Font pairing exists but inconsistent sizing | Clear hierarchy (display/heading/body/mono), numbers monospace | Mood-aligned pairing, fluid scaling, platform-native where needed |
|
|
427
|
-
| **Spacing** | Inconsistent gaps, cramped or too loose | Base unit defined but not consistently applied | 8px grid, consistent section/component/element spacing | Density variants (compact/default/spacious), rhythm feels intentional |
|
|
428
|
-
| **UX** | Missing states (empty/error/loading), no feedback | Basic states exist, some interactive feedback | All states covered, toast/loading/skeleton, focus management | Delightful micro-interactions, smart defaults, zero dead-ends |
|
|
429
|
-
|
|
430
|
-
**Audit output:**
|
|
431
|
-
|
|
432
|
-
```
|
|
433
|
-
### Visual Audit Score: [total]/24
|
|
434
|
-
|
|
435
|
-
| Pillar | Score | Notes |
|
|
436
|
-
|--------|-------|-------|
|
|
437
|
-
| Copy | 3 | Consistent voice, missing loading microcopy |
|
|
438
|
-
| Visuals | 2 | Using Phosphor icons (good), no custom illustration |
|
|
439
|
-
| Color | 4 | Full semantic palette, colorblind alternates defined |
|
|
440
|
-
| Typography | 3 | JetBrains Mono for numbers, Inter for prose — solid |
|
|
441
|
-
| Spacing | 3 | 8px grid applied, density variants not needed yet |
|
|
442
|
-
| UX | 3 | All states covered, micro-interactions in progress |
|
|
443
|
-
| **Total** | **18/24** | PASS — ship-ready with Copy improvements recommended |
|
|
444
|
-
```
|
|
445
|
-
|
|
446
|
-
**If score < 18**: Flag specific weak pillars in Design Report. Add improvement tasks to `.rune/design-system.md` under `## Improvement Backlog`.
|
|
447
|
-
|
|
448
|
-
**Registry safety check**: If an existing component library is in use (shadcn, MUI, etc.), verify the design system doesn't conflict with the library's token structure. Flag collisions.
|
|
449
|
-
|
|
450
|
-
### Step 7 — UX Writing Patterns
|
|
451
|
-
|
|
452
|
-
Generate microcopy guidelines specific to this product domain. UX writing is part of design — not an afterthought.
|
|
453
|
-
|
|
454
|
-
**Domain-specific microcopy rules:**
|
|
455
|
-
|
|
456
|
-
| Domain | Tone | Error Pattern | CTA Pattern | Empty State |
|
|
457
|
-
|--------|------|---------------|-------------|-------------|
|
|
458
|
-
| Trading/Fintech | Precise, neutral, no humor | "Order failed: insufficient margin ($X required)" | "Place Order", "Close Position" | "No open positions. Market opens in 2h 15m." |
|
|
459
|
-
| SaaS Dashboard | Professional, helpful | "Couldn't save changes. Try again or contact support." | "Get Started", "Upgrade Plan" | "No data yet. Connect your first integration." |
|
|
460
|
-
| E-commerce | Friendly, urgent-capable | "This item is no longer available. Here are similar items." | "Add to Cart", "Buy Now" | "Your cart is empty. Continue shopping?" |
|
|
461
|
-
| Healthcare | Calm, clinical, clear | "We couldn't verify your insurance. Please check your member ID." | "Schedule Visit", "View Results" | "No upcoming appointments." |
|
|
462
|
-
| Developer Tools | Direct, technical | "Build failed: missing dependency `@types/node`" | "Deploy", "Run Tests" | "No builds yet. Push to trigger CI." |
|
|
463
|
-
|
|
464
|
-
**Generate for this project:**
|
|
465
|
-
- Error message template: `[What happened] + [Why] + [What to do next]`
|
|
466
|
-
- Empty state template: `[What's missing] + [How to fill it]`
|
|
467
|
-
- Confirmation template: `[What will happen] + [Reversibility]`
|
|
468
|
-
- Loading text: context-appropriate (not just "Loading...")
|
|
469
|
-
- Button label rules: verb-first, specific action (not "Submit", "Click Here")
|
|
470
|
-
|
|
471
|
-
Add UX writing guidelines to `.rune/design-system.md` under a new `## UX Writing` section.
|
|
472
|
-
|
|
473
|
-
### Step 8 — Report
|
|
474
|
-
|
|
475
|
-
Emit design summary to calling skill:
|
|
476
|
-
|
|
477
|
-
```
|
|
478
|
-
## Design Report: [Project Name]
|
|
479
|
-
|
|
480
|
-
### Domain Classification
|
|
481
|
-
[product category] — [style chosen] — [platform]
|
|
482
|
-
|
|
483
|
-
### Design System Generated
|
|
484
|
-
.rune/design-system.md
|
|
485
|
-
|
|
486
|
-
### Key Decisions
|
|
487
|
-
- Accent: [color + reasoning — why this color for this domain]
|
|
488
|
-
- Typography: [pairing + reasoning]
|
|
489
|
-
- Style: [style name + why it fits this product]
|
|
490
|
-
|
|
491
|
-
### Anti-Patterns Registered (will be flagged by review)
|
|
492
|
-
- ❌ [n] domain-specific patterns
|
|
493
|
-
- ❌ [n] platform-specific patterns
|
|
494
|
-
|
|
495
|
-
### Pre-Delivery Checklist
|
|
496
|
-
[count] items to verify before shipping
|
|
497
|
-
```
|
|
498
|
-
|
|
499
|
-
## Output Format
|
|
500
|
-
|
|
501
|
-
```
|
|
502
|
-
## Design Report: TradingOS Dashboard
|
|
503
|
-
|
|
504
|
-
### Domain Classification
|
|
505
|
-
Trading/Fintech — Data-Dense Dark — Web
|
|
506
|
-
|
|
507
|
-
### Design System Generated
|
|
508
|
-
.rune/design-system.md
|
|
509
|
-
|
|
510
|
-
### Key Decisions
|
|
511
|
-
- Accent: #2196f3 (blue) — neutral data highlight; profit/loss colors (#00d084/#ff6b6b)
|
|
512
|
-
are reserved as semantic signals, not brand colors
|
|
513
|
-
- Typography: JetBrains Mono 700 for all numeric values (prices, P&L, %),
|
|
514
|
-
Inter 400/600 for prose and labels
|
|
515
|
-
- Style: Data-Dense Dark — users scan real-time data under time pressure;
|
|
516
|
-
decorative elements compete with data for attention
|
|
517
|
-
|
|
518
|
-
### Anti-Patterns Registered
|
|
519
|
-
- ❌ 4 domain-specific (gradient wash, conflicting accent colors, decorative motion, dark-on-dark)
|
|
520
|
-
- ❌ 1 platform-specific (fixed font sizes not applicable — web target)
|
|
521
|
-
|
|
522
|
-
### Pre-Delivery Checklist
|
|
523
|
-
12 items to verify before shipping
|
|
524
|
-
```
|
|
525
|
-
|
|
526
|
-
## Constraints
|
|
527
|
-
|
|
528
|
-
1. MUST classify domain before generating design system — never generate with unknown domain
|
|
529
|
-
2. MUST include anti-pattern list in every design system — a system without anti-patterns is incomplete
|
|
530
|
-
3. MUST NOT use purple/indigo as default accent unless domain is AI-Native or explicitly brand-purple
|
|
531
|
-
4. MUST write `.rune/design-system.md` — ephemeral design decisions evaporate; persistence is the point
|
|
532
|
-
5. MUST NOT overwrite existing design-system.md without user confirmation
|
|
533
|
-
6. MUST include platform-specific overrides when platform is iOS or Android
|
|
534
|
-
|
|
535
|
-
## Mesh Gates (L1/L2 only)
|
|
536
|
-
|
|
537
|
-
| Gate | Requires | If Missing |
|
|
538
|
-
|------|----------|------------|
|
|
539
|
-
| Domain Gate | Product domain classified before generating tokens | Ask clarifying question |
|
|
540
|
-
| Anti-Pattern Gate | Anti-pattern list derived from domain rules (not generic) | Domain-specific list required |
|
|
541
|
-
| Persistence Gate | .rune/design-system.md written before reporting done | Write file first |
|
|
542
|
-
| Platform Gate | Platform detected before generating tokens | Default to web, note assumption |
|
|
543
|
-
|
|
544
|
-
## Returns
|
|
545
|
-
|
|
546
|
-
| Artifact | Format | Location |
|
|
547
|
-
|----------|--------|----------|
|
|
548
|
-
| Design system file | Markdown | `.rune/design-system.md` |
|
|
549
|
-
| UI specification contract | Markdown | `.rune/ui-spec.md` |
|
|
550
|
-
| Design report | Markdown | inline (chat output) |
|
|
551
|
-
| Accessibility audit findings | Markdown list | inline + appended to design-system.md |
|
|
552
|
-
| Visual audit score | Table (6 pillars × 1-4) | inline + appended to design report |
|
|
553
|
-
| UX writing guidelines | Markdown section | `.rune/design-system.md` § UX Writing |
|
|
554
|
-
|
|
555
|
-
## Sharp Edges
|
|
556
|
-
|
|
557
|
-
Known failure modes for this skill. Check these before declaring done.
|
|
558
|
-
|
|
559
|
-
| Failure Mode | Severity | Mitigation |
|
|
560
|
-
|---|---|---|
|
|
561
|
-
| Generating generic design system without domain classification | CRITICAL | Domain Gate blocks this — classify first |
|
|
562
|
-
| Purple/indigo accent on non-AI-native product | HIGH | Constraint 3 blocks this — re-generate with domain-appropriate accent |
|
|
563
|
-
| Anti-pattern list copied from generic sources (not domain-specific) | HIGH | Each anti-pattern must cite why it fails in THIS specific domain |
|
|
564
|
-
| design-system.md not written (only reported verbally) | HIGH | Constraint 4 — no file = no persistence = future sessions lose design context |
|
|
565
|
-
| Mood contradicts domain safety conventions | HIGH | Step 2.5 warns user before proceeding (e.g., Playful + Healthcare) |
|
|
566
|
-
| UI-SPEC.md drift — components diverge from locked decisions | HIGH | HARD-GATE: cook/fix must read ui-spec.md before generating UI |
|
|
567
|
-
| Visual audit score < 18 shipped without improvement plan | MEDIUM | Step 6.5 flags weak pillars and creates backlog items |
|
|
568
|
-
| iOS target generating solid-background cards | MEDIUM | Platform Gate: iOS 26 Liquid Glass deprecates this pattern |
|
|
569
|
-
| Android target using hardcoded hex colors | MEDIUM | Platform Gate: MaterialTheme.colorScheme is mandatory for dynamic color |
|
|
570
|
-
|
|
571
|
-
## Done When
|
|
572
|
-
|
|
573
|
-
- Design reference loaded (user override or baseline)
|
|
574
|
-
- Domain classified (one of the 10 categories or explicit custom reasoning)
|
|
575
|
-
- Mood mapped to constraints (or explicitly skipped with "domain defaults")
|
|
576
|
-
- Design system generated with: colors (primitive + semantic), typography, spacing, effects, anti-patterns
|
|
577
|
-
- Platform-specific overrides applied (if iOS/Android target)
|
|
578
|
-
- UI-SPEC.md written with locked layout, hierarchy, and component decisions
|
|
579
|
-
- Accessibility review completed (6 checks: contrast, focus, touch targets, labels, semantic HTML, motion)
|
|
580
|
-
- 6-Pillar Visual Audit scored ≥ 18/24 (or weak pillars flagged with improvement tasks)
|
|
581
|
-
- UX writing guidelines generated (error, empty state, confirmation, loading, button templates)
|
|
582
|
-
- `.rune/design-system.md` written (includes Mood + UX Writing sections)
|
|
583
|
-
- `.rune/ui-spec.md` written (design contract for UI-generating skills)
|
|
584
|
-
- Design Report emitted with mood, accent/typography reasoning, visual audit score, and anti-pattern count
|
|
585
|
-
- Pre-Delivery Checklist included in design-system.md
|
|
586
|
-
|
|
587
|
-
## Cost Profile
|
|
588
|
-
|
|
589
|
-
~2000-5000 tokens input, ~800-1500 tokens output. Sonnet for design reasoning quality.
|
|
1
|
+
---
|
|
2
|
+
name: design
|
|
3
|
+
description: Design system reasoning. Maps product domain to style, palette, typography, and platform-specific patterns. Generates .rune/design-system.md as the shared design contract for all UI-generating skills.
|
|
4
|
+
metadata:
|
|
5
|
+
author: runedev
|
|
6
|
+
version: "0.4.0"
|
|
7
|
+
layer: L2
|
|
8
|
+
model: sonnet
|
|
9
|
+
group: creation
|
|
10
|
+
tools: "Read, Write, Edit, Glob, Grep"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# design
|
|
14
|
+
|
|
15
|
+
## Purpose
|
|
16
|
+
|
|
17
|
+
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."
|
|
18
|
+
|
|
19
|
+
## Triggers
|
|
20
|
+
|
|
21
|
+
- `/rune design` — manual invocation when starting a new UI project
|
|
22
|
+
- Called by `cook` (L1): frontend task detected, no `.rune/design-system.md` exists
|
|
23
|
+
- Called by `review` (L2): AI anti-pattern detected — recommended to run design skill
|
|
24
|
+
- Called by `perf` (L2): Lighthouse Accessibility BLOCK — design foundation may be missing
|
|
25
|
+
|
|
26
|
+
## Calls (outbound)
|
|
27
|
+
|
|
28
|
+
- `scout` (L2): detect existing design tokens, component library, platform targets
|
|
29
|
+
- `asset-creator` (L3): generate base visual assets (logo, OG image) from design system
|
|
30
|
+
- `review` (L2): accessibility violations found → flag for fix in next code review
|
|
31
|
+
|
|
32
|
+
## Called By (inbound)
|
|
33
|
+
|
|
34
|
+
- `cook` (L1): before any frontend code generation
|
|
35
|
+
- `brainstorm` (L2): when selected approach has UI/UX implications
|
|
36
|
+
- `ba` (L2): when requirements include UI/UX components
|
|
37
|
+
- `review` (L2): when AI anti-pattern detected in diff
|
|
38
|
+
- `perf` (L2): when Lighthouse Accessibility score blocks
|
|
39
|
+
- User: `/rune design` direct invocation
|
|
40
|
+
|
|
41
|
+
## Output Files
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
.rune/
|
|
45
|
+
└── design-system.md # Design contract for all UI-generating skills
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Executable Steps
|
|
49
|
+
|
|
50
|
+
### Step 0 — Load Design Reference
|
|
51
|
+
|
|
52
|
+
Load the design knowledge base before reasoning:
|
|
53
|
+
|
|
54
|
+
1. Check for user-level override: `~/.claude/docs/design-dna.md`
|
|
55
|
+
- If exists → `Read` it. This is the primary reference (user's curated taste).
|
|
56
|
+
2. If no user override → `Read` the baseline: `skills/design/DESIGN-REFERENCE.md` (shipped with Rune)
|
|
57
|
+
3. The loaded reference provides: font pairings, chart selection, component architecture, color principles, UX checklist, interaction patterns, anti-pattern signatures
|
|
58
|
+
4. Apply reference knowledge throughout Steps 3-5 (domain reasoning, token generation, checklist)
|
|
59
|
+
|
|
60
|
+
> **Why two layers**: The baseline ships "good enough" universal design knowledge. Users who care about aesthetics create their own `design-dna.md` with curated palettes, font pairings, and style preferences. The design skill works well with either — it just works _better_ with a curated reference.
|
|
61
|
+
|
|
62
|
+
### External Data Source
|
|
63
|
+
|
|
64
|
+
Design intelligence data from [UI/UX Pro Max](https://github.com/nextlevelbuilder/ui-ux-pro-max-skill) (MIT, 42.8k★).
|
|
65
|
+
Located at `references/ui-pro-max-data/` — 161 palettes, 84 styles, 73 font pairings, 161 reasoning rules, 99 UX guidelines.
|
|
66
|
+
|
|
67
|
+
When `references/ui-pro-max-data/` is available:
|
|
68
|
+
- Step 2: query `styles.csv` for domain-matched visual styles (expands from 10 → 84)
|
|
69
|
+
- Step 3: query `ui-reasoning.csv` for industry-specific design rules (161 rules)
|
|
70
|
+
- Step 3: query `colors.csv` for palette alternatives (expands from 10 → 161)
|
|
71
|
+
- Step 6 (Anti-AI): cross-check proposed style against reasoning DB — if flagged as "AI-generic", suggest 3 alternatives
|
|
72
|
+
|
|
73
|
+
### Step 1 — Discover
|
|
74
|
+
|
|
75
|
+
Invoke `scout` to detect:
|
|
76
|
+
- **Platform target**: `web` | `ios` (SwiftUI) | `android` (Compose) | `react-native` | `multi-platform`
|
|
77
|
+
- **Existing design tokens**: check for `tokens.json`, `design-system/`, `theme.ts`, `tailwind.config.*`, `variables.css`
|
|
78
|
+
- **Component library in use**: shadcn/ui | Radix | MUI | Ant Design | custom | none
|
|
79
|
+
- **Framework**: Next.js | Vite+React | SvelteKit | Vue | SwiftUI | Jetpack Compose | other
|
|
80
|
+
|
|
81
|
+
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.
|
|
82
|
+
|
|
83
|
+
### Step 2 — Classify Product Domain
|
|
84
|
+
|
|
85
|
+
From the user's task description + codebase context, classify product type:
|
|
86
|
+
|
|
87
|
+
| Category | Examples |
|
|
88
|
+
|----------|---------|
|
|
89
|
+
| **Trading/Fintech** | trading dashboard, portfolio tracker, payment app, crypto wallet |
|
|
90
|
+
| **SaaS Dashboard** | admin panel, analytics, CRM, project management |
|
|
91
|
+
| **Landing/Marketing** | landing page, product site, marketing page, waitlist |
|
|
92
|
+
| **Healthcare** | patient portal, medical dashboard, health tracker |
|
|
93
|
+
| **E-commerce** | product catalog, cart, checkout, marketplace |
|
|
94
|
+
| **Developer Tools** | IDE plugin, CLI dashboard, API explorer, devtool |
|
|
95
|
+
| **Creative/Portfolio** | portfolio, design showcase, art gallery, agency site |
|
|
96
|
+
| **Social/Community** | social feed, forum, messaging, community platform |
|
|
97
|
+
| **Mobile Consumer** | iOS/Android consumer app — entertainment, productivity, lifestyle |
|
|
98
|
+
| **AI-Native** | AI assistant interface, chatbot, model explorer |
|
|
99
|
+
|
|
100
|
+
If domain is unclear: ask one clarifying question — "Is this closer to X or Y?"
|
|
101
|
+
|
|
102
|
+
### Step 2.5 — Mood-to-Constraint Mapping
|
|
103
|
+
|
|
104
|
+
After classifying domain, ask ONE question: **"What should users feel when they use this?"**
|
|
105
|
+
|
|
106
|
+
Accept a single mood keyword (or infer from context if obvious). Map mood to concrete design constraints:
|
|
107
|
+
|
|
108
|
+
| Mood | Color Temp | Typography Weight | Whitespace | Animation | Shadow |
|
|
109
|
+
|------|-----------|-------------------|------------|-----------|--------|
|
|
110
|
+
| **Impressed** | Cool (blue-slate) | Heavy display (700-800) | Generous (xl-3xl) | Dramatic reveals (0.8-1.2s ease-out) | Deep, layered |
|
|
111
|
+
| **Excited** | Warm (amber-orange) | Bold contrasts (400 vs 800) | Tight-medium (sm-lg) | Energetic springs (0.4-0.6s spring) | Elevation lifts |
|
|
112
|
+
| **Calm** | Neutral-warm (stone-sage) | Light-medium (300-500) | Very generous (2xl-3xl) | Slow fades (0.6-0.8s ease-out-quad) | Soft, minimal |
|
|
113
|
+
| **Confident** | Cool-neutral (zinc-slate) | Medium-heavy (500-700) | Structured (md-xl) | Precise slides (0.3-0.5s ease) | Crisp, defined |
|
|
114
|
+
| **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) |
|
|
115
|
+
| **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 |
|
|
116
|
+
| **Professional** | Muted neutrals | System fonts, readable (400-500) | Balanced (md-lg) | Subtle (0.2-0.3s ease) | Standard elevation |
|
|
117
|
+
| **Inspired** | Rich-warm (gold-terracotta) | Editorial display (300-700 range) | Asymmetric, generous | Scroll-driven reveals (0.5-0.8s) | Dramatic, directional |
|
|
118
|
+
|
|
119
|
+
**Mapping rules:**
|
|
120
|
+
1. Mood constraints OVERRIDE generic domain defaults where they conflict (mood is user intent, domain is convention)
|
|
121
|
+
2. If mood contradicts domain safety (e.g., "Playful" + Healthcare), WARN user: "Playful tone may reduce trust in medical context — proceed?"
|
|
122
|
+
3. Write selected mood + resolved constraints to `.rune/design-system.md` under `## Mood` section
|
|
123
|
+
4. Downstream skills (`animation-patterns`, `palette-picker`, `type-system`) read mood constraints from design-system.md
|
|
124
|
+
|
|
125
|
+
**Skip if**: User says "no preference" or "just follow domain defaults" — proceed to Step 3 with domain-only reasoning.
|
|
126
|
+
|
|
127
|
+
### Step 3 — Apply Domain Reasoning Rules
|
|
128
|
+
|
|
129
|
+
Map domain to design system parameters:
|
|
130
|
+
|
|
131
|
+
**Trading/Fintech:**
|
|
132
|
+
```
|
|
133
|
+
Style: Data-Dense Dark
|
|
134
|
+
Palette: Neutral dark (#0c1419 bg), semantic colors ONLY for profit/loss
|
|
135
|
+
Profit: #00d084 (green) | Loss: #ff6b6b (red)
|
|
136
|
+
Accent: #2196f3 (data highlight) — NOT purple
|
|
137
|
+
Typography: JetBrains Mono 700 for ALL numeric values (prices, P&L, %)
|
|
138
|
+
Inter 400 for labels, Inter 600 for headings
|
|
139
|
+
Effects: Subtle grid lines, real-time pulse animations on live data
|
|
140
|
+
Anti-patterns:
|
|
141
|
+
❌ Gradient washes on data tables (obscures precision)
|
|
142
|
+
❌ Accent colors that conflict with profit/loss signal colors
|
|
143
|
+
❌ Decorative motion (distracts from live data)
|
|
144
|
+
❌ Dark-on-dark text for secondary labels (contrast required)
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
**SaaS Dashboard:**
|
|
148
|
+
```
|
|
149
|
+
Style: Minimalism or Flat Design
|
|
150
|
+
Palette: Professional neutrals, single brand accent (NOT purple unless brand)
|
|
151
|
+
Light: #ffffff bg, #f8fafc surface | Dark: #0f172a bg, #1e293b surface
|
|
152
|
+
Accent: brand-defined — default #6366f1 is acceptable here as a SaaS pattern
|
|
153
|
+
Typography: Inter 400/500/600 throughout — consistent, readable, data-friendly
|
|
154
|
+
Space Grotesk 700 for hero/display only
|
|
155
|
+
Effects: Skeleton loaders, subtle hover states, clean data tables
|
|
156
|
+
Anti-patterns:
|
|
157
|
+
❌ Card-grid monotony (every section same layout)
|
|
158
|
+
❌ Animations that delay data visibility
|
|
159
|
+
❌ Missing empty/error states in data tables
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
**Landing/Marketing:**
|
|
163
|
+
```
|
|
164
|
+
Style: Glassmorphism (current era) or Aurora/Mesh
|
|
165
|
+
Palette: Brand-expressive — this is the ONE context where bold palette is correct
|
|
166
|
+
High-contrast CTAs (must pass 4.5:1 contrast on all backgrounds)
|
|
167
|
+
Typography: Space Grotesk 700 for hero display (48–72px)
|
|
168
|
+
Inter 400/500 for body — max line-width 720px
|
|
169
|
+
Effects: Animated mesh gradients, floating glass cards, scroll-triggered reveals
|
|
170
|
+
Anti-patterns:
|
|
171
|
+
❌ Generic hero: "big text + diagonal purple-to-blue gradient" — AI signature
|
|
172
|
+
❌ Centered layout throughout (breaks directional reading flow)
|
|
173
|
+
❌ Missing scroll animations on a static page
|
|
174
|
+
❌ CTAs that don't stand out from body copy
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
**Healthcare:**
|
|
178
|
+
```
|
|
179
|
+
Style: Trust & Authority (clean, clinical, accessible)
|
|
180
|
+
Palette: Clean blue/white/green — NO red except clinical alerts
|
|
181
|
+
#f0f9ff bg, #1e40af accent, #059669 success, #dc2626 CRITICAL_ONLY
|
|
182
|
+
Typography: Inter throughout — never decorative fonts
|
|
183
|
+
Body minimum 16px for readability by older/impaired users
|
|
184
|
+
Effects: Minimal — subtle hover, no motion by default
|
|
185
|
+
Anti-patterns:
|
|
186
|
+
❌ Dark mode as default (patients/elderly → light mode)
|
|
187
|
+
❌ Gamification patterns (inappropriate for medical context)
|
|
188
|
+
❌ Red for informational messages (reserved for clinical alerts)
|
|
189
|
+
❌ Dense data layouts without clear visual hierarchy
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
**E-commerce:**
|
|
193
|
+
```
|
|
194
|
+
Style: Conversion-Optimized (Warm Minimalism)
|
|
195
|
+
Palette: Warm neutrals, high-contrast CTAs
|
|
196
|
+
Urgency signals: #ef4444 for "low stock", #f59e0b for "sale"
|
|
197
|
+
Typography: Bold product names (Space Grotesk 600+), readable descriptions (Inter 400)
|
|
198
|
+
Effects: Hover zoom on product images, add-to-cart pulse, trust badges
|
|
199
|
+
Anti-patterns:
|
|
200
|
+
❌ Cluttered above-fold (too many competing CTAs)
|
|
201
|
+
❌ Add to cart button that doesn't stand out
|
|
202
|
+
❌ Missing product image zoom/gallery
|
|
203
|
+
❌ Checkout flow with more than 3 steps visible at once
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
**Developer Tools:**
|
|
207
|
+
```
|
|
208
|
+
Style: Minimalism or Neubrutalism
|
|
209
|
+
Palette: Dark mode default — #0d1117 bg (GitHub-scale), #161b22 surface
|
|
210
|
+
Syntax highlighting colors as accent palette
|
|
211
|
+
No heavy gradients — developers recognize and distrust decorative UI
|
|
212
|
+
Typography: JetBrains Mono for code/commands, Inter for prose
|
|
213
|
+
Effects: Keyboard shortcuts visible, dense information layout OK
|
|
214
|
+
Anti-patterns:
|
|
215
|
+
❌ Decorative animations that delay tool response
|
|
216
|
+
❌ Non-monospace font for code blocks or command output
|
|
217
|
+
❌ Light mode only (developer tools default to dark)
|
|
218
|
+
❌ Visual noise around core functionality
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
**Creative/Portfolio:**
|
|
222
|
+
```
|
|
223
|
+
Style: Editorial Grid or Glassmorphism or Brutalism (brand-specific)
|
|
224
|
+
Palette: MUST be distinctive — generic palettes are disqualifying
|
|
225
|
+
This is the one category where custom/unusual palettes are required
|
|
226
|
+
Typography: Custom or display font as headline (NOT Inter alone)
|
|
227
|
+
Font pairing must have contrast: Display + neutral body
|
|
228
|
+
Effects: Curated — hover reveals, scroll-based reveals, cursor effects
|
|
229
|
+
Anti-patterns:
|
|
230
|
+
❌ Generic card grid with equal padding everywhere
|
|
231
|
+
❌ Inter-only typography (zero personality)
|
|
232
|
+
❌ Stock photo backgrounds
|
|
233
|
+
❌ Navigation that looks like every other portfolio
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
**AI-Native:**
|
|
237
|
+
```
|
|
238
|
+
Style: Minimal Functional or Glassmorphism
|
|
239
|
+
Palette: Purple/violet IS acceptable here (it is the AI-native signal)
|
|
240
|
+
#7c3aed accent, dark neutral bg, subtle gradients
|
|
241
|
+
Typography: Inter throughout — clarity over personality
|
|
242
|
+
Effects: Typing indicators, streaming text, thinking states
|
|
243
|
+
Anti-patterns:
|
|
244
|
+
❌ Purple on non-AI product (exports the AI signal to inappropriate contexts)
|
|
245
|
+
❌ Static empty states — AI interfaces must show "thinking" states
|
|
246
|
+
❌ Missing latency UX (skeleton during generation, cancel button)
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### Step 4 — Platform-Specific Overrides
|
|
250
|
+
|
|
251
|
+
Apply platform conventions on top of domain rules:
|
|
252
|
+
|
|
253
|
+
**iOS (SwiftUI / iOS 26+):**
|
|
254
|
+
```
|
|
255
|
+
Visual language: Liquid Glass — translucent surfaces with backdrop blur
|
|
256
|
+
background: UIBlurEffect or .regularMaterial
|
|
257
|
+
border: subtle 1px rgba(white, 0.15) — NOT solid
|
|
258
|
+
roundness: aggressive corner radius (16–24px on cards, full on buttons)
|
|
259
|
+
Icons: SF Symbols ONLY — not Heroicons, not Lucide
|
|
260
|
+
Typography: SF Pro family — Dynamic Type scaling is mandatory
|
|
261
|
+
Safe areas: Content must respect safeAreaInsets on all edges
|
|
262
|
+
Anti-patterns:
|
|
263
|
+
❌ Solid-background cards (deprecated in iOS 26 Liquid Glass era)
|
|
264
|
+
❌ Custom icon fonts (SF Symbols is the platform contract)
|
|
265
|
+
❌ Fixed font sizes (Dynamic Type must be supported)
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
**Android (Jetpack Compose / Material 3 Expressive):**
|
|
269
|
+
```
|
|
270
|
+
Color: MaterialTheme.colorScheme — dynamic color derived from wallpaper
|
|
271
|
+
NEVER hardcode hex colors in Compose — use semantic tokens
|
|
272
|
+
Shape: Extreme corner expressiveness — use shape variation as affordance signal
|
|
273
|
+
Small interactive: RoundedCornerShape(4dp)
|
|
274
|
+
Cards/surfaces: RoundedCornerShape(16dp)
|
|
275
|
+
FABs: CircleShape
|
|
276
|
+
Motion: Spring physics — tween() is almost never the right choice
|
|
277
|
+
spring(dampingRatio = Spring.DampingRatioMediumBouncy)
|
|
278
|
+
Anti-patterns:
|
|
279
|
+
❌ Hardcoded hex colors (breaks dynamic color contract)
|
|
280
|
+
❌ Linear easing (Material 3 Expressive uses spring physics)
|
|
281
|
+
❌ Small corner radii (shape expressiveness is a key M3 Expressive principle)
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
**Web:**
|
|
285
|
+
- Apply domain rules from Step 3
|
|
286
|
+
- Default: dark mode support required (`prefers-color-scheme: dark`)
|
|
287
|
+
- Responsive: must design for 375px, 768px, 1024px, 1440px breakpoints
|
|
288
|
+
- Accessibility: WCAG 2.2 AA minimum
|
|
289
|
+
|
|
290
|
+
### Step 5 — Generate Design System File
|
|
291
|
+
|
|
292
|
+
Use `Write` to create `.rune/design-system.md`:
|
|
293
|
+
|
|
294
|
+
```markdown
|
|
295
|
+
# Design System: [Project Name]
|
|
296
|
+
Last Updated: [YYYY-MM-DD]
|
|
297
|
+
Platform: [web | ios | android | multi-platform]
|
|
298
|
+
Domain: [product category]
|
|
299
|
+
Style: [chosen style]
|
|
300
|
+
|
|
301
|
+
## Color Tokens
|
|
302
|
+
|
|
303
|
+
### Primitive (raw values)
|
|
304
|
+
--color-[name]-[scale]: [hex]
|
|
305
|
+
|
|
306
|
+
### Semantic (meaning-mapped)
|
|
307
|
+
--bg-base: [value] — page background
|
|
308
|
+
--bg-surface: [value] — card/panel background
|
|
309
|
+
--bg-elevated: [value] — modal/dropdown background
|
|
310
|
+
--text-primary: [value] — primary text
|
|
311
|
+
--text-secondary: [value] — secondary/muted text
|
|
312
|
+
--border: [value] — default border
|
|
313
|
+
--accent: [value] — primary action/brand
|
|
314
|
+
--success: [value] — positive/profit signal
|
|
315
|
+
--danger: [value] — error/loss signal
|
|
316
|
+
--warning: [value] — caution signal
|
|
317
|
+
|
|
318
|
+
## Typography
|
|
319
|
+
|
|
320
|
+
| Role | Font | Weight | Size |
|
|
321
|
+
|------|------|--------|------|
|
|
322
|
+
| Display | [font] | [weight] | [px range] |
|
|
323
|
+
| H1 | [font] | [weight] | [px] |
|
|
324
|
+
| H2/H3 | [font] | [weight] | [px] |
|
|
325
|
+
| Body | [font] | [weight] | [px] |
|
|
326
|
+
| Mono/Numbers | [font] | [weight] | [px] |
|
|
327
|
+
|
|
328
|
+
Numbers rule: [monospace font] for ALL numeric values in this domain (prices, metrics, IDs)
|
|
329
|
+
|
|
330
|
+
## Spacing (8px base)
|
|
331
|
+
xs: 4px | sm: 8px | md: 16px | lg: 24px | xl: 32px | 2xl: 48px | 3xl: 64px
|
|
332
|
+
|
|
333
|
+
## Border Radius
|
|
334
|
+
sm: 6px | md: 8px | lg: 12px | xl: 16px | full: 9999px
|
|
335
|
+
|
|
336
|
+
## Effects
|
|
337
|
+
[signature effects for this style — gradients, shadows, blur, etc.]
|
|
338
|
+
|
|
339
|
+
## Anti-Patterns (MUST NOT generate these)
|
|
340
|
+
[domain-specific list from Step 3 + platform overrides]
|
|
341
|
+
- ❌ [anti-pattern 1] — [why it fails in this domain]
|
|
342
|
+
- ❌ [anti-pattern 2]
|
|
343
|
+
|
|
344
|
+
## Platform Notes
|
|
345
|
+
[platform-specific implementation requirements from Step 4]
|
|
346
|
+
|
|
347
|
+
## Component Library
|
|
348
|
+
[detected library or "custom"]
|
|
349
|
+
|
|
350
|
+
## Pre-Delivery Checklist
|
|
351
|
+
- [ ] Color contrast ≥ 4.5:1 for all text
|
|
352
|
+
- [ ] Focus-visible ring on ALL interactive elements (never outline-none alone)
|
|
353
|
+
- [ ] Touch targets ≥ 24×24px with 8px gap between targets
|
|
354
|
+
- [ ] All icon-only buttons have aria-label
|
|
355
|
+
- [ ] All inputs have associated <label> or aria-label
|
|
356
|
+
- [ ] Empty state, error state, loading state for all async data
|
|
357
|
+
- [ ] cursor-pointer on all clickable non-button elements
|
|
358
|
+
- [ ] prefers-reduced-motion respected for all animations
|
|
359
|
+
- [ ] Dark mode support (or explicit reasoning why not)
|
|
360
|
+
- [ ] Responsive tested at 375px / 768px / 1024px / 1440px
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
### Step 5.5 — UI Design Contract (UI-SPEC.md)
|
|
364
|
+
|
|
365
|
+
After generating the design system, lock key visual decisions in `.rune/ui-spec.md` — a binding contract that prevents design drift during implementation.
|
|
366
|
+
|
|
367
|
+
**Why**: design-system.md defines tokens (what's available). UI-SPEC locks decisions (what was chosen and WHY). Without a spec, each component re-decides layout, density, and hierarchy — causing visual inconsistency.
|
|
368
|
+
|
|
369
|
+
**Generate `.rune/ui-spec.md`:**
|
|
370
|
+
|
|
371
|
+
```markdown
|
|
372
|
+
# UI Specification: [Project Name]
|
|
373
|
+
Locked: [YYYY-MM-DD] | Mood: [selected mood]
|
|
374
|
+
|
|
375
|
+
## Layout Decisions
|
|
376
|
+
- Page max-width: [value]px
|
|
377
|
+
- Sidebar: [yes/no] — [width]px [fixed/collapsible]
|
|
378
|
+
- Content density: [compact/balanced/spacious]
|
|
379
|
+
- Card sizing: [uniform/varied] — if varied, specify hierarchy rules
|
|
380
|
+
|
|
381
|
+
## Visual Hierarchy Rules
|
|
382
|
+
- Primary action: [color] [size] [weight] — ONE per viewport
|
|
383
|
+
- Secondary action: [ghost/outline] style — max 2 per section
|
|
384
|
+
- Data emphasis: [monospace + bold] for numbers, [color accent] for status
|
|
385
|
+
- Section separation: [border/spacing/background] — pick ONE, be consistent
|
|
386
|
+
|
|
387
|
+
## Component Decisions
|
|
388
|
+
- Card style: [elevated/bordered/glass] — reasoning: [why]
|
|
389
|
+
- Table style: [striped/bordered/minimal] — reasoning: [why]
|
|
390
|
+
- Form layout: [stacked/inline/grid] — reasoning: [why]
|
|
391
|
+
- Navigation: [sidebar/topbar/tabs] — reasoning: [why]
|
|
392
|
+
|
|
393
|
+
## Locked Anti-Decisions (things we explicitly chose NOT to do)
|
|
394
|
+
- ❌ [rejected option] — because [reason]
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
<HARD-GATE>
|
|
398
|
+
UI-SPEC.md is a contract. Once written, changes require explicit user approval ("I want to change the card style"). Skills that generate UI (`cook`, `fix`, `scaffold`) MUST read UI-SPEC.md before producing components. Drift from spec = review finding.
|
|
399
|
+
</HARD-GATE>
|
|
400
|
+
|
|
401
|
+
### Step 6 — Accessibility Review
|
|
402
|
+
|
|
403
|
+
Run a focused accessibility audit on the design system and any existing UI code. This step ensures the design contract doesn't produce inaccessible outputs.
|
|
404
|
+
|
|
405
|
+
**Automated checks** (use Grep on codebase):
|
|
406
|
+
1. **Color contrast**: Verify all text/bg combinations in the design system meet WCAG 2.2 AA (4.5:1 normal text, 3:1 large text). Flag any semantic color pair that fails.
|
|
407
|
+
2. **Focus indicators**: Search for `outline-none`, `outline: none`, `focus:outline-none` without a replacement `focus-visible` ring. Every instance is a violation.
|
|
408
|
+
3. **Touch targets**: Search for buttons/links with explicit small sizing (`w-6 h-6`, `p-1` on interactive elements). Flag anything < 24x24px.
|
|
409
|
+
4. **Missing labels**: Search for `<input` without adjacent `<label` or `aria-label`. Search for icon-only buttons without `aria-label`.
|
|
410
|
+
5. **Semantic HTML**: Flag `<div onClick`, `<span onClick` (should be `<button>`). Flag missing `<nav>`, `<main>`, `<header>` landmarks.
|
|
411
|
+
6. **Motion safety**: Check for animations/transitions without `prefers-reduced-motion` media query or Tailwind `motion-reduce:` variant.
|
|
412
|
+
|
|
413
|
+
**Output**: Accessibility audit section in Design Report with pass/fail per check and specific file:line violations.
|
|
414
|
+
|
|
415
|
+
If violations found → add them to `.rune/design-system.md` Anti-Patterns section as concrete rules.
|
|
416
|
+
|
|
417
|
+
### Step 6.5 — 6-Pillar Visual Audit
|
|
418
|
+
|
|
419
|
+
Score the generated design system across 6 pillars. Each pillar scored 1-4 (1=Poor, 2=Fair, 3=Good, 4=Excellent). Minimum passing score: **18/24** (average 3.0).
|
|
420
|
+
|
|
421
|
+
| Pillar | Score 1 (Poor) | Score 2 (Fair) | Score 3 (Good) | Score 4 (Excellent) |
|
|
422
|
+
|--------|---------------|----------------|----------------|---------------------|
|
|
423
|
+
| **Copy** | Placeholder text, generic CTAs ("Submit"), no voice | Real copy but inconsistent tone | Consistent voice, domain-appropriate, clear CTAs | Personality-rich, scannable, microcopy for every state |
|
|
424
|
+
| **Visuals** | Stock photos, generic icons, no visual identity | Consistent icon set, basic imagery | Custom illustrations or curated photography, clear hierarchy | Distinctive visual language, icons tell stories, zero stock |
|
|
425
|
+
| **Color** | Default framework palette, no semantic meaning | Brand colors defined but inconsistent usage | Full semantic palette, dark mode, accessible contrast | Mood-aligned, colorblind-safe, context-adaptive (profit/loss/status) |
|
|
426
|
+
| **Typography** | Single font, no scale | Font pairing exists but inconsistent sizing | Clear hierarchy (display/heading/body/mono), numbers monospace | Mood-aligned pairing, fluid scaling, platform-native where needed |
|
|
427
|
+
| **Spacing** | Inconsistent gaps, cramped or too loose | Base unit defined but not consistently applied | 8px grid, consistent section/component/element spacing | Density variants (compact/default/spacious), rhythm feels intentional |
|
|
428
|
+
| **UX** | Missing states (empty/error/loading), no feedback | Basic states exist, some interactive feedback | All states covered, toast/loading/skeleton, focus management | Delightful micro-interactions, smart defaults, zero dead-ends |
|
|
429
|
+
|
|
430
|
+
**Audit output:**
|
|
431
|
+
|
|
432
|
+
```
|
|
433
|
+
### Visual Audit Score: [total]/24
|
|
434
|
+
|
|
435
|
+
| Pillar | Score | Notes |
|
|
436
|
+
|--------|-------|-------|
|
|
437
|
+
| Copy | 3 | Consistent voice, missing loading microcopy |
|
|
438
|
+
| Visuals | 2 | Using Phosphor icons (good), no custom illustration |
|
|
439
|
+
| Color | 4 | Full semantic palette, colorblind alternates defined |
|
|
440
|
+
| Typography | 3 | JetBrains Mono for numbers, Inter for prose — solid |
|
|
441
|
+
| Spacing | 3 | 8px grid applied, density variants not needed yet |
|
|
442
|
+
| UX | 3 | All states covered, micro-interactions in progress |
|
|
443
|
+
| **Total** | **18/24** | PASS — ship-ready with Copy improvements recommended |
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
**If score < 18**: Flag specific weak pillars in Design Report. Add improvement tasks to `.rune/design-system.md` under `## Improvement Backlog`.
|
|
447
|
+
|
|
448
|
+
**Registry safety check**: If an existing component library is in use (shadcn, MUI, etc.), verify the design system doesn't conflict with the library's token structure. Flag collisions.
|
|
449
|
+
|
|
450
|
+
### Step 7 — UX Writing Patterns
|
|
451
|
+
|
|
452
|
+
Generate microcopy guidelines specific to this product domain. UX writing is part of design — not an afterthought.
|
|
453
|
+
|
|
454
|
+
**Domain-specific microcopy rules:**
|
|
455
|
+
|
|
456
|
+
| Domain | Tone | Error Pattern | CTA Pattern | Empty State |
|
|
457
|
+
|--------|------|---------------|-------------|-------------|
|
|
458
|
+
| Trading/Fintech | Precise, neutral, no humor | "Order failed: insufficient margin ($X required)" | "Place Order", "Close Position" | "No open positions. Market opens in 2h 15m." |
|
|
459
|
+
| SaaS Dashboard | Professional, helpful | "Couldn't save changes. Try again or contact support." | "Get Started", "Upgrade Plan" | "No data yet. Connect your first integration." |
|
|
460
|
+
| E-commerce | Friendly, urgent-capable | "This item is no longer available. Here are similar items." | "Add to Cart", "Buy Now" | "Your cart is empty. Continue shopping?" |
|
|
461
|
+
| Healthcare | Calm, clinical, clear | "We couldn't verify your insurance. Please check your member ID." | "Schedule Visit", "View Results" | "No upcoming appointments." |
|
|
462
|
+
| Developer Tools | Direct, technical | "Build failed: missing dependency `@types/node`" | "Deploy", "Run Tests" | "No builds yet. Push to trigger CI." |
|
|
463
|
+
|
|
464
|
+
**Generate for this project:**
|
|
465
|
+
- Error message template: `[What happened] + [Why] + [What to do next]`
|
|
466
|
+
- Empty state template: `[What's missing] + [How to fill it]`
|
|
467
|
+
- Confirmation template: `[What will happen] + [Reversibility]`
|
|
468
|
+
- Loading text: context-appropriate (not just "Loading...")
|
|
469
|
+
- Button label rules: verb-first, specific action (not "Submit", "Click Here")
|
|
470
|
+
|
|
471
|
+
Add UX writing guidelines to `.rune/design-system.md` under a new `## UX Writing` section.
|
|
472
|
+
|
|
473
|
+
### Step 8 — Report
|
|
474
|
+
|
|
475
|
+
Emit design summary to calling skill:
|
|
476
|
+
|
|
477
|
+
```
|
|
478
|
+
## Design Report: [Project Name]
|
|
479
|
+
|
|
480
|
+
### Domain Classification
|
|
481
|
+
[product category] — [style chosen] — [platform]
|
|
482
|
+
|
|
483
|
+
### Design System Generated
|
|
484
|
+
.rune/design-system.md
|
|
485
|
+
|
|
486
|
+
### Key Decisions
|
|
487
|
+
- Accent: [color + reasoning — why this color for this domain]
|
|
488
|
+
- Typography: [pairing + reasoning]
|
|
489
|
+
- Style: [style name + why it fits this product]
|
|
490
|
+
|
|
491
|
+
### Anti-Patterns Registered (will be flagged by review)
|
|
492
|
+
- ❌ [n] domain-specific patterns
|
|
493
|
+
- ❌ [n] platform-specific patterns
|
|
494
|
+
|
|
495
|
+
### Pre-Delivery Checklist
|
|
496
|
+
[count] items to verify before shipping
|
|
497
|
+
```
|
|
498
|
+
|
|
499
|
+
## Output Format
|
|
500
|
+
|
|
501
|
+
```
|
|
502
|
+
## Design Report: TradingOS Dashboard
|
|
503
|
+
|
|
504
|
+
### Domain Classification
|
|
505
|
+
Trading/Fintech — Data-Dense Dark — Web
|
|
506
|
+
|
|
507
|
+
### Design System Generated
|
|
508
|
+
.rune/design-system.md
|
|
509
|
+
|
|
510
|
+
### Key Decisions
|
|
511
|
+
- Accent: #2196f3 (blue) — neutral data highlight; profit/loss colors (#00d084/#ff6b6b)
|
|
512
|
+
are reserved as semantic signals, not brand colors
|
|
513
|
+
- Typography: JetBrains Mono 700 for all numeric values (prices, P&L, %),
|
|
514
|
+
Inter 400/600 for prose and labels
|
|
515
|
+
- Style: Data-Dense Dark — users scan real-time data under time pressure;
|
|
516
|
+
decorative elements compete with data for attention
|
|
517
|
+
|
|
518
|
+
### Anti-Patterns Registered
|
|
519
|
+
- ❌ 4 domain-specific (gradient wash, conflicting accent colors, decorative motion, dark-on-dark)
|
|
520
|
+
- ❌ 1 platform-specific (fixed font sizes not applicable — web target)
|
|
521
|
+
|
|
522
|
+
### Pre-Delivery Checklist
|
|
523
|
+
12 items to verify before shipping
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
## Constraints
|
|
527
|
+
|
|
528
|
+
1. MUST classify domain before generating design system — never generate with unknown domain
|
|
529
|
+
2. MUST include anti-pattern list in every design system — a system without anti-patterns is incomplete
|
|
530
|
+
3. MUST NOT use purple/indigo as default accent unless domain is AI-Native or explicitly brand-purple
|
|
531
|
+
4. MUST write `.rune/design-system.md` — ephemeral design decisions evaporate; persistence is the point
|
|
532
|
+
5. MUST NOT overwrite existing design-system.md without user confirmation
|
|
533
|
+
6. MUST include platform-specific overrides when platform is iOS or Android
|
|
534
|
+
|
|
535
|
+
## Mesh Gates (L1/L2 only)
|
|
536
|
+
|
|
537
|
+
| Gate | Requires | If Missing |
|
|
538
|
+
|------|----------|------------|
|
|
539
|
+
| Domain Gate | Product domain classified before generating tokens | Ask clarifying question |
|
|
540
|
+
| Anti-Pattern Gate | Anti-pattern list derived from domain rules (not generic) | Domain-specific list required |
|
|
541
|
+
| Persistence Gate | .rune/design-system.md written before reporting done | Write file first |
|
|
542
|
+
| Platform Gate | Platform detected before generating tokens | Default to web, note assumption |
|
|
543
|
+
|
|
544
|
+
## Returns
|
|
545
|
+
|
|
546
|
+
| Artifact | Format | Location |
|
|
547
|
+
|----------|--------|----------|
|
|
548
|
+
| Design system file | Markdown | `.rune/design-system.md` |
|
|
549
|
+
| UI specification contract | Markdown | `.rune/ui-spec.md` |
|
|
550
|
+
| Design report | Markdown | inline (chat output) |
|
|
551
|
+
| Accessibility audit findings | Markdown list | inline + appended to design-system.md |
|
|
552
|
+
| Visual audit score | Table (6 pillars × 1-4) | inline + appended to design report |
|
|
553
|
+
| UX writing guidelines | Markdown section | `.rune/design-system.md` § UX Writing |
|
|
554
|
+
|
|
555
|
+
## Sharp Edges
|
|
556
|
+
|
|
557
|
+
Known failure modes for this skill. Check these before declaring done.
|
|
558
|
+
|
|
559
|
+
| Failure Mode | Severity | Mitigation |
|
|
560
|
+
|---|---|---|
|
|
561
|
+
| Generating generic design system without domain classification | CRITICAL | Domain Gate blocks this — classify first |
|
|
562
|
+
| Purple/indigo accent on non-AI-native product | HIGH | Constraint 3 blocks this — re-generate with domain-appropriate accent |
|
|
563
|
+
| Anti-pattern list copied from generic sources (not domain-specific) | HIGH | Each anti-pattern must cite why it fails in THIS specific domain |
|
|
564
|
+
| design-system.md not written (only reported verbally) | HIGH | Constraint 4 — no file = no persistence = future sessions lose design context |
|
|
565
|
+
| Mood contradicts domain safety conventions | HIGH | Step 2.5 warns user before proceeding (e.g., Playful + Healthcare) |
|
|
566
|
+
| UI-SPEC.md drift — components diverge from locked decisions | HIGH | HARD-GATE: cook/fix must read ui-spec.md before generating UI |
|
|
567
|
+
| Visual audit score < 18 shipped without improvement plan | MEDIUM | Step 6.5 flags weak pillars and creates backlog items |
|
|
568
|
+
| iOS target generating solid-background cards | MEDIUM | Platform Gate: iOS 26 Liquid Glass deprecates this pattern |
|
|
569
|
+
| Android target using hardcoded hex colors | MEDIUM | Platform Gate: MaterialTheme.colorScheme is mandatory for dynamic color |
|
|
570
|
+
|
|
571
|
+
## Done When
|
|
572
|
+
|
|
573
|
+
- Design reference loaded (user override or baseline)
|
|
574
|
+
- Domain classified (one of the 10 categories or explicit custom reasoning)
|
|
575
|
+
- Mood mapped to constraints (or explicitly skipped with "domain defaults")
|
|
576
|
+
- Design system generated with: colors (primitive + semantic), typography, spacing, effects, anti-patterns
|
|
577
|
+
- Platform-specific overrides applied (if iOS/Android target)
|
|
578
|
+
- UI-SPEC.md written with locked layout, hierarchy, and component decisions
|
|
579
|
+
- Accessibility review completed (6 checks: contrast, focus, touch targets, labels, semantic HTML, motion)
|
|
580
|
+
- 6-Pillar Visual Audit scored ≥ 18/24 (or weak pillars flagged with improvement tasks)
|
|
581
|
+
- UX writing guidelines generated (error, empty state, confirmation, loading, button templates)
|
|
582
|
+
- `.rune/design-system.md` written (includes Mood + UX Writing sections)
|
|
583
|
+
- `.rune/ui-spec.md` written (design contract for UI-generating skills)
|
|
584
|
+
- Design Report emitted with mood, accent/typography reasoning, visual audit score, and anti-pattern count
|
|
585
|
+
- Pre-Delivery Checklist included in design-system.md
|
|
586
|
+
|
|
587
|
+
## Cost Profile
|
|
588
|
+
|
|
589
|
+
~2000-5000 tokens input, ~800-1500 tokens output. Sonnet for design reasoning quality.
|