@hegemonart/get-design-done 1.41.0 → 1.42.0
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 +81 -0
- package/README.md +2 -0
- package/dist/claude-code/.claude/skills/add-backlog/SKILL.md +48 -0
- package/dist/claude-code/.claude/skills/analyze-dependencies/SKILL.md +95 -0
- package/dist/claude-code/.claude/skills/apply-reflections/SKILL.md +92 -0
- package/dist/claude-code/.claude/skills/apply-reflections/apply-reflections-procedure.md +170 -0
- package/dist/claude-code/.claude/skills/audit/SKILL.md +79 -0
- package/dist/claude-code/.claude/skills/bandit-status/SKILL.md +94 -0
- package/dist/claude-code/.claude/skills/benchmark/SKILL.md +65 -0
- package/dist/claude-code/.claude/skills/bootstrap-ds/SKILL.md +43 -0
- package/dist/claude-code/.claude/skills/brief/SKILL.md +128 -0
- package/dist/claude-code/.claude/skills/budget/SKILL.md +45 -0
- package/dist/claude-code/.claude/skills/cache-manager/SKILL.md +66 -0
- package/dist/claude-code/.claude/skills/cache-manager/cache-policy.md +126 -0
- package/dist/claude-code/.claude/skills/check-update/SKILL.md +98 -0
- package/dist/claude-code/.claude/skills/compare/SKILL.md +82 -0
- package/dist/claude-code/.claude/skills/compare/compare-rubric.md +171 -0
- package/dist/claude-code/.claude/skills/complete-cycle/SKILL.md +81 -0
- package/dist/claude-code/.claude/skills/connections/SKILL.md +71 -0
- package/dist/claude-code/.claude/skills/connections/connections-onboarding.md +608 -0
- package/dist/claude-code/.claude/skills/continue/SKILL.md +24 -0
- package/dist/claude-code/.claude/skills/darkmode/SKILL.md +76 -0
- package/dist/claude-code/.claude/skills/darkmode/darkmode-audit-procedure.md +258 -0
- package/dist/claude-code/.claude/skills/debug/SKILL.md +41 -0
- package/dist/claude-code/.claude/skills/debug/debug-feedback-loops.md +119 -0
- package/dist/claude-code/.claude/skills/design/SKILL.md +99 -0
- package/dist/claude-code/.claude/skills/design/design-procedure.md +304 -0
- package/dist/claude-code/.claude/skills/discover/SKILL.md +72 -0
- package/dist/claude-code/.claude/skills/discover/discover-procedure.md +222 -0
- package/dist/claude-code/.claude/skills/discuss/SKILL.md +96 -0
- package/dist/claude-code/.claude/skills/do/SKILL.md +45 -0
- package/dist/claude-code/.claude/skills/explore/SKILL.md +105 -0
- package/dist/claude-code/.claude/skills/explore/explore-procedure.md +267 -0
- package/dist/claude-code/.claude/skills/export/SKILL.md +30 -0
- package/dist/claude-code/.claude/skills/extract-learnings/SKILL.md +98 -0
- package/dist/claude-code/.claude/skills/fast/SKILL.md +91 -0
- package/dist/claude-code/.claude/skills/figma-extract/SKILL.md +64 -0
- package/dist/claude-code/.claude/skills/figma-write/SKILL.md +39 -0
- package/dist/claude-code/.claude/skills/graphify/SKILL.md +49 -0
- package/dist/claude-code/.claude/skills/health/SKILL.md +99 -0
- package/dist/claude-code/.claude/skills/health/health-mcp-detection.md +44 -0
- package/dist/claude-code/.claude/skills/health/health-skill-length-report.md +69 -0
- package/dist/claude-code/.claude/skills/help/SKILL.md +87 -0
- package/dist/claude-code/.claude/skills/list-assumptions/SKILL.md +61 -0
- package/dist/claude-code/.claude/skills/locale/SKILL.md +51 -0
- package/dist/claude-code/.claude/skills/map/SKILL.md +89 -0
- package/dist/claude-code/.claude/skills/migrate/SKILL.md +70 -0
- package/dist/claude-code/.claude/skills/new-cycle/SKILL.md +37 -0
- package/dist/claude-code/.claude/skills/new-cycle/milestone-completeness-rubric.md +87 -0
- package/dist/claude-code/.claude/skills/new-project/SKILL.md +53 -0
- package/dist/claude-code/.claude/skills/next/SKILL.md +68 -0
- package/dist/claude-code/.claude/skills/note/SKILL.md +48 -0
- package/dist/claude-code/.claude/skills/openrouter-status/SKILL.md +86 -0
- package/dist/claude-code/.claude/skills/optimize/SKILL.md +97 -0
- package/dist/claude-code/.claude/skills/pause/SKILL.md +77 -0
- package/dist/claude-code/.claude/skills/peer-cli-add/SKILL.md +88 -0
- package/dist/claude-code/.claude/skills/peer-cli-add/peer-cli-protocol.md +161 -0
- package/dist/claude-code/.claude/skills/peer-cli-customize/SKILL.md +90 -0
- package/dist/claude-code/.claude/skills/peers/SKILL.md +96 -0
- package/dist/claude-code/.claude/skills/plan/SKILL.md +105 -0
- package/dist/claude-code/.claude/skills/plan/plan-procedure.md +278 -0
- package/dist/claude-code/.claude/skills/plant-seed/SKILL.md +48 -0
- package/dist/claude-code/.claude/skills/pr-branch/SKILL.md +32 -0
- package/dist/claude-code/.claude/skills/progress/SKILL.md +95 -0
- package/dist/claude-code/.claude/skills/quality-gate/SKILL.md +90 -0
- package/dist/claude-code/.claude/skills/quality-gate/threat-modeling.md +101 -0
- package/dist/claude-code/.claude/skills/quick/SKILL.md +44 -0
- package/dist/claude-code/.claude/skills/reapply-patches/SKILL.md +32 -0
- package/dist/claude-code/.claude/skills/recall/SKILL.md +75 -0
- package/dist/claude-code/.claude/skills/reflect/SKILL.md +85 -0
- package/dist/claude-code/.claude/skills/reflect/procedures/capability-gap-scan.md +120 -0
- package/dist/claude-code/.claude/skills/report-issue/SKILL.md +53 -0
- package/dist/claude-code/.claude/skills/report-issue/report-issue-procedure.md +120 -0
- package/dist/claude-code/.claude/skills/resume/SKILL.md +93 -0
- package/dist/claude-code/.claude/skills/review-backlog/SKILL.md +46 -0
- package/dist/claude-code/.claude/skills/review-decisions/SKILL.md +42 -0
- package/dist/claude-code/.claude/skills/roi/SKILL.md +54 -0
- package/dist/claude-code/.claude/skills/rollout-status/SKILL.md +35 -0
- package/dist/claude-code/.claude/skills/router/SKILL.md +89 -0
- package/dist/claude-code/.claude/skills/router/capability-gap-emitter.md +65 -0
- package/dist/claude-code/.claude/skills/router/router-pick-emitter.md +78 -0
- package/dist/claude-code/.claude/skills/router/router-rules.md +84 -0
- package/dist/claude-code/.claude/skills/scan/SKILL.md +92 -0
- package/dist/claude-code/.claude/skills/scan/scan-procedure.md +732 -0
- package/dist/claude-code/.claude/skills/settings/SKILL.md +87 -0
- package/dist/claude-code/.claude/skills/ship/SKILL.md +48 -0
- package/dist/claude-code/.claude/skills/sketch/SKILL.md +78 -0
- package/dist/claude-code/.claude/skills/sketch-wrap-up/SKILL.md +92 -0
- package/dist/claude-code/.claude/skills/skill-manifest/SKILL.md +79 -0
- package/dist/claude-code/.claude/skills/spike/SKILL.md +67 -0
- package/dist/claude-code/.claude/skills/spike-wrap-up/SKILL.md +86 -0
- package/dist/claude-code/.claude/skills/start/SKILL.md +67 -0
- package/dist/claude-code/.claude/skills/start/start-procedure.md +115 -0
- package/dist/claude-code/.claude/skills/stats/SKILL.md +51 -0
- package/dist/claude-code/.claude/skills/style/SKILL.md +71 -0
- package/dist/claude-code/.claude/skills/style/style-doc-procedure.md +150 -0
- package/dist/claude-code/.claude/skills/synthesize/SKILL.md +94 -0
- package/dist/claude-code/.claude/skills/timeline/SKILL.md +66 -0
- package/dist/claude-code/.claude/skills/todo/SKILL.md +64 -0
- package/dist/claude-code/.claude/skills/turn-closeout/SKILL.md +95 -0
- package/dist/claude-code/.claude/skills/undo/SKILL.md +31 -0
- package/dist/claude-code/.claude/skills/unlock-decision/SKILL.md +54 -0
- package/dist/claude-code/.claude/skills/update/SKILL.md +56 -0
- package/dist/claude-code/.claude/skills/using-gdd/SKILL.md +78 -0
- package/dist/claude-code/.claude/skills/verify/SKILL.md +113 -0
- package/dist/claude-code/.claude/skills/verify/verify-procedure.md +512 -0
- package/dist/claude-code/.claude/skills/warm-cache/SKILL.md +81 -0
- package/dist/claude-code/.claude/skills/watch-authorities/SKILL.md +82 -0
- package/dist/claude-code/.claude/skills/zoom-out/SKILL.md +26 -0
- package/package.json +5 -1
- package/reference/DEPRECATIONS.md +14 -0
- package/reference/registry.json +7 -0
- package/reference/skill-placeholders.md +71 -0
- package/scripts/lib/build/factory.cjs +62 -0
- package/scripts/lib/build/harness-configs.cjs +64 -0
- package/scripts/lib/manifest/README.md +46 -0
- package/scripts/lib/manifest/harnesses.cjs +3 -0
- package/scripts/lib/manifest/harnesses.json +91 -0
- package/scripts/lib/manifest/index.cjs +26 -0
- package/scripts/lib/manifest/loader.cjs +51 -0
- package/scripts/lib/manifest/prose-denylist.json +126 -0
- package/scripts/lib/manifest/schemas/harnesses.schema.json +38 -0
- package/scripts/lib/manifest/schemas/prose-denylist.schema.json +41 -0
- package/scripts/lib/manifest/schemas/skills.schema.json +33 -0
- package/scripts/lib/manifest/skills.json +255 -0
- package/sdk/cli/commands/build.ts +106 -0
- package/sdk/cli/index.js +84 -2
- package/sdk/cli/index.ts +7 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gdd-discuss
|
|
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
|
+
argument-hint: "[topic] [--all] [--spec] [--cycle <name>]"
|
|
5
|
+
tools: Read, Write, Task
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /gdd:discuss
|
|
9
|
+
|
|
10
|
+
**Role:** You are the `/gdd:discuss` command. You spawn the `design-discussant` agent with the right mode and context.
|
|
11
|
+
|
|
12
|
+
## Step 1 — Read state
|
|
13
|
+
|
|
14
|
+
Read `.design/STATE.md`. Note:
|
|
15
|
+
- Current `cycle:` frontmatter value
|
|
16
|
+
- Highest existing `D-XX` number under `<decisions>`
|
|
17
|
+
|
|
18
|
+
If `.design/STATE.md` does not exist, tell the user to run `/gdd:brief` first and stop.
|
|
19
|
+
|
|
20
|
+
## Step 2 — Parse arguments
|
|
21
|
+
|
|
22
|
+
Inspect `$ARGUMENTS`:
|
|
23
|
+
- Free-text before flags → `<topic>`
|
|
24
|
+
- `--all` → batch gray-areas mode
|
|
25
|
+
- `--spec` → Socratic ambiguity scoring mode
|
|
26
|
+
- `--cycle <name>` → scope decisions to that cycle
|
|
27
|
+
|
|
28
|
+
## Step 3 — Spawn design-discussant
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
Task("design-discussant", """
|
|
32
|
+
<required_reading>
|
|
33
|
+
@.design/STATE.md
|
|
34
|
+
@.design/BRIEF.md
|
|
35
|
+
@.design/DESIGN-CONTEXT.md
|
|
36
|
+
@./.claude/skills
|
|
37
|
+
</required_reading>
|
|
38
|
+
|
|
39
|
+
<mode>{normal|--all|--spec}</mode>
|
|
40
|
+
<topic>{topic or omit}</topic>
|
|
41
|
+
<cycle>{cycle-name or omit}</cycle>
|
|
42
|
+
|
|
43
|
+
Run an adaptive design interview. Append D-XX decisions to STATE.md <decisions> block.
|
|
44
|
+
Emit `## DISCUSS COMPLETE` when done.
|
|
45
|
+
""")
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Use only the modes the user actually passed. Missing flags → `<mode>normal</mode>`.
|
|
49
|
+
|
|
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
|
|
67
|
+
|
|
68
|
+
Wait for `## DISCUSS COMPLETE`. Re-read STATE.md. Count new D-XX entries since Step 1. Print:
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
━━━ Discuss complete ━━━
|
|
72
|
+
New decisions: N (D-XX through D-YY)
|
|
73
|
+
Mode: normal | --all | --spec
|
|
74
|
+
Cycle: <name or "default">
|
|
75
|
+
━━━━━━━━━━━━━━━━━━━━━━━━
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Constraints
|
|
79
|
+
|
|
80
|
+
- Do not run the interview yourself — always spawn the agent.
|
|
81
|
+
- Do not touch files outside `.design/`.
|
|
82
|
+
|
|
83
|
+
## Rationalizations — Thought to Reality
|
|
84
|
+
|
|
85
|
+
The shortcuts an agent takes during a discuss session, and what each one costs the decision record:
|
|
86
|
+
|
|
87
|
+
| Thought | Reality |
|
|
88
|
+
|---------|---------|
|
|
89
|
+
| "I'll ask all eight questions at once to save time." | Batched questions overwhelm the user; one-at-a-time keeps each decision clean and prevents coupled answers. |
|
|
90
|
+
| "I can run the interview inline instead of spawning the discussant." | The skill's contract is to always spawn the agent — running it yourself skips the discussant's mode handling and D-XX numbering. |
|
|
91
|
+
| "This answer is good enough, I'll record it as a decision without follow-up." | A vague answer ("modern", "clean") recorded as a D-XX locks in an undecided premise; reject and re-ask once. |
|
|
92
|
+
| "I'll batch all the new D-XX entries into STATE.md at the end." | Decisions written atomically per answer survive an interrupted session; batching loses everything if the session drops. |
|
|
93
|
+
| "The glossary term can wait until I write the summary." | CONTEXT.md is written immediately per term — a deferred glossary entry is a naming inconsistency the next cycle inherits. |
|
|
94
|
+
| "Every decision this session is worth an ADR." | ADRs require all three criteria (hard-to-reverse, surprising, real-tradeoff); auto-promoting routine choices buries the genuinely load-bearing ones. |
|
|
95
|
+
|
|
96
|
+
## DISCUSS COMMAND COMPLETE
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gdd-do
|
|
3
|
+
description: "Natural-language design task router. Parses your intent, maps to the right gdd command(s), confirms before executing."
|
|
4
|
+
argument-hint: "<natural language description>"
|
|
5
|
+
tools: Read, Write, AskUserQuestion
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /gdd:do
|
|
9
|
+
|
|
10
|
+
Takes a free-form description, maps it to a `/gdd:*` command, confirms with the user, then routes.
|
|
11
|
+
|
|
12
|
+
## Intent parsing table
|
|
13
|
+
|
|
14
|
+
| Intent signals | Maps to |
|
|
15
|
+
|---|---|
|
|
16
|
+
| "explore", "scan", "what design patterns", "what components" | `/gdd:explore` |
|
|
17
|
+
| "discuss", "decide", "what should we use for", "help me decide" | `/gdd:discuss` |
|
|
18
|
+
| "plan", "create tasks", "what tasks do we need" | `@get-design-done plan` |
|
|
19
|
+
| "design", "implement", "build", "execute" | `@get-design-done design` |
|
|
20
|
+
| "verify", "check", "audit", "review" | `/gdd:audit` |
|
|
21
|
+
| "sketch", "explore directions", "try designs", "variant" | `/gdd:sketch` |
|
|
22
|
+
| "spike", "experiment", "feasibility", "test if" | `/gdd:spike` |
|
|
23
|
+
| "fix [specific thing]" | `/gdd:fast` |
|
|
24
|
+
| "pause", "stop", "save my place" | `/gdd:pause` |
|
|
25
|
+
| "resume", "pick back up", "continue where I left off" | `/gdd:resume` |
|
|
26
|
+
| "ship", "PR", "submit", "merge" | `/gdd:ship` |
|
|
27
|
+
| "undo", "revert", "roll back" | `/gdd:undo` |
|
|
28
|
+
|
|
29
|
+
## Steps
|
|
30
|
+
|
|
31
|
+
1. Parse the argument text. Match it against the intent signals table. Choose the best fit.
|
|
32
|
+
2. If two intents tie, ask (AskUserQuestion): "Did you mean <option A> or <option B>?"
|
|
33
|
+
3. Print the routing decision in this exact shape:
|
|
34
|
+
```
|
|
35
|
+
I'll run `/gdd:<command>` — "<one-line rationale>". Confirm? (yes/no)
|
|
36
|
+
```
|
|
37
|
+
4. On confirmation: invoke the target skill with any parameters extracted from the input (e.g., topic for `discuss`, symptom for `debug`).
|
|
38
|
+
5. On rejection: ask "What did you mean instead?" and retry once, then abort gracefully.
|
|
39
|
+
|
|
40
|
+
## Do Not
|
|
41
|
+
|
|
42
|
+
- Do not execute the target command without confirmation.
|
|
43
|
+
- Do not invent new commands — if no intent matches, say so and list the closest options.
|
|
44
|
+
|
|
45
|
+
## DO COMPLETE
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gdd-explore
|
|
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
|
+
argument-hint: "[--skip-interview] [--skip-scan]"
|
|
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
|
+
---
|
|
7
|
+
|
|
8
|
+
# Get Design Done — Explore
|
|
9
|
+
|
|
10
|
+
**Role:** You are the Explore stage. Stage 2 of 5 in the get-design-done pipeline.
|
|
11
|
+
|
|
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
|
+
|
|
14
|
+
Full procedure detail: `./explore-procedure.md`.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Stage entry
|
|
19
|
+
|
|
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`.
|
|
21
|
+
|
|
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.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Step 1 — Connection probe
|
|
28
|
+
|
|
29
|
+
Probe six connections, then batch-write results via ONE `mcp__gdd_state__probe_connections` call (unspecified connections keep their existing value):
|
|
30
|
+
|
|
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.
|
|
37
|
+
|
|
38
|
+
Full probe specs + commit-results JSON shape: `./explore-procedure.md` §Step 1.
|
|
39
|
+
|
|
40
|
+
## Step 1.5 — 21st.dev Prior-Art Check (when `21st-dev: available`)
|
|
41
|
+
|
|
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.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Step 2 — Inventory scan (unless `--skip-scan`)
|
|
47
|
+
|
|
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.
|
|
49
|
+
|
|
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.
|
|
51
|
+
|
|
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.
|
|
53
|
+
|
|
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.
|
|
55
|
+
|
|
56
|
+
## Step 2.5 — Detect prior sketches and project-local conventions
|
|
57
|
+
|
|
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.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Step 3 — Design interview (unless `--skip-interview`)
|
|
65
|
+
|
|
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).
|
|
67
|
+
|
|
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`.
|
|
73
|
+
|
|
74
|
+
Full interview protocol + JSON line schema: `./explore-procedure.md` §Step 3.
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Step 4 — Close out explore
|
|
79
|
+
|
|
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.
|
|
83
|
+
|
|
84
|
+
## After Writing
|
|
85
|
+
|
|
86
|
+
Print: "=== Explore complete ===\nSaved: .design/DESIGN.md, .design/DESIGN-DEBT.md, .design/DESIGN-CONTEXT.md\nNext: @get-design-done plan".
|
|
87
|
+
|
|
88
|
+
<HARD-GATE>
|
|
89
|
+
Do NOT transition to plan (or invoke `/gdd:plan`) until BOTH `.design/DESIGN.md` AND `.design/DESIGN-CONTEXT.md` are committed AND the user has approved them. If this project uses a custom `.design` location, read the artifact paths from `.design/STATE.md` rather than assuming the default.
|
|
90
|
+
</HARD-GATE>
|
|
91
|
+
|
|
92
|
+
## Rationalizations — Thought to Reality
|
|
93
|
+
|
|
94
|
+
The shortcut excuses an agent reaches for during explore, and the drift each one introduces:
|
|
95
|
+
|
|
96
|
+
| Thought | Reality |
|
|
97
|
+
|---------|---------|
|
|
98
|
+
| "I already know this codebase, I can skip the inventory scan." | An unscanned codebase hides the tokens/components you'll duplicate — the grep pass exists to stop you reinventing what's there. |
|
|
99
|
+
| "The six connection probes are noise, I'll assume Figma is off." | A skipped probe means a wrong connection assumption silently breaks the design stage's tool dispatch. |
|
|
100
|
+
| "`--skip-interview` is fine, the brief covered it." | The interview locks the gray areas the brief left fuzzy; skipping it ships undecided D-XX into planning. |
|
|
101
|
+
| "I'll batch all the interview questions to save round-trips." | Batched questions overwhelm the user and smuggle in coupled assumptions — one-at-a-time keeps each decision clean. |
|
|
102
|
+
| "DESIGN-DEBT.md is optional, the scan was clean enough." | Unrecorded debt resurfaces as an unexplained constraint three stages later with no provenance. |
|
|
103
|
+
| "Prior sketches and project conventions don't apply this cycle." | Ignored conventions get overridden by defaults, producing inconsistency the audit will flag against the rest of the system. |
|
|
104
|
+
|
|
105
|
+
## EXPLORE COMPLETE
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: explore-procedure
|
|
3
|
+
type: meta-rules
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
phase: 28.5
|
|
6
|
+
tags: [explore, procedure, extracted, pipeline-stage, connection-probe, design-interview, i18n]
|
|
7
|
+
last_updated: 2026-05-18
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
Source: extracted from `skills/explore/SKILL.md` (Phase 28.5 rework — D-10 extract-then-link).
|
|
11
|
+
The skill's load-bearing workflow stays in `../skills/explore/SKILL.md`; this file holds the
|
|
12
|
+
detail the agent reaches for when executing a specific step (six connection probes, 21st.dev
|
|
13
|
+
prior-art check, inventory scan grep, design interview protocol, i18n probe, decision
|
|
14
|
+
recording).
|
|
15
|
+
|
|
16
|
+
# Explore Procedure
|
|
17
|
+
|
|
18
|
+
Detailed procedure for the get-design-done `explore` Stage 2 orchestrator. Companion to
|
|
19
|
+
`../skills/explore/SKILL.md`. Read this file when executing a specific step; the SKILL.md
|
|
20
|
+
keeps the load-bearing workflow + decision tree, this file holds the deep methodology.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Stage entry
|
|
25
|
+
|
|
26
|
+
All STATE.md persistence in this skill goes through `gdd-state` MCP tools — no direct edits. The skill writes to `.design/STATE.md` (connections, decisions, progress, checkpoint) via those tools, and to plain design docs (DESIGN.md / DESIGN-DEBT.md / DESIGN-CONTEXT.md) via `Write`.
|
|
27
|
+
|
|
28
|
+
1. Call `mcp__gdd_state__transition_stage` with `to: "explore"`.
|
|
29
|
+
- On success: proceed to probes.
|
|
30
|
+
- 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.
|
|
31
|
+
2. Call `mcp__gdd_state__get` with no arguments — snapshot the parsed state into a local `state` variable for downstream steps.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Step 1 — Connection probe
|
|
36
|
+
|
|
37
|
+
Probe connection availability (the batched write lands at the end of this step — see "Commit probe results" below):
|
|
38
|
+
|
|
39
|
+
**A — Figma probe (variant-agnostic):**
|
|
40
|
+
```
|
|
41
|
+
ToolSearch({ query: "figma get_metadata use_figma", max_results: 10 })
|
|
42
|
+
Parse tool names matching /^mcp__([^_]*figma[^_]*)__(get_metadata|use_figma)$/i
|
|
43
|
+
into read-capable and write-capable prefix sets.
|
|
44
|
+
Empty read set -> figma: not_configured
|
|
45
|
+
One+ matches -> pick prefix via tiebreaker:
|
|
46
|
+
(1) both-sets > reads-only,
|
|
47
|
+
(2) `figma` > others,
|
|
48
|
+
(3) non-`figma-desktop` > desktop,
|
|
49
|
+
(4) alphabetical.
|
|
50
|
+
Then call {prefix}get_metadata:
|
|
51
|
+
success -> figma: available (prefix=mcp__<prefix>__, writes=<true|false>)
|
|
52
|
+
error -> figma: unavailable
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**B — Refero probe:**
|
|
56
|
+
```
|
|
57
|
+
ToolSearch({ query: "refero", max_results: 5 })
|
|
58
|
+
Empty -> refero: not_configured
|
|
59
|
+
Non-empty -> refero: available
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**C — 21st.dev probe:**
|
|
63
|
+
```
|
|
64
|
+
ToolSearch({ query: "mcp__21st", max_results: 5 })
|
|
65
|
+
Empty -> 21st-dev: not_configured
|
|
66
|
+
Non-empty -> 21st-dev: available
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**D — Magic Patterns probe:**
|
|
70
|
+
```
|
|
71
|
+
ToolSearch({ query: "mcp__magic_patterns", max_results: 5 })
|
|
72
|
+
Empty -> magic-patterns: not_configured
|
|
73
|
+
Non-empty -> magic-patterns: available
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**E — paper.design probe:**
|
|
77
|
+
```
|
|
78
|
+
ToolSearch({ query: "mcp__paper", max_results: 5 })
|
|
79
|
+
Empty -> paper-design: not_configured
|
|
80
|
+
Non-empty -> call mcp__paper-design__get_selection; success -> available; error -> unavailable
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**F — pencil.dev probe (file-based):**
|
|
84
|
+
```bash
|
|
85
|
+
find . -name "*.pen" -not -path "*/node_modules/*" 2>/dev/null | head -1
|
|
86
|
+
Empty -> pencil-dev: not_configured
|
|
87
|
+
Found -> pencil-dev: available
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Commit probe results
|
|
91
|
+
|
|
92
|
+
After all probes complete, commit results in a single call:
|
|
93
|
+
|
|
94
|
+
`mcp__gdd_state__probe_connections` with `probe_results` = an array of `{ name, status }` entries — one per probed connection. Example:
|
|
95
|
+
|
|
96
|
+
```json
|
|
97
|
+
{
|
|
98
|
+
"probe_results": [
|
|
99
|
+
{ "name": "figma", "status": "available" },
|
|
100
|
+
{ "name": "refero", "status": "not_configured" },
|
|
101
|
+
{ "name": "preview", "status": "unavailable" }
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Unspecified connections keep their existing value. Do NOT issue multiple `probe_connections` calls — the tool is designed for a single batch write per stage.
|
|
107
|
+
|
|
108
|
+
## Step 1.5 — 21st.dev Prior-Art Check (when 21st-dev: available)
|
|
109
|
+
|
|
110
|
+
If `state.connections.21st-dev === "not_configured"` (from the snapshot captured at stage entry): skip this step entirely.
|
|
111
|
+
|
|
112
|
+
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):
|
|
113
|
+
|
|
114
|
+
1. `21st_magic_component_search(component_name, limit: 3)`
|
|
115
|
+
2. Evaluate top result:
|
|
116
|
+
- **fit >= 80%**: add `<prior-art>` block to DESIGN.md:
|
|
117
|
+
```xml
|
|
118
|
+
<prior-art source="21st.dev" component="<name>" fit="<score>%" id="<component_id>">
|
|
119
|
+
Recommendation: adopt — do not build custom. Confirm with design-executor.
|
|
120
|
+
</prior-art>
|
|
121
|
+
```
|
|
122
|
+
- **fit < 80%**: note top candidate in DESIGN.md as a reference, proceed with custom build:
|
|
123
|
+
```xml
|
|
124
|
+
<prior-art source="21st.dev" component="<name>" fit="<score>%" id="<component_id>">
|
|
125
|
+
Low fit — noted for reference. Building custom component.
|
|
126
|
+
</prior-art>
|
|
127
|
+
```
|
|
128
|
+
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.
|
|
129
|
+
|
|
130
|
+
If no greenfield components in scope: skip this step.
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Step 2 — Inventory scan (unless `--skip-scan`)
|
|
135
|
+
|
|
136
|
+
**Map pre-check:** If `.design/map/` exists and all 5 files (`tokens.md`, `components.md`, `visual-hierarchy.md`, `a11y.md`, `motion.md`) are present AND fresher than `src/` (mtime), consume them as the inventory source and skip the grep pass. Otherwise proceed with grep below and, after Step 4, suggest running `/gdd:map` for richer parallel-scanned data on the next cycle.
|
|
137
|
+
|
|
138
|
+
**Parallelism decision (before any multi-agent spawn):**
|
|
139
|
+
1. Read `.design/config.json` `parallelism` (or defaults from `reference/config-schema.md`).
|
|
140
|
+
2. Apply rules from `reference/parallelism-rules.md` (hard -> soft).
|
|
141
|
+
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.
|
|
142
|
+
4. If verdict is `parallel`, dispatch via multiple `Task()` calls in one response; if `serial`, spawn sequentially.
|
|
143
|
+
|
|
144
|
+
Run the canonical scan grep/glob inventory (preserves PLAT-01/02 POSIX ERE patterns from Phase 1):
|
|
145
|
+
|
|
146
|
+
- **Component detection** — `Glob` for `**/*.{tsx,jsx,vue,svelte}`; count exports, identify shared UI primitives.
|
|
147
|
+
- **Color extraction** — `Grep` for hex (`#[0-9a-fA-F]{3,8}`), `rgb(`, `hsl(`, Tailwind arbitrary color classes; dedupe.
|
|
148
|
+
- **Typography scan** — Grep font-family declarations, Tailwind `font-*`, `text-*` size classes; identify type scale.
|
|
149
|
+
- **Motion scan** — Grep `transition`, `animate-`, `@keyframes`, `framer-motion` imports.
|
|
150
|
+
- **Token detection** — Check for `tailwind.config.{js,cjs,mjs,ts}`, CSS custom properties (`--*`), design-token JSON.
|
|
151
|
+
- **Layout detection** — Ordered fallback: `src/` -> `app/` -> `pages/` -> `lib/` -> unknown.
|
|
152
|
+
|
|
153
|
+
Write findings to:
|
|
154
|
+
- `.design/DESIGN.md` — current design system inventory + baseline score
|
|
155
|
+
- `.design/DESIGN-DEBT.md` — prioritized debt roadmap
|
|
156
|
+
|
|
157
|
+
Record scan progress: call `mcp__gdd_state__update_progress` with `task_progress: "<completed>/<total>"` to reflect the scan pass.
|
|
158
|
+
|
|
159
|
+
### Step 2.x — i18n readiness probe (informational)
|
|
160
|
+
|
|
161
|
+
Phase 28 D-04 probe — 3-state classification, **informational only**. NO gate, NO blocking, NO required-action. Output appears as a single line in the explore report.
|
|
162
|
+
|
|
163
|
+
Classification logic (matches `./reference/i18n.md` §Explore Integration Spec):
|
|
164
|
+
|
|
165
|
+
```txt
|
|
166
|
+
1. Read package.json (dependencies + devDependencies).
|
|
167
|
+
|
|
168
|
+
2. Check against library matrix:
|
|
169
|
+
react-intl, next-intl, i18next, vue-i18n, formatjs, lingui
|
|
170
|
+
>=1 library found in deps or devDeps -> state = "framework-managed"
|
|
171
|
+
-> STOP, emit line, exit probe.
|
|
172
|
+
|
|
173
|
+
3. Else (no library):
|
|
174
|
+
grep -RE "Intl\.(DateTimeFormat|NumberFormat|PluralRules|RelativeTimeFormat|ListFormat|Collator|Segmenter)" src/
|
|
175
|
+
>=1 match -> state = "partial"
|
|
176
|
+
-> emit line, exit probe.
|
|
177
|
+
|
|
178
|
+
4. Else: state = "none"
|
|
179
|
+
-> emit line, exit probe.
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Output line in explore report (single informational line, per D-04):
|
|
183
|
+
|
|
184
|
+
```txt
|
|
185
|
+
Localization readiness: framework-managed | partial | none
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
(Exactly one of the three values, single line.) A consumer downstream (a planning agent, a roadmap reviewer, the user) can act on the signal if a gap is meaningful for the project, but the probe itself never forces a step — surface signal, do not bolt on a new pillar (D-07 orthogonal-lens discipline).
|
|
189
|
+
|
|
190
|
+
## Step 2.5 — Detect prior sketches and project-local conventions
|
|
191
|
+
|
|
192
|
+
**Sketches**: If `.design/sketches/` exists, list all sketch slugs — group by those with `WINNER.md` (completed wrap-ups) vs without (pending). Call `mcp__gdd_state__set_status` with a brief note (e.g., `status: "explore_sketches_present"`) so downstream stages see the history. Include the inventory in DESIGN.md under a "Prior Explorations" section.
|
|
193
|
+
|
|
194
|
+
**Project-local skills**: Read any `./.claude/skills/design-*-conventions.md` files if present. Include their content in DESIGN-CONTEXT.md under a `<project_conventions>` section — these are codified decisions from prior `/gdd:sketch-wrap-up` runs or manual edits, and they override defaults.
|
|
195
|
+
|
|
196
|
+
**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.
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## Step 3 — Design interview (unless `--skip-interview`)
|
|
201
|
+
|
|
202
|
+
**Run this inline — do NOT spawn `design-discussant` as a subagent.** Subagent UI tools (`AskUserQuestion`) only render the native picker when called from the top-level skill context; spawning a Task() degrades the interview to plain markdown in chat (broken in Claude Desktop).
|
|
203
|
+
|
|
204
|
+
### 3.a — Pre-load context
|
|
205
|
+
|
|
206
|
+
Read in this order:
|
|
207
|
+
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`.
|
|
208
|
+
2. `.design/BRIEF.md` — problem statement, audience, constraints
|
|
209
|
+
3. `.design/DESIGN.md` — auto-detected inventory from Step 2
|
|
210
|
+
4. `.design/DESIGN-CONTEXT.md` if it exists — `<gray_areas>` block lists unresolved topics
|
|
211
|
+
5. `./.claude/skills/design-*-conventions.md` if any — locked project conventions, treat as authoritative
|
|
212
|
+
|
|
213
|
+
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.
|
|
214
|
+
|
|
215
|
+
### 3.b — Identify question set
|
|
216
|
+
|
|
217
|
+
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:
|
|
218
|
+
|
|
219
|
+
- Cycle goal / outcome that matters most
|
|
220
|
+
- Audience and primary use context
|
|
221
|
+
- Brand direction (only if no tokens detected in DESIGN.md)
|
|
222
|
+
- Color primitives (only if no palette detected)
|
|
223
|
+
- Typography scale (only if no type system detected)
|
|
224
|
+
- Spacing scale (only if no spacing tokens detected)
|
|
225
|
+
- Motion preferences (only if no motion patterns detected)
|
|
226
|
+
- Any `<gray_areas>` from DESIGN-CONTEXT.md
|
|
227
|
+
|
|
228
|
+
### 3.c — Ask, one question at a time
|
|
229
|
+
|
|
230
|
+
For each area, call `AskUserQuestion` with a single focused question. Provide 4 concrete options plus "Other" / "Skip" where it helps. Do not batch questions into one call. Do not print the question as markdown — always go through the tool.
|
|
231
|
+
|
|
232
|
+
Reject generic answers ("modern", "clean", "professional"). If the answer is vague, ask one follow-up before recording.
|
|
233
|
+
|
|
234
|
+
### 3.d — Record after each answer
|
|
235
|
+
|
|
236
|
+
After each confirmed answer:
|
|
237
|
+
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:
|
|
238
|
+
```
|
|
239
|
+
[Category] Decision summary — short rationale
|
|
240
|
+
```
|
|
241
|
+
2. Append one JSON line to `.design/learnings/question-quality.jsonl` (create if absent):
|
|
242
|
+
```json
|
|
243
|
+
{"ts":"<iso>","question_id":"Q-NN","question_text":"<verbatim>","answer_summary":"<one sentence>","quality":"high|medium|low|skipped","evidence":"<why>","cycle":"<active-cycle-slug>"}
|
|
244
|
+
```
|
|
245
|
+
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.
|
|
246
|
+
3. `add_decision` commits incrementally — the decision survives a crash mid-interview without an explicit save step.
|
|
247
|
+
|
|
248
|
+
### 3.e — Produce DESIGN-CONTEXT.md
|
|
249
|
+
|
|
250
|
+
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`.
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## Step 4 — Close out explore
|
|
255
|
+
|
|
256
|
+
- If the synthesizer (or equivalent mapper batch) ran in Step 2, call `mcp__gdd_state__update_progress` with `task_progress: "<mappers-completed>/<mappers-total>"` and `status: "explore_mappers_done"` before advancing.
|
|
257
|
+
- Call `mcp__gdd_state__checkpoint` — bumps `frontmatter.last_checkpoint` + appends a timestamp entry.
|
|
258
|
+
- Stage advance to `plan` happens at the next stage's entry (the plan skill will transition from its own entry step); do not edit frontmatter directly from this skill.
|
|
259
|
+
|
|
260
|
+
## After Writing
|
|
261
|
+
|
|
262
|
+
```
|
|
263
|
+
=== Explore complete ===
|
|
264
|
+
Saved: .design/DESIGN.md, .design/DESIGN-DEBT.md, .design/DESIGN-CONTEXT.md
|
|
265
|
+
Next: @get-design-done plan
|
|
266
|
+
=========================
|
|
267
|
+
```
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gdd-export
|
|
3
|
+
description: "Packages a completed design cycle (.design artifacts + decisions + screenshots) into a stakeholder-shareable artifact — self-contained HTML, print-styled PDF (Paged.js-compatible), or a Notion page. Redacts secrets; --pseudonymize masks identity for external sharing; --pr posts the HTML preview as a PR comment. Use to hand a design-review packet to PMs/execs/brand who aren't in the repo."
|
|
4
|
+
argument-hint: "<cycle-id> --format html|pdf|notion [--pseudonymize] [--pr]"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
tools: Read, Write, Bash, Glob, Grep, ToolSearch, Task
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# /gdd:export
|
|
10
|
+
|
|
11
|
+
Turns a completed cycle's in-repo design output into a shareable artifact. Closes the gap that `.design/*.md` lives only in the repo — stakeholders not in code can't consume it. The format contract + source set live in `../../reference/export-formats.md`; the Notion write-path in `../../connections/notion.md`.
|
|
12
|
+
|
|
13
|
+
## Steps
|
|
14
|
+
|
|
15
|
+
1. **Resolve the cycle.** `<cycle-id>` (or the current cycle from `.design/STATE.md`). Read the **source set**: `EXPERIENCE.md` (Phase 19.5), `.design/DESIGN.md`, `.design/DESIGN-VERIFICATION.md`, `.design/DESIGN-AUDIT.md` (if present), the decision log, and any Preview/Chromatic screenshots.
|
|
16
|
+
2. **Redact (always) + pseudonymize (opt-in).** Pass every section through `scripts/lib/redact.cjs` (secrets). If `--pseudonymize`, additionally apply `scripts/lib/pseudonymize.cjs` (git identity / paths / hostname) for external sharing. Honor `GDD_DISABLE_NOTION` for the notion format.
|
|
17
|
+
3. **Assemble per `--format`:**
|
|
18
|
+
- **`html`** (default) — `node -e "require('scripts/lib/export/build-html.cjs').buildHtml({...})"` → a **self-contained** HTML (inline CSS, base64-embedded screenshots, no external refs). Write to `.design/export/<cycle>.html`.
|
|
19
|
+
- **`pdf`** — the same `buildHtml({ ..., print: true })` (Paged.js-compatible `@page` print CSS). Write `.design/export/<cycle>.print.html`; instruct the user to render it via Paged.js / headless-Chrome (GDD ships **no** PDF runtime — D-02).
|
|
20
|
+
- **`notion`** — probe the Notion MCP (`ToolSearch({query:"notion"})`); if `available`, create a page from the same source (nested toggles + image upload) per `connections/notion.md`; if `not_configured`/disabled → degrade to the `html` format + a note.
|
|
21
|
+
4. **`--pr`** — hand the generated HTML preview to `agents/pr-commenter.md` (via `Task`) to post as a PR comment (degrade-to-noop if no PR / pr-commenter unavailable).
|
|
22
|
+
5. **Print the artifact path** (and the Notion URL / PR comment status when applicable).
|
|
23
|
+
|
|
24
|
+
## Do Not
|
|
25
|
+
|
|
26
|
+
- Do not add a PDF/markdown runtime dependency (`paged`/`puppeteer`/`pdfkit`/a markdown lib) — `build-html.cjs` is pure and the PDF is render-it-yourself print HTML (D-02).
|
|
27
|
+
- Do not emit an un-redacted artifact — redact is mandatory; pseudonymize is the external-sharing opt-in.
|
|
28
|
+
- Do not block on Notion/PR — both degrade to a noop / the html file.
|
|
29
|
+
|
|
30
|
+
## EXPORT COMPLETE
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gdd-extract-learnings
|
|
3
|
+
description: "Extracts project-specific design patterns and decisions from .design/ artifacts and writes them to .design/learnings/. Optionally proposes updates to reference/ files for user review."
|
|
4
|
+
tools: Bash, Read, Write, Glob, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /gdd:extract-learnings
|
|
8
|
+
|
|
9
|
+
**Role:** Scan `.design/` artifacts for recurring patterns, successful decisions, and validated approaches. Write structured learnings to `.design/learnings/`. Optionally propose additions to tracked `reference/` files for the user to review and approve.
|
|
10
|
+
|
|
11
|
+
## When to run
|
|
12
|
+
|
|
13
|
+
- After `/gdd:complete-cycle` (auto-suggested by complete-cycle skill)
|
|
14
|
+
- After a major verify/audit pass surfaces new patterns
|
|
15
|
+
- Manually, to checkpoint what the project has learned
|
|
16
|
+
|
|
17
|
+
## Protocol
|
|
18
|
+
|
|
19
|
+
### Step 1 — Gather source artifacts
|
|
20
|
+
|
|
21
|
+
Collect content from available `.design/` files:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
ls .design/*.md 2>/dev/null
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Read (if present): DESIGN-CONTEXT.md, DESIGN-VERIFICATION.md, DESIGN-DEBT.md, DESIGN-SUMMARY.md, CYCLES.md
|
|
28
|
+
|
|
29
|
+
### Step 2 — Invoke gdd-learnings-extractor agent
|
|
30
|
+
|
|
31
|
+
Delegate extraction to the `gdd-learnings-extractor` agent, passing it the list of available files. The agent extracts structured learning entries.
|
|
32
|
+
|
|
33
|
+
### Step 3 — Write learnings artifact
|
|
34
|
+
|
|
35
|
+
The agent writes or appends to `.design/learnings/LEARNINGS.md`.
|
|
36
|
+
|
|
37
|
+
Layout of `.design/learnings/LEARNINGS.md`:
|
|
38
|
+
|
|
39
|
+
```markdown
|
|
40
|
+
# Project Learnings
|
|
41
|
+
|
|
42
|
+
## <Category> — <Date>
|
|
43
|
+
|
|
44
|
+
### L-<NN>: <Title>
|
|
45
|
+
|
|
46
|
+
**Source:** <which .design/ file and section>
|
|
47
|
+
**Pattern type:** decision | anti-pattern | validated-approach | token-convention | component-convention
|
|
48
|
+
**Confidence:** high | medium | low
|
|
49
|
+
**Summary:** <1-2 sentences>
|
|
50
|
+
**Evidence:** <quote or paraphrase from source>
|
|
51
|
+
**Proposed reference update:** <yes — see proposal below | no>
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Step 4 — Reference file proposal (optional)
|
|
57
|
+
|
|
58
|
+
After writing LEARNINGS.md, check each learning entry with `Proposed reference update: yes`.
|
|
59
|
+
|
|
60
|
+
For each such entry: generate a proposed addition to the appropriate `reference/` file (e.g., `reference/heuristics.md`, `reference/anti-patterns.md`).
|
|
61
|
+
|
|
62
|
+
Print the proposal to the terminal and ask the user to review:
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
━━━ Reference update proposal ━━━
|
|
66
|
+
|
|
67
|
+
Learning L-03 suggests adding to reference/anti-patterns.md:
|
|
68
|
+
|
|
69
|
+
### Anti-pattern: Overloaded primary button
|
|
70
|
+
Using the primary button style for more than one action per screen
|
|
71
|
+
reduces clarity and violates Nielsen's heuristic #4 (consistency).
|
|
72
|
+
Evidence: DESIGN-VERIFICATION.md, cycle 3.
|
|
73
|
+
|
|
74
|
+
Accept this update? [y/n/edit]
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
If user types `y`: write the addition to the reference file.
|
|
78
|
+
If user types `n`: mark the learning as "proposal declined" in LEARNINGS.md.
|
|
79
|
+
If user types `edit`: open the proposed text for the user to modify, then write.
|
|
80
|
+
|
|
81
|
+
### Step 5 — Summary
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
━━━ Learnings extracted ━━━
|
|
85
|
+
Source files scanned: <N>
|
|
86
|
+
Learnings written: <N>
|
|
87
|
+
Reference proposals: <N> (<M> accepted)
|
|
88
|
+
Output: .design/learnings/LEARNINGS.md
|
|
89
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Required reading (conditional)
|
|
93
|
+
|
|
94
|
+
@.design/intel/decisions.json (if present)
|
|
95
|
+
@.design/intel/patterns.json (if present)
|
|
96
|
+
@.design/learnings/LEARNINGS.md (if present)
|
|
97
|
+
|
|
98
|
+
## EXTRACT-LEARNINGS COMPLETE
|