@rune-kit/rune 2.2.0 → 2.2.1
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/README.md +40 -34
- package/compiler/__tests__/pack-split.test.js +145 -0
- package/compiler/bin/rune.js +0 -5
- package/compiler/doctor.js +42 -0
- package/compiler/emitter.js +27 -4
- package/compiler/parser.js +41 -3
- package/compiler/transformer.js +10 -6
- package/compiler/transforms/compliance.js +40 -0
- package/extensions/ai-ml/PACK.md +38 -474
- package/extensions/ai-ml/skills/ai-agents.md +172 -0
- package/extensions/ai-ml/skills/code-sandbox.md +187 -0
- package/extensions/ai-ml/skills/deep-research.md +146 -0
- package/extensions/ai-ml/skills/embedding-search.md +66 -0
- package/extensions/ai-ml/skills/fine-tuning-guide.md +74 -0
- package/extensions/ai-ml/skills/llm-architect.md +125 -0
- package/extensions/ai-ml/skills/llm-integration.md +64 -0
- package/extensions/ai-ml/skills/prompt-patterns.md +72 -0
- package/extensions/ai-ml/skills/rag-patterns.md +66 -0
- package/extensions/ai-ml/skills/web-extraction.md +114 -0
- package/extensions/analytics/PACK.md +19 -484
- package/extensions/analytics/skills/ab-testing.md +72 -0
- package/extensions/analytics/skills/dashboard-patterns.md +83 -0
- package/extensions/analytics/skills/data-validation.md +68 -0
- package/extensions/analytics/skills/funnel-analysis.md +81 -0
- package/extensions/analytics/skills/sql-patterns.md +57 -0
- package/extensions/analytics/skills/statistical-analysis.md +79 -0
- package/extensions/analytics/skills/tracking-setup.md +71 -0
- package/extensions/backend/PACK.md +44 -618
- package/extensions/backend/skills/api-patterns.md +84 -0
- package/extensions/backend/skills/async-pipeline.md +193 -0
- package/extensions/backend/skills/auth-patterns.md +97 -0
- package/extensions/backend/skills/background-jobs.md +133 -0
- package/extensions/backend/skills/caching-patterns.md +108 -0
- package/extensions/backend/skills/cli-generation.md +133 -0
- package/extensions/backend/skills/database-patterns.md +87 -0
- package/extensions/backend/skills/middleware-patterns.md +104 -0
- package/extensions/chrome-ext/PACK.md +19 -921
- package/extensions/chrome-ext/skills/cws-preflight.md +143 -0
- package/extensions/chrome-ext/skills/cws-publish.md +104 -0
- package/extensions/chrome-ext/skills/ext-ai-integration.md +251 -0
- package/extensions/chrome-ext/skills/ext-messaging.md +139 -0
- package/extensions/chrome-ext/skills/ext-storage.md +133 -0
- package/extensions/chrome-ext/skills/mv3-scaffold.md +164 -0
- package/extensions/content/PACK.md +43 -335
- package/extensions/content/skills/blog-patterns.md +88 -0
- package/extensions/content/skills/cms-integration.md +131 -0
- package/extensions/content/skills/content-scoring.md +107 -0
- package/extensions/content/skills/i18n.md +83 -0
- package/extensions/content/skills/mdx-authoring.md +137 -0
- package/extensions/content/skills/reference.md +1014 -0
- package/extensions/content/skills/seo-patterns.md +67 -0
- package/extensions/content/skills/video-repurpose.md +153 -0
- package/extensions/devops/PACK.md +38 -457
- package/extensions/devops/skills/chaos-testing.md +67 -0
- package/extensions/devops/skills/ci-cd.md +75 -0
- package/extensions/devops/skills/docker.md +58 -0
- package/extensions/devops/skills/edge-serverless.md +163 -0
- package/extensions/devops/skills/infra-as-code.md +158 -0
- package/extensions/devops/skills/kubernetes.md +110 -0
- package/extensions/devops/skills/monitoring.md +57 -0
- package/extensions/devops/skills/server-setup.md +64 -0
- package/extensions/devops/skills/ssl-domain.md +42 -0
- package/extensions/ecommerce/PACK.md +62 -226
- package/extensions/ecommerce/skills/cart-system.md +79 -0
- package/extensions/ecommerce/skills/inventory-mgmt.md +102 -0
- package/extensions/ecommerce/skills/order-management.md +126 -0
- package/extensions/ecommerce/skills/payment-integration.md +472 -0
- package/extensions/ecommerce/skills/shopify-dev.md +69 -0
- package/extensions/ecommerce/skills/subscription-billing.md +93 -0
- package/extensions/ecommerce/skills/tax-compliance.md +117 -0
- package/extensions/gamedev/PACK.md +66 -317
- package/extensions/gamedev/skills/asset-pipeline.md +74 -0
- package/extensions/gamedev/skills/audio-system.md +129 -0
- package/extensions/gamedev/skills/camera-system.md +87 -0
- package/extensions/gamedev/skills/ecs.md +98 -0
- package/extensions/gamedev/skills/game-loops.md +72 -0
- package/extensions/gamedev/skills/input-system.md +199 -0
- package/extensions/gamedev/skills/multiplayer.md +180 -0
- package/extensions/gamedev/skills/particles.md +105 -0
- package/extensions/gamedev/skills/physics-engine.md +89 -0
- package/extensions/gamedev/skills/scene-management.md +146 -0
- package/extensions/gamedev/skills/threejs-patterns.md +90 -0
- package/extensions/gamedev/skills/webgl.md +71 -0
- package/extensions/mobile/PACK.md +56 -223
- package/extensions/mobile/skills/app-store-connect.md +152 -0
- package/extensions/mobile/skills/app-store-prep.md +66 -0
- package/extensions/mobile/skills/deep-linking.md +109 -0
- package/extensions/mobile/skills/flutter.md +60 -0
- package/extensions/mobile/skills/ios-build-pipeline.md +142 -0
- package/extensions/mobile/skills/native-bridge.md +66 -0
- package/extensions/mobile/skills/ota-updates.md +97 -0
- package/extensions/mobile/skills/push-notifications.md +111 -0
- package/extensions/mobile/skills/react-native.md +82 -0
- package/extensions/saas/PACK.md +26 -720
- package/extensions/saas/skills/billing-integration.md +121 -0
- package/extensions/saas/skills/feature-flags.md +130 -0
- package/extensions/saas/skills/multi-tenant.md +103 -0
- package/extensions/saas/skills/onboarding-flow.md +139 -0
- package/extensions/saas/skills/subscription-flow.md +95 -0
- package/extensions/saas/skills/team-management.md +144 -0
- package/extensions/security/PACK.md +10 -448
- package/extensions/security/skills/api-security.md +140 -0
- package/extensions/security/skills/compliance.md +68 -0
- package/extensions/security/skills/owasp-audit.md +64 -0
- package/extensions/security/skills/pentest-patterns.md +77 -0
- package/extensions/security/skills/secret-mgmt.md +65 -0
- package/extensions/security/skills/supply-chain.md +65 -0
- package/extensions/trading/PACK.md +18 -535
- package/extensions/trading/skills/chart-components.md +55 -0
- package/extensions/trading/skills/experiment-loop.md +125 -0
- package/extensions/trading/skills/fintech-patterns.md +47 -0
- package/extensions/trading/skills/indicator-library.md +58 -0
- package/extensions/trading/skills/quant-analysis.md +111 -0
- package/extensions/trading/skills/realtime-data.md +58 -0
- package/extensions/trading/skills/trade-logic.md +104 -0
- package/extensions/ui/PACK.md +34 -853
- package/extensions/ui/skills/a11y-audit.md +91 -0
- package/extensions/ui/skills/animation-patterns.md +106 -0
- package/extensions/ui/skills/component-patterns.md +75 -0
- package/extensions/ui/skills/design-decision.md +98 -0
- package/extensions/ui/skills/design-system.md +68 -0
- package/extensions/ui/skills/landing-patterns.md +155 -0
- package/extensions/ui/skills/palette-picker.md +162 -0
- package/extensions/ui/skills/react-health.md +90 -0
- package/extensions/ui/skills/type-system.md +125 -0
- package/extensions/ui/skills/web-vitals.md +153 -0
- package/extensions/zalo/PACK.md +117 -0
- package/extensions/zalo/skills/zalo-oa-mcp.md +317 -0
- package/extensions/zalo/skills/zalo-oa-messaging.md +429 -0
- package/extensions/zalo/skills/zalo-oa-setup.md +236 -0
- package/extensions/zalo/skills/zalo-oa-webhook.md +189 -0
- package/extensions/zalo/skills/zalo-personal-messaging.md +194 -0
- package/extensions/zalo/skills/zalo-personal-setup.md +153 -0
- package/extensions/zalo/skills/zalo-rate-guard.md +219 -0
- package/package.json +1 -1
- package/skills/brainstorm/SKILL.md +63 -1
- package/skills/cook/SKILL.md +84 -5
- package/skills/mcp-builder/SKILL.md +48 -1
- package/skills/review/SKILL.md +42 -5
- package/skills/review-intake/SKILL.md +17 -1
- package/skills/skill-router/SKILL.md +89 -7
- package/skills/team/SKILL.md +24 -1
- package/skills/test/SKILL.md +18 -0
- package/skills/verification/SKILL.md +40 -1
package/extensions/ui/PACK.md
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "@rune/ui"
|
|
3
|
-
description: Frontend UI patterns — design systems, color palettes, typography, component architecture, landing page sections, accessibility audits, animation patterns, and design decision mapping.
|
|
3
|
+
description: Frontend UI patterns — React health scoring, Core Web Vitals auditing, design systems, color palettes, typography, component architecture, landing page sections, accessibility audits, animation patterns, and design decision mapping.
|
|
4
4
|
metadata:
|
|
5
5
|
author: runedev
|
|
6
|
-
version: "0.
|
|
6
|
+
version: "0.3.0"
|
|
7
7
|
layer: L4
|
|
8
8
|
price: "$12"
|
|
9
9
|
target: Frontend developers
|
|
10
|
+
format: split
|
|
10
11
|
---
|
|
11
12
|
|
|
12
13
|
# @rune/ui
|
|
13
14
|
|
|
14
15
|
## Purpose
|
|
15
16
|
|
|
16
|
-
Frontend development accumulates invisible debt: ad-hoc color variables, mismatched font pairings, prop-drilled components, untested accessibility,
|
|
17
|
+
Frontend development accumulates invisible debt: ad-hoc color variables, mismatched font pairings, prop-drilled components, untested accessibility, janky animations, React anti-patterns, and slow page loads — all before you even decide what the product should *look* like. This pack addresses all layers systematically. Ten skills cover the full UI lifecycle: React codebase health scoring, Core Web Vitals performance auditing, token consistency, color palette selection, typography pairing, component composability, landing page structure, design-domain mapping, WCAG compliance, and motion polish. Run any skill independently or chain all ten as a comprehensive UI health check + design foundation generator.
|
|
17
18
|
|
|
18
19
|
**Anti-AI Design Contract** (enforced by all skills in this pack):
|
|
19
20
|
- NO gradient blob heroes (purple → pink → blue)
|
|
@@ -33,879 +34,57 @@ Frontend development accumulates invisible debt: ad-hoc color variables, mismatc
|
|
|
33
34
|
- `/rune design-decision` — map product domain to full style recommendation
|
|
34
35
|
- `/rune a11y-audit` — run accessibility audit
|
|
35
36
|
- `/rune animation-patterns` — add or refine motion design
|
|
37
|
+
- `/rune react-health` — score React codebase health (0-100)
|
|
38
|
+
- `/rune web-vitals` — audit Core Web Vitals and performance
|
|
36
39
|
- Called by `cook` (L1) when frontend task is detected
|
|
37
40
|
- Called by `review` (L2) when UI code is under review
|
|
38
41
|
- Called by `design` (L2) when visual design decisions needed
|
|
39
42
|
|
|
40
43
|
## Skills Included
|
|
41
44
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
Generate and enforce design system tokens — colors, typography, spacing, shadows, border radius.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
From the inventory, produce a CSS custom properties file (or `tailwind.config` theme extension). Group tokens into semantic layers: primitive → semantic → component. Flag duplicates and near-duplicates (e.g., `#1a1a2e` vs `#1a1a2f`).
|
|
55
|
-
|
|
56
|
-
**Step 3 — Enforce consistency**
|
|
57
|
-
Re-run Grep after token file is written. Any hardcoded value that has a matching token is flagged as a violation. Output a replacement diff for each violation.
|
|
58
|
-
|
|
59
|
-
**Step 4 — Dark/light theme toggle**
|
|
60
|
-
Emit a `[data-theme]`-based theme switcher. Semantic tokens point to different primitives per theme. No JavaScript duplication — CSS handles the switch; JS only toggles the attribute.
|
|
61
|
-
|
|
62
|
-
#### Example
|
|
63
|
-
|
|
64
|
-
```css
|
|
65
|
-
/* tokens.css — generated by design-system skill */
|
|
66
|
-
:root,
|
|
67
|
-
[data-theme="light"] {
|
|
68
|
-
/* Primitive */
|
|
69
|
-
--color-slate-950: #020617;
|
|
70
|
-
--color-slate-900: #0f172a;
|
|
71
|
-
--color-slate-100: #f1f5f9;
|
|
72
|
-
--color-emerald-500: #10b981;
|
|
73
|
-
--space-4: 1rem;
|
|
74
|
-
--radius-md: 0.5rem;
|
|
75
|
-
|
|
76
|
-
/* Semantic */
|
|
77
|
-
--bg-base: var(--color-slate-100);
|
|
78
|
-
--bg-card: #ffffff;
|
|
79
|
-
--text-primary: var(--color-slate-950);
|
|
80
|
-
--color-primary: var(--color-emerald-500);
|
|
81
|
-
--border-color: rgba(0, 0, 0, 0.1);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
[data-theme="dark"] {
|
|
85
|
-
--bg-base: var(--color-slate-950);
|
|
86
|
-
--bg-card: var(--color-slate-900);
|
|
87
|
-
--text-primary: #f8fafc;
|
|
88
|
-
--color-primary: var(--color-emerald-500);
|
|
89
|
-
--border-color: rgba(255, 255, 255, 0.08);
|
|
90
|
-
}
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
```ts
|
|
94
|
-
// theme-toggle.ts — minimal toggle, no flash on reload
|
|
95
|
-
const stored = localStorage.getItem('theme') ?? 'dark'
|
|
96
|
-
document.documentElement.setAttribute('data-theme', stored)
|
|
97
|
-
|
|
98
|
-
export function toggleTheme() {
|
|
99
|
-
const next = document.documentElement.getAttribute('data-theme') === 'dark' ? 'light' : 'dark'
|
|
100
|
-
document.documentElement.setAttribute('data-theme', next)
|
|
101
|
-
localStorage.setItem('theme', next)
|
|
102
|
-
}
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
---
|
|
106
|
-
|
|
107
|
-
### palette-picker
|
|
108
|
-
|
|
109
|
-
Color palette database organized by product type. 25 curated palettes covering fintech, healthcare, education, gaming, ecommerce, SaaS, social, news/content, productivity, and developer tools — each with CSS custom properties, Tailwind config extension, dark/light variants, and colorblind-safe alternatives.
|
|
110
|
-
|
|
111
|
-
#### Workflow
|
|
112
|
-
|
|
113
|
-
**Step 1 — Detect product type**
|
|
114
|
-
Read `CLAUDE.md`, `README.md`, or ask: "What does this product do?" Classify into one of: fintech | healthcare | education | gaming | ecommerce | saas | social | news-content | productivity | devtools.
|
|
115
|
-
|
|
116
|
-
**Step 2 — Recommend palette**
|
|
117
|
-
Apply the decision tree below. Output the top 2 palette candidates with rationale (mood, contrast profile, brand signal).
|
|
118
|
-
|
|
119
|
-
**Step 3 — Generate token file**
|
|
120
|
-
Emit `palette.css` with CSS custom properties for the chosen palette. Include both dark and light variants. Include Tailwind `theme.extend.colors` block.
|
|
121
|
-
|
|
122
|
-
**Step 4 — Verify contrast ratios**
|
|
123
|
-
Run contrast checks: primary text on background (≥ 4.5:1), large headings (≥ 3:1), interactive elements on their backgrounds. Flag any failure. Substitute colorblind-safe alternative if requested.
|
|
124
|
-
|
|
125
|
-
#### Decision Tree
|
|
126
|
-
|
|
127
|
-
```
|
|
128
|
-
Product Type → Palette Recommendation
|
|
129
|
-
─────────────────────────────────────────────────
|
|
130
|
-
fintech / trading → Midnight Profit (dark bg + green/red signals)
|
|
131
|
-
healthcare → Clean Clinic (white/teal, high readability)
|
|
132
|
-
education / kids → Warm Academy (amber/orange, approachable)
|
|
133
|
-
gaming → Neon Arena (dark + electric cyan/magenta)
|
|
134
|
-
ecommerce → Trust Cart (white + amber CTA + forest green)
|
|
135
|
-
saas / dashboard → Slate Precision (slate-900 + blue-500 accents)
|
|
136
|
-
social / community → Gradient Social (slate + violet/fuchsia gradient)
|
|
137
|
-
news / content → Neutral Ink (off-white + near-black, serif-ready)
|
|
138
|
-
productivity / tools → Calm Focus (gray-50 + indigo-700, minimal noise)
|
|
139
|
-
developer tools → Terminal Dark (zinc-950 + emerald-400 mono)
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
#### Palette Reference
|
|
143
|
-
|
|
144
|
-
```css
|
|
145
|
-
/* ── PALETTE: Midnight Profit (Fintech/Trading) ─────────────── */
|
|
146
|
-
[data-palette="midnight-profit"][data-theme="dark"] {
|
|
147
|
-
--bg-base: #0c1419;
|
|
148
|
-
--bg-card: #121a20;
|
|
149
|
-
--bg-elevated: #1a2332;
|
|
150
|
-
--text-primary: #ffffff;
|
|
151
|
-
--text-secondary: #a0aeb8;
|
|
152
|
-
--border: #2a3f52;
|
|
153
|
-
--profit: #00d084; /* green — gains */
|
|
154
|
-
--loss: #ff6b6b; /* red — losses */
|
|
155
|
-
--accent: #2196f3;
|
|
156
|
-
/* Colorblind (deuteranopia): profit→#1e88e5, loss→#ffa726 */
|
|
157
|
-
}
|
|
158
|
-
[data-palette="midnight-profit"][data-theme="light"] {
|
|
159
|
-
--bg-base: #faf8f3;
|
|
160
|
-
--bg-card: #f5f0ea;
|
|
161
|
-
--text-primary: #0c1419;
|
|
162
|
-
--text-secondary: #4a5568;
|
|
163
|
-
--border: #d1cfc9;
|
|
164
|
-
--profit: #059669;
|
|
165
|
-
--loss: #dc2626;
|
|
166
|
-
--accent: #1d4ed8;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
/* ── PALETTE: Clean Clinic (Healthcare) ─────────────────────── */
|
|
170
|
-
[data-palette="clean-clinic"] {
|
|
171
|
-
--bg-base: #f0fafa;
|
|
172
|
-
--bg-card: #ffffff;
|
|
173
|
-
--text-primary: #0d1f2d;
|
|
174
|
-
--text-secondary: #4b6070;
|
|
175
|
-
--border: #c7e8ea;
|
|
176
|
-
--primary: #0891b2; /* cyan-600 */
|
|
177
|
-
--secondary: #0d9488; /* teal-600 */
|
|
178
|
-
--accent: #06b6d4;
|
|
179
|
-
--danger: #ef4444;
|
|
180
|
-
--success: #16a34a;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
/* ── PALETTE: Slate Precision (SaaS/Dashboard) ───────────────── */
|
|
184
|
-
[data-palette="slate-precision"][data-theme="dark"] {
|
|
185
|
-
--bg-base: #0f172a;
|
|
186
|
-
--bg-card: #1e293b;
|
|
187
|
-
--bg-elevated: #334155;
|
|
188
|
-
--text-primary: #f8fafc;
|
|
189
|
-
--text-secondary: #94a3b8;
|
|
190
|
-
--primary: #3b82f6; /* blue-500 */
|
|
191
|
-
--success: #10b981;
|
|
192
|
-
--danger: #ef4444;
|
|
193
|
-
--warning: #f59e0b;
|
|
194
|
-
}
|
|
195
|
-
[data-palette="slate-precision"][data-theme="light"] {
|
|
196
|
-
--bg-base: #ffffff;
|
|
197
|
-
--bg-card: #f8fafc;
|
|
198
|
-
--bg-elevated: #f1f5f9;
|
|
199
|
-
--text-primary: #0f172a;
|
|
200
|
-
--text-secondary: #475569;
|
|
201
|
-
--primary: #2563eb;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
/* ── PALETTE: Neon Arena (Gaming) ────────────────────────────── */
|
|
205
|
-
[data-palette="neon-arena"] {
|
|
206
|
-
--bg-base: #080c10;
|
|
207
|
-
--bg-card: #0f1520;
|
|
208
|
-
--text-primary: #e8f4f8;
|
|
209
|
-
--text-secondary: #7a9ab0;
|
|
210
|
-
--primary: #00ffe0; /* electric cyan */
|
|
211
|
-
--secondary: #ff2d78; /* hot magenta */
|
|
212
|
-
--accent: #ffe600; /* warning yellow */
|
|
213
|
-
--border: rgba(0, 255, 224, 0.15);
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
/* ── PALETTE: Trust Cart (Ecommerce) ─────────────────────────── */
|
|
217
|
-
[data-palette="trust-cart"][data-theme="light"] {
|
|
218
|
-
--bg-base: #ffffff;
|
|
219
|
-
--bg-card: #fafafa;
|
|
220
|
-
--text-primary: #111827;
|
|
221
|
-
--text-secondary: #6b7280;
|
|
222
|
-
--cta: #f97316; /* orange-500 — add-to-cart */
|
|
223
|
-
--success: #16a34a; /* forest green — in stock */
|
|
224
|
-
--trust: #1d4ed8; /* blue — secure badge */
|
|
225
|
-
--border: #e5e7eb;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
/* ── PALETTE: Terminal Dark (Developer Tools) ────────────────── */
|
|
229
|
-
[data-palette="terminal-dark"] {
|
|
230
|
-
--bg-base: #09090b; /* zinc-950 */
|
|
231
|
-
--bg-card: #18181b; /* zinc-900 */
|
|
232
|
-
--bg-elevated: #27272a; /* zinc-800 */
|
|
233
|
-
--text-primary: #fafafa;
|
|
234
|
-
--text-secondary: #a1a1aa;
|
|
235
|
-
--primary: #34d399; /* emerald-400 — code green */
|
|
236
|
-
--accent: #818cf8; /* indigo-400 — links */
|
|
237
|
-
--border: #3f3f46;
|
|
238
|
-
--comment: #71717a;
|
|
239
|
-
}
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
```js
|
|
243
|
-
// tailwind.config.js — extending with palette tokens
|
|
244
|
-
/** @type {import('tailwindcss').Config} */
|
|
245
|
-
module.exports = {
|
|
246
|
-
theme: {
|
|
247
|
-
extend: {
|
|
248
|
-
colors: {
|
|
249
|
-
profit: 'var(--profit)',
|
|
250
|
-
loss: 'var(--loss)',
|
|
251
|
-
primary: 'var(--primary)',
|
|
252
|
-
'bg-base': 'var(--bg-base)',
|
|
253
|
-
'bg-card': 'var(--bg-card)',
|
|
254
|
-
'text-primary': 'var(--text-primary)',
|
|
255
|
-
'text-secondary': 'var(--text-secondary)',
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
---
|
|
263
|
-
|
|
264
|
-
### type-system
|
|
265
|
-
|
|
266
|
-
Typography pairing database — 22 font pairings organized by product vibe. Each pairing includes Google Fonts URL, Tailwind config, size scale from display to caption, weight mapping, and line height ratios. Decision tree maps product type and tone to the right pairing.
|
|
267
|
-
|
|
268
|
-
#### Workflow
|
|
269
|
-
|
|
270
|
-
**Step 1 — Detect product tone**
|
|
271
|
-
Read `CLAUDE.md` or ask: "What is the product tone?" Classify: modern-tech | editorial | playful | corporate | developer | luxury | humanist | brutalist | minimal.
|
|
272
|
-
|
|
273
|
-
**Step 2 — Recommend pairing**
|
|
274
|
-
Apply the decision tree. Output the top 2 pairings with rationale (brand signal, readability score, Google Fonts load weight).
|
|
275
|
-
|
|
276
|
-
**Step 3 — Generate @font-face / config**
|
|
277
|
-
Emit the `<link>` preconnect + stylesheet tag for Google Fonts. Emit Tailwind `fontFamily` config. Emit a CSS type scale (`--text-display` through `--text-caption`).
|
|
278
|
-
|
|
279
|
-
**Step 4 — Verify readability**
|
|
280
|
-
Check: body size ≥ 14px, line-height ≥ 1.5 for body, ≤ 1.25 for headings. Flag any contrast failure using the project's background token.
|
|
281
|
-
|
|
282
|
-
#### Decision Tree
|
|
283
|
-
|
|
284
|
-
```
|
|
285
|
-
Product Tone → Pairing
|
|
286
|
-
──────────────────────────────────────────────────────────
|
|
287
|
-
modern tech / saas → Space Grotesk + Inter
|
|
288
|
-
editorial / blog → Playfair Display + Source Serif 4
|
|
289
|
-
playful / kids / app → Fredoka + Nunito
|
|
290
|
-
corporate / enterprise→ IBM Plex Sans + IBM Plex Serif
|
|
291
|
-
developer tools / CLI → JetBrains Mono + Inter
|
|
292
|
-
luxury / fashion → Cormorant Garamond + Montserrat
|
|
293
|
-
humanist / health → DM Sans + DM Serif Display
|
|
294
|
-
brutalist / bold → Bebas Neue + IBM Plex Mono
|
|
295
|
-
minimal / productivity→ Inter + Inter (weight-only hierarchy)
|
|
296
|
-
gaming / esports → Rajdhani + Exo 2
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
#### Pairing Reference
|
|
300
|
-
|
|
301
|
-
```html
|
|
302
|
-
<!-- Space Grotesk + Inter (modern-tech / saas) -->
|
|
303
|
-
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
304
|
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
305
|
-
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap" rel="stylesheet">
|
|
306
|
-
|
|
307
|
-
<!-- Playfair Display + Source Serif 4 (editorial) -->
|
|
308
|
-
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;1,400&family=Source+Serif+4:wght@400;600&display=swap" rel="stylesheet">
|
|
309
|
-
|
|
310
|
-
<!-- Fredoka + Nunito (playful) -->
|
|
311
|
-
<link href="https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600;700&family=Nunito:wght@400;600&display=swap" rel="stylesheet">
|
|
312
|
-
|
|
313
|
-
<!-- IBM Plex Sans + IBM Plex Serif (corporate) -->
|
|
314
|
-
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Serif:wght@400;600&display=swap" rel="stylesheet">
|
|
315
|
-
|
|
316
|
-
<!-- JetBrains Mono + Inter (developer tools) -->
|
|
317
|
-
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Inter:wght@400;500;600&display=swap" rel="stylesheet">
|
|
318
|
-
|
|
319
|
-
<!-- Cormorant Garamond + Montserrat (luxury) -->
|
|
320
|
-
<link href="https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,600;1,400&family=Montserrat:wght@400;500;700&display=swap" rel="stylesheet">
|
|
321
|
-
|
|
322
|
-
<!-- DM Sans + DM Serif Display (humanist / health) -->
|
|
323
|
-
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=DM+Serif+Display&display=swap" rel="stylesheet">
|
|
324
|
-
```
|
|
325
|
-
|
|
326
|
-
```css
|
|
327
|
-
/* Type scale — Space Grotesk + Inter pairing */
|
|
328
|
-
:root {
|
|
329
|
-
--font-display: 'Space Grotesk', system-ui, sans-serif;
|
|
330
|
-
--font-body: 'Inter', system-ui, sans-serif;
|
|
331
|
-
--font-mono: 'JetBrains Mono', monospace;
|
|
332
|
-
|
|
333
|
-
/* Scale */
|
|
334
|
-
--text-display: clamp(2.5rem, 5vw, 4.5rem); /* 40–72px */
|
|
335
|
-
--text-h1: clamp(2rem, 4vw, 2.5rem); /* 32–40px */
|
|
336
|
-
--text-h2: clamp(1.375rem, 2.5vw, 1.75rem); /* 22–28px */
|
|
337
|
-
--text-h3: 1.125rem; /* 18px */
|
|
338
|
-
--text-body: 1rem; /* 16px */
|
|
339
|
-
--text-small: 0.875rem; /* 14px */
|
|
340
|
-
--text-caption: 0.75rem; /* 12px */
|
|
341
|
-
|
|
342
|
-
/* Leading */
|
|
343
|
-
--leading-tight: 1.2;
|
|
344
|
-
--leading-snug: 1.35;
|
|
345
|
-
--leading-normal: 1.5;
|
|
346
|
-
--leading-relaxed:1.75;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
h1, h2, h3 { font-family: var(--font-display); line-height: var(--leading-tight); }
|
|
350
|
-
body { font-family: var(--font-body); line-height: var(--leading-normal); }
|
|
351
|
-
code, pre { font-family: var(--font-mono); }
|
|
352
|
-
|
|
353
|
-
/* Financial numbers — always mono + bold */
|
|
354
|
-
.number, .price, .stat {
|
|
355
|
-
font-family: var(--font-mono);
|
|
356
|
-
font-weight: 700;
|
|
357
|
-
font-variant-numeric: tabular-nums;
|
|
358
|
-
}
|
|
359
|
-
```
|
|
360
|
-
|
|
361
|
-
```js
|
|
362
|
-
// tailwind.config.js — font pairing extension
|
|
363
|
-
module.exports = {
|
|
364
|
-
theme: {
|
|
365
|
-
extend: {
|
|
366
|
-
fontFamily: {
|
|
367
|
-
display: ['Space Grotesk', 'system-ui', 'sans-serif'],
|
|
368
|
-
body: ['Inter', 'system-ui', 'sans-serif'],
|
|
369
|
-
mono: ['JetBrains Mono','monospace'],
|
|
370
|
-
},
|
|
371
|
-
fontSize: {
|
|
372
|
-
'display': ['clamp(2.5rem, 5vw, 4.5rem)', { lineHeight: '1.1' }],
|
|
373
|
-
'h1': ['clamp(2rem, 4vw, 2.5rem)', { lineHeight: '1.2' }],
|
|
374
|
-
'h2': ['1.75rem', { lineHeight: '1.3' }],
|
|
375
|
-
'h3': ['1.125rem', { lineHeight: '1.4' }],
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
```
|
|
381
|
-
|
|
382
|
-
---
|
|
383
|
-
|
|
384
|
-
### landing-patterns
|
|
385
|
-
|
|
386
|
-
Landing page section patterns — 12 section archetypes with HTML structure hints, Tailwind classes, responsive rules, and conversion-focused copy guidance. Anti-AI design rules enforced throughout.
|
|
387
|
-
|
|
388
|
-
#### Workflow
|
|
389
|
-
|
|
390
|
-
**Step 1 — Identify page goal**
|
|
391
|
-
Classify: acquisition (email capture / waitlist) | conversion (paid plan) | brand (awareness) | product (feature showcase). Goal determines section priority and CTA placement.
|
|
392
|
-
|
|
393
|
-
**Step 2 — Select section sequence**
|
|
394
|
-
From the section library below, compose a sequence. Recommended base: Hero → Social Proof → Features → How It Works → Testimonials → Pricing → FAQ → CTA Footer. Adjust by goal.
|
|
395
|
-
|
|
396
|
-
**Step 3 — Apply style**
|
|
397
|
-
Pull palette from `palette-picker` and fonts from `type-system`. Apply Anti-AI design rules (see below). Each section gets a distinct visual treatment — do NOT apply the same background/card style to every section.
|
|
398
|
-
|
|
399
|
-
**Step 4 — Responsive audit**
|
|
400
|
-
Every section must work at 375px (mobile), 768px (tablet), 1280px (desktop). Check text wrapping, CTA tap targets (≥ 44px), and image aspect ratios.
|
|
401
|
-
|
|
402
|
-
**Step 5 — Conversion check**
|
|
403
|
-
Verify: primary CTA visible above the fold; social proof within first 2 sections; pricing section has a clear default/recommended plan; FAQ addresses the top 3 objections.
|
|
404
|
-
|
|
405
|
-
#### Section Library
|
|
406
|
-
|
|
407
|
-
```
|
|
408
|
-
Hero Variants:
|
|
409
|
-
split-hero Left text + right image/video. NOT centered formula.
|
|
410
|
-
asymmetric-hero 60/40 split. Offset grid. Works for SaaS.
|
|
411
|
-
cinematic-hero Full-bleed video/image background. Text overlay. Gaming / brand.
|
|
412
|
-
|
|
413
|
-
Social Proof:
|
|
414
|
-
logo-strip Horizontal scrolling logos. Grayscale → color on hover.
|
|
415
|
-
stats-bar 3–4 large numbers (e.g., "12,000+ teams"). Mono font.
|
|
416
|
-
testimonial-grid Asymmetric card sizes. NOT uniform grid.
|
|
417
|
-
quote-hero Single large pull-quote with avatar. Editorial feel.
|
|
418
|
-
|
|
419
|
-
Features:
|
|
420
|
-
bento-grid Mixed-size cards. Large hero card + smaller supporting.
|
|
421
|
-
alternating-rows Icon + text, alternating left/right. Classic but effective.
|
|
422
|
-
feature-tabs Tab navigation for feature groups. Reduces scroll length.
|
|
423
|
-
|
|
424
|
-
Conversion:
|
|
425
|
-
pricing-toggle Monthly / annual toggle. Recommended tier visually elevated.
|
|
426
|
-
pricing-comparison Feature matrix table. Clear checkmarks, no feature bloat.
|
|
427
|
-
cta-split Left: value reminder. Right: form or button. High conversion.
|
|
428
|
-
floating-cta Sticky bar at bottom on mobile. Dismissable.
|
|
429
|
-
|
|
430
|
-
Discovery:
|
|
431
|
-
faq-accordion Expandable Q&A. Addresses objections in copy, not just features.
|
|
432
|
-
how-it-works 3-step numbered sequence. Icon per step. Progress line optional.
|
|
433
|
-
waitlist-capture Email input + social proof count. ("Join 3,200 on waitlist")
|
|
434
|
-
```
|
|
435
|
-
|
|
436
|
-
#### Example — Split Hero (Anti-AI compliant)
|
|
437
|
-
|
|
438
|
-
```tsx
|
|
439
|
-
// ANTI-AI RULES APPLIED:
|
|
440
|
-
// ✅ Split layout — NOT centered hero formula
|
|
441
|
-
// ✅ Custom brand color — NOT default indigo/violet
|
|
442
|
-
// ✅ Phosphor Icons — NOT Lucide
|
|
443
|
-
// ✅ Asymmetric layout — NOT uniform sections
|
|
444
|
-
// ✅ No gradient blob
|
|
445
|
-
|
|
446
|
-
import { ArrowRight, CheckCircle } from '@phosphor-icons/react'
|
|
447
|
-
|
|
448
|
-
export function SplitHero() {
|
|
449
|
-
return (
|
|
450
|
-
<section className="min-h-screen grid lg:grid-cols-[1fr_1.2fr] items-center gap-0">
|
|
451
|
-
{/* Left — copy */}
|
|
452
|
-
<div className="px-8 py-20 lg:px-16 lg:py-0 max-w-xl">
|
|
453
|
-
<span className="inline-flex items-center gap-2 text-sm font-medium text-[var(--primary)] mb-6">
|
|
454
|
-
<CheckCircle weight="fill" size={16} aria-hidden="true" />
|
|
455
|
-
Now in public beta
|
|
456
|
-
</span>
|
|
457
|
-
<h1 className="font-display text-h1 font-bold text-[var(--text-primary)] mb-6 leading-tight">
|
|
458
|
-
Shipping fast starts<br />
|
|
459
|
-
<em className="not-italic text-[var(--primary)]">before the sprint</em>
|
|
460
|
-
</h1>
|
|
461
|
-
<p className="text-[var(--text-secondary)] text-body leading-relaxed mb-8 max-w-md">
|
|
462
|
-
Rune wires your AI coding assistant to a mesh of 55 skills so you spend time building, not prompting.
|
|
463
|
-
</p>
|
|
464
|
-
<div className="flex flex-wrap gap-3">
|
|
465
|
-
<a
|
|
466
|
-
href="/signup"
|
|
467
|
-
className="inline-flex items-center gap-2 px-6 py-3 rounded-lg bg-[var(--primary)] text-white font-semibold text-sm hover:opacity-90 transition-opacity focus-visible:ring-2 focus-visible:ring-[var(--primary)] focus-visible:ring-offset-2"
|
|
468
|
-
>
|
|
469
|
-
Get started free
|
|
470
|
-
<ArrowRight size={16} aria-hidden="true" />
|
|
471
|
-
</a>
|
|
472
|
-
<a
|
|
473
|
-
href="/docs"
|
|
474
|
-
className="inline-flex items-center gap-2 px-6 py-3 rounded-lg border border-[var(--border)] text-[var(--text-primary)] font-semibold text-sm hover:bg-[var(--bg-card)] transition-colors"
|
|
475
|
-
>
|
|
476
|
-
Read the docs
|
|
477
|
-
</a>
|
|
478
|
-
</div>
|
|
479
|
-
</div>
|
|
480
|
-
|
|
481
|
-
{/* Right — visual (product screenshot or illustration) */}
|
|
482
|
-
<div className="relative h-full min-h-[60vh] bg-[var(--bg-card)] overflow-hidden">
|
|
483
|
-
{/* Replace with actual product screenshot */}
|
|
484
|
-
<div className="absolute inset-0 flex items-center justify-center text-[var(--text-secondary)]">
|
|
485
|
-
Product visual
|
|
486
|
-
</div>
|
|
487
|
-
</div>
|
|
488
|
-
</section>
|
|
489
|
-
)
|
|
490
|
-
}
|
|
491
|
-
```
|
|
492
|
-
|
|
493
|
-
#### Example — Bento Grid Features
|
|
494
|
-
|
|
495
|
-
```tsx
|
|
496
|
-
// Bento: asymmetric sizing breaks the uniform grid anti-pattern
|
|
497
|
-
export function BentoFeatures() {
|
|
498
|
-
return (
|
|
499
|
-
<section className="py-24 px-6">
|
|
500
|
-
<div className="max-w-5xl mx-auto">
|
|
501
|
-
<h2 className="font-display text-h2 font-semibold text-[var(--text-primary)] mb-12 text-center">
|
|
502
|
-
One mesh. Every workflow.
|
|
503
|
-
</h2>
|
|
504
|
-
{/* Intentionally unequal grid — NOT uniform cards */}
|
|
505
|
-
<div className="grid grid-cols-2 lg:grid-cols-3 gap-4 auto-rows-[200px]">
|
|
506
|
-
{/* Hero card — spans 2 cols × 2 rows */}
|
|
507
|
-
<div className="col-span-2 row-span-2 rounded-xl bg-[var(--bg-card)] border border-[var(--border)] p-8 flex flex-col justify-end">
|
|
508
|
-
<p className="text-xs font-medium text-[var(--primary)] mb-2 uppercase tracking-wide">Orchestration</p>
|
|
509
|
-
<h3 className="text-xl font-bold text-[var(--text-primary)] mb-2">cook — your AI project manager</h3>
|
|
510
|
-
<p className="text-sm text-[var(--text-secondary)]">Phases your work, delegates to the right skill, and escalates when stuck.</p>
|
|
511
|
-
</div>
|
|
512
|
-
{/* Small cards fill remaining cells */}
|
|
513
|
-
<div className="rounded-xl bg-[var(--bg-card)] border border-[var(--border)] p-6 flex flex-col justify-between">
|
|
514
|
-
<p className="text-xs font-medium text-[var(--text-secondary)] uppercase tracking-wide">55 Skills</p>
|
|
515
|
-
<p className="text-2xl font-bold font-mono text-[var(--text-primary)]">5 layers</p>
|
|
516
|
-
</div>
|
|
517
|
-
<div className="rounded-xl bg-[var(--bg-card)] border border-[var(--border)] p-6">
|
|
518
|
-
<p className="text-xs font-medium text-[var(--text-secondary)] uppercase tracking-wide mb-2">Platforms</p>
|
|
519
|
-
<p className="text-sm text-[var(--text-primary)]">Claude Code · Cursor · Windsurf · Antigravity</p>
|
|
520
|
-
</div>
|
|
521
|
-
<div className="col-span-2 rounded-xl bg-[var(--bg-card)] border border-[var(--border)] p-6">
|
|
522
|
-
<p className="text-xs font-medium text-[var(--text-secondary)] uppercase tracking-wide mb-2">Open source</p>
|
|
523
|
-
<p className="text-sm text-[var(--text-primary)]">MIT license. Self-host or install in 30 seconds.</p>
|
|
524
|
-
</div>
|
|
525
|
-
</div>
|
|
526
|
-
</div>
|
|
527
|
-
</section>
|
|
528
|
-
)
|
|
529
|
-
}
|
|
530
|
-
```
|
|
531
|
-
|
|
532
|
-
---
|
|
533
|
-
|
|
534
|
-
### design-decision
|
|
535
|
-
|
|
536
|
-
Product domain → style mapping. Given a product category, outputs a complete design recommendation: visual style, palette, typography pairing, component aesthetic, and a `design-system.md` scaffold. Bridges the gap between "I need to build a UI" and "I know exactly what it should look like."
|
|
537
|
-
|
|
538
|
-
#### Workflow
|
|
539
|
-
|
|
540
|
-
**Step 1 — Classify product domain**
|
|
541
|
-
Read `CLAUDE.md`, `README.md`, or ask: "What problem does this product solve? Who uses it?" Map to one of the 9 domains below.
|
|
542
|
-
|
|
543
|
-
**Step 2 — Recommend style stack**
|
|
544
|
-
Apply the domain → style matrix. Output: visual style name, palette slug, typography pairing, component aesthetic, and 3 reference patterns to avoid ("do NOT do X").
|
|
45
|
+
| Skill | Model | Description |
|
|
46
|
+
|-------|-------|-------------|
|
|
47
|
+
| [react-health](skills/react-health.md) | sonnet | React codebase health scoring — 0-100 score across 6 dimensions: state management, effects hygiene, performance patterns, architecture, bundle efficiency, and accessibility. |
|
|
48
|
+
| [web-vitals](skills/web-vitals.md) | sonnet | Core Web Vitals performance audit — LCP, CLS, FCP, TBT, INP against Google thresholds. Identifies render-blocking resources, layout shift culprits, missing preloads, and tree-shaking opportunities. |
|
|
49
|
+
| [design-system](skills/design-system.md) | sonnet | Generate and enforce design system tokens — colors, typography, spacing, shadows, border radius. Consolidates ad-hoc values into a structured token file with full dark/light theme support. |
|
|
50
|
+
| [palette-picker](skills/palette-picker.md) | sonnet | Color palette database organized by product type. 25 curated palettes covering fintech, healthcare, education, gaming, ecommerce, SaaS, social, news/content, productivity, and developer tools. |
|
|
51
|
+
| [type-system](skills/type-system.md) | sonnet | Typography pairing database — 22 font pairings organized by product vibe. Each pairing includes Google Fonts URL, Tailwind config, size scale, weight mapping, and line height ratios. |
|
|
52
|
+
| [landing-patterns](skills/landing-patterns.md) | sonnet | Landing page section patterns — 12 section archetypes with HTML structure hints, Tailwind classes, responsive rules, and conversion-focused copy guidance. Anti-AI design rules enforced. |
|
|
53
|
+
| [design-decision](skills/design-decision.md) | sonnet | Product domain → style mapping. Outputs complete design recommendation: visual style, palette, typography pairing, component aesthetic, and design-system.md scaffold. |
|
|
54
|
+
| [component-patterns](skills/component-patterns.md) | sonnet | Component architecture patterns — compound components, render props, composition, slots. Detects prop-heavy components and guides refactoring toward composable architectures. |
|
|
55
|
+
| [a11y-audit](skills/a11y-audit.md) | sonnet | Accessibility audit beyond automated tools. Checks WCAG 2.1 AA compliance — focus management, screen reader compatibility, color contrast, ARIA patterns, keyboard navigation, focus traps. |
|
|
56
|
+
| [animation-patterns](skills/animation-patterns.md) | sonnet | Motion design patterns — micro-interactions, page transitions, scroll animations, loading states. CSS transitions, Framer Motion, or GSAP based on project stack. Always respects prefers-reduced-motion. |
|
|
545
57
|
|
|
546
|
-
|
|
547
|
-
Emit a `design-system.md` file in the project root (or `.rune/`) with: color tokens (CSS custom properties), font pairing (Google Fonts link), spacing scale, component aesthetic rules, and anti-patterns for this domain.
|
|
548
|
-
|
|
549
|
-
#### Domain → Style Matrix
|
|
550
|
-
|
|
551
|
-
```
|
|
552
|
-
Domain Style Palette Typography Component Aesthetic
|
|
553
|
-
─────────────────────────────────────────────────────────────────────────────────────────────
|
|
554
|
-
Fintech/Trading Dark + Precision midnight-profit Space Grotesk+Mono Dense tables, data overlays
|
|
555
|
-
Healthcare Clean + Calm clean-clinic DM Sans+DM Serif Rounded, soft, spacious
|
|
556
|
-
Education Warm + Friendly warm-academy* Fredoka+Nunito Illustrated, playful cards
|
|
557
|
-
Gaming Dark + Neon neon-arena Rajdhani+Exo 2 Hard edges, glow effects
|
|
558
|
-
Ecommerce Trust + Focused trust-cart Inter+Inter Product-first, clean CTA
|
|
559
|
-
SaaS/Dashboard Precision + Flex slate-precision Space Grotesk+Inter Data-dense, sidebar nav
|
|
560
|
-
Social/Community Vibrant + Engaged gradient-social* Inter+Inter Avatar-heavy, reaction UX
|
|
561
|
-
News/Content Readable + Neutral neutral-ink* Playfair+Source Serif Wide columns, drop caps
|
|
562
|
-
Productivity Minimal + Calm calm-focus* Inter+Inter (weight) Almost no decoration
|
|
563
|
-
DevTools Terminal + Crisp terminal-dark JetBrains Mono+Inter Code blocks, mono emphasis
|
|
564
|
-
|
|
565
|
-
* Palette not shown in palette-picker example block — generate with same CSS custom props pattern.
|
|
566
|
-
```
|
|
567
|
-
|
|
568
|
-
#### Style Characteristic Reference
|
|
569
|
-
|
|
570
|
-
```
|
|
571
|
-
glassmorphism When: premium SaaS landing, dark bg hero. Avoid: dense data tables (illegible).
|
|
572
|
-
CSS: background: rgba(255,255,255,0.05); backdrop-filter: blur(12px);
|
|
573
|
-
border: 1px solid rgba(255,255,255,0.1); border-radius: 16px;
|
|
574
|
-
|
|
575
|
-
neubrutalism When: bold brand statement, startup, creative tool. Avoid: healthcare, finance.
|
|
576
|
-
CSS: border: 2px solid #000; box-shadow: 4px 4px 0 #000;
|
|
577
|
-
background: #ffe600; (or other saturated fill)
|
|
578
|
-
|
|
579
|
-
claymorphism When: education, kids, consumer apps. Avoid: enterprise, B2B data tools.
|
|
580
|
-
CSS: border-radius: 20px; box-shadow: 0 8px 0 rgba(0,0,0,0.15),
|
|
581
|
-
inset 0 -4px 0 rgba(0,0,0,0.1); (inflated, soft look)
|
|
582
|
-
|
|
583
|
-
aurora/gradient When: landing page hero ONLY, used sparingly. AVOID as overall theme.
|
|
584
|
-
CSS: background: conic-gradient(from 180deg at 50% 50%, ...); opacity: 0.15;
|
|
585
|
-
(subtle, behind content — never the main visual)
|
|
586
|
-
|
|
587
|
-
flat/minimal When: productivity, devtools, content. Best default for B2B SaaS.
|
|
588
|
-
CSS: No shadows except --shadow-sm. Single accent color. Whitespace-heavy.
|
|
589
|
-
|
|
590
|
-
dark-precision When: fintech, devtools, monitoring. Default dark bg with high-contrast accents.
|
|
591
|
-
CSS: bg #0f172a or darker; mono fonts for data; green/red semantic signals.
|
|
592
|
-
```
|
|
593
|
-
|
|
594
|
-
#### Example — Generated design-system.md
|
|
595
|
-
|
|
596
|
-
```markdown
|
|
597
|
-
# Design System: [Product Name]
|
|
598
|
-
|
|
599
|
-
## Domain
|
|
600
|
-
SaaS Dashboard — B2B productivity tool for engineering teams
|
|
601
|
-
|
|
602
|
-
## Visual Style
|
|
603
|
-
Flat/Minimal with Slate Precision palette. Dark mode default.
|
|
604
|
-
Do NOT use gradient blobs, glassmorphism panels, or Lucide icons.
|
|
605
|
-
|
|
606
|
-
## Color Tokens
|
|
607
|
-
[→ See palette.css — generated by palette-picker, slate-precision]
|
|
608
|
-
|
|
609
|
-
## Typography
|
|
610
|
-
Pairing: Space Grotesk (headings, 600–700) + Inter (body, 400–500)
|
|
611
|
-
[→ See Google Fonts link in type-system output]
|
|
612
|
-
|
|
613
|
-
## Component Rules
|
|
614
|
-
- Cards: bg-card + border border-[var(--border)] + rounded-lg. NO drop shadows on cards.
|
|
615
|
-
- Buttons: primary = bg-primary text-white. ghost = border + transparent bg.
|
|
616
|
-
- Icons: Phosphor Icons only. Weight: regular for UI, fill for status indicators.
|
|
617
|
-
- Data tables: zebra stripe with bg-elevated on odd rows. Mono font for numbers.
|
|
618
|
-
|
|
619
|
-
## Anti-Patterns for This Domain
|
|
620
|
-
- No centered hero with 2-button CTA
|
|
621
|
-
- No gradient backgrounds
|
|
622
|
-
- No uniform card grid (vary card sizes by content importance)
|
|
623
|
-
```
|
|
624
|
-
|
|
625
|
-
---
|
|
626
|
-
|
|
627
|
-
### component-patterns
|
|
628
|
-
|
|
629
|
-
Component architecture patterns — compound components, render props, composition, slots. Detects prop-heavy components and guides refactoring toward composable, maintainable architectures.
|
|
630
|
-
|
|
631
|
-
#### Workflow
|
|
632
|
-
|
|
633
|
-
**Step 1 — Detect prop-heavy components**
|
|
634
|
-
Use Grep to find component signatures with more than 8 props (`interface \w+Props \{` then count fields, or scan function parameter lists). Read each flagged file to understand the component's responsibilities.
|
|
635
|
-
|
|
636
|
-
**Step 2 — Classify and suggest pattern**
|
|
637
|
-
For each flagged component, classify by smell: boolean-flag hell → compound component; render logic branching → render props or slots; deeply nested data → context + provider. Output a refactor plan with the specific pattern to apply.
|
|
638
|
-
|
|
639
|
-
**Step 3 — Emit refactored scaffold**
|
|
640
|
-
Write the refactored component skeleton following the compound component pattern. Do not overwrite the original — emit to a `*.refactored.tsx` file for review.
|
|
641
|
-
|
|
642
|
-
**Step 4 — Composition vs inheritance + slot patterns**
|
|
643
|
-
After structural refactor, audit for slot opportunities (Svelte `<slot>`, Vue `v-slot`, React `children` with typed slots). Enforce: prefer composition (pass components as props) over inheritance (extend base class). Flag any `extends React.Component` or class-based patterns for migration.
|
|
644
|
-
|
|
645
|
-
#### Example
|
|
646
|
-
|
|
647
|
-
```tsx
|
|
648
|
-
// BEFORE: prop-heavy (9 props, hard to extend)
|
|
649
|
-
<Modal title="..." open footer actions size variant onClose onConfirm loading />
|
|
650
|
-
|
|
651
|
-
// AFTER: compound component pattern
|
|
652
|
-
<Modal open onClose={handleClose}>
|
|
653
|
-
<Modal.Header>Confirm Action</Modal.Header>
|
|
654
|
-
<Modal.Body>Are you sure?</Modal.Body>
|
|
655
|
-
<Modal.Footer>
|
|
656
|
-
<Button variant="ghost" onClick={handleClose}>Cancel</Button>
|
|
657
|
-
<Button variant="primary" loading={isLoading} onClick={handleConfirm}>
|
|
658
|
-
Confirm
|
|
659
|
-
</Button>
|
|
660
|
-
</Modal.Footer>
|
|
661
|
-
</Modal>
|
|
662
|
-
```
|
|
663
|
-
|
|
664
|
-
```tsx
|
|
665
|
-
// Svelte slot pattern — composition over prop drilling
|
|
666
|
-
// Caller decides what goes in header/footer, component owns layout
|
|
667
|
-
<Card>
|
|
668
|
-
<svelte:fragment slot="header">
|
|
669
|
-
<h3 class="text-h3 font-semibold">Usage this month</h3>
|
|
670
|
-
</svelte:fragment>
|
|
671
|
-
|
|
672
|
-
<MetricChart data={usage} />
|
|
673
|
-
|
|
674
|
-
<svelte:fragment slot="footer">
|
|
675
|
-
<a href="/billing" class="text-sm text-[var(--primary)]">View invoice</a>
|
|
676
|
-
</svelte:fragment>
|
|
677
|
-
</Card>
|
|
678
|
-
```
|
|
679
|
-
|
|
680
|
-
```tsx
|
|
681
|
-
// React typed children slots via discriminated union
|
|
682
|
-
type ModalSlot = { as: 'header' | 'body' | 'footer'; children: React.ReactNode }
|
|
683
|
-
|
|
684
|
-
function resolveSlots(children: React.ReactNode) {
|
|
685
|
-
const slots: Record<string, React.ReactNode> = {}
|
|
686
|
-
React.Children.forEach(children, (child) => {
|
|
687
|
-
if (React.isValidElement<ModalSlot>(child) && child.props.as) {
|
|
688
|
-
slots[child.props.as] = child.props.children
|
|
689
|
-
}
|
|
690
|
-
})
|
|
691
|
-
return slots
|
|
692
|
-
}
|
|
693
|
-
```
|
|
694
|
-
|
|
695
|
-
---
|
|
696
|
-
|
|
697
|
-
### a11y-audit
|
|
698
|
-
|
|
699
|
-
Accessibility audit beyond automated tools. Checks WCAG 2.1 AA compliance — focus management, screen reader compatibility, color contrast, ARIA patterns, keyboard navigation, focus traps, and skip navigation.
|
|
700
|
-
|
|
701
|
-
#### Workflow
|
|
702
|
-
|
|
703
|
-
**Step 1 — Automated scan**
|
|
704
|
-
Run `Bash: npx axe-core-cli <url> --reporter json` to capture all automated violations. Parse the JSON output and group by impact: critical → serious → moderate → minor.
|
|
705
|
-
|
|
706
|
-
**Step 2 — Manual WCAG 2.1 AA review**
|
|
707
|
-
Use Grep to find `onClick` on non-button elements (missing keyboard support), `<img` without `alt`, `aria-label` absence on icon-only buttons, and `outline: none` without a focus-visible replacement. Read flagged files and annotate each violation with the WCAG criterion it breaks.
|
|
708
|
-
|
|
709
|
-
**Step 3 — Emit audit report**
|
|
710
|
-
Produce a structured report: automated violations (count by impact), manual violations (file + line + fix), contrast ratios for brand colors (pass/fail at AA). Include a prioritized fix list.
|
|
711
|
-
|
|
712
|
-
**Step 4 — Focus trap audit + skip nav**
|
|
713
|
-
Scan for `Dialog`, `Modal`, `Drawer`, `Popover` components. Verify each has: a focus trap on open (`focus-trap-react` or `aria-modal`), returns focus to trigger on close, has an `aria-labelledby` referencing its title. Also check: first `<a>` in `<body>` is a "Skip to main content" link visible on focus (WCAG 2.4.1).
|
|
714
|
-
|
|
715
|
-
#### Example
|
|
716
|
-
|
|
717
|
-
```tsx
|
|
718
|
-
// VIOLATION: icon button with no accessible name
|
|
719
|
-
<button onClick={handleClose}>
|
|
720
|
-
<XIcon />
|
|
721
|
-
</button>
|
|
722
|
-
|
|
723
|
-
// FIX: add aria-label; icon is decorative
|
|
724
|
-
<button onClick={handleClose} aria-label="Close dialog">
|
|
725
|
-
<XIcon aria-hidden="true" />
|
|
726
|
-
</button>
|
|
727
|
-
|
|
728
|
-
// VIOLATION: div acting as button (no keyboard, no role)
|
|
729
|
-
<div onClick={handleSubmit}>Submit</div>
|
|
730
|
-
|
|
731
|
-
// FIX: use semantic element
|
|
732
|
-
<button type="button" onClick={handleSubmit}>Submit</button>
|
|
733
|
-
```
|
|
734
|
-
|
|
735
|
-
```tsx
|
|
736
|
-
// Focus trap pattern for modals (using focus-trap-react)
|
|
737
|
-
import FocusTrap from 'focus-trap-react'
|
|
738
|
-
|
|
739
|
-
export function Dialog({ open, onClose, title, children }: DialogProps) {
|
|
740
|
-
return open ? (
|
|
741
|
-
<FocusTrap focusTrapOptions={{ onDeactivate: onClose }}>
|
|
742
|
-
<div
|
|
743
|
-
role="dialog"
|
|
744
|
-
aria-modal="true"
|
|
745
|
-
aria-labelledby="dialog-title"
|
|
746
|
-
className="fixed inset-0 z-50 flex items-center justify-center"
|
|
747
|
-
>
|
|
748
|
-
<div className="bg-[var(--bg-card)] rounded-xl p-6 max-w-md w-full shadow-lg">
|
|
749
|
-
<h2 id="dialog-title" className="text-h3 font-semibold mb-4">{title}</h2>
|
|
750
|
-
{children}
|
|
751
|
-
<button
|
|
752
|
-
onClick={onClose}
|
|
753
|
-
aria-label="Close dialog"
|
|
754
|
-
className="absolute top-4 right-4 focus-visible:ring-2 focus-visible:ring-[var(--primary)]"
|
|
755
|
-
>
|
|
756
|
-
<X aria-hidden="true" />
|
|
757
|
-
</button>
|
|
758
|
-
</div>
|
|
759
|
-
</div>
|
|
760
|
-
</FocusTrap>
|
|
761
|
-
) : null
|
|
762
|
-
}
|
|
763
|
-
```
|
|
764
|
-
|
|
765
|
-
```html
|
|
766
|
-
<!-- Skip navigation link — must be FIRST focusable element in <body> -->
|
|
767
|
-
<a
|
|
768
|
-
href="#main-content"
|
|
769
|
-
class="
|
|
770
|
-
sr-only focus:not-sr-only
|
|
771
|
-
fixed top-4 left-4 z-[9999]
|
|
772
|
-
px-4 py-2 rounded-md
|
|
773
|
-
bg-[var(--primary)] text-white font-semibold text-sm
|
|
774
|
-
focus-visible:ring-2 focus-visible:ring-offset-2
|
|
775
|
-
"
|
|
776
|
-
>
|
|
777
|
-
Skip to main content
|
|
778
|
-
</a>
|
|
779
|
-
```
|
|
780
|
-
|
|
781
|
-
---
|
|
782
|
-
|
|
783
|
-
### animation-patterns
|
|
784
|
-
|
|
785
|
-
Motion design patterns — micro-interactions, page transitions, scroll animations, loading states. Applies CSS transitions, Framer Motion, or GSAP based on project stack. Always respects `prefers-reduced-motion`.
|
|
786
|
-
|
|
787
|
-
#### Workflow
|
|
788
|
-
|
|
789
|
-
**Step 1 — Detect interaction points**
|
|
790
|
-
Use Grep to find hover handlers (`onMouseEnter`, `:hover`), route changes (Next.js `useRouter`, SvelteKit `goto`), and loading states (`isLoading`, `isPending`). Read component files to understand where motion can add feedback or polish.
|
|
791
|
-
|
|
792
|
-
**Step 2 — Apply micro-interactions**
|
|
793
|
-
For each interaction point, select the appropriate pattern: hover → scale + shadow lift; button click → press-down (scale 0.97); data load → skeleton pulse then fade-in; route change → slide or fade transition. Emit the updated component with motion classes or Framer Motion variants.
|
|
794
|
-
|
|
795
|
-
**Step 3 — Audit reduced-motion compliance**
|
|
796
|
-
Use Grep to find every animation/transition declaration. Verify each is wrapped in a `prefers-reduced-motion: no-preference` media query or uses Framer Motion's `useReducedMotion()` hook. Flag any that are not.
|
|
797
|
-
|
|
798
|
-
**Step 4 — Page transition patterns**
|
|
799
|
-
Apply View Transitions API for same-document navigations (SvelteKit, Astro, vanilla JS). For React/Next.js, use Framer Motion `AnimatePresence` + `layoutId` for shared layout animations. Emit transition wrapper component with both strategies.
|
|
800
|
-
|
|
801
|
-
#### Example
|
|
802
|
-
|
|
803
|
-
```tsx
|
|
804
|
-
// Tailwind micro-interaction with reduced-motion respect
|
|
805
|
-
<button
|
|
806
|
-
className="
|
|
807
|
-
transform transition-all duration-200 ease-out
|
|
808
|
-
hover:scale-105 hover:shadow-md
|
|
809
|
-
active:scale-95
|
|
810
|
-
motion-reduce:transform-none motion-reduce:transition-none
|
|
811
|
-
"
|
|
812
|
-
>
|
|
813
|
-
Confirm
|
|
814
|
-
</button>
|
|
815
|
-
|
|
816
|
-
// Framer Motion with reduced-motion hook
|
|
817
|
-
const prefersReduced = useReducedMotion()
|
|
818
|
-
|
|
819
|
-
<motion.div
|
|
820
|
-
initial={{ opacity: 0, y: prefersReduced ? 0 : 16 }}
|
|
821
|
-
animate={{ opacity: 1, y: 0 }}
|
|
822
|
-
transition={{ duration: prefersReduced ? 0 : 0.25 }}
|
|
823
|
-
/>
|
|
824
|
-
```
|
|
825
|
-
|
|
826
|
-
```tsx
|
|
827
|
-
// Shared layout animation — card expands to modal (Framer Motion)
|
|
828
|
-
// Works because both use the same layoutId="card-{id}"
|
|
829
|
-
function CardGrid({ items }: { items: Item[] }) {
|
|
830
|
-
const [selected, setSelected] = useState<string | null>(null)
|
|
831
|
-
return (
|
|
832
|
-
<>
|
|
833
|
-
{items.map((item) => (
|
|
834
|
-
<motion.div
|
|
835
|
-
key={item.id}
|
|
836
|
-
layoutId={`card-${item.id}`}
|
|
837
|
-
onClick={() => setSelected(item.id)}
|
|
838
|
-
className="rounded-xl bg-[var(--bg-card)] border border-[var(--border)] cursor-pointer"
|
|
839
|
-
>
|
|
840
|
-
<motion.h3 layoutId={`title-${item.id}`}>{item.title}</motion.h3>
|
|
841
|
-
</motion.div>
|
|
842
|
-
))}
|
|
843
|
-
|
|
844
|
-
<AnimatePresence>
|
|
845
|
-
{selected && (
|
|
846
|
-
<motion.div
|
|
847
|
-
layoutId={`card-${selected}`}
|
|
848
|
-
className="fixed inset-8 z-50 rounded-2xl bg-[var(--bg-card)] p-8"
|
|
849
|
-
>
|
|
850
|
-
<motion.h3 layoutId={`title-${selected}`} className="text-h2 font-bold">
|
|
851
|
-
{items.find(i => i.id === selected)?.title}
|
|
852
|
-
</motion.h3>
|
|
853
|
-
<button onClick={() => setSelected(null)} aria-label="Close">
|
|
854
|
-
<X aria-hidden="true" />
|
|
855
|
-
</button>
|
|
856
|
-
</motion.div>
|
|
857
|
-
)}
|
|
858
|
-
</AnimatePresence>
|
|
859
|
-
</>
|
|
860
|
-
)
|
|
861
|
-
}
|
|
862
|
-
```
|
|
863
|
-
|
|
864
|
-
```css
|
|
865
|
-
/* View Transitions API — SvelteKit / Astro page transitions */
|
|
866
|
-
/* In app.css or global stylesheet */
|
|
867
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
868
|
-
::view-transition-old(root) {
|
|
869
|
-
animation: 200ms ease-out both fade-out;
|
|
870
|
-
}
|
|
871
|
-
::view-transition-new(root) {
|
|
872
|
-
animation: 250ms ease-in both fade-in;
|
|
873
|
-
}
|
|
874
|
-
}
|
|
875
|
-
|
|
876
|
-
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }
|
|
877
|
-
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
|
|
878
|
-
|
|
879
|
-
/* SvelteKit: enable in svelte.config.js → experimental: { viewTransitions: true } */
|
|
880
|
-
```
|
|
58
|
+
## Tech Stack Support
|
|
881
59
|
|
|
882
|
-
|
|
60
|
+
| Framework | Styling | Components | Motion |
|
|
61
|
+
|--------------|--------------------|---------------|---------------------|
|
|
62
|
+
| React 19 | TailwindCSS 4 | shadcn/ui | Framer Motion |
|
|
63
|
+
| Next.js 16 | CSS Custom Props | Radix UI | Framer Motion |
|
|
64
|
+
| SvelteKit 5 | CSS Custom Props | Custom | View Transitions API|
|
|
65
|
+
| Vue 3 | TailwindCSS 4 | Headless UI | Vue Transitions |
|
|
66
|
+
| Astro 5 | TailwindCSS 4 | Astro Islands | View Transitions API|
|
|
883
67
|
|
|
884
68
|
## Connections
|
|
885
69
|
|
|
886
70
|
```
|
|
887
71
|
Calls → asset-creator (L3): generate design assets (icons, illustrations)
|
|
888
72
|
Calls → design (L2): escalate when full design review is needed
|
|
73
|
+
Calls → perf (L2): react-health and web-vitals feed findings to perf for deeper analysis
|
|
74
|
+
Calls → verification (L3): react-health triggers verification after fix application
|
|
889
75
|
Called By ← review (L2): when UI code is being reviewed
|
|
890
76
|
Called By ← cook (L1): when frontend task detected
|
|
891
77
|
Called By ← launch (L1): pre-launch UI quality gate
|
|
892
78
|
Called By ← scaffold (L1): when bootstrapping a new frontend project
|
|
79
|
+
Called By ← preflight (L2): react-health runs as pre-commit quality gate on React projects
|
|
893
80
|
design-decision → palette-picker: feeds palette slug to token generation
|
|
894
81
|
design-decision → type-system: feeds pairing name to font config generation
|
|
895
82
|
landing-patterns → palette-picker: pulls palette for section styling
|
|
896
83
|
landing-patterns → type-system: pulls font pairing for section copy
|
|
84
|
+
react-health → web-vitals: health report feeds into vitals audit for bundle-to-load correlation
|
|
85
|
+
web-vitals → react-health: slow LCP/TBT traces back to bundle bloat identified by react-health
|
|
897
86
|
```
|
|
898
87
|
|
|
899
|
-
## Tech Stack Support
|
|
900
|
-
|
|
901
|
-
| Framework | Styling | Components | Motion |
|
|
902
|
-
|--------------|--------------------|---------------|---------------------|
|
|
903
|
-
| React 19 | TailwindCSS 4 | shadcn/ui | Framer Motion |
|
|
904
|
-
| Next.js 16 | CSS Custom Props | Radix UI | Framer Motion |
|
|
905
|
-
| SvelteKit 5 | CSS Custom Props | Custom | View Transitions API|
|
|
906
|
-
| Vue 3 | TailwindCSS 4 | Headless UI | Vue Transitions |
|
|
907
|
-
| Astro 5 | TailwindCSS 4 | Astro Islands | View Transitions API|
|
|
908
|
-
|
|
909
88
|
## Constraints
|
|
910
89
|
|
|
911
90
|
1. MUST respect `prefers-reduced-motion` on every animation — no exceptions.
|
|
@@ -933,6 +112,8 @@ landing-patterns → type-system: pulls font pairing for section copy
|
|
|
933
112
|
|
|
934
113
|
## Done When
|
|
935
114
|
|
|
115
|
+
- React health score generated (0-100) with per-dimension breakdown; top 5 fixes listed by impact; dead code inventory complete
|
|
116
|
+
- Web Vitals report produced with all 6 metrics against thresholds; render-blocking resources identified; CLS culprits found; image optimization recommendations emitted
|
|
936
117
|
- Token file generated with 3-layer structure; hardcoded values replaced or flagged with diffs; dark/light theme switcher emitted
|
|
937
118
|
- Palette selected, CSS custom properties emitted, contrast ratios verified (≥ 4.5:1 body, ≥ 3:1 large text), colorblind alternatives noted
|
|
938
119
|
- Font pairing selected, Google Fonts link emitted, Tailwind fontFamily config emitted, type scale CSS variables written
|
|
@@ -944,4 +125,4 @@ landing-patterns → type-system: pulls font pairing for section copy
|
|
|
944
125
|
|
|
945
126
|
## Cost Profile
|
|
946
127
|
|
|
947
|
-
~
|
|
128
|
+
~24,000–38,000 tokens per full pack run (all 10 skills). Individual skill: ~2,000–5,000 tokens. Sonnet default. Use haiku for detection scans (Step 1 of each skill); escalate to sonnet for generation, refactoring, and report writing. Use `design-decision` first when starting a new project — it reduces token cost of subsequent skills by pre-scoping palette and typography choices.
|