@hegemonart/get-design-done 1.14.3 → 1.14.5

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.
@@ -67,16 +67,19 @@ All tools use the `mcp__Claude_Preview__` prefix.
67
67
 
68
68
  **Preview probe sequence:**
69
69
 
70
+ > **Execution-context requirement:** The probe and the subsequent `preview_*` calls must run in the **same execution context**. If the probe runs in the orchestrator and the calls run inside a spawned subagent, the subagent's tool allowlist may block the calls even when the probe succeeds. Run the probe where the calls will actually happen, or ensure the spawned agent's `tools:` frontmatter includes `mcp__Claude_Preview__*` tools.
71
+
70
72
  ```
71
73
  Step P1 — ToolSearch check:
72
74
  ToolSearch({ query: "Claude_Preview", max_results: 5 })
73
- → Empty result → preview: not_configured (skip all Preview steps)
75
+ → Empty result → preview: not_loaded (MCP not registered in this session — skip all Preview steps)
74
76
  → Non-empty result → proceed to Step P2
75
77
 
76
78
  Step P2 — Live tool call:
77
79
  call mcp__Claude_Preview__preview_list
78
- → Success (returns array, even empty) → preview: available
79
- → Error → preview: unavailable
80
+ → Success (returns array, even empty) → preview: available
81
+ → Error containing "permission" or blocked → preview: permission_denied
82
+ → Any other error → preview: unreachable
80
83
  ```
81
84
 
82
85
  Write the result to `.design/STATE.md <connections>` immediately after probing.
@@ -142,8 +145,9 @@ preview: available
142
145
  | Value | Meaning |
143
146
  |-------|---------|
144
147
  | `available` | `preview_list` returned a successful response (array, even empty) |
145
- | `unavailable` | Tool is in the session but errored (no running server, tool timeout, internal error) |
146
- | `not_configured` | ToolSearch returned empty for `Claude_Preview` MCP not registered in this session |
148
+ | `permission_denied` | Tool is in the session (ToolSearch found it) but the live call was rejected by the tool permission layer likely missing from the agent's `tools:` frontmatter |
149
+ | `unreachable` | Tool is in the session but the live call errored for a non-permission reason (no running server, timeout, internal error) |
150
+ | `not_loaded` | ToolSearch returned empty for `Claude_Preview` — MCP not registered in this session |
147
151
 
148
152
  **Which stages probe vs. read:**
149
153
 
@@ -288,8 +288,8 @@ async function main() {
288
288
  process.stdout.write(JSON.stringify(response));
289
289
  return;
290
290
  }
