Plumb · design (build)
plumb_designValidate and compile a DSL document into Figma auto-layout frames with text, images, and icons. Supports create, sync, and dry-run modes with optional design brief intake.
Instructions
Author a design from a high-level Plumb Design DSL document and BUILD it into the paired Figma file. This is the write direction: the DSL (semantic pages → sections → blocks + brand tokens) is validated, compiled DOWN to the PDS IR, lowered to a Figma-native emit plan, and executed by the plugin (auto-layout frames, text, images, icons). Returns the created node ids keyed by authored element handle — the join key you then feed to plumb_review / motion. Pass a brief to record intent (audience, tone, brand) alongside the build. Use dryRun: true to compile + validate without touching Figma.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc | No | A Plumb Design DSL document (version "1": brand + pages of semantic sections). Validated against DesignDocSchema. | |
| mode | No | `create` (default) — fresh nodes. `sync` — idempotent re-apply keyed on stable plumbKey (authored element handle); pair with `prune` to delete stale nodes. | |
| brief | No | Optional design-brief intake — records author intent alongside the build. | |
| prune | No | sync only — delete built nodes no longer in the design. | |
| dryRun | No | Compile + lower only; do NOT touch Figma. Returns plan stats + warnings so you can sanity-check before building. | |
| reveal | No | Scroll + select the built root in Figma when done. | |
| target | No | Where to build. Defaults to a new top-level frame on the current page. | |
| pageWidth | No | Layout width hint for pages that don't set their own. |