{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "charles", "title": "Design System", "description": "shincn design system document — drop in any project root for AI-assisted UI generation", "files": [ { "path": "charles.md", "content": "# charles.md `v2.0`\n\n> Drop this file in any project root. Claude Code will read it and produce UI that matches this design system, aesthetic, and decision-making process exactly.\n\n---\n\n## Who This Is For\n\nThis is the personal design system document for ch.sh. It encodes visual style, component philosophy, motion principles, and explicit anti-patterns. When building any UI in this project, treat this file as ground truth.\n\n---\n\n## Stack (Non-Negotiable)\n\n| Layer | Library |\n|---|---|\n| Framework | React |\n| Styling | Tailwind CSS |\n| Components | shadcn/ui (Radix primitives under the hood) |\n| Animation | Framer Motion |\n| Icons | Phosphor Icons (`@phosphor-icons/react`) |\n| Utility | `clsx` + `tailwind-merge` via `cn()` |\n\nNever suggest replacing these. Never use Lucide, Heroicons, or other icon sets. Never use CSS-in-JS, styled-components, or Emotion.\n\n---\n\n## Pre-Build Protocol (Before Writing Any Code)\n\nThe biggest failure mode in AI-generated UI is skipping the aesthetic decision and jumping straight to code. The result is distributional convergence — predictable fonts, gradient fills on white, soft card shadows, standard grid layouts. Statistically safe and visually invisible.\n\nBefore building any component or screen, answer these four questions first:\n\n1. **What problem does this interface solve, and who uses it?** The answer should change every visual decision downstream.\n2. **What's the tonal register?** Pick a clear position: utilitarian and dense, warm and approachable, minimal and precise, editorial, etc. Don't land in the middle — the middle is where generic lives.\n3. **What's the one spatial idea?** Every good screen has a compositional thesis — a dominant element, a clear reading order, an asymmetry that creates tension. Name it before you build it.\n4. **What would the wrong version look like?** Articulate the AI default for this specific UI, then do the opposite.\n\nOnly after answering these should code be written.\n\n---\n\n## Typography\n\n### Font Stack\n\n```css\n/* Default — everywhere */\nfont-family: \"SF Pro Rounded\", -apple-system, BlinkMacSystemFont, sans-serif;\n\n/* Monospace — code snippets, addresses, hashes, technical strings only */\nfont-family: \"SF Mono\", ui-monospace, monospace;\n```\n\nSF Pro Rounded is the only sans-serif. Every heading, label, body text, button, and caption uses it. There is no secondary sans-serif option. Use SF Mono exclusively for code snippets, wallet addresses, hashes, CLI output, or numeric strings that need tabular alignment.\n\n### Type Scale\n\nUse Tailwind's default type scale. Avoid custom font sizes unless absolutely necessary.\n\n**Hierarchy rules:**\n- Page titles: `text-2xl font-semibold` or `text-3xl font-semibold`\n- Section headings: `text-lg font-medium` or `text-xl font-semibold`\n- Body: `text-sm` or `text-base` — never go below `text-xs` for readable content\n- Labels, captions, helper text: `text-xs text-muted-foreground`\n- Never use `font-bold` for UI labels — `font-medium` or `font-semibold` only\n- Never change font weight on hover/selected states — it causes layout shift\n- Use `font-variant-numeric: tabular-nums` for any column of numbers\n\n---\n\n## Color Philosophy\n\nLight-first always. No dark mode unless explicitly requested.\n\n**Neutral base + brand color system.** Colors are functional, not decorative. Every use of color should communicate something — status, hierarchy, interactivity, or brand.\n\n**Palette approach:**\n- Base: white/zinc/slate neutrals via Tailwind + shadcn tokens\n- One primary brand accent per project, applied sparingly\n- Use `text-muted-foreground` for secondary text, not custom grays\n- Borders: `border` (default shadcn token) — never hand-roll border colors\n- Destructive states: use shadcn's `destructive` token, not custom red\n\n**Color anti-patterns:**\n- Never use color purely for decoration (gradient backgrounds on cards \"just because\")\n- Never use 3+ accent colors in the same UI\n- Never use color to convey the only distinction — always pair with shape or label\n\n---\n\n## Spacing & Density\n\nBalanced — comfortable but not wasteful. The goal is breathing room with purpose.\n\n**Mental model:** Every gap should feel intentional. If you can remove 4px and nothing feels cramped, remove it. If something feels tight, add 4px before adding 8px.\n\n### Spacing Table\n\n| Context | Value | Tailwind |\n|---|---|---|\n| Between related items in a group | 4–8px | `gap-1` to `gap-2` |\n| Between sections or card internals | 12–16px | `gap-3` to `gap-4` |\n| Page section spacing | 24–32px | `gap-6` to `gap-8` |\n| Page container padding | 16px | `px-4` |\n| Card internal padding | 16–20px | `p-4` to `p-5` |\n| Button padding | `px-4 py-2` (default), `px-3 py-1.5` (small) | — |\n\n### Container Defaults\n\n```tsx\n// Default page container\n