← Back to patterns
build

Why Figma Indexes Code Structure Instead of Serving Screenshots

TRIGGER

AI coding agents receiving design prototypes as images or rendered visuals couldn't understand the underlying implementation logic—they could see what the UI looked like but not how it was built, forcing developers to manually translate visual designs into code patterns.

APPROACH

Figma's team built their MCP server to index the code inside Make prototype files rather than just serving rendered visuals. Input: a Figma Make file URL. Output: queryable code structure that AI agents can request specific portions of. Developers and AI agents can reuse code directly from a specified file or reference the logic, design patterns, and implementation as context. Partners like Anthropic, Cursor, Windsurf, and VS Code integrated this capability. Affirm reported rebuilding major product flows in fewer than two days, describing the speed improvement as 'orders of magnitude.'

PATTERN

Most tools only show AI the visual layer when the transferable knowledge is in the implementation. Index the code behind prototypes, not just screenshots.

WORKS WHEN

  • Prototypes are built with real code (React, HTML/CSS) rather than purely visual mockups
  • AI agents need to generate code that matches existing patterns, not just pixel-match a design
  • Teams have invested in functional prototypes that encode business logic and interaction patterns
  • Multiple developers or AI agents need to reference the same prototype implementations

FAILS WHEN

  • Prototypes are purely visual mockups without underlying code structure
  • The prototype code is throwaway quality not intended for production reference
  • Design-to-code workflow is simple enough that visual inspection suffices (single static components)
  • Team uses a design tool that doesn't generate queryable code artifacts

Stage

build

Source

Figma

From

September 2025

Want patterns like this in your inbox?

3 patterns weekly. No fluff.