One tweak · 75 → 80
so you get a present.
## Design system rules
<!-- Generated by roast-my-design-system from a scan of vercel/ai-chatbot on 2026-08-12.
Paste into CLAUDE.md, .cursor/rules or AGENTS.md. Regenerate after big refactors:
npx roast-my-design-system --rules -->
Follow these rules when writing or editing UI in this repo. Every rule below was derived from a scan of this codebase, with real paths and usage counts.
### Colours and tokens
- Design tokens live in `app/globals.css`. Reach for an existing token before inventing any value.
- Never hardcode colour values in components. The palette already has 49 tokens; the scan still found 12 hardcoded colours sitting next to them. Do not add more.
- This repo uses shadcn/ui; its components live in `components/ui`. Prefer extending it over building parallel pieces.
### Canonical components
- Use these existing components instead of writing new ones:
- `<Button>` from `components/ui/button.tsx` (used 25x · props: variant, size, asChild)
- `<Tooltip>` from `components/ui/tooltip.tsx` (used 10x)
- `<TooltipContent>` from `components/ui/tooltip.tsx` (used 10x · props: sideOffset)
- `<TooltipTrigger>` from `components/ui/tooltip.tsx` (used 10x)
- `<DropdownMenuItem>` from `components/ui/dropdown-menu.tsx` (used 8x · props: inset, variant)
- `<LoaderIcon>` from `components/chat/icons.tsx` (used 8x · props: size)
- `<SidebarMenuButton>` from `components/ui/sidebar.tsx` (used 7x · props: asChild, isActive, variant, size)
- `<CopyIcon>` from `components/chat/icons.tsx` (used 6x · props: size)
### Known duplicates: do not make it worse
- `<MessageActions>` is defined twice and one wraps the other; do not create a third.
### Spacing and sizing
- Stay on the Tailwind spacing scale. If a gap looks wrong on a scale step, flag it instead of nudging by a pixel.
- No new arbitrary bracket values (`p-[13px]`, `text-[10px]`). The scan found 103 already. If a value repeats, it is a decision: name it as a token instead of writing the bracket again.
- Avoid new one-off CSS spacing values; 2 off-scale values are already in play.
### Typography
- The repo uses 3 typefaces: SF Mono, Geist, Geist Mono. Do not introduce another, and do not re-declare font stacks by hand; use the existing setup.
### Styling discipline
- Never write `style={{ ... }}` for static values; styling belongs to classes and tokens where the system can see it.
(7 static inline blocks already exist; do not add to them.)
- Never write !important; the scan found 9 declarations already. When a style does not apply, fix the selector or the source of the conflict instead of shouting over it.
- Before styling anything new, look at a neighbouring component and match how it does it. Consistency with the repo beats personal preference.
---
*Generated by [roast-my-design-system](https://github.com/pencilrebel/roast-my-design-system) ver. 3.11.0. Rescan after refactors to keep these rules honest.*
Your agent reads .cursor/rules. But none of it points at a single source of truth for components and tokens, because there isn't one yet. The numbers below are what your agent actually works from.
A healthy product palette is up to ~24 colours: one brand hue with a few tints, one accent, up to 13 greys, and status colours.
a disciplined repo keeps these around a dozen · on-scale Tailwind steps (·) shown for context · off-scale in coral
every distinct declaration is a chance for the next one to be wrong
the 5 files carrying the most off-system styling
every duplicate is a place where your agent has to guess which one is canonical, and it picks wrong half the time. Paths open in VS Code
styling no system can see
315 components defined · top by adoption · the real system, buried in here
| component | used | defined in | props |
|---|---|---|---|
| <Button> | 25× | components/ui/button.tsx | variant size asChild |
| <Tooltip> | 10× | components/ui/tooltip.tsx | none |
| <TooltipContent> | 10× | components/ui/tooltip.tsx | sideOffset |
| <TooltipTrigger> | 10× | components/ui/tooltip.tsx | none |
| <DropdownMenuItem> | 8× | components/ui/dropdown-menu.tsx | inset variant |
| <LoaderIcon> | 8× | components/chat/icons.tsx | size |
| <SidebarMenuButton> | 7× | components/ui/sidebar.tsx | asChild isActive variant size tooltip |
| <CopyIcon> | 6× | components/chat/icons.tsx | size |
| <SparklesIcon> | 6× | components/chat/icons.tsx | size |
| <ChatItem> | 5× | components/chat/sidebar-history-item.tsx | PureChatItem prevProps |