The new handoff: making AI agents build on-brand UI
Over the last decade, we moved from Photoshop slices to Figma components to vibe-coded prototypes. The tools keep changing, and the foundations of great design matter more than ever. Here is how to teach coding agents to respect your design system.
Open three different prototypes generated by modern AI coding tools, and you will immediately notice something curious: they all look strikingly similar.
They share the same rounded corners (rounded-xl), the same indigo-to-purple gradient accents, the same floating card shadows, the same typography, and the same predictable layout cadence. They feel polished in a clinical, frictionless way, but they also feel completely generic.
Then there is the copy. Coding models like Claude instinctively reach for enthusiastic filler text to populate every empty nook and cranny of the interface. Subtitles promise "Effortless Collaboration," feature cards announce "Seamless Real-Time Synchronization," and helper text swells with polite, wordy explanations. For an agent, this dense filler serves a purpose: it provides semantic tokens to anchor layout geometry and compute bounding boxes. But for humans evaluating a product, it is distracting—and for your brand voice, and it can be destructive. It replaces concise, disciplined positioning with generic conversational noise.
These prototypes look like the statistical average of the web because that is precisely what a large language model generates when left unguided. It reaches for the most common CSS utilities, the most ubiquitous open-source libraries, and the most frequent phrasing in its training corpus.
If your company has spent months refining a bespoke brand identity—custom typographic scales, proprietary color palettes, deliberate spacing rhythms, and expressive micro-interactions—an unconstrained coding agent will dismantle that craft in a single prompt.
Yet writing off AI coding tools because they generate "average" interfaces misses the larger shift underway. The way design gets handed off to engineering is undergoing its fifth major transformation in fifteen years.
To understand how to make coding agents produce genuinely on-brand work, it helps to look at how we got here.
A decade of shifting handoffs
The mechanics of how designers communicate intent to developers has always evolved alongside our tooling:
Five eras of design handoff, linked in sequence: Illustrator (vector mockups, printed redlines, hex lists), Photoshop (layer comps, 960 grids, sliced bitmaps), Sketch (reusable symbols and exported specs), Figma (auto-layout, shared libraries, Dev Mode), and agentic code (vibe-coded, running prototypes).
- Illustrator and static redlines: Early web design borrowed directly from print. Designers delivered static vector mockups accompanied by manual spec sheets listing font sizes, hex values, and coordinate offsets.
- Photoshop and pixel slicing: In the 960-grid era, designers handed over multi-layered
.psdfiles. Developers spent hours slicing background graphics, export-optimizing transparent PNGs, and stitching CSS sprite sheets. - Sketch and early symbols: The introduction of symbols and reusable styles brought the first true component thinking to design files. Tools like Zeplin emerged to automate asset extraction and measurement inspections.
- Figma and living design systems: Figma unified the design workflow in the browser. Auto-layout mirrored CSS flexbox, component variants mirrored component props, and Dev Mode provided direct access to design tokens and spacing systems.
- The Vibe-Coded Prototype: Today, the handoff artifact is increasingly not a static canvas at all. Product designers, founders, and creative directors use Claude Code, Cursor, or browser-based builders to prompt functional prototypes into existence. The deliverable is no longer a mock; it is running code.
Each transition followed the same trajectory: designers moved closer to the medium of the web, and manual translation between design and code became more automated.
What never changes: the anatomy of design excellence
While the handoff format has transformed every few years, the foundational architecture required to achieve visual and functional excellence has remained remarkably constant.
Whether an interface is built by a junior developer inspecting a Photoshop file in 2012 or an autonomous agent writing TSX in 2026, on-brand software requires the exact same primitives:
- Brand Identity & Creative Vision: The underlying aesthetic philosophy, personality, and visual attitude of the brand.
- Design Tokens: Strict, semantic variables for color (surface, text, border, interactive states), spacing increments, border radii, shadows, and z-index layers.
- Typography Hierarchy: Typeface definitions, optical weights, line-height ratios, and responsive fluid font scales.
- Component Primitives: Accessible, composable building blocks (buttons, inputs, dialogs, badges, segmented controls).
- Module Templates: Higher-order arrangements of components that solve repeated communication goals (hero units, feature comparisons, proof grids, testimonials).
- Page Layouts: Macro grid structures, container constraints, header and footer relationships.
- Voice & Tone Guidelines: The grammatical style, punctuation rules, and messaging posture of the brand.
The failure of default AI generation is not that the models cannot write code. It is that they have not been given the design system in a format they can actually comprehend and enforce.
Best practices for handing off design systems to agents
When you hand a human engineer a Figma link, their eyes do an immense amount of subconscious translation. They recognize that a button matches the primary style guide even if the designer detached an instance. They know to use the existing Container component rather than writing a raw max-w-7xl wrapper.
An AI agent has no subconscious intuition. If you do not explicitly construct its operational boundaries, it will invent new CSS classes, hallucinate inline styles, and default to the visual average of the internet.
To make coding agents adhere to your design system, you must engineer their context.
1. Shift from human documentation to machine-readable tokens
Markdown documentation meant for human designers—filled with conceptual prose about "delight" and "brand warmth"—is largely useless to a coding agent.
Agents require structured, semantic tokens. Modern design operations export variables directly from Figma into standardized formats (such as the W3C Design Tokens Community Group specification):
{
"color": {
"surface": {
"primary": { "$value": "#ffffff", "$type": "color" },
"secondary": { "$value": "#f4f3f0", "$type": "color" }
},
"action": {
"primary": { "$value": "#1a1a2e", "$type": "color" },
"primary-hover": { "$value": "#2d2d4a", "$type": "color" }
}
},
"space": {
"gutter": { "$value": "24px", "$type": "dimension" },
"section": { "$value": "96px", "$type": "dimension" }
}
}When tokens are expressed as semantic roles (color.surface.primary) rather than literal colors (#ffffff), the agent understands where and why to apply them, preserving dark-mode compatibility and brand hierarchy automatically.
2. Establish a machine-readable design constitution (DESIGN.md)
Top-tier engineering teams now maintain a dedicated design specification file at the root of the repository. Google Labs formalized this approach with the open-source DESIGN.md specification—a standardized format combining machine-readable design tokens in YAML front matter with design rationale and layout rules in Markdown. Emerging out of tools like Google Labs' Stitch, the format gives coding agents a persistent, unambiguous source of truth for visual identity.
This document serves as the agent's explicit operational boundary. A strong design constitution defines:
- The Component Registry: Exact import paths and TypeScript prop interfaces for every approved component.
- Allowed Layout Primitives: Which grid and container modules the agent is permitted to use.
- The "Never" List: Explicit negative constraints that eliminate generic patterns:
- Never use inline hex codes or arbitrary Tailwind values (e.g.
bg-[#123456]). - Never invent custom card drop shadows; use
--elevation-cardexclusively. - Never use generic border-radii; all rounded surfaces must reference
--radius-smor--radius-md. - Never render an empty loading spinner; use the pre-built skeleton component.
3. Connect the live design graph via MCP
Relying on static screenshots or copy-pasted CSS snippets forces the model to guess the underlying geometry.
With the Model Context Protocol (MCP), agents can connect directly to your Figma workspaces via an MCP server. Instead of looking at flattened pixels, the agent inspects the vector hierarchy, auto-layout constraints, and token bindings directly from the source design file, translating native Figma variants into corresponding code props without human translation loss.
4. Create closed-loop validation
The most effective way to keep an agent on-brand is not just prompting it properly—it is catching its mistakes automatically.
Set up an automated linting and visual verification loop:
- Stylelint rules that reject raw color literals in CSS.
- TypeScript compiler checks that disallow arbitrary props on design system components.
- Automated visual regression tests that screenshot newly generated pages and flag layout discrepancies against the baseline.
When a linter or test fails, the agent reads the error output, self-corrects, and replaces the offending pattern with the approved design token before a human ever reviews the pull request.
How we do this with Root: on-brand vibe coding in production
At Blinkk, our philosophy has always centered on high-performance UX engineering and disciplined code craft. Most of our client work is built on Root.js, our open-source website engine designed specifically for content-heavy, high-interaction properties.
When generative AI tools emerged, we did not abandon our architectural principles. Instead, we architected Root so that coding agents could build inside our production repositories without compromising brand fidelity.
An agent prompt flows through five stages: DESIGN.md and agent rules defining component APIs and tokens; design tokens as CSS variables and SCSS mixins; zero-CLS TSX server components; a gallery of composable, tested layout modules; and automated visual regression and unit tests. The result: productionized vibe coding inside the live repo.
Here is how the system operates:
1. Strict Tokens and CSS Variables
Every Root project establishes a foundational token layer in SCSS and CSS custom properties. Colors, typography scales, responsive breakpoints, and motion curves are defined once. When an agent creates a new component, our repository rules instruct it to consume existing CSS variables rather than declaring ad-hoc styles.
2. TSX Server Components with Islands
Root separates server-rendered markup from interactive client islands. Every component renders semantic, deterministic HTML server-side to guarantee zero Cumulative Layout Shift (CLS). When an agent generates a new page, it assembles pre-existing server components, ensuring instant first paints and search-engine clarity out of the box.
3. The Modular Component Gallery
We build websites as libraries of modular building blocks: Hero units, Content Splitters, Logo Gardens, Quote Marquees, and Media Carousels. Each module is documented with clean TypeScript types. When an agent needs to add a new case study or product feature section, it pulls from the tested module gallery rather than writing novel layout code from scratch.
4. Screenshot and Unit Tests
Every module in the gallery is backed by automated Playwright screenshot tests and deterministic visual regression checks. If an agent introduces an unapproved font weight, misaligned margin, or broken responsive breakpoint, the visual test suite immediately flags the drift.
5. The Root DESIGN.md Interface
In every project repository, we embed a structured DESIGN.md file alongside our agent rules. This file maps our visual design language into clear instructions for coding agents:
- Which layout containers to use for 1200px vs 1440px viewports.
- How typography classes (
heading-1,subheadline,body-large) map to semantic HTML tags. - How dark mode transitions are handled across themes.
The Result: Productionized Vibe Coding Inside the Repo
Once this infrastructure is in place, the dynamic changes entirely.
Prototyping no longer has to happen in a throwaway sandbox that later requires weeks of painful translation. Because the design tokens, component APIs, accessibility guardrails, and visual test suites are already hard-coded into the repository, vibe coding can happen directly inside the production codebase.
A founder, designer, or marketer can use an AI agent to prompt a new landing page, test a product launch variant, or iterate on a campaign layout. The agent is constrained by the design system at every step. It cannot introduce off-brand colors, it cannot break layout shifts, and it cannot ship inaccessible markup.
The result is the best of both worlds: the raw velocity of generative prototyping, backed by the enduring craft of enterprise UX engineering.