@hegemonart/get-design-done 1.0.7 → 1.13.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +82 -0
  4. package/README.md +57 -19
  5. package/SKILL.md +6 -4
  6. package/agents/design-authority-watcher.md +208 -0
  7. package/agents/design-context-builder.md +3 -3
  8. package/agents/design-discussant.md +1 -1
  9. package/agents/design-figma-writer.md +8 -8
  10. package/agents/design-update-checker.md +117 -0
  11. package/agents/token-mapper.md +1 -1
  12. package/connections/claude-design.md +0 -1
  13. package/connections/connections.md +10 -23
  14. package/connections/figma.md +81 -39
  15. package/connections/pinterest.md +0 -1
  16. package/hooks/hooks.json +8 -0
  17. package/hooks/update-check.sh +238 -0
  18. package/package.json +1 -1
  19. package/reference/authority-feeds.md +72 -0
  20. package/reference/schemas/authority-snapshot.schema.json +42 -0
  21. package/reference/schemas/config.schema.json +4 -0
  22. package/reference/schemas/marketplace.schema.json +2 -2
  23. package/reference/schemas/plugin.schema.json +1 -1
  24. package/scripts/tests/test-authority-rejected-kinds.sh +58 -0
  25. package/scripts/tests/test-authority-watcher-diff.sh +109 -0
  26. package/scripts/validate-schemas.cjs +18 -1
  27. package/skills/audit/SKILL.md +11 -1
  28. package/skills/check-update/SKILL.md +133 -0
  29. package/skills/complete-cycle/SKILL.md +10 -0
  30. package/skills/design/SKILL.md +5 -5
  31. package/skills/discover/SKILL.md +2 -2
  32. package/skills/explore/SKILL.md +2 -2
  33. package/skills/health/SKILL.md +10 -0
  34. package/skills/help/SKILL.md +10 -0
  35. package/skills/progress/SKILL.md +10 -0
  36. package/skills/reflect/SKILL.md +1 -0
  37. package/skills/scan/SKILL.md +9 -19
  38. package/skills/ship/SKILL.md +10 -0
  39. package/skills/watch-authorities/SKILL.md +82 -0
  40. package/connections/figma-writer.md +0 -139
