@hegemonart/get-design-done 1.28.0 → 1.28.6

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 (98) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +134 -0
  4. package/SKILL.md +1 -1
  5. package/hooks/gdd-decision-injector.js +149 -3
  6. package/package.json +1 -1
  7. package/reference/adr-format.md +96 -0
  8. package/reference/architecture-vocabulary.md +102 -0
  9. package/reference/context-md-format.md +106 -0
  10. package/reference/heuristics.md +84 -0
  11. package/reference/registry.json +29 -1
  12. package/reference/registry.schema.json +1 -1
  13. package/reference/shared-preamble.md +78 -6
  14. package/reference/skill-authoring-contract.md +159 -0
  15. package/scripts/validate-skill-length.cjs +283 -0
  16. package/skills/add-backlog/SKILL.md +1 -0
  17. package/skills/analyze-dependencies/SKILL.md +33 -122
  18. package/skills/apply-reflections/SKILL.md +1 -40
  19. package/skills/apply-reflections/apply-reflections-procedure.md +68 -0
  20. package/skills/audit/SKILL.md +3 -1
  21. package/skills/bandit-status/SKILL.md +31 -66
  22. package/skills/benchmark/SKILL.md +15 -55
  23. package/skills/brief/SKILL.md +12 -1
  24. package/skills/cache-manager/SKILL.md +3 -57
  25. package/skills/cache-manager/cache-policy.md +126 -0
  26. package/skills/check-update/SKILL.md +38 -75
  27. package/skills/compare/SKILL.md +29 -269
  28. package/skills/compare/compare-rubric.md +171 -0
  29. package/skills/complete-cycle/SKILL.md +1 -1
  30. package/skills/connections/SKILL.md +21 -427
  31. package/skills/connections/connections-onboarding.md +417 -0
  32. package/skills/continue/SKILL.md +1 -0
  33. package/skills/darkmode/SKILL.md +32 -287
  34. package/skills/darkmode/darkmode-audit-procedure.md +258 -0
  35. package/skills/debug/SKILL.md +11 -8
  36. package/skills/debug/debug-feedback-loops.md +119 -0
  37. package/skills/design/SKILL.md +27 -245
  38. package/skills/design/design-procedure.md +304 -0
  39. package/skills/discover/SKILL.md +26 -133
  40. package/skills/discover/discover-procedure.md +204 -0
  41. package/skills/discuss/SKILL.md +18 -2
  42. package/skills/explore/SKILL.md +40 -205
  43. package/skills/explore/explore-procedure.md +267 -0
  44. package/skills/fast/SKILL.md +1 -0
  45. package/skills/figma-write/SKILL.md +2 -2
  46. package/skills/health/SKILL.md +11 -33
  47. package/skills/health/health-mcp-detection.md +44 -0
  48. package/skills/health/health-skill-length-report.md +69 -0
  49. package/skills/help/SKILL.md +1 -0
  50. package/skills/list-assumptions/SKILL.md +1 -0
  51. package/skills/map/SKILL.md +8 -31
  52. package/skills/new-cycle/SKILL.md +3 -1
  53. package/skills/new-cycle/milestone-completeness-rubric.md +87 -0
  54. package/skills/next/SKILL.md +1 -0
  55. package/skills/note/SKILL.md +1 -0
  56. package/skills/optimize/SKILL.md +21 -44
  57. package/skills/pause/SKILL.md +1 -0
  58. package/skills/peer-cli-add/SKILL.md +26 -108
  59. package/skills/peer-cli-add/peer-cli-protocol.md +161 -0
  60. package/skills/peer-cli-customize/SKILL.md +22 -42
  61. package/skills/peers/SKILL.md +33 -57
  62. package/skills/plan/SKILL.md +33 -220
  63. package/skills/plan/plan-procedure.md +278 -0
  64. package/skills/plant-seed/SKILL.md +1 -0
  65. package/skills/pr-branch/SKILL.md +1 -0
  66. package/skills/progress/SKILL.md +1 -7
  67. package/skills/quality-gate/SKILL.md +34 -166
  68. package/skills/quality-gate/threat-modeling.md +101 -0
  69. package/skills/quick/SKILL.md +1 -0
  70. package/skills/reapply-patches/SKILL.md +1 -0
  71. package/skills/recall/SKILL.md +1 -0
  72. package/skills/resume/SKILL.md +1 -0
  73. package/skills/review-backlog/SKILL.md +1 -0
  74. package/skills/router/SKILL.md +3 -59
  75. package/skills/router/router-rules.md +84 -0
  76. package/skills/scan/SKILL.md +36 -675
  77. package/skills/scan/scan-procedure.md +731 -0
  78. package/skills/settings/SKILL.md +1 -0
  79. package/skills/ship/SKILL.md +1 -0
  80. package/skills/sketch/SKILL.md +1 -1
  81. package/skills/sketch-wrap-up/SKILL.md +13 -54
  82. package/skills/spike/SKILL.md +1 -1
  83. package/skills/spike-wrap-up/SKILL.md +12 -46
  84. package/skills/start/SKILL.md +13 -112
  85. package/skills/start/start-procedure.md +115 -0
  86. package/skills/stats/SKILL.md +1 -0
  87. package/skills/style/SKILL.md +18 -140
  88. package/skills/style/style-doc-procedure.md +150 -0
  89. package/skills/synthesize/SKILL.md +1 -0
  90. package/skills/timeline/SKILL.md +1 -0
  91. package/skills/todo/SKILL.md +1 -0
  92. package/skills/turn-closeout/SKILL.md +36 -56
  93. package/skills/undo/SKILL.md +1 -0
  94. package/skills/update/SKILL.md +1 -0
  95. package/skills/verify/SKILL.md +42 -457
  96. package/skills/verify/verify-procedure.md +512 -0
  97. package/skills/warm-cache/SKILL.md +3 -35
  98. package/skills/zoom-out/SKILL.md +26 -0
