Case study · written version

UI to JSON

The bottleneck in AI frontend generation isn't the model. It's the quality of the intermediate representation you hand it.

Role
Designer & Engineer
Read time
~9 min
See it working
/work/ui-to-json
01: The problem

AI doesn't struggle to write code. It struggles to read design.

Figma-to-code tools optimise for the wrong thing: CSS extraction, HTML generation, developer handoff. They emit noisy exports with broken hierarchy, absolute positioning everywhere, and metadata that has nothing to do with how a UI is actually built.

Feed that to an AI agent and you get hallucinated, inconsistent code. The real bottleneck in AI frontend generation isn't the model. It's the quality of the intermediate representation you hand it.

The core bet

Compile intent, not pixels.

UI to JSON treats a design like source code for a compiler. It extracts the semantic structure a developer would infer by eye, then normalises it into a UI Abstract Syntax Tree built specifically for machine reasoning.

IntentGeometry
StructurePixels
RelationshipsCoordinates
SemanticsRaw nodes
Reflection

The interesting problem was deciding what to throw away.

Every export tool I'd used optimised for completeness: capture every property, every pixel, every node. UI to JSON is the opposite bet. The value isn't in what it records, it's in what it confidently discards. Deciding which visual details carry meaning, and which are noise, was the whole design problem.

The insight that landed with people was practical: you don't need MCP servers or screenshots that burn tokens to get an AI from design to code. A small, clean, semantic representation does more than a large noisy one. Building it as a shipped plugin, not a demo, forced that to survive contact with messy real files made by people who never expected a machine to read them. That constraint is what makes the output trustworthy.

Roadmap

From extraction layer to AI-native workflow.

NOW

Semantic export engine

IN PRODUCTION

Layout, component, token, naming, and constraint extraction into AI-optimized JSON, with optional markdown context.

NEXT

Direct AI agent integration

ROADMAP

Code-generation adapters and multi-framework output so the AST flows straight into a coding agent.

THEN

Responsive + animation intelligence

ROADMAP

Breakpoint inference, animation extraction, and accessibility recommendations layered onto the spec.

LATER

Design system sync

ROADMAP

Semantic diffing, live code preview, and feedback loops between design systems and generated code.