Repository navigation
Bridge DS v3.0 — Compiler-driven design generation
The big change
Claude no longer writes raw Figma Plugin API code. Instead, it produces declarative JSON scene graphs that a local Node.js compiler transforms into correct, rule-enforced Figma scripts.
Before (v2): Claude reads 30-70K tokens of rules → writes imperative Plugin API code → 8-12 MCP round-trips → ~5-8 min per screen
After (v3): Claude reads 2-5K tokens → produces JSON scene graph → compiler generates correct code → 2-3 MCP calls → ~35 seconds per screen
What's new
Scene Graph Compiler (lib/compiler/, 10 modules, 3500+ LOC)
- 26 Figma API rules enforced automatically by code generation
- Token and component resolution with fuzzy error suggestions
- Multi-chunk support with
globalThisbridging for large designs - Transport-aware output (console IIFE vs official top-level await)
- Compile-time validation — errors caught before Figma execution
CSpec format — YAML-based compilable specifications
- Human-readable AND machine-parseable
- Replaces verbose markdown templates (250 LOC → 30-60 LOC)
Recipe system — pre-built scene graph templates
- Created from successful designs, evolve with user corrections
- Auto-patched when learnings reach 2+ signals
- Matched against descriptions for instant scaffolding
Unified workflow — make / fix / done
- Replaces 10 commands with 3 (+ setup)
- One continuous flow from description to shipped design
Breaking changes
- Command restructure:
make/fix/donereplacespec/design/review/quick/sync/learn - Spec format: CSpec YAML replaces markdown templates
- Removed:
figma-api-rules.md(rules now in compiler),bundle.js, 7 old action files
Quick start
npx bridge-ds init
# then in Claude Code:
/design-workflow setup
/design-workflow make "a settings page with profile and notifications"