@@ -0,0 +1,117 @@
1
+ ---
2
+ name: design-update-checker
3
+ description: Cold-path enrichment agent for /gdd:check-update --prompt. Reads .design/update-cache.json plus a release body supplied in the prompt, classifies the delta (major|minor|patch|off-cadence), and returns a 3-5-line human-friendly "what this release changes for you" summary. Does not write any file. Haiku-tier summarizer per Phase 10.1 D-14/D-18.
4
+ tools: Read, Grep, Glob
5
+ color: yellow
6
+ model: haiku
7
+ default-tier: haiku
8
+ tier-rationale: "Pure summarization + classification over a bounded 500-char input; Haiku is correct tier per Phase 10.1 D-14 table (Haiku = verifiers/checkers/summarizers)"
9
+ parallel-safe: always
10
+ typical-duration-seconds: 8
11
+ reads-only: true
12
+ writes: []
13
+ ---
14
+
15
+ @reference/shared-preamble.md
16
+
17
+ # design-update-checker
18
+
19
+ ## Role
20
+
21
+ You are the `design-update-checker` agent. `/gdd:check-update --prompt` spawns you AFTER the hot-path SessionStart hook has already classified the semver delta and written `.design/update-cache.json`. Your job is to turn the raw release body into a short, user-facing narrative: "here are the 2-3 things this release changes for *you* (i.e. someone running get-design-done on a real project)."
22
+
23
+ You have zero session memory. One invocation = one release summarized. Everything you need is in the prompt plus the files listed in `<required_reading>`.
24
+
25
+ **Return inline text only — do NOT write any file.** The spawning skill captures your response and displays it inline. Mirrors the `design-advisor` / `design-plan-checker` contract.
26
+
27
+ ---
28
+
29
+ ## Required Reading
30
+
31
+ Before producing output you MUST read:
32
+
33
+ 1. `.design/update-cache.json` — canonical delta classification, `current_tag`, `latest_tag`, `changelog_excerpt` (up to 500 chars of the release body). Written by `hooks/update-check.sh` (Phase 13.3 plan 02).
34
+ 2. Any `release_body` string supplied in the spawning prompt context — may be fuller than the 500-char cache excerpt. Prefer it over `changelog_excerpt` when both are present.
35
+
36
+ If `.design/update-cache.json` does not exist, return exactly:
37
+
38
+ > No update cache found. Run `/gdd:check-update --refresh` first.
39
+
40
+ …and stop. Do not attempt to fetch or synthesize without the cache.
41
+
42
+ ---
43
+
44
+ ## Inputs
45
+
46
+ From the spawning prompt (`/gdd:check-update --prompt` in plan 13.3-04) you receive:
47
+
48
+ | Field | Type | Example | Source |
49
+ |-------|------|---------|--------|
50
+ | `current_tag` | string | `v1.0.7` | installed plugin version |
51
+ | `latest_tag` | string | `v1.0.7.3` | GitHub Releases latest tag |
52
+ | `delta` | enum | `major` \| `minor` \| `patch` \| `off-cadence` | pre-classified by the hot-path hook per D-10 |
53
+ | `release_body` | string (markdown) | release-notes markdown, up to a few thousand chars | optional; fuller than the cached excerpt |
54
+
55
+ When `release_body` is absent, fall back to `changelog_excerpt` from the cache. When both are missing, emit the fallback message above.
56
+
57
+ ---
58
+
59
+ ## Output contract
60
+
61
+ Return inline text shaped exactly like this (3–5 lines of prose, no fences, no YAML, no headings):
62
+
63
+ ```
64
+ Update: {current_tag} → {latest_tag} ({delta})
65
+
66
+ What changed for you:
67
+ - {bullet 1 — concrete user impact}
68
+ - {bullet 2 — concrete user impact}
69
+ - {bullet 3 — optional}
70
+
71
+ Run `/gdd:update` to install, or `/gdd:check-update --dismiss` to hide this nudge until the next release.
72
+ ```
73
+
74
+ Bullets must name concrete user impact (new command, changed behavior, fixed bug, removed feature), not internal architecture. Cap at 3 bullets. Do not speculate beyond what the release body explicitly says.
75
+
76
+ **Examples of good bullets:**
77
+ - `- Adds /gdd:check-update for on-demand release polling`
78
+ - `- Fixes SessionStart hook crash when curl is missing`
79
+ - `- Removes deprecated /gdd:old-command — use /gdd:new-command instead`
80
+
81
+ **Examples of bad bullets (do not produce these):**
82
+ - `- Refactors internal cache module` (internal; not a user-facing impact)
83
+ - `- Probably improves performance` (speculation — release body did not say so)
84
+ - `- Updates dependencies` (user-irrelevant unless it changes behavior)
85
+
86
+ ---
87
+
88
+ ## Classification boundary
89
+
90
+ Do NOT reclassify the delta. The hot-path script (`hooks/update-check.sh`) already wrote `delta` into `.design/update-cache.json` per D-10 (4-segment semver compare). Echo the incoming delta verbatim.
91
+
92
+ If the incoming delta looks wrong given the release body (e.g. body headlines a breaking change but `delta` is `patch`), note the discrepancy in a single inline line after the bullets — but do **not** override the field. Example:
93
+
94
+ > Note: release notes describe a breaking change; cached delta is `patch`. Consider `/gdd:check-update --refresh` to re-verify.
95
+
96
+ ---
97
+
98
+ ## Do Not
99
+
100
+ - Do not read `.design/config.json` — dismissal state is for the skill/hook, not you.
101
+ - Do not fetch from GitHub or any URL — the cache is the source of truth. (You have no `WebFetch` / `Bash` / `Write` tool.)
102
+ - Do not write `.design/update-available.md` — that is the hot-path hook's responsibility.
103
+ - Do not reformat the release body as-is. Your job is to compress + reframe, not echo.
104
+ - Do not invent bullets not grounded in the release body text.
105
+ - Do not exceed 3 bullets or 5 total content lines.
106
+
107
+ ---
108
+
109
+ ## Completion marker
110
+
111
+ Last line of your response MUST be:
112
+
113
+ ```
114
+ ## UPDATE-CHECKER COMPLETE
115
+ ```
116
+
117
+ The spawning skill greps for this marker to confirm you finished successfully. Emit it even on the "no cache" fallback path.
@@ -63,7 +63,7 @@ grep -rEn "box-shadow\s*:|shadow-(sm|md|lg|xl|2xl)" src/ --include="*.css" --inc
63
63
 
64
64
  ### Figma augmentation
65
65
 
66
- If STATE.md `<connections>` has `figma: available`, call `mcp__figma-desktop__get_variable_defs` to augment with named Figma variables.
66
+ If STATE.md `<connections>` has `figma: available`, call `mcp__figma__get_variable_defs` to augment with named Figma variables.
67
67
 
68
68
  ## Output Format — `.design/map/tokens.md`
69
69
 
@@ -146,7 +146,6 @@ refero: not_configured
146
146
  preview: available
147
147
  storybook: not_configured
