Skip to main content
Handbook/Build/Chapter 58 · Visual Work

Building UI Is Directed Differently

Share

Share this page

Pass it to someone who needs it.

Key takeaway: Show the agent the look, don't describe it

You can describe logic to your agent in words and check the result against a spec: given this input, return that output. Try the same with how something looks and you get back code that runs, compiles, and is visually wrong. The agent is building a screen it cannot see. This chapter gives you the different loop that visual work needs.

6.4.1The agent builds the screen blind

When the agent writes interface code, it never sees what that code paints on the screen. It is arranging pieces by name, not by eye, the way you might wire a lamp you are not allowed to switch on.

So a worded brief like "make it modern and clean" hands it nothing to aim at. Those words map to a thousand different screens, and the agent picks one at random. Logic you steer by telling; appearance you steer by showing.

6.4.2Show a reference, not a paragraph

The fastest way to pin down a look is to hand the agent something it can copy. Paste a screenshot of a screen you like, a mockup, or a link to a page whose style you want, then tell it what to borrow.

Compare the two briefs below. The first leaves the agent guessing; the second gives it a target.

Build a pricing page. Make it clean and modern and professional.
Build a pricing page. Match the layout and spacing in the screenshot I pasted: three cards side by side, the middle one raised and highlighted. Use our brand colors, not the ones in the image.

A reference collapses a thousand possible screens down to one. An adjective does the opposite.

6.4.3Iterate on the look, not the logic

You cannot unit-test whether a screen looks right; you judge it by eye. So the loop is short and visual: the agent builds, you look, you correct. Modern agents can screenshot the running page and read their own output, which closes the loop without you.

Give corrections that are specific and visual, not vague: "the heading is too close to the buttons, double the gap" beats "it feels off." Repeat until it matches, then lock that look in place so it cannot drift, which the chapter on visual and snapshot tests covers.

Visual work loops build, screenshot, and specific fix until it matches.

6.4.4Give a design direction, not "make it nice"

If every screen starts from "make it nice," the agent guesses your taste fresh each time and nothing matches. Decide the direction once, before you build, and every screen inherits it.

A usable direction is three concrete choices, not a mood:

  • One reference the whole app should resemble.
  • A small color palette, your brand colors named.
  • One named style you are committing to, not a shrug.

What that direction should actually be, the layout, the flow, the interface decisions, is its own subject, covered when we design the interface. Here the rule is only that you pick it up front and hand it over, rather than let the agent invent taste per prompt.

Once you have a direction and a reference, this prompt runs the whole visual loop for you, from image to a screen that matches:

Ready prompt
Act as a senior frontend engineer. I will paste a reference image and a short brief. Do this in order: 1. Describe what you see in the reference: layout, spacing, hierarchy, and color feel. Confirm you have it right before building. 2. Build the screen to match, using our palette, not the colors in the image. 3. Screenshot the running page and compare it to the reference. List every visible difference. 4. Fix the top difference, screenshot again, and repeat until it matches. Stop and show me. Keep corrections visual and specific, never "make it look better." My screen:

Do this now: take a screen you want built, paste a reference image with the prompt above, and make the agent build, screenshot, and match it before you touch the words.

Mahmoud Zalt

Mahmoud Zalt

Software engineer, 16+ yrs · built Sistava.com in 3 months, idea to production, using these methods

Resources
Contribute
Donate

Support my work

A small tip keeps the free work coming.

© 2026 Mahmoud Zalt. Free to read, not to republish.
Copyright & license