Slide 1 — From Mockup to Code
Welcome to Module 3 — the one this course is named for. You already have the input: a mockup, a screenshot, a reference you admire. This module is about handing that artifact to Claude Code and getting back working front-end code that respects the design. We will cover what the agent can actually read, how to brief the conversion so constraints do the work instead of adjectives, how to review the output as a designer without writing code yourself, and how to run a parity check that gives you evidence instead of a feeling. Let's start with the inputs.
Slide 2 — What the agent can read
First, what can the agent actually read? More than you might think. You can paste a screenshot straight into the prompt — control-V in the terminal, not command-V — drag an image in, or point at a file by path. You can reference files already in the project: existing components, token files, stylesheets. You can give it design rules in your CLAUDE.md or a DESIGN.md. You can point it at a URL or a local preview. And you can paste real copy and real data, so it never has to make content up. The pattern is simple: the more evidence you supply, the less it fills the gaps with the most generic thing it knows.
Slide 3 — A screenshot is evidence, not a specification
Before we brief anything, one idea that carries the whole module: a screenshot is evidence, not a specification. It shows hierarchy, density, rhythm, and copy beautifully. It shows nothing about responsive behaviour, interaction states, accessibility, or the product rules behind the layout. So separate two kinds of information. Visual traits — spacing, hierarchy, density — the agent can read from the image. Product rules — who can do what, what needs confirmation, what happens when data is missing — it must never invent. Your job is the interpretation layer around the image: what matters, what can change, what must not change. That interpretation is where the design survives the conversion.
Slide 4 — Briefing the conversion: constraints beat adjectives
Here is the same kind of request run two ways, and this comparison comes from runs that were actually executed, not imagined. The vague version — recreate this screenshot, make it look modern — comes back polished and useless: right shapes, invented content, its own colours, dozens of hardcoded values. The constrained version names the user job, the components and tokens to reuse, the states that must exist, and what the agent is not allowed to invent. It comes back with a plan first and needs fewer, sharper corrections. The principle: whatever you leave unstated, the agent fills with the most common answer it knows. Constraints beat adjectives, every time.
Slide 5 — The mockup-to-code pipeline
Here is the whole workflow in one picture. You supply the reference — the screenshot or mockup — plus the things the image cannot carry: tokens, components, real content. The agent analyses the structure and describes what it sees: regions, hierarchy, components, states, unknowns. You correct that reading at the annotation gate, while it is still words and costs nothing. Then the agent generates the section against your existing components, runs a parity check with side-by-side screenshots, and you review. Mismatches go back as a new run; the decision to accept stays with you. The agent does the analysis and the evidence. You hold the gates.
Slide 6 — First run: a single section from screenshot to component
Let's trace a first run. Keep it to one section — a hero, a card, a settings panel — not a whole page. The brief attaches the reference image, asks the agent to describe what it sees before writing any code, and sets the rules: use the values from the reference and list them, include hover and focus states, use the copy I pasted, do not invent any. Then the closing instruction that matters most: after building, take a screenshot, compare it to the reference, and list every difference. The output is one file you open in a browser. Small enough to review completely, real enough to teach you the entire loop.
Slide 7 — Reading the output as a designer
Now the part people assume requires an engineering degree: reviewing the output. It does not. It requires five questions, asked in the same order every time. Structure: does the markup mirror the design's hierarchy, or is it one big stack of boxes? Tokens: are colours and spacing pulled from your system, or hardcoded? Components: did it reuse what exists, or invent lookalikes? Spacing and density: open it next to the reference — has everything become a little more comfortable than you designed? And states: can you actually find empty, loading, error, and focus, or only the happy path? That is pattern recognition, not programming. You can do it this week.
Slide 8 — Where conversions fail
Conversions fail in predictable ways, and predictable means checkable. Spacing drift: everything relaxes a little until your dense design becomes comfortable and ordinary. Fake data: invented copy and prices that read as plausible — which is exactly what makes them dangerous. Missing states: the screenshot showed the happy path, so that is all that got built. System drift: lookalike components and hardcoded values instead of your actual system. And responsive drift: mobile stacks things in code order, not in the order your user needs them. None of these announce themselves. The output looks finished. That is precisely why the next step is a parity check rather than a glance.
Slide 9 — The parity check: side-by-side screenshots as evidence
Here is how you check the result without trusting your eyes at five in the afternoon. Ask the agent to capture screenshots of what it built — desktop and mobile — put them beside the reference, and report the mismatches in order: structure first, then spacing, then missing states, then anything that is not from your system. For each one, the likely cause and the smallest safe fix — and no code changes yet. You read the evidence, separate real mismatches from matters of taste, and decide what goes back. Parity output is evidence for your decision. It is not the decision. That stays with you.
Slide 10 — Iterating: feedback the agent can act on
Iteration is where the time goes, so make the feedback worth acting on. Make it less generic gives the agent nothing. The invoice rows are fifty-six pixels in the build and forty in the reference — match the reference density: that, it can act on. Name the mismatch, the user impact, and the direction. Two more habits: if you have corrected the same thing twice and it is still wrong, stop patching — clear the session and rewrite the brief with what you learned. And if a round makes things worse, rewind it; every edit is checkpointed. Finally, feedback you keep repeating across tasks is not feedback. It is a rule. Put it in your CLAUDE.md and stop typing it.
Slide 11 — Keep the packet in the project
One habit that quietly changes the economics of all this: keep the packet. The reference screenshots, the annotation that recorded how you interpreted them, the unknowns you flagged, the QA report from the parity check — put them in the project, in folders the agent can read, not in your chat history or your downloads. The first conversion of a screen costs real effort. Whether the second one is cheap depends entirely on whether that context survived. A conversion that leaves a packet behind makes the next run faster and more consistent. One that leaves nothing starts from zero, every single time.
Slide 12 — Exercise: convert one section of your own design
Now it is your turn, on your own work. Pick one bounded section from a design you actually made — a card, a panel, a hero. Screenshot it, gather the real copy and the components it should reuse, and write the brief: constraints, required states, what the agent may not invent, and what you will check at the end. Ask for the annotation first, and correct at least one thing in it before you approve — that correction is the whole point of the gate. Generate, run the parity check, send back one round of named mismatches, then decide: accept, hold, or go again. Keep everything you produced. Module 4 grows this exact section into a prototype.
Slide 13 — Summary, and what comes next
Let's close. The input was never the problem — you already had it. The agent can read your screenshots, your files, your tokens, and your real content; what it cannot do is invent the product rules a screenshot does not carry, so you supply the interpretation. Brief with constraints, get the annotation before any code, and correct it while it is cheap. Review structure, tokens, spacing, and states, then ask for parity evidence instead of trusting a glance. Name your mismatches, promote recurring feedback into your harness, and keep the packet. In Module 4 we scale this from one section to a working prototype — multiple screens, realistic data, and the honesty about what a prototype is. See you there.