@rune-kit/rune 2.8.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.
Files changed (287) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +68 -34
  3. package/agents/adversary.md +27 -0
  4. package/agents/architect.md +19 -29
  5. package/agents/asset-creator.md +18 -4
  6. package/agents/audit.md +25 -4
  7. package/agents/autopsy.md +19 -4
  8. package/agents/ba.md +35 -0
  9. package/agents/brainstorm.md +31 -4
  10. package/agents/browser-pilot.md +21 -4
  11. package/agents/coder.md +21 -29
  12. package/agents/completion-gate.md +20 -4
  13. package/agents/constraint-check.md +18 -4
  14. package/agents/context-engine.md +22 -4
  15. package/agents/context-pack.md +32 -0
  16. package/agents/cook.md +41 -4
  17. package/agents/db.md +19 -4
  18. package/agents/debug.md +33 -4
  19. package/agents/dependency-doctor.md +20 -4
  20. package/agents/deploy.md +27 -4
  21. package/agents/design.md +22 -4
  22. package/agents/doc-processor.md +27 -0
  23. package/agents/docs-seeker.md +19 -4
  24. package/agents/docs.md +31 -0
  25. package/agents/fix.md +37 -4
  26. package/agents/git.md +29 -0
  27. package/agents/hallucination-guard.md +20 -4
  28. package/agents/incident.md +21 -4
  29. package/agents/integrity-check.md +18 -4
  30. package/agents/journal.md +19 -4
  31. package/agents/launch.md +32 -4
  32. package/agents/logic-guardian.md +26 -11
  33. package/agents/marketing.md +23 -4
  34. package/agents/mcp-builder.md +26 -0
  35. package/agents/neural-memory.md +30 -0
  36. package/agents/onboard.md +22 -4
  37. package/agents/perf.md +21 -4
  38. package/agents/plan.md +29 -4
  39. package/agents/preflight.md +22 -4
  40. package/agents/problem-solver.md +20 -4
  41. package/agents/rescue.md +23 -4
  42. package/agents/research.md +19 -4
  43. package/agents/researcher.md +19 -29
  44. package/agents/retro.md +32 -0
  45. package/agents/review-intake.md +20 -4
  46. package/agents/review.md +32 -4
  47. package/agents/reviewer.md +20 -28
  48. package/agents/safeguard.md +19 -4
  49. package/agents/sast.md +18 -4
  50. package/agents/scaffold.md +41 -0
  51. package/agents/scanner.md +19 -28
  52. package/agents/scope-guard.md +18 -4
  53. package/agents/scout.md +23 -4
  54. package/agents/sentinel-env.md +26 -0
  55. package/agents/sentinel.md +33 -4
  56. package/agents/sequential-thinking.md +20 -4
  57. package/agents/session-bridge.md +24 -4
  58. package/agents/skill-forge.md +22 -4
  59. package/agents/skill-router.md +26 -4
  60. package/agents/slides.md +24 -0
  61. package/agents/surgeon.md +19 -4
  62. package/agents/team.md +30 -4
  63. package/agents/test.md +36 -4
  64. package/agents/trend-scout.md +17 -4
  65. package/agents/verification.md +20 -4
  66. package/agents/video-creator.md +20 -4
  67. package/agents/watchdog.md +19 -4
  68. package/agents/worktree.md +17 -4
  69. package/commands/rune.md +168 -168
  70. package/compiler/__tests__/analytics.test.js +370 -0
  71. package/compiler/adapters/openclaw.js +2 -2
  72. package/compiler/analytics.js +385 -0
  73. package/compiler/bin/rune.js +68 -2
  74. package/compiler/dashboard.js +883 -0
  75. package/compiler/transforms/branding.js +1 -1
  76. package/contexts/dev.md +34 -34
  77. package/contexts/research.md +43 -43
  78. package/contexts/review.md +55 -55
  79. package/extensions/ai-ml/PACK.md +88 -88
  80. package/extensions/ai-ml/skills/ai-agents.md +172 -172
  81. package/extensions/ai-ml/skills/code-sandbox.md +187 -187
  82. package/extensions/ai-ml/skills/deep-research.md +146 -146
  83. package/extensions/ai-ml/skills/embedding-search.md +66 -66
  84. package/extensions/ai-ml/skills/fine-tuning-guide.md +74 -74
  85. package/extensions/ai-ml/skills/llm-architect.md +125 -125
  86. package/extensions/ai-ml/skills/llm-integration.md +64 -64
  87. package/extensions/ai-ml/skills/prompt-patterns.md +72 -72
  88. package/extensions/ai-ml/skills/rag-patterns.md +66 -66
  89. package/extensions/ai-ml/skills/web-extraction.md +114 -114
  90. package/extensions/analytics/PACK.md +92 -92
  91. package/extensions/analytics/skills/ab-testing.md +72 -72
  92. package/extensions/analytics/skills/dashboard-patterns.md +83 -83
  93. package/extensions/analytics/skills/data-validation.md +68 -68
  94. package/extensions/analytics/skills/funnel-analysis.md +81 -81
  95. package/extensions/analytics/skills/sql-patterns.md +57 -57
  96. package/extensions/analytics/skills/statistical-analysis.md +79 -79
  97. package/extensions/analytics/skills/tracking-setup.md +71 -71
  98. package/extensions/backend/PACK.md +104 -104
  99. package/extensions/backend/skills/api-patterns.md +84 -84
  100. package/extensions/backend/skills/async-pipeline.md +193 -193
  101. package/extensions/backend/skills/auth-patterns.md +97 -97
  102. package/extensions/backend/skills/background-jobs.md +133 -133
  103. package/extensions/backend/skills/caching-patterns.md +108 -108
  104. package/extensions/backend/skills/cli-generation.md +133 -133
  105. package/extensions/backend/skills/database-patterns.md +87 -87
  106. package/extensions/backend/skills/middleware-patterns.md +104 -104
  107. package/extensions/chrome-ext/PACK.md +93 -93
  108. package/extensions/chrome-ext/skills/cws-preflight.md +143 -143
  109. package/extensions/chrome-ext/skills/cws-publish.md +104 -104
  110. package/extensions/chrome-ext/skills/ext-ai-integration.md +251 -251
  111. package/extensions/chrome-ext/skills/ext-messaging.md +139 -139
  112. package/extensions/chrome-ext/skills/ext-storage.md +133 -133
  113. package/extensions/chrome-ext/skills/mv3-scaffold.md +164 -164
  114. package/extensions/content/PACK.md +96 -96
  115. package/extensions/content/skills/blog-patterns.md +88 -88
  116. package/extensions/content/skills/cms-integration.md +131 -131
  117. package/extensions/content/skills/content-scoring.md +107 -107
  118. package/extensions/content/skills/i18n.md +83 -83
  119. package/extensions/content/skills/mdx-authoring.md +137 -137
  120. package/extensions/content/skills/reference.md +1014 -1014
  121. package/extensions/content/skills/seo-patterns.md +67 -67
  122. package/extensions/content/skills/video-repurpose.md +153 -153
  123. package/extensions/devops/PACK.md +101 -101
  124. package/extensions/devops/skills/chaos-testing.md +67 -67
  125. package/extensions/devops/skills/ci-cd.md +75 -75
  126. package/extensions/devops/skills/docker.md +58 -58
  127. package/extensions/devops/skills/edge-serverless.md +163 -163
  128. package/extensions/devops/skills/infra-as-code.md +158 -158
  129. package/extensions/devops/skills/kubernetes.md +110 -110
  130. package/extensions/devops/skills/monitoring.md +57 -57
  131. package/extensions/devops/skills/server-setup.md +64 -64
  132. package/extensions/devops/skills/ssl-domain.md +42 -42
  133. package/extensions/ecommerce/PACK.md +116 -116
  134. package/extensions/ecommerce/skills/cart-system.md +79 -79
  135. package/extensions/ecommerce/skills/inventory-mgmt.md +102 -102
  136. package/extensions/ecommerce/skills/order-management.md +126 -126
  137. package/extensions/ecommerce/skills/payment-integration.md +472 -472
  138. package/extensions/ecommerce/skills/shopify-dev.md +69 -69
  139. package/extensions/ecommerce/skills/subscription-billing.md +93 -93
  140. package/extensions/ecommerce/skills/tax-compliance.md +117 -117
  141. package/extensions/gamedev/PACK.md +142 -142
  142. package/extensions/gamedev/skills/asset-pipeline.md +74 -74
  143. package/extensions/gamedev/skills/audio-system.md +129 -129
  144. package/extensions/gamedev/skills/camera-system.md +87 -87
  145. package/extensions/gamedev/skills/ecs.md +98 -98
  146. package/extensions/gamedev/skills/game-loops.md +72 -72
  147. package/extensions/gamedev/skills/input-system.md +199 -199
  148. package/extensions/gamedev/skills/multiplayer.md +180 -180
  149. package/extensions/gamedev/skills/particles.md +105 -105
  150. package/extensions/gamedev/skills/physics-engine.md +89 -89
  151. package/extensions/gamedev/skills/scene-management.md +146 -146
  152. package/extensions/gamedev/skills/threejs-patterns.md +90 -90
  153. package/extensions/gamedev/skills/webgl.md +71 -71
  154. package/extensions/mobile/PACK.md +106 -106
  155. package/extensions/mobile/skills/app-store-connect.md +152 -152
  156. package/extensions/mobile/skills/app-store-prep.md +66 -66
  157. package/extensions/mobile/skills/deep-linking.md +109 -109
  158. package/extensions/mobile/skills/flutter.md +60 -60
  159. package/extensions/mobile/skills/ios-build-pipeline.md +142 -142
  160. package/extensions/mobile/skills/native-bridge.md +66 -66
  161. package/extensions/mobile/skills/ota-updates.md +97 -97
  162. package/extensions/mobile/skills/push-notifications.md +111 -111
  163. package/extensions/mobile/skills/react-native.md +82 -82
  164. package/extensions/saas/PACK.md +116 -116
  165. package/extensions/saas/skills/billing-integration.md +200 -200
  166. package/extensions/saas/skills/feature-flags.md +130 -130
  167. package/extensions/saas/skills/multi-tenant.md +103 -103
  168. package/extensions/saas/skills/onboarding-flow.md +139 -139
  169. package/extensions/saas/skills/subscription-flow.md +95 -95
  170. package/extensions/saas/skills/team-management.md +144 -144
  171. package/extensions/security/PACK.md +99 -99
  172. package/extensions/security/skills/api-security.md +140 -140
  173. package/extensions/security/skills/compliance.md +68 -68
  174. package/extensions/security/skills/owasp-audit.md +64 -64
  175. package/extensions/security/skills/pentest-patterns.md +77 -77
  176. package/extensions/security/skills/secret-mgmt.md +65 -65
  177. package/extensions/security/skills/supply-chain.md +65 -65
  178. package/extensions/trading/PACK.md +80 -80
  179. package/extensions/trading/skills/chart-components.md +55 -55
  180. package/extensions/trading/skills/experiment-loop.md +125 -125
  181. package/extensions/trading/skills/fintech-patterns.md +47 -47
  182. package/extensions/trading/skills/indicator-library.md +58 -58
  183. package/extensions/trading/skills/quant-analysis.md +111 -111
  184. package/extensions/trading/skills/realtime-data.md +58 -58
  185. package/extensions/trading/skills/trade-logic.md +104 -104
  186. package/extensions/ui/PACK.md +130 -130
  187. package/extensions/ui/skills/a11y-audit.md +91 -91
  188. package/extensions/ui/skills/animation-patterns.md +127 -106
  189. package/extensions/ui/skills/component-patterns.md +100 -75
  190. package/extensions/ui/skills/design-decision.md +108 -108
  191. package/extensions/ui/skills/design-system.md +68 -68
  192. package/extensions/ui/skills/landing-patterns.md +155 -155
  193. package/extensions/ui/skills/palette-picker.md +173 -173
  194. package/extensions/ui/skills/react-health.md +90 -90
  195. package/extensions/ui/skills/type-system.md +125 -125
  196. package/extensions/ui/skills/web-vitals.md +153 -153
  197. package/extensions/zalo/PACK.md +145 -145
  198. package/extensions/zalo/skills/zalo-oa-mcp.md +317 -317
  199. package/extensions/zalo/skills/zalo-oa-messaging.md +429 -429
  200. package/extensions/zalo/skills/zalo-oa-setup.md +236 -236
  201. package/extensions/zalo/skills/zalo-oa-webhook.md +189 -189
  202. package/extensions/zalo/skills/zalo-personal-messaging.md +194 -194
  203. package/extensions/zalo/skills/zalo-personal-setup.md +153 -153
  204. package/extensions/zalo/skills/zalo-rate-guard.md +219 -219
  205. package/hooks/auto-format/index.cjs +48 -48
  206. package/hooks/context-watch/index.cjs +95 -68
  207. package/hooks/hooks.json +111 -111
  208. package/hooks/metrics-collector/index.cjs +86 -42
  209. package/hooks/post-session-reflect/index.cjs +189 -153
  210. package/hooks/pre-compact/index.cjs +95 -95
  211. package/hooks/run-hook.cmd +1 -1
  212. package/hooks/secrets-scan/index.cjs +100 -100
  213. package/hooks/session-start/index.cjs +71 -65
  214. package/hooks/typecheck/index.cjs +65 -65
  215. package/package.json +63 -63
  216. package/references/ui-pro-max-data/LICENSE-UI-PRO-MAX +21 -21
  217. package/references/ui-pro-max-data/charts.csv +26 -26
  218. package/references/ui-pro-max-data/colors.csv +161 -161
  219. package/references/ui-pro-max-data/styles.csv +68 -68
  220. package/references/ui-pro-max-data/typography.csv +74 -74
  221. package/references/ui-pro-max-data/ui-reasoning.csv +162 -162
  222. package/references/ui-pro-max-data/ux-guidelines.csv +99 -99
  223. package/skills/adversary/SKILL.md +283 -283
  224. package/skills/asset-creator/SKILL.md +157 -157
  225. package/skills/audit/SKILL.md +148 -2
  226. package/skills/autopsy/SKILL.md +335 -259
  227. package/skills/autopsy/references/repo-analysis-patterns.md +113 -0
  228. package/skills/ba/SKILL.md +72 -2
  229. package/skills/brainstorm/SKILL.md +342 -341
  230. package/skills/browser-pilot/SKILL.md +168 -168
  231. package/skills/constraint-check/SKILL.md +165 -165
  232. package/skills/context-engine/SKILL.md +404 -404
  233. package/skills/cook/SKILL.md +917 -834
  234. package/skills/cook/references/output-format.md +33 -0
  235. package/skills/db/SKILL.md +273 -272
  236. package/skills/debug/SKILL.md +465 -443
  237. package/skills/dependency-doctor/SKILL.md +265 -235
  238. package/skills/deploy/SKILL.md +274 -231
  239. package/skills/design/DESIGN-REFERENCE.md +365 -365
  240. package/skills/design/SKILL.md +589 -482
  241. package/skills/doc-processor/SKILL.md +254 -254
  242. package/skills/docs/SKILL.md +374 -373
  243. package/skills/docs-seeker/SKILL.md +177 -177
  244. package/skills/fix/SKILL.md +330 -308
  245. package/skills/git/SKILL.md +339 -339
  246. package/skills/graft/SKILL.md +352 -0
  247. package/skills/graft/references/challenge-framework.md +98 -0
  248. package/skills/graft/references/mode-decision.md +44 -0
  249. package/skills/hallucination-guard/SKILL.md +219 -219
  250. package/skills/incident/SKILL.md +254 -251
  251. package/skills/integrity-check/SKILL.md +169 -169
  252. package/skills/journal/SKILL.md +240 -238
  253. package/skills/launch/SKILL.md +344 -342
  254. package/skills/logic-guardian/SKILL.md +251 -251
  255. package/skills/marketing/SKILL.md +290 -245
  256. package/skills/mcp-builder/SKILL.md +425 -423
  257. package/skills/mcp-builder/references/auto-discovery-pattern.md +169 -0
  258. package/skills/neural-memory/SKILL.md +362 -362
  259. package/skills/onboard/SKILL.md +404 -403
  260. package/skills/perf/SKILL.md +346 -346
  261. package/skills/plan/SKILL.md +433 -370
  262. package/skills/plan/references/feature-map.md +84 -0
  263. package/skills/preflight/SKILL.md +415 -396
  264. package/skills/problem-solver/SKILL.md +380 -284
  265. package/skills/rescue/SKILL.md +474 -450
  266. package/skills/retro/SKILL.md +5 -1
  267. package/skills/review/SKILL.md +612 -535
  268. package/skills/review-intake/SKILL.md +249 -249
  269. package/skills/safeguard/SKILL.md +200 -200
  270. package/skills/sast/SKILL.md +190 -190
  271. package/skills/scaffold/SKILL.md +328 -286
  272. package/skills/scope-guard/SKILL.md +180 -162
  273. package/skills/scout/SKILL.md +263 -263
  274. package/skills/sentinel/SKILL.md +382 -353
  275. package/skills/sentinel-env/SKILL.md +254 -254
  276. package/skills/sequential-thinking/SKILL.md +234 -234
  277. package/skills/session-bridge/SKILL.md +543 -397
  278. package/skills/skill-forge/SKILL.md +581 -539
  279. package/skills/skill-router/{skill.md → SKILL.md} +30 -2
  280. package/skills/surgeon/SKILL.md +215 -215
  281. package/skills/team/SKILL.md +556 -514
  282. package/skills/test/SKILL.md +614 -587
  283. package/skills/trend-scout/SKILL.md +145 -145
  284. package/skills/verification/SKILL.md +326 -325
  285. package/skills/video-creator/SKILL.md +201 -201
  286. package/skills/watchdog/SKILL.md +168 -168
  287. package/skills/worktree/SKILL.md +140 -140
