Architecture Spec
Voice-to-Figma WebSocket bridge and semantic AST compiler topology.
Topology Overview
Layer Definitions
Voice Ingestion
The client captures microphone audio with Voice Activity Detection and emits partial transcriptions before you finish speaking. The parser pairs the active transcript with the selected node in Figma. If you select a button and say "make this darker", the engine reads the fill property directly from the selected node rather than guessing.
Intent Parsing
A routing parser inspects the incoming text and maps it to a property handler: layout, typography, or styling. Splitting parsing by domain keeps prompt contexts small and fast. A schema validator checks the generated JSON against our AST definitions before passing it down the pipeline.
Semantic Buffer
The system maintains an in-memory tree of your document. When a command arrives, the engine updates this tree and computes a property delta against the active canvas. A local WebSocket bridge sends only the changed attributes to the Figma plugin, mutating the selected Auto-Layout nodes without touching the rest of your canvas.
$ dizzy listen --session "Acme Dashboard" --port 4040
[info] Web Speech API active on microphone stream
[info] Captured phrase: "make the sidebar narrower" (confidence: 0.98)
[info] Matched node: frame_sidebar (id: 4:218)
[info] Patch: { width: 240 }
[info] WebSocket sent 68 bytes to Figma plugin
[info] Node updated in 142ms