@hegemonart/get-design-done 1.0.7

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 (144) hide show
  1. package/.claude-plugin/marketplace.json +63 -0
  2. package/.claude-plugin/plugin.json +54 -0
  3. package/CHANGELOG.md +221 -0
  4. package/LICENSE +21 -0
  5. package/README.md +724 -0
  6. package/SKILL.md +232 -0
  7. package/agents/README.md +226 -0
  8. package/agents/a11y-mapper.md +118 -0
  9. package/agents/component-taxonomy-mapper.md +88 -0
  10. package/agents/design-advisor.md +139 -0
  11. package/agents/design-assumptions-analyzer.md +171 -0
  12. package/agents/design-auditor.md +383 -0
  13. package/agents/design-context-builder.md +544 -0
  14. package/agents/design-context-checker-gate.md +90 -0
  15. package/agents/design-context-checker.md +260 -0
  16. package/agents/design-discussant.md +98 -0
  17. package/agents/design-doc-writer.md +229 -0
  18. package/agents/design-executor.md +452 -0
  19. package/agents/design-figma-writer.md +302 -0
  20. package/agents/design-fixer.md +180 -0
  21. package/agents/design-integration-checker-gate.md +93 -0
  22. package/agents/design-integration-checker.md +326 -0
  23. package/agents/design-pattern-mapper.md +206 -0
  24. package/agents/design-phase-researcher.md +229 -0
  25. package/agents/design-plan-checker.md +164 -0
  26. package/agents/design-planner.md +352 -0
  27. package/agents/design-reflector.md +175 -0
  28. package/agents/design-research-synthesizer.md +127 -0
  29. package/agents/design-verifier-gate.md +97 -0
  30. package/agents/design-verifier.md +605 -0
  31. package/agents/gdd-graphify-sync.md +100 -0
  32. package/agents/gdd-intel-updater.md +88 -0
  33. package/agents/gdd-learnings-extractor.md +85 -0
  34. package/agents/motion-mapper.md +103 -0
  35. package/agents/token-mapper.md +103 -0
  36. package/agents/visual-hierarchy-mapper.md +95 -0
  37. package/connections/chromatic.md +247 -0
  38. package/connections/claude-design.md +190 -0
  39. package/connections/connections.md +218 -0
  40. package/connections/figma-writer.md +139 -0
  41. package/connections/figma.md +146 -0
  42. package/connections/graphify.md +197 -0
  43. package/connections/pinterest.md +153 -0
  44. package/connections/preview.md +173 -0
  45. package/connections/refero.md +189 -0
  46. package/connections/storybook.md +280 -0
  47. package/hooks/budget-enforcer.js +318 -0
  48. package/hooks/context-exhaustion.js +127 -0
  49. package/hooks/gdd-read-injection-scanner.js +44 -0
  50. package/hooks/hooks.json +44 -0
  51. package/package.json +60 -0
  52. package/reference/BRANCH-PROTECTION.md +65 -0
  53. package/reference/DEPRECATIONS.md +41 -0
  54. package/reference/STATE-TEMPLATE.md +200 -0
  55. package/reference/accessibility.md +190 -0
  56. package/reference/anti-patterns.md +336 -0
  57. package/reference/audit-scoring.md +205 -0
  58. package/reference/checklists.md +137 -0
  59. package/reference/config-schema.md +319 -0
  60. package/reference/debugger-philosophy.md +32 -0
  61. package/reference/heuristics.md +201 -0
  62. package/reference/intel-schema.md +266 -0
  63. package/reference/model-prices.md +37 -0
  64. package/reference/model-tiers.md +118 -0
  65. package/reference/motion.md +285 -0
  66. package/reference/parallelism-rules.md +108 -0
  67. package/reference/priority-matrix.md +31 -0
  68. package/reference/project-skills-guide.md +42 -0
  69. package/reference/review-format.md +107 -0
  70. package/reference/schemas/config.schema.json +41 -0
  71. package/reference/schemas/hooks.schema.json +55 -0
  72. package/reference/schemas/intel.schema.json +191 -0
  73. package/reference/schemas/marketplace.schema.json +72 -0
  74. package/reference/schemas/plugin.schema.json +59 -0
  75. package/reference/shared-preamble.md +82 -0
  76. package/reference/typography.md +229 -0
  77. package/scripts/aggregate-agent-metrics.js +144 -0
  78. package/scripts/apply-branch-protection.sh +75 -0
  79. package/scripts/bootstrap-manifest.txt +3 -0
  80. package/scripts/bootstrap.sh +80 -0
  81. package/scripts/build-intel.cjs +458 -0
  82. package/scripts/detect-stale-refs.cjs +101 -0
  83. package/scripts/extract-changelog-section.cjs +57 -0
  84. package/scripts/release-smoke-test.cjs +169 -0
  85. package/scripts/rollback-release.sh +42 -0
  86. package/scripts/run-injection-scanner-ci.cjs +92 -0
  87. package/scripts/validate-frontmatter.cjs +68 -0
  88. package/scripts/validate-schemas.cjs +225 -0
  89. package/scripts/verify-version-sync.cjs +30 -0
  90. package/skills/add-backlog/SKILL.md +47 -0
  91. package/skills/analyze-dependencies/SKILL.md +184 -0
  92. package/skills/apply-reflections/SKILL.md +112 -0
  93. package/skills/audit/SKILL.md +54 -0
  94. package/skills/brief/SKILL.md +75 -0
  95. package/skills/cache-manager/SKILL.md +120 -0
  96. package/skills/compare/SKILL.md +322 -0
  97. package/skills/complete-cycle/SKILL.md +33 -0
  98. package/skills/darkmode/SKILL.md +331 -0
  99. package/skills/debug/SKILL.md +38 -0
  100. package/skills/design/SKILL.md +281 -0
  101. package/skills/discover/SKILL.md +172 -0
  102. package/skills/discuss/SKILL.md +67 -0
  103. package/skills/do/SKILL.md +45 -0
  104. package/skills/explore/SKILL.md +109 -0
  105. package/skills/extract-learnings/SKILL.md +98 -0
  106. package/skills/fast/SKILL.md +44 -0
  107. package/skills/figma-write/SKILL.md +40 -0
  108. package/skills/graphify/SKILL.md +48 -0
  109. package/skills/health/SKILL.md +48 -0
  110. package/skills/help/SKILL.md +76 -0
  111. package/skills/list-assumptions/SKILL.md +60 -0
  112. package/skills/map/SKILL.md +112 -0
  113. package/skills/new-cycle/SKILL.md +35 -0
  114. package/skills/new-project/SKILL.md +53 -0
  115. package/skills/next/SKILL.md +42 -0
  116. package/skills/note/SKILL.md +47 -0
  117. package/skills/optimize/SKILL.md +120 -0
  118. package/skills/pause/SKILL.md +41 -0
  119. package/skills/plan/SKILL.md +251 -0
  120. package/skills/plant-seed/SKILL.md +47 -0
  121. package/skills/pr-branch/SKILL.md +31 -0
  122. package/skills/progress/SKILL.md +60 -0
  123. package/skills/quick/SKILL.md +43 -0
  124. package/skills/reapply-patches/SKILL.md +31 -0
  125. package/skills/reflect/SKILL.md +73 -0
  126. package/skills/resume/SKILL.md +37 -0
  127. package/skills/review-backlog/SKILL.md +45 -0
  128. package/skills/router/SKILL.md +67 -0
  129. package/skills/scan/SKILL.md +721 -0
  130. package/skills/settings/SKILL.md +78 -0
  131. package/skills/ship/SKILL.md +31 -0
  132. package/skills/sketch/SKILL.md +78 -0
  133. package/skills/sketch-wrap-up/SKILL.md +88 -0
  134. package/skills/skill-manifest/SKILL.md +79 -0
  135. package/skills/spike/SKILL.md +67 -0
  136. package/skills/spike-wrap-up/SKILL.md +81 -0
  137. package/skills/stats/SKILL.md +50 -0
  138. package/skills/style/SKILL.md +193 -0
  139. package/skills/synthesize/SKILL.md +93 -0
  140. package/skills/todo/SKILL.md +54 -0
  141. package/skills/undo/SKILL.md +30 -0
  142. package/skills/update/SKILL.md +36 -0
  143. package/skills/verify/SKILL.md +452 -0
  144. package/skills/warm-cache/SKILL.md +113 -0
