@hegemonart/get-design-done 1.14.2 → 1.14.4

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.
@@ -2,7 +2,7 @@
2
2
  name: gdd-explore
3
3
  description: "Codebase inventory + design context — runs scan patterns and design-discussant interview, produces DESIGN.md + DESIGN-DEBT.md + DESIGN-CONTEXT.md (Stage 2 of 5)"
4
4
  argument-hint: "[--skip-interview] [--skip-scan]"
5
- tools: Read, Write, Bash, Grep, Glob, Task
5
+ tools: Read, Write, Bash, Grep, Glob, Task, AskUserQuestion
6
6
  ---
7
7
 
8
8
  # Get Design Done — Explore
@@ -17,11 +17,20 @@ tools: Read, Write, Bash, Grep, Glob, Task
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:**
@@ -120,27 +129,55 @@ Mark STATE.md `task_progress` for the scan pass.
120
129
 
121
130
  ## Step 3 — Design interview (unless `--skip-interview`)
122
131
 
123
- Spawn the `design-discussant` agent:
132
+ **Run this inline — do NOT spawn `design-discussant` as a subagent.** Subagent UI tools (`AskUserQuestion`) only render the native picker when called from the top-level skill context; spawning a Task() degrades the interview to plain markdown in chat (broken in Claude Desktop).
124
133
 
