ARCHITECTURE SPEC

Voice-to-Figma JEV Agent Topology

Topology Overview

1. JEV Voice Gateway

The entry point uses the JEV (Just Enough Voice) paradigm. Instead of waiting for a complete sentence, it streams audio and uses partial transcriptions. Crucially, it injects the current Figma canvas state (e.g., selected nodes, current theme) as context. This allows users to say "make *this* darker" and the system understands what *this* refers to.

2. Agentic Orchestrator

A hierarchical multi-agent setup. A primary router parses the stream and decides which specialist agent should handle the modification. This avoids a single massive prompt context. The TypeSafe Output Validator ensures that the agents only emit JSON that conforms strictly to our internal Semantic Buffer schema.

3. Semantic Buffer & MCP

Rather than directly executing raw UI commands, the system maintains a "Semantic Buffer" — an intermediate representation of the UI. When a new voice command arrives, it updates this buffer. A Diff Engine then calculates the delta between the buffer and the actual Figma canvas, pushing only the necessary changes via the Figma MCP (Model Context Protocol) plugin. This allows for native, non-destructive editing of Figma nodes.