@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.
- package/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +134 -0
- package/SKILL.md +1 -1
- package/hooks/gdd-decision-injector.js +149 -3
- package/package.json +1 -1
- package/reference/adr-format.md +96 -0
- package/reference/architecture-vocabulary.md +102 -0
- package/reference/context-md-format.md +106 -0
- package/reference/heuristics.md +84 -0
- package/reference/registry.json +29 -1
- package/reference/registry.schema.json +1 -1
- package/reference/shared-preamble.md +78 -6
- package/reference/skill-authoring-contract.md +159 -0
- package/scripts/validate-skill-length.cjs +283 -0
- package/skills/add-backlog/SKILL.md +1 -0
- package/skills/analyze-dependencies/SKILL.md +33 -122
- package/skills/apply-reflections/SKILL.md +1 -40
- package/skills/apply-reflections/apply-reflections-procedure.md +68 -0
- package/skills/audit/SKILL.md +3 -1
- package/skills/bandit-status/SKILL.md +31 -66
- package/skills/benchmark/SKILL.md +15 -55
- package/skills/brief/SKILL.md +12 -1
- package/skills/cache-manager/SKILL.md +3 -57
- package/skills/cache-manager/cache-policy.md +126 -0
- package/skills/check-update/SKILL.md +38 -75
- package/skills/compare/SKILL.md +29 -269
- package/skills/compare/compare-rubric.md +171 -0
- package/skills/complete-cycle/SKILL.md +1 -1
- package/skills/connections/SKILL.md +21 -427
- package/skills/connections/connections-onboarding.md +417 -0
- package/skills/continue/SKILL.md +1 -0
- package/skills/darkmode/SKILL.md +32 -287
- package/skills/darkmode/darkmode-audit-procedure.md +258 -0
- package/skills/debug/SKILL.md +11 -8
- package/skills/debug/debug-feedback-loops.md +119 -0
- package/skills/design/SKILL.md +27 -245
- package/skills/design/design-procedure.md +304 -0
- package/skills/discover/SKILL.md +26 -133
- package/skills/discover/discover-procedure.md +204 -0
- package/skills/discuss/SKILL.md +18 -2
- package/skills/explore/SKILL.md +40 -205
- package/skills/explore/explore-procedure.md +267 -0
- package/skills/fast/SKILL.md +1 -0
- package/skills/figma-write/SKILL.md +2 -2
- package/skills/health/SKILL.md +11 -33
- package/skills/health/health-mcp-detection.md +44 -0
- package/skills/health/health-skill-length-report.md +69 -0
- package/skills/help/SKILL.md +1 -0
- package/skills/list-assumptions/SKILL.md +1 -0
- package/skills/map/SKILL.md +8 -31
- package/skills/new-cycle/SKILL.md +3 -1
- package/skills/new-cycle/milestone-completeness-rubric.md +87 -0
- package/skills/next/SKILL.md +1 -0
- package/skills/note/SKILL.md +1 -0
- package/skills/optimize/SKILL.md +21 -44
- package/skills/pause/SKILL.md +1 -0
- package/skills/peer-cli-add/SKILL.md +26 -108
- package/skills/peer-cli-add/peer-cli-protocol.md +161 -0
- package/skills/peer-cli-customize/SKILL.md +22 -42
- package/skills/peers/SKILL.md +33 -57
- package/skills/plan/SKILL.md +33 -220
- package/skills/plan/plan-procedure.md +278 -0
- package/skills/plant-seed/SKILL.md +1 -0
- package/skills/pr-branch/SKILL.md +1 -0
- package/skills/progress/SKILL.md +1 -7
- package/skills/quality-gate/SKILL.md +34 -166
- package/skills/quality-gate/threat-modeling.md +101 -0
- package/skills/quick/SKILL.md +1 -0
- package/skills/reapply-patches/SKILL.md +1 -0
- package/skills/recall/SKILL.md +1 -0
- package/skills/resume/SKILL.md +1 -0
- package/skills/review-backlog/SKILL.md +1 -0
- package/skills/router/SKILL.md +3 -59
- package/skills/router/router-rules.md +84 -0
- package/skills/scan/SKILL.md +36 -675
- package/skills/scan/scan-procedure.md +731 -0
- package/skills/settings/SKILL.md +1 -0
- package/skills/ship/SKILL.md +1 -0
- package/skills/sketch/SKILL.md +1 -1
- package/skills/sketch-wrap-up/SKILL.md +13 -54
- package/skills/spike/SKILL.md +1 -1
- package/skills/spike-wrap-up/SKILL.md +12 -46
- package/skills/start/SKILL.md +13 -112
- package/skills/start/start-procedure.md +115 -0
- package/skills/stats/SKILL.md +1 -0
- package/skills/style/SKILL.md +18 -140
- package/skills/style/style-doc-procedure.md +150 -0
- package/skills/synthesize/SKILL.md +1 -0
- package/skills/timeline/SKILL.md +1 -0
- package/skills/todo/SKILL.md +1 -0
- package/skills/turn-closeout/SKILL.md +36 -56
- package/skills/undo/SKILL.md +1 -0
- package/skills/update/SKILL.md +1 -0
- package/skills/verify/SKILL.md +42 -457
- package/skills/verify/verify-procedure.md +512 -0
- package/skills/warm-cache/SKILL.md +3 -35
- package/skills/zoom-out/SKILL.md +26 -0
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: discover-procedure
|
|
3
|
+
type: meta-rules
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
phase: 28.5
|
|
6
|
+
tags: [discover, procedure, extracted, pipeline-stage, connection-probe, design-context-builder]
|
|
7
|
+
last_updated: 2026-05-18
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
Source: extracted from `skills/discover/SKILL.md` (Phase 28.5 rework — D-10 extract-then-link).
|
|
11
|
+
The skill's load-bearing workflow stays in `../skills/discover/SKILL.md`; this file holds the
|
|
12
|
+
detail the agent reaches for when executing a specific step (state integration, three
|
|
13
|
+
connection probes, design-context-builder + design-context-checker agent prompts, lazy gate
|
|
14
|
+
prompt, auto-mode CSS detection).
|
|
15
|
+
|
|
16
|
+
# Discover Procedure
|
|
17
|
+
|
|
18
|
+
Detailed procedure for the get-design-done `discover` Stage 1.5 orchestrator. Companion to
|
|
19
|
+
`../skills/discover/SKILL.md`. Read this file when executing a specific discover step.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## State Integration
|
|
24
|
+
|
|
25
|
+
1. Read `.design/STATE.md`.
|
|
26
|
+
- If missing: create minimal skeleton from `reference/STATE-TEMPLATE.md` with stage=discover, status=in_progress, task_progress=0/1, and log warning: "STATE.md not found — created fresh. If this is a resumed session, run /get-design-done:scan first."
|
|
27
|
+
- If present and stage==discover and status==in_progress: RESUME — continue existing interview; do not reset.
|
|
28
|
+
- Otherwise: normal transition — set frontmatter stage=discover, <position> stage=discover, status=in_progress, task_progress=0/1.
|
|
29
|
+
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). See §Connection Probes below.
|
|
30
|
+
3. Update last_checkpoint. Write STATE.md.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Connection Probes
|
|
35
|
+
|
|
36
|
+
### A — Figma probe (variant-agnostic)
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
A1. ToolSearch({ query: "figma get_metadata use_figma", max_results: 10 })
|
|
40
|
+
A2. Parse tool names matching /^mcp__([^_]*figma[^_]*)__(get_metadata|use_figma)$/i
|
|
41
|
+
into read-capable and write-capable prefix sets.
|
|
42
|
+
A3. Empty read set -> figma: not_configured (skip all Figma paths)
|
|
43
|
+
One or more matches -> pick prefix via tiebreaker:
|
|
44
|
+
(1) both-sets > reads-only,
|
|
45
|
+
(2) `figma` > others,
|
|
46
|
+
(3) non-`figma-desktop` > desktop,
|
|
47
|
+
(4) alphabetical.
|
|
48
|
+
A4. Call {prefix}get_metadata:
|
|
49
|
+
Success -> figma: available (prefix=mcp__<prefix>__, writes=<true|false>)
|
|
50
|
+
Error -> figma: unavailable
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### B — Refero probe (ToolSearch presence is sufficient — no tool call needed)
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
B1. ToolSearch({ query: "refero", max_results: 5 })
|
|
57
|
+
B2. Empty result -> refero: not_configured
|
|
58
|
+
Non-empty -> refero: available
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### C — Pinterest probe (ToolSearch-only, same pattern as Refero)
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
C1. ToolSearch({ query: "mcp-pinterest", max_results: 5 })
|
|
65
|
+
C2. Empty result -> pinterest: not_configured
|
|
66
|
+
Non-empty -> pinterest: available
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
No live `pinterest_search` call at probe time — ToolSearch presence is sufficient. The synthesizer makes the actual search calls.
|
|
70
|
+
|
|
71
|
+
After all probes (A, B, C), update `.design/STATE.md` `<connections>` with the results and continue. Downstream stages (design-context-builder) read `<connections>` from STATE.md rather than re-probing.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Auto Mode
|
|
76
|
+
|
|
77
|
+
Auto Mode CSS detection (when `auto_mode: true` is passed to the builder):
|
|
78
|
+
|
|
79
|
+
1. If tailwind.config.{js,cjs,mjs,ts} exists -> Tailwind-only project
|
|
80
|
+
- Skip CSS file grep
|
|
81
|
+
- Parse tailwind.config for color palette, spacing scale, font families
|
|
82
|
+
- Use tailwind.config values as the baseline style signal
|
|
83
|
+
2. Else -> fall through to existing CSS file grep logic
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Step 1 — Spawn design-context-builder
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
Task("design-context-builder", """
|
|
91
|
+
<required_reading>
|
|
92
|
+
@.design/STATE.md
|
|
93
|
+
@reference/audit-scoring.md
|
|
94
|
+
@reference/anti-patterns.md
|
|
95
|
+
</required_reading>
|
|
96
|
+
|
|
97
|
+
You are the design-context-builder agent. Auto-detect existing design system
|
|
98
|
+
state via grep/glob before asking questions. Interview the user ONLY for areas
|
|
99
|
+
where auto-detect returned no confident answer. Write .design/DESIGN-CONTEXT.md.
|
|
100
|
+
|
|
101
|
+
Baseline audit directory detection (ordered fallback chain):
|
|
102
|
+
1. If src/ exists -> use src/
|
|
103
|
+
2. Elif app/ exists -> use app/ (Next.js App Router)
|
|
104
|
+
3. Elif pages/ exists -> use pages/ (Next.js Pages Router)
|
|
105
|
+
4. Elif lib/ exists -> use lib/ (library-only projects)
|
|
106
|
+
5. Else -> flag "layout unknown", skip baseline, note in DESIGN-CONTEXT.md
|
|
107
|
+
|
|
108
|
+
Common gray areas to probe during discovery (Area 7):
|
|
109
|
+
1. font-change risk — switching type families when existing UI has body copy in a specific family. Ask: "Is the current body font intentional or inherited? OK to change?"
|
|
110
|
+
2. token-layer introduction risk — adding CSS custom properties to a codebase that uses direct values. Ask: "Do you want design tokens (--primary, --surface) or inline values (hex, rgb)?"
|
|
111
|
+
3. Component rebuild vs restyle — when to keep existing component, when to rebuild from scratch. Ask: "For <component>, restyle in place or rebuild?"
|
|
112
|
+
|
|
113
|
+
Context:
|
|
114
|
+
auto_mode: <true|false>
|
|
115
|
+
|
|
116
|
+
Output file: .design/DESIGN-CONTEXT.md
|
|
117
|
+
Emit `## CONTEXT COMPLETE` when done.
|
|
118
|
+
""")
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Wait for `## CONTEXT COMPLETE`. Update STATE.md task_progress = 0.5.
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Step 1.75 — Lazy gate: should design-context-checker run? (Plan 10.1-04, D-21)
|
|
126
|
+
|
|
127
|
+
Spawn the cheap Haiku gate before the full context-checker:
|
|
128
|
+
|
|
129
|
+
Task("design-context-checker-gate", """
|
|
130
|
+
<required_reading>
|
|
131
|
+
@.design/STATE.md
|
|
132
|
+
</required_reading>
|
|
133
|
+
|
|
134
|
+
You are the design-context-checker-gate.
|
|
135
|
+
|
|
136
|
+
Context:
|
|
137
|
+
diff_files: <git diff --name-only HEAD~1..HEAD>
|
|
138
|
+
diff_body: (not needed — single-file heuristic)
|
|
139
|
+
baseline_sha: <HEAD~1>
|
|
140
|
+
|
|
141
|
+
Apply the heuristic (DESIGN-CONTEXT.md in diff_files?). Emit JSON + `## GATE COMPLETE`.
|
|
142
|
+
""")
|
|
143
|
+
|
|
144
|
+
Wait for `## GATE COMPLETE`. Parse JSON:
|
|
145
|
+
|
|
146
|
+
- `spawn: false` -> append `lazy_skipped: true` telemetry row for `design-context-checker`, skip Step 2, set STATE.md `<position>` as if checker passed (rationale: DESIGN-CONTEXT.md didn't change, last validation still holds), emit `design-context-checker skipped — <rationale>`.
|
|
147
|
+
- `spawn: true` -> proceed to Step 2 as currently written.
|
|
148
|
+
|
|
149
|
+
**Note:** On first-run discover, the builder just wrote DESIGN-CONTEXT.md so the gate returns `spawn: true`. The gate meaningfully short-circuits only on re-runs where the builder made no changes.
|
|
150
|
+
|
|
151
|
+
**Parallel synthesizer note:** discover does not spawn parallel researchers in v1, so `skills/synthesize/` is not wired here. If future variants spawn N parallel interviewers/auto-detectors, wire synthesize between dispatch and collate as in `skills/map/` Step 3.5.
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Step 2 — Spawn design-context-checker
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
Task("design-context-checker", """
|
|
159
|
+
<required_reading>
|
|
160
|
+
@.design/STATE.md
|
|
161
|
+
@.design/DESIGN-CONTEXT.md
|
|
162
|
+
</required_reading>
|
|
163
|
+
|
|
164
|
+
You are the design-context-checker agent. Validate DESIGN-CONTEXT.md across
|
|
165
|
+
6 dimensions. Return APPROVED or BLOCKED with per-dimension verdicts.
|
|
166
|
+
|
|
167
|
+
Emit `## CONTEXT CHECK COMPLETE` when done.
|
|
168
|
+
""")
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Wait for `## CONTEXT CHECK COMPLETE`.
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## Step 3 — Handle checker verdict
|
|
176
|
+
|
|
177
|
+
If APPROVED: proceed to state update.
|
|
178
|
+
If BLOCKED: present dimensions that BLOCKED to user, offer fix-and-retry loop (re-spawn builder with specific fix instructions). Do not proceed to planning.
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## State Update (exit)
|
|
183
|
+
|
|
184
|
+
1. Set <position> status=completed, task_progress=1/1.
|
|
185
|
+
2. Set <timestamps> discover_completed_at=<ISO 8601 now>.
|
|
186
|
+
3. Update last_checkpoint. Write STATE.md.
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## After Writing
|
|
191
|
+
|
|
192
|
+
```
|
|
193
|
+
=== Discovery complete ===
|
|
194
|
+
Saved: .design/DESIGN-CONTEXT.md
|
|
195
|
+
|
|
196
|
+
Baseline score: [N]/100 ([grade])
|
|
197
|
+
Key issues: [top issue 1], [top issue 2], [top issue 3]
|
|
198
|
+
|
|
199
|
+
Next: /get-design-done:plan
|
|
200
|
+
-> Decomposes your context into executable design tasks.
|
|
201
|
+
==========================
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Do not proceed to planning automatically unless `--auto` was passed.
|
package/skills/discuss/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gdd-discuss
|
|
3
|
-
description: "Adaptive design interview
|
|
3
|
+
description: "Adaptive design interview command that spawns design-discussant in normal / --all / --spec mode to gather decisions via one-question-at-a-time AskUserQuestion, writing D-XX entries to STATE.md <decisions>. Use when locking design decisions outside the main pipeline or backfilling missing context."
|
|
4
4
|
argument-hint: "[topic] [--all] [--spec] [--cycle <name>]"
|
|
5
5
|
tools: Read, Write, Task
|
|
6
6
|
---
|
|
@@ -47,7 +47,23 @@ Emit `## DISCUSS COMPLETE` when done.
|
|
|
47
47
|
|
|
48
48
|
Use only the modes the user actually passed. Missing flags → `<mode>normal</mode>`.
|
|
49
49
|
|
|
50
|
-
## Step 4 —
|
|
50
|
+
## Step 4 — Inline glossary maintenance (CONTEXT.md)
|
|
51
|
+
|
|
52
|
+
When a fuzzy phrase is resolved into a sharper term, or a new domain concept is named
|
|
53
|
+
during the interview: write to `./CONTEXT.md` IMMEDIATELY (do NOT batch). Use the schema
|
|
54
|
+
in `./../../reference/context-md-format.md` — H2 heading per term, body paragraph,
|
|
55
|
+
optional `**Aliases:**` line for term-merging. Multi-context repos use `CONTEXT-MAP.md`
|
|
56
|
+
plus per-area `<area>/CONTEXT.md`. CONTEXT.md is lazy-created on the first term write.
|
|
57
|
+
|
|
58
|
+
## Step 5 — Session wrap: ADR-offer scan
|
|
59
|
+
|
|
60
|
+
For each decision recorded this session, check ALL three criteria from
|
|
61
|
+
`./../../reference/adr-format.md`: (a) **hard-to-reverse**, (b) **surprising-without-context**,
|
|
62
|
+
(c) **real-tradeoff**. If ALL three hold, offer to author `docs/adr/NNNN-<slug>.md`. If
|
|
63
|
+
ANY criterion fails, the decision stays in STATE.md `<decisions>`. Routine choices are
|
|
64
|
+
NEVER auto-promoted.
|
|
65
|
+
|
|
66
|
+
## Step 6 — Report
|
|
51
67
|
|
|
52
68
|
Wait for `## DISCUSS COMPLETE`. Re-read STATE.md. Count new D-XX entries since Step 1. Print:
|
|
53
69
|
|
package/skills/explore/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gdd-explore
|
|
3
|
-
description: "
|
|
3
|
+
description: "Stage 2 of 5 — unified exploration merging inventory grep + design interview. Probes 6 connections, scans the codebase, conducts the AskUserQuestion interview, and writes .design/DESIGN.md + DESIGN-DEBT.md + DESIGN-CONTEXT.md. Use after /gdd:brief to map the existing system and lock decisions before planning."
|
|
4
4
|
argument-hint: "[--skip-interview] [--skip-scan]"
|
|
5
5
|
tools: Read, Write, Bash, Grep, Glob, Task, AskUserQuestion, mcp__gdd_state__get, mcp__gdd_state__transition_stage, mcp__gdd_state__probe_connections, mcp__gdd_state__update_progress, mcp__gdd_state__set_status, mcp__gdd_state__add_blocker, mcp__gdd_state__checkpoint, mcp__gdd_state__add_decision
|
|
6
6
|
---
|
|
@@ -11,243 +11,78 @@ tools: Read, Write, Bash, Grep, Glob, Task, AskUserQuestion, mcp__gdd_state__get
|
|
|
11
11
|
|
|
12
12
|
**Purpose:** Unified exploration merging the former `scan` (inventory grep) and `discover` (context interview) stages. Produces `.design/DESIGN.md`, `.design/DESIGN-DEBT.md`, and `.design/DESIGN-CONTEXT.md`.
|
|
13
13
|
|
|
14
|
+
Full procedure detail: `./explore-procedure.md`.
|
|
15
|
+
|
|
14
16
|
---
|
|
15
17
|
|
|
16
18
|
## Stage entry
|
|
17
19
|
|
|
18
|
-
All STATE.md persistence
|
|
19
|
-
|
|
20
|
-
1. Call `mcp__gdd_state__transition_stage` with `to: "explore"`.
|
|
21
|
-
- On success: proceed to probes.
|
|
22
|
-
- On gate failure: emit blockers to the user (do not advance). Each blocker is a line in the `error.context.blockers` array; print them verbatim.
|
|
23
|
-
2. Call `mcp__gdd_state__get` with no arguments — snapshot the parsed state into a local `state` variable for downstream steps.
|
|
24
|
-
|
|
25
|
-
## Step 1 — Connection probe
|
|
26
|
-
|
|
27
|
-
Probe connection availability (the batched write lands at the end of this step — see "Commit probe results" below):
|
|
28
|
-
|
|
29
|
-
**A — Figma probe (variant-agnostic):**
|
|
30
|
-
```
|
|
31
|
-
ToolSearch({ query: "figma get_metadata use_figma", max_results: 10 })
|
|
32
|
-
Parse tool names matching /^mcp__([^_]*figma[^_]*)__(get_metadata|use_figma)$/i
|
|
33
|
-
into read-capable and write-capable prefix sets.
|
|
34
|
-
Empty read set → figma: not_configured
|
|
35
|
-
One+ matches → pick prefix via tiebreaker:
|
|
36
|
-
(1) both-sets > reads-only,
|
|
37
|
-
(2) `figma` > others,
|
|
38
|
-
(3) non-`figma-desktop` > desktop,
|
|
39
|
-
(4) alphabetical.
|
|
40
|
-
Then call {prefix}get_metadata:
|
|
41
|
-
success → figma: available (prefix=mcp__<prefix>__, writes=<true|false>)
|
|
42
|
-
error → figma: unavailable
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
**B — Refero probe:**
|
|
46
|
-
```
|
|
47
|
-
ToolSearch({ query: "refero", max_results: 5 })
|
|
48
|
-
Empty → refero: not_configured
|
|
49
|
-
Non-empty → refero: available
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
**C — 21st.dev probe:**
|
|
53
|
-
```
|
|
54
|
-
ToolSearch({ query: "mcp__21st", max_results: 5 })
|
|
55
|
-
Empty → 21st-dev: not_configured
|
|
56
|
-
Non-empty → 21st-dev: available
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
**D — Magic Patterns probe:**
|
|
60
|
-
```
|
|
61
|
-
ToolSearch({ query: "mcp__magic_patterns", max_results: 5 })
|
|
62
|
-
Empty → magic-patterns: not_configured
|
|
63
|
-
Non-empty → magic-patterns: available
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
**E — paper.design probe:**
|
|
67
|
-
```
|
|
68
|
-
ToolSearch({ query: "mcp__paper", max_results: 5 })
|
|
69
|
-
Empty → paper-design: not_configured
|
|
70
|
-
Non-empty → call mcp__paper-design__get_selection; success → available; error → unavailable
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
**F — pencil.dev probe (file-based):**
|
|
74
|
-
```bash
|
|
75
|
-
find . -name "*.pen" -not -path "*/node_modules/*" 2>/dev/null | head -1
|
|
76
|
-
Empty → pencil-dev: not_configured
|
|
77
|
-
Found → pencil-dev: available
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
## Commit probe results
|
|
81
|
-
|
|
82
|
-
After all probes complete, commit results in a single call:
|
|
83
|
-
|
|
84
|
-
`mcp__gdd_state__probe_connections` with `probe_results` = an array of `{ name, status }` entries — one per probed connection. Example:
|
|
85
|
-
|
|
86
|
-
```json
|
|
87
|
-
{
|
|
88
|
-
"probe_results": [
|
|
89
|
-
{ "name": "figma", "status": "available" },
|
|
90
|
-
{ "name": "refero", "status": "not_configured" },
|
|
91
|
-
{ "name": "preview", "status": "unavailable" }
|
|
92
|
-
]
|
|
93
|
-
}
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
Unspecified connections keep their existing value. Do NOT issue multiple `probe_connections` calls — the tool is designed for a single batch write per stage.
|
|
97
|
-
|
|
98
|
-
## Step 1.5 — 21st.dev Prior-Art Check (when 21st-dev: available)
|
|
99
|
-
|
|
100
|
-
If `state.connections.21st-dev === "not_configured"` (from the snapshot captured at stage entry): skip this step entirely.
|
|
101
|
-
|
|
102
|
-
When the explore stage identifies any greenfield component in scope (component name from BRIEF.md or user request that does not yet have an implementation file):
|
|
103
|
-
|
|
104
|
-
1. `21st_magic_component_search(component_name, limit: 3)`
|
|
105
|
-
2. Evaluate top result:
|
|
106
|
-
- **fit ≥ 80%**: add `<prior-art>` block to DESIGN.md:
|
|
107
|
-
```xml
|
|
108
|
-
<prior-art source="21st.dev" component="<name>" fit="<score>%" id="<component_id>">
|
|
109
|
-
Recommendation: adopt — do not build custom. Confirm with design-executor.
|
|
110
|
-
</prior-art>
|
|
111
|
-
```
|
|
112
|
-
- **fit < 80%**: note top candidate in DESIGN.md as a reference, proceed with custom build:
|
|
113
|
-
```xml
|
|
114
|
-
<prior-art source="21st.dev" component="<name>" fit="<score>%" id="<component_id>">
|
|
115
|
-
Low fit — noted for reference. Building custom component.
|
|
116
|
-
</prior-art>
|
|
117
|
-
```
|
|
118
|
-
3. If `svgl_get_brand_logo` is available and explore scope includes brand logo assets: call `svgl_get_brand_logo(brand_name)` for each required brand asset; add SVG results to `.design/assets/` and note in DESIGN.md.
|
|
119
|
-
|
|
120
|
-
If no greenfield components in scope: skip this step.
|
|
121
|
-
|
|
122
|
-
## Step 2 — Inventory scan (unless `--skip-scan`)
|
|
20
|
+
All STATE.md persistence goes through `gdd-state` MCP tools — no direct edits. Plain design docs (DESIGN.md / DESIGN-DEBT.md / DESIGN-CONTEXT.md) use `Write`.
|
|
123
21
|
|
|
124
|
-
|
|
22
|
+
1. `mcp__gdd_state__transition_stage` with `to: "explore"`. On gate failure: print blockers from `error.context.blockers` verbatim, do not advance.
|
|
23
|
+
2. `mcp__gdd_state__get` (no args) -> snapshot `state` for downstream steps.
|
|
125
24
|
|
|
126
|
-
|
|
127
|
-
1. Read `.design/config.json` `parallelism` (or defaults from `reference/config-schema.md`).
|
|
128
|
-
2. Apply rules from `reference/parallelism-rules.md` (hard → soft).
|
|
129
|
-
3. Record the verdict via `mcp__gdd_state__set_status` with a short status label (e.g., `status: "explore_parallel"` or `"explore_serial"`) carrying the stage/verdict/reason/agents payload.
|
|
130
|
-
4. If verdict is `parallel`, dispatch via multiple `Task()` calls in one response; if `serial`, spawn sequentially.
|
|
131
|
-
|
|
132
|
-
Run the canonical scan grep/glob inventory (preserves PLAT-01/02 POSIX ERE patterns from Phase 1):
|
|
133
|
-
|
|
134
|
-
- **Component detection** — `Glob` for `**/*.{tsx,jsx,vue,svelte}`; count exports, identify shared UI primitives.
|
|
135
|
-
- **Color extraction** — `Grep` for hex (`#[0-9a-fA-F]{3,8}`), `rgb(`, `hsl(`, Tailwind arbitrary color classes; dedupe.
|
|
136
|
-
- **Typography scan** — Grep font-family declarations, Tailwind `font-*`, `text-*` size classes; identify type scale.
|
|
137
|
-
- **Motion scan** — Grep `transition`, `animate-`, `@keyframes`, `framer-motion` imports.
|
|
138
|
-
- **Token detection** — Check for `tailwind.config.{js,cjs,mjs,ts}`, CSS custom properties (`--*`), design-token JSON.
|
|
139
|
-
- **Layout detection** — Ordered fallback: `src/` → `app/` → `pages/` → `lib/` → unknown.
|
|
25
|
+
---
|
|
140
26
|
|
|
141
|
-
|
|
142
|
-
- `.design/DESIGN.md` — current design system inventory + baseline score
|
|
143
|
-
- `.design/DESIGN-DEBT.md` — prioritized debt roadmap
|
|
27
|
+
## Step 1 — Connection probe
|
|
144
28
|
|
|
145
|
-
|
|
29
|
+
Probe six connections, then batch-write results via ONE `mcp__gdd_state__probe_connections` call (unspecified connections keep their existing value):
|
|
146
30
|
|
|
147
|
-
|
|
31
|
+
- **A — Figma** (variant-agnostic): ToolSearch + regex parse of `get_metadata` / `use_figma` prefixes -> tiebreaker selection (`both-sets > reads-only`, `figma > others`, `non-figma-desktop`, alphabetical) -> live `{prefix}get_metadata` call -> `available` / `unavailable` / `not_configured` (with `prefix=` + `writes=`).
|
|
32
|
+
- **B — Refero**: ToolSearch presence sufficient.
|
|
33
|
+
- **C — 21st.dev**: ToolSearch `mcp__21st` presence.
|
|
34
|
+
- **D — Magic Patterns**: ToolSearch `mcp__magic_patterns` presence.
|
|
35
|
+
- **E — paper.design**: ToolSearch `mcp__paper` + live `get_selection` call.
|
|
36
|
+
- **F — pencil.dev**: `find . -name "*.pen"` file-presence.
|
|
148
37
|
|
|
149
|
-
|
|
38
|
+
Full probe specs + commit-results JSON shape: `./explore-procedure.md` §Step 1.
|
|
150
39
|
|
|
151
|
-
|
|
40
|
+
## Step 1.5 — 21st.dev Prior-Art Check (when `21st-dev: available`)
|
|
152
41
|
|
|
153
|
-
|
|
154
|
-
1. Read package.json (dependencies + devDependencies).
|
|
42
|
+
For each greenfield component in scope: `21st_magic_component_search(component_name, limit: 3)`. Fit >= 80% -> add `<prior-art>` block to DESIGN.md recommending adoption; fit < 80% -> note as reference, build custom. If `svgl_get_brand_logo` available and brand assets are in scope, call per logo and save SVGs to `.design/assets/`. Skip entirely if no greenfield components in scope. Detail: `./explore-procedure.md` §Step 1.5.
|
|
155
43
|
|
|
156
|
-
|
|
157
|
-
react-intl, next-intl, i18next, vue-i18n, formatjs, lingui
|
|
158
|
-
≥1 library found in deps or devDeps → state = "framework-managed"
|
|
159
|
-
→ STOP, emit line, exit probe.
|
|
44
|
+
---
|
|
160
45
|
|
|
161
|
-
|
|
162
|
-
grep -RE "Intl\.(DateTimeFormat|NumberFormat|PluralRules|RelativeTimeFormat|ListFormat|Collator|Segmenter)" src/
|
|
163
|
-
≥1 match → state = "partial"
|
|
164
|
-
→ emit line, exit probe.
|
|
46
|
+
## Step 2 — Inventory scan (unless `--skip-scan`)
|
|
165
47
|
|
|
166
|
-
|
|
167
|
-
→ emit line, exit probe.
|
|
168
|
-
```
|
|
48
|
+
**Map pre-check**: if `.design/map/` exists with all 5 files (`tokens.md`, `components.md`, `visual-hierarchy.md`, `a11y.md`, `motion.md`) fresher than `src/`, consume them and skip the grep pass. Otherwise grep and, after Step 4, suggest `/gdd:map` for the next cycle.
|
|
169
49
|
|
|
170
|
-
|
|
50
|
+
**Parallelism decision**: read `.design/config.json` + `reference/parallelism-rules.md`. Record verdict via `mcp__gdd_state__set_status` (`"explore_parallel"` / `"explore_serial"`). Parallel -> multiple `Task()` in one response; serial -> sequential.
|
|
171
51
|
|
|
172
|
-
|
|
173
|
-
Localization readiness: framework-managed | partial | none
|
|
174
|
-
```
|
|
52
|
+
Run the canonical scan grep/glob inventory (POSIX ERE, preserving PLAT-01/02): component detection (Glob `**/*.{tsx,jsx,vue,svelte}`), color extraction (hex / rgb / hsl / Tailwind arbitrary), typography scan (font-family / Tailwind `font-*` / `text-*`), motion scan (`transition` / `animate-` / `@keyframes` / `framer-motion`), token detection (tailwind.config / CSS custom properties / token JSON), layout detection (ordered fallback `src/` -> `app/` -> `pages/` -> `lib/` -> unknown). Write `.design/DESIGN.md` + `.design/DESIGN-DEBT.md`. Then `mcp__gdd_state__update_progress` for scan progress. Detail: `./explore-procedure.md` §Step 2.
|
|
175
53
|
|
|
176
|
-
|
|
54
|
+
**Step 2.x — i18n readiness probe (informational, per D-04)**: check `package.json` deps against `{react-intl, next-intl, i18next, vue-i18n, formatjs, lingui}` -> `framework-managed`; else grep `Intl.(DateTimeFormat|NumberFormat|...)` in `src/` -> `partial`; else `none`. Emit single line `Localization readiness: <state>` in the report. NO gate, NO blocking — surface signal only (D-07). Detail: `./explore-procedure.md` §Step 2.x.
|
|
177
55
|
|
|
178
56
|
## Step 2.5 — Detect prior sketches and project-local conventions
|
|
179
57
|
|
|
180
|
-
**Sketches**:
|
|
58
|
+
- **Sketches**: list `.design/sketches/*` slugs, group by `WINNER.md` present (completed) vs absent (pending). Record via `mcp__gdd_state__set_status: "explore_sketches_present"`. Include in DESIGN.md "Prior Explorations" section.
|
|
59
|
+
- **Project-local skills**: read `./.claude/skills/design-*-conventions.md` -> include in DESIGN-CONTEXT.md `<project_conventions>` (these override defaults).
|
|
60
|
+
- **Global skills**: `~/.claude/gdd/global-skills/*.md` (other than README) -> prepend to `<project_conventions>` under `<global_conventions>` sub-block. Project-local D-XX wins on conflict.
|
|
181
61
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
**Global skills**: If `~/.claude/gdd/global-skills/` exists and contains `.md` files (other than README.md), read them and prepend their content to the `<project_conventions>` section under a `<global_conventions>` sub-block. Global skills represent cross-project personal conventions. They inform but do not override project-local decisions — when a project-local D-XX decision conflicts with a global skill, the project-local decision wins.
|
|
62
|
+
---
|
|
185
63
|
|
|
186
64
|
## Step 3 — Design interview (unless `--skip-interview`)
|
|
187
65
|
|
|
188
|
-
**Run
|
|
189
|
-
|
|
190
|
-
### 3.a — Pre-load context
|
|
191
|
-
|
|
192
|
-
Read in this order:
|
|
193
|
-
1. `state.decisions` from the snapshot captured at stage entry — existing D-XX entries (do NOT re-ask anything covered). If the snapshot is stale, refresh by calling `mcp__gdd_state__get`.
|
|
194
|
-
2. `.design/BRIEF.md` — problem statement, audience, constraints
|
|
195
|
-
3. `.design/DESIGN.md` — auto-detected inventory from Step 2
|
|
196
|
-
4. `.design/DESIGN-CONTEXT.md` if it exists — `<gray_areas>` block lists unresolved topics
|
|
197
|
-
5. `./.claude/skills/design-*-conventions.md` if any — locked project conventions, treat as authoritative
|
|
198
|
-
|
|
199
|
-
If `state.connections` shows `figma: available`, read the resolved `prefix=` from the same entry and call `{prefix}get_variable_defs`, then draft tentative D-XX entries (mark `(tentative — confirm with user)`) before asking.
|
|
200
|
-
|
|
201
|
-
### 3.b — Identify question set
|
|
202
|
-
|
|
203
|
-
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:
|
|
66
|
+
**Run inline — NEVER spawn `design-discussant` as a subagent.** `AskUserQuestion` only renders the native picker from the top-level skill context; spawning degrades to plain markdown (broken in Claude Desktop).
|
|
204
67
|
|
|
205
|
-
-
|
|
206
|
-
-
|
|
207
|
-
-
|
|
208
|
-
-
|
|
209
|
-
-
|
|
210
|
-
- Spacing scale (only if no spacing tokens detected)
|
|
211
|
-
- Motion preferences (only if no motion patterns detected)
|
|
212
|
-
- Any `<gray_areas>` from DESIGN-CONTEXT.md
|
|
68
|
+
- **3.a Pre-load context**: state.decisions snapshot -> BRIEF.md -> DESIGN.md -> DESIGN-CONTEXT.md `<gray_areas>` -> project conventions. If `figma: available`, call `{prefix}get_variable_defs` and draft tentative D-XX entries.
|
|
69
|
+
- **3.b Identify question set**: skip areas already covered by D-XX or project convention. Default coverage: cycle goal, audience, brand direction (if no tokens), color/typography/spacing primitives (if undetected), motion preferences, gray areas from DESIGN-CONTEXT.md.
|
|
70
|
+
- **3.c Ask one at a time**: `AskUserQuestion` with 4 concrete options + "Other" / "Skip". Reject generic answers ("modern", "clean") with one follow-up.
|
|
71
|
+
- **3.d Record after each answer**: `mcp__gdd_state__add_decision` (atomic, auto-assigns D-NN); append a quality-classified JSON line to `.design/learnings/question-quality.jsonl`.
|
|
72
|
+
- **3.e Produce DESIGN-CONTEXT.md**: summarize locked decisions, remaining gray areas, Figma tentatives. Frontmatter `status: complete`.
|
|
213
73
|
|
|
214
|
-
|
|
74
|
+
Full interview protocol + JSON line schema: `./explore-procedure.md` §Step 3.
|
|
215
75
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
Reject generic answers ("modern", "clean", "professional"). If the answer is vague, ask one follow-up before recording.
|
|
219
|
-
|
|
220
|
-
### 3.d — Record after each answer
|
|
221
|
-
|
|
222
|
-
After each confirmed answer:
|
|
223
|
-
1. Call `mcp__gdd_state__add_decision` with the decision payload. The tool assigns the next `D-NN` id and persists atomically. Format the summary as:
|
|
224
|
-
```
|
|
225
|
-
[Category] Decision summary — short rationale
|
|
226
|
-
```
|
|
227
|
-
2. Append one JSON line to `.design/learnings/question-quality.jsonl` (create if absent):
|
|
228
|
-
```json
|
|
229
|
-
{"ts":"<iso>","question_id":"Q-NN","question_text":"<verbatim>","answer_summary":"<one sentence>","quality":"high|medium|low|skipped","evidence":"<why>","cycle":"<active-cycle-slug>"}
|
|
230
|
-
```
|
|
231
|
-
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.
|
|
232
|
-
3. `add_decision` commits incrementally — the decision survives a crash mid-interview without an explicit save step.
|
|
233
|
-
|
|
234
|
-
### 3.e — Produce DESIGN-CONTEXT.md
|
|
235
|
-
|
|
236
|
-
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`.
|
|
76
|
+
---
|
|
237
77
|
|
|
238
78
|
## Step 4 — Close out explore
|
|
239
79
|
|
|
240
|
-
- If the synthesizer
|
|
241
|
-
-
|
|
242
|
-
- Stage advance to `plan` happens at the next stage's entry (
|
|
80
|
+
- If the synthesizer / mapper batch ran in Step 2: `mcp__gdd_state__update_progress` with `task_progress: "<done>/<total>"`, `status: "explore_mappers_done"`.
|
|
81
|
+
- `mcp__gdd_state__checkpoint` — bumps `last_checkpoint`.
|
|
82
|
+
- Stage advance to `plan` happens at the next stage's entry (plan owns its own `transition_stage`); do not edit frontmatter directly.
|
|
243
83
|
|
|
244
84
|
## After Writing
|
|
245
85
|
|
|
246
|
-
|
|
247
|
-
━━━ Explore complete ━━━
|
|
248
|
-
Saved: .design/DESIGN.md, .design/DESIGN-DEBT.md, .design/DESIGN-CONTEXT.md
|
|
249
|
-
Next: @get-design-done plan
|
|
250
|
-
━━━━━━━━━━━━━━━━━━━━━━━━
|
|
251
|
-
```
|
|
86
|
+
Print: "=== Explore complete ===\nSaved: .design/DESIGN.md, .design/DESIGN-DEBT.md, .design/DESIGN-CONTEXT.md\nNext: @get-design-done plan".
|
|
252
87
|
|
|
253
88
|
## EXPLORE COMPLETE
|