A redesign touched six pages, and building them one after another wasn't going to fit the timeline. The fix was to run them in parallel instead — one agent per page, each in its own branch, all folding into a single integration PR.
The human stays in the loop, but not by writing the code. The setup runs once: a shared playbook of rules, the gates that matter, the final call on whether a page is actually done. Everything between those — planning a page, writing it, checking it — runs through agents. What made this work wasn't the code generation itself; it was the scaffolding around it, and a verification loop that catches an agent when it's confidently wrong.
This is that scaffolding — and, more usefully, everything that broke on the way to it working.
The pipeline
One page = one chat = one worktree
Every page runs off the same shared playbook — one set of instructions that all of them follow. The opening moves are written into it and carried out by the agent itself: rename the chat to the page name, create an isolated git worktree so nothing lands in the shared checkout, read the existing conventions, and study the design handoff and the current code before writing a line.
A planning pass then turns that into the page's own plan: what's frontend, what's backend, what to defer, and what counts as done. Implementation starts only after that. Several of these chats run at once — that's the whole point, and also where most of the pain lives.
Six pages, six chats
Design is the source of truth, not the code
Every page starts from a design handoff, and that handoff — not any existing screen — is the source of truth for how the page should look. It comes out as a zip: the mockup files plus a short brief describing how the screens connect. That brief is what lets the planning agent see the flow rather than a single screen in isolation — where this page sits, what links into it, what comes next.
From there the agent reads the handoff top to bottom, maps each part of the mockup to components and to the API fields that feed them, and lists the backend gaps before touching anything.
Close enough isn't parity. Agents reach for a shared component's defaults — a button here, a badge there — when the mockup specifies exact values. The fix was to make the agent pull the exact hex, padding and radius out of the handoff before accepting any default, since those defaults were often a few pixels or one shade off.
What's inside a handoff
README.md carries how the screens connect; Page.dc.html is what the agent measures against.Zone by zone
No fake data
Real APIs are wired by default; mocks are only allowed if the plan explicitly says so — a rule that exists because of one specific failure.
An agent once reported that a page's overview was showing real numbers — cost, tokens, sessions. It wasn't. Those came from a local fixture that only appears when no data warehouse is configured. The numbers looked entirely reasonable, which is exactly why nobody questioned them.
Visual plausibility isn't authenticity. Before anyone calls data real, trace it: component → hook → handler → source. When something genuinely isn't wired up yet, ship an explicit "not wired" state — never invent numbers to fill the gap.
The corollary: when a section is blocked on backend work, the rule is to cut it rather than fill it with a "coming soon" placeholder or fabricated content.
Saying so, instead of guessing
Visual verification, not "the code looks fine"
This is the part that earned the most corrections, and the part worth stealing outright.
The single most repeated mistake wasn't a CSS bug. It was an agent claiming a fix was done — from edits on disk — while the running app still served the old code: a stale hot reload, or a subagent reporting "looks clean" without ever opening the page.
So verification became its own pass, run in a real browser. Instead of screenshots-as-vision, it reads the page's accessibility tree, clicks and fills by element reference, pulls computed styles to compare against the mockup's exact values, and diffs screenshots against the design. Two rules hardened out of this: "couldn't verify visually" counts as "not done" — a clean-looking diff on disk is not evidence — and when hot reload lies, cold-restart: wipe the build cache, restart, and re-check both the app and the API gateway, since one can be alive while the other silently serves errors.
What counts as proof
The browser probe beats an IDE preview for a few boring reasons:
Two ways of checking the same thing
Running them in parallel without collisions
Parallelism is where the interesting failures showed up. The worst was two sessions writing into the same worktree at once — one agent's commits quietly reverting another's instructions. The fix was a simple ownership rule: the shared main checkout is read-only, and one writer owns one worktree. Before any agent claims it's ready, it checks git status for changes it didn't make, and stops if it finds any.
Two smaller failures from the same root cause: port squatting — a "server not ready" error was often a stale process from another worktree still holding the port, not a slow boot — and browser-session races, where parallel agents sharing one default browser session produced screenshots of the wrong page. Neither is exotic; they're the ordinary cost of concurrency. Agents just don't anticipate them on their own, so the rules have to be explicit.
One writer, one worktree
Three collision cards
Fold, and keep CI green
Once a page verifies against its mockup, it gets a polish pass — cleaning up only the files it touched — and then folds into the integration PR as one commit per page. From there an automation loop keeps the PR merge-ready: resolving conflicts, triaging review comments, and fixing failing CI, without ever merging on its own.
Before anything folds in
One discipline worth calling out: the PR carries product code only. Seeds, local fixtures, and the design handoff files stay out of it. Agents like to sweep helpful-looking extras into the diff; the plan and the prepare step exist partly to sweep them back out.
One commit per page
main, newest first: one feature commit opens each page, but redesigning Billing broke CI at 4 of 6 checks — it took two follow-up commits to bring it back to green, alongside an unrelated fix landing the same day. Green on every commit was never the bar — green before merge was.Open questions
One will occasionally insist a fix landed when it didn't — cheap enough to re-check in the browser rather than take the summary on faith.
A five-minute manual capture still beats what automated screen recording produces, so anything stakeholder-facing gets filmed by hand.
Nothing behind SSO can be reached headlessly — someone still has to hand over a session once before an agent can work there.
The browser pass narrows the gap to almost nothing, but a person still looks at the screen before a page is called done.
Where this goes next
Two defaults are staying, full stop: a page isn't done until a live browser probe says so, and a worktree — like a browser session — never gets shared between agents. Both started as notes in a playbook; both became hard gates once the cost of skipping them became clear.
The bigger shift is a preference more than a rule: a section that admits it's empty beats one that quietly guesses. That trade has paid for itself every time a backend lagged behind a design, and it's the one part of this that generalizes past this particular pipeline.
Anyone running several agents on UI at once, and chasing the same "it's already fixed" ghost, is welcome to compare notes.