148
148
  chromatic: not_configured
149
- figma_writer: not_configured
150
149
  graphify: not_configured
151
150
  pinterest: not_configured
152
151
  claude_design: available
@@ -8,12 +8,11 @@ This directory contains connection specifications for external tools and MCPs th
8
8
 
9
9
  | Connection | Status | Spec File | Notes |
10
10
  |-----------|--------|-----------|-------|
11
- | Figma | Active | [`connections/figma.md`](connections/figma.md) | Uses `mcp__figma-desktop__*` tools (official Figma Desktop MCP) |
11
+ | Figma | Active | [`connections/figma.md`](connections/figma.md) | Uses `mcp__figma__*` tools (remote Figma MCP; reads + writes) |
12
12
  | Refero | Active | [`connections/refero.md`](connections/refero.md) | Uses `mcp__refero__*` tools (verify names via ToolSearch) |
13
13
  | Preview | Active | [`connections/preview.md`](connections/preview.md) | Uses `mcp__Claude_Preview__*` tools |
14
14
  | Storybook | Active | [`connections/storybook.md`](connections/storybook.md) | HTTP probe: `localhost:6006/index.json` |
15
15
  | Chromatic | Active | [`connections/chromatic.md`](connections/chromatic.md) | CLI: `npx chromatic`; env: `CHROMATIC_PROJECT_TOKEN` |
16
- | Figma Writer | Active | [`connections/figma-writer.md`](connections/figma-writer.md) | Uses `mcp__figma__use_figma` (remote MCP) |
17
16
  | Graphify | Active | [`connections/graphify.md`](connections/graphify.md) | CLI: `graphify`; `gsd-tools graphify *` |
18
17
  | Pinterest | Active | [`connections/pinterest.md`](connections/pinterest.md) | `mcp__mcp-pinterest__*` tools (ToolSearch-only probe; headless scraping, no API key) |
19
18
  | Claude Design | Active | [`connections/claude-design.md`](connections/claude-design.md) | No MCP — bundle file probe; enables `/gdd:handoff` pipeline + bidirectional write-back via figma-writer |
@@ -26,12 +25,11 @@ Each cell describes what the connection contributes at that pipeline stage, or `
26
25
 
27
26
  | Connection | scan | discover | plan | design | verify |
28
27
  |-----------|------|----------|------|--------|--------|
29
- | Figma | token augmentation via `get_variable_defs` (CONN-03) | decisions pre-populate via `get_variable_defs` (CONN-04) | — | | — |
28
+ | Figma | token augmentation via `get_variable_defs` (CONN-03) | decisions pre-populate via `get_variable_defs` (CONN-04) | — | write tokens/annotations/Code Connect via `use_figma` (FWR-01..04) | — |
30
29
  | Refero | — | reference search via `mcp__refero__search`; fallback → awesome-design-md (CONN-05) | — | — | — |
31
30
  | Preview | — | — | — | — | screenshots for `? VISUAL` checks (VIS-02) |
32
31
  | Storybook | — | component inventory (STB-01) | change-risk via story count (STB-02) | `.stories.tsx` stub (STB-03) | a11y per story (STB-02) |
33
32
  | Chromatic | — | — | change-risk scoping (CHR-02) | — | visual delta narration (CHR-01) |
34
- | Figma Writer | — | — | — | write tokens/annotations/Code Connect (FWR-01..04) | — |
35
33
  | Graphify | — | — | dependency scoping (GRF-03) | — | orphan detection (GRF-04) |
36
34
  | Pinterest | probe only | visual reference search via `pinterest_search`; fallback → Refero → awesome-design-md | — | — | — |
37
35
  | Claude Design | bundle probe → `claude_design: available` | synthesizer handoff mode — parses bundle → D-XX decisions; discussant `--from-handoff` confirms | — (skipped in handoff) | — (skipped in handoff) | Handoff Faithfulness section; bidirectional write-back via figma-writer `implementation-status` mode |
@@ -75,16 +73,18 @@ refero: not_configured
75
73
 
76
74
  **Figma probe (execute at stage entry, after reading STATE.md):**
77
75
 
76
+ One probe covers both reads and writes — the remote Figma MCP is a single server exposing `get_metadata`, `get_variable_defs`, `get_design_context`, `get_screenshot`, and `use_figma` together.
77
+
78
78
  ```
79
79
  Step A1 — ToolSearch check:
80
- ToolSearch({ query: "select:mcp__figma-desktop__get_metadata", max_results: 1 })
80
+ ToolSearch({ query: "select:mcp__figma__get_metadata", max_results: 1 })
81
81
  → Empty result → figma: not_configured (skip all Figma steps)