291
- // 80% soft-threshold downgrade (D-03)
292
- if (budget.auto_downgrade_on_cap && (phaseSpend + estCost) >= (0.80 * budget.per_task_cap_usd)) {
291
+ // 80% soft-threshold downgrade (D-03): task-scoped, per reference/model-tiers.md
292
+ if (budget.auto_downgrade_on_cap && estCost >= (0.80 * budget.per_task_cap_usd)) {
293
293
  toolInput._tier_override = 'haiku';
294
294
  toolInput._tier_downgraded = true;
295
295
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hegemonart/get-design-done",
3
- "version": "1.14.3",
3
+ "version": "1.14.5",
4
4
  "description": "A Claude Code plugin for systematic design improvement",
5
5
  "author": "Hegemon",
6
6
  "homepage": "https://github.com/hegemonart/get-design-done",
@@ -56,12 +56,21 @@ skipped_stages: ""
56
56
  </must_haves>
57
57
 
58
58
  <connections>
59
- <!-- Detected at scan entry; updated if connections become available mid-pipeline. -->
59
+ <!-- Detected at scan entry or via /gdd:connections; updated if connections become available mid-pipeline. -->
60
60
  <!-- Format: <connection_name>: <available | unavailable | not_configured> -->
61
+ <!-- Key normalization: hyphens become underscores; leading digits are spelled out (21st-dev → twenty_first). -->
61
62
  figma: not_configured
62
63
  refero: not_configured
64
+ preview: not_configured
65
+ storybook: not_configured
66
+ chromatic: not_configured
67
+ graphify: not_configured
63
68
  pinterest: not_configured
64
69
  claude_design: not_configured
70
+ paper_design: not_configured
71
+ pencil_dev: not_configured
72
+ twenty_first: not_configured
73
+ magic_patterns: not_configured
65
74
  </connections>
66
75
 
67
76
  <blockers>
@@ -81,6 +81,35 @@ When `true`, parallel agents run in dedicated git worktrees. Default: `false` (l
81
81
 
82
82
  Keyed by stage name (`brief`, `explore`, `plan`, `design`, `verify`). Any field above may be overridden per stage.
83
83
 
84
+ ### `connections.skip`
85
+
86
+ Optional array of connection names the user has explicitly opted out of. `/gdd:connections` reads this list and never re-prompts for skipped connections. Users re-enable a skipped connection by invoking `/gdd:connections <name>` directly (bypasses the skip list for that run).
87
+
88
+ ```json
89
+ {
90
+ "connections": {
91
+ "skip": ["pinterest", "graphify"]
92
+ }
93
+ }
94
+ ```
95
+
96
+ Valid names: `figma`, `refero`, `preview`, `storybook`, `chromatic`, `graphify`, `pinterest`, `claude-design`, `paper-design`, `pencil-dev`, `21st-dev`, `magic-patterns`.
97
+
98
+ ### `connections_onboarding` (scratch block)
99
+
100
+ Transient state written by `/gdd:connections` while a setup flow is in progress. Not hand-edited. Shape:
101
+
102
+ ```json
103
+ {
104
+ "connections_onboarding": {
105
+ "started_at": "<ISO 8601>",
106
+ "pending_verification": ["figma", "chromatic"]
107
+ }
108
+ }
109
+ ```
110
+
111
+ `/gdd:connections` deletes this block when `pending_verification` drains. Its presence after a session restart is the signal that a resume is required (the skill jumps straight to verification).
112
+
84
113
  ## How Agents Read The Profile
85
114
 
86
115
  Stages are the only code that read `.design/config.json`. When spawning an agent, the stage:
@@ -76,6 +76,10 @@ function readTelemetryRows() {
76
76
  function aggregate(rows) {
77
77
  const byAgent = new Map();
78
78
  for (const r of rows) {
79
+ // Blocked rows represent a spawn that was denied at the hook — the agent
80
+ // never actually ran, so it must not contribute to spawn counts, cost, or
81
+ // token totals. Skip them here (mirror of the filter in aggregateByPhase).
82
+ if (r.block_reason) continue;
79
83
  const agent = r.agent || 'unknown';
80
84
  if (!byAgent.has(agent)) {
81
85
  byAgent.set(agent, {
@@ -129,6 +133,11 @@ function writeAtomic(filePath, content) {
129
133
  function aggregateByPhase(rows) {
130
134
  const byPhase = {};
131
135
  for (const r of rows) {
136
+ // Blocked rows represent spawns that were denied by the hook — the agent
137
+ // never ran, so their est_cost_usd must not inflate cumulative phase spend.
138
+ // Counting them would make future hard-block and soft-threshold checks
139
+ // stricter than intended on every repeat cap hit.
140
+ if (r.block_reason) continue;
132
141
  const phase = r.phase || 'unknown';
133
142
  byPhase[phase] = (byPhase[phase] || 0) + Number(r.est_cost_usd || 0);
134
143
  }
@@ -0,0 +1,477 @@
1
+ ---
2
+ name: gdd-connections
3
+ description: "Onboarding wizard for external integrations. Probes all 12 connections, recommends based on project type, walks the user through setup (auto-run MCP install or copy-command fallback), writes results to STATE.md <connections>. Re-runnable anytime — not tied to project init. Invoke after /gdd:new-project, or whenever you want to add, inspect, or skip a connection."
4
+ argument-hint: "[list | <connection-name> | --auto]"
5
+ user-invocable: true
6
+ tools: Read, Write, Bash, Glob, Grep, AskUserQuestion, ToolSearch
7
+ ---
8
+
9
+ # /gdd:connections
10
+
11
+ Interactive onboarding for the 12 external integrations the pipeline supports. Replaces "probe silently at scan entry and hope the user noticed" with an explicit "here is what can plug in, here is how."
12
+
13
+ Canonical connection specs live in `connections/*.md`. The capability matrix and probe-pattern spec live in `connections/connections.md`. This skill is the **user-facing front end** for those specs.
14
+
15
+ ---
16
+
17
+ ## Invocation Modes
18
+
19
+ | Command | Behavior |
20
+ |---|---|
21
+ | `/gdd:connections` | Interactive wizard (default). Probes all, shows summary, asks what to configure. |
22
+ | `/gdd:connections list` | Read-only table. Probes all, writes STATE.md, no prompts, exits. |
23
+ | `/gdd:connections <name>` | Jump straight to setup for one connection (e.g. `/gdd:connections figma`). |
24
+ | `/gdd:connections --auto` | CI mode. Probes, writes STATE.md, no prompts, no install attempts. |
25
+
26
+ ---
27
+
28
+ ## State Integration
29
+
30
+ 1. Read `.design/STATE.md` — if missing, that's fine; this skill does not require a pipeline run to be in progress.
31
+ 2. Read `.design/config.json` — if missing, use defaults. If `connections_onboarding` block is present with `pending_verification`, this is a resume — see Step 6.
32
+ 3. Read `connections.skip[]` from config — never re-prompt for skipped connections (user opted out).
33
+ 4. Update `last_checkpoint` in STATE.md at skill exit if STATE.md exists.
34
+
35
+ ---
36
+
37
+ ## Step 1 — Probe all 12 connections
38
+
39
+ Run every probe below in order. MCP probes call `ToolSearch` first (deferred tools fail silently without it). Write every result to `STATE.md <connections>` when done.
40
+
41
+ ### MCP-based probes
42
+
43
+ **figma:**
44
+ ```
45
+ ToolSearch({ query: "select:mcp__figma__get_metadata", max_results: 1 })
46
+ → Empty → figma: not_configured
47
+ → Non-empty → call mcp__figma__get_metadata
48
+ Success → figma: available
49
+ Error → figma: unavailable
50
+ ```
51
+
52
+ **refero:**
53
+ ```
54
+ ToolSearch({ query: "refero", max_results: 5 })
55
+ → Empty → refero: not_configured
56
+ → Non-empty → refero: available
57
+ ```
58
+
59
+ **preview:**
60
+ ```
61
+ ToolSearch({ query: "Claude_Preview", max_results: 5 })
62
+ → Empty → preview: not_configured
63
+ → Non-empty → call mcp__Claude_Preview__preview_list
64
+ Success → preview: available
65
+ Error → preview: unavailable
66
+ ```
67
+
68
+ **pinterest:**
69
+ ```
70
+ ToolSearch({ query: "mcp-pinterest", max_results: 5 })
71
+ → Empty → pinterest: not_configured
72
+ → Non-empty → pinterest: available
73
+ ```
74
+
75
+ **paper-design:**
76
+ ```
77
+ ToolSearch({ query: "mcp__paper", max_results: 5 })
78
+ → Empty → paper_design: not_configured
79
+ → Non-empty → paper_design: available
80
+ ```
81
+
82
+ **21st-dev:**
83
+ ```
84
+ ToolSearch({ query: "mcp__21st", max_results: 5 })
85
+ → Empty → twenty_first: not_configured
86
+ → Non-empty → twenty_first: available
87
+ ```
88
+
89
+ **magic-patterns:**
90
+ ```
91
+ ToolSearch({ query: "mcp__magic_patterns", max_results: 5 })
92
+ → Empty → magic_patterns: not_configured
93
+ → Non-empty → magic_patterns: available
94
+ ```
95
+
96
+ ### Non-MCP probes
97
+
98
+ **storybook** (HTTP):
99
+ ```
100
+ Bash: curl -sf http://localhost:6006/index.json 2>/dev/null
101
+ → Success → storybook: available
102
+ → Fail → curl -sf http://localhost:6006/stories.json 2>/dev/null
103
+ Success → storybook: available
104
+ Fail → storybook: not_configured
105
+ ```
106
+
107
+ **chromatic** (CLI + env):
108
+ ```
109
+ Bash: command -v chromatic >/dev/null 2>&1 || npx --yes chromatic --version 2>/dev/null
110
+ → Fail (non-zero) → chromatic: not_configured
111
+ → Success → check env CHROMATIC_PROJECT_TOKEN
112
+ Empty → chromatic: unavailable
113
+ Set → chromatic: available
114
+ ```
115
+
116
+ **graphify** (CLI + file):
117
+ ```
118
+ Bash: node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" graphify status 2>/dev/null
119
+ → Error or enabled:false → graphify: not_configured
120
+ → enabled:true → check graphify-out/graph.json exists
121
+ Absent → graphify: unavailable
122
+ Present → graphify: available
123
+ ```
124
+
125
+ **pencil-dev** (file probe):
126
+ ```
127
+ Bash: find . -name "*.pen" -not -path "*/node_modules/*" -not -path "*/.git/*" 2>/dev/null | head -1
128
+ → Empty → pencil_dev: not_configured
129
+ → Non-empty → pencil_dev: available
130
+ ```
131
+
132
+ **claude-design** (file probe — handoff bundle):
133
+ ```
134
+ Bash: ls .design/handoff/ 2>/dev/null || find . -maxdepth 3 \
135
+ \( -name "*.claude-design.html" -o -name "*.claude-design.zip" \
136
+ -o -name "claude-design-*.html" \) 2>/dev/null | head -1
137
+ → Empty → claude_design: not_configured
138
+ → Non-empty → claude_design: available
139
+ ```
140
+
141
+ After all 12 probes complete, merge results into STATE.md `<connections>`. Preserve the three-value schema verbatim (`available | unavailable | not_configured`). Do not add new values.
142
+
143
+ ---
144
+
145
+ ## Step 2 — Categorize and build summary
146
+
147
+ For each probe result, assign to one of four buckets:
148
+
149
+ ### Project-hint detection
150
+
151
+ Run once, cache in-memory:
152
+
153
+ ```bash
154
+ # Framework / stack hints
155
+ HAS_TAILWIND=$( ls tailwind.config.* 2>/dev/null | head -1 )
156
+ HAS_STORYBOOK_DIR=$( test -d .storybook && echo yes )
157
+ HAS_PEN_FILES=$( find . -name "*.pen" -not -path "*/node_modules/*" 2>/dev/null | head -1 )
158
+ HAS_REACT=$( grep -l '"react"' package.json 2>/dev/null )
159
+ HAS_FIGMA_HINT=$( grep -r "figma\.com/file" -l . --include="*.md" 2>/dev/null | head -1 )
160
+ ```
161
+
162
+ ### Bucketing rules
163
+
164
+ | Bucket | Criteria |
165
+ |---|---|
166
+ | **available** | probe returned `available` |
167
+ | **recommended** | probe returned `not_configured` AND matches a project hint below |
168
+ | **optional** | probe returned `not_configured` AND no project hint match |
169
+ | **skipped** | name appears in `config.json connections.skip[]` |
170
+ | **unavailable** | probe returned `unavailable` (configured but broken — needs attention) |
171
+
172
+ ### Recommendation mapping
173
+
174
+ | Project hint | Recommend |
175
+ |---|---|
176
+ | `HAS_TAILWIND` or `HAS_FIGMA_HINT` | figma |
177
+ | `HAS_STORYBOOK_DIR` or storybook available | storybook, chromatic |
178
+ | `HAS_PEN_FILES` | pencil-dev |
179
+ | `HAS_REACT` | 21st-dev, magic-patterns |
180
+ | Always | refero, preview |
181
+
182
+ ---
183
+
184
+ ## Step 3 — Print summary table
185
+
186
+ ```
187
+ ━━━ Connections ━━━━━━━━━━━━━━━━━━━━━━━━━━━
188
+ Available (<N>)
189
+ ✓ <name> <one-line detail from probe>
190
+ ...
191
+
192
+ Unavailable (<N>) — configured but not responding
193
+ ✗ <name> <reason>
194
+ ...
195
+
196
+ Recommended for this project (<N>)
197
+ ○ <name> <one-line value prop>
198
+ ...
199
+
200
+ Optional (<N>)
201
+ ○ <name> <one-line value prop>
202
+ ...
203
+
204
+ Skipped by you (<N>)
205
+ — <name> (re-enable: /gdd:connections <name>)
206
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
207
+ ```
208
+
209
+ One-line value props (use verbatim):
210
+
211
+ | Name | Value prop |
212
+ |---|---|
213
+ | figma | design-token extraction, annotations, Code Connect |
214
+ | refero | design reference search for discover stage |
215
+ | preview | live browser screenshots for verify visual checks |
216
+ | storybook | component inventory + per-story a11y |
217
+ | chromatic | visual regression against your Storybook baseline |
218
+ | graphify | knowledge-graph queries over component↔token↔decision |
219
+ | pinterest | visual inspiration collection |
220
+ | claude-design | Claude Design handoff bundle ingestion |
221
+ | paper-design | bidirectional canvas (free tier: 100 calls/week) |
222
+ | pencil-dev | `.pen` spec files as canonical design source |
223
+ | 21st-dev | AI component generator (marketplace search) |
224
+ | magic-patterns | AI component generator (DS-aware) |
225
+
226
+ ---
227
+
228
+ ## Step 4 — Route by mode
229
+
230
+ ### Mode: `list` or `--auto`
231
+
232
+ After printing the summary, write STATE.md, append one-line hint: `Run /gdd:connections to configure.` Emit `## CONNECTIONS COMPLETE`. Exit.
233
+
234
+ ### Mode: `<connection-name>`
235
+
236
+ Skip the top-level AskUserQuestion. Jump directly to Step 5 for that single connection.
237
+
238
+ ### Mode: interactive (default)
239
+
240
+ AskUserQuestion:
241
+
242
+ ```
243
+ question: "What would you like to do?"
244
+ options:
245
+ - "Configure recommended (<N>)" → loop Step 5 over recommended bucket
246
+ - "Pick one by one" → loop Step 5 over all not_configured
247
+ - "Configure all optional" → loop Step 5 over optional bucket
248
+ - "Re-check a specific connection" → prompt for name, run Step 1 for it only
249
+ - "Exit" → emit ## CONNECTIONS COMPLETE, exit
250
+ ```
251
+
252
+ If recommended bucket is empty, swap that option for "Show all 12 and pick."
253
+
254
+ ---
255
+
256
+ ## Step 5 — Per-connection setup screen
257
+
258
+ For each target connection:
259
+
260
+ ### 5.1 Read the spec
261
+
262
+ Read `connections/<name>.md`. Extract:
263
+ - The "Setup" section (prerequisites + install command)
264
+ - The "Contributes at" row from the capability matrix (stages affected)
265
+
266
+ ### 5.2 Present the screen
267
+
268
+ Print:
269
+
270
+ ```
271
+ ┌─ <name> ──────────────────────────────────────
272
+ │ Status: <current probe result>
273
+ │ Contributes: <one-line value prop from Step 3>
274
+ │ Stages affected: <list from capability matrix>
275
+ │ Requires: <prereqs line from spec>
276
+
277
+ │ Setup command:
278
+ │ <install command from spec>
279
+ └───────────────────────────────────────────────
280
+ ```
281
+
282
+ ### 5.3 AskUserQuestion
283
+
284
+ ```
285
+ question: "Install <name>?"
286
+ options:
287
+ - "Run install command now" → 5.4a (auto-run path)
288
+ - "Copy command — I'll run it" → 5.4b (manual path)
289
+ - "Skip for now" → 5.4c (no config change)
290
+ - "Never ask again" → 5.4d (add to skip list)
291
+ ```
292
+
293
+ ### 5.4 Auto-run eligibility matrix
294
+
295
+ **Only auto-run if the install command is reversible.** The matrix:
296
+
297
+ | Connection | Install kind | Auto-run? | Rationale |
298
+ |---|---|---|---|
299
+ | figma | `claude mcp add` (remote MCP) | ✓ yes | Reversible via `claude mcp remove` |
300
+ | preview | built-in, no install | — | Already present or not — no command to run |
301
+ | paper-design | `claude mcp add` | ✓ yes | Reversible |
302
+ | magic-patterns | `claude mcp add` | ✓ yes | Reversible |
303
+ | pinterest | `npx -y @smithery/cli install` | ✓ yes | Smithery CLI manages entry |
304
+ | refero | vendor-specific install | ✗ no | Vendor doesn't document a stable CLI — print link only |
305
+ | storybook | `npx storybook init` | ✗ no | Mutates repo files — force manual |
306
+ | chromatic | `npm install --save-dev chromatic` + env var | ✗ no | Writes package.json + needs `CHROMATIC_PROJECT_TOKEN` — force manual |
307
+ | graphify | `pip install` + `gsd-tools config-set` | ✗ no | Python install + cross-tool config — force manual |
308
+ | 21st-dev | `npx @21st-dev/magic init` + env var | ✗ no | Env var required — force manual |
309
+ | pencil-dev | VS Code extension | ✗ no | IDE-level install — force manual |
310
+ | claude-design | handoff bundle drop | ✗ no | User-driven file drop — force manual |
311
+
312
+ For non-auto-run connections, hide the "Run install command now" option entirely in 5.3. Only show the three remaining options.
313
+
314
+ ### 5.4a — Auto-run path
315
+
316
+ Bash the install command. On success:
317
+ - Print stdout.
318
+ - Print: `"Installed. Session restart required before <name> is usable."`
319
+ - Append `<name>` to `.design/config.json > connections_onboarding.pending_verification[]`.
320
+
321
+ On failure:
322
+ - Print stderr.
323
+ - Print: `"Install failed. Copy the command and run it manually, then rerun /gdd:connections <name> to verify."`
324
+ - Do not record pending_verification.
325
+
326
+ ### 5.4b — Manual path
327
+
328
+ Print the install command inside a fenced code block for easy copy:
329
+
330
+ ````
331
+ ```bash
332
+ <install command>
333
+ ```
334
+ ````
335
+
336
+ Print: `"After installing, restart the session and run /gdd:connections <name> to verify."`
337
+
338
+ Append `<name>` to `connections_onboarding.pending_verification[]`.
339
+
340
+ ### 5.4c — Skip for now
341
+
342
+ No config change. Continue loop.
343
+
344
+ ### 5.4d — Never ask again
345
+
346
+ Read `.design/config.json`. Ensure `connections.skip` is an array. Append `<name>` if not present. Write back.
347
+
348
+ ### 5.5 After every per-connection screen
349
+
350
+ If mode is `<connection-name>` (single-target invocation), skip straight to Step 6. Otherwise continue the loop.
351
+
352
+ ---
353
+
354
+ ## Step 6 — Verification pass
355
+
356
+ Re-probe every connection whose name appears in `connections_onboarding.pending_verification[]`. For each:
357
+
358
+ - Now `available` → remove from `pending_verification[]`. Update STATE.md.
359
+ - Still `not_configured` → leave in `pending_verification[]`. User probably needs a session restart.
360
+ - Now `unavailable` → leave in `pending_verification[]`, print: `"<name> installed but probe errored — OAuth or auth may be required."`
361
+
362
+ Write STATE.md `<connections>` and `.design/config.json`.
363
+
364
+ ### Print summary
365
+
366
+ ```
367
+ ━━━ Setup complete ━━━
368
+ Newly available: <list>
369
+ Still pending (needs session restart): <list>
370
+ Skipped permanently: <list>
371
+ ━━━━━━━━━━━━━━━━━━━━━
372
+ ```
373
+
374
+ If any pending remain, print: `"After restarting the session, run /gdd:connections to verify remaining."`
375
+
376
+ If no pending remain and at least one install happened, print: `"Run /gdd:scan to start your first cycle, or /gdd:brief to capture a design problem."`
377
+
378
+ ---
379
+
380
+ ## Resumability
381
+
382
+ If `.design/config.json > connections_onboarding.pending_verification[]` is non-empty at entry, this is a resumed session (most likely after a restart for a just-installed MCP):
383
+
384
+ 1. Print: `"Resuming — <N> connections pending verification: <list>"`
385
+ 2. Run Step 6 (verification pass) immediately.
386
+ 3. If resumption completes cleanly (empty pending list), emit `## CONNECTIONS COMPLETE` and exit — do not re-enter the wizard.
387
+ 4. Otherwise, fall through to Step 3 (summary) with the still-pending connections visible as `unavailable`.
388
+
389
+ ---
390
+
391
+ ## Config file writes
392
+
393
+ ### `.design/config.json > connections.skip[]`
394
+
395
+ Pattern: read whole file, merge one field, write back (matches `/gdd:settings` pattern).
396
+
397
+ ```json
398
+ {
399
+ "model_profile": "balanced",
400
+ "parallelism": { ... },
401
+ "connections": {
402
+ "skip": ["pinterest", "graphify"]
403
+ }
404
+ }
405
+ ```
406
+
407
+ ### `.design/config.json > connections_onboarding` (scratch block)
408
+
409
+ Deleted automatically when empty after a verification pass:
410
+
411
+ ```json
412
+ {
413
+ "connections_onboarding": {
414
+ "started_at": "<ISO 8601>",
415
+ "pending_verification": ["figma", "chromatic"]
416
+ }
417
+ }
418
+ ```
419
+
420
+ ### `STATE.md <connections>` write
421
+
422
+ Always merge, never replace — other stages may have written entries this skill did not probe. Example merge:
423
+
424
+ Before:
425
+ ```xml
426
+ <connections>
427
+ figma: not_configured
428
+ refero: not_configured
429
+ </connections>
430
+ ```
431
+
432
+ After running this skill with figma install succeeded:
433
+ ```xml
434
+ <connections>
435
+ figma: available
436
+ refero: not_configured
437
+ pinterest: not_configured
438
+ preview: available
439
+ storybook: available
440
+ chromatic: not_configured
441
+ graphify: not_configured
442
+ claude_design: not_configured
443
+ paper_design: not_configured
444
+ pencil_dev: not_configured
445
+ twenty_first: not_configured
446
+ magic_patterns: not_configured
447
+ </connections>
448
+ ```
449
+
450
+ Key normalization:
451
+ - `21st-dev` → `twenty_first` in STATE.md (no leading digit in XML-ish key).
452
+ - `magic-patterns` → `magic_patterns`.
453
+ - `paper-design` → `paper_design`.
454
+ - `pencil-dev` → `pencil_dev`.
455
+ - `claude-design` → `claude_design`.
456
+ - All other names map 1:1.
457
+
458
+ ---
459
+
460
+ ## Do Not
461
+
462
+ - Never run `npm install -g` globals automatically. Always force manual path for globals.
463
+ - Never write to `~/.bashrc`, `~/.zshrc`, or shell RC files. Env-var setup is always manual.
464
+ - Never run `claude mcp add` without explicit `"Run install command now"` confirmation.
465
+ - Never auto-restart the Claude Code session. Print the instruction and let the user act.
466
+ - Never re-prompt for names in `connections.skip[]`. If the user wants to re-enable, they invoke `/gdd:connections <name>` explicitly.
467
+ - Never overwrite existing `<connections>` entries that this skill did not probe. Merge only.
468
+
469
+ ---
470
+
471
+ ## Output
472
+
473
+ End every invocation with:
474
+
475
+ ```
476
+ ## CONNECTIONS COMPLETE
477
+ ```
@@ -19,13 +19,20 @@ user-invocable: true
19
19
  - Otherwise: normal transition — set frontmatter stage=discover, <position> stage=discover, status=in_progress, task_progress=0/1.
20
20
  2. **Probe connection availability** — ToolSearch runs FIRST because MCP tools may be in the deferred tool set. This is the canonical probe pattern (spec lives in `connections/connections.md`; copied inline because SKILL.md has no include mechanism — if the probe pattern changes, update all stages that copied it).
21
21
 
22
- **A — Figma probe:**
22
+ **A — Figma probe (variant-agnostic):**
23
23
 
24
24
  ```
25
- A1. ToolSearch({ query: "select:mcp__figma__get_metadata", max_results: 1 })
26
- A2. Empty result figma: not_configured (skip all Figma paths)
27
- Non-empty result call mcp__figma__get_metadata
28
- Success → figma: available
25
+ A1. ToolSearch({ query: "figma get_metadata use_figma", max_results: 10 })
26
+ A2. Parse tool names matching /^mcp__([^_]*figma[^_]*)__(get_metadata|use_figma)$/i
27
+ into read-capable and write-capable prefix sets.
28
+ A3. Empty read set → figma: not_configured (skip all Figma paths)
29
+ One or more matches → pick prefix via tiebreaker:
30
+ (1) both-sets > reads-only,
31
+ (2) `figma` > others,
32
+ (3) non-`figma-desktop` > desktop,
33
+ (4) alphabetical.
34
+ A4. Call {prefix}get_metadata:
35
+ Success → figma: available (prefix=mcp__<prefix>__, writes=<true|false>)
29
36
  Error → figma: unavailable
30
37
  ```
31
38
 
@@ -17,11 +17,20 @@ tools: Read, Write, Bash, Grep, Glob, Task, AskUserQuestion
17
17
 
18
18
  Probe connection availability and update `.design/STATE.md` `<connections>`:
19
19
 
20
- **A — Figma probe:**
20
+ **A — Figma probe (variant-agnostic):**
21
21
  ```
22
- ToolSearch({ query: "select:mcp__figma__get_metadata", max_results: 1 })
23
- Empty figma: not_configured
24
- Non-empty call mcp__figma__get_metadata; success → available; error → unavailable
22
+ ToolSearch({ query: "figma get_metadata use_figma", max_results: 10 })
23
+ Parse tool names matching /^mcp__([^_]*figma[^_]*)__(get_metadata|use_figma)$/i
24
+ into read-capable and write-capable prefix sets.
25
+ Empty read set → figma: not_configured
26
+ One+ matches → pick prefix via tiebreaker:
27
+ (1) both-sets > reads-only,
28
+ (2) `figma` > others,
29
+ (3) non-`figma-desktop` > desktop,
30
+ (4) alphabetical.
31
+ Then call {prefix}get_metadata:
32
+ success → figma: available (prefix=mcp__<prefix>__, writes=<true|false>)
33
+ error → figma: unavailable
25
34
  ```
26
35
 
27
36
  **B — Refero probe:**
@@ -131,7 +140,7 @@ Read in this order:
131
140
  4. `.design/DESIGN-CONTEXT.md` if it exists — `<gray_areas>` block lists unresolved topics
132
141
  5. `./.claude/skills/design-*-conventions.md` if any — locked project conventions, treat as authoritative
133
142
 
134
- If `<connections>` in STATE.md shows `figma: available`, call `mcp__figma__get_variable_defs` and draft tentative D-XX entries (mark `(tentative — confirm with user)`) before asking.
143
+ If `<connections>` in STATE.md shows `figma: available`, read the resolved `prefix=` from the same line and call `{prefix}get_variable_defs`, then draft tentative D-XX entries (mark `(tentative — confirm with user)`) before asking.
135
144
 
136
145
  ### 3.b — Identify question set
137
146