@@ -1,482 +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.3.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
- - `review` (L2): when AI anti-pattern detected in diff
36
- - `perf` (L2): when Lighthouse Accessibility score blocks
37
- - User: `/rune design` direct invocation
38
-
39
- ## Output Files
40
-
41
- ```
42
- .rune/
43
- └── design-system.md # Design contract for all UI-generating skills
44
- ```
45
-
46
- ## Executable Steps
47
-
48
- ### Step 0 — Load Design Reference
49
-
50
- Load the design knowledge base before reasoning:
51
-
52
- 1. Check for user-level override: `~/.claude/docs/design-dna.md`
53
- - If exists → `Read` it. This is the primary reference (user's curated taste).
54
- 2. If no user override → `Read` the baseline: `skills/design/DESIGN-REFERENCE.md` (shipped with Rune)
55
- 3. The loaded reference provides: font pairings, chart selection, component architecture, color principles, UX checklist, interaction patterns, anti-pattern signatures
56
- 4. Apply reference knowledge throughout Steps 3-5 (domain reasoning, token generation, checklist)
57
-
58
- > **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.
59
-
60
- ### External Data Source
61
-
62
- Design intelligence data from [UI/UX Pro Max](https://github.com/nextlevelbuilder/ui-ux-pro-max-skill) (MIT, 42.8k★).
63
- Located at `references/ui-pro-max-data/` — 161 palettes, 84 styles, 73 font pairings, 161 reasoning rules, 99 UX guidelines.
64
-
65
- When `references/ui-pro-max-data/` is available:
66
- - Step 2: query `styles.csv` for domain-matched visual styles (expands from 10 → 84)
67
- - Step 3: query `ui-reasoning.csv` for industry-specific design rules (161 rules)
68
- - Step 3: query `colors.csv` for palette alternatives (expands from 10 → 161)
69
- - Step 6 (Anti-AI): cross-check proposed style against reasoning DB if flagged as "AI-generic", suggest 3 alternatives
70
-
71
- ### Step 1Discover
72
-
73
- Invoke `scout` to detect:
74
- - **Platform target**: `web` | `ios` (SwiftUI) | `android` (Compose) | `react-native` | `multi-platform`
75
- - **Existing design tokens**: check for `tokens.json`, `design-system/`, `theme.ts`, `tailwind.config.*`, `variables.css`
76
- - **Component library in use**: shadcn/ui | Radix | MUI | Ant Design | custom | none
77
- - **Framework**: Next.js | Vite+React | SvelteKit | Vue | SwiftUI | Jetpack Compose | other
78
-
79
- 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.
80
-
81
- ### Step 2 Classify Product Domain
82
-
83
- From the user's task description + codebase context, classify product type:
84
-
85
- | Category | Examples |
86
- |----------|---------|
87
- | **Trading/Fintech** | trading dashboard, portfolio tracker, payment app, crypto wallet |
88
- | **SaaS Dashboard** | admin panel, analytics, CRM, project management |
89
- | **Landing/Marketing** | landing page, product site, marketing page, waitlist |
90
- | **Healthcare** | patient portal, medical dashboard, health tracker |
91
- | **E-commerce** | product catalog, cart, checkout, marketplace |
92
- | **Developer Tools** | IDE plugin, CLI dashboard, API explorer, devtool |
93
- | **Creative/Portfolio** | portfolio, design showcase, art gallery, agency site |
94
- | **Social/Community** | social feed, forum, messaging, community platform |
95
- | **Mobile Consumer** | iOS/Android consumer app entertainment, productivity, lifestyle |
96
- | **AI-Native** | AI assistant interface, chatbot, model explorer |
97
-
98
- If domain is unclear: ask one clarifying question "Is this closer to X or Y?"
99
-
100
- ### Step 3Apply Domain Reasoning Rules
101
-
102
- Map domain to design system parameters:
103
-
104
- **Trading/Fintech:**
105
- ```
106
- Style: Data-Dense Dark
107
- Palette: Neutral dark (#0c1419 bg), semantic colors ONLY for profit/loss
108
- Profit: #00d084 (green) | Loss: #ff6b6b (red)
109
- Accent: #2196f3 (data highlight) — NOT purple
110
- Typography: JetBrains Mono 700 for ALL numeric values (prices, P&L, %)
111
- Inter 400 for labels, Inter 600 for headings
112
- Effects: Subtle grid lines, real-time pulse animations on live data
113
- Anti-patterns:
114
- Gradient washes on data tables (obscures precision)
115
- Accent colors that conflict with profit/loss signal colors
116
- Decorative motion (distracts from live data)
117
- Dark-on-dark text for secondary labels (contrast required)
118
- ```
119
-
120
- **SaaS Dashboard:**
121
- ```
122
- Style: Minimalism or Flat Design
123
- Palette: Professional neutrals, single brand accent (NOT purple unless brand)
124
- Light: #ffffff bg, #f8fafc surface | Dark: #0f172a bg, #1e293b surface
125
- Accent: brand-defined default #6366f1 is acceptable here as a SaaS pattern
126
- Typography: Inter 400/500/600 throughout — consistent, readable, data-friendly
127
- Space Grotesk 700 for hero/display only
128
- Effects: Skeleton loaders, subtle hover states, clean data tables
129
- Anti-patterns:
130
- ❌ Card-grid monotony (every section same layout)
131
- ❌ Animations that delay data visibility
132
- ❌ Missing empty/error states in data tables
133
- ```
134
-
135
- **Landing/Marketing:**
136
- ```
137
- Style: Glassmorphism (current era) or Aurora/Mesh
138
- Palette: Brand-expressive this is the ONE context where bold palette is correct
139
- High-contrast CTAs (must pass 4.5:1 contrast on all backgrounds)
140
- Typography: Space Grotesk 700 for hero display (48–72px)
141
- Inter 400/500 for body max line-width 720px
142
- Effects: Animated mesh gradients, floating glass cards, scroll-triggered reveals
143
- Anti-patterns:
144
- Generic hero: "big text + diagonal purple-to-blue gradient" — AI signature
145
- ❌ Centered layout throughout (breaks directional reading flow)
146
- ❌ Missing scroll animations on a static page
147
- CTAs that don't stand out from body copy
148
- ```
149
-
150
- **Healthcare:**
151
- ```
152
- Style: Trust & Authority (clean, clinical, accessible)
153
- Palette: Clean blue/white/greenNO red except clinical alerts
154
- #f0f9ff bg, #1e40af accent, #059669 success, #dc2626 CRITICAL_ONLY
155
- Typography: Inter throughout never decorative fonts
156
- Body minimum 16px for readability by older/impaired users
157
- Effects: Minimal subtle hover, no motion by default
158
- Anti-patterns:
159
- Dark mode as default (patients/elderly → light mode)
160
- ❌ Gamification patterns (inappropriate for medical context)
161
- ❌ Red for informational messages (reserved for clinical alerts)
162
- ❌ Dense data layouts without clear visual hierarchy
163
- ```
164
-
165
- **E-commerce:**
166
- ```
167
- Style: Conversion-Optimized (Warm Minimalism)
168
- Palette: Warm neutrals, high-contrast CTAs
169
- Urgency signals: #ef4444 for "low stock", #f59e0b for "sale"
170
- Typography: Bold product names (Space Grotesk 600+), readable descriptions (Inter 400)
171
- Effects: Hover zoom on product images, add-to-cart pulse, trust badges
172
- Anti-patterns:
173
- Cluttered above-fold (too many competing CTAs)
174
- Add to cart button that doesn't stand out
175
- ❌ Missing product image zoom/gallery
176
- ❌ Checkout flow with more than 3 steps visible at once
177
- ```
178
-
179
- **Developer Tools:**
180
- ```
181
- Style: Minimalism or Neubrutalism
182
- Palette: Dark mode default #0d1117 bg (GitHub-scale), #161b22 surface
183
- Syntax highlighting colors as accent palette
184
- No heavy gradients developers recognize and distrust decorative UI
185
- Typography: JetBrains Mono for code/commands, Inter for prose
186
- Effects: Keyboard shortcuts visible, dense information layout OK
187
- Anti-patterns:
188
- Decorative animations that delay tool response
189
- Non-monospace font for code blocks or command output
190
- ❌ Light mode only (developer tools default to dark)
191
- ❌ Visual noise around core functionality
192
- ```
193
-
194
- **Creative/Portfolio:**
195
- ```
196
- Style: Editorial Grid or Glassmorphism or Brutalism (brand-specific)
197
- Palette: MUST be distinctive generic palettes are disqualifying
198
- This is the one category where custom/unusual palettes are required
199
- Typography: Custom or display font as headline (NOT Inter alone)
200
- Font pairing must have contrast: Display + neutral body
201
- Effects: Curated hover reveals, scroll-based reveals, cursor effects
202
- Anti-patterns:
203
- Generic card grid with equal padding everywhere
204
- ❌ Inter-only typography (zero personality)
205
- ❌ Stock photo backgrounds
206
- Navigation that looks like every other portfolio
207
- ```
208
-
209
- **AI-Native:**
210
- ```
211
- Style: Minimal Functional or Glassmorphism
212
- Palette: Purple/violet IS acceptable here (it is the AI-native signal)
213
- #7c3aed accent, dark neutral bg, subtle gradients
214
- Typography: Inter throughout — clarity over personality
215
- Effects: Typing indicators, streaming text, thinking states
216
- Anti-patterns:
217
- Purple on non-AI product (exports the AI signal to inappropriate contexts)
218
- Static empty states AI interfaces must show "thinking" states
219
- ❌ Missing latency UX (skeleton during generation, cancel button)
220
- ```
221
-
222
- ### Step 4 — Platform-Specific Overrides
223
-
224
- Apply platform conventions on top of domain rules:
225
-
226
- **iOS (SwiftUI / iOS 26+):**
227
- ```
228
- Visual language: Liquid Glass translucent surfaces with backdrop blur
229
- background: UIBlurEffect or .regularMaterial
230
- border: subtle 1px rgba(white, 0.15) NOT solid
231
- roundness: aggressive corner radius (16–24px on cards, full on buttons)
232
- Icons: SF Symbols ONLY — not Heroicons, not Lucide
233
- Typography: SF Pro family Dynamic Type scaling is mandatory
234
- Safe areas: Content must respect safeAreaInsets on all edges
235
- Anti-patterns:
236
- ❌ Solid-background cards (deprecated in iOS 26 Liquid Glass era)
237
- ❌ Custom icon fonts (SF Symbols is the platform contract)
238
- Fixed font sizes (Dynamic Type must be supported)
239
- ```
240
-
241
- **Android (Jetpack Compose / Material 3 Expressive):**
242
- ```
243
- Color: MaterialTheme.colorScheme — dynamic color derived from wallpaper
244
- NEVER hardcode hex colors in Compose use semantic tokens
245
- Shape: Extreme corner expressivenessuse shape variation as affordance signal
246
- Small interactive: RoundedCornerShape(4dp)
247
- Cards/surfaces: RoundedCornerShape(16dp)
248
- FABs: CircleShape
249
- Motion: Spring physicstween() is almost never the right choice
250
- spring(dampingRatio = Spring.DampingRatioMediumBouncy)
251
- Anti-patterns:
252
- ❌ Hardcoded hex colors (breaks dynamic color contract)
253
- Linear easing (Material 3 Expressive uses spring physics)
254
- ❌ Small corner radii (shape expressiveness is a key M3 Expressive principle)
255
- ```
256
-
257
- **Web:**
258
- - Apply domain rules from Step 3
259
- - Default: dark mode support required (`prefers-color-scheme: dark`)
260
- - Responsive: must design for 375px, 768px, 1024px, 1440px breakpoints
261
- - Accessibility: WCAG 2.2 AA minimum
262
-
263
- ### Step 5 Generate Design System File
264
-
265
- Use `Write` to create `.rune/design-system.md`:
266
-
267
- ```markdown
268
- # Design System: [Project Name]
269
- Last Updated: [YYYY-MM-DD]
270
- Platform: [web | ios | android | multi-platform]
271
- Domain: [product category]
272
- Style: [chosen style]
273
-
274
- ## Color Tokens
275
-
276
- ### Primitive (raw values)
277
- --color-[name]-[scale]: [hex]
278
-
279
- ### Semantic (meaning-mapped)
280
- --bg-base: [value] page background
281
- --bg-surface: [value] card/panel background
282
- --bg-elevated: [value] — modal/dropdown background
283
- --text-primary: [value] — primary text
284
- --text-secondary: [value] — secondary/muted text
285
- --border: [value] — default border
286
- --accent: [value] — primary action/brand
287
- --success: [value] — positive/profit signal
288
- --danger: [value] — error/loss signal
289
- --warning: [value] — caution signal
290
-
291
- ## Typography
292
-
293
- | Role | Font | Weight | Size |
294
- |------|------|--------|------|
295
- | Display | [font] | [weight] | [px range] |
296
- | H1 | [font] | [weight] | [px] |
297
- | H2/H3 | [font] | [weight] | [px] |
298
- | Body | [font] | [weight] | [px] |
299
- | Mono/Numbers | [font] | [weight] | [px] |
300
-
301
- Numbers rule: [monospace font] for ALL numeric values in this domain (prices, metrics, IDs)
302
-
303
- ## Spacing (8px base)
304
- xs: 4px | sm: 8px | md: 16px | lg: 24px | xl: 32px | 2xl: 48px | 3xl: 64px
305
-
306
- ## Border Radius
307
- sm: 6px | md: 8px | lg: 12px | xl: 16px | full: 9999px
308
-
309
- ## Effects
310
- [signature effects for this style gradients, shadows, blur, etc.]
311
-
312
- ## Anti-Patterns (MUST NOT generate these)
313
- [domain-specific list from Step 3 + platform overrides]
314
- - ❌ [anti-pattern 1] [why it fails in this domain]
315
- - [anti-pattern 2]
316
-
317
- ## Platform Notes
318
- [platform-specific implementation requirements from Step 4]
319
-
320
- ## Component Library
321
- [detected library or "custom"]
322
-
323
- ## Pre-Delivery Checklist
324
- - [ ] Color contrast 4.5:1 for all text
325
- - [ ] Focus-visible ring on ALL interactive elements (never outline-none alone)
326
- - [ ] Touch targets 24×24px with 8px gap between targets
327
- - [ ] All icon-only buttons have aria-label
328
- - [ ] All inputs have associated <label> or aria-label
329
- - [ ] Empty state, error state, loading state for all async data
330
- - [ ] cursor-pointer on all clickable non-button elements
331
- - [ ] prefers-reduced-motion respected for all animations
332
- - [ ] Dark mode support (or explicit reasoning why not)
333
- - [ ] Responsive tested at 375px / 768px / 1024px / 1440px
334
- ```
335
-
336
- ### Step 6 — Accessibility Review
337
-
338
- 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.
339
-
340
- **Automated checks** (use Grep on codebase):
341
- 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.
342
- 2. **Focus indicators**: Search for `outline-none`, `outline: none`, `focus:outline-none` without a replacement `focus-visible` ring. Every instance is a violation.
343
- 3. **Touch targets**: Search for buttons/links with explicit small sizing (`w-6 h-6`, `p-1` on interactive elements). Flag anything < 24x24px.
344
- 4. **Missing labels**: Search for `<input` without adjacent `<label` or `aria-label`. Search for icon-only buttons without `aria-label`.
345
- 5. **Semantic HTML**: Flag `<div onClick`, `<span onClick` (should be `<button>`). Flag missing `<nav>`, `<main>`, `<header>` landmarks.
346
- 6. **Motion safety**: Check for animations/transitions without `prefers-reduced-motion` media query or Tailwind `motion-reduce:` variant.
347
-
348
- **Output**: Accessibility audit section in Design Report with pass/fail per check and specific file:line violations.
349
-
350
- If violations found → add them to `.rune/design-system.md` Anti-Patterns section as concrete rules.
351
-
352
- ### Step 7 UX Writing Patterns
353
-
354
- Generate microcopy guidelines specific to this product domain. UX writing is part of design — not an afterthought.
355
-
356
- **Domain-specific microcopy rules:**
357
-
358
- | Domain | Tone | Error Pattern | CTA Pattern | Empty State |
359
- |--------|------|---------------|-------------|-------------|
360
- | Trading/Fintech | Precise, neutral, no humor | "Order failed: insufficient margin ($X required)" | "Place Order", "Close Position" | "No open positions. Market opens in 2h 15m." |
361
- | SaaS Dashboard | Professional, helpful | "Couldn't save changes. Try again or contact support." | "Get Started", "Upgrade Plan" | "No data yet. Connect your first integration." |
362
- | 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?" |
363
- | Healthcare | Calm, clinical, clear | "We couldn't verify your insurance. Please check your member ID." | "Schedule Visit", "View Results" | "No upcoming appointments." |
364
- | Developer Tools | Direct, technical | "Build failed: missing dependency `@types/node`" | "Deploy", "Run Tests" | "No builds yet. Push to trigger CI." |
365
-
366
- **Generate for this project:**
367
- - Error message template: `[What happened] + [Why] + [What to do next]`
368
- - Empty state template: `[What's missing] + [How to fill it]`
369
- - Confirmation template: `[What will happen] + [Reversibility]`
370
- - Loading text: context-appropriate (not just "Loading...")
371
- - Button label rules: verb-first, specific action (not "Submit", "Click Here")
372
-
373
- Add UX writing guidelines to `.rune/design-system.md` under a new `## UX Writing` section.
374
-
375
- ### Step 8 — Report
376
-
377
- Emit design summary to calling skill:
378
-
379
- ```
380
- ## Design Report: [Project Name]
381
-
382
- ### Domain Classification
383
- [product category] [style chosen] [platform]
384
-
385
- ### Design System Generated
386
- .rune/design-system.md
387
-
388
- ### Key Decisions
389
- - Accent: [color + reasoning why this color for this domain]
390
- - Typography: [pairing + reasoning]
391
- - Style: [style name + why it fits this product]
392
-
393
- ### Anti-Patterns Registered (will be flagged by review)
394
- - ❌ [n] domain-specific patterns
395
- - ❌ [n] platform-specific patterns
396
-
397
- ### Pre-Delivery Checklist
398
- [count] items to verify before shipping
399
- ```
400
-
401
- ## Output Format
402
-
403
- ```
404
- ## Design Report: TradingOS Dashboard
405
-
406
- ### Domain Classification
407
- Trading/Fintech Data-Dense Dark Web
408
-
409
- ### Design System Generated
410
- .rune/design-system.md
411
-
412
- ### Key Decisions
413
- - Accent: #2196f3 (blue) neutral data highlight; profit/loss colors (#00d084/#ff6b6b)
414
- are reserved as semantic signals, not brand colors
415
- - Typography: JetBrains Mono 700 for all numeric values (prices, P&L, %),
416
- Inter 400/600 for prose and labels
417
- - Style: Data-Dense Dark users scan real-time data under time pressure;
418
- decorative elements compete with data for attention
419
-
420
- ### Anti-Patterns Registered
421
- - 4 domain-specific (gradient wash, conflicting accent colors, decorative motion, dark-on-dark)
422
- - ❌ 1 platform-specific (fixed font sizes not applicable — web target)
423
-
424
- ### Pre-Delivery Checklist
425
- 12 items to verify before shipping
426
- ```
427
-
428
- ## Constraints
429
-
430
- 1. MUST classify domain before generating design system — never generate with unknown domain
431
- 2. MUST include anti-pattern list in every design system — a system without anti-patterns is incomplete
432
- 3. MUST NOT use purple/indigo as default accent unless domain is AI-Native or explicitly brand-purple
433
- 4. MUST write `.rune/design-system.md` — ephemeral design decisions evaporate; persistence is the point
434
- 5. MUST NOT overwrite existing design-system.md without user confirmation
435
- 6. MUST include platform-specific overrides when platform is iOS or Android
436
-
437
- ## Mesh Gates (L1/L2 only)
438
-
439
- | Gate | Requires | If Missing |
440
- |------|----------|------------|
441
- | Domain Gate | Product domain classified before generating tokens | Ask clarifying question |
442
- | Anti-Pattern Gate | Anti-pattern list derived from domain rules (not generic) | Domain-specific list required |
443
- | Persistence Gate | .rune/design-system.md written before reporting done | Write file first |
444
- | Platform Gate | Platform detected before generating tokens | Default to web, note assumption |
445
-
446
- ## Returns
447
-
448
- | Artifact | Format | Location |
449
- |----------|--------|----------|
450
- | Design system file | Markdown | `.rune/design-system.md` |
451
- | Design report | Markdown | inline (chat output) |
452
- | Accessibility audit findings | Markdown list | inline + appended to design-system.md |
453
- | UX writing guidelines | Markdown section | `.rune/design-system.md` § UX Writing |
454
-
455
- ## Sharp Edges
456
-
457
- Known failure modes for this skill. Check these before declaring done.
458
-
459
- | Failure Mode | Severity | Mitigation |
460
- |---|---|---|
461
- | Generating generic design system without domain classification | CRITICAL | Domain Gate blocks this classify first |
462
- | Purple/indigo accent on non-AI-native product | HIGH | Constraint 3 blocks this re-generate with domain-appropriate accent |
463
- | Anti-pattern list copied from generic sources (not domain-specific) | HIGH | Each anti-pattern must cite why it fails in THIS specific domain |
464
- | design-system.md not written (only reported verbally) | HIGH | Constraint 4 — no file = no persistence = future sessions lose design context |
465
- | iOS target generating solid-background cards | MEDIUM | Platform Gate: iOS 26 Liquid Glass deprecates this pattern |
466
- | Android target using hardcoded hex colors | MEDIUM | Platform Gate: MaterialTheme.colorScheme is mandatory for dynamic color |
467
-
468
- ## Done When
469
-
470
- - Design reference loaded (user override or baseline)
471
- - Domain classified (one of the 10 categories or explicit custom reasoning)
472
- - Design system generated with: colors (primitive + semantic), typography, spacing, effects, anti-patterns
473
- - Platform-specific overrides applied (if iOS/Android target)
474
- - Accessibility review completed (6 checks: contrast, focus, touch targets, labels, semantic HTML, motion)
475
- - UX writing guidelines generated (error, empty state, confirmation, loading, button templates)
476
- - `.rune/design-system.md` written (includes UX Writing section)
477
- - Design Report emitted with accent/typography reasoning and anti-pattern count
478
- - Pre-Delivery Checklist included in design-system.md
479
-
480
- ## Cost Profile
481
-
482
- ~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 throughoutnever decorative fonts
183
+ Body minimum 16px for readability by older/impaired users
184
+ Effects: Minimalsubtle 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 statesAI interfaces must show "thinking" states
246
+ Missing latency UX (skeleton during generation, cancel button)
247
+ ```
248
+
249
+ ### Step 4Platform-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.56-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.