82
82
  → Non-empty result → proceed to Step A2
83
83
 
84
84
  Step A2 — Live tool call:
85
- call mcp__figma-desktop__get_metadata
86
- → Success → figma: available
87
- → Error → figma: unavailable (skip all Figma steps)
85
+ call mcp__figma__get_metadata
86
+ → Success → figma: available (reads AND use_figma writes both available)
87
+ → Error → figma: unavailable (skip all Figma steps)
88
88
 
89
89
  Write figma status to STATE.md <connections>.
90
90
  ```
@@ -156,19 +156,6 @@ Write chromatic status to STATE.md <connections>.
156
156
 
157
157
  Note: First Chromatic run has no baseline — all stories become new snapshots. This is expected; it establishes the baseline.
158
158
 
159
- **Figma Writer probe (execute before any write operation):**
160
-
161
- ```
162
- Step R1 — ToolSearch check:
163
- ToolSearch({ query: "mcp__figma__use_figma", max_results: 1 })
164
- → Empty result → figma_writer: not_configured
165
- → Non-empty result → figma_writer: available
166
-
167
- Write figma_writer status to STATE.md <connections>.
168
- ```
169
-
170
- Note: figma_writer is a separate connection key from figma (desktop). Both can be active simultaneously. There is no `unavailable` state for figma_writer — the ToolSearch-only probe cannot detect auth failures; those surface at execution time.
171
-
172
159
  **Graphify probe (execute at agent entry, before using graph):**
173
160
 
174
161
  ```
@@ -189,7 +176,7 @@ Write graphify status to STATE.md <connections>.
189
176
 
190
177
  **Graceful degradation required:** stages MUST continue when a connection is `unavailable` or `not_configured`. Skip connection-dependent steps. If a missing connection prevents a `must_have` from being satisfied, append a `<blocker>` to `.design/STATE.md` and continue.
191
178
 
192
- For full per-connection fallback details, see the spec files: [`connections/figma.md`](connections/figma.md), [`connections/refero.md`](connections/refero.md), [`connections/preview.md`](connections/preview.md), [`connections/storybook.md`](connections/storybook.md), [`connections/chromatic.md`](connections/chromatic.md), [`connections/figma-writer.md`](connections/figma-writer.md), and [`connections/graphify.md`](connections/graphify.md).
179
+ For full per-connection fallback details, see the spec files: [`connections/figma.md`](connections/figma.md), [`connections/refero.md`](connections/refero.md), [`connections/preview.md`](connections/preview.md), [`connections/storybook.md`](connections/storybook.md), [`connections/chromatic.md`](connections/chromatic.md), and [`connections/graphify.md`](connections/graphify.md).
193
180
 
194
181
  ---
195
182
 
@@ -203,7 +190,7 @@ To add a new connection to the pipeline:
203
190
 
204
191
  3. **Update the Capability Matrix.** Add a row for the new connection. Mark the stages it feeds with a short capability noun; use `—` for stages it does not affect.
205
192
 
206
- 4. **Declare the MCP.** If the connection uses an MCP server, ensure the server is declared in `.claude-plugin/plugin.json` or documented as a user-supplied MCP in the spec file. For read-only MCP connections, use `connections/figma.md` as the model. For remote MCP write connections, use `connections/figma-writer.md` as the model.
193
+ 4. **Declare the MCP.** If the connection uses an MCP server, ensure the server is declared in `.claude-plugin/plugin.json` or documented as a user-supplied MCP in the spec file. For read+write remote MCPs, use `connections/figma.md` as the model. For read-only remote MCPs with headless / API-key-free setup, use `connections/pinterest.md`.
207
194
 
208
195
  5. **Wire into stage skills (Phase 2+ work).** Update the relevant stage `SKILL.md` files to probe the connection at entry and write its status to `.design/STATE.md <connections>`.
209
196
 
@@ -1,6 +1,6 @@
1
1
  # Figma MCP — Connection Specification
2
2
 
3
- This file is the connection specification for the official Figma Desktop MCP within the get-design-done pipeline. It provides the setup guide, tool inventory, per-stage usage, probe pattern, fallback behavior, and anti-patterns. See `connections/connections.md` for the full connection index and capability matrix.
3
+ This file is the connection specification for the Figma MCP (remote, read + write) within the get-design-done pipeline. One server exposes both read tools (`get_metadata`, `get_design_context`, `get_variable_defs`, `get_screenshot`) and the write tool `use_figma`. See `connections/connections.md` for the full connection index and capability matrix.
4
4
 
5
5
  ---
6
6
 
@@ -8,49 +8,77 @@ This file is the connection specification for the official Figma Desktop MCP wit
8
8
 