125
- ```
126
- Task("design-discussant", """
127
- <required_reading>
128
- @.design/STATE.md
129
- @.design/BRIEF.md
130
- @.design/DESIGN.md
131
- @./.claude/skills
132
- </required_reading>
134
+ ### 3.a — Pre-load context
133
135
 
134
- <mode>normal</mode>
136
+ Read in this order:
137
+ 1. `.design/STATE.md` — existing `<decisions>` D-XX entries (do NOT re-ask anything covered)
138
+ 2. `.design/BRIEF.md` — problem statement, audience, constraints
139
+ 3. `.design/DESIGN.md` — auto-detected inventory from Step 2
140
+ 4. `.design/DESIGN-CONTEXT.md` if it exists — `<gray_areas>` block lists unresolved topics
141
+ 5. `./.claude/skills/design-*-conventions.md` if any — locked project conventions, treat as authoritative
135
142
 
136
- Run an adaptive interview for areas not already covered by D-XX decisions.
137
- Append D-XX decisions to STATE.md <decisions>. Produce/update .design/DESIGN-CONTEXT.md.
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.
138
144
 
139
- Emit `## DISCUSS COMPLETE` when done.
140
- """)
141
- ```
145
+ ### 3.b Identify question set
146
+
147
+ Build the list of areas needing input. Skip any area already answered by an existing D-XX or covered by a project convention. Default coverage:
148
+
149
+ - Cycle goal / outcome that matters most
150
+ - Audience and primary use context
151
+ - Brand direction (only if no tokens detected in DESIGN.md)
152
+ - Color primitives (only if no palette detected)
153
+ - Typography scale (only if no type system detected)
154
+ - Spacing scale (only if no spacing tokens detected)
155
+ - Motion preferences (only if no motion patterns detected)
156
+ - Any `<gray_areas>` from DESIGN-CONTEXT.md
157
+
158
+ ### 3.c — Ask, one question at a time
159
+
160
+ For each area, call `AskUserQuestion` with a single focused question. Provide 4 concrete options plus "Other" / "Skip" where it helps. Do not batch questions into one call. Do not print the question as markdown — always go through the tool.
161
+
162
+ Reject generic answers ("modern", "clean", "professional"). If the answer is vague, ask one follow-up before recording.
163
+
164
+ ### 3.d — Record after each answer
165
+
166
+ After each confirmed answer:
167
+ 1. Append a `D-XX` entry to `.design/STATE.md` `<decisions>` block. Format:
168
+ ```
169
+ D-NN: [Category] Decision summary — short rationale
170
+ ```
171
+ 2. Append one JSON line to `.design/learnings/question-quality.jsonl` (create if absent):
172
+ ```json
173
+ {"ts":"<iso>","question_id":"Q-NN","question_text":"<verbatim>","answer_summary":"<one sentence>","quality":"high|medium|low|skipped","evidence":"<why>","cycle":"<active-cycle-slug>"}
174
+ ```
175
+ Quality classification: `skipped` if user picked Skip / "doesn't matter"; `low` if < 10 words and not a specific value; `medium` if hedged ("maybe", "I think", "not sure"); `high` otherwise.
176
+ 3. Save STATE.md immediately (incremental save — survives crash mid-interview).
177
+
178
+ ### 3.e — Produce DESIGN-CONTEXT.md
142
179
 
143
- Wait for `## DISCUSS COMPLETE`.
180
+ When all questions are answered, write `.design/DESIGN-CONTEXT.md` summarizing the locked decisions, remaining gray areas, and any Figma-sourced tentatives that were confirmed or rejected. Set frontmatter `status: complete`.
144
181
 
145
182
  ## Step 4 — Update STATE.md
146
183
 
@@ -24,10 +24,9 @@ Flags:
24
24
 
25
25
  ## Prerequisites
26
26
 
27
- 1. Figma desktop app running with Dev Mode enabled
28
- 2. Remote Figma MCP registered: `claude mcp add figma --transport http https://mcp.figma.com/v1/sse`
29
- 3. `.design/DESIGN-CONTEXT.md` exists (run `discover` first)
30
- 4. `figma: available` in `.design/STATE.md` `<connections>` block
27
+ 1. Remote Figma MCP registered (writes are remote-only). Preferred: `claude plugin install figma@claude-plugins-official`. Manual: `claude mcp add --transport http figma https://mcp.figma.com/mcp`.
28
+ 2. `.design/DESIGN-CONTEXT.md` exists (run `discover` first)
29
+ 3. `.design/STATE.md` `<connections>` shows `figma: available (…, writes=true)`. If `writes=false` (desktop-only variant), writes are not supported — the agent will STOP with an instruction to install the remote MCP.
31
30
 
32
31
  ## Required Reading
33
32
 
@@ -39,18 +39,30 @@ At scan entry, before running any step:
39
39
 
40
40
  Run both probes below. MCP tools may be in the deferred tool set — **always call ToolSearch first**; without it, a deferred tool invocation fails silently.
41
41
 
42
- **Figma probe (single probe covers both reads and writes remote MCP exposes `get_metadata`, `get_variable_defs`, `use_figma` on the same server):**
42
+ **Figma probe (variant-agnosticresolves any server prefix matching `/figma/i`):**
43
43
 
44
44
  ```
45
- Step A1 — ToolSearch check:
46
- ToolSearch({ query: "select:mcp__figma__get_metadata", max_results: 1 })
47
- → Empty result → figma: not_configured (skip all Figma steps)
48
- → Non-empty result → proceed to Step A2
45
+ Step A1 — Keyword ToolSearch:
46
+ ToolSearch({ query: "figma get_metadata use_figma", max_results: 10 })
49
47
 
50
- Step A2 Live tool call:
51
- call mcp__figma__get_metadata
52
- Success figma: available (reads AND use_figma writes both available)
53
- → Error → figma: unavailable (skip all Figma steps)
48
+ Parse results for tool names matching:
49
+ - /^mcp__([^_]*figma[^_]*)__get_metadata$/i read-capable prefix set
50
+ - /^mcp__([^_]*figma[^_]*)__use_figma$/i write-capable prefix set
51
+
52
+ Empty read set → figma: not_configured (skip all Figma steps)
53
+ One or more matches → proceed to Step A2
54
+
55
+ Step A2 — Tiebreaker selection:
56
+ Preference order when multiple read prefixes match:
57
+ 1. Prefer prefixes that appear in BOTH read set and write set
58
+ 2. Prefer `figma` (canonical remote server name)
59
+ 3. Prefer non-`figma-desktop`
60
+ 4. Alphabetical
61
+
62
+ Step A3 — Live tool call on resolved prefix:
63
+ call mcp__<prefix>__get_metadata
64
+ → Success → figma: available (prefix=mcp__<prefix>__, writes=<true|false>)
65
+ → Error → figma: unavailable (skip all Figma steps)
54
66
  ```
55
67
 
56
68
  **Refero probe:**
@@ -228,7 +240,7 @@ Produce a color inventory table:
228
240
 
229
241
  ### If `figma: available`
230
242
 
231
- Call `mcp__figma__get_variable_defs` (no arguments — returns all variables in the active Figma file).
243
+ Read the resolved prefix from STATE.md `<connections>` (e.g., `prefix=mcp__figma__` or `prefix=mcp__figma-desktop__`) and call `{prefix}get_variable_defs` (no arguments — returns all variables in the active Figma file).
232
244
 
233
245
  > If no Figma file is open, the call errors. Treat any error as a graceful skip: update STATE.md `<connections>` to `figma: unavailable` and continue with Step 2 results only.
234
246