@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.
Files changed (144) hide show
  1. package/README.md +40 -34
  2. package/compiler/__tests__/pack-split.test.js +145 -0
  3. package/compiler/bin/rune.js +0 -5
  4. package/compiler/doctor.js +42 -0
  5. package/compiler/emitter.js +27 -4
  6. package/compiler/parser.js +41 -3
  7. package/compiler/transformer.js +10 -6
  8. package/compiler/transforms/compliance.js +40 -0
  9. package/extensions/ai-ml/PACK.md +38 -474
  10. package/extensions/ai-ml/skills/ai-agents.md +172 -0
  11. package/extensions/ai-ml/skills/code-sandbox.md +187 -0
  12. package/extensions/ai-ml/skills/deep-research.md +146 -0
  13. package/extensions/ai-ml/skills/embedding-search.md +66 -0
  14. package/extensions/ai-ml/skills/fine-tuning-guide.md +74 -0
  15. package/extensions/ai-ml/skills/llm-architect.md +125 -0
  16. package/extensions/ai-ml/skills/llm-integration.md +64 -0
  17. package/extensions/ai-ml/skills/prompt-patterns.md +72 -0
  18. package/extensions/ai-ml/skills/rag-patterns.md +66 -0
  19. package/extensions/ai-ml/skills/web-extraction.md +114 -0
  20. package/extensions/analytics/PACK.md +19 -484
  21. package/extensions/analytics/skills/ab-testing.md +72 -0
  22. package/extensions/analytics/skills/dashboard-patterns.md +83 -0
  23. package/extensions/analytics/skills/data-validation.md +68 -0
  24. package/extensions/analytics/skills/funnel-analysis.md +81 -0
  25. package/extensions/analytics/skills/sql-patterns.md +57 -0
  26. package/extensions/analytics/skills/statistical-analysis.md +79 -0
  27. package/extensions/analytics/skills/tracking-setup.md +71 -0
  28. package/extensions/backend/PACK.md +44 -618
  29. package/extensions/backend/skills/api-patterns.md +84 -0
  30. package/extensions/backend/skills/async-pipeline.md +193 -0
  31. package/extensions/backend/skills/auth-patterns.md +97 -0
  32. package/extensions/backend/skills/background-jobs.md +133 -0
  33. package/extensions/backend/skills/caching-patterns.md +108 -0
  34. package/extensions/backend/skills/cli-generation.md +133 -0
  35. package/extensions/backend/skills/database-patterns.md +87 -0
  36. package/extensions/backend/skills/middleware-patterns.md +104 -0
  37. package/extensions/chrome-ext/PACK.md +19 -921
  38. package/extensions/chrome-ext/skills/cws-preflight.md +143 -0
  39. package/extensions/chrome-ext/skills/cws-publish.md +104 -0
  40. package/extensions/chrome-ext/skills/ext-ai-integration.md +251 -0
  41. package/extensions/chrome-ext/skills/ext-messaging.md +139 -0
  42. package/extensions/chrome-ext/skills/ext-storage.md +133 -0
  43. package/extensions/chrome-ext/skills/mv3-scaffold.md +164 -0
  44. package/extensions/content/PACK.md +43 -335
  45. package/extensions/content/skills/blog-patterns.md +88 -0
  46. package/extensions/content/skills/cms-integration.md +131 -0
  47. package/extensions/content/skills/content-scoring.md +107 -0
  48. package/extensions/content/skills/i18n.md +83 -0
  49. package/extensions/content/skills/mdx-authoring.md +137 -0
  50. package/extensions/content/skills/reference.md +1014 -0
  51. package/extensions/content/skills/seo-patterns.md +67 -0
  52. package/extensions/content/skills/video-repurpose.md +153 -0
  53. package/extensions/devops/PACK.md +38 -457
  54. package/extensions/devops/skills/chaos-testing.md +67 -0
  55. package/extensions/devops/skills/ci-cd.md +75 -0
  56. package/extensions/devops/skills/docker.md +58 -0
  57. package/extensions/devops/skills/edge-serverless.md +163 -0
  58. package/extensions/devops/skills/infra-as-code.md +158 -0
  59. package/extensions/devops/skills/kubernetes.md +110 -0
  60. package/extensions/devops/skills/monitoring.md +57 -0
  61. package/extensions/devops/skills/server-setup.md +64 -0
  62. package/extensions/devops/skills/ssl-domain.md +42 -0
  63. package/extensions/ecommerce/PACK.md +62 -226
  64. package/extensions/ecommerce/skills/cart-system.md +79 -0
  65. package/extensions/ecommerce/skills/inventory-mgmt.md +102 -0
  66. package/extensions/ecommerce/skills/order-management.md +126 -0
  67. package/extensions/ecommerce/skills/payment-integration.md +472 -0
  68. package/extensions/ecommerce/skills/shopify-dev.md +69 -0
  69. package/extensions/ecommerce/skills/subscription-billing.md +93 -0
  70. package/extensions/ecommerce/skills/tax-compliance.md +117 -0
  71. package/extensions/gamedev/PACK.md +66 -317
  72. package/extensions/gamedev/skills/asset-pipeline.md +74 -0
  73. package/extensions/gamedev/skills/audio-system.md +129 -0
  74. package/extensions/gamedev/skills/camera-system.md +87 -0
  75. package/extensions/gamedev/skills/ecs.md +98 -0
  76. package/extensions/gamedev/skills/game-loops.md +72 -0
  77. package/extensions/gamedev/skills/input-system.md +199 -0
  78. package/extensions/gamedev/skills/multiplayer.md +180 -0
  79. package/extensions/gamedev/skills/particles.md +105 -0
  80. package/extensions/gamedev/skills/physics-engine.md +89 -0
  81. package/extensions/gamedev/skills/scene-management.md +146 -0
  82. package/extensions/gamedev/skills/threejs-patterns.md +90 -0
  83. package/extensions/gamedev/skills/webgl.md +71 -0
  84. package/extensions/mobile/PACK.md +56 -223
  85. package/extensions/mobile/skills/app-store-connect.md +152 -0
  86. package/extensions/mobile/skills/app-store-prep.md +66 -0
  87. package/extensions/mobile/skills/deep-linking.md +109 -0
  88. package/extensions/mobile/skills/flutter.md +60 -0
  89. package/extensions/mobile/skills/ios-build-pipeline.md +142 -0
  90. package/extensions/mobile/skills/native-bridge.md +66 -0
  91. package/extensions/mobile/skills/ota-updates.md +97 -0
  92. package/extensions/mobile/skills/push-notifications.md +111 -0
  93. package/extensions/mobile/skills/react-native.md +82 -0
  94. package/extensions/saas/PACK.md +26 -720
  95. package/extensions/saas/skills/billing-integration.md +121 -0
  96. package/extensions/saas/skills/feature-flags.md +130 -0
  97. package/extensions/saas/skills/multi-tenant.md +103 -0
  98. package/extensions/saas/skills/onboarding-flow.md +139 -0
  99. package/extensions/saas/skills/subscription-flow.md +95 -0
  100. package/extensions/saas/skills/team-management.md +144 -0
  101. package/extensions/security/PACK.md +10 -448
  102. package/extensions/security/skills/api-security.md +140 -0
  103. package/extensions/security/skills/compliance.md +68 -0
  104. package/extensions/security/skills/owasp-audit.md +64 -0
  105. package/extensions/security/skills/pentest-patterns.md +77 -0
  106. package/extensions/security/skills/secret-mgmt.md +65 -0
  107. package/extensions/security/skills/supply-chain.md +65 -0
  108. package/extensions/trading/PACK.md +18 -535
  109. package/extensions/trading/skills/chart-components.md +55 -0
  110. package/extensions/trading/skills/experiment-loop.md +125 -0
  111. package/extensions/trading/skills/fintech-patterns.md +47 -0
  112. package/extensions/trading/skills/indicator-library.md +58 -0
  113. package/extensions/trading/skills/quant-analysis.md +111 -0
  114. package/extensions/trading/skills/realtime-data.md +58 -0
  115. package/extensions/trading/skills/trade-logic.md +104 -0
  116. package/extensions/ui/PACK.md +34 -853
  117. package/extensions/ui/skills/a11y-audit.md +91 -0
  118. package/extensions/ui/skills/animation-patterns.md +106 -0
  119. package/extensions/ui/skills/component-patterns.md +75 -0
  120. package/extensions/ui/skills/design-decision.md +98 -0
  121. package/extensions/ui/skills/design-system.md +68 -0
  122. package/extensions/ui/skills/landing-patterns.md +155 -0
  123. package/extensions/ui/skills/palette-picker.md +162 -0
  124. package/extensions/ui/skills/react-health.md +90 -0
  125. package/extensions/ui/skills/type-system.md +125 -0
  126. package/extensions/ui/skills/web-vitals.md +153 -0
  127. package/extensions/zalo/PACK.md +117 -0
  128. package/extensions/zalo/skills/zalo-oa-mcp.md +317 -0
  129. package/extensions/zalo/skills/zalo-oa-messaging.md +429 -0
  130. package/extensions/zalo/skills/zalo-oa-setup.md +236 -0
  131. package/extensions/zalo/skills/zalo-oa-webhook.md +189 -0
  132. package/extensions/zalo/skills/zalo-personal-messaging.md +194 -0
  133. package/extensions/zalo/skills/zalo-personal-setup.md +153 -0
  134. package/extensions/zalo/skills/zalo-rate-guard.md +219 -0
  135. package/package.json +1 -1
  136. package/skills/brainstorm/SKILL.md +63 -1
  137. package/skills/cook/SKILL.md +84 -5
  138. package/skills/mcp-builder/SKILL.md +48 -1
  139. package/skills/review/SKILL.md +42 -5
  140. package/skills/review-intake/SKILL.md +17 -1
  141. package/skills/skill-router/SKILL.md +89 -7
  142. package/skills/team/SKILL.md +24 -1
  143. package/skills/test/SKILL.md +18 -0
  144. package/skills/verification/SKILL.md +40 -1
