Dan Romero

Mockup before code

Updated

A prompt that has a coding agent show you a mockup you can click, at real size with real content, before it builds any screen or visible change. Three directions first, then variants of the one you pick, until you say build.

773 words

Before you build any new screen, page or visible change for me, make a mockup I can open and click, and wait for my pick. Save these rules in this project, as a section of DESIGN.md or as MOCKUPS.md if there’s none, and point to them from AGENTS.md or CLAUDE.md, so later sessions follow them too. Then ask me, in one short message, what to mock up first.

What counts

When

Where

Rounds

  1. Round one: three distinct directions, A, B and C. Three layouts, not one layout in three colors.
  2. After my pick: two or three variants of it, A1, A2 and A3, each keeping the layout and changing one thing, such as size, weight or color.
  3. Add boards; never overwrite one, so “A5” still means the same board later.
  4. Repeat until I say build. One app’s map controls went A, B, C, then A2, A5 and A6, then built.
  5. Two changes to the same screen get one combined mockup, not two that clash once both ship.

Before you show me

  1. Click through it yourself. Every tap target does something.
  2. Measure, don’t eyeball. Run a script in the page that lists edges 1–3 px apart, rows off center, controls of different heights side by side, and any size not in the tokens file. Fix what it finds.
  3. Check light and dark, and the longest real value.
  4. Quote font names with single quotes in inline styles. Double quotes inside style="…" end the attribute, the font is dropped, and every screen falls back to a serif.

Each round’s report

Mockup: <link>
A. <one line>  B. <one line>  C. <one line>
My pick: B, because <reason>. Try first: <the one interaction to try>.
Unsure: <at most three things>.

Then stop and wait for my pick.

After the last round