| Hat | Stage | Upstream gate | Output | Unblocks |
|---|---|---|---|---|
| UXD | Design input | PRD ID + Figma URL | design/context-library/figma-links.md; optional design/outputs/screens/PRD-NNN/ |
/ds-screen-gen, /design-review |
When to Use
- PRD exists and designer has a Figma file for its screens.
- Engineer / QA wants current frame list beside the PRD without loading Figma UI.
Prerequisites
design/context-library/figma-links.mdexists (shipped with template).- Optional:
.mcp.jsoncontains Figma MCP entry (detect:jq '.mcpServers | has("figma")' .mcp.json). Absent → link-parking mode only.
Modes
| Mode | Trigger | Behavior |
|---|---|---|
| Link-parking (default) | No Figma MCP configured | Append/update row in figma-links.md; stop |
| MCP mode | Figma MCP present | List frames → frames.json; ask before export → PNG@2x per frame → write index.md |
Protocol
- Identify target — PRD number + Figma URL. Validate
https://www.figma.com/(file|design)/<key>/<name>. Extract<key>. -
Append/update row in
design/context-library/figma-links.md:| PRD-{NNN} | {title} | {url} | {key} | {today} | {author-gh} |Replace existing row for same PRD (Figma links rot).
- Branch:
- Link-parking: stop, inform user MCP disabled.
- MCP: list frames → save
design/outputs/screens/PRD-{NNN}/frames.json. Ask before export (y/N). SkipArchived-*/_*frames. Save<slug>.pngper node. Writedesign/outputs/screens/PRD-{NNN}/index.mdatstatus: draft.
Output Frontmatter (MCP mode, index.md)
id: DESIGN-PRD-{NNN}
status: draft
prd: PRD-{NNN}
source: figma
figma_file_key: {key}
exported: {today}
index.md is the lifecycle artifact (type design). PNGs are binary assets tracked by git but not by wb.publish.
Do Not
- Hardcode a Figma access token. MCP server reads its own credentials per-workbench.
- Export private / archived frames. Respect naming convention.
- Overwrite exported PNGs without
-v2/-v3suffix.