@hegemonart/get-design-done 1.57.2 → 1.57.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 (146) hide show
  1. package/.claude-plugin/marketplace.json +4 -4
  2. package/.claude-plugin/plugin.json +2 -2
  3. package/CHANGELOG.md +48 -0
  4. package/README.md +1 -1
  5. package/SKILL.md +2 -6
  6. package/connections/cursor.md +0 -1
  7. package/package.json +1 -2
  8. package/reference/skill-graph.md +1 -5
  9. package/scripts/lib/manifest/skills.json +3 -23
  10. package/scripts/lib/worktree-resolve.cjs +4 -16
  11. package/skills/README.md +46 -0
  12. package/skills/bootstrap-ds/SKILL.md +1 -1
  13. package/skills/compare/SKILL.md +1 -1
  14. package/skills/new-cycle/SKILL.md +1 -1
  15. package/skills/peer-cli-customize/SKILL.md +0 -1
  16. package/skills/peers/SKILL.md +1 -1
  17. package/skills/reflect/procedures/capability-gap-scan.md +0 -1
  18. package/skills/report-issue/report-issue-procedure.md +0 -1
  19. package/skills/synthesize/SKILL.md +1 -1
  20. package/skills/turn-closeout/SKILL.md +1 -1
  21. package/dist/claude-code/.claude/skills/add-backlog/SKILL.md +0 -48
  22. package/dist/claude-code/.claude/skills/analyze-dependencies/SKILL.md +0 -95
  23. package/dist/claude-code/.claude/skills/apply-reflections/SKILL.md +0 -109
  24. package/dist/claude-code/.claude/skills/apply-reflections/apply-reflections-procedure.md +0 -170
  25. package/dist/claude-code/.claude/skills/audit/SKILL.md +0 -79
  26. package/dist/claude-code/.claude/skills/bandit-status/SKILL.md +0 -94
  27. package/dist/claude-code/.claude/skills/benchmark/SKILL.md +0 -65
  28. package/dist/claude-code/.claude/skills/bootstrap-ds/SKILL.md +0 -43
  29. package/dist/claude-code/.claude/skills/brief/SKILL.md +0 -145
  30. package/dist/claude-code/.claude/skills/budget/SKILL.md +0 -45
  31. package/dist/claude-code/.claude/skills/cache-manager/SKILL.md +0 -66
  32. package/dist/claude-code/.claude/skills/cache-manager/cache-policy.md +0 -126
  33. package/dist/claude-code/.claude/skills/check-update/SKILL.md +0 -98
  34. package/dist/claude-code/.claude/skills/compare/SKILL.md +0 -82
  35. package/dist/claude-code/.claude/skills/compare/compare-rubric.md +0 -171
  36. package/dist/claude-code/.claude/skills/complete-cycle/SKILL.md +0 -81
  37. package/dist/claude-code/.claude/skills/connections/SKILL.md +0 -71
  38. package/dist/claude-code/.claude/skills/connections/connections-onboarding.md +0 -608
  39. package/dist/claude-code/.claude/skills/context/SKILL.md +0 -137
  40. package/dist/claude-code/.claude/skills/continue/SKILL.md +0 -24
  41. package/dist/claude-code/.claude/skills/darkmode/SKILL.md +0 -76
  42. package/dist/claude-code/.claude/skills/darkmode/darkmode-audit-procedure.md +0 -258
  43. package/dist/claude-code/.claude/skills/debug/SKILL.md +0 -41
  44. package/dist/claude-code/.claude/skills/debug/debug-feedback-loops.md +0 -119
  45. package/dist/claude-code/.claude/skills/design/SKILL.md +0 -118
  46. package/dist/claude-code/.claude/skills/design/design-procedure.md +0 -304
  47. package/dist/claude-code/.claude/skills/discover/SKILL.md +0 -78
  48. package/dist/claude-code/.claude/skills/discover/discover-procedure.md +0 -222
  49. package/dist/claude-code/.claude/skills/discuss/SKILL.md +0 -96
  50. package/dist/claude-code/.claude/skills/do/SKILL.md +0 -45
  51. package/dist/claude-code/.claude/skills/explore/SKILL.md +0 -118
  52. package/dist/claude-code/.claude/skills/explore/explore-procedure.md +0 -267
  53. package/dist/claude-code/.claude/skills/export/SKILL.md +0 -30
  54. package/dist/claude-code/.claude/skills/extract-learnings/SKILL.md +0 -114
  55. package/dist/claude-code/.claude/skills/fast/SKILL.md +0 -91
  56. package/dist/claude-code/.claude/skills/figma-extract/SKILL.md +0 -64
  57. package/dist/claude-code/.claude/skills/figma-write/SKILL.md +0 -50
  58. package/dist/claude-code/.claude/skills/graphify/SKILL.md +0 -49
  59. package/dist/claude-code/.claude/skills/health/SKILL.md +0 -99
  60. package/dist/claude-code/.claude/skills/health/health-mcp-detection.md +0 -44
  61. package/dist/claude-code/.claude/skills/health/health-skill-length-report.md +0 -69
  62. package/dist/claude-code/.claude/skills/help/SKILL.md +0 -87
  63. package/dist/claude-code/.claude/skills/instinct/SKILL.md +0 -111
  64. package/dist/claude-code/.claude/skills/list-assumptions/SKILL.md +0 -61
  65. package/dist/claude-code/.claude/skills/list-pins/SKILL.md +0 -27
  66. package/dist/claude-code/.claude/skills/live/SKILL.md +0 -98
  67. package/dist/claude-code/.claude/skills/locale/SKILL.md +0 -51
  68. package/dist/claude-code/.claude/skills/map/SKILL.md +0 -89
  69. package/dist/claude-code/.claude/skills/migrate/SKILL.md +0 -70
  70. package/dist/claude-code/.claude/skills/migrate-context/SKILL.md +0 -123
  71. package/dist/claude-code/.claude/skills/new-addendum/SKILL.md +0 -81
  72. package/dist/claude-code/.claude/skills/new-cycle/SKILL.md +0 -37
  73. package/dist/claude-code/.claude/skills/new-cycle/milestone-completeness-rubric.md +0 -87
  74. package/dist/claude-code/.claude/skills/new-project/SKILL.md +0 -53
  75. package/dist/claude-code/.claude/skills/new-skill/SKILL.md +0 -90
  76. package/dist/claude-code/.claude/skills/next/SKILL.md +0 -68
  77. package/dist/claude-code/.claude/skills/note/SKILL.md +0 -48
  78. package/dist/claude-code/.claude/skills/openrouter-status/SKILL.md +0 -86
  79. package/dist/claude-code/.claude/skills/optimize/SKILL.md +0 -97
  80. package/dist/claude-code/.claude/skills/override/SKILL.md +0 -86
  81. package/dist/claude-code/.claude/skills/paper-write/SKILL.md +0 -54
  82. package/dist/claude-code/.claude/skills/pause/SKILL.md +0 -77
  83. package/dist/claude-code/.claude/skills/peer-cli-add/SKILL.md +0 -88
  84. package/dist/claude-code/.claude/skills/peer-cli-add/peer-cli-protocol.md +0 -161
  85. package/dist/claude-code/.claude/skills/peer-cli-customize/SKILL.md +0 -90
  86. package/dist/claude-code/.claude/skills/peers/SKILL.md +0 -96
  87. package/dist/claude-code/.claude/skills/pencil-write/SKILL.md +0 -54
  88. package/dist/claude-code/.claude/skills/pin/SKILL.md +0 -37
  89. package/dist/claude-code/.claude/skills/plan/SKILL.md +0 -105
  90. package/dist/claude-code/.claude/skills/plan/plan-procedure.md +0 -278
  91. package/dist/claude-code/.claude/skills/plant-seed/SKILL.md +0 -48
  92. package/dist/claude-code/.claude/skills/pr-branch/SKILL.md +0 -32
  93. package/dist/claude-code/.claude/skills/progress/SKILL.md +0 -107
  94. package/dist/claude-code/.claude/skills/quality-gate/SKILL.md +0 -90
  95. package/dist/claude-code/.claude/skills/quality-gate/threat-modeling.md +0 -101
  96. package/dist/claude-code/.claude/skills/quick/SKILL.md +0 -44
  97. package/dist/claude-code/.claude/skills/reapply-patches/SKILL.md +0 -32
  98. package/dist/claude-code/.claude/skills/recall/SKILL.md +0 -75
  99. package/dist/claude-code/.claude/skills/reflect/SKILL.md +0 -85
  100. package/dist/claude-code/.claude/skills/reflect/procedures/capability-gap-scan.md +0 -120
  101. package/dist/claude-code/.claude/skills/report-issue/SKILL.md +0 -53
  102. package/dist/claude-code/.claude/skills/report-issue/report-issue-procedure.md +0 -120
  103. package/dist/claude-code/.claude/skills/resume/SKILL.md +0 -93
  104. package/dist/claude-code/.claude/skills/review-backlog/SKILL.md +0 -46
  105. package/dist/claude-code/.claude/skills/review-decisions/SKILL.md +0 -42
  106. package/dist/claude-code/.claude/skills/roi/SKILL.md +0 -54
  107. package/dist/claude-code/.claude/skills/rollout-status/SKILL.md +0 -35
  108. package/dist/claude-code/.claude/skills/router/SKILL.md +0 -89
  109. package/dist/claude-code/.claude/skills/router/capability-gap-emitter.md +0 -65
  110. package/dist/claude-code/.claude/skills/router/router-pick-emitter.md +0 -78
  111. package/dist/claude-code/.claude/skills/router/router-rules.md +0 -84
  112. package/dist/claude-code/.claude/skills/scan/SKILL.md +0 -92
  113. package/dist/claude-code/.claude/skills/scan/scan-procedure.md +0 -732
  114. package/dist/claude-code/.claude/skills/settings/SKILL.md +0 -87
  115. package/dist/claude-code/.claude/skills/ship/SKILL.md +0 -48
  116. package/dist/claude-code/.claude/skills/sketch/SKILL.md +0 -78
  117. package/dist/claude-code/.claude/skills/sketch-wrap-up/SKILL.md +0 -92
  118. package/dist/claude-code/.claude/skills/skill-manifest/SKILL.md +0 -79
  119. package/dist/claude-code/.claude/skills/spike/SKILL.md +0 -67
  120. package/dist/claude-code/.claude/skills/spike-wrap-up/SKILL.md +0 -86
  121. package/dist/claude-code/.claude/skills/start/SKILL.md +0 -67
  122. package/dist/claude-code/.claude/skills/start/start-procedure.md +0 -115
  123. package/dist/claude-code/.claude/skills/state/SKILL.md +0 -106
  124. package/dist/claude-code/.claude/skills/stats/SKILL.md +0 -51
  125. package/dist/claude-code/.claude/skills/style/SKILL.md +0 -71
  126. package/dist/claude-code/.claude/skills/style/style-doc-procedure.md +0 -150
  127. package/dist/claude-code/.claude/skills/synthesize/SKILL.md +0 -94
  128. package/dist/claude-code/.claude/skills/timeline/SKILL.md +0 -66
  129. package/dist/claude-code/.claude/skills/todo/SKILL.md +0 -64
  130. package/dist/claude-code/.claude/skills/turn-closeout/SKILL.md +0 -95
  131. package/dist/claude-code/.claude/skills/undo/SKILL.md +0 -31
  132. package/dist/claude-code/.claude/skills/unlock-decision/SKILL.md +0 -54
  133. package/dist/claude-code/.claude/skills/unpin/SKILL.md +0 -31
  134. package/dist/claude-code/.claude/skills/update/SKILL.md +0 -56
  135. package/dist/claude-code/.claude/skills/using-gdd/SKILL.md +0 -78
  136. package/dist/claude-code/.claude/skills/verify/SKILL.md +0 -113
  137. package/dist/claude-code/.claude/skills/verify/verify-procedure.md +0 -511
  138. package/dist/claude-code/.claude/skills/warm-cache/SKILL.md +0 -81
  139. package/dist/claude-code/.claude/skills/watch-authorities/SKILL.md +0 -82
  140. package/dist/claude-code/.claude/skills/zoom-out/SKILL.md +0 -26
  141. package/hooks/run-hook.cmd +0 -35
  142. package/skills/discover/SKILL.md +0 -78
  143. package/skills/discover/discover-procedure.md +0 -222
  144. package/skills/new-cycle/milestone-completeness-rubric.md +0 -87
  145. package/skills/scan/SKILL.md +0 -92
  146. package/skills/scan/scan-procedure.md +0 -732