@@ -0,0 +1,171 @@
1
+ ---
2
+ name: compare-rubric
3
+ type: heuristic
4
+ version: 1.0.0
5
+ phase: 28.5
6
+ tags: [compare, delta, drift, scoring, rubric, extracted]
7
+ last_updated: 2026-05-18
8
+ ---
9
+
10
+ Source: extracted from `skills/compare/SKILL.md` (Phase 28.5 rework — D-10 extract-then-link).
11
+ The skill's load-bearing workflow stays in `../skills/compare/SKILL.md`; this file holds the
12
+ delta-computation methodology, anti-pattern set arithmetic, drift-detection coverage map,
13
+ and the `COMPARE-REPORT.md` template the skill writes.
14
+
15
+ # Compare Rubric — Baseline vs Result Delta Methodology
16
+
17
+ Detailed methodology for the `get-design-done:compare` standalone command — companion to
18
+ `../skills/compare/SKILL.md`. Read this file when executing a specific compare step (score
19
+ delta math, anti-pattern set arithmetic, drift coverage map, report layout). The SKILL.md
20
+ keeps the load-bearing pre-flight checks + step routing; this file holds the deep methodology.
21
+
22
+ See `./shared-preamble.md#output-contract-reminders` for the per-skill output discipline and
23
+ `./audit-scoring.md` for the 0–10 category-scoring rubric the delta is computed against.
24
+
25
+ ---
26
+
27
+ ## Step 1 — Parse Category Scores
28
+
29
+ **Extract baseline scores from `.design/DESIGN.md`:** locate the category score table (rows like `| Accessibility | 6/10 | ... |`). Parse each row: extract category name + numeric score. Store as `baseline_scores` map.
30
+
31
+ **Extract result scores from `.design/DESIGN-VERIFICATION.md`:** locate the same table in the Phase 1 output section. Store as `result_scores` map.
32
+
33
+ **Normalize category names:**
34
+ - Strip leading/trailing whitespace.
35
+ - Apply title-case normalization (e.g., `anti-patterns` → `Anti-Patterns`).
36
+ - Match categories case-insensitively between the two tables.
37
+
38
+ **Unmatched categories:**
39
+ - Baseline-only → flag `[UNMATCHED-BASELINE]`, exclude from score delta.
40
+ - Result-only → flag `[UNMATCHED-RESULT]`, exclude from score delta.
41
+ - Report all unmatched categories in the Notes section. Do NOT silently paper over mismatches.
42
+
43
+ ## Step 2 — Compute Score Delta (COMP-03)
44
+
45
+ For each matched category: `delta = result_scores[category] - baseline_scores[category]`.
46
+
47
+ Classify:
48
+ - `improvement` — delta > 0
49
+ - `no_change` — delta == 0
50
+ - `regression` — delta < 0
51
+
52
+ Record per category: name, baseline score, result score, signed delta, classification. Collect regressed categories for drift detection in Step 5.
53
+
54
+ ## Step 3 — Anti-Pattern Delta
55
+
56
+ Enumerate anti-patterns in both files (entries identified by BAN-*, SLOP-*, or labeled as anti-patterns). Collect identifiers or descriptions as sets.
57
+
58
+ Compute set arithmetic:
59
+
60
+ ```
61
+ resolved = baseline_anti_patterns - result_anti_patterns
62
+ (present in baseline, absent in result — fixed)
63
+
64
+ new = result_anti_patterns - baseline_anti_patterns
65
+ (absent in baseline, present in result — introduced)
66
+
67
+ unchanged = intersection of both sets
68
+ (still present in both)
69
+ ```
70
+
71
+ Report all three groups in the output report.
72
+
73
+ ## Step 4 — Must-Have Pass/Fail Change
74
+
75
+ **Skip condition:** if `.design/DESIGN-CONTEXT.md` is absent → emit note and skip this section.
76
+
77
+ Read `<must_haves>` from `DESIGN-CONTEXT.md` (each must-have has ID + description). Read pass/fail status from `DESIGN-VERIFICATION.md` (must-have status table). For each must-have: record `pass`, `fail`, or `not-evaluated`. If `DESIGN.md` contained a prior must-have status section, compute the change (`pass→fail`, `fail→pass`); otherwise report current status only.
78
+
79
+ ## Step 5 — Design Drift Detection (COMP-04)
80
+
81
+ **Skip condition:** if `.design/DESIGN-PLAN.md` is absent → emit `"Drift detection skipped: DESIGN-PLAN.md not found."` in the Drift section.
82
+
83
+ **Coverage map:** read `DESIGN-PLAN.md` and extract the `Type:` field from each task. Build a map of which design categories have at least one task of matching Type:
84
+
85
+ ```
86
+ Type: accessibility → covers "Accessibility" category
87
+ Type: color → covers "Color" category
88
+ Type: typography → covers "Typography" category
89
+ Type: visual-hierarchy → covers "Visual Hierarchy" category
90
+ ```
91
+
92
+ Category-to-Type matching is case-insensitive and normalized.
93
+
94
+ **Drift check:** for each category classified as `regression` in Step 2: if category NOT in coverage_map → emit `DRIFT: [category] regressed from <baseline> to <result> without a design task of Type:<category>`.
95
+
96
+ Emit `"No drift detected. All regressed categories are covered by tasks in DESIGN-PLAN.md."` if all regressed categories are covered. Emit `"No drift detected. No score regressions found."` if no regressions in Step 2.
97
+
98
+ ## Step 5B — Screenshot Delta (when preview: available)
99
+
100
+ Check `preview` status from `.design/STATE.md <connections>` (written by the probe at stage entry — see `./shared-preamble.md#connection-handshake-summary`).
101
+
102
+ **If `preview: available`:**
103
+
104
+ 1. `preview_start` if no session is already running.
105
+ 2. For each route inferred from `DESIGN-PLAN.md` tasks or `src/app/` / `src/pages/` file structure:
106
+ a. `preview_navigate` to route URL (e.g., `http://localhost:3000/<route>`).
107
+ b. `preview_screenshot` → save to `.design/screenshots/before/<route>.png` (only if a prior baseline exists at this path) and `.design/screenshots/after/<route>.png` (current render).
108
+ c. Record reference paths (NOT base64) for embedding in the `## Screenshot Delta` section.
109
+ 3. `preview_stop` when all routes are captured.
110
+
111
+ **If `preview: unavailable` or `preview: not_configured`:** emit exactly `Screenshot delta skipped — preview not configured.`
112
+
113
+ ## Step 6 — COMPARE-REPORT.md Template
114
+
115
+ Output path: `.design/COMPARE-REPORT.md`. This file MUST NOT be written to any pipeline-reserved path.
116
+
117
+ ```markdown
118
+ # Compare Report: Baseline vs Result
119
+
120
+ **Generated:** <ISO 8601 date>
121
+ **Baseline:** .design/DESIGN.md
122
+ **Result:** .design/DESIGN-VERIFICATION.md
123
+
124
+ ## Score Delta by Category
125
+
126
+ | Category | Baseline | Result | Delta | Status |
127
+ |----------|----------|--------|-------|--------|
128
+ | Accessibility | 6 | 8 | +2 | improvement |
129
+ | Visual Hierarchy | 5 | 5 | 0 | no_change |
130
+ | Anti-Patterns | 4 | 3 | -1 | regression |
131
+
132
+ ## Anti-Pattern Delta
133
+
134
+ **Resolved** (present in baseline, absent in result):
135
+ - <anti-pattern id or description>
136
+
137
+ **New** (absent in baseline, present in result):
138
+ - <anti-pattern id or description>
139
+
140
+ **Unchanged:**
141
+ - <anti-pattern id or description>
142
+
143
+ ## Must-Have Status
144
+
145
+ | Must-Have | Status |
146
+ |-----------|--------|
147
+ | <id / description> | pass |
148
+ | <id / description> | fail |
149
+ | <id / description> | not-evaluated |
150
+
151
+ ## Design Drift
152
+
153
+ <One of: "No drift detected. ..." | "DRIFT: [Category] regressed ..." | "Drift detection skipped: DESIGN-PLAN.md not found.">
154
+
155
+ ## Screenshot Delta
156
+
157
+ <Per-route screenshot pairs OR "Screenshot delta skipped — preview not configured.">
158
+
159
+ ## Notes
160
+
161
+ Scope: delta between two existing artifacts (.design/DESIGN.md → .design/DESIGN-VERIFICATION.md).
162
+ No snapshot mechanism — multi-snapshot compare deferred to V2-06.
163
+ This report does not modify DESIGN.md, DESIGN-VERIFICATION.md, or any other pipeline artifact.
164
+ <List any UNMATCHED-BASELINE or UNMATCHED-RESULT categories here, if any.>
165
+ ```
166
+
167
+ If a section has no items (e.g., no anti-patterns in baseline), write "None."
168
+
169
+ ---
170
+
171
+ *Imported by: `../skills/compare/SKILL.md`. Maintained as part of Phase 28.5 (Bucket 2 rework — D-10).*
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: gdd-complete-cycle
3
- description: "Archive current cycle artifacts and prepare for the next cycle. Updates CYCLES.md, moves artifacts to .design/archive/cycle-N/."
3
+ description: "Cycle closeout command that marks CYCLES.md entry complete, archives pipeline artifacts to .design/archive/cycle-N/, generates EXPERIENCE.md, rebuilds the search index, and resets STATE.md. Use when a design cycle has shipped and you're ready to start the next one."
4
4
  argument-hint: "[<retrospective note>]"
