Dev.to WebDev πŸ›  Dev πŸ‘ 0 πŸ“– 7 min read

How to Brief an AI Builder So a Design File Becomes Code You Can Actually Ship

Disclosure: I work at VibUI, which sells a prompt catalogue for websites. The catalogue appears once, in a later section. The handoff method below still works if you never open that site. Short answer: a design file is

Disclosure: I work at VibUI, which sells a prompt catalogue for websites. The catalogue appears once, in a later section. The handoff method below still works if you never open that site.

Short answer: a design file is not a prompt. If you paste a screenshot into an AI builder and write "match this," you usually get a lookalike layout with invented copy, missing states, and spacing the model made up. A handoff that ships is a brief that names the tokens, the components, the states, the real URLs, and the things the model is forbidden to invent, then a review pass on a phone and a keyboard. This holds in v0, Lovable, Bolt, Cursor, Windsurf, Claude, ChatGPT, Gemini, Replit, GitHub Copilot, Framer AI, Google Stitch, Readdy, Aura.build and OpenAI Codex.

The personal gain is narrow: fewer rebuilds, fewer "that's not what the file says" rounds, and a first draft you can review instead of throw away. It is not a promise that the model will pixel-match the file, and it is not a reason to skip a design review.

What actually goes wrong when you paste a design into an AI builder?

The model can see a picture. It cannot see the decisions behind the picture unless you write them down.

Typical failures, in the order I see them:

  1. Tokens get approximated. A "close enough" blue, a system font, a radius the file never used. After three sections, the page no longer belongs to the system.
  2. Only the happy path is built. Hover, focus, error, empty and disabled states were in the file (or should have been) and never make it into the prompt, so the model invents them or omits them.
  3. Copy is invented. Headlines, prices, testimonials, logos and metrics appear because the screenshot had a headline, and the model filled the rest.
  4. Components are one-off divs. A button, a form field or a card that exists in the design system is recreated from scratch, slightly wrong, on every page.
  5. Interaction and accessibility are guessed. Focus rings disappear, form labels go missing, contrast drops, and a skip link is never mentioned, so it is never built.

A screenshot is useful as a reference. It is not a substitute for a brief.

What should the handoff brief contain that the design file does not?

Write a short document the builder can be pasted into, even if the design file is open in another window. Include:

  • The job of the page, in one sentence, and the one primary action with its real destination.
  • Tokens, not adjectives. Background, text, muted text, border, accent, fonts, type sizes, line heights, space scale, radius, shadow. Paste them from the file or from tokens.css. "Make it clean and premium" is not a token.
  • The component list, using the names your team already uses (Button/Primary, Field/Text, Card/Product), plus which states must exist.
  • The section order, matching the file, including parts that are easy to skip (legal footnotes, empty states, error text, mobile nav).
  • Copy you will stand behind. Paste final or draft copy. Mark gaps as [PLACEHOLDER]. Forbid invented testimonials, logos, prices, metrics and names.
  • Responsive rules the file actually specifies (one column below 768px, sticky header or not, what happens to the comparison table on a phone).
  • Assets with filenames or URLs, alt text you have written, and a rule that stock images must not be substituted.
  • Technical constraints: framework, existing repo or design-system package, "do not add a CSS framework we do not use," "visible focus required."

If a fact is not in the file and not in this brief, it should not appear in the draft.

How do I turn tokens, spacing and components into constraints the model will follow?

Models follow short, testable rules better than mood. Put the constraints in the same prompt as the section list, not in a follow-up after a bad first draft. A compact shape:

Build the [PAGE NAME] page for [PRODUCT] from the brief below, not from guesswork.
Primary action: [LABEL] linking to [REAL URL].
Visual system: use only these tokens. Do not introduce new colours, fonts or radii.
  --bg: [ ]; --text: [ ]; --muted: [ ]; --border: [ ]; --accent: [ ];
  Font: [family] for body, [family] for headings.
  Type: [body size/line-height], [h1], [h2].
  Space scale: [4/8/12/16/24/32/48]. Radius: [ ].
Components (use these names; do not invent variants):
  Button/Primary, Button/Secondary β€” states: default, hover, focus-visible, disabled.
  Field/Text β€” visible label, error text, autocomplete attributes where relevant.
  Card/[Name] β€” [anatomy].