@@ -0,0 +1,53 @@
1
+ ---
2
+ name: gdd-new-project
3
+ description: "Initialize a new get-design-done project. Gathers project context, creates PROJECT.md and STATE.md, initializes first cycle. Run once per project before any pipeline stage."
4
+ argument-hint: "[--name <project-name>]"
5
+ tools: Read, Write, AskUserQuestion, Bash, Glob
6
+ ---
7
+
8
+ # /gdd:new-project
9
+
10
+ One-time project initialization. Replaces "run scan cold" by gathering context up front and producing PROJECT.md + STATE.md + cycle-1.
11
+
12
+ ## Steps
13
+
14
+ 1. **Existing check**: If `.design/STATE.md` exists, ask (AskUserQuestion): "Project already initialized. Re-initialize? (This does not delete existing work.)" Abort if declined.
15
+ 2. **Create directory**: `mkdir -p .design` via Bash.
16
+ 3. **Auto-detect from codebase** (do this before asking):
17
+ - Read `package.json` for framework (React/Next.js/Vue/SvelteKit/etc.).
18
+ - Glob for `tailwind.config.*`, `components/`, `src/`, `shadcn.json` to guess the design system.
19
+ - Use directory name as default project name.
20
+ 4. **Gather context** (AskUserQuestion, one at a time, pre-filled with detected values):
21
+ - Project name
22
+ - Project type (framework)
23
+ - Main design goal
24
+ - Primary user
25
+ - Design system / component library
26
+ 5. **Write `.design/PROJECT.md`**:
27
+ ```markdown
28
+ # Project: <name>
29
+ **Type**: <framework>
30
+ **Design system**: <system>
31
+ **Main goal**: <goal>
32
+ **Primary user**: <user>
33
+ **Initialized**: <date>
34
+ ```
35
+ 6. **Initialize STATE.md**: Copy from `reference/STATE-TEMPLATE.md`, fill in project name, set stage to `brief`, cycle to `cycle-1`.
36
+ 7. **Create `.design/config.json`** with defaults from `reference/config-schema.md`.
37
+ 8. **Initialize first cycle**: Write `.design/CYCLES.md` with a `cycle-1` entry (goal copied from PROJECT.md main goal, status `active`).
38
+ 9. **Seed project-local skills directory**: Create `./.claude/skills/` and write `./.claude/skills/README.md`:
39
+ ```markdown
40
+ # Project-Local Skills
41
+
42
+ Auto-loaded by gdd pipeline stages. See `reference/project-skills-guide.md` in the plugin.
43
+ Files named `design-*-conventions.md` are read by explore/plan/design.
44
+ Populated by `/gdd:sketch-wrap-up` and manual edits.
45
+ ```
46
+ 10. Print: "Project initialized. Run `/gdd:brief` to capture your design problem, or `/gdd:explore` to scan directly."
47
+
48
+ ## Do Not
49
+
50
+ - Do not delete or overwrite existing `.design/` artifacts if re-initializing.
51
+ - Do not run any pipeline stage automatically — this is init only.
52
+
53
+ ## NEW-PROJECT COMPLETE
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: gdd-next
3
+ description: "Routes to the next pipeline stage based on current STATE.md position"
4
+ tools: Read, Write
5
+ ---
6
+
7
+ # Get Design Done — Next
8
+
9
+ **Role:** Lightweight router. Read `.design/STATE.md` and recommend the next command.
10
+
11
+ ---
12
+
13
+ ## Logic
14
+
15
+ 1. Check if `.design/STATE.md` exists.
16
+ - **No STATE.md** → Print: "No STATE.md found. Run `/gdd:new-project` to initialize, or `@get-design-done brief` to start the pipeline."
17
+ 2. If STATE.md exists, parse frontmatter `stage:` field and map:
18
+
19
+ | Current `stage:` | Recommendation |
20
+ |---|---|
21
+ | `brief` | Run `@get-design-done explore` to scan and interview |
22
+ | `explore` | Run `@get-design-done plan` to create design plan |
23
+ | `plan` | Run `@get-design-done design` to execute design tasks |
24
+ | `design` | Run `@get-design-done verify` to audit and verify |
25
+ | `verify` | Pipeline complete. Run `/gdd:new-cycle` for next cycle or `/gdd:ship` to create PR |
26
+
27
+ 3. Print the recommendation as a single formatted block:
28
+
29
+ ```
30
+ ━━━ Next step ━━━
31
+ Current stage: <stage>
32
+ Status: <status>
33
+ → <recommendation>
34
+ ━━━━━━━━━━━━━━━━━━
35
+ ```
36
+
37
+ ## Do Not
38
+
39
+ - Do not modify STATE.md.
40
+ - Do not invoke the next stage automatically — only recommend.
41
+
42
+ ## NEXT COMPLETE
@@ -0,0 +1,47 @@
1
+ ---
2
+ name: gdd-note
3
+ description: "Zero-friction idea capture during any stage. Appends to .design/NOTES.md. Subcommands: add, list, promote."
4
+ argument-hint: "<add|list|promote> [text|line-number]"
5
+ tools: Read, Write
6
+ ---
7
+
8
+ # /gdd:note
9
+
10
+ **Role:** Ephemeral design notes. Zero ceremony — no priority, no due date. Backing store: `.design/NOTES.md`.
11
+
12
+ ## File format
13
+
14
+ ```markdown
15
+ # Design Notes
16
+
17
+ - [2026-04-18 04:55] Consider revisiting the card border-radius after Phase 7 ships
18
+ - [2026-04-18 05:10] [promoted → todo] Try a glassmorphism treatment for the sidebar
19
+ ```
20
+
21
+ ## Subcommands
22
+
23
+ ### add [text]
24
+ Create `.design/NOTES.md` with header if missing. Append one line:
25
+ ```
26
+ - [YYYY-MM-DD HH:MM] <text>
27
+ ```
28
+ If text omitted, append a blank timestamped entry for the user to fill later:
29
+ ```
30
+ - [YYYY-MM-DD HH:MM]
31
+ ```
32
+
33
+ ### list
34
+ Read `.design/NOTES.md`. Print each note line with its line number for use with `promote`.
35
+
36
+ ### promote [line-number]
37
+ Read the note at that line. Delegate to `/gdd:todo add` by writing a new P2 entry into `.design/TODO.md` directly (format: `- [ ] [YYYY-MM-DD] <text>` under `## P2 — Normal`). Rewrite the original note line in NOTES.md with `[promoted → todo]` prefix before the text:
38
+ ```
39
+ - [2026-04-18 05:10] [promoted → todo] <original text>
40
+ ```
41
+
42
+ ## Constraints
43
+
44
+ - Never overwrite prior notes on `add`.
45
+ - Preserve exact line order on `promote`.
46
+
47
+ ## NOTE COMPLETE
@@ -0,0 +1,120 @@
1
+ ---
2
+ name: optimize
3
+ description: "Reads .design/telemetry/costs.jsonl + .design/agent-metrics.json, runs rule-based analysis, writes .design/OPTIMIZE-RECOMMENDATIONS.md. Pure advisory — no auto-apply. User reviews + decides."
4
+ argument-hint: "[--refresh] [--min-spawns=N]"
5
+ user-invocable: true
6
+ tools: Read, Bash, Grep, Write
7
+ ---
8
+
9
+ # /gdd:optimize — Optimization Advisor
10
+
11
+ ## Role
12
+
13
+ You are the optimization advisor. You read the telemetry ledger (`.design/telemetry/costs.jsonl`) and the per-agent metrics aggregate (`.design/agent-metrics.json`), apply a fixed set of rule-based heuristics, and emit recommendations to `.design/OPTIMIZE-RECOMMENDATIONS.md`. You never modify agent files, budget config, or cache state. Your output is a markdown table of proposals the user reviews manually, mirroring the Phase 11 `/gdd:apply-reflections` discipline.
14
+
15
+ This skill is **advisory only**. It never edits `agents/*.md`, `.design/budget.json`, `.design/cache-manifest.json`, or any other configuration. The skill never makes model calls — every rule is deterministic.
16
+
17
+ ## Refresh Step
18
+
19
+ Before analysis, invoke the aggregator to ensure metrics are current:
20
+
21
+ ```bash
22
+ node scripts/aggregate-agent-metrics.js
23
+ ```
24
+
25
+ This is idempotent. If `--refresh` flag is absent and `.design/agent-metrics.json` was generated within the last 60 seconds, the skill may skip this step.
26
+
27
+ ## Inputs
28
+
29
+ - `.design/telemetry/costs.jsonl` — append-only; skill reads tail. Tolerant of malformed lines.
30
+ - `.design/agent-metrics.json` — per-agent aggregate produced by `scripts/aggregate-agent-metrics.js`. Source of truth for `cache_hit_rate`, `lazy_skip_rate`, `total_cost_usd`, `total_spawns`.
31
+ - `agents/*.md` — frontmatter cross-reference when checking tier override churn + typical-duration drift.
32
+ - `.design/budget.json` — `tier_overrides` table for cross-check (optional; proceed if missing).
33
+
34
+ ## Optional Arguments
35
+
36
+ - `--refresh` — force aggregator refresh even if metrics file is fresh.
37
+ - `--min-spawns=N` — only emit recommendations for agents with ≥ N spawns (default: 5; raise for high-traffic projects to suppress noise).
38
+
39
+ ## Rules
40
+
41
+ Rule-based analysis, applied in this order. Each rule inspects per-agent aggregates and emits zero or more rows to the recommendations table.
42
+
43
+ **Rule R1 — Low cache hit rate.**
44
+ > IF an agent has `total_spawns >= --min-spawns` AND `cache_hit_rate < 0.20`
45
+ > THEN emit: `"Consider batching tasks for agent {agent} — cache hit rate is {rate*100}%. Investigate cache-aligned ordering (see reference/shared-preamble.md) and whether input paths can be normalized."`
46
+ > PROPOSED: Batch similar tasks; confirm shared-preamble import ordering.
47
+
48
+ **Rule R2 — Expensive and rarely lazy-skipped.**
49
+ > IF an agent has `total_cost_usd > 0.50` AND `lazy_skip_rate < 0.10`
50
+ > THEN emit: `"Agent {agent} is expensive (${cost}) and rarely skipped ({rate*100}% lazy-skip). Consider adding a lazy gate heuristic at agents/{agent}-gate.md (see plan 10.1-04 pattern)."`
51
+ > PROPOSED: Add lazy-gate agent.
52
+
53
+ **Rule R3 — Tier override churn.**
54
+ > IF for multiple telemetry rows an agent's recorded `tier` differs from its frontmatter `default-tier` (e.g., frontmatter says `opus` but measured rows consistently show `haiku` from budget.json override or soft-threshold downgrade)
55
+ > THEN emit: `"Tier override churn detected for {agent}: frontmatter says {frontmatter-tier} but measured tier is {measured-tier} in {N} of last {M} rows. Consider updating frontmatter default-tier or removing the budget.json override."`
56
+ > PROPOSED: Update frontmatter default-tier OR prune budget.json tier_overrides entry.
57
+
58
+ **Rule R4 — Typical duration drift.**
59
+ > IF measured `typical_duration_seconds` (computed as average wall-clock duration from telemetry `ts` deltas when paired spawn/complete rows exist; fall back to frontmatter value if pairing unavailable in v1) differs from frontmatter `typical-duration-seconds` by more than 50%
60
+ > THEN emit: `"Typical duration for {agent} has drifted: frontmatter {old}s vs measured {new}s ({delta_pct}% drift). Update frontmatter typical-duration-seconds: {new}."`
61
+ > PROPOSED: Edit agents/{agent}.md frontmatter.
62
+
63
+ (Note: v1 only computes wall-clock duration if the telemetry ledger carries both spawn and complete rows with matching correlation IDs. If it doesn't — 10.1's PreToolUse-only writer doesn't — Rule R4 flags "insufficient data" for affected agents rather than emitting a false proposal. Phase 11 reflector can add a PostToolUse writer to close this gap; out of 10.1 scope.)
64
+
65
+ ## Output Format
66
+
67
+ Write `.design/OPTIMIZE-RECOMMENDATIONS.md` with this exact structure:
68
+
69
+ ```markdown
70
+ # Optimization Recommendations
71
+
72
+ **Generated:** {ISO-8601 timestamp}
73
+ **Telemetry rows analyzed:** {N}
74
+ **Agents analyzed:** {M}
75
+ **Min spawns threshold:** {--min-spawns value}
76
+
77
+ > Advisory only. No changes have been applied. Review each proposal and apply manually via the suggested action.
78
+
79
+ ## Proposals
80
+
81
+ | Rule | Agent | Current | Proposed | Rationale |
82
+ |------|-------|---------|----------|-----------|
83
+ | R1 | design-verifier | cache_hit_rate: 8% | Batch tasks; audit shared-preamble ordering | Low cache reuse; likely causing 3× cost on repeated calls |
84
+ | R2 | design-planner | $1.23 cost, 2% lazy-skip | Add agents/design-planner-gate.md | High spend with minimal gating |
85
+ | R3 | design-verifier | frontmatter opus / measured haiku (9/12 rows) | Update frontmatter default-tier: haiku | budget.json overrides are effectively permanent |
86
+
87
+ ## Summary
88
+
89
+ - R1 matches: {count}
90
+ - R2 matches: {count}
91
+ - R3 matches: {count}
92
+ - R4 matches: {count}
93
+
94
+ ## OPTIMIZE COMPLETE
95
+ ```
96
+
97
+ The `## OPTIMIZE COMPLETE` marker is the completion sentinel — automated graders and downstream tools detect completion by grepping for this exact line.
98
+
99
+ ## No Auto-Apply
100
+
101
+ This skill **never modifies** `agents/*.md`, `.design/budget.json`, `.design/cache-manifest.json`, or any other configuration. It **never auto-applies** proposals. It only writes `.design/OPTIMIZE-RECOMMENDATIONS.md`. If the user wants to act on a proposal, they do so manually (or via a future Phase 12 command that cross-references these proposals).
102
+
103
+ The discipline mirrors `/gdd:apply-reflections` from Phase 11: advisory output, user review, manual application.
104
+
105
+ ## Integration with Phase 11 Reflector
106
+
107
+ The Phase 11 reflector (`agents/design-reflector.md`) reads both `costs.jsonl` and `agent-metrics.json` on its own cadence. `/gdd:optimize` is the user-facing advisor; the reflector is the automation-facing one. Both output to different files (`.design/OPTIMIZE-RECOMMENDATIONS.md` vs `.design/reflections/*.md`) and never collide.
108
+
109
+ ## Non-Goals
110
+
111
+ - Does not make model calls (rule-based, deterministic).
112
+ - Does not modify config.
113
+ - Does not propose changes outside the four rules — future rules added by future phases.
114
+ - Does not learn from history — Phase 11 reflector territory.
115
+
116
+ ## Failure Modes
117
+
118
+ - Missing `.design/telemetry/costs.jsonl` → emit a single line `"No telemetry data yet — run one or more /gdd:* commands to accumulate data, then retry."` and still write the `## OPTIMIZE COMPLETE` marker.
119
+ - Missing `.design/agent-metrics.json` after refresh → emit `"Aggregator failed — check \`node scripts/aggregate-agent-metrics.js\` output manually."`.
120
+ - Zero rules matched → still write the recommendations file with `"No recommendations — all agents within healthy thresholds."` and the `## OPTIMIZE COMPLETE` marker.
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: gdd-pause
3
+ description: "Write session handoff so work can resume in a new session without re-running completed stages."
4
+ argument-hint: "[context note]"
5
+ tools: Read, Write, AskUserQuestion
6
+ ---
7
+
8
+ # /gdd:pause
9
+
10
+ Captures enough state that a killed or stopped session can resume cleanly via `/gdd:resume`.
11
+
12
+ ## Steps
13
+
14
+ 1. Read `.design/STATE.md`. Extract:
15
+ - Current `stage:` and `cycle:`
16
+ - Last activity timestamp
17
+ - Completed tasks in the current pipeline run
18
+ - Open todos (from `.design/TODO.md` if present)
19
+ - Active sketch/spike directories (scan `.design/sketches/` and `.design/spikes/` for in-progress markers)
20
+ 2. If no context argument was passed, ask (AskUserQuestion): "What are you in the middle of? (optional context to capture)"
21
+ 3. Write `.design/HANDOFF.md`:
22
+ ```markdown
23
+ # Session Handoff
24
+ **Paused**: <ISO timestamp>
25
+ **Stage**: <stage>
26
+ **Cycle**: <cycle-N>
27
+ **In progress**: <task description + wave/index>
28
+ **Next**: <next step>
29
+ **Context**: <user note>
30
+ **Active sketch**: <path or none>
31
+ **Open todos**: <N items (see .design/TODO.md)>
32
+ **Completed this session**: <list>
33
+ ```
34
+ 4. Print: "Session paused. Run `/gdd:resume` to pick back up."
35
+
36
+ ## Do Not
37
+
38
+ - Do not modify STATE.md itself — HANDOFF.md is the only write.
39
+ - Do not abort in-progress sketches; just record them.
40
+
41
+ ## PAUSE COMPLETE
@@ -0,0 +1,251 @@
1
+ ---
2
+ name: plan
3
+ description: "Stage 3 of 5 — reads DESIGN-CONTEXT.md, spawns design-phase-researcher (optional) + design-planner + design-plan-checker, writes DESIGN-PLAN.md. Thin orchestrator."
4
+ argument-hint: "[--auto] [--parallel]"
5
+ user-invocable: true
6
+ ---
7
+
8
+ # Get Design Done — Plan
9
+
10
+ **Stage 3 of 5** in the get-design-done pipeline. Thin orchestrator. All planning intelligence lives in agents/design-planner.md.
11
+
12
+ ## State Integration
13
+
14
+ 1. Read `.design/STATE.md`.
15
+ - If missing: create minimal skeleton from `reference/STATE-TEMPLATE.md` with stage=plan, status=in_progress, task_progress=0/3, and log warning "STATE.md not found — created fresh. If this is a resumed session, run /get-design-done:scan first."
16
+ - If present and frontmatter stage==plan and `<position>` status==in_progress: RESUME — skip already-complete agent invocations (use task_progress numerator as source of truth).
17
+ - Otherwise: normal transition — set frontmatter stage=plan, `<position>` stage=plan, status=in_progress, task_progress=0/3.
18
+ 2. Update `<connections>` by probing MCP availability (figma, refero).
19
+ 3. Update last_checkpoint. Write STATE.md.
20
+
21
+ Abort with a clear error only if the user is trying to plan without DESIGN-CONTEXT.md — that is the true prerequisite, not STATE.md.
22
+
23
+ ## Flag Parsing
24
+
25
+ Parse $ARGUMENTS:
26
+ - `--auto` → auto_mode=true (skip approvals, skip optional research)
27
+ - `--parallel` → parallel_mode=true (planner fills Touches:/Parallel: fields)
28
+
29
+ ## Parallelism Decision (before any multi-agent spawn)
30
+
31
+ - Read `.design/config.json` `parallelism` (or defaults from `reference/config-schema.md`).
32
+ - Apply rules from `reference/parallelism-rules.md`.
33
+ - Plan's pipeline is inherently sequential (researcher → pattern-mapper → planner → checker). Expected verdict: **serial** (rule 1).
34
+ - Write `<parallelism_decision>` to STATE.md with the verdict and reason before spawning agents.
35
+
36
+ ## Probe Chromatic connection
37
+
38
+ Run at stage entry, after reading STATE.md:
39
+
40
+ Step C1 — CLI presence:
41
+ Bash: command -v chromatic 2>/dev/null || npx chromatic --version 2>/dev/null
42
+ → found → proceed to Step C2
43
+ → not found → chromatic: not_configured (skip all Chromatic steps)
44
+
45
+ Step C2 — Token check:
46
+ Bash: test -n "${CHROMATIC_PROJECT_TOKEN}"
47
+ → true → chromatic: available
48
+ → false → chromatic: unavailable
49
+
50
+ Also check: if storybook: not_configured → chromatic effectively unavailable (emit note, do not run).
51
+ Write chromatic status to .design/STATE.md <connections>.
52
+
53
+ ## Chromatic Change-Risk Scoping (when chromatic: available)
54
+
55
+ Before writing DESIGN-PLAN.md, if chromatic: available:
56
+ 1. Identify token/component files to be changed (from DESIGN-CONTEXT.md scope)
57
+ 2. Run: Bash: npx chromatic --project-token $CHROMATIC_PROJECT_TOKEN --trace-changed=expanded --dry-run 2>&1
58
+ 3. Parse output — count story files that depend on changed source files
59
+ 4. Pass story count to design-planner.md (see design-planner.md Chromatic Change-Risk section)
60
+ If unavailable: design-planner proceeds without story-count annotation.
61
+
62
+ ## Step 1 — Optional Research (skip if auto_mode)
63
+
64
+ Complexity heuristic: if DESIGN-CONTEXT.md `<domain>` spans 3+ scopes OR `<decisions>` count > 6 → spawn design-phase-researcher. Otherwise skip.
65
+
66
+ If spawning:
67
+
68
+ ```
69
+ Task("design-phase-researcher", """
70
+ <required_reading>
71
+ @.design/STATE.md
72
+ @.design/DESIGN-CONTEXT.md
73
+ </required_reading>
74
+
75
+ You are the design-phase-researcher agent. Identify the project type from DESIGN-CONTEXT.md
76
+ and research relevant design patterns, pitfalls, and stack-specific conventions.
77
+
78
+ Output file: .design/DESIGN-RESEARCH.md
79
+ Target: ~100 lines, ~2 min budget.
80
+
81
+ Emit `## RESEARCH COMPLETE` when done.
82
+ """)
83
+ ```
84
+
85
+ Wait for `## RESEARCH COMPLETE`. Update STATE.md task_progress 1/3.
86
+
87
+ ## Step 1.5 — Pattern Mapping (mandatory, brownfield protection)
88
+
89
+ ```
90
+ Task("design-pattern-mapper", """
91
+ <required_reading>
92
+ @.design/STATE.md
93
+ @.design/DESIGN-CONTEXT.md
94
+ @reference/audit-scoring.md
95
+ </required_reading>
96
+
97
+ You are design-pattern-mapper. Grep the codebase for existing design patterns
98
+ (color tokens, spacing scale, typography conventions, component styling) and
99
+ write .design/DESIGN-PATTERNS.md. Classify by design concern — NOT by code
100
+ architecture (no controllers, services, middleware vocabulary).
101
+
102
+ Output file: .design/DESIGN-PATTERNS.md
103
+ Emit `## MAPPING COMPLETE` when done.
104
+ """)
105
+ ```
106
+
107
+ Wait for `## MAPPING COMPLETE`. Update STATE.md task_progress 1/3.
108
+
109
+ ## Step 1.6 — Assumptions Analysis (optional, same flag as research)
110
+
111
+ If assumptions analysis enabled (skip if auto_mode):
112
+
113
+ ```
114
+ Task("design-assumptions-analyzer", """
115
+ <required_reading>
116
+ @.design/STATE.md
117
+ @.design/DESIGN-CONTEXT.md
118
+ @.design/DESIGN-PATTERNS.md
119
+ </required_reading>
120
+
121
+ You are design-assumptions-analyzer. Surface hidden design assumptions with
122
+ confidence levels and evidence citations.
123
+
124
+ Emit `## ANALYSIS COMPLETE` when done.
125
+ """)
126
+ ```
127
+
128
+ Wait for `## ANALYSIS COMPLETE`.
129
+
130
+ ## Step 1.7 — Synthesize pre-plan research inputs (Plan 10.1-04, D-13/D-15)
131
+
132
+ If 2+ of the pre-plan research agents ran (`design-phase-researcher` Step 1, `design-pattern-mapper` Step 1.5, `design-assumptions-analyzer` Step 1.6), invoke synthesize to merge their outputs into a single compact brief. If only one ran, skip this step.
133
+
134
+ Skill("synthesize", {
135
+ outputs: [
136
+ (if Step 1 ran) "=== from design-phase-researcher ===\n" + <read .design/DESIGN-RESEARCH.md>,
137
+ (if Step 1.5 ran) "=== from design-pattern-mapper ===\n" + <read .design/DESIGN-PATTERNS.md>,
138
+ (if Step 1.6 ran) "=== from design-assumptions-analyzer ===\n" + <read .design/DESIGN-ASSUMPTIONS.md>
139
+ ],
140
+ directive: "Merge into a single compact pre-plan brief. Preserve per-source section headers so the planner can trace provenance. Consolidate duplicate recommendations with source tags. Target ~150 lines.",
141
+ output_shape: "markdown"
142
+ })
143
+
144
+ Wait for `## SYNTHESIS COMPLETE`. Write to `.design/DESIGN-PREPLAN-BRIEF.md` (overwrite if present). Add `@.design/DESIGN-PREPLAN-BRIEF.md` to the planner's `<required_reading>` in Step 2 — individual files remain on disk for drill-down.
145
+
146
+ **Parallel synthesizer note (future):** if a future plan variant spawns N parallel phase-researchers (e.g., one per project-type family), wire synthesize the same way as `skills/map/` Step 3.5.
147
+
148
+ ## Step 2 — Plan
149
+
150
+ ```
151
+ Task("design-planner", """
152
+ <required_reading>
153
+ @.design/STATE.md
154
+ @.design/DESIGN-CONTEXT.md
155
+ @reference/audit-scoring.md
156
+ @.design/DESIGN-PATTERNS.md
157
+ [@.design/DESIGN-RESEARCH.md — only include if research step ran]
158
+ [@.design/DESIGN-ASSUMPTIONS.md — only include if assumptions analysis ran]
159
+ [@.design/DESIGN-PREPLAN-BRIEF.md — include if Step 1.7 synthesize ran; planner prefers this compact brief over the individual files above]
160
+ [@.design/sketches/*/WINNER.md — include all completed sketch winners if present]
161
+ [@.design/spikes/*/FINDINGS.md — include all completed spike findings if present]
162
+ [@./.claude/skills/design-*-conventions.md — include all project-local design conventions if present]
163
+ [@~/.claude/gdd/global-skills/*.md — include all global skills if directory exists; global conventions inform but do not override project-local D-XX decisions]
164
+ </required_reading>
165
+
166
+ You are the design-planner agent. Read DESIGN-CONTEXT.md and produce .design/DESIGN-PLAN.md
167
+ with wave-ordered tasks, acceptance criteria, and (if parallel mode) Touches:/Parallel: fields.
168
+
169
+ Context:
170
+ - Pipeline stage: plan
171
+ - auto_mode: <true|false>
172
+ - parallel_mode: <true|false>
173
+
174
+ Output file: .design/DESIGN-PLAN.md
175
+ Format: per agents/design-planner.md Output Format section.
176
+
177
+ Emit `## PLANNING COMPLETE` when done.
178
+ """)
179
+ ```
180
+
181
+ Wait for `## PLANNING COMPLETE`. Update STATE.md task_progress 2/3.
182
+
183
+ ## Step 3 — Check
184
+
185
+ ```
186
+ Task("design-plan-checker", """
187
+ <required_reading>
188
+ @.design/STATE.md
189
+ @.design/DESIGN-PLAN.md
190
+ @.design/DESIGN-CONTEXT.md
191
+ </required_reading>
192
+
193
+ You are the design-plan-checker agent. Validate DESIGN-PLAN.md will achieve DESIGN-CONTEXT.md
194
+ brief goals across 5 dimensions: requirement coverage, task completeness, wave ordering,
195
+ must-have derivation, auto mode compliance.
196
+
197
+ Context:
198
+ - auto_mode: <true|false>
199
+
200
+ Output: structured result as response text (no file). Start with `## PLAN CHECK RESULT: PASS`
201
+ or `## PLAN CHECK RESULT: ISSUES FOUND`.
202
+
203
+ Emit `## PLAN CHECK COMPLETE` when done.
204
+ """)
205
+ ```
206
+
207
+ Wait for `## PLAN CHECK COMPLETE`. Update STATE.md task_progress 3/3.
208
+
209
+ If `## PLAN CHECK RESULT: ISSUES FOUND` and any BLOCKER issues:
210
+ - Present issues to user and offer: (a) revise plan now — re-spawn design-planner with issue list, (b) accept and proceed, (c) abort.
211
+ - If auto_mode: auto-accept WARNING issues, abort on BLOCKER issues.
212
+
213
+ ## State Update (exit)
214
+
215
+ 1. Set `<position>` status=completed.
216
+ 2. Set `<timestamps>` plan_completed_at=now.
217
+ 3. Update last_checkpoint. Write STATE.md.
218
+
219
+ ## After Completion
220
+
221
+ Print user-facing summary:
222
+ - Plan tasks: N waves, M total tasks
223
+ - Files: .design/DESIGN-PLAN.md (and .design/DESIGN-RESEARCH.md if research ran)
224
+ - Next: `/get-design-done:design` to execute the plan
225
+
226
+ ## PLAN COMPLETE
227
+
228
+ ---
229
+
230
+ ## Exploration artifacts & project-local conventions
231
+
232
+ When building the planner spawn prompt, also glob for:
233
+ - `.design/sketches/*/WINNER.md` — winning sketch rationale (informs directional tasks)
234
+ - `.design/spikes/*/FINDINGS.md` — spike verdicts (inform task feasibility)
235
+ - `./.claude/skills/design-*-conventions.md` — project-local design conventions
236
+
237
+ Include each matching file in `<files_to_read>` / `<required_reading>` so the planner sees them when creating tasks. Spike findings from `.design/spikes/` inform task feasibility; sketch winners inform directional choice; project-local conventions override defaults.
238
+
239
+ ## --research mode (removed)
240
+
241
+ V2-04 deferred the `--research` flag. Rationale: complexity of an additional
242
+ agent spawn + Context7 integration outweighs the benefit of discover-stage
243
+ auto-detect for most projects. Use /discover's Auto Mode for research-assisted
244
+ discovery instead.
245
+
246
+ The optional research step that already exists (Step 1, triggered by complexity
247
+ heuristic: 3+ domain scopes OR 6+ decisions) covers the core use case without
248
+ a separate CLI flag.
249
+
250
+ If --research is reintroduced in a future version, define its scope in
251
+ ROADMAP.md V2+ and update this section.
@@ -0,0 +1,47 @@
1
+ ---
2
+ name: gdd-plant-seed
3
+ description: "Forward-looking design idea with a trigger condition. Seeds surface automatically when trigger is met. Writes to .design/SEEDS.md."
4
+ argument-hint: "[--trigger <condition>] [text]"
5
+ tools: Read, Write, AskUserQuestion
6
+ ---
7
+
8
+ # /gdd:plant-seed
9
+
10
+ **Role:** Capture an idea that is too early to act on now but should surface when a future condition is met. Backing store: `.design/SEEDS.md`.
11
+
12
+ ## Step 1 — Gather inputs
13
+
14
+ - `<text>`: free-text idea. If empty, ask the user: "What's the seed idea?"
15
+ - `--trigger <condition>`: the surfacing condition. If missing, ask: "What trigger condition should surface this idea? (e.g., 'when we add dark mode', 'when the nav component is redesigned', 'at next cycle start')"
16
+
17
+ ## Step 2 — Append to .design/SEEDS.md
18
+
19
+ Create the file with `# Design Seeds` header if missing. Append:
20
+
21
+ ```markdown
22
+ ## Seed: <first 60 chars of text>
23
+ **Trigger**: <condition>
24
+ **Planted**: YYYY-MM-DD
25
+ **Status**: dormant
26
+
27
+ <full text>
28
+
29
+ ---
30
+ ```
31
+
32
+ ## Step 3 — Surfacing contract
33
+
34
+ Seeds are surfaced automatically by `/gdd:progress` and `/gdd:health`. Those commands do a keyword match of each seed's trigger text against current STATE.md + `.design/CYCLES.md` content and print any matches as `Seed ready to germinate: <text>`.
35
+
36
+ This skill does NOT surface seeds itself — it only plants them.
37
+
38
+ ## Output
39
+
40
+ ```
41
+ ━━━ Seed planted ━━━
42
+ Trigger: when we add dark mode
43
+ Status: dormant
44
+ ━━━━━━━━━━━━━━━━━━━━
45
+ ```
46
+
47
+ ## PLANT-SEED COMPLETE
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: gdd-pr-branch
3
+ description: "Create a clean PR branch by filtering out .design/ and .planning/ commits. Code-review-ready branch for the design implementation work."
4
+ argument-hint: "[<base-branch>]"
5
+ tools: Read, Write, Bash
6
+ ---
7
+
8
+ # /gdd:pr-branch
9
+
10
+ Produces a branch that contains only code changes (under `src/`) so reviewers are not forced to read through `.design/` planning churn.
11
+
12
+ ## Steps
13
+
14
+ 1. **Determine base**: Use the argument if provided; otherwise read the current branch's merge base with `main` via `git merge-base HEAD main`.
15
+ 2. **List commits**: `git log --oneline <base>..HEAD` via Bash.
16
+ 3. **Classify each commit**: For each SHA, run `git show --name-only <sha>` and inspect the changed paths:
17
+ - **code-only**: all paths under `src/` (or other code dirs, not `.design/` / `.planning/`) → include
18
+ - **design-only**: all paths under `.design/` or `.planning/` → skip
19
+ - **mixed**: both kinds → include and log a note
20
+ 4. **Get cycle name**: Read `.design/STATE.md` for the current `cycle:` ID (default `cycle-1`).
21
+ 5. **Create branch**: `git checkout -b pr/<cycle>-clean <base>`.
22
+ 6. **Cherry-pick**: For every included SHA (in original order), run `git cherry-pick <sha>`. On conflict, abort the whole operation with a clear message and reset to the pre-op branch.
23
+ 7. **Print summary**: "PR branch `pr/<cycle>-clean` created with <N> commits. `.design/` and `.planning/` commits excluded. Mixed commits flagged: <list>."
24
+
25
+ ## Do Not
26
+
27
+ - Do not rewrite history on the original branch.
28
+ - Do not include `.design/` or `.planning/` paths — if a mixed commit contains them, the cherry-pick carries them through, but reviewers are warned.
29
+ - Do not push the branch automatically — let `/gdd:ship` or the user push.
30
+
31
+ ## PR-BRANCH COMPLETE