9
9
  **Prerequisites:**
10
10
 
11
- - Figma desktop app installed and running
12
- - Dev Mode enabled in the Figma desktop app (File menu Enable Dev Mode, or toggle in the toolbar)
11
+ - A Figma account (OAuth on first use at `mcp.figma.com`).
12
+ - Figma file access for any file you intend to read or write. No desktop app install required.
13
13
 
14
14
  **Install command (Claude Code):**
15
15
 
16
16
  ```
17
- claude mcp add --transport http figma-desktop http://127.0.0.1:3845/mcp
17
+ claude mcp add figma --transport http https://mcp.figma.com/v1/sse
18
18
  ```
19
19
 
20
- After running this command, restart the Claude Code session. The MCP server connects via HTTP to the Figma desktop app's local MCP endpoint.
20
+ After running this command, restart the Claude Code session. On first use, Claude Code prompts you to complete the OAuth flow at `mcp.figma.com`. One `claude mcp add` unlocks both reads and writes — there is no separate writer MCP.
21
21
 
22
22
  **Verification:**
23
23
 
24
24
  After session restart, run:
25
25
 
26
26
  ```
27
- ToolSearch({ query: "figma-desktop", max_results: 10 })
27
+ ToolSearch({ query: "select:mcp__figma__get_metadata,mcp__figma__use_figma", max_results: 2 })
28
28
  ```
29
29
 
30
- Expect non-empty results listing `mcp__figma-desktop__*` tools. If results are empty, the desktop app is not running or Dev Mode is not enabled fix both and restart.
30
+ Expect two non-empty results. If results are empty, the remote MCP is not registered re-run the install command above and restart the session.
31
31
 
32
- **Warning wrong MCP confusion:**
32
+ **Migration from the legacy dual-MCP setup:**
33
33
 
34
- This spec targets the **official Figma Desktop MCP** (`mcp__figma-desktop__*` prefix, server name `figma-desktop`, HTTP transport).
34
+ Earlier versions of this plugin used two separate Figma MCPs `figma-desktop` (local HTTP, read-only) and `figma` (remote, writes-only). As of **v1.0.7.1**, the remote MCP exposes full read parity and is the single supported Figma connection. If you installed `figma-desktop` previously, you can remove it:
35
35
 
36
- Do NOT confuse with the southleft `figma-console-mcp` package (registered as `"figma-console"` in `~/.claude/mcp.json`, uses `figma_*` prefix). Both can be active simultaneously. The pipeline uses `mcp__figma-desktop__*` exclusively — it is stable, official, and requires no external package dependency beyond the Figma desktop app.
36
+ ```
37
+ claude mcp remove figma-desktop
38
+ ```
39
+
40
+ No data is lost — the remote MCP reads the same Figma files.
37
41
 
38
42
  ---
39
43
 
40
44
  ## Tools
41
45
 
42
- All tools use the `mcp__figma-desktop__` prefix.
46
+ All tools use the `mcp__figma__` prefix (remote MCP).
43
47
 
44
- | Tool | Full name | Returns | Phase 4 use |
45
- |------|-----------|---------|-------------|
46
- | `get_variable_defs` | `mcp__figma-desktop__get_variable_defs` | Variable collection tree: collection ID, mode names, variable names (hierarchical, e.g. `colors/primary/500`), resolved values (hex for COLOR, float for FLOAT), descriptions, scopes | **In scope** — scan: token augmentation (CONN-03); discover: decisions pre-population (CONN-04) |
47
- | `get_design_context` | `mcp__figma-desktop__get_design_context` | Structured React+Tailwind component tree of the current Figma selection | **In scope (secondary)** — discover: existing design decisions for established Figma systems |
48
- | `get_screenshot` | `mcp__figma-desktop__get_screenshot` | Screenshot image of the selected Figma layer or frame | Out of scope Phase 4 |
49
- | `get_metadata` | `mcp__figma-desktop__get_metadata` | Lightweight XML outline: layer IDs, names, types, position/size. Works with no selection open. | **In scope** — used as the availability probe (no file must be open) |
50
- | `get_code_connect_map` | `mcp__figma-desktop__get_code_connect_map` | Maps Figma component instances to code implementations (file paths, framework labels) | Out of scope Phase 4 |
51
- | `create_design_system_rules` | `mcp__figma-desktop__create_design_system_rules` | Generates rule files for design system alignment during code generation | Out of scope Phase 4 |
48
+ | Tool | Full name | Returns | Pipeline use |
49
+ |------|-----------|---------|--------------|
50
+ | `get_metadata` | `mcp__figma__get_metadata` | Lightweight outline: node IDs, names, types, position/size. Also the availability probe. | **In scope** — probe (works without a selection); metadata snapshot for figma-write proposal review |
51
+ | `get_variable_defs` | `mcp__figma__get_variable_defs` | Variable collection tree: collection ID, mode names, variable names (hierarchical, e.g. `colors/primary/500`), resolved values, descriptions, scopes | **In scope** — scan: token augmentation (CONN-03); discover: decisions pre-population (CONN-04); figma-write: tokenize mode source |
52
+ | `get_design_context` | `mcp__figma__get_design_context` | Structured React+Tailwind component tree of the current Figma selection | **In scope (secondary)** discover: existing design decisions for established Figma systems |
53
+ | `get_screenshot` | `mcp__figma__get_screenshot` | Screenshot image of the selected Figma layer or frame | **In scope (opt-in)** — visual reference capture for discovery; not invoked by default |
54
+ | `use_figma` | `mcp__figma__use_figma` | Write operation result | **In scope** figma-write: all three modes (annotate, tokenize, mappings) |
55
+ | `get_code_connect_map` | `mcp__figma__get_code_connect_map` | Maps Figma component instances to code file paths | Out of scope this phase (reserved for future Code Connect work) |
56
+ | `add_code_connect_map` | `mcp__figma__add_code_connect_map` | Adds Code Connect mapping entries | Out of scope this phase (reserved for future Code Connect work) |
57
+ | `create_design_system_rules` | `mcp__figma__create_design_system_rules` | Generates rule files for design system alignment during code generation | Out of scope this phase |
52
58
 
