Architecture and control model

How Layntra works.

A Codex skill defines the interaction. A bridge carries bounded commands over local loopback. A Figma companion applies supported changes only after an explicit write instruction.

The path from Codex to Figma

Codex skill
    ↓ local stdio / MCP
Layntra bridge
    ↓ WebSocket on 127.0.0.1:3846
Figma companion plugin
    ↓ supported Figma Plugin API operations
Editable Figma nodes

The bridge binds to 127.0.0.1, so it accepts connections from the same machine rather than exposing a hosted Layntra endpoint. You do not create a Layntra account or provide a Figma API token.

Codex is still the model-facing part of the workflow. Its data handling follows your Codex configuration. “Local bridge” describes the connection between Codex and Figma; it does not mean the model runs offline.

Four modes, two kinds of authority

$layntra status, inspect, and review

These are read-only. They can report the active companion, file, page, selection, and supported node structure, but they do not modify Figma.

$layntra plan

Planning converts your intent into a proposed change set tied to the current target. It remains read-only and reports “No Figma changes made.”

$layntra apply

Apply is the explicit write boundary. Before writing, Layntra checks that the page and selection still match the planned context. A stale target is rejected instead of guessed.

$layntra undo

Undo is available after a successful write and is guarded against the expected target. Layntra uses a Figma undo checkpoint rather than trying to reconstruct the previous design.

What version 0.1.0 can and cannot do

Layntra can inspect supported nodes, create editable frames, text, rectangles, ellipses, lines, and groups, and update a bounded set of properties. A write batch is limited to 100 nodes.

Version 0.1.0 exposes neither node deletion nor arbitrary code execution. It does not bypass Figma workspace, seat, plan, or plugin permissions. Use it only in files where your Figma account is allowed to run Design plugins.

Verified flow

The project includes automated contract and bridge tests plus a real Figma end-to-end run covering connection, reading, creation, update, stale-target rejection, invalid input, reconnection, and guarded undo. The test scope is documented in the public E2E report.