Skip to content
Article Figma Blog Aug 2026

Figma Workflow Lab: moving between design and code with agents

The design-to-code handoff has always involved two kinds of gaps: the structural gap between how designers think about components and how engineers build them, and the living gap that opens whenever a design system drifts away from its production implementation. Figma’s Workflow Lab team published a walkthrough of a five-step agentic workflow that attempts to close both.

The five-step workflow

Step 1 — Planning with diagrams. The session starts in FigJam. An agent uses generate_diagram to produce a system diagram of the component being built, giving the team a shared structural picture before any code is written. This step functions as alignment rather than output: the diagram is disposable; the conversation it enables is not.

Step 2 — Code Connect setup. Code Connect is Figma’s mechanism for linking design components to their code counterparts. The agent runs through Code Connect configuration for the target component, establishing the mapping between Figma’s component tree and the codebase.

Step 3 — Design system search. The agent calls search_design_system to find existing components that overlap with what is being built. This is the step most likely to short-circuit unnecessary work: if a close match already exists in the design system, the workflow surfaces it before any new component is scaffolded.

Step 4 — Variable and token drift detection. get_variable_defs pulls the current token definitions from the design system and compares them against what is used in the component under development. Drift — cases where the design uses a value that does not correspond to any current token — is flagged here, before code is written.

Step 5 — Closing the loop with use_figma. The final step pulls the current Figma design back into the agent context, so the code generation step has access to the latest design state rather than a cached or assumed version.

What this produces

The team describes the result as the “first AI pass” arriving “closer to production-ready” than earlier workflows. The key word is closer: this is not a claim that the output needs no review, but that the gap between AI-generated code and something an engineer would actually merge has narrowed.

The drift detection step is the most practically significant element for teams maintaining large design systems. Token and variable drift is one of the most common sources of inconsistency between design files and production UI, and catching it before code generation rather than after avoids a class of rework.

Who this is relevant for

The workflow assumes a team already using Code Connect and comfortable running agents in development tooling. It is not a general introduction to AI in design — it is a specific process description aimed at design systems teams and the engineers they work with.

For teams earlier in their AI tooling journey, the article is still worth reading for the structure it demonstrates: the value of a planning step that produces alignment rather than output, and the value of drift detection as a quality gate before code generation begins.