53
- `get_metadata` is preferred for probing because it works without a file or selection open, keeping the probe lightweight. `get_variable_defs` is the primary workhorse for token extraction and decisions pre-population.
59
+ `get_metadata` is preferred for probing because it works without a file or selection open, keeping the probe lightweight. `get_variable_defs` is the primary workhorse for token extraction and decisions pre-population. `use_figma` is the single entry point for every write.
60
+
61
+ ---
62
+
63
+ ## Writes (`use_figma`)
64
+
65
+ `use_figma` is the single write tool. The `design-figma-writer` agent (`agents/design-figma-writer.md`) wraps it in a **proposal → confirm** UX — it builds a numbered operation list and presents it to the user before executing any write. The user must confirm before `use_figma` is called.
66
+
67
+ ### Three Modes
68
+
69
+ The figma-writer operates in one of three modes per invocation:
70
+
71
+ | Mode | Description | Source data | Figma target |
72
+ |------|-------------|-------------|--------------|
73
+ | `annotate` | Write design-decision annotations onto Figma layer comments | D-XX decisions from DESIGN-CONTEXT.md | Layer comments on affected frames/components |
74
+ | `tokenize` | Replace hard-coded color/spacing/type literals with Figma variable references | Color/spacing/typography values from DESIGN-CONTEXT.md; existing variables from `get_variable_defs` | Variable bindings on layer fill/stroke/spacing properties |
75
+ | `mappings` | Write Code Connect mappings linking component instances to code file paths | Component names and file paths from DESIGN-CONTEXT.md | Code Connect entries on Figma component nodes |
76
+
77
+ ### Write-Time Safety
78
+
79
+ 1. **`--dry-run`** — emit the full operation list without calling `use_figma`. Safe to run on production Figma files.
80
+ 2. **`--confirm-shared`** — when the proposal includes shared team-library components, the agent halts and requires this flag. Prevents accidental team-wide token modification.
81
+ 3. **Sequential, not atomic execution.** If one operation fails mid-sequence, the agent logs the error and continues with remaining operations. The summary lists all failures for manual follow-up. The Figma file may be left in a partially-updated state — this is a property of `use_figma`, not of the wrapper.
54
82
 
55
83
  ---
56
84
 
@@ -59,9 +87,11 @@ All tools use the `mcp__figma-desktop__` prefix.
59
87
  | Stage | Skill/Agent | Tool used | Purpose |
60
88
  |-------|------------|-----------|---------|
61
89
  | scan | `skills/scan/SKILL.md` | `get_variable_defs` | Token augmentation — supplements grep-based CSS token extraction with Figma variable definitions (CONN-03) |