Sections in this order: [list].
Copy: use only the text I paste. Mark anything missing as [PLACEHOLDER].
Do not invent testimonials, customer logos, prices, usage metrics or awards.
Match the section structure of the attached screenshots, but prefer the tokens and component names above when the screenshot and the tokens disagree.
Accessibility: one h1, logical heading order, 4.5:1 contrast for text, visible focus, labelled form controls, skip link to main.
Responsive: [your breakpoint rules]. Do not hide essential copy on small screens.
Stack / repo constraints: [framework, existing CSS, packages you may and may not add].

Attach the screenshots after this text if the tool accepts images, so the written rules exist first. If you only have a screenshot and no tokens, extract the tokens before you prompt, even if you do it by hand for five colours and two fonts. That half hour is cheaper than restyling a finished draft.

What belongs in the review before I call the page "done"?

Do not review only at desktop, and do not review only by eye against the screenshot.

Check What "pass" looks like Typical miss
Tokens Colours, type, radius and spacing come from the scale you named A "close" accent, a default system font, inconsistent gaps
Components Buttons, fields and cards match the named variants and states One-off styles, missing focus or disabled states
Copy and facts Every sentence is yours or marked [PLACEHOLDER] Invented quotes, logos, prices or metrics
States Empty, error, loading and disabled are present if the file or brief asked for them Happy path only
Page job The primary action is visible, and it goes to the real URL A pretty hero with a # link or a second invented CTA
Phone Sections stack in the agreed order; forms and tables remain usable Horizontal overflow, tiny tap targets, hidden legal text
Keyboard Tab order is sensible; focus is visible; the form can be completed without a mouse outline: none with no replacement
Contrast and headings Text meets 4.5:1; one h1; heading levels are not skipped Pale muted text, a decorative h1, skipped levels
Assets Real files, real alt text Stock substitution, empty alt on meaningful images

If several rows fail, fix the brief and regenerate the section, rather than hand-patching every pixel. The point of the handoff is a brief you can run again when the design file updates.

When does a starting library help, and when should I write the brief myself?

Write the brief yourself when the page is a one-off, when your design system is strict, or when you already keep a working handoff template in the repo. The unique work is the tokens, the component names and the copy; a generic "SaaS landing page" prompt will fight that.

A starting library earns time only when you repeat the structure of common sections (pricing comparison, FAQ, feature grid, a labelled form, footer legal) and you are tired of retyping the same accessibility and "do not invent proof" constraints. It cannot supply your tokens or your file. Treat a library entry as the skeleton for part of the brief, then replace the visual system and the facts.

If you do want a catalogue of those starting briefs, I work on VibUI: 2,852 website prompt templates, made up of 775 complete pages, 1,100 sections, 817 components and 160 animated backgrounds, with source code attached to roughly 1,000 entries. You buy access once; it does not bill again on its own. The public prices are $48 for a quarter, $99 for a year, and $179 for lifetime access, which the site shows as reduced from $384. You can inspect 60 samples at no cost, and a free account is allowed to copy 2 prompts, which is enough to test whether a section brief actually shortens a handoff you already do. If the samples do not save you setup time on a page you will really build, skip the purchase.

FAQ

Can I just upload the Figma file and skip the written brief?

Only if the tool genuinely reads your tokens, component names and copy from the file, and you have checked that it did. A flattened screenshot does not carry that data. When in doubt, write the tokens and the "do not invent" rules yourself.

What if the design file is messy or incomplete?

Stop and name the gaps before you prompt. Missing error states, unspecified mobile behaviour, or lorem ipsum in the file will be invented or ignored. A short list of open questions for the designer is part of the handoff, not a delay.

Should the model match the screenshot exactly when it disagrees with the tokens?

Prefer the tokens and the component names. The screenshot is a reference for structure and hierarchy. Pixel-for-pixel matching is a later, often manual, pass β€” and sometimes the wrong goal if the file was never built to a systematic scale.

Does this replace a human design review?

No. It produces a first draft that is closer to the system, so the review can talk about real decisions instead of missing buttons and invented quotes.

I already pay for Cursor, v0 or ChatGPT. Why would I look at a prompt library?

Those tools run the model. A library is only a set of starting briefs for repeated section types. You can do this entire handoff with a file you keep in the repo and never buy one.

πŸ“° Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.