[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75VQJW1M1JJJYFFKSD4G07X":3,"skill-same:01M75VQJW1M1JJJYFFKSD4G07X":52},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":32,"repositoryHtmlUrl":33,"repositoryHomepageUrl":6,"ownerHtmlUrl":34,"ownerBlogUrl":35,"ownerDescription":36,"updatedAt":37,"install":38,"resources":51},"01M75VQJW1M1JJJYFFKSD4G07X","cavekit-design-system",null,"How to write and maintain DESIGN.md as the visual specification layer for Cavekit projects. Nine-section format, design tokens, accessibility, integration with kits\u002Fplans. Use when defining or revising visual identity, importing a third-party design system, or auditing UI code against design tokens.","Zhachory1\u002Fmewritecode","Zhachory1","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F16491051?v=4","01M75VQD5GDF5DGCV6NE8BHKY2","Zhachory Volker","01M75VQD62ESGM4RF6KEA5XB85",2,"MIT","https:\u002F\u002Fgithub.com\u002FZhachory1\u002Fmewritecode\u002Fblob\u002Fmain\u002Fpackages\u002Fcoding-agent\u002Fskills\u002Fcavekit-design-system\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: cavekit-design-system\ndescription: How to write and maintain DESIGN.md as the visual specification layer for Cavekit projects. Nine-section format, design tokens, accessibility, integration with kits\u002Fplans. Use when defining or revising visual identity, importing a third-party design system, or auditing UI code against design tokens.\nallowed-tools:\n  - read\n  - grep\n  - edit\neffort: medium\n---\n\n\n# Design System: DESIGN.md for AI Agents\n\n## Core Principle: DESIGN.md Describes WHAT It Looks Like, Not HOW to Build It\n\nDESIGN.md is the visual equivalent of kits. It defines the project's visual language — colors, typography, spacing, components, responsive behavior — in a format AI agents can read and apply consistently. It is a **parallel constraint layer** that all Hunt phases consult.\n\n| Document | Defines | Audience |\n|----------|---------|----------|\n| CLAUDE.md | How to build the project | Coding agents |\n| Kits | What must be true (behavior) | All agents |\n| **DESIGN.md** | **What it looks like (visual)** | **UI-building agents** |\n| Plans | How to build it (tasks) | Builder agents |\n\n### Why a Dedicated Design System Document?\n\nWithout DESIGN.md, visual decisions scatter across kits, plans, and code:\n- Colors get hardcoded differently per component\n- Typography choices vary between agents and sessions\n- Spacing becomes inconsistent across the UI\n- New components reinvent patterns that already exist\n\nDESIGN.md centralizes these decisions. Every agent reads it before writing UI code.\n\n---\n\n## The 9-Section Stitch Format\n\nDESIGN.md follows the [Google Stitch format](https:\u002F\u002Fstitch.withgoogle.com\u002Fdocs\u002Fdesign-md\u002Foverview\u002F) — 9 sections that together define a complete visual language. Every DESIGN.md must contain all 9 sections.\n\n### Section 1: Visual Theme & Atmosphere\n\nThe design philosophy, mood, and overall aesthetic. Use evocative, specific language — not generic terms like \"clean and modern.\"\n\n```markdown\n## 1. Visual Theme & Atmosphere\n\nThis is a warm editorial experience built on natural materials. Think: a well-curated\nbookshop with soft overhead lighting and carefully chosen display shelves. The density\nis low — generous whitespace signals confidence and clarity. Every element earns its\nplace; nothing decorative exists without functional purpose.\n\n**Key attributes:** Warm, unhurried, editorial, confident\n**Density:** Low — generous whitespace, single-column focus\n**Personality:** Thoughtful librarian, not flashy storefront\n```\n\n**What good looks like:** A new designer reading this section could sketch a rough layout without seeing any other section.\n\n**Anti-pattern:** \"Clean, modern, and professional\" — this describes nothing specific.\n\n### Section 2: Color Palette & Roles\n\nEvery color needs three things: a semantic name, a hex value, and a functional role.\n\n```markdown\n## 2. Color Palette & Roles\n\n### Primary\n| Name | Hex | Role |\n|------|-----|------|\n| Terracotta Brand | #c96442 | Primary CTA, active states, brand anchors |\n| Terracotta Hover | #b85838 | Hover\u002Fpressed state for primary actions |\n\n### Neutral\n| Name | Hex | Role |\n|------|-----|------|\n| Near Black | #141413 | Primary text, headings |\n| Olive Gray | #5e5d59 | Secondary text, captions |\n| Parchment | #f5f4ed | Page background, default canvas |\n| Ivory White | #ffffff | Card surfaces, overlays |\n\n### Semantic\n| Name | Hex | Role |\n|------|-----|------|\n| Success Green | #2d7d46 | Confirmation, success states |\n| Warning Amber | #c27217 | Warnings, attention needed |\n| Error Red | #c24132 | Errors, destructive actions |\n| Info Blue | #3b6fb5 | Informational states, links |\n\n### Dark Mode (if applicable)\n| Light Name | Dark Equivalent | Hex |\n|------------|----------------|-----|\n| Parchment | Deep Charcoal | #1a1a1a |\n| Near Black | Off White | #e8e8e8 |\n```\n\n**Rules:**\n- Every hex value must be verified against the actual design or live site\n- Every color must have a clear functional role — no orphan colors\n- Name colors semantically (by role), not by hue (\"Primary CTA\" not \"Orange\")\n- If dark mode exists, map every light color to its dark equivalent\n\n### Section 3: Typography Rules\n\nComplete type hierarchy with specific values — no \"roughly 16px\" or \"medium weight.\"\n\n```markdown\n## 3. Typography Rules\n\n### Font Stack\n- **Display\u002FHeading:** \"Anthropic Serif\", Georgia, \"Times New Roman\", serif\n- **Body:** \"Anthropic Sans\", -apple-system, BlinkMacSystemFont, sans-serif\n- **Code:** \"Anthropic Mono\", \"SF Mono\", \"Fira Code\", monospace\n\n### Type Scale\n| Level | Size | Weight | Line Height | Letter Spacing | Font |\n|-------|------|--------|-------------|----------------|------|\n| H1 | 48px \u002F 3rem | 500 | 1.10 | -0.02em | Serif |\n| H2 | 36px \u002F 2.25rem | 500 | 1.15 | -0.01em | Serif |\n| H3 | 24px \u002F 1.5rem | 500 | 1.25 | 0 | Serif |\n| H4 | 20px \u002F 1.25rem | 600 | 1.30 | 0 | Sans |\n| Body | 16px \u002F 1rem | 400 | 1.60 | 0 | Sans |\n| Small | 14px \u002F 0.875rem | 400 | 1.50 | 0.01em | Sans |\n| Caption | 12px \u002F 0.75rem | 500 | 1.40 | 0.02em | Sans |\n\n### Principles\n- Headings use serif for warmth and authority\n- Body text uses sans-serif for readability at small sizes\n- Maximum line length: 65ch for body text\n- Minimum font size: 14px (never go below)\n```\n\n**Rules:**\n- Every level in the scale must have all 5 values (size, weight, line-height, letter-spacing, font)\n- Use rem alongside px for accessibility\n- Include font stack fallbacks\n\n### Section 4: Component Stylings\n\nConcrete styling for common components including interaction states.\n\n```markdown\n## 4. Component Stylings\n\n### Buttons\n**Primary:**\n- Background: Terracotta Brand (#c96442)\n- Text: Ivory White (#ffffff), 16px Sans, weight 500\n- Padding: 12px 24px\n- Border radius: 8px\n- Hover: Terracotta Hover (#b85838), translateY(-1px), shadow-sm\n- Active: translateY(0), shadow-none\n- Disabled: opacity 0.5, cursor not-allowed\n- Transition: all 150ms ease-out\n\n**Secondary:**\n- Background: transparent\n- Border: 1px solid Olive Gray (#5e5d59)\n- Text: Near Black (#141413)\n- Hover: background Parchment (#f5f4ed)\n\n### Cards\n- Background: Ivory White (#ffffff)\n- Border: 1px solid rgba(0,0,0,0.06)\n- Border radius: 12px\n- Padding: 24px\n- Shadow: 0 1px 3px rgba(0,0,0,0.04)\n- Hover: shadow 0 4px 12px rgba(0,0,0,0.08), translateY(-2px)\n\n### Inputs\n- Border: 1px solid #d0d0d0\n- Border radius: 8px\n- Padding: 10px 14px\n- Focus: border Terracotta Brand, ring 2px rgba(201,100,66,0.2)\n- Error: border Error Red, ring 2px rgba(194,65,50,0.2)\n\n### Navigation\n...\n```\n\n**Rules:**\n- Include hover, focus, active, and disabled states\n- Specify transition durations and easing\n- Include touch-target minimum sizes (44x44px)\n\n### Section 5: Layout Principles\n\nSpacing system, grid, containers, and whitespace philosophy.\n\n```markdown\n## 5. Layout Principles\n\n### Spacing Scale (base: 4px)\n| Token | Value | Usage |\n|-------|-------|-------|\n| space-1 | 4px | Tight gaps, icon margins |\n| space-2 | 8px | Related element spacing |\n| space-3 | 12px | Component internal padding |\n| space-4 | 16px | Standard gap between elements |\n| space-6 | 24px | Section padding, card padding |\n| space-8 | 32px | Between major sections |\n| space-12 | 48px | Page-level vertical rhythm |\n| space-16 | 64px | Hero\u002Fbanner spacing |\n\n### Grid\n- Max content width: 1200px\n- Column count: 12\n- Gutter: 24px (space-6)\n- Margin: 16px mobile, 24px tablet, auto desktop\n\n### Border Radius Scale\n| Token | Value | Usage |\n|-------|-------|-------|\n| radius-sm | 4px | Badges, tags |\n| radius-md | 8px | Buttons, inputs |\n| radius-lg | 12px | Cards, panels |\n| radius-xl | 16px | Modals, dialogs |\n| radius-full | 9999px | Avatars, pills |\n```\n\n### Section 6: Depth & Elevation\n\nShadow system and visual layering.\n\n```markdown\n## 6. Depth & Elevation\n\n### Shadow Scale\n| Level | Value | Usage |\n|-------|-------|-------|\n| shadow-none | none | Flat elements |\n| shadow-sm | 0 1px 2px rgba(0,0,0,0.04) | Subtle lift (cards at rest) |\n| shadow-md | 0 4px 12px rgba(0,0,0,0.08) | Hover states, active cards |\n| shadow-lg | 0 8px 24px rgba(0,0,0,0.12) | Dropdowns, popovers |\n| shadow-xl | 0 16px 48px rgba(0,0,0,0.16) | Modals, dialogs |\n\n### Surface Hierarchy\n1. **Base** — page background (Parchment)\n2. **Raised** — cards, panels (Ivory White + shadow-sm)\n3. **Floating** — dropdowns, tooltips (Ivory White + shadow-lg)\n4. **Overlay** — modals, dialogs (Ivory White + shadow-xl + scrim)\n```\n\n### Section 7: Do's and Don'ts\n\nConcrete examples with code — not just prose rules.\n\n```markdown\n## 7. Do's and Don'ts\n\n### DO: Use semantic color names\n```css\n\u002F* Good *\u002F\n.button-primary { background: var(--color-terracotta-brand); }\n```\n\n### DON'T: Hardcode color values\n```css\n\u002F* Bad *\u002F\n.button-primary { background: #c96442; }\n```\n\n### DO: Follow the spacing scale\n```css\n\u002F* Good — uses scale *\u002F\n.card { padding: var(--space-6); margin-bottom: var(--space-8); }\n```\n\n### DON'T: Use arbitrary spacing\n```css\n\u002F* Bad — 19px is not on the scale *\u002F\n.card { padding: 19px; margin-bottom: 37px; }\n```\n\n### DO: Include all interaction states\n### DON'T: Skip hover\u002Ffocus states on interactive elements\n### DO: Use the type scale for all text\n### DON'T: Introduce new font sizes not in the scale\n```\n\n### Section 8: Responsive Behavior\n\nBreakpoints, mobile patterns, and adaptation rules.\n\n```markdown\n## 8. Responsive Behavior\n\n### Breakpoints\n| Name | Width | Target |\n|------|-------|--------|\n| mobile | \u003C 640px | Phones |\n| tablet | 640–1024px | Tablets, small laptops |\n| desktop | > 1024px | Laptops, monitors |\n\n### Touch Targets\n- Minimum interactive element size: 44x44px\n- Minimum spacing between targets: 8px\n\n### Mobile Adaptations\n- Navigation collapses to hamburger menu below 640px\n- Cards stack single-column below 640px\n- Font sizes: H1 reduces to 32px on mobile, H2 to 28px\n- Side padding: 16px on mobile, 24px tablet, auto-center desktop\n\n### Behavior Patterns\n- Horizontal scrolling: never (use stacking or truncation)\n- Images: responsive with srcset, max-width: 100%\n- Tables: horizontal scroll wrapper below tablet breakpoint\n```\n\n### Section 9: Agent Prompt Guide\n\nHow AI agents should use this document when generating UI.\n\n```markdown\n## 9. Agent Prompt Guide\n\n### Quick Reference\n- Primary CTA color: Terracotta Brand (#c96442)\n- Background: Parchment (#f5f4ed)\n- Heading font: Serif, weight 500\n- Body font: Sans, weight 400\n- Standard spacing: 24px (space-6)\n- Card radius: 12px (radius-lg)\n\n### How to Use This Document\n1. Before writing any UI code, read the full DESIGN.md\n2. Reference specific section names when implementing: \"Following Section 4: Buttons\"\n3. Use design token names in CSS (var(--color-terracotta-brand)), not raw hex values\n4. Check Section 7 (Do's and Don'ts) before submitting\n5. If a component is not covered, create it following existing patterns and flag for DESIGN.md update\n\n### Example Component Prompt\n\"Create a hero section on Parchment (#f5f4ed) with a headline at H1 scale\n(48px Serif weight 500, line-height 1.10). Use Near Black (#141413) text.\nAdd a subtitle in Olive Gray (#5e5d59) at Body scale (16px Sans, line-height 1.60).\nPlace a Terracotta Brand (#c96442) primary button with Ivory text, radius-md (8px).\"\n\n### Iteration Guide\n- Change one component at a time\n- Reference specific color names and token values\n- Describe the component's state (default, hover, active, disabled)\n- Specify responsive behavior for the component\n```\n\n---\n\n## Design Token Conventions\n\nTokens are the bridge between DESIGN.md and code. Consistent naming ensures agents can translate design specs into CSS\u002FTailwind variables.\n\n### Naming Pattern\n\n```\n--{category}-{name}[-{modifier}]\n```\n\n| Category | Examples |\n|----------|---------|\n| `color-` | `--color-terracotta-brand`, `--color-near-black`, `--color-success-green` |\n| `space-` | `--space-1`, `--space-4`, `--space-8` |\n| `text-` | `--text-h1`, `--text-body`, `--text-caption` |\n| `radius-` | `--radius-sm`, `--radius-md`, `--radius-lg` |\n| `shadow-` | `--shadow-sm`, `--shadow-md`, `--shadow-lg` |\n| `font-` | `--font-serif`, `--font-sans`, `--font-mono` |\n\n### Mapping to CSS Custom Properties\n\nDESIGN.md tokens map directly to CSS custom properties:\n```css\n:root {\n  --color-terracotta-brand: #c96442;\n  --space-6: 24px;\n  --radius-lg: 12px;\n  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);\n}\n```\n\n### Mapping to Tailwind\n\nWhen using Tailwind, DESIGN.md tokens map to `tailwind.config.js` extensions. The builder agent should configure this once and reference throughout.\n\n---\n\n## Integration with Kits\n\nWhen DESIGN.md exists and kits contain UI requirements, acceptance criteria should reference design tokens by section and name. This creates a traceable chain:\n\n```\nDESIGN.md → Cavekit acceptance criterion → Plan task → Implementation\n```\n\n### How to Reference\n\n| In Cavekit Acceptance Criteria | Design Reference |\n|----------------------------------|-----------------|\n| \"CTA button uses primary brand styling\" | DESIGN.md Section 4: Buttons, primary variant |\n| \"Headings follow the type hierarchy\" | DESIGN.md Section 3: Type Scale |\n| \"Cards have subtle resting elevation\" | DESIGN.md Section 6: shadow-sm |\n| \"Layout uses the standard grid\" | DESIGN.md Section 5: Grid |\n| \"Colors adapt for dark mode\" | DESIGN.md Section 2: Dark Mode mapping |\n\n**Do NOT duplicate DESIGN.md content into kits.** Reference by section\u002Ftoken name only. If a color changes in DESIGN.md, kits should not need updating.\n\n### When No Design Reference Exists\n\nIf a cavekit needs a visual pattern not in DESIGN.md, the acceptance criterion should note this:\n```markdown\n- [ ] Component uses a card-like container [DESIGN.md: pattern not yet defined — flag for design update]\n```\n\nThis tells the inspect phase to check whether DESIGN.md needs a new pattern.\n\n---\n\n## Integration with Plans (Architect Phase)\n\nWhen the architect generates task descriptions for UI work, each task should include:\n\n```markdown\n**Design Reference:** DESIGN.md Section {N} — {section name}\n```\n\nThis tells the task-builder which DESIGN.md sections to read before implementing.\n\n---\n\n## Integration with Build Phase\n\nTask-builder agents follow this protocol for UI work:\n\n1. **Before implementing:** Read DESIGN.md (or the specific sections referenced in the task)\n2. **During implementation:** Use design tokens, not hardcoded values\n3. **In commit messages:** Note which DESIGN.md sections were followed\n4. **If a new pattern is needed:** Implement it following existing DESIGN.md conventions and flag for design update\n\n---\n\n## Revision Patterns\n\nWhen visual fixes are made manually (outside the Hunt loop), `\u002Fck:revise` traces them back to DESIGN.md:\n\n### Visual Fix Classification\n\n| Fix Type | DESIGN.md Action |\n|----------|-----------------|\n| Color change that should apply globally | Update DESIGN.md Section 2 with corrected value |\n| New component pattern not in DESIGN.md | Add to DESIGN.md Section 4 |\n| Spacing adjustment revealing wrong scale | Update DESIGN.md Section 5 scale |\n| Typography fix | Update DESIGN.md Section 3 type scale |\n| Responsive behavior change | Update DESIGN.md Section 8 |\n\n### Revision Protocol\n\n1. Identify the visual change in the diff\n2. Check if DESIGN.md covers this pattern\n3. If not covered: add the pattern to the appropriate section\n4. If covered but wrong: update the token\u002Fvalue\n5. Log the change to `context\u002Fdesigns\u002Fdesign-changelog.md`\n\n---\n\n## Collection Import\n\nThe [awesome-design-md](https:\u002F\u002Fgithub.com\u002FVoltAgent\u002Fawesome-design-md) repository contains 54+ curated design systems extracted from real products. These serve as starting points.\n\n### Import Workflow\n\n1. **Choose a template:** `vercel`, `claude`, `stripe`, `github`, `linear`, etc.\n2. **Fetch the raw DESIGN.md** from the collection\n3. **Present to the user** as a starting point — not a finished product\n4. **Walk through each section** for customization (brand colors, typography, specific component needs)\n5. **Write the customized version** to project root\n\n### After Import\n\nThe imported DESIGN.md becomes the project's own. Future updates are made directly — the import is a seed, not a dependency.\n\n---\n\n## Quality Standards\n\n### Completeness Checklist\n\n- [ ] All 9 sections present and non-empty\n- [ ] Every color has: semantic name + hex value + functional role\n- [ ] Complete typography table (all 5 values per level)\n- [ ] Component stylings include hover, focus, active, disabled states\n- [ ] Spacing scale is defined with consistent base unit\n- [ ] Shadow\u002Felevation scale is defined\n- [ ] Breakpoints have specific pixel values\n- [ ] Agent Prompt Guide has quick reference and example prompts\n\n### Specificity Requirements\n\nEvery value in DESIGN.md must be concrete and unambiguous:\n\n| Too Vague | Specific Enough |\n|-----------|----------------|\n| \"a warm blue\" | `#3b6fb5` (Info Blue) |\n| \"medium spacing\" | `24px` (space-6) |\n| \"slightly rounded\" | `8px` (radius-md) |\n| \"subtle shadow\" | `0 1px 2px rgba(0,0,0,0.04)` (shadow-sm) |\n| \"large heading\" | `48px \u002F 3rem, weight 500, line-height 1.10` |\n\n### Consistency Rules\n\n- Tokens used in Section 4 (Components) must exist in Sections 2, 3, 5, 6\n- Dark mode mappings must cover every color used in components\n- Responsive changes must reference defined breakpoints\n- All spacing values must be multiples of the base unit\n\n---\n\n## Anti-Patterns\n\n1. **Generic atmosphere** — \"Clean, modern, professional\" describes every SaaS app and none\n2. **Missing interaction states** — A button without hover\u002Ffocus is incomplete\n3. **Orphan colors** — Colors defined in the palette but never used in components\n4. **Arbitrary spacing** — Values that don't follow the spacing scale\n5. **Missing dark mode** — If the app supports dark mode, every light color needs a mapping\n6. **Hex-only references in components** — Use semantic names, not raw values\n7. **No Agent Prompt Guide** — Section 9 is what makes DESIGN.md actionable for AI agents\n8. **Duplicating DESIGN.md into kits** — Reference by section\u002Ftoken name only\n","# Design System: DESIGN.md for AI Agents\n\n## Core Principle: DESIGN.md Describes WHAT It Looks Like, Not HOW to Build It\n\nDESIGN.md is the visual equivalent of kits. It defines the project's visual language — colors, typography, spacing, components, responsive behavior — in a format AI agents can read and apply consistently. It is a **parallel constraint layer** that all Hunt phases consult.\n\n| Document | Defines | Audience |\n|----------|---------|----------|\n| CLAUDE.md | How to build the project | Coding agents |\n| Kits | What must be true (behavior) | All agents |\n| **DESIGN.md** | **What it looks like (visual)** | **UI-building agents** |\n| Plans | How to build it (tasks) | Builder agents |\n\n### Why a Dedicated Design System Document?\n\nWithout DESIGN.md, visual decisions scatter across kits, plans, and code:\n- Colors get hardcoded differently per component\n- Typography choices vary between agents and sessions\n- Spacing becomes inconsistent across the UI\n- New components reinvent patterns that already exist\n\nDESIGN.md centralizes these decisions. Every agent reads it before writing UI code.\n\n---\n\n## The 9-Section Stitch Format\n\nDESIGN.md follows the [Google Stitch format](https:\u002F\u002Fstitch.withgoogle.com\u002Fdocs\u002Fdesign-md\u002Foverview\u002F) — 9 sections that together define a complete visual language. Every DESIGN.md must contain all 9 sections.\n\n### Section 1: Visual Theme & Atmosphere\n\nThe design philosophy, mood, and overall aesthetic. Use evocative, specific language — not generic terms like \"clean and modern.\"\n\n```markdown\n## 1. Visual Theme & Atmosphere\n\nThis is a warm editorial experience built on natural materials. Think: a well-curated\nbookshop with soft overhead lighting and carefully chosen display shelves. The density\nis low — generous whitespace signals confidence and clarity. Every element earns its\nplace; nothing decorative exists without functional purpose.\n\n**Key attributes:** Warm, unhurried, editorial, confident\n**Density:** Low — generous whitespace, single-column focus\n**Personality:** Thoughtful librarian, not flashy storefront\n```\n\n**What good looks like:** A new designer reading this section could sketch a rough layout without seeing any other section.\n\n**Anti-pattern:** \"Clean, modern, and professional\" — this describes nothing specific.\n\n### Section 2: Color Palette & Roles\n\nEvery color needs three things: a semantic name, a hex value, and a functional role.\n\n```markdown\n## 2. Color Palette & Roles\n\n### Primary\n| Name | Hex | Role |\n|------|-----|------|\n| Terracotta Brand | #c96442 | Primary CTA, active states, brand anchors |\n| Terracotta Hover | #b85838 | Hover\u002Fpressed state for primary actions |\n\n### Neutral\n| Name | Hex | Role |\n|------|-----|------|\n| Near Black | #141413 | Primary text, headings |\n| Olive Gray | #5e5d59 | Secondary text, captions |\n| Parchment | #f5f4ed | Page background, default canvas |\n| Ivory White | #ffffff | Card surfaces, overlays |\n\n### Semantic\n| Name | Hex | Role |\n|------|-----|------|\n| Success Green | #2d7d46 | Confirmation, success states |\n| Warning Amber | #c27217 | Warnings, attention needed |\n| Error Red | #c24132 | Errors, destructive actions |\n| Info Blue | #3b6fb5 | Informational states, links |\n\n### Dark Mode (if applicable)\n| Light Name | Dark Equivalent | Hex |\n|------------|----------------|-----|\n| Parchment | Deep Charcoal | #1a1a1a |\n| Near Black | Off White | #e8e8e8 |\n```\n\n**Rules:**\n- Every hex value must be verified against the actual design or live site\n- Every color must have a clear functional role — no orphan colors\n- Name colors semantically (by role), not by hue (\"Primary CTA\" not \"Orange\")\n- If dark mode exists, map every light color to its dark equivalent\n\n### Section 3: Typography Rules\n\nComplete type hierarchy with specific values — no \"roughly 16px\" or \"medium weight.\"\n\n```markdown\n## 3. Typography Rules\n\n### Font Stack\n- **Display\u002FHeading:** \"Anthropic Serif\", Georgia, \"Times New Roman\", serif\n- **Body:** \"Anthropic Sans\", -apple-system, BlinkMacSystemFont, sans-serif\n- **Code:** \"Anthropic Mono\", \"SF Mono\", \"Fira Code\", monospace\n\n### Type Scale\n| Level | Size | Weight | Line Height | Letter Spacing | Font |\n|-------|------|--------|-------------|----------------|------|\n| H1 | 48px \u002F 3rem | 500 | 1.10 | -0.02em | Serif |\n| H2 | 36px \u002F 2.25rem | 500 | 1.15 | -0.01em | Serif |\n| H3 | 24px \u002F 1.5rem | 500 | 1.25 | 0 | Serif |\n| H4 | 20px \u002F 1.25rem | 600 | 1.30 | 0 | Sans |\n| Body | 16px \u002F 1rem | 400 | 1.60 | 0 | Sans |\n| Small | 14px \u002F 0.875rem | 400 | 1.50 | 0.01em | Sans |\n| Caption | 12px \u002F 0.75rem | 500 | 1.40 | 0.02em | Sans |\n\n### Principles\n- Headings use serif for warmth and authority\n- Body text uses sans-serif for readability at small sizes\n- Maximum line length: 65ch for body text\n- Minimum font size: 14px (never go below)\n```\n\n**Rules:**\n- Every level in the scale must have all 5 values (size, weight, line-height, letter-spacing, font)\n- Use rem alongside px for accessibility\n- Include font stack fallbacks\n\n### Section 4: Component Stylings\n\nConcrete styling for common components including interaction states.\n\n```markdown\n## 4. Component Stylings\n\n### Buttons\n**Primary:**\n- Background: Terracotta Brand (#c96442)\n- Text: Ivory White (#ffffff), 16px Sans, weight 500\n- Padding: 12px 24px\n- Border radius: 8px\n- Hover: Terracotta Hover (#b85838), translateY(-1px), shadow-sm\n- Active: translateY(0), shadow-none\n- Disabled: opacity 0.5, cursor not-allowed\n- Transition: all 150ms ease-out\n\n**Secondary:**\n- Background: transparent\n- Border: 1px solid Olive Gray (#5e5d59)\n- Text: Near Black (#141413)\n- Hover: background Parchment (#f5f4ed)\n\n### Cards\n- Background: Ivory White (#ffffff)\n- Border: 1px solid rgba(0,0,0,0.06)\n- Border radius: 12px\n- Padding: 24px\n- Shadow: 0 1px 3px rgba(0,0,0,0.04)\n- Hover: shadow 0 4px 12px rgba(0,0,0,0.08), translateY(-2px)\n\n### Inputs\n- Border: 1px solid #d0d0d0\n- Border radius: 8px\n- Padding: 10px 14px\n- Focus: border Terracotta Brand, ring 2px rgba(201,100,66,0.2)\n- Error: border Error Red, ring 2px rgba(194,65,50,0.2)\n\n### Navigation\n...\n```\n\n**Rules:**\n- Include hover, focus, active, and disabled states\n- Specify transition durations and easing\n- Include touch-target minimum sizes (44x44px)\n\n### Section 5: Layout Principles\n\nSpacing system, grid, containers, and whitespace philosophy.\n\n```markdown\n## 5. Layout Principles\n\n### Spacing Scale (base: 4px)\n| Token | Value | Usage |\n|-------|-------|-------|\n| space-1 | 4px | Tight gaps, icon margins |\n| space-2 | 8px | Related element spacing |\n| space-3 | 12px | Component internal padding |\n| space-4 | 16px | Standard gap between elements |\n| space-6 | 24px | Section padding, card padding |\n| space-8 | 32px | Between major sections |\n| space-12 | 48px | Page-level vertical rhythm |\n| space-16 | 64px | Hero\u002Fbanner spacing |\n\n### Grid\n- Max content width: 1200px\n- Column count: 12\n- Gutter: 24px (space-6)\n- Margin: 16px mobile, 24px tablet, auto desktop\n\n### Border Radius Scale\n| Token | Value | Usage |\n|-------|-------|-------|\n| radius-sm | 4px | Badges, tags |\n| radius-md | 8px | Buttons, inputs |\n| radius-lg | 12px | Cards, panels |\n| radius-xl | 16px | Modals, dialogs |\n| radius-full | 9999px | Avatars, pills |\n```\n\n### Section 6: Depth & Elevation\n\nShadow system and visual layering.\n\n```markdown\n## 6. Depth & Elevation\n\n### Shadow Scale\n| Level | Value | Usage |\n|-------|-------|-------|\n| shadow-none | none | Flat elements |\n| shadow-sm | 0 1px 2px rgba(0,0,0,0.04) | Subtle lift (cards at rest) |\n| shadow-md | 0 4px 12px rgba(0,0,0,0.08) | Hover states, active cards |\n| shadow-lg | 0 8px 24px rgba(0,0,0,0.12) | Dropdowns, popovers |\n| shadow-xl | 0 16px 48px rgba(0,0,0,0.16) | Modals, dialogs |\n\n### Surface Hierarchy\n1. **Base** — page background (Parchment)\n2. **Raised** — cards, panels (Ivory White + shadow-sm)\n3. **Floating** — dropdowns, tooltips (Ivory White + shadow-lg)\n4. **Overlay** — modals, dialogs (Ivory White + shadow-xl + scrim)\n```\n\n### Section 7: Do's and Don'ts\n\nConcrete examples with code — not just prose rules.\n\n```markdown\n## 7. Do's and Don'ts\n\n### DO: Use semantic color names\n```css\n\u002F* Good *\u002F\n.button-primary { background: var(--color-terracotta-brand); }\n```\n\n### DON'T: Hardcode color values\n```css\n\u002F* Bad *\u002F\n.button-primary { background: #c96442; }\n```\n\n### DO: Follow the spacing scale\n```css\n\u002F* Good — uses scale *\u002F\n.card { padding: var(--space-6); margin-bottom: var(--space-8); }\n```\n\n### DON'T: Use arbitrary spacing\n```css\n\u002F* Bad — 19px is not on the scale *\u002F\n.card { padding: 19px; margin-bottom: 37px; }\n```\n\n### DO: Include all interaction states\n### DON'T: Skip hover\u002Ffocus states on interactive elements\n### DO: Use the type scale for all text\n### DON'T: Introduce new font sizes not in the scale\n```\n\n### Section 8: Responsive Behavior\n\nBreakpoints, mobile patterns, and adaptation rules.\n\n```markdown\n## 8. Responsive Behavior\n\n### Breakpoints\n| Name | Width | Target |\n|------|-------|--------|\n| mobile | \u003C 640px | Phones |\n| tablet | 640–1024px | Tablets, small laptops |\n| desktop | > 1024px | Laptops, monitors |\n\n### Touch Targets\n- Minimum interactive element size: 44x44px\n- Minimum spacing between targets: 8px\n\n### Mobile Adaptations\n- Navigation collapses to hamburger menu below 640px\n- Cards stack single-column below 640px\n- Font sizes: H1 reduces to 32px on mobile, H2 to 28px\n- Side padding: 16px on mobile, 24px tablet, auto-center desktop\n\n### Behavior Patterns\n- Horizontal scrolling: never (use stacking or truncation)\n- Images: responsive with srcset, max-width: 100%\n- Tables: horizontal scroll wrapper below tablet breakpoint\n```\n\n### Section 9: Agent Prompt Guide\n\nHow AI agents should use this document when generating UI.\n\n```markdown\n## 9. Agent Prompt Guide\n\n### Quick Reference\n- Primary CTA color: Terracotta Brand (#c96442)\n- Background: Parchment (#f5f4ed)\n- Heading font: Serif, weight 500\n- Body font: Sans, weight 400\n- Standard spacing: 24px (space-6)\n- Card radius: 12px (radius-lg)\n\n### How to Use This Document\n1. Before writing any UI code, read the full DESIGN.md\n2. Reference specific section names when implementing: \"Following Section 4: Buttons\"\n3. Use design token names in CSS (var(--color-terracotta-brand)), not raw hex values\n4. Check Section 7 (Do's and Don'ts) before submitting\n5. If a component is not covered, create it following existing patterns and flag for DESIGN.md update\n\n### Example Component Prompt\n\"Create a hero section on Parchment (#f5f4ed) with a headline at H1 scale\n(48px Serif weight 500, line-height 1.10). Use Near Black (#141413) text.\nAdd a subtitle in Olive Gray (#5e5d59) at Body scale (16px Sans, line-height 1.60).\nPlace a Terracotta Brand (#c96442) primary button with Ivory text, radius-md (8px).\"\n\n### Iteration Guide\n- Change one component at a time\n- Reference specific color names and token values\n- Describe the component's state (default, hover, active, disabled)\n- Specify responsive behavior for the component\n```\n\n---\n\n## Design Token Conventions\n\nTokens are the bridge between DESIGN.md and code. Consistent naming ensures agents can translate design specs into CSS\u002FTailwind variables.\n\n### Naming Pattern\n\n```\n--{category}-{name}[-{modifier}]\n```\n\n| Category | Examples |\n|----------|---------|\n| `color-` | `--color-terracotta-brand`, `--color-near-black`, `--color-success-green` |\n| `space-` | `--space-1`, `--space-4`, `--space-8` |\n| `text-` | `--text-h1`, `--text-body`, `--text-caption` |\n| `radius-` | `--radius-sm`, `--radius-md`, `--radius-lg` |\n| `shadow-` | `--shadow-sm`, `--shadow-md`, `--shadow-lg` |\n| `font-` | `--font-serif`, `--font-sans`, `--font-mono` |\n\n### Mapping to CSS Custom Properties\n\nDESIGN.md tokens map directly to CSS custom properties:\n```css\n:root {\n  --color-terracotta-brand: #c96442;\n  --space-6: 24px;\n  --radius-lg: 12px;\n  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);\n}\n```\n\n### Mapping to Tailwind\n\nWhen using Tailwind, DESIGN.md tokens map to `tailwind.config.js` extensions. The builder agent should configure this once and reference throughout.\n\n---\n\n## Integration with Kits\n\nWhen DESIGN.md exists and kits contain UI requirements, acceptance criteria should reference design tokens by section and name. This creates a traceable chain:\n\n```\nDESIGN.md → Cavekit acceptance criterion → Plan task → Implementation\n```\n\n### How to Reference\n\n| In Cavekit Acceptance Criteria | Design Reference |\n|----------------------------------|-----------------|\n| \"CTA button uses primary brand styling\" | DESIGN.md Section 4: Buttons, primary variant |\n| \"Headings follow the type hierarchy\" | DESIGN.md Section 3: Type Scale |\n| \"Cards have subtle resting elevation\" | DESIGN.md Section 6: shadow-sm |\n| \"Layout uses the standard grid\" | DESIGN.md Section 5: Grid |\n| \"Colors adapt for dark mode\" | DESIGN.md Section 2: Dark Mode mapping |\n\n**Do NOT duplicate DESIGN.md content into kits.** Reference by section\u002Ftoken name only. If a color changes in DESIGN.md, kits should not need updating.\n\n### When No Design Reference Exists\n\nIf a cavekit needs a visual pattern not in DESIGN.md, the acceptance criterion should note this:\n```markdown\n- [ ] Component uses a card-like container [DESIGN.md: pattern not yet defined — flag for design update]\n```\n\nThis tells the inspect phase to check whether DESIGN.md needs a new pattern.\n\n---\n\n## Integration with Plans (Architect Phase)\n\nWhen the architect generates task descriptions for UI work, each task should include:\n\n```markdown\n**Design Reference:** DESIGN.md Section {N} — {section name}\n```\n\nThis tells the task-builder which DESIGN.md sections to read before implementing.\n\n---\n\n## Integration with Build Phase\n\nTask-builder agents follow this protocol for UI work:\n\n1. **Before implementing:** Read DESIGN.md (or the specific sections referenced in the task)\n2. **During implementation:** Use design tokens, not hardcoded values\n3. **In commit messages:** Note which DESIGN.md sections were followed\n4. **If a new pattern is needed:** Implement it following existing DESIGN.md conventions and flag for design update\n\n---\n\n## Revision Patterns\n\nWhen visual fixes are made manually (outside the Hunt loop), `\u002Fck:revise` traces them back to DESIGN.md:\n\n### Visual Fix Classification\n\n| Fix Type | DESIGN.md Action |\n|----------|-----------------|\n| Color change that should apply globally | Update DESIGN.md Section 2 with corrected value |\n| New component pattern not in DESIGN.md | Add to DESIGN.md Section 4 |\n| Spacing adjustment revealing wrong scale | Update DESIGN.md Section 5 scale |\n| Typography fix | Update DESIGN.md Section 3 type scale |\n| Responsive behavior change | Update DESIGN.md Section 8 |\n\n### Revision Protocol\n\n1. Identify the visual change in the diff\n2. Check if DESIGN.md covers this pattern\n3. If not covered: add the pattern to the appropriate section\n4. If covered but wrong: update the token\u002Fvalue\n5. Log the change to `context\u002Fdesigns\u002Fdesign-changelog.md`\n\n---\n\n## Collection Import\n\nThe [awesome-design-md](https:\u002F\u002Fgithub.com\u002FVoltAgent\u002Fawesome-design-md) repository contains 54+ curated design systems extracted from real products. These serve as starting points.\n\n### Import Workflow\n\n1. **Choose a template:** `vercel`, `claude`, `stripe`, `github`, `linear`, etc.\n2. **Fetch the raw DESIGN.md** from the collection\n3. **Present to the user** as a starting point — not a finished product\n4. **Walk through each section** for customization (brand colors, typography, specific component needs)\n5. **Write the customized version** to project root\n\n### After Import\n\nThe imported DESIGN.md becomes the project's own. Future updates are made directly — the import is a seed, not a dependency.\n\n---\n\n## Quality Standards\n\n### Completeness Checklist\n\n- [ ] All 9 sections present and non-empty\n- [ ] Every color has: semantic name + hex value + functional role\n- [ ] Complete typography table (all 5 values per level)\n- [ ] Component stylings include hover, focus, active, disabled states\n- [ ] Spacing scale is defined with consistent base unit\n- [ ] Shadow\u002Felevation scale is defined\n- [ ] Breakpoints have specific pixel values\n- [ ] Agent Prompt Guide has quick reference and example prompts\n\n### Specificity Requirements\n\nEvery value in DESIGN.md must be concrete and unambiguous:\n\n| Too Vague | Specific Enough |\n|-----------|----------------|\n| \"a warm blue\" | `#3b6fb5` (Info Blue) |\n| \"medium spacing\" | `24px` (space-6) |\n| \"slightly rounded\" | `8px` (radius-md) |\n| \"subtle shadow\" | `0 1px 2px rgba(0,0,0,0.04)` (shadow-sm) |\n| \"large heading\" | `48px \u002F 3rem, weight 500, line-height 1.10` |\n\n### Consistency Rules\n\n- Tokens used in Section 4 (Components) must exist in Sections 2, 3, 5, 6\n- Dark mode mappings must cover every color used in components\n- Responsive changes must reference defined breakpoints\n- All spacing values must be multiples of the base unit\n\n---\n\n## Anti-Patterns\n\n1. **Generic atmosphere** — \"Clean, modern, professional\" describes every SaaS app and none\n2. **Missing interaction states** — A button without hover\u002Ffocus is incomplete\n3. **Orphan colors** — Colors defined in the palette but never used in components\n4. **Arbitrary spacing** — Values that don't follow the spacing scale\n5. **Missing dark mode** — If the app supports dark mode, every light color needs a mapping\n6. **Hex-only references in components** — Use semantic names, not raw values\n7. **No Agent Prompt Guide** — Section 9 is what makes DESIGN.md actionable for AI agents\n8. **Duplicating DESIGN.md into kits** — Reference by section\u002Ftoken name only\n",{"name":5,"effort":24,"description":7,"allowed-tools":25},"medium",[26,27,28],"read","grep","edit","main","e518fe3d535f8589bc3ff1d97dd8d60fcee1bad3","packages\u002Fcoding-agent\u002Fskills\u002Fcavekit-design-system",0,"https:\u002F\u002Fgithub.com\u002FZhachory1\u002Fmewritecode","https:\u002F\u002Fgithub.com\u002FZhachory1","zhach.me","Pretty swell guy. 12+ years of SWE and ML experience. I care about responsible AI, computational journalism, and the systems helping organize the knowledge.","2026-11-13 23:15:59",{"source":8,"skillName":5,"commands":39,"prompt":49,"zipAvailable":50},[40,43,46],{"tool":41,"command":42},"npx","npx skills add Zhachory1\u002Fmewritecode --skill cavekit-design-system",{"tool":44,"command":45},"bunx","bunx skills add Zhachory1\u002Fmewritecode --skill cavekit-design-system",{"tool":47,"command":48},"pnpm","pnpm dlx skills add Zhachory1\u002Fmewritecode --skill cavekit-design-system","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FZhachory1\u002Fmewritecode\u002Fblob\u002Fmain\u002Fpackages\u002Fcoding-agent\u002Fskills\u002Fcavekit-design-system\u002FSKILL.md",true,[],[53,60,67,74,81,87],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M75VRZK1A92C56A2PRVB1W79","valid-skill","A valid skill for testing purposes.","https:\u002F\u002Fgithub.com\u002FZhachory1\u002Fmewritecode\u002Fblob\u002Fmain\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Ffixtures\u002Fskills\u002Fvalid-skill\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M75VRYEBFPV4CR43KZ5FVXV7","unknown-field","A skill with an unknown frontmatter field.","https:\u002F\u002Fgithub.com\u002FZhachory1\u002Fmewritecode\u002Fblob\u002Fmain\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Ffixtures\u002Fskills\u002Funknown-field\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M75VRWMEK12CQ1G6QHY839CD","nested-child","Nested skill should be ignored.","https:\u002F\u002Fgithub.com\u002FZhachory1\u002Fmewritecode\u002Fblob\u002Fmain\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Ffixtures\u002Fskills\u002Froot-skill-preferred\u002Fnested-child\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M75VRVTZ34Z1YZKBKZ4QBPA8","root-skill-preferred","Root skill should win.","https:\u002F\u002Fgithub.com\u002FZhachory1\u002Fmewritecode\u002Fblob\u002Fmain\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Ffixtures\u002Fskills\u002Froot-skill-preferred\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M75VRTBBFP4VXQFXJ7TQM5F3","no-frontmatter","https:\u002F\u002Fgithub.com\u002FZhachory1\u002Fmewritecode\u002Fblob\u002Fmain\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Ffixtures\u002Fskills\u002Fno-frontmatter\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M75VRSFS4SXH7G36JYSQXV20","child-skill","A nested skill in a subdirectory.","https:\u002F\u002Fgithub.com\u002FZhachory1\u002Fmewritecode\u002Fblob\u002Fmain\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Ffixtures\u002Fskills\u002Fnested\u002Fchild-skill\u002FSKILL.md",[],[]]