62
- | discover | `agents/design-context-builder.md` | `get_variable_defs` | Decisions pre-population — pre-fills D-XX color/spacing/typography decisions from Figma variables before the interview (CONN-04) |
63
- | plan | | — | Not currently used |
64
- | verify | | | Not currently used |
90
+ | discover | `agents/design-context-builder.md` | `get_variable_defs`, `get_design_context` | Decisions pre-population — pre-fills D-XX color/spacing/typography decisions from Figma variables before the interview (CONN-04) |
91
+ | design | `skills/design/SKILL.md` (dispatch only) | — | Offer to spawn design-figma-writer after design-executor completes, when `figma: available` |
92
+ | figma-write | `agents/design-figma-writer.md` | `use_figma` (writes), `get_metadata` + `get_variable_defs` (proposal-time reads) | Write design decisions back to Figma in three modes (annotate / tokenize / mappings) |
93
+ | plan | — | — | Not used |
94
+ | verify | — | — | Not used |
65
95
 
66
96
  Both scan and discover call `get_variable_defs` with no explicit selection to retrieve all variables in the active Figma file. If no file is open, the call errors and the stage falls back to its non-Figma path.
67
97
 
@@ -69,29 +99,31 @@ Both scan and discover call `get_variable_defs` with no explicit selection to re
69
99
 
70
100
  ## Availability Probe
71
101
 
72
- **Call ToolSearch first — always.** In Claude Code sessions with many MCP servers, `mcp__figma-desktop__*` tools may be in the deferred tool set (not loaded into context at session start). Calling a deferred tool directly fails silently or errors. ToolSearch loads the tools into context and confirms their presence in a single call.
102
+ **Call ToolSearch first — always.** In Claude Code sessions with many MCP servers, `mcp__figma__*` tools may be in the deferred tool set (not loaded into context at session start). Calling a deferred tool directly fails silently or errors. ToolSearch loads the tools into context and confirms their presence in a single call.
103
+
104
+ One probe covers both reads and writes — the remote MCP is a single server that exposes `get_metadata`, `get_variable_defs`, `get_design_context`, `get_screenshot`, and `use_figma` together. Presence of `get_metadata` implies `use_figma` is available on the same server.
73
105
 
74
106
  **Figma probe sequence:**
75
107
 
76
108
  ```
77
109
  Step 1 — ToolSearch check:
78
- ToolSearch({ query: "select:mcp__figma-desktop__get_metadata", max_results: 1 })
79
- → Empty result → figma: not_configured (MCP not registered or app not running)
110
+ ToolSearch({ query: "select:mcp__figma__get_metadata", max_results: 1 })
111
+ → Empty result → figma: not_configured (MCP not registered; OAuth not completed)
80
112
  → Non-empty result → proceed to Step 2
81
113
 
82
114
  Step 2 — Live tool call:
83
- call mcp__figma-desktop__get_metadata
84
- → Success → figma: available
85
- → Error → figma: unavailable
115
+ call mcp__figma__get_metadata
116
+ → Success → figma: available (reads AND writes both available on this server)
117
+ → Error → figma: unavailable (auth expired, rate-limited, or no file open)
86
118
  ```
87
119
 
88
- Write the result to `.design/STATE.md <connections>` immediately after probing.
120
+ Write the result to `.design/STATE.md` `<connections>` immediately after probing.
89
121
 
90
122
  ---
91
123
 
92
124
  ## Fallback Behavior
93
125
 
94
- When figma is `not_configured` or `unavailable`, stages degrade gracefully — no error is raised.
126
+ When `figma` is `not_configured` or `unavailable`, stages degrade gracefully — no error is raised.
95
127
 
96
128
  **scan stage:**
97
129
 
@@ -106,7 +138,13 @@ When figma is `not_configured` or `unavailable`, stages degrade gracefully — n
106
138
  - Populate D-XX decisions via interview only (manual elicitation from the user)
107
139
  - DESIGN-CONTEXT.md omits the "Token decisions pre-populated from Figma variables" note
108
140
 
109
- Neither stage appends a `<blocker>` for a missing Figma connection — Figma is an enhancement, not a requirement. If a `must_have` explicitly requires Figma data, THEN append a blocker.
141
+ **design stage + figma-write:**
142
+
143
+ - `figma: not_configured` or `figma: unavailable` → skip the figma-write dispatch offer entirely (no prompt, no output)
144
+ - `figma: available` → offer opt-in prompt after design-executor completes
145
+ - Standalone `/gdd:figma-write` invocation against `figma: not_configured` → STOP with install note
146
+
147
+ Stages do not append a `<blocker>` for a missing Figma connection — Figma is an enhancement, not a requirement. If a `must_have` explicitly requires Figma data (reads or writes), THEN append a blocker.
110
148
 
111
149
  ---
112
150
 
@@ -125,11 +163,11 @@ refero: not_configured
125
163
 
126
164
  | Value | Meaning |
127
165
  |-------|---------|