@@ -1,732 +0,0 @@
1
- ---
2
- name: scan-procedure
3
- type: meta-rules
4
- version: 1.0.0
5
- phase: 28.5
6
- tags: [scan, procedure, extracted, pipeline-stage, design-system, audit]
7
- last_updated: 2026-05-18
8
- ---
9
-
10
- Source: extracted from `skills/scan/SKILL.md` (Phase 28.5 rework - D-10 extract-then-link).
11
- The skill's essential workflow stays in `../skills/scan/SKILL.md`; this file holds the
12
- detail the agent reaches for when executing a specific step (STATE integration, connection
13
- probes, extraction grep commands, scoring, output contracts).
14
-
15
- # Scan Procedure
16
-
17
- Detailed procedure for the get-design-done `scan` pre-pipeline initializer. Companion to
18
- `../skills/scan/SKILL.md`. Read this file when executing a specific scan step; the SKILL.md
19
- keeps the essential workflow + decision tree, this file holds the deep methodology.
20
-
21
- ---
22
-
23
- ## State Integration
24
-
25
- ### Read or create STATE.md
26
-
27
- At scan entry, before running any step:
28
-
29
- 1. Check for `.design/STATE.md`.
30
- - **If missing:** create it from `../reference/STATE-TEMPLATE.md`. Set the following fields:
31
- - `started_at` = now (ISO 8601) - **set once; never overwrite on subsequent runs**
32
- - `last_checkpoint` = now
33
- - frontmatter `stage` = `scan`
34
- - `<position>` `stage` = `scan`, `status` = `in_progress`, `task_progress` = `0/8`
35
- - **If present and `stage == scan` and `status == in_progress`:** RESUME - skip already-complete steps using `task_progress` as offset. Do not reset `started_at`.
36
- - **Otherwise (normal transition):** set frontmatter `stage = scan`, `<position>` `stage = scan`, `status = in_progress`, `task_progress = 0/8`. Do not overwrite `started_at`.
37
-
38
- ### Probe connection availability
39
-
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
-
42
- **Figma probe (variant-agnostic - resolves any server prefix matching `/figma/i`):**
43
-
44
- ```
45
- Step A1 — Keyword ToolSearch:
46
- ToolSearch({ query: "figma get_metadata use_figma", max_results: 10 })
47
-
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)
66
- ```
67
-
68
- **Refero probe:**
69
-
70
- ```
71
- Step B1 — ToolSearch check:
72
- ToolSearch({ query: "refero", max_results: 5 })
73
- -> Empty result -> refero: not_configured (use fallback chain)
74
- -> Non-empty result -> refero: available
75
- ```
76
-
77
- Note: scan probes **both** connections because the State Integration block is the authoritative connection-detection point for the entire pipeline. Scan itself does not use Refero, but it writes the Refero status so downstream stages (discover) do not need to re-probe from scratch.
78
-
79
- ### Phase 8 Connection Probes
80
-
81
- Run all 4 Phase 8 probes at scan entry. Results are written to STATE.md `<connections>` so downstream stages (verify, compare, darkmode, plan, design) do not re-probe unless needed.
82
-
83
- Note: as of v1.0.7.1, Figma is a single connection (`figma:` key) covering reads + writes - no separate `figma_writer:` probe. The Wave A Figma probe above is the sole Figma availability check.
84
-
85
- **preview:**
86
-
87
- ```
88
- Step P1 — ToolSearch check:
89
- ToolSearch({ query: "Claude_Preview", max_results: 5 })
90
- -> Empty result -> preview: not_configured
91
- -> Non-empty result -> proceed to Step P2
92
-
93
- Step P2 — Live tool call:
94
- call mcp__Claude_Preview__preview_list
95
- -> Success -> preview: available
96
- -> Error -> preview: unavailable
97
-
98
- Write: preview: <status> to STATE.md <connections>
99
- ```
100
-
101
- **storybook:**
102
-
103
- ```
104
- Step B1 — Project detection:
105
- Bash: ls .storybook/ 2>/dev/null || grep '"storybook"' package.json 2>/dev/null
106
- -> Found -> storybook_project: true -> proceed to Step B2
107
- -> Not found -> storybook: not_configured
108
-
109
- Step B2 — Dev server detection:
110
- Bash: curl -sf http://localhost:6006/index.json 2>/dev/null | head -1
111
- -> Returns JSON -> storybook: available
112
- -> Fails -> Bash: curl -sf http://localhost:6006/stories.json 2>/dev/null | head -1
113
- -> Returns JSON -> storybook: available (compat endpoint)
114
- -> Fails -> storybook: unavailable
115
-
116
- Write: storybook: <status> to STATE.md <connections>
117
- ```
118
-
119
- **chromatic:**
120
-
121
- ```
122
- Step C1 — CLI presence:
123
- Bash: command -v chromatic 2>/dev/null || npx chromatic --version 2>/dev/null
124
- -> found -> proceed to Step C2
125
- -> not found -> chromatic: not_configured
126
-
127
- Step C2 — Token check:
128
- Bash: test -n "${CHROMATIC_PROJECT_TOKEN}"
129
- -> true -> chromatic: available
130
- -> false -> chromatic: unavailable
131
-
132
- Write: chromatic: <status> to STATE.md <connections>
133
- ```
134
-
135
- **graphify:**
136
-
137
- ```
138
- Step G1 — Config check:
139
- Bash: node -e "try{const c=JSON.parse(require('fs').readFileSync('.design/config.json','utf8'));process.stdout.write(String(c.graphify?.enabled===true))}catch{process.stdout.write('false')}"
140
- -> false -> graphify: not_configured
141
- -> true -> proceed to Step G2
142
-
143
- Step G2 — Graph file check (status JSON):
144
- Bash: node bin/gdd-graph status --format json
145
- -> { configured: true, exists: true, ... } -> graphify: available
146
- -> { configured: false, exists: false } or -> graphify: unavailable
147
- { exists: false }
148
-
149
- Write: graphify: <status> to STATE.md <connections>
150
- ```
151
-
152
- After all 4 probes, STATE.md `<connections>` contains all 4 status entries (plus the Wave A `figma:` and `refero:` probes = 6 total entries). Downstream plans (08-02 through 08-05) read these values without re-probing.
153
-
154
- **First-run connection nudge:** after writing STATE.md, check whether every probed connection came back `not_configured` AND `.design/config.json > connections_onboarding` is absent. If so, print once at the end of scan output:
155
-
156
- ```
157
- Tip: run /gdd:connections to walk through setup for Figma, Storybook, Chromatic, and 9 other integrations.
158
- ```
159
-
160
- Suppress the nudge if any probe returned `available` or `unavailable`, or if the user has already run `/gdd:connections` (marker: `connections_onboarding` block present or previously drained).
161
-
162
- ### Write STATE.md
163
-
164
- Update `.design/STATE.md` with probe results:
165
-
166
- ```xml
167
- <connections>
168
- figma: <available | unavailable | not_configured>
169
- refero: <available | not_configured>
170
- preview: <available | unavailable | not_configured>
171
- storybook: <available | unavailable | not_configured>
172
- chromatic: <available | unavailable | not_configured>
173
- graphify: <available | unavailable | not_configured>
174
- </connections>
175
- ```
176
-
177
- Update `last_checkpoint` to now. Write `.design/STATE.md` to disk before proceeding to Step 1.
178
-
179
- ---
180
-
181
- ## Step 1 - Orient
182
-
183
- Identify the project structure before scanning:
184
-
185
- ```bash
186
- # Framework detection
187
- cat package.json 2>/dev/null | grep -E '"(next|nuxt|vite|react|vue|svelte|remix|astro|tailwind)"' | head -20
188
-
189
- # CSS approach
190
- ls src/styles/ styles/ app/styles/ 2>/dev/null
191
- find . -name "tailwind.config.*" -not -path "*/node_modules/*" 2>/dev/null | head -3
192
- find . -name "*.tokens.json" -o -name "design-tokens.*" -o -name "tokens.css" 2>/dev/null | grep -v node_modules | head -5
193
-
194
- # Component count
195
- find . -name "*.tsx" -o -name "*.jsx" -o -name "*.vue" -o -name "*.svelte" 2>/dev/null | grep -v node_modules | wc -l
196
-
197
- # Style file count
198
- find . -name "*.css" -o -name "*.scss" -o -name "*.less" 2>/dev/null | grep -v node_modules | wc -l
199
- ```
200
-
201
- Record: framework, CSS approach, component count, style file count, token system (yes/no).
202
-
203
- **Detect source root.** Check these directories in order and use the first one that exists:
204
- `src/` -> `app/` -> `pages/` -> `lib/`. Substitute the detected source root (the matched
205
- directory name) into every subsequent grep command in this SKILL.md that currently references
206
- `src/` as the primary component root. If none of these directories exist, log
207
- "No standard source directory found - manual audit required" and proceed with the unchanged
208
- command (the `2>/dev/null` guards will suppress the no-match output).
209
-
210
- Log the detected source root in DESIGN.md frontmatter as:
211
- source_roots: [<detected_dir>]
212
-
213
- ---
214
-
215
- ## Step 2 - Extract Color System
216
-
217
- ```bash
218
- # All hex colors used
219
- grep -roh "#[0-9a-fA-F]\{3,8\}" src/ styles/ app/ --include="*.css" --include="*.scss" --include="*.tsx" --include="*.jsx" --include="*.ts" --include="*.vue" 2>/dev/null | sort | uniq -c | sort -rn | head -40
220
-
221
- # oklch / hsl / rgb colors
222
- grep -rEoh "oklch\([^)]*\)|hsl\([^)]*\)|rgb\([^)]*\)" src/ styles/ --include="*.css" --include="*.scss" 2>/dev/null | sort | uniq -c | sort -rn | head -20
223
-
224
- # CSS custom properties (color tokens)
225
- grep -rEoh "\-\-[a-z][a-z0-9\-]*color[a-z0-9\-]*:\s*[^;]*|\-\-color[a-z0-9\-]*:\s*[^;]*" src/ styles/ --include="*.css" --include="*.scss" 2>/dev/null | sort | uniq | head -30
226
-
227
- # Tailwind color config
228
- grep -A 100 '"colors"' tailwind.config.* 2>/dev/null | head -50
229
- ```
230
-
231
- **Analyze the color data:**
232
-
233
- 1. How many unique colors? (< 10 = disciplined, 10–25 = moderate, > 25 = ad-hoc)
234
- 2. Is there a token layer (CSS custom properties)? Or raw hex in components?
235
- 3. Does the palette contain AI-slop colors? (#6366f1, #8b5cf6, #06b6d4)
236
- 4. Are there semantic roles evident from naming? (`--color-primary`, `--color-danger`)
237
- 5. Is pure black (#000000) used in dark mode?
238
-
239
- Produce a color inventory table:
240
- ```
241
- | Color | Occurrences | Role (inferred) | Issues |
242
- ```
243
-
244
- ---
245
-
246
- ## Step 2A - Figma Token Augmentation
247
-
248
- **Skip this step if `figma` is `not_configured` or `unavailable` in `.design/STATE.md` `<connections>`.** Fall back to the grep-based token extraction from Step 2 alone - no error, no warning. Scan continues normally.
249
-
250
- ### If `figma: available`
251
-
252
- 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).
253
-
254
- > 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.
255
-
256
- **For each variable returned, apply the following translation:**
257
-
258
- | Variable type | Name pattern | Output |
259
- |---------------|--------------|--------|
260
- | `COLOR` | any | Add row to color inventory table |
261
- | `FLOAT` | `spacing/*` | Add row to spacing system |
262
- | `FLOAT` | `font-size/*` or `typography/*` | Add row to typography system |
263
-
264
- Record both the variable **NAME** and resolved value - not just the value. `get_variable_defs` returns resolved values only (no alias chains); the name often carries semantic meaning the value cannot.
265
-
266
- **Multi-mode (Light/Dark):** when `valuesByMode` has multiple entries, extract all values and note dark-mode existence in the DESIGN.md color section.
267
-
268
- ### Merge, don't replace
269
-
270
- Keep grep-derived tokens from Step 2 AND Figma tokens. Both sets appear in DESIGN.md:
271
-
272
- - **Figma-only tokens** (in Figma, not in CSS): annotate as "design intention not yet implemented"
273
- - **Code-only tokens** (in CSS, not in Figma): annotate as "implementation drift or local override"
274
- - **Matching tokens**: show Figma value alongside CSS value; flag any discrepancy
275
-
276
- ### DESIGN.md annotations required
277
-
278
- When this step runs successfully:
279
-
280
- 1. Change the token layer section header from "CSS custom properties" to "CSS custom properties + Figma variables"
281
- 2. Add to DESIGN.md frontmatter:
282
- - `figma_variables_used: true`
283
- - `figma_source: [list of collection names returned by get_variable_defs]`
284
-
285
- ### Caveats
286
-
287
- - `get_variable_defs` returns **resolved values only** - no alias chains. Always record the variable NAME alongside the value; the name carries semantic meaning not present in the hex/float alone.
288
- - **Multi-mode:** when Light and Dark mode values differ, record both. Note dark-mode variable presence in the DESIGN.md color section.
289
- - **No file open:** if `get_variable_defs` errors (most commonly because no Figma file is open), skip this step entirely and update STATE.md `<connections>` to `figma: unavailable`. Do not error the scan stage.
290
-
291
- ---
292
-
293
- ## Step 3 - Extract Typography System
294
-
295
- ```bash
296
- # Font families
297
- grep -rEoh "font-family:\s*[^;]*|fontFamily:\s*[^,}]*" src/ styles/ --include="*.css" --include="*.scss" --include="*.ts" --include="*.tsx" 2>/dev/null | sort | uniq -c | sort -rn | head -20
298
-
299
- # Font sizes
300
- grep -rEoh "font-size:\s*[0-9.]*\(rem|px|em\)|text-(xs|sm|base|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl)" src/ styles/ --include="*.css" --include="*.scss" --include="*.tsx" --include="*.jsx" 2>/dev/null | sort | uniq -c | sort -rn | head -30
301
-
302
- # Font weights
303
- grep -rEoh "font-weight:\s*[0-9]*|fw-[0-9]*|font-(thin|light|normal|medium|semibold|bold|extrabold|black)" src/ styles/ --include="*.css" --include="*.scss" --include="*.tsx" 2>/dev/null | sort | uniq -c | sort -rn | head -20
304
-
305
- # Line heights
306
- grep -rEoh "line-height:\s*[0-9.]*|leading-[a-z0-9]*" src/ styles/ --include="*.css" --include="*.scss" --include="*.tsx" 2>/dev/null | sort | uniq -c | sort -rn | head -15
307
- ```
308
-
309
- **Analyze:**
310
-
311
- 1. How many font families? (> 2 = violation unless one is monospace)
312
- 2. Are font sizes from a defined scale or arbitrary px?
313
- 3. Map found sizes to nearest modular scale - identify outliers
314
- 4. Are weights following hierarchy? (body 400, headings 600-700, never 300 on small text)
315
- 5. Line-height on body text - is it 1.5–1.75?
316
- 6. Any of the reflex fonts without apparent brand reason? (Inter, DM Sans, Space Grotesk, Plus Jakarta Sans)
317
-
318
- Read `${CLAUDE_PLUGIN_ROOT}/reference/typography.md` for comparison criteria.
319
-
320
- Produce a typography inventory table.
321
-
322
- ---
323
-
324
- ## Step 4 - Extract Spacing System
325
-
326
- ```bash
327
- # All CSS spacing values
328
- grep -rEoh "padding:\s*[0-9]*px|margin:\s*[0-9]*px|gap:\s*[0-9]*px" src/ styles/ --include="*.css" --include="*.scss" 2>/dev/null | grep -oh "[0-9]*px" | sort -n | uniq -c | sort -rn | head -20
329
-
330
- # Tailwind spacing overrides
331
- grep -A 30 '"spacing"' tailwind.config.* 2>/dev/null | head -35
332
-
333
- # Space tokens
334
- grep -rEoh "\-\-space[a-z0-9\-]*:\s*[^;]*|\-\-spacing[a-z0-9\-]*:\s*[^;]*" src/ styles/ --include="*.css" 2>/dev/null | head -20
335
- ```
336
-
337
- **Analyze:**
338
-
339
- Grid compliance: are spacing values in the 4/8/12/16/24/32/48/64 series? Flag any values not in this set (e.g., 13px, 22px, 37px are off-grid).
340
-
341
- ---
342
-
343
- ## Step 5 - Anti-Pattern Audit
344
-
345
- Read `${CLAUDE_PLUGIN_ROOT}/reference/anti-patterns.md`. Run all grep commands.
346
-
347
- ```bash
348
- # BAN violations (-3 each from Anti-Pattern score)
349
- echo "=== BAN-01: Side-stripe borders ===" && grep -rEn "border-left:\s*[2-9][0-9]*px|border-right:\s*[2-9][0-9]*px" src/ --include="*.css" --include="*.scss" --include="*.tsx" 2>/dev/null
350
- echo "=== BAN-02: Gradient text ===" && grep -rEn "background-clip:\s*text|text-fill-color:\s*transparent" src/ 2>/dev/null
351
- echo "=== BAN-03: Bounce easing ===" && grep -rEn "cubic-bezier\(.*-[0-9]|bounce|elastic" src/ --include="*.css" --include="*.scss" 2>/dev/null
352
- echo "=== BAN-08: transition: all ===" && grep -rnE "transition:[[:space:]]*all([^a-zA-Z]|$)" src/ --include="*.css" --include="*.scss" --include="*.tsx" 2>/dev/null | head -10
353
- echo "=== BAN-05: Pure black dark mode ===" && grep -rEn "#000000\b|rgb\(0,\s*0,\s*0\)" src/ --include="*.css" --include="*.scss" 2>/dev/null | head -5
354
- echo "=== BAN-06: Disable zoom ===" && grep -rEn "user-scalable=no|maximum-scale=1" public/ src/ 2>/dev/null
355
- echo "=== BAN-07: outline:none without replacement ===" && grep -rnE ":focus[[:space:]]*\{" src/ --include="*.css" --include="*.scss" 2>/dev/null | head -5
356
-
357
- # SLOP signals (-1 each)
358
- echo "=== SLOP-01: AI palette ===" && grep -rEn "#6366f1|#8b5cf6|#06b6d4" src/ 2>/dev/null | head -5
359
- echo "=== SLOP-04: backdrop-filter ===" && grep -rnE "backdrop-filter:[[:space:]]*blur" src/ --include="*.css" --include="*.scss" 2>/dev/null | head -5
360
-
361
- # Accessibility
362
- echo "=== A11Y: focus rings ===" && grep -rEn "outline:\s*none|outline:\s*0" src/ --include="*.css" --include="*.scss" 2>/dev/null | head -5
363
- echo "=== A11Y: reduced motion ===" && grep -rn "prefers-reduced-motion" src/ --include="*.css" --include="*.scss" 2>/dev/null | head -3
364
- echo "=== A11Y: div onClick ===" && grep -rEn "onClick.*div|<div.*onClick" src/ --include="*.tsx" --include="*.jsx" 2>/dev/null | head -5
365
- echo "=== A11Y: small font ===" && grep -rEn "font-size:\s*1[0-5]px|font-size:\s*[0-9]px" src/ --include="*.css" --include="*.scss" 2>/dev/null | head -5
366
- ```
367
-
368
- For each finding: record the count, a sample file:line, and severity (BAN = P0, SLOP = P1, A11Y = P0–P1 depending on type).
369
-
370
- ---
371
-
372
- ## Step 6 - Component Inventory
373
-
374
- If `--quick`, skip this step.
375
-
376
- ### Component pattern indicators
377
-
378
- A bare `grep -rln "className" src/` produces false positives on type-only files, test files, utility helpers, and server-only modules - none of which are components. Instead, use a three-pass multi-signal filter. A file qualifies as a component only when **all three indicators** match:
379
-
380
- 1. Has a JSX-like return: `grep -lE "return\s*\(" <file>`
381
- 2. Has className or class attribute usage: `grep -lE "className=|class=" <file>`
382
- 3. Has a component framework import: `grep -lE "from ['\"](react|preact|vue)" <file>`
383
-
384
- ```bash
385
- # Component inventory — three-pass filter (requires all three signals)
386
-
387
- # Pass 1: files with JSX-like return statements
388
- grep -rlE "return\s*\(" src/ --include="*.tsx" --include="*.jsx" 2>/dev/null \
389
- | grep -vE "\.test\.|\.spec\.|\.stories\." > /tmp/scan-pass1.txt
390
-
391
- # Pass 2: intersect with className/class presence
392
- grep -lE "className=|class=" $(cat /tmp/scan-pass1.txt) 2>/dev/null > /tmp/scan-pass2.txt
393
-
394
- # Pass 3: intersect with framework import (react, preact, or vue)
395
- grep -lE "from ['\"](react|preact|vue)" $(cat /tmp/scan-pass2.txt) 2>/dev/null > /tmp/components.txt
396
-
397
- # Count and list
398
- wc -l < /tmp/components.txt
399
- cat /tmp/components.txt
400
- ```
401
-
402
- This produces a component inventory that excludes false positives. The resulting file list is the authoritative component set for the rest of this step.
403
-
404
- ```bash
405
- # Count components by directory (from the filtered list)
406
- xargs dirname < /tmp/components.txt | sort | uniq -c | sort -rn | head -20
407
-
408
- # Look for design system component patterns
409
- grep -rEln "Button|Modal|Dialog|Toast|Tooltip|Badge|Card|Input|Select|Dropdown|Table|Tab|Accordion" \
410
- $(cat /tmp/components.txt) 2>/dev/null | grep -v node_modules | head -20
411
- ```
412
-
413
- Identify:
414
- - Core UI primitives that exist (Button, Input, Modal, etc.)
415
- - Which have design system-level implementation vs. one-off styles
416
- - Which are candidates for design system extraction
417
-
418
- ### `--full` mode per-file output
419
-
420
- If `--full` flag is set, emit one row per file in the component inventory:
421
-
422
- | File | Component Count | Styling Approach | Token Usage | Issues |
423
- |------|-----------------|------------------|-------------|--------|
424
- | src/components/Button.tsx | 1 | Tailwind | `var(--primary)`, p-4, gap-2 | heading weight dup |
425
- | src/components/Card.tsx | 1 | CSS Module | styles.card, rgb(...) | hardcoded color |
426
-
427
- Columns:
428
- - **File**: relative path from repo root
429
- - **Component Count**: number of exported components in file (grep `export.*function\|export.*const.*=.*\(.*=>`)
430
- - **Styling Approach**: `Tailwind` | `CSS Module` | `styled-components` | `inline` | `mixed`
431
- - **Token Usage**: comma-separated tokens/values found (max 5, "+N more" if there are more)
432
- - **Issues**: short flags for known problems (e.g., `hardcoded color`, `off-grid spacing`, `heading weight dup`)
433
-
434
- Without `--full`, the component inventory is a summary count only (not per-file).
435
-
436
- ---
437
-
438
- ## Step 7 - Score All 7 Categories
439
-
440
- Read `${CLAUDE_PLUGIN_ROOT}/reference/audit-scoring.md`. Score each category 0–10 based on what you found in Steps 1–6.
441
-
442
- Apply the weighted formula:
443
- ```
444
- Score = (Accessibility * 0.25) + (Visual Hierarchy * 0.20) + (Typography * 0.15)
445
- + (Color * 0.15) + (Layout * 0.10) + (Anti-Patterns * 0.10) + (Motion * 0.05)
446
- ```
447
-
448
- Calculate grade (A=90–100, B=75–89, C=60–74, D=45–59, F=0–44).
449
-
450
- ---
451
-
452
- ## Step 8 - Generate Design Debt Roadmap
453
-
454
- Collect all findings from Steps 1–6. Classify each:
455
-
456
- | Severity | Code | Rule |
457
- |---|---|---|
458
- | Blocker | P0 | BAN violations, contrast failures, keyboard nav broken |
459
- | Major | P1 | SLOP signals, no token layer, off-grid spacing, no scale system |
460
- | Minor | P2 | Reflex font without reason, inconsistent weights, redundant colors |
461
- | Cosmetic | P3 | Polish items, minor naming inconsistencies |
462
-
463
- Group into **debt themes**:
464
-
465
- 1. **Foundation** - token layer, design system architecture
466
- 2. **Typography** - scale, hierarchy, families
467
- 3. **Color** - palette, semantics, dark mode
468
- 4. **Accessibility** - contrast, focus, semantics, motion
469
- 5. **Anti-Patterns** - BAN + SLOP removals
470
- 6. **Components** - inconsistency, missing primitives
471
- 7. **Motion** - easing, duration, reduced-motion
472
-
473
- For each debt item, estimate effort:
474
- - `XS` - single-line grep-and-replace (< 30 min)
475
- - `S` - localized fix in 1–3 files (< 2h)
476
- - `M` - affects 5–15 files, requires testing (2–8h)
477
- - `L` - architectural change, touches 15+ files (1–3 days)
478
- - `XL` - design system rebuild (3+ days)
479
-
480
- ### Priority score for ordering DESIGN-DEBT.md entries
481
-
482
- Each debt item gets three scores:
483
-
484
- - **severity_weight**: `{ P0: 4, P1: 3, P2: 2, P3: 1 }`
485
- - **effort_weight**: `{ XS: 5, S: 4, M: 3, L: 2, XL: 1 }` - high effort = lower priority
486
- - **dependency_depth**: count of other debt items this fix unblocks
487
-
488
- Formula:
489
-
490
- ```
491
- priority_score = (severity_weight * effort_weight) + (dependency_depth * 2)
492
- ```
493
-
494
- Ordering rules:
495
- 1. Sort entries by `priority_score` descending (highest first)
496
- 2. Tiebreak: file count descending (more files affected = more impact)
497
- 3. Second tiebreak: alphabetical by item ID (D-001 before D-002)
498
-
499
- Example: A P1 issue (`severity_weight = 3`) with S effort (`effort_weight = 4`) that unblocks 2 other items (`dependency_depth = 2`) scores: `(3 * 4) + (2 * 2) = 16`. A P0 issue (`4`) with XL effort (`1`) with no dependencies scores: `(4 * 1) + 0 = 4`. The P1 ranks above the P0 despite lower severity because its XL effort makes the P0 low ROI.
500
-
501
- Identify **quick wins**: P1 issues with XS/S effort - these have the best ROI.
502
- Identify **blocking dependencies**: fixes that must happen before others (e.g., token layer before dark mode).
503
-
504
- ---
505
-
506
- ## Output 1: DESIGN.md
507
-
508
- Write `DESIGN.md` at the project root:
509
-
510
- ```markdown
511
- ---
512
- generated: [ISO 8601]
513
- tool: get-design-done scan
514
- score: [N]/100 ([grade])
515
- framework: [name]
516
- css_approach: [tailwind | css-modules | styled-components | plain-css | mixed]
517
- token_layer: true | false
518
- ---
519
-
520
- # Design System Snapshot — [Project Name]
521
-
522
- > Auto-generated by get-design-done scan. Update manually when the system evolves.
523
-
524
- ## Current Score
525
-
526
- | Category | Score | Grade |
527
- |---|---|---|
528
- | Accessibility | [N]/10 | |
529
- | Visual Hierarchy | [N]/10 | |
530
- | Typography | [N]/10 | |
531
- | Color | [N]/10 | |
532
- | Layout & Spacing | [N]/10 | |
533
- | Anti-Patterns | [N]/10 | |
534
- | Motion | [N]/10 | |
535
- | **Weighted Total** | **[N]/100** | **[grade]** |
536
-
537
- ## Color System
538
-
539
- **Token layer:** [Yes — CSS custom properties / No — raw values in components]
540
-
541
- **Palette inventory:**
542
- | Color | Hex | Role | Occurrences | Issues |
543
- |---|---|---|---|---|
544
- | Primary | #[hex] | [inferred role] | [N] | [any issues] |
545
-
546
- **Semantic consistency:** [Pass / Fail — describe]
547
- **Dark mode:** [Yes / No / Partial] — [pure black: yes/no]
548
- **AI-slop palette present:** [Yes (#6366f1 etc.) / No]
549
-
550
- ## Typography System
551
-
552
- **Families used:** [family 1], [family 2]
553
- **Scale:** [defined modular scale / ad-hoc px values / Tailwind defaults]
554
-
555
- | Token | Size | Found occurrences | Scale-compliant |
556
- |---|---|---|---|
557
- | body | [Npx] | [N] | [check/cross] |
558
- | sm | [Npx] | [N] | [check/cross] |
559
-
560
- **Line-height body:** [value] ([pass >=1.5 / fail])
561
- **Weight hierarchy:** [described]
562
- **Off-scale values found:** [list any non-standard sizes]
563
-
564
- ## Spacing System
565
-
566
- **Grid:** [8pt / 4pt / ad-hoc / Tailwind defaults]
567
- **Non-grid values found:** [list off-grid values with occurrence count]
568
-
569
- ## Component Inventory
570
-
571
- **Total components:** [N]
572
- **With consistent styling:** [N] (~[N]%)
573
- **Core primitives present:** [Button check, Input check, Modal cross, Toast cross, ...]
574
-
575
- ## Anti-Pattern Status
576
-
577
- | Pattern | Status | Occurrences | Locations |
578
- |---|---|---|---|
579
- | BAN-01: Side-stripe border | [Clear / Found] | [N] | [file:line] |
580
- | BAN-02: Gradient text | [Clear / Found] | [N] | |
581
- | BAN-03: Bounce easing | [Clear / Found] | [N] | |
582
- | BAN-07: outline:none | [Clear / Found] | [N] | |
583
- | BAN-08: transition:all | [Clear / Found] | [N] | |
584
- | SLOP-01: AI palette | [Clear / Found] | [N] | |
585
- | SLOP-04: backdrop-filter | [Clear / Found] | [N] | |
586
-
587
- ## Motion / Animation
588
-
589
- **prefers-reduced-motion:** [Implemented / Missing]
590
- **Easing used:** [list found easing values]
591
- **Bounce/elastic:** [Found / None]
592
- ```
593
-
594
- ---
595
-
596
- ## Output 2: .design/DESIGN-DEBT.md
597
-
598
- Create `.design/` if needed. Write `.design/DESIGN-DEBT.md`:
599
-
600
- ```markdown
601
- ---
602
- generated: [ISO 8601]
603
- score: [N]/100 ([grade])
604
- p0_count: [N]
605
- p1_count: [N]
606
- p2_count: [N]
607
- p3_count: [N]
608
- ---
609
-
610
- # Design Debt — [Project Name]
611
-
612
- > Prioritized roadmap of design issues found by get-design-done scan.
613
- > Fix P0s before shipping. Work through P1s in priority order.
614
- > Quick wins (P1 + XS/S effort) are marked with lightning bolt.
615
-
616
- ## Summary
617
-
618
- | Severity | Count | Est. Total Effort |
619
- |---|---|---|
620
- | P0 Blocker | [N] | [sum of estimates] |
621
- | P1 Major | [N] | [sum] |
622
- | P2 Minor | [N] | [sum] |
623
- | P3 Cosmetic | [N] | [sum] |
624
-
625
- **Category score to improve first:** [lowest-scoring category] ([N]/10) — highest impact on overall score.
626
-
627
- ---
628
-
629
- ## P0 — Blockers (fix before shipping)
630
-
631
- ### D-001 — [Issue title]
632
- Category: [scoring category]
633
- Theme: [foundation | typography | color | accessibility | anti-patterns | components | motion]
634
- Severity: [P0/P1/P2/P3]
635
- Effort: [XS/S/M/L/XL]
636
- priority_score: [computed: (severity_weight * effort_weight) + (dependency_depth * 2)]
637
- Description: [What the issue is and where it was found]
638
- Evidence: [file:line or grep pattern that found it]
639
- Fix: [Concrete steps to fix — specific enough to execute without extra research]
640
- Acceptance: [What pass looks like — verifiable]
641
- Depends on: [D-XXX if this fix requires another fix first, else "none"]
642
- Dependency depth: [N — count of items this fix unblocks]
643
-
644
- ---
645
-
646
- ## P1 — Major (fix in current design pass)
647
-
648
- ### D-010 — [Issue title] (quick-win)
649
- Category: [category]
650
- Theme: [theme]
651
- Severity: P1
652
- Effort: XS
653
- priority_score: [computed: (3 * 5) + (dependency_depth * 2) = 15+]
654
- Description: [...]
655
- Evidence: [...]
656
- Fix: [...]
657
- Acceptance: [...]
658
- Dependency depth: [N]
659
-
660
- ---
661
-
662
- ## P2 — Minor (fix if time allows)
663
-
664
- [same structure]
665
-
666
- ---
667
-
668
- ## P3 — Cosmetic (deferred to polish pass)
669
-
670
- [same structure]
671
-
672
- ---
673
-
674
- ## Recommended Fix Order
675
-
676
- Based on dependencies and ROI:
677
-
678
- 1. **[D-XXX]** — [title] (unblocks [D-XXX, D-XXX])
679
- 2. **[D-XXX]** — quick win
680
- 3. **[D-XXX]** — [title]
681
- ...
682
-
683
- ## Pipeline Recommendation
684
-
685
- Given the scan results:
686
-
687
- ```
688
- Suggested first pipeline run:
689
- /get-design-done:discover `--auto`
690
- -> Will use DESIGN.md as baseline context
691
- /get-design-done:plan
692
- -> Scope: address all P0s + top 5 P1s
693
- /get-design-done:design
694
- /get-design-done:verify
695
- -> Target score: [current + 15 points minimum]
696
- ```
697
-
698
- Focus areas for first design pass:
699
- 1. [highest-impact category]: [specific what to fix]
700
- 2. [second-highest-impact]: [specific what to fix]
701
- 3. Quick wins: [D-XXX], [D-XXX], [D-XXX] (all XS effort, instant score gain)
702
- ```
703
-
704
- ---
705
-
706
- ## After Writing
707
-
708
- ```
709
- === Scan complete ===
710
- Project: [name]
711
- Score: [N]/100 ([grade])
712
- P0 blockers: [N]
713
- P1 major: [N]
714
- Quick wins: [N] (P1 + XS/S effort)
715
-
716
- Artifacts written:
717
- DESIGN.md — design system snapshot
718
- .design/DESIGN-DEBT.md — prioritized debt roadmap
719
-
720
- Next steps:
721
- Option A — Start the pipeline:
722
- /get-design-done:discover
723
- (DESIGN.md will be used as baseline context)
724
-
725
- Option B — Fix quick wins first, then start:
726
- [list top 3 quick win fixes inline]
727
- Then: /get-design-done:discover
728
-
729
- Option C — Just reference the debt:
730
- DESIGN-DEBT.md is your backlog. Filter by theme or severity.
731
- =====================
732
- ```