@@ -0,0 +1,91 @@
1
+ ---
2
+ name: "a11y-audit"
3
+ pack: "@rune/ui"
4
+ description: "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."
5
+ model: sonnet
6
+ tools: [Read, Edit, Write, Grep, Glob, Bash]
7
+ ---
8
+
9
+ # a11y-audit
10
+
11
+ 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.
12
+
13
+ #### Workflow
14
+
15
+ **Step 1 — Automated scan**
16
+ 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.
17
+
18
+ **Step 2 — Manual WCAG 2.1 AA review**
19
+ 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.
20
+
21
+ **Step 3 — Emit audit report**
22
+ 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.
23
+
24
+ **Step 4 — Focus trap audit + skip nav**
25
+ 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).
26
+
27
+ #### Example
28
+
29
+ ```tsx
30
+ // VIOLATION: icon button with no accessible name
31
+ <button onClick={handleClose}>
32
+ <XIcon />
33
+ </button>
34
+
35
+ // FIX: add aria-label; icon is decorative
36
+ <button onClick={handleClose} aria-label="Close dialog">
37
+ <XIcon aria-hidden="true" />
38
+ </button>
39
+
40
+ // VIOLATION: div acting as button (no keyboard, no role)
41
+ <div onClick={handleSubmit}>Submit</div>
42
+
43
+ // FIX: use semantic element
44
+ <button type="button" onClick={handleSubmit}>Submit</button>
45
+ ```
46
+
47
+ ```tsx
48
+ // Focus trap pattern for modals (using focus-trap-react)
49
+ import FocusTrap from 'focus-trap-react'
50
+
51
+ export function Dialog({ open, onClose, title, children }: DialogProps) {
52
+ return open ? (
53
+ <FocusTrap focusTrapOptions={{ onDeactivate: onClose }}>
54
+ <div
55
+ role="dialog"
56
+ aria-modal="true"
57
+ aria-labelledby="dialog-title"
58
+ className="fixed inset-0 z-50 flex items-center justify-center"
59
+ >
60
+ <div className="bg-[var(--bg-card)] rounded-xl p-6 max-w-md w-full shadow-lg">
61
+ <h2 id="dialog-title" className="text-h3 font-semibold mb-4">{title}</h2>
62
+ {children}
63
+ <button
64
+ onClick={onClose}
65
+ aria-label="Close dialog"
66
+ className="absolute top-4 right-4 focus-visible:ring-2 focus-visible:ring-[var(--primary)]"
67
+ >
68
+ <X aria-hidden="true" />
69
+ </button>
70
+ </div>
71
+ </div>
72
+ </FocusTrap>
73
+ ) : null
74
+ }
75
+ ```
76
+
77
+ ```html
78
+ <!-- Skip navigation link — must be FIRST focusable element in <body> -->
79
+ <a
80
+ href="#main-content"
81
+ class="
82
+ sr-only focus:not-sr-only
83
+ fixed top-4 left-4 z-[9999]
84
+ px-4 py-2 rounded-md
85
+ bg-[var(--primary)] text-white font-semibold text-sm
86
+ focus-visible:ring-2 focus-visible:ring-offset-2
87
+ "
88
+ >
89
+ Skip to main content
90
+ </a>
91
+ ```
@@ -0,0 +1,106 @@
1
+ ---
2
+ name: "animation-patterns"
3
+ pack: "@rune/ui"
4
+ description: "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."
5
+ model: sonnet
6
+ tools: [Read, Edit, Write, Grep, Glob, Bash]
7
+ ---
8
+
9
+ # animation-patterns
10
+
11
+ 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`.
12
+
13
+ #### Workflow
14
+
15
+ **Step 1 — Detect interaction points**
16
+ 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.
17
+
18
+ **Step 2 — Apply micro-interactions**
19
+ 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.
20
+
21
+ **Step 3 — Audit reduced-motion compliance**
22
+ 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.
23
+
24
+ **Step 4 — Page transition patterns**
25
+ 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.
26
+
27
+ #### Example
28
+
29
+ ```tsx
30
+ // Tailwind micro-interaction with reduced-motion respect
31
+ <button
32
+ className="
33
+ transform transition-all duration-200 ease-out
34
+ hover:scale-105 hover:shadow-md
35
+ active:scale-95
36
+ motion-reduce:transform-none motion-reduce:transition-none
37
+ "
38
+ >
39
+ Confirm
40
+ </button>
41
+
42
+ // Framer Motion with reduced-motion hook
43
+ const prefersReduced = useReducedMotion()
44
+
45
+ <motion.div
46
+ initial={{ opacity: 0, y: prefersReduced ? 0 : 16 }}
47
+ animate={{ opacity: 1, y: 0 }}
48
+ transition={{ duration: prefersReduced ? 0 : 0.25 }}
49
+ />
50
+ ```
51
+
52
+ ```tsx
53
+ // Shared layout animation — card expands to modal (Framer Motion)
54
+ // Works because both use the same layoutId="card-{id}"
55
+ function CardGrid({ items }: { items: Item[] }) {
56
+ const [selected, setSelected] = useState<string | null>(null)
57
+ return (
58
+ <>
59
+ {items.map((item) => (
60
+ <motion.div
61
+ key={item.id}
62
+ layoutId={`card-${item.id}`}
63
+ onClick={() => setSelected(item.id)}
64
+ className="rounded-xl bg-[var(--bg-card)] border border-[var(--border)] cursor-pointer"
65
+ >
66
+ <motion.h3 layoutId={`title-${item.id}`}>{item.title}</motion.h3>
67
+ </motion.div>
68
+ ))}
69
+
70
+ <AnimatePresence>
71
+ {selected && (
72
+ <motion.div
73
+ layoutId={`card-${selected}`}
74
+ className="fixed inset-8 z-50 rounded-2xl bg-[var(--bg-card)] p-8"
75
+ >
76
+ <motion.h3 layoutId={`title-${selected}`} className="text-h2 font-bold">
77
+ {items.find(i => i.id === selected)?.title}
78
+ </motion.h3>
79
+ <button onClick={() => setSelected(null)} aria-label="Close">
80
+ <X aria-hidden="true" />
81
+ </button>
82
+ </motion.div>
83
+ )}
84
+ </AnimatePresence>
85
+ </>
86
+ )
87
+ }
88
+ ```
89
+
90
+ ```css
91
+ /* View Transitions API — SvelteKit / Astro page transitions */
92
+ /* In app.css or global stylesheet */
93
+ @media (prefers-reduced-motion: no-preference) {
94
+ ::view-transition-old(root) {
95
+ animation: 200ms ease-out both fade-out;
96
+ }
97
+ ::view-transition-new(root) {
98
+ animation: 250ms ease-in both fade-in;
99
+ }
100
+ }
101
+
102
+ @keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }
103
+ @keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
104
+
105
+ /* SvelteKit: enable in svelte.config.js → experimental: { viewTransitions: true } */
106
+ ```
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: "component-patterns"
3
+ pack: "@rune/ui"
4
+ description: "Component architecture patterns — compound components, render props, composition, slots. Detects prop-heavy components and guides refactoring toward composable, maintainable architectures."
5
+ model: sonnet
6
+ tools: [Read, Edit, Write, Grep, Glob, Bash]
7
+ ---
8
+
9
+ # component-patterns
10
+
11
+ Component architecture patterns — compound components, render props, composition, slots. Detects prop-heavy components and guides refactoring toward composable, maintainable architectures.
12
+
13
+ #### Workflow
14
+
15
+ **Step 1 — Detect prop-heavy components**
16
+ 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.
17
+
18
+ **Step 2 — Classify and suggest pattern**
19
+ 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.
20
+
21
+ **Step 3 — Emit refactored scaffold**
22
+ Write the refactored component skeleton following the compound component pattern. Do not overwrite the original — emit to a `*.refactored.tsx` file for review.
23
+
24
+ **Step 4 — Composition vs inheritance + slot patterns**
25
+ 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.
26
+
27
+ #### Example
28
+
29
+ ```tsx
30
+ // BEFORE: prop-heavy (9 props, hard to extend)
31
+ <Modal title="..." open footer actions size variant onClose onConfirm loading />
32
+
33
+ // AFTER: compound component pattern
34
+ <Modal open onClose={handleClose}>
35
+ <Modal.Header>Confirm Action</Modal.Header>
36
+ <Modal.Body>Are you sure?</Modal.Body>
37
+ <Modal.Footer>
38
+ <Button variant="ghost" onClick={handleClose}>Cancel</Button>
39
+ <Button variant="primary" loading={isLoading} onClick={handleConfirm}>
40
+ Confirm
41
+ </Button>
42
+ </Modal.Footer>
43
+ </Modal>
44
+ ```
45
+
46
+ ```tsx
47
+ // Svelte slot pattern — composition over prop drilling
48
+ // Caller decides what goes in header/footer, component owns layout
49
+ <Card>
50
+ <svelte:fragment slot="header">
51
+ <h3 class="text-h3 font-semibold">Usage this month</h3>
52
+ </svelte:fragment>
53
+
54
+ <MetricChart data={usage} />
55
+
56
+ <svelte:fragment slot="footer">
57
+ <a href="/billing" class="text-sm text-[var(--primary)]">View invoice</a>
58
+ </svelte:fragment>
59
+ </Card>
60
+ ```
61
+
62
+ ```tsx
63
+ // React typed children slots via discriminated union
64
+ type ModalSlot = { as: 'header' | 'body' | 'footer'; children: React.ReactNode }
65
+
66
+ function resolveSlots(children: React.ReactNode) {
67
+ const slots: Record<string, React.ReactNode> = {}
68
+ React.Children.forEach(children, (child) => {
69
+ if (React.isValidElement<ModalSlot>(child) && child.props.as) {
70
+ slots[child.props.as] = child.props.children
71
+ }
72
+ })
73
+ return slots
74
+ }
75
+ ```
@@ -0,0 +1,98 @@
1
+ ---
2
+ name: "design-decision"
3
+ pack: "@rune/ui"
4
+ description: "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."
5
+ model: sonnet
6
+ tools: [Read, Edit, Write, Grep, Glob, Bash]
7
+ ---
8
+
9
+ # design-decision
10
+
11
+ 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."
12
+
13
+ #### Workflow
14
+
15
+ **Step 1 — Classify product domain**
16
+ Read `CLAUDE.md`, `README.md`, or ask: "What problem does this product solve? Who uses it?" Map to one of the 9 domains below.
17
+
18
+ **Step 2 — Recommend style stack**
19
+ 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").
20
+
21
+ **Step 3 — Generate design-system.md**
22
+ 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.
23
+
24
+ #### Domain → Style Matrix
25
+
26
+ ```
27
+ Domain Style Palette Typography Component Aesthetic
28
+ ─────────────────────────────────────────────────────────────────────────────────────────────
29
+ Fintech/Trading Dark + Precision midnight-profit Space Grotesk+Mono Dense tables, data overlays
30
+ Healthcare Clean + Calm clean-clinic DM Sans+DM Serif Rounded, soft, spacious
31
+ Education Warm + Friendly warm-academy* Fredoka+Nunito Illustrated, playful cards
32
+ Gaming Dark + Neon neon-arena Rajdhani+Exo 2 Hard edges, glow effects
33
+ Ecommerce Trust + Focused trust-cart Inter+Inter Product-first, clean CTA
34
+ SaaS/Dashboard Precision + Flex slate-precision Space Grotesk+Inter Data-dense, sidebar nav
35
+ Social/Community Vibrant + Engaged gradient-social* Inter+Inter Avatar-heavy, reaction UX
36
+ News/Content Readable + Neutral neutral-ink* Playfair+Source Serif Wide columns, drop caps
37
+ Productivity Minimal + Calm calm-focus* Inter+Inter (weight) Almost no decoration
38
+ DevTools Terminal + Crisp terminal-dark JetBrains Mono+Inter Code blocks, mono emphasis
39
+
40
+ * Palette not shown in palette-picker example block — generate with same CSS custom props pattern.
41
+ ```
42
+
43
+ #### Style Characteristic Reference
44
+
45
+ ```
46
+ glassmorphism When: premium SaaS landing, dark bg hero. Avoid: dense data tables (illegible).
47
+ CSS: background: rgba(255,255,255,0.05); backdrop-filter: blur(12px);
48
+ border: 1px solid rgba(255,255,255,0.1); border-radius: 16px;
49
+
50
+ neubrutalism When: bold brand statement, startup, creative tool. Avoid: healthcare, finance.
51
+ CSS: border: 2px solid #000; box-shadow: 4px 4px 0 #000;
52
+ background: #ffe600; (or other saturated fill)
53
+
54
+ claymorphism When: education, kids, consumer apps. Avoid: enterprise, B2B data tools.
55
+ CSS: border-radius: 20px; box-shadow: 0 8px 0 rgba(0,0,0,0.15),
56
+ inset 0 -4px 0 rgba(0,0,0,0.1); (inflated, soft look)
57
+
58
+ aurora/gradient When: landing page hero ONLY, used sparingly. AVOID as overall theme.
59
+ CSS: background: conic-gradient(from 180deg at 50% 50%, ...); opacity: 0.15;
60
+ (subtle, behind content — never the main visual)
61
+
62
+ flat/minimal When: productivity, devtools, content. Best default for B2B SaaS.
63
+ CSS: No shadows except --shadow-sm. Single accent color. Whitespace-heavy.
64
+
65
+ dark-precision When: fintech, devtools, monitoring. Default dark bg with high-contrast accents.
66
+ CSS: bg #0f172a or darker; mono fonts for data; green/red semantic signals.
67
+ ```
68
+
69
+ #### Example — Generated design-system.md
70
+
71
+ ```markdown
72
+ # Design System: [Product Name]
73
+
74
+ ## Domain
75
+ SaaS Dashboard — B2B productivity tool for engineering teams
76
+
77
+ ## Visual Style
78
+ Flat/Minimal with Slate Precision palette. Dark mode default.
79
+ Do NOT use gradient blobs, glassmorphism panels, or Lucide icons.
80
+
81
+ ## Color Tokens
82
+ [→ See palette.css — generated by palette-picker, slate-precision]
83
+
84
+ ## Typography
85
+ Pairing: Space Grotesk (headings, 600–700) + Inter (body, 400–500)
86
+ [→ See Google Fonts link in type-system output]
87
+
88
+ ## Component Rules
89
+ - Cards: bg-card + border border-[var(--border)] + rounded-lg. NO drop shadows on cards.
90
+ - Buttons: primary = bg-primary text-white. ghost = border + transparent bg.
91
+ - Icons: Phosphor Icons only. Weight: regular for UI, fill for status indicators.
92
+ - Data tables: zebra stripe with bg-elevated on odd rows. Mono font for numbers.
93
+
94
+ ## Anti-Patterns for This Domain
95
+ - No centered hero with 2-button CTA
96
+ - No gradient backgrounds
97
+ - No uniform card grid (vary card sizes by content importance)
98
+ ```
@@ -0,0 +1,68 @@
1
+ ---
2
+ name: "design-system"
3
+ pack: "@rune/ui"
4
+ description: "Generate and enforce design system tokens — colors, typography, spacing, shadows, border radius. Detects existing ad-hoc values and consolidates them into a structured token file with full dark/light theme support."
5
+ model: sonnet
6
+ tools: [Read, Edit, Write, Grep, Glob, Bash]
7
+ ---
8
+
9
+ # design-system
10
+
11
+ Generate and enforce design system tokens — colors, typography, spacing, shadows, border radius. Detects existing ad-hoc values and consolidates them into a structured token file with full dark/light theme support.
12
+
13
+ #### Workflow
14
+
15
+ **Step 1 — Detect existing tokens**
16
+ Use Grep to scan for hardcoded color values (`#[0-9a-fA-F]{3,6}`, `rgb(`, `hsl(`), spacing (`px`, `rem`), and font sizes across all CSS, Tailwind config, and component files. Build an inventory of values in use.
17
+
18
+ **Step 2 — Generate token file**
19
+ 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`).
20
+
21
+ **Step 3 — Enforce consistency**
22
+ 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.
23
+
24
+ **Step 4 — Dark/light theme toggle**
25
+ 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.
26
+
27
+ #### Example
28
+
29
+ ```css
30
+ /* tokens.css — generated by design-system skill */
31
+ :root,
32
+ [data-theme="light"] {
33
+ /* Primitive */
34
+ --color-slate-950: #020617;
35
+ --color-slate-900: #0f172a;
36
+ --color-slate-100: #f1f5f9;
37
+ --color-emerald-500: #10b981;
38
+ --space-4: 1rem;
39
+ --radius-md: 0.5rem;
40
+
41
+ /* Semantic */
42
+ --bg-base: var(--color-slate-100);
43
+ --bg-card: #ffffff;
44
+ --text-primary: var(--color-slate-950);
45
+ --color-primary: var(--color-emerald-500);
46
+ --border-color: rgba(0, 0, 0, 0.1);
47
+ }
48
+
49
+ [data-theme="dark"] {
50
+ --bg-base: var(--color-slate-950);
51
+ --bg-card: var(--color-slate-900);
52
+ --text-primary: #f8fafc;
53
+ --color-primary: var(--color-emerald-500);
54
+ --border-color: rgba(255, 255, 255, 0.08);
55
+ }
56
+ ```
57
+
58
+ ```ts
59
+ // theme-toggle.ts — minimal toggle, no flash on reload
60
+ const stored = localStorage.getItem('theme') ?? 'dark'
61
+ document.documentElement.setAttribute('data-theme', stored)
62
+
63
+ export function toggleTheme() {
64
+ const next = document.documentElement.getAttribute('data-theme') === 'dark' ? 'light' : 'dark'
65
+ document.documentElement.setAttribute('data-theme', next)
66
+ localStorage.setItem('theme', next)
67
+ }
68
+ ```
@@ -0,0 +1,155 @@
1
+ ---
2
+ name: "landing-patterns"
3
+ pack: "@rune/ui"
4
+ description: "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."
5
+ model: sonnet
6
+ tools: [Read, Edit, Write, Grep, Glob, Bash]
7
+ ---
8
+
9
+ # landing-patterns
10
+
11
+ 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.
12
+
13
+ #### Workflow
14
+
15
+ **Step 1 — Identify page goal**
16
+ Classify: acquisition (email capture / waitlist) | conversion (paid plan) | brand (awareness) | product (feature showcase). Goal determines section priority and CTA placement.
17
+
18
+ **Step 2 — Select section sequence**
19
+ 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.
20
+
21
+ **Step 3 — Apply style**
22
+ 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.
23
+
24
+ **Step 4 — Responsive audit**
25
+ Every section must work at 375px (mobile), 768px (tablet), 1280px (desktop). Check text wrapping, CTA tap targets (≥ 44px), and image aspect ratios.
26
+
27
+ **Step 5 — Conversion check**
28
+ 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.
29
+
30
+ #### Section Library
31
+
32
+ ```
33
+ Hero Variants:
34
+ split-hero Left text + right image/video. NOT centered formula.
35
+ asymmetric-hero 60/40 split. Offset grid. Works for SaaS.
36
+ cinematic-hero Full-bleed video/image background. Text overlay. Gaming / brand.
37
+
38
+ Social Proof:
39
+ logo-strip Horizontal scrolling logos. Grayscale → color on hover.
40
+ stats-bar 3–4 large numbers (e.g., "12,000+ teams"). Mono font.
41
+ testimonial-grid Asymmetric card sizes. NOT uniform grid.
42
+ quote-hero Single large pull-quote with avatar. Editorial feel.
43
+
44
+ Features:
45
+ bento-grid Mixed-size cards. Large hero card + smaller supporting.
46
+ alternating-rows Icon + text, alternating left/right. Classic but effective.
47
+ feature-tabs Tab navigation for feature groups. Reduces scroll length.
48
+
49
+ Conversion:
50
+ pricing-toggle Monthly / annual toggle. Recommended tier visually elevated.
51
+ pricing-comparison Feature matrix table. Clear checkmarks, no feature bloat.
52
+ cta-split Left: value reminder. Right: form or button. High conversion.
53
+ floating-cta Sticky bar at bottom on mobile. Dismissable.
54
+
55
+ Discovery:
56
+ faq-accordion Expandable Q&A. Addresses objections in copy, not just features.
57
+ how-it-works 3-step numbered sequence. Icon per step. Progress line optional.
58
+ waitlist-capture Email input + social proof count. ("Join 3,200 on waitlist")
59
+ ```
60
+
61
+ #### Example — Split Hero (Anti-AI compliant)
62
+
63
+ ```tsx
64
+ // ANTI-AI RULES APPLIED:
65
+ // ✅ Split layout — NOT centered hero formula
66
+ // ✅ Custom brand color — NOT default indigo/violet
67
+ // ✅ Phosphor Icons — NOT Lucide
68
+ // ✅ Asymmetric layout — NOT uniform sections
69
+ // ✅ No gradient blob
70
+
71
+ import { ArrowRight, CheckCircle } from '@phosphor-icons/react'
72
+
73
+ export function SplitHero() {
74
+ return (
75
+ <section className="min-h-screen grid lg:grid-cols-[1fr_1.2fr] items-center gap-0">
76
+ {/* Left — copy */}
77
+ <div className="px-8 py-20 lg:px-16 lg:py-0 max-w-xl">
78
+ <span className="inline-flex items-center gap-2 text-sm font-medium text-[var(--primary)] mb-6">
79
+ <CheckCircle weight="fill" size={16} aria-hidden="true" />
80
+ Now in public beta
81
+ </span>
82
+ <h1 className="font-display text-h1 font-bold text-[var(--text-primary)] mb-6 leading-tight">
83
+ Shipping fast starts<br />
84
+ <em className="not-italic text-[var(--primary)]">before the sprint</em>
85
+ </h1>
86
+ <p className="text-[var(--text-secondary)] text-body leading-relaxed mb-8 max-w-md">
87
+ Rune wires your AI coding assistant to a mesh of 55 skills so you spend time building, not prompting.
88
+ </p>
89
+ <div className="flex flex-wrap gap-3">
90
+ <a
91
+ href="/signup"
92
+ 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"
93
+ >
94
+ Get started free
95
+ <ArrowRight size={16} aria-hidden="true" />
96
+ </a>
97
+ <a
98
+ href="/docs"
99
+ 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"
100
+ >
101
+ Read the docs
102
+ </a>
103
+ </div>
104
+ </div>
105
+
106
+ {/* Right — visual (product screenshot or illustration) */}
107
+ <div className="relative h-full min-h-[60vh] bg-[var(--bg-card)] overflow-hidden">
108
+ {/* Replace with actual product screenshot */}
109
+ <div className="absolute inset-0 flex items-center justify-center text-[var(--text-secondary)]">
110
+ Product visual
111
+ </div>
112
+ </div>
113
+ </section>
114
+ )
115
+ }
116
+ ```
117
+
118
+ #### Example — Bento Grid Features
119
+
120
+ ```tsx
121
+ // Bento: asymmetric sizing breaks the uniform grid anti-pattern
122
+ export function BentoFeatures() {
123
+ return (
124
+ <section className="py-24 px-6">
125
+ <div className="max-w-5xl mx-auto">
126
+ <h2 className="font-display text-h2 font-semibold text-[var(--text-primary)] mb-12 text-center">
127
+ One mesh. Every workflow.
128
+ </h2>
129
+ {/* Intentionally unequal grid — NOT uniform cards */}
130
+ <div className="grid grid-cols-2 lg:grid-cols-3 gap-4 auto-rows-[200px]">
131
+ {/* Hero card — spans 2 cols × 2 rows */}
132
+ <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">
133
+ <p className="text-xs font-medium text-[var(--primary)] mb-2 uppercase tracking-wide">Orchestration</p>
134
+ <h3 className="text-xl font-bold text-[var(--text-primary)] mb-2">cook — your AI project manager</h3>
135
+ <p className="text-sm text-[var(--text-secondary)]">Phases your work, delegates to the right skill, and escalates when stuck.</p>
136
+ </div>
137
+ {/* Small cards fill remaining cells */}
138
+ <div className="rounded-xl bg-[var(--bg-card)] border border-[var(--border)] p-6 flex flex-col justify-between">
139
+ <p className="text-xs font-medium text-[var(--text-secondary)] uppercase tracking-wide">55 Skills</p>
140
+ <p className="text-2xl font-bold font-mono text-[var(--text-primary)]">5 layers</p>
141
+ </div>
142
+ <div className="rounded-xl bg-[var(--bg-card)] border border-[var(--border)] p-6">
143
+ <p className="text-xs font-medium text-[var(--text-secondary)] uppercase tracking-wide mb-2">Platforms</p>
144
+ <p className="text-sm text-[var(--text-primary)]">Claude Code · Cursor · Windsurf · Antigravity</p>
145
+ </div>
146
+ <div className="col-span-2 rounded-xl bg-[var(--bg-card)] border border-[var(--border)] p-6">
147
+ <p className="text-xs font-medium text-[var(--text-secondary)] uppercase tracking-wide mb-2">Open source</p>
148
+ <p className="text-sm text-[var(--text-primary)]">MIT license. Self-host or install in 30 seconds.</p>
149
+ </div>
150
+ </div>
151
+ </div>
152
+ </section>
153
+ )
154
+ }
155
+ ```