128
- | `available` | `get_metadata` returned a successful response |
129
- | `unavailable` | Tool is in the session but errored (app offline, no file open, rate-limited) |
130
- | `not_configured` | ToolSearch returned empty for `figma-desktop` — MCP not registered |
166
+ | `available` | `get_metadata` returned a successful response; both reads and `use_figma` writes are expected to work |
167
+ | `unavailable` | Tool is in the session but errored (auth expired, no file open, rate-limited) |
168
+ | `not_configured` | ToolSearch returned empty for `mcp__figma__*` — MCP not registered |
131
169
 
132
- The `<connections>` schema is minimal by design. Traceability of which outputs came from Figma is handled via source annotations in DESIGN.md (`source: figma-variables`) and DESIGN-CONTEXT.md ("pre-populated from Figma variables"), not via richer STATE.md fields.
170
+ The `<connections>` schema is minimal by design. Traceability of which outputs came from Figma is handled via source annotations in DESIGN.md (`source: figma-variables`) and DESIGN-CONTEXT.md ("pre-populated from Figma variables"), not via richer STATE.md fields. There is no separate `figma_writer:` key — one remote server, one status.
133
171
 
134
172
  ---
135
173
 
@@ -137,10 +175,14 @@ The `<connections>` schema is minimal by design. Traceability of which outputs c
137
175
 
138
176
  - **`get_variable_defs` returns resolved values, not alias chains.** If a semantic token (`colors/semantic/brand`) aliases a primitive (`colors/blue/500`), only the resolved hex is returned. When recording variables in DESIGN.md, use the variable NAME alongside the hex: `colors/semantic/brand = #3B82F6`. Add a note: "resolved value — may alias a primitive; verify in Figma if the token layer matters."
139
177
 
140
- - **`get_variable_defs` requires an open Figma file.** If no file is open in the desktop app, the call errors. The probe falls to `unavailable` in this case — the stage skips Figma steps and continues with non-Figma fallbacks.
178
+ - **`get_variable_defs` requires an open Figma file.** If no file is open or none is in the current context, the call errors. The probe falls to `unavailable` in this case — the stage skips Figma steps and continues with non-Figma fallbacks.
141
179
 
142
180
  - **Multi-mode variables (Light/Dark).** Variables may carry values for multiple modes. When present, extract both: `#3B82F6 (light) / #60A5FA (dark)`. DESIGN.md can note dark-mode token existence in the color section.
143
181
 
144
- - **Deferred-tool loading.** Always call `ToolSearch` before any `mcp__figma-desktop__*` tool invocation. This applies at every stage entry, even if Figma was `available` in a previous run — tool availability can change between sessions.
182
+ - **Deferred-tool loading.** Always call `ToolSearch` before any `mcp__figma__*` tool invocation. This applies at every stage entry, even if Figma was `available` in a previous run — tool availability can change between sessions.
183
+
184
+ - **All writes require user confirmation.** The proposal→confirm UX in `design-figma-writer` ensures the user reviews all operations before any write is executed. There is no auto-approve mode. See `agents/design-figma-writer.md` for the proposal contract.
185
+
186
+ - **OAuth re-auth.** If `get_metadata` starts returning auth errors after previously working, the OAuth session expired. Re-running the MCP install command is not required — the session refreshes on the next tool call that returns a `reauth` hint. A clean `claude mcp remove figma && claude mcp add ...` is always safe.
145
187
 
146
- - **Wrong-MCP confusion.** This spec covers `mcp__figma-desktop__*` (official Figma Desktop MCP). The southleft `figma-console-mcp` uses `figma_*` prefix and serves different use cases. Do not mix them. If ToolSearch returns results prefixed `figma_` but not `mcp__figma-desktop__`, the Figma Desktop MCP is still not configured.
188
+ - **No `figma-desktop` fallback.** As of v1.0.7.1 the desktop MCP is no longer a supported read path. If you need offline/no-network reads for some reason, run the pipeline's non-Figma fallbacks (grep-based token extraction, interview-only decisions).
@@ -123,7 +123,6 @@ refero: not_configured
123
123
  preview: available
124
124
  storybook: not_configured
125
125
  chromatic: not_configured
126
- figma_writer: not_configured
127
126
  graphify: not_configured
128
127
  pinterest: available
129
128
  claude_design: not_configured
package/hooks/hooks.json CHANGED
@@ -8,6 +8,14 @@
8
8
  "command": "bash \"${CLAUDE_PLUGIN_ROOT}/scripts/bootstrap.sh\""
9
9
  }
10
10
  ]
11
+ },
12
+ {
13
+ "hooks": [
14
+ {
15
+ "type": "command",
16
+ "command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/update-check.sh\""
17
+ }
18
+ ]
11
19
  }
12
20
  ],
13
21
  "PreToolUse": [