@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
package/SKILL.md ADDED
@@ -0,0 +1,232 @@
1
+ ---
2
+ name: get-design-done
3
+ short_name: gdd
4
+ description: "Master design pipeline for Claude Code. 5-stage workflow: Brief → Explore → Plan → Design → Verify. Run 'brief' first in any new project to capture the design problem, then 'explore' to inventory the codebase and interview for context. Invoke without arguments for status and auto-routing."
5
+ argument-hint: "[brief|explore|plan|design|verify|handoff|map|next|help|status|style|darkmode|compare|figma-write|graphify|discuss|list-assumptions|progress|health|todo|stats|note|plant-seed|add-backlog|review-backlog|scan|discover|settings|update|reapply-patches|audit|pause|resume|new-cycle|debug|quick|new-project|complete-cycle|fast|do|ship|undo|pr-branch|sketch|sketch-wrap-up|spike|spike-wrap-up|reflect|apply-reflections|analyze-dependencies|extract-learnings|skill-manifest|warm-cache|optimize|cache-manager]"
6
+ user-invocable: true
7
+ ---
8
+
9
+ # Get Design Done — Pipeline Router
10
+
11
+ Entry point for the get-design-done toolkit. Establishes the `/gdd:` command namespace.
12
+
13
+ ```
14
+ Brief → Explore → Plan → Design → Verify → next
15
+ ```
16
+
17
+ The 5-stage pipeline. `scan` and `discover` are now merged into `explore` — their old aliases still route through for backward compatibility.
18
+
19
+ Each stage produces artifacts in `.design/` inside the current project.
20
+
21
+ ## Command Reference
22
+
23
+ | Command | Skill | Purpose |
24
+ |---|---|---|
25
+ | `brief` | `get-design-done:gdd-brief` | Stage 1 of 5 — capture problem, audience, constraints, metrics, scope → BRIEF.md |
26
+ | `explore` | `get-design-done:gdd-explore` | Stage 2 of 5 — inventory scan + design interview → DESIGN.md, DESIGN-DEBT.md, DESIGN-CONTEXT.md |
27
+ | `plan` | `get-design-done:plan` | Stage 3 of 5 — decompose into tasks → DESIGN-PLAN.md |
28
+ | `design` | `get-design-done:design` | Stage 4 of 5 — execute tasks → DESIGN-SUMMARY.md |
29
+ | `verify` | `get-design-done:verify` | Stage 5 of 5 — score + audit → DESIGN-VERIFICATION.md |
30
+ | `handoff <path>` | inline | Skip scan/discover/plan; initialize from Claude Design bundle; route to verify |
31
+ | `map` | `get-design-done:gdd-map` | Parallel codebase mapping — spawns 5 mappers → `.design/map/*.md` + `.design/DESIGN-MAP.md` |
32
+ | `next` | `get-design-done:gdd-next` | Route to the next pipeline stage based on STATE.md |
33
+ | `help` | `get-design-done:gdd-help` | List all commands with one-line descriptions |
34
+ | `style [ComponentName]` | `get-design-done:style` | Generate component handoff doc → .design/DESIGN-STYLE-[Name].md |
35
+ | `darkmode` | `get-design-done:darkmode` | Audit dark mode architecture + contrast + anti-patterns → .design/DARKMODE-AUDIT.md |
36
+ | `compare` | `get-design-done:compare` | Delta between DESIGN.md baseline and DESIGN-VERIFICATION.md → .design/COMPARE-REPORT.md |
37
+ | `figma-write <mode>` | `get-design-done:figma-write` | Write design decisions to Figma (annotate/tokenize/mappings) |
38
+ | `graphify <subcommand>` | `get-design-done:graphify` | Manage Graphify knowledge graph (build/query/status/diff) |
39
+ | `discuss [topic] [--all] [--spec] [--cycle <name>]` | `get-design-done:gdd-discuss` | Adaptive design interview — spawns design-discussant; appends D-XX decisions to STATE.md |
40
+ | `list-assumptions [--area]` | `get-design-done:gdd-list-assumptions` | Surface implicit design assumptions baked into the codebase |
41
+ | **Audit & Session** | | |
42
+ | `audit [--retroactive] [--quick] [--no-reflect]` | `get-design-done:gdd-audit` | Wraps design-verifier + design-auditor + design-reflector; `--retroactive` audits full cycle scope |
43
+ | `reflect [--dry-run] [--cycle <slug>]` | `get-design-done:gdd-reflect` | On-demand reflection — reads cycle data, produces improvement proposals → `.design/reflections/<slug>.md` |
44
+ | `apply-reflections [--filter <type>] [--dry-run]` | `get-design-done:gdd-apply-reflections` | Review + selectively apply reflection proposals (FRONTMATTER/REFERENCE/BUDGET/QUESTION/GLOBAL-SKILL) |
45
+ | `pause [context]` | `get-design-done:gdd-pause` | Write session handoff to `.design/HANDOFF.md` |
46
+ | `resume` | `get-design-done:gdd-resume` | Restore session context from `.design/HANDOFF.md` and route to next step |
47
+ | **Lifecycle** | | |
48
+ | `new-project [--name <n>]` | `get-design-done:gdd-new-project` | Initialize project — PROJECT.md + STATE.md + cycle-1 |
49
+ | `new-cycle [<goal>]` | `get-design-done:gdd-new-cycle` | Start a new design cycle; writes `.design/CYCLES.md` entry |
50
+ | `complete-cycle [<note>]` | `get-design-done:gdd-complete-cycle` | Archive cycle artifacts to `.design/archive/cycle-N/`; reset STATE.md |
51
+ | **Execution speed** | | |
52
+ | `quick [--skip <agent>] [stage]` | `get-design-done:gdd-quick` | Run pipeline skipping optional agents for speed |
53
+ | `fast <task>` | `get-design-done:gdd-fast` | Trivial inline task — no subagents, no pipeline, no artifacts |
54
+ | **Debug & Workflow** | | |
55
+ | `debug [<symptom>]` | `get-design-done:gdd-debug` | Symptom-driven design investigation; persistent state in `.design/DEBUG.md` |
56
+ | `do <natural language>` | `get-design-done:gdd-do` | Natural-language router — parses intent, confirms, dispatches |
57
+ | **Ship & Safety** | | |
58
+ | `ship [--title <t>] [--draft]` | `get-design-done:gdd-ship` | Post-verify PR flow — clean branch + `gh pr create` |
59
+ | `pr-branch [<base>]` | `get-design-done:gdd-pr-branch` | Strip `.design/` and `.planning/` commits for clean code-review branch |
60
+ | `undo [<sha>]` | `get-design-done:gdd-undo` | Safe revert with dependency check |
61
+ | **Ops** | | |
62
+ | `progress [--forensic]` | `get-design-done:gdd-progress` | Pipeline position + recommended next action; `--forensic` runs 6-check integrity audit |
63
+ | `health` | `get-design-done:gdd-health` | Artifact health report for `.design/` |
64
+ | `todo <add\|list\|pick> [text]` | `get-design-done:gdd-todo` | Design todo list → `.design/TODO.md` |
65
+ | `stats` | `get-design-done:gdd-stats` | Cycle metrics — decisions, commits, todos |
66
+ | **Idea capture** | | |
67
+ | `note <add\|list\|promote> [text]` | `get-design-done:gdd-note` | Zero-friction notes → `.design/NOTES.md` |
68
+ | `plant-seed [--trigger <cond>] [text]` | `get-design-done:gdd-plant-seed` | Forward-looking idea with trigger → `.design/SEEDS.md` |
69
+ | `add-backlog [text]` | `get-design-done:gdd-add-backlog` | Park an idea → `.design/backlog/BACKLOG.md` |
70
+ | `review-backlog` | `get-design-done:gdd-review-backlog` | Walk parked items; promote/archive |
71
+ | **Exploration** | | |
72
+ | `sketch [topic] [--variants N] [--quick]` | `get-design-done:gdd-sketch` | Multi-variant HTML exploration → `.design/sketches/<slug>/variant-*.html` |
73
+ | `sketch-wrap-up [slug]` | `get-design-done:gdd-sketch-wrap-up` | Pick winner + rationale → writes `./.claude/skills/design-<area>-conventions.md` |
74
+ | `spike [hypothesis] [--timebox N]` | `get-design-done:gdd-spike` | Timeboxed feasibility experiment → `.design/spikes/<slug>/` |
75
+ | `spike-wrap-up [slug]` | `get-design-done:gdd-spike-wrap-up` | Capture findings + D-XX decision → `.design/spikes/<slug>/FINDINGS.md` |
76
+ | `scan` *(deprecated)* | `get-design-done:scan` | Alias — use `explore` instead |
77
+ | `discover` *(deprecated)* | `get-design-done:discover` | Alias — use `explore` instead |
78
+ | **Configuration** | | |
79
+ | `settings <profile\|parallelism\|cleanup\|show>` | `get-design-done:gdd-settings` | Manage `.design/config.json` — model profile, parallelism, cleanup |
80
+ | **Maintenance** | | |
81
+ | `update [--dry-run] [--version <tag>]` | `get-design-done:gdd-update` | Update plugin to latest release; preserves config + local skills |
82
+ | `reapply-patches [--dry-run]` | `get-design-done:gdd-reapply-patches` | Reapply `reference/` customizations after an update |
83
+ | `analyze-dependencies [--slice <name>]` | `get-design-done:analyze-dependencies` | Query the `.design/intel/` store — dependency slices, graph queries, phase-scoped reads |
84
+ | `extract-learnings [--cycle <slug>]` | `get-design-done:extract-learnings` | Extract decisions, lessons, patterns, and surprises from a completed cycle → `.design/cycles/<slug>/LEARNINGS.md` |
85
+ | `skill-manifest [--refresh]` | `get-design-done:skill-manifest` | List or refresh the local skill manifest used by the router for discovery |
86
+
87
+ ## Handoff Routing
88
+
89
+ **Check FIRST** — before any other routing logic. If `$ARGUMENTS` starts with `handoff` OR contains `--from-handoff`:
90
+
91
+ 1. **Extract bundle path:**
92
+ - `handoff <path>` → bundle path is the second argument
93
+ - `--from-handoff <path>` → bundle path is the value after the flag
94
+ - Neither has a path → check STATE.md `handoff_path`; if absent, error: "Provide a bundle path: /gdd:handoff ./path/to/bundle.html"
95
+ - Verify the file exists; if not, error: "Bundle not found at <path>"
96
+
97
+ 2. **Initialize STATE.md:**
98
+ - If `.design/STATE.md` does not exist: copy `reference/STATE-TEMPLATE.md` to `.design/STATE.md`
99
+ - Set in `<position>`: `handoff_source: claude-design-html`, `handoff_path: <resolved path>`, `skipped_stages: scan, discover, plan`, `status: handoff-sourced`, `stage: verify`
100
+ - Set in `<connections>`: `claude_design: available`; all others remain `not_configured`
101
+
102
+ 3. **Spawn design-research-synthesizer** in handoff mode:
103
+ ```
104
+ Task("design-research-synthesizer", """
105
+ mode: handoff
106
+ handoff_path: <resolved bundle path>
107
+ state_path: .design/STATE.md
108
+ """)
109
+ ```
110
+ Wait for `## SYNTHESIZE COMPLETE`.
111
+
112
+ 4. **Spawn design-discussant** in `--from-handoff` mode:
113
+ ```
114
+ Task("design-discussant", """
115
+ <mode>--from-handoff</mode>
116
+ <required_reading>.design/STATE.md</required_reading>
117
+ """)
118
+ ```
119
+ Wait for `## DISCUSS COMPLETE`.
120
+
121
+ 5. **Route to verify** with `--post-handoff` flag:
122
+ ```
123
+ Skill("get-design-done:verify", "--post-handoff")
124
+ ```
125
+
126
+ 6. **Optional: Bidirectional write-back** (post-verify, offered to user)
127
+ After verify completes without FAIL-level gaps:
128
+ - Check STATE.md `<connections>` for `figma_writer`
129
+ - `figma_writer: not_configured` → skip (no offer)
130
+ - `figma_writer: available` → offer: "Write implementation status back to Figma? (annotates frames + Code Connect mappings)"
131
+ Options: [yes, write back] [dry-run, show proposal only] [skip]
132
+ - If yes or dry-run: spawn `agents/design-figma-writer.md` with `mode: implementation-status`, `dry_run: <true|false>`
133
+
134
+ ---
135
+
136
+ ## Routing Logic
137
+
138
+ When invoked without arguments (or with `status`), show pipeline state and suggest next action:
139
+
140
+ ```
141
+ 1. No .design/ and no BRIEF.md → Suggest brief first: "New project — run /gdd:brief to capture the problem."
142
+ 2. BRIEF.md exists, no DESIGN.md → Route to explore
143
+ 3. DESIGN.md + DESIGN-CONTEXT.md exist, no DESIGN-PLAN.md → Route to plan
144
+ 4. DESIGN-PLAN.md exists, DESIGN-SUMMARY.md missing → Route to design
145
+ 5. DESIGN-SUMMARY.md exists, DESIGN-VERIFICATION.md missing → Route to verify
146
+ 6. DESIGN-VERIFICATION.md exists → Show summary + offer to start new cycle
147
+ ```
148
+
149
+ ## Status Display
150
+
151
+ ```
152
+ ━━━ Get Design Done Pipeline ━━━
153
+ [✓] Brief → .design/BRIEF.md
154
+ [✓] Explore → DESIGN.md + DESIGN-DEBT.md + DESIGN-CONTEXT.md (stage 2-of-5; replaces scan+discover)
155
+ [→] Plan ← current stage (3-of-5)
156
+ [ ] Design (4-of-5)
157
+ [ ] Verify (5-of-5)
158
+ ```
159
+
160
+ Use `[✓]` for complete, `[→]` for current, `[ ]` for pending, `[!]` for gaps/errors.
161
+
162
+ ## Jump Mode
163
+
164
+ If `$ARGUMENTS` is a stage or command name — invoke it directly, no state check:
165
+
166
+ ```
167
+ /gdd:brief → Skill("get-design-done:gdd-brief")
168
+ /gdd:explore → Skill("get-design-done:gdd-explore")
169
+ /gdd:plan → Skill("get-design-done:plan") # stage 3-of-5
170
+ /gdd:design → Skill("get-design-done:design") # stage 4-of-5
171
+ /gdd:verify → Skill("get-design-done:verify") # stage 5-of-5
172
+ /gdd:handoff → [Handoff Routing] (inline — see ## Handoff Routing above)
173
+ /gdd:map → Skill("get-design-done:gdd-map") # parallel codebase mapping
174
+ /gdd:next → Skill("get-design-done:gdd-next")
175
+ /gdd:help → Skill("get-design-done:gdd-help")
176
+ /gdd:style → Skill("get-design-done:style")
177
+ /gdd:darkmode → Skill("get-design-done:darkmode")
178
+ /gdd:compare → Skill("get-design-done:compare")
179
+ /gdd:figma-write → Skill("get-design-done:figma-write")
180
+ /gdd:graphify → Skill("get-design-done:graphify")
181
+ /gdd:discuss → Skill("get-design-done:gdd-discuss")
182
+ /gdd:list-assumptions → Skill("get-design-done:gdd-list-assumptions")
183
+ /gdd:progress → Skill("get-design-done:gdd-progress")
184
+ /gdd:health → Skill("get-design-done:gdd-health")
185
+ /gdd:todo → Skill("get-design-done:gdd-todo")
186
+ /gdd:stats → Skill("get-design-done:gdd-stats")
187
+ # --- Idea capture ---
188
+ /gdd:note → Skill("get-design-done:gdd-note")
189
+ /gdd:plant-seed → Skill("get-design-done:gdd-plant-seed")
190
+ /gdd:add-backlog → Skill("get-design-done:gdd-add-backlog")
191
+ /gdd:review-backlog → Skill("get-design-done:gdd-review-backlog")
192
+ /gdd:scan → Skill("get-design-done:gdd-explore") # deprecated alias → explore
193
+ /gdd:discover → Skill("get-design-done:gdd-explore") # deprecated alias → explore
194
+ # --- Configuration ---
195
+ /gdd:settings → Skill("get-design-done:gdd-settings")
196
+ # --- Maintenance ---
197
+ /gdd:update → Skill("get-design-done:gdd-update")
198
+ /gdd:reapply-patches → Skill("get-design-done:gdd-reapply-patches")
199
+ # --- Audit & Session ---
200
+ /gdd:audit → Skill("get-design-done:gdd-audit")
201
+ /gdd:reflect → Skill("get-design-done:gdd-reflect")
202
+ /gdd:apply-reflections → Skill("get-design-done:gdd-apply-reflections")
203
+ /gdd:pause → Skill("get-design-done:gdd-pause")
204
+ /gdd:resume → Skill("get-design-done:gdd-resume")
205
+ # --- Lifecycle ---
206
+ /gdd:new-project → Skill("get-design-done:gdd-new-project")
207
+ /gdd:new-cycle → Skill("get-design-done:gdd-new-cycle")
208
+ /gdd:complete-cycle → Skill("get-design-done:gdd-complete-cycle")
209
+ # --- Execution speed ---
210
+ /gdd:quick → Skill("get-design-done:gdd-quick")
211
+ /gdd:fast → Skill("get-design-done:gdd-fast")
212
+ # --- Debug & Workflow ---
213
+ /gdd:debug → Skill("get-design-done:gdd-debug")
214
+ /gdd:do → Skill("get-design-done:gdd-do")
215
+ # --- Ship & Safety ---
216
+ /gdd:ship → Skill("get-design-done:gdd-ship")
217
+ /gdd:pr-branch → Skill("get-design-done:gdd-pr-branch")
218
+ /gdd:undo → Skill("get-design-done:gdd-undo")
219
+ # --- Exploration ---
220
+ /gdd:sketch → Skill("get-design-done:gdd-sketch")
221
+ /gdd:sketch-wrap-up → Skill("get-design-done:gdd-sketch-wrap-up")
222
+ /gdd:spike → Skill("get-design-done:gdd-spike")
223
+ /gdd:spike-wrap-up → Skill("get-design-done:gdd-spike-wrap-up")
224
+ ```
225
+
226
+ Pass remaining arguments through: `/gdd:explore --skip-interview` → `Skill("get-design-done:gdd-explore", "--skip-interview")`.
227
+
228
+ ## Do Not
229
+
230
+ - Do not perform any design work yourself — route to the stage skill.
231
+ - Do not skip stages unless the user explicitly passes a stage argument.
232
+ - Do not create or modify `.design/` files — the stage skills own their artifacts.
@@ -0,0 +1,226 @@
1
+ # Agents — Authoring Contract
2
+
3
+ This directory contains the specialized agents that pipeline stages spawn to do focused work. Read this file before writing a new agent — it is the complete authoring contract. You do not need to read GSD source code.
4
+
5
+ ## Overview
6
+
7
+ Pipeline stages are **thin orchestrators**. They read `.design/STATE.md`, decide which work to delegate, spawn one or more agents via the `Task` tool, collect results, and write updated state. The agents do the actual work: extracting design tokens, mapping patterns, writing plans, verifying artifacts.
8
+
9
+ This separation provides three concrete benefits:
10
+
11
+ - **Context isolation** — each agent starts fresh with only what it needs, keeping token budgets tight and results deterministic.
12
+ - **Reusability** — the same `design-verifier` agent can be called from the `design` stage and the `verify` stage without modification.
13
+ - **Testability** — agents can be invoked directly against fixture inputs without running the full pipeline.
14
+
15
+ Agents live in `agents/` as individual markdown files. Each file contains YAML frontmatter (metadata consumed by the Claude Code `Task` tool) and a prose body (instructions the agent follows when invoked).
16
+
17
+ ---
18
+
19
+ ## Naming Convention
20
+
21
+ Filenames use kebab-case with the `design-` prefix to scope them within this plugin:
22
+
23
+ ```
24
+ agents/design-planner.md
25
+ agents/design-verifier.md
26
+ agents/design-token-extractor.md
27
+ agents/design-pattern-mapper.md
28
+ ```
29
+
30
+ The `design-` prefix prevents name collisions with agents from other Claude Code plugins. The remainder of the name describes the agent's role. Use nouns or noun phrases, not verbs: `design-planner`, not `design-plan`.
31
+
32
+ ---
33
+
34
+ ## Frontmatter Schema
35
+
36
+ Every agent file begins with a YAML frontmatter block. All fields except `model` are required. The `default-tier` and `tier-rationale` fields were added in Phase 10.1 — see `reference/model-tiers.md` for the per-agent assignment rationale.
37
+
38
+ | Field | Type | Accepted values | Purpose |
39
+ |-------|------|-----------------|---------|
40
+ | `name` | kebab-case string | unique within plugin | Identifier passed to the `Task` tool — must match the filename without `.md` |
41
+ | `description` | string | free-form | One sentence: what the agent does + when it is spawned |
42
+ | `tools` | comma-separated list | `Read`, `Write`, `Edit`, `Bash`, `Grep`, `Glob`, `Task`, `WebFetch`, `TodoWrite`, `mcp__*` | Claude tools the agent may use — list only what is needed |
43
+ | `color` | enum | `yellow`, `green`, `blue`, `red` | Terminal display color for the agent's output |
44
+ | `model` | enum (optional) | `inherit`, `sonnet`, `haiku` | Omit to use the project's configured profile default. Use `inherit` to bypass the profile and use the highest available model (quality-tier work) |
45
+ | `default-tier` | enum | `haiku`, `sonnet`, `opus` | **Phase 10.1.** The model tier the router + budget-enforcer hook select when `.design/budget.json.tier_overrides` has no entry for this agent. Paired with `reference/model-tiers.md` — the per-agent map in that file is the source of truth; this field is the per-agent replica the hook reads. Required on all agents. |
46
+ | `tier-rationale` | string | free-form, one line, quoted | **Phase 10.1.** One-sentence justification for the `default-tier` choice. Surfaces in `/gdd:optimize` output when the advisor suggests a tier move. Required on all agents. |
47
+ | `parallel-safe` | enum | `always`, `never`, `conditional-on-touches`, `auto` | Whether stages may dispatch this agent in parallel with siblings. `conditional-on-touches` means safe only when `Touches:` do not overlap |
48
+ | `typical-duration-seconds` | int | e.g. `30`, `60`, `120` | Expected wall-clock duration. Used by parallelism planner to decide whether savings clear `min_estimated_savings_seconds`. **Extensible** — Phase 10.1 adds `default-tier` override; Phase 11's `design-reflector` adds `measured-duration-seconds` from telemetry without replacing this field. |
49
+ | `reads-only` | bool | `true`/`false` | True when the agent never writes any file |
50
+ | `writes` | list | e.g. `[".design/DESIGN-PLAN.md"]` | Files / globs the agent may write. `[]` for read-only agents |
51
+
52
+ > **Frontmatter is extensible.** New fields can be added by downstream phases without removing existing ones. The `design-reflector` agent (Phase 11) may propose updates to `typical-duration-seconds` and `default-tier` based on measured telemetry — those proposals go through `/gdd:apply-reflections`, never auto-applied.
53
+
54
+ Example frontmatter block:
55
+
56
+ ```yaml
57
+ ---
58
+ name: design-token-extractor
59
+ description: Extracts design tokens (colors, typography, spacing) from scanned source files. Spawned by the scan stage.
60
+ tools: Read, Grep, Glob
61
+ color: blue
62
+ ---
63
+ ```
64
+
65
+ ---
66
+
67
+ ## Required Reading Pattern
68
+
69
+ When an agent must read specific files before acting, the orchestrating stage embeds a `<required_reading>` block in the prompt it passes to `Task`. The block is part of the **prompt string**, not the agent file.
70
+
71
+ ```markdown
72
+ <required_reading>
73
+ @.design/STATE.md
74
+ @reference/typography.md
75
+ </required_reading>
76
+ ```
77
+
78
+ **Invariant:** when a `<required_reading>` block is present in the prompt, the agent MUST `Read` every listed file before taking any other action. Paths starting with `@` are repo-relative (or absolute) file paths — pass them directly to the `Read` tool.
79
+
80
+ Agents do not hard-code their required reading. Required reading is supplied by the stage at call time, so the same agent can be given different context for different invocations.
81
+
82
+ ---
83
+
84
+ ## Completion Markers
85
+
86
+ Every agent terminates its response with a completion marker — a specific `##` heading that the orchestrating stage checks to confirm the agent finished successfully.
87
+
88
+ **GSD-style markers (used by research/planning/execution/verification agents):**
89
+
90
+ | Agent type | Completion marker |
91
+ |-----------|-------------------|
92
+ | Research agent | `## RESEARCH COMPLETE` |
93
+ | Planning agent | `## PLANNING COMPLETE` |
94
+ | Execution agent | `## EXECUTION COMPLETE` |
95
+ | Verification agent | `## VERIFICATION COMPLETE` |
96
+
97
+ **Design-pipeline-specific markers (proposed — confirm in Phase 2 when the first stage agent is written):**
98
+
99
+ | Stage | Proposed marker |
100
+ |-------|-----------------|
101
+ | scan | `## SCAN COMPLETE` |
102
+ | discover | `## DISCOVER COMPLETE` |
103
+ | plan | `## PLAN COMPLETE` |
104
+ | design | `## DESIGN COMPLETE` |
105
+ | verify | `## VERIFY COMPLETE` |
106
+
107
+ If the agent encounters an error or cannot complete, it still emits the completion marker but appends a failure note and writes a `<blocker>` entry to `.design/STATE.md`. The orchestrator detects failure by inspecting STATE.md, not by the absence of a marker.
108
+
109
+ ---
110
+
111
+ ## How stages invoke agents
112
+
113
+ Stages spawn agents using the Claude Code `Task` tool:
114
+
115
+ ```
116
+ Task("design-planner", prompt_string)
117
+ ```
118
+
119
+ The first argument is the agent's `name` field (must match exactly). The second argument is a **fully self-contained prompt string** — no session state, no previous tool call results, nothing from the orchestrator's context passes through automatically. Everything the agent needs must be in the prompt.
120
+
121
+ This means: if the agent needs to know the current pipeline stage, the target component, or the path to an artifact, the stage must embed that information in the prompt.
122
+
123
+ ---
124
+
125
+ ## What to include in an agent prompt
126
+
127
+ Use this checklist when writing the prompt string a stage passes to `Task`:
128
+
129
+ - **Task specification** — what the agent must do, stated as a concrete imperative ("Extract all color tokens from the files listed in STATE.md `<source_roots>` and write them to `.design/DESIGN-TOKENS.md`.")
130
+ - **Context block** — paths to relevant artifacts, the current pipeline position, prior stage outputs the agent should be aware of
131
+ - **Required reading block** — `<required_reading>` listing files the agent must read before acting
132
+ - **Acceptance criteria** — how the orchestrator (and the agent itself) will know the task succeeded; specific, checkable conditions
133
+ - **Output format** — structured output required: which file to write, what sections to include, what the completion marker is
134
+ - **Constraints** — what the agent must NOT do ("do not modify files outside `.design/`", "do not run shell commands")
135
+
136
+ ---
137
+
138
+ ## Worked Example
139
+
140
+ ### Example agent file — `agents/design-example.md`
141
+
142
+ ```markdown
143
+ ---
144
+ name: design-example
145
+ description: Reference agent showing the required structure. Never actually invoked in production.
146
+ tools: Read, Write, Grep
147
+ color: blue
148
+ ---
149
+
150
+ # design-example
151
+
152
+ This agent demonstrates the authoring contract. Replace the role description and behavior below with real work when building a production agent.
153
+
154
+ ## Task
155
+
156
+ Read the input artifact specified in the prompt, validate it against the acceptance criteria, produce the output artifact, and emit a completion marker.
157
+
158
+ ## Required Reading
159
+
160
+ The orchestrating stage supplies a `<required_reading>` block in the prompt. Read every listed file before acting — this is mandatory.
161
+
162
+ ## Output Format
163
+
164
+ Write results to the path specified in the prompt. Terminate the response with the completion marker the prompt specifies (e.g., `## VERIFY COMPLETE`). If an error occurs, still emit the marker but prepend a brief failure description and write a `<blocker>` entry to `.design/STATE.md`.
165
+ ```
166
+
167
+ ### Example prompt a stage would pass to this agent
168
+
169
+ ```
170
+ Task("design-example", """
171
+ <required_reading>
172
+ @.design/STATE.md
173
+ @reference/STATE-TEMPLATE.md
174
+ </required_reading>
175
+
176
+ Read STATE.md and confirm the <position> section contains valid fields (stage, wave, task_progress).
177
+ Write the validation result to .design/example-output.md as a markdown table: field | value | valid.
178
+
179
+ Acceptance criteria:
180
+ - .design/example-output.md exists after this call
181
+ - The file contains a table with the three position fields
182
+ - Each field has a "valid" or "invalid" status
183
+
184
+ Output format: markdown table, then a one-line summary, then `## VERIFY COMPLETE`.
185
+ Constraints: do not modify any file other than .design/example-output.md.
186
+ """)
187
+ ```
188
+
189
+ ---
190
+
191
+ ## Size Budgets
192
+
193
+ Agents should be kept small — long instruction bodies burn context at every spawn and drift from their single-responsibility role. Per-tier soft limits:
194
+
195
+ | Tier | Examples | Limit |
196
+ |---|---|---|
197
+ | Orchestrator | `design-planner`, `design-executor`, `design-verifier`, `design-reflector` | ≤ 300 lines |
198
+ | Worker | `design-auditor`, `design-fixer`, `design-doc-writer`, `design-pattern-mapper`, `design-context-builder` | ≤ 200 lines |
199
+ | Checker | `design-integration-checker`, `design-plan-checker`, `design-context-checker`, `design-advisor`, `design-assumptions-analyzer`, `design-phase-researcher` | ≤ 150 lines |
200
+
201
+ Global ceiling: **no single agent file exceeds 600 lines** under any circumstances. When an agent approaches its tier limit, extract repeated prose into `reference/*.md` and `@`-include it from the prompt rather than inlining.
202
+
203
+ ---
204
+
205
+ ## Cache-Aligned Ordering Convention (Phase 10.1)
206
+
207
+ Every agent body under `agents/*.md` is structured in this exact order so that Anthropic's 5-minute prompt cache (and the plugin's `/gdd:warm-cache` pre-warmer) can key on the longest possible identical prefix across spawns. The rule (from Phase 10.1 decision D-17):
208
+
209
+ 1. **Shared-preamble import** — the first non-blank line of the body MUST be `@reference/shared-preamble.md`. This pulls the framework identity, required-reading discipline, writes protocol, deviation handling, and hook awareness into the prompt. Identical bytes across all 26 agents → one cache entry warms them all.
210
+ 2. **Agent-specific role + tools contract + output format** — unique to the agent but stable across every invocation of that same agent. Cache hits on the per-agent tail after the first call of the session.
211
+ 3. **Dynamic content** — the orchestrator's `<required_reading>` block, per-invocation parameters, concrete task description. Different every call; never caches, but also never invalidates the earlier layers.
212
+
213
+ **Do not reorder these layers.** Splicing dynamic content (e.g., a `<context>` block) before the stable role description breaks the cache for everything after that splice. Inlining the preamble into the agent body (instead of importing) costs every spawn full-input rates on the preamble bytes.
214
+
215
+ See `reference/shared-preamble.md` (the imported file) and `reference/model-tiers.md` (tier assignment + override precedence) for the two paired references.
216
+
217
+ **Cross-references.**
218
+ - `reference/shared-preamble.md` — the preamble file itself (Plan 10.1-03).
219
+ - `reference/model-tiers.md` — tier-selection guide + per-agent map (Plan 10.1-03).
220
+ - `skills/warm-cache/SKILL.md` — the command that primes Layer A cache across the roster (Plan 10.1-02).
221
+ - `skills/cache-manager/SKILL.md` — Layer B (explicit manifest) cache; independent of this ordering rule (Plan 10.1-02).
222
+ - `.planning/phases/10.1-optimization-layer-cost-governance/10.1-CONTEXT.md` §D-08, §D-16, §D-17 — decision lineage.
223
+
224
+ ---
225
+
226
+ *Cross-reference: [Claude Code Task tool documentation](https://docs.anthropic.com/en/docs/claude-code/sub-agents) for deeper detail on agent invocation, tool permissions, and model selection. This README is the authoring contract — the documentation covers the runtime.*
@@ -0,0 +1,118 @@
1
+ ---
2
+ name: a11y-mapper
3
+ description: "Maps static accessibility signals — ARIA usage, keyboard nav, focus states, skip links, semantic markup — to .design/map/a11y.md. Static-only; no live browser audit."
4
+ tools: Read, Write, Bash, Grep, Glob
5
+ color: cyan
6
+ model: inherit
7
+ default-tier: sonnet
8
+ tier-rationale: "Open-ended a11y pattern recognition across many files; Sonnet's breadth matters"
9
+ parallel-safe: auto
10
+ typical-duration-seconds: 45
11
+ reads-only: false
12
+ writes:
13
+ - ".design/map/a11y.md"
14
+ ---
15
+
16
+ @reference/shared-preamble.md
17
+
18
+ # a11y-mapper
19
+
20
+ ## Role
21
+
22
+ You produce a static accessibility inventory. You do NOT run a browser audit — that is Phase 8 work. You never modify source code and do not spawn agents.
23
+
24
+ ## Required Reading
25
+
26
+ - `.design/STATE.md`
27
+ - `reference/accessibility.md` (if present)
28
+ - Any files supplied by the orchestrator
29
+
30
+ ## Scan Strategy
31
+
32
+ ### ARIA usage
33
+
34
+ ```bash
35
+ grep -rEn "aria-[a-z]+=" src/ --include="*.tsx" --include="*.jsx" --include="*.vue" --include="*.svelte" --include="*.html" | head -200
36
+ grep -rEn "role=\"[a-z]+\"" src/ | head -100
37
+ ```
38
+
39
+ ### Keyboard navigation
40
+
41
+ ```bash
42
+ grep -rEn "(tabIndex|onKeyDown|onKeyPress|onKeyUp)" src/ --include="*.tsx" --include="*.jsx" | head -100
43
+ ```
44
+
45
+ ### Focus states
46
+
47
+ ```bash
48
+ grep -rEn "(:focus-visible|:focus|outline\s*:|ring-)" src/ --include="*.css" --include="*.tsx" | head -100
49
+ ```
50
+
51
+ Flag `outline: none` / `outline: 0` without a visible replacement.
52
+
53
+ ### Semantic markup
54
+
55
+ ```bash
56
+ grep -rEn "<(header|nav|main|section|article|aside|footer)\b" src/ --include="*.tsx" --include="*.jsx" | head -100
57
+ ```
58
+
59
+ ### Skip links
60
+
61
+ ```bash
62
+ grep -rEn "(skip-nav|skip-to-content|#main-content)" src/ | head -20
63
+ ```
64
+
65
+ ### Image alt coverage
66
+
67
+ ```bash
68
+ grep -rEn "<img\b[^>]*>" src/ | head -100
69
+ ```
70
+
71
+ Count how many include `alt=`.
72
+
73
+ ## Output Format — `.design/map/a11y.md`
74
+
75
+ ```markdown
76
+ ---
77
+ generated: [ISO 8601]
78
+ scope: static-only
79
+ ---
80
+
81
+ # Accessibility Map (Static)
82
+
83
+ ## ARIA usage
84
+ | Attribute | Occurrences | Notes |
85
+ |-----------|-------------|-------|
86
+
87
+ ## Keyboard support
88
+ - tabIndex uses: [N]
89
+ - onKey* handlers: [N]
90
+ - Missing handlers on interactive non-buttons: [list]
91
+
92
+ ## Focus states
93
+ | File | Issue |
94
+ |------|-------|
95
+
96
+ ## Semantic landmarks
97
+ | Tag | Count |
98
+ |-----|-------|
99
+
100
+ ## Skip links: [present | missing]
101
+ ## Image alt coverage: [N/M = PCT%]
102
+
103
+ ## WCAG criterion mapping
104
+ - 1.1.1 Non-text Content — [status]
105
+ - 2.1.1 Keyboard — [status]
106
+ - 2.4.1 Bypass Blocks — [status]
107
+ - 2.4.7 Focus Visible — [status]
108
+ - 4.1.2 Name, Role, Value — [status]
109
+
110
+ ## Scope note
111
+ Static scan only. Runtime contrast, focus-trap, and screen-reader behavior require a live audit (Phase 8).
112
+ ```
113
+
114
+ ## Constraints
115
+
116
+ No modifications outside `.design/map/`. No live browser. No git. No agent spawning.
117
+
118
+ ## A11Y MAP COMPLETE
@@ -0,0 +1,88 @@
1
+ ---
2
+ name: component-taxonomy-mapper
3
+ description: "Maps the component inventory — React/Vue/Svelte components, design patterns, reuse opportunities — to .design/map/components.md."
4
+ tools: Read, Write, Bash, Grep, Glob
5
+ color: cyan
6
+ model: inherit
7
+ default-tier: sonnet
8
+ tier-rationale: "Classifies components by role; requires nuance Haiku lacks, not enough to warrant Opus"
9
+ parallel-safe: auto
10
+ typical-duration-seconds: 45
11
+ reads-only: false
12
+ writes:
13
+ - ".design/map/components.md"
14
+ ---
15
+
16
+ @reference/shared-preamble.md
17
+
18
+ # component-taxonomy-mapper
19
+
20
+ ## Role
21
+
22
+ You inventory the component taxonomy of the codebase. Zero session memory. You do not modify source code or spawn other agents.
23
+
24
+ ## Required Reading
25
+
26
+ - `.design/STATE.md`
27
+ - Any files supplied by the orchestrator
28
+
29
+ ## Scan Strategy
30
+
31
+ ### Find components
32
+
33
+ ```bash
34
+ Glob: **/*.{tsx,jsx,vue,svelte}
35
+ ```
36
+
37
+ Exclude `node_modules`, `dist`, `.next`, `build`.
38
+
39
+ ### Classify each component
40
+
41
+ For each file:
42
+ - Count props (via `interface Props`, `type Props`, `defineProps`, `export let`)
43
+ - Count imports (complexity proxy)
44
+ - Count exports (default + named)
45
+ - Detect styling approach (CSS Modules, Tailwind, styled-components, inline)
46
+
47
+ ### Pattern classification (atomic design)
48
+
49
+ - **Atom** — 0 child components, single responsibility (Button, Input, Icon)
50
+ - **Molecule** — 2-5 child components (FormField, Card, SearchBar)
51
+ - **Organism** — 6+ children or routable (Header, Sidebar, ProductList)
52
+
53
+ ### Reuse opportunities
54
+
55
+ Grep for near-duplicate component names and file-size clusters. Flag components with 3+ near-identical siblings.
56
+
57
+ ## Output Format — `.design/map/components.md`
58
+
59
+ ```markdown
60
+ ---
61
+ generated: [ISO 8601]
62
+ total_components: [N]
63
+ dominant_styling: [CSS Modules | Tailwind | styled-components | mixed]
64
+ ---
65
+
66
+ # Component Map
67
+
68
+ ## Inventory
69
+ | Component | Path | Type (atom/molecule/organism) | Props | Styling |
70
+ |-----------|------|-------------------------------|-------|---------|
71
+
72
+ ## Dominant patterns
73
+ - [e.g., "Card + Card.Header + Card.Body compound pattern used in 12 places"]
74
+
75
+ ## Reuse opportunities
76
+ - [Near-duplicate components that could be unified]
77
+ - [Missing abstractions — repeated inline patterns without a component]
78
+
79
+ ## Complexity outliers
80
+ | Component | Reason |
81
+ |-----------|--------|
82
+ ```
83
+
84
+ ## Constraints
85
+
86
+ Do not modify anything outside `.design/map/`. No git. No agent spawning.
87
+
88
+ ## COMPONENT MAP COMPLETE