5
5
  tools: Read, Write, Bash, AskUserQuestion
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
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."
3
+ description: "Interactive onboarding wizard for the 12 external integrations the pipeline supports — probes all (`figma`, `refero`, `preview`, `storybook`, `chromatic`, `graphify`, `pinterest`, `claude-design`, `paper-design`, `pencil-dev`, `21st-dev`, `magic-patterns`), recommends based on project type, walks the user through setup (auto-run MCP install or copy-command fallback), writes results to `STATE.md <connections>`. Use after `/gdd:new-project` or whenever the user wants to add, inspect, or skip a connection. Re-runnable anytime."
4
4
  argument-hint: "[list | <connection-name> | --auto]"
5
5
  user-invocable: true
6
6
  tools: Read, Write, Bash, Glob, Grep, AskUserQuestion, ToolSearch
@@ -10,7 +10,9 @@ tools: Read, Write, Bash, Glob, Grep, AskUserQuestion, ToolSearch
10
10
 
11
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
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.
13
+ Canonical per-connection specs live in `../../connections/<name>.md` (one file per integration). The capability matrix + probe-pattern spec live in `../../connections/connections.md`. This skill is the **user-facing front end** for those specs.
14
+
15
+ For the 12 probe scripts (MCP + HTTP + CLI + file probes), bucket categorization, per-connection setup screen, auto-run eligibility matrix, value-prop one-liners, and STATE.md / config.json write contracts, see `./connections-onboarding.md`. For the cross-skill probe pattern + connection-handshake summary, see `../../reference/shared-preamble.md#connection-handshake-summary`. For the cross-skill output discipline, see `../../reference/shared-preamble.md#output-contract-reminders`.
14
16
 
15
17
  ---
16
18
 
@@ -27,444 +29,36 @@ Canonical connection specs live in `connections/*.md`. The capability matrix and
27
29
 
28
30
  ## State Integration
29
31
 
30
- 1. Read `.design/STATE.md` — if missing, that's fine; this skill does not require a pipeline run to be in progress.
32
+ 1. Read `.design/STATE.md` — if missing, that's fine; this skill does not require a pipeline run.
31
33
  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).
34
+ 3. Read `connections.skip[]` from config — never re-prompt for skipped connections.
33
35
  4. Update `last_checkpoint` in STATE.md at skill exit if STATE.md exists.
34
36
 
35
37
  ---
36
38
 
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
- ```
39
+ ## Workflow
95
40
 
96
- ### Non-MCP probes
41
+ 1. **Probe all 12 connections** — run every probe script per `./connections-onboarding.md#step-1--probe-all-12-connections`. MCP probes use `ToolSearch` first; HTTP / CLI / file probes follow non-MCP patterns. Merge results into `STATE.md <connections>` with the three-value schema (`available | unavailable | not_configured`) — never add new values.
42
+ 2. **Categorize + build summary** — bucket each probe result (available / recommended / optional / skipped / unavailable) using project-hint detection. Detail + recommendation mapping: `./connections-onboarding.md#step-2--bucket-categorization`.
43
+ 3. **Print summary table** — show buckets + value-prop one-liners (verbatim from `./connections-onboarding.md#step-3--summary-table`).
44
+ 4. **Route by mode** — `list` / `--auto` exits after summary; `<name>` jumps straight to Step 5; default mode opens an AskUserQuestion (configure recommended / pick one by one / configure all optional / re-check specific / exit). Routing detail: `./connections-onboarding.md#step-4--route-by-mode`.
45
+ 5. **Per-connection setup screen** — for each target: read `connections/<name>.md`, present the setup screen, AskUserQuestion (run now / copy-paste / skip / never ask). Auto-run only if reversible (see eligibility matrix). On success: append name to `connections_onboarding.pending_verification[]`. Detail: `./connections-onboarding.md#step-5--per-connection-setup-screen`.
46
+ 6. **Verification pass** — re-probe every name in `pending_verification[]`. Available → remove. `not_configured` → leave (needs session restart). `unavailable` → leave + note OAuth needed. Print "Setup complete" summary. Detail: `./connections-onboarding.md#step-6--verification-pass`.
97
47
 
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.
48
+ If `.design/config.json > connections_onboarding.pending_verification[]` is non-empty at entry → enter **resume flow**: run Step 6 immediately; if clean, exit; otherwise fall through to Step 3. Detail: `./connections-onboarding.md#resumability`.
457
49
 
458
50
  ---
459
51
 
460
52
  ## Do Not
461
53
 
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.
54
+ Per `./connections-onboarding.md#do-not`:
55
+
56
+ - Never run `npm install -g` globals automatically.
57
+ - Never write to `~/.bashrc`, `~/.zshrc`, or shell RC files.
464
58
  - 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.
59
+ - Never auto-restart the Claude Code session.
60
+ - Never re-prompt for names in `connections.skip[]`.
61
+ - Never overwrite existing `<connections>` entries that this skill did not probe merge only.
468
62
 
469
63
  ---
470
64