Frontend Design Direction Brief So Your Coding Agent Avoids the Generic AI Look

Writes a DESIGN.md brief for a coding agent with one visual direction, concrete type, color, spacing and layout tokens, a banned list of generic AI patterns, and screenshot checks before it builds UI.

The prompt

Prompt
You are a senior product designer writing a visual direction brief for a coding agent (Claude Code, Cursor, Codex, v0 or Lovable) before it builds any UI.

Product and audience: invoicing app for freelance photographers (example value for {product and audience})
Stack and any brand colors or fonts: Next.js, Tailwind, shadcn/ui; brand color #1F4D3A, no fonts chosen (example value for {stack brand colors and fonts})

Ask me for 2-3 reference sites I like, and what I like about each, before writing.

Rules:
- Commit to one direction drawn from the references and the audience, not a safe average.
- Every token is a concrete value (hex, px or rem, font name) mapped to the stack, for example Tailwind theme values or shadcn CSS variables.
- Pair every text color with its background, give your estimated contrast ratio against WCAG AA (4.5:1 body, 3:1 large text), and mark each ratio for me to confirm in a contrast checker.
- Banned unless I ask: purple-to-blue gradients, emoji as icons, a centered hero followed by three feature cards, glassmorphism, shadows on everything, more than two typefaces.

Output format, as markdown the agent can save as DESIGN.md:
1. Visual direction in one sentence
2. Font pairing and type scale
3. Palette with roles and contrast-checked pairs
4. Spacing, radius and shadow tokens
5. Layout rules: grid, max width, density
6. Banned list
7. Acceptance checks the agent can verify from screenshots at 375px and 1440px

Note any assumption you made about the brand.

Dashed parts are example values, so the prompt runs as copied. Change them in Fill in the blanks.

Example output

At a glanceType scale tokens in the DESIGN.mdFont size in px for each Tailwind text token
  • text-xs (table meta, labels): 12px
  • text-sm (table cells, inputs): 14px
  • text-base (body): 16px
  • text-xl (section heads): 20px
  • text-3xl (page title): 30px
  • text-5xl (invoice total): 48px

Example for: references Kinfolk.com (calm editorial whitespace, serif headlines), Linear.app (tight, fast tables), and Stripe invoices (clear totals hierarchy).

DESIGN.md: Invoicing for Freelance Photographers

1. Visual direction

A quiet editorial ledger: a serif-led print-shop calm wrapped around dense, exact money tables, with forest green used only for intent.

2. Font pairing and type scale

  • Display: Fraunces (opsz 72, weight 500) for page titles and invoice totals only
  • UI/Body: Inter (400/500/600, font-feature-settings: "tnum" on all numbers)
  • Tailwind fontFamily: display: ['Fraunces', 'serif'], sans: ['Inter', 'sans-serif']
TokenSize/LineUse
text-xs12/16pxtable meta, labels
text-sm14/20pxtable cells, inputs
text-base16/24pxbody
text-xl20/28pxsection heads (Inter 600)
text-3xl30/36pxpage title (Fraunces)
text-5xl48/52pxinvoice total (Fraunces)

3. Palette (shadcn CSS variables)

RoleHexVariable
Background#FAF8F4--background
Surface#FFFFFF--card
Text#1C1F1D--foreground
Muted text#5E6661--muted-foreground
Primary#1F4D3A--primary
On primary#FAF8F4--primary-foreground
Border#E4E0D8--border
Overdue#A3361F--destructive
Paid#2F6B4F--success

Contrast pairs (estimates, confirm in a checker):

  • #1C1F1D on #FAF8F4: ~15.8:1, AA ✅ confirm
  • #5E6661 on #FFFFFF: ~5.8:1, AA body ✅ confirm
  • #FAF8F4 on #1F4D3A: ~9.4:1, AA ✅ confirm
  • #1F4D3A on #FAF8F4: ~9.4:1, AA ✅ confirm
  • #A3361F on #FFFFFF: ~6.6:1, AA ✅ confirm
  • #2F6B4F on #FFFFFF: ~6.3:1, AA ✅ confirm

4. Spacing, radius, shadow

  • Spacing on a 4px base: 4, 8, 12, 16, 24, 32, 48, 64px
  • Radius: --radius: 6px. Inputs and buttons use 6px, cards 8px, and pills (status) 999px.
  • Shadow: none by default. Only dialogs and popovers get 0 8px 24px rgba(28,31,29,0.12).

5. Layout rules

  • App shell has a 240px left sidebar at ≥1024px and a bottom tab bar below that.
  • Content max width is 1120px, with invoice preview capped at 760px (A4 proportion).
  • Use a 12-column grid with a 24px gutter on desktop and a 4-column grid with 16px on mobile.
  • Density: table rows are 44px, with 12px horizontal cell padding. On mobile, lists collapse into stacked rows with amount right-aligned.

6. Banned list

Purple-to-blue gradients, emoji as icons (use lucide at 16/20px), a centered hero plus three feature cards, glassmorphism, shadows on cards or tables, more than two typefaces, green used decoratively, and stock-photo placeholders (use the client's actual thumbnails or none).

7. Acceptance checks (375px and 1440px screenshots)

  • [ ] Fraunces appears only in titles and totals.
  • [ ] All amounts are right-aligned with tabular figures.
  • [ ] No element has a shadow outside overlays.
  • [ ] Primary green covers less than 10% of any screen.
  • [ ] At 375px there is no horizontal scroll and tap targets are ≥44px.
  • [ ] At 1440px content stops at 1120px.
  • [ ] Overdue status pairs color with a text label.

Assumptions: #1F4D3A is the sole brand color and is reserved for primary actions. The warm off-white suggests photo paper. I chose the fonts because none were specified.

Written by AI from this prompt. Your results will vary.

Run in Claude or ChatGPT, save the result as DESIGN.md in your repo, and tell Claude Code, Cursor or Codex to read it before building UI and to screenshot-check against it.

Make it repeatable

Keep using this prompt without pasting it in every time.

Prompt details

By
Prompts-GPT editors
Published
How prompts are written and checked

Did this prompt work?

Keep exploring

More in Design