This file is for you. The file you paste into your AI agent is
PROMPT.md.
An idea file for AI coding agents. Give it to Claude Code, Cursor, Codex — it audits your UI for inconsistencies, diagnoses root causes, and builds a phased fix plan custom to your codebase.
- Copy
PROMPT.md - Paste into your AI coding tool at the root of your project
- The agent audits, diagnoses, and builds a plan
- You approve, then execute phase by phase in fresh sessions
- Audits — Scans every page for spacing drift, hardcoded colors, component drift, typography inconsistency, broken responsive grids, inconsistent interactive/empty/loading states
- Diagnoses — Primitives problem, composition problem, tokens problem, or all three? How many files? What breaks if you change your theme?
- Plans — 4 phases: fix primitives → define patterns → migrate pages → enforce with lint + AI rules
- Documents — Creates a design system doc, AI agent rules, and lint rules that cross-reference each other
- Asks about tooling — Optionally splits heavy lifting (Codex) from config/hooks (Claude Code)
Before: "Add a summary section." The AI looks at 3 existing pages, picks values from each, produces something subtly different from all of them. p-4 here, p-6 there. bg-white instead of bg-card.
After: "Add a summary section." The AI reads the design system, imports the right components. 30 lines, looks exactly like every other section. One way to do it right, and it's the easiest path.
- Theme changes — One file. Change CSS variables, everything updates.
- New pages — Compose from shared components. Visual structure is handled.
- Adding features — Content decisions, not style decisions. Components enforce the rest.
- Onboarding — Human or AI reads the design system doc and knows what to use.
- Catching drift — ESLint fails on
bg-whiteinstead ofbg-card. CI catches it, not code review.
- Design taste — Enforces consistency, not beauty. Ugly theme = consistently ugly.
- Complex one-offs — The system has an escape hatch for these.
- Backend issues — UI layer solution only.
- Run each phase separately. Verify with
git diffbefore starting the next. - ESLint rules are the strongest enforcement. AI rules are a complement, not a replacement.
- Delete the plan file when done. The design system doc is the permanent artifact.
- Works best with Next.js + Tailwind + shadcn/ui, but adapts to any React + CSS framework.