@hegemonart/get-design-done 1.59.2 → 1.59.4

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 (161) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +56 -0
  4. package/SKILL.md +2 -0
  5. package/agents/design-advisor.md +1 -1
  6. package/agents/design-context-checker-gate.md +0 -1
  7. package/agents/design-context-checker.md +0 -1
  8. package/agents/design-context-reviewer-gate.md +0 -1
  9. package/agents/design-context-reviewer.md +0 -1
  10. package/agents/design-integration-checker-gate.md +0 -1
  11. package/agents/design-integration-checker.md +0 -1
  12. package/agents/design-plan-checker.md +0 -1
  13. package/agents/design-verifier-gate.md +0 -1
  14. package/agents/design-verifier.md +0 -1
  15. package/agents/prototype-gate.md +0 -1
  16. package/agents/quality-gate-runner.md +0 -1
  17. package/figma-plugin/README.md +61 -0
  18. package/figma-plugin/code.ts +36 -0
  19. package/figma-plugin/manifest.json +12 -0
  20. package/figma-plugin/package-lock.json +35 -0
  21. package/figma-plugin/package.json +12 -0
  22. package/figma-plugin/src/export-variables.ts +144 -0
  23. package/figma-plugin/src/payload-schema.ts +250 -0
  24. package/figma-plugin/tsconfig.json +16 -0
  25. package/figma-plugin/ui.html +44 -0
  26. package/hooks/gdd-intel-trigger.js +3 -3
  27. package/package.json +6 -1
  28. package/reference/DEPRECATIONS.md +3 -3
  29. package/reference/live-mode-integration.md +1 -1
  30. package/reference/registry.json +1 -1
  31. package/reference/skill-metadata.md +4 -4
  32. package/reference/skill-placeholders.md +2 -2
  33. package/scripts/build-skills.cjs +146 -0
  34. package/scripts/generate-skill-frontmatter.cjs +243 -0
  35. package/scripts/lib/manifest/scaffolder.cjs +1 -1
  36. package/scripts/lib/manifest/schemas/skills.schema.json +1 -1
  37. package/scripts/lib/manifest/skills.json +1 -1
  38. package/scripts/lib/new-addendum.cjs +1 -1
  39. package/scripts/skill-templates/README.md +90 -0
  40. package/scripts/skill-templates/add-backlog/SKILL.md +48 -0
  41. package/scripts/skill-templates/analyze-dependencies/SKILL.md +95 -0
  42. package/scripts/skill-templates/apply-reflections/SKILL.md +109 -0
  43. package/scripts/skill-templates/apply-reflections/apply-reflections-procedure.md +170 -0
  44. package/scripts/skill-templates/audit/SKILL.md +79 -0
  45. package/scripts/skill-templates/bandit-reset/SKILL.md +91 -0
  46. package/scripts/skill-templates/bandit-status/SKILL.md +94 -0
  47. package/scripts/skill-templates/benchmark/SKILL.md +65 -0
  48. package/scripts/skill-templates/bootstrap-ds/SKILL.md +43 -0
  49. package/scripts/skill-templates/brief/SKILL.md +145 -0
  50. package/scripts/skill-templates/budget/SKILL.md +45 -0
  51. package/scripts/skill-templates/cache-manager/SKILL.md +66 -0
  52. package/scripts/skill-templates/cache-manager/cache-policy.md +126 -0
  53. package/scripts/skill-templates/check-update/SKILL.md +98 -0
  54. package/scripts/skill-templates/compare/SKILL.md +82 -0
  55. package/scripts/skill-templates/compare/compare-rubric.md +171 -0
  56. package/scripts/skill-templates/complete-cycle/SKILL.md +81 -0
  57. package/scripts/skill-templates/connections/SKILL.md +71 -0
  58. package/scripts/skill-templates/connections/connections-onboarding.md +608 -0
  59. package/scripts/skill-templates/context/SKILL.md +137 -0
  60. package/scripts/skill-templates/continue/SKILL.md +24 -0
  61. package/scripts/skill-templates/darkmode/SKILL.md +76 -0
  62. package/scripts/skill-templates/darkmode/darkmode-audit-procedure.md +258 -0
  63. package/scripts/skill-templates/debug/SKILL.md +41 -0
  64. package/scripts/skill-templates/debug/debug-feedback-loops.md +119 -0
  65. package/scripts/skill-templates/design/SKILL.md +118 -0
  66. package/scripts/skill-templates/design/design-procedure.md +304 -0
  67. package/scripts/skill-templates/discuss/SKILL.md +96 -0
  68. package/scripts/skill-templates/do/SKILL.md +45 -0
  69. package/scripts/skill-templates/explore/SKILL.md +118 -0
  70. package/scripts/skill-templates/explore/explore-procedure.md +267 -0
  71. package/scripts/skill-templates/export/SKILL.md +30 -0
  72. package/scripts/skill-templates/extract-learnings/SKILL.md +114 -0
  73. package/scripts/skill-templates/fast/SKILL.md +91 -0
  74. package/scripts/skill-templates/figma-extract/SKILL.md +64 -0
  75. package/scripts/skill-templates/figma-write/SKILL.md +50 -0
  76. package/scripts/skill-templates/graphify/SKILL.md +49 -0
  77. package/scripts/skill-templates/health/SKILL.md +99 -0
  78. package/scripts/skill-templates/health/health-mcp-detection.md +44 -0
  79. package/scripts/skill-templates/health/health-skill-length-report.md +69 -0
  80. package/scripts/skill-templates/help/SKILL.md +60 -0
  81. package/scripts/skill-templates/instinct/SKILL.md +111 -0
  82. package/scripts/skill-templates/list-assumptions/SKILL.md +61 -0
  83. package/scripts/skill-templates/list-pins/SKILL.md +27 -0
  84. package/scripts/skill-templates/live/SKILL.md +98 -0
  85. package/scripts/skill-templates/locale/SKILL.md +51 -0
  86. package/scripts/skill-templates/map/SKILL.md +89 -0
  87. package/scripts/skill-templates/migrate/SKILL.md +70 -0
  88. package/scripts/skill-templates/migrate-context/SKILL.md +123 -0
  89. package/scripts/skill-templates/new-addendum/SKILL.md +81 -0
  90. package/scripts/skill-templates/new-cycle/SKILL.md +37 -0
  91. package/scripts/skill-templates/new-project/SKILL.md +53 -0
  92. package/scripts/skill-templates/new-skill/SKILL.md +90 -0
  93. package/scripts/skill-templates/next/SKILL.md +68 -0
  94. package/scripts/skill-templates/note/SKILL.md +48 -0
  95. package/scripts/skill-templates/openrouter-status/SKILL.md +86 -0
  96. package/scripts/skill-templates/optimize/SKILL.md +97 -0
  97. package/scripts/skill-templates/override/SKILL.md +86 -0
  98. package/scripts/skill-templates/paper-write/SKILL.md +54 -0
  99. package/scripts/skill-templates/pause/SKILL.md +77 -0
  100. package/scripts/skill-templates/peer-cli-add/SKILL.md +88 -0
  101. package/scripts/skill-templates/peer-cli-add/peer-cli-protocol.md +161 -0
  102. package/scripts/skill-templates/peer-cli-customize/SKILL.md +89 -0
  103. package/scripts/skill-templates/peers/SKILL.md +96 -0
  104. package/scripts/skill-templates/pencil-write/SKILL.md +54 -0
  105. package/scripts/skill-templates/pin/SKILL.md +37 -0
  106. package/scripts/skill-templates/plan/SKILL.md +105 -0
  107. package/scripts/skill-templates/plan/plan-procedure.md +278 -0
  108. package/scripts/skill-templates/plant-seed/SKILL.md +48 -0
  109. package/scripts/skill-templates/pr-branch/SKILL.md +32 -0
  110. package/scripts/skill-templates/progress/SKILL.md +107 -0
  111. package/scripts/skill-templates/quality-gate/SKILL.md +90 -0
  112. package/scripts/skill-templates/quality-gate/threat-modeling.md +101 -0
  113. package/scripts/skill-templates/quick/SKILL.md +44 -0
  114. package/scripts/skill-templates/reapply-patches/SKILL.md +32 -0
  115. package/scripts/skill-templates/recall/SKILL.md +75 -0
  116. package/scripts/skill-templates/reflect/SKILL.md +85 -0
  117. package/scripts/skill-templates/reflect/procedures/capability-gap-scan.md +119 -0
  118. package/scripts/skill-templates/report-issue/SKILL.md +53 -0
  119. package/scripts/skill-templates/report-issue/report-issue-procedure.md +119 -0
  120. package/scripts/skill-templates/resume/SKILL.md +93 -0
  121. package/scripts/skill-templates/review-backlog/SKILL.md +46 -0
  122. package/scripts/skill-templates/review-decisions/SKILL.md +42 -0
  123. package/scripts/skill-templates/roi/SKILL.md +54 -0
  124. package/scripts/skill-templates/rollout-status/SKILL.md +35 -0
  125. package/scripts/skill-templates/router/SKILL.md +89 -0
  126. package/scripts/skill-templates/router/capability-gap-emitter.md +65 -0
  127. package/scripts/skill-templates/router/router-pick-emitter.md +78 -0
  128. package/scripts/skill-templates/router/router-rules.md +84 -0
  129. package/scripts/skill-templates/settings/SKILL.md +87 -0
  130. package/scripts/skill-templates/ship/SKILL.md +48 -0
  131. package/scripts/skill-templates/sketch/SKILL.md +78 -0
  132. package/scripts/skill-templates/sketch-wrap-up/SKILL.md +92 -0
  133. package/scripts/skill-templates/skill-manifest/SKILL.md +79 -0
  134. package/scripts/skill-templates/spike/SKILL.md +67 -0
  135. package/scripts/skill-templates/spike-wrap-up/SKILL.md +86 -0
  136. package/scripts/skill-templates/start/SKILL.md +67 -0
  137. package/scripts/skill-templates/start/start-procedure.md +115 -0
  138. package/scripts/skill-templates/state/SKILL.md +106 -0
  139. package/scripts/skill-templates/stats/SKILL.md +51 -0
  140. package/scripts/skill-templates/style/SKILL.md +71 -0
  141. package/scripts/skill-templates/style/style-doc-procedure.md +150 -0
  142. package/scripts/skill-templates/synthesize/SKILL.md +94 -0
  143. package/scripts/skill-templates/timeline/SKILL.md +66 -0
  144. package/scripts/skill-templates/todo/SKILL.md +64 -0
  145. package/scripts/skill-templates/turn-closeout/SKILL.md +95 -0
  146. package/scripts/skill-templates/undo/SKILL.md +31 -0
  147. package/scripts/skill-templates/unlock-decision/SKILL.md +54 -0
  148. package/scripts/skill-templates/unpin/SKILL.md +31 -0
  149. package/scripts/skill-templates/update/SKILL.md +56 -0
  150. package/scripts/skill-templates/using-gdd/SKILL.md +78 -0
  151. package/scripts/skill-templates/verify/SKILL.md +113 -0
  152. package/scripts/skill-templates/verify/verify-procedure.md +511 -0
  153. package/scripts/skill-templates/warm-cache/SKILL.md +81 -0
  154. package/scripts/skill-templates/watch-authorities/SKILL.md +82 -0
  155. package/scripts/skill-templates/zoom-out/SKILL.md +26 -0
  156. package/sdk/cli/commands/build.ts +2 -2
  157. package/sdk/cli/index.js +2 -2
  158. package/sdk/cli/index.ts +1 -1
  159. package/skills/README.md +22 -14
  160. package/skills/help/SKILL.md +28 -55
  161. package/skills/new-skill/SKILL.md +5 -5
@@ -0,0 +1,511 @@
1
+ ---
2
+ name: verify-procedure
3
+ type: meta-rules
4
+ version: 1.0.0
5
+ tags: [verify, procedure, extracted, pipeline-stage, gap-loop, must-have, quality-gate]
6
+ last_updated: 2026-05-18
7
+ ---
8
+
9
+ Source: extracted from `skills/verify/SKILL.md` to keep the SKILL focused on the essential workflow.
10
+ The skill's essential workflow stays in `../skills/verify/SKILL.md`; this file holds the
11
+ detail the agent reaches for when executing a specific step (state integration, quality-gate
12
+ decision tree, agent spawn protocols, gap-response loop, must-have flipping).
13
+
14
+ # Verify Procedure
15
+
16
+ Detailed procedure for the get-design-done `verify` Stage 5 orchestrator. Companion to
17
+ `../skills/verify/SKILL.md`. Read this file when executing a specific verify step; the
18
+ SKILL.md keeps the essential workflow + decision tree, this file holds the deep
19
+ methodology, agent prompts, and gap-loop semantics.
20
+
21
+ ---
22
+
23
+ ## State Integration
24
+
25
+ ### Stage entry
26
+
27
+ 1. `mcp__gdd_state__transition_stage` with `to: "verify"`.
28
+ 2. `mcp__gdd_state__get` → snapshot `state`. Read `state.must_haves` - this is the verification checklist; each M-XX starts at `status: pending` and will be flipped to `pass` or `fail` as verification concludes.
29
+
30
+ #### Step 2.5 - Quality-gate gate
31
+
32
+ Before resume detection, inspect `state.quality_gate` from the same snapshot. The quality-gate skill (see `skills/quality-gate/SKILL.md`) writes a single `<run/>` element capturing the most recent run; this step is the verify-side consumer of that result. Three branches, evaluated in order:
33
+
34
+ - **`state.quality_gate?.run?.status === "fail"`** → Refuse to advance. The fix loop in `quality-gate/SKILL.md` Step 4 reached `max_iters` without converging, and the verify stage MUST NOT paper over it. Print a blocker reason that includes the iteration count and the `commands_run` field from the run, then call:
35
+
36
+ ```
37
+ mcp__gdd_state__add_blocker({
38
+ stage: "verify",
39
+ text: "quality-gate failed at iteration <N> (commands: <commands_run>) — re-run {{command_prefix}}quality-gate before {{command_prefix}}verify"
40
+ })
41
+ ```
42
+
43
+ Exit immediately with the failure surface visible to the user. Do NOT call `mcp__gdd_state__update_progress` to open the verify stage; the gate refused entry, so the stage was never opened.
44
+
45
+ - **`state.quality_gate?.run?.status === "timeout"` OR `=== "skipped"`** → Print a one-line warning naming the status and the `commands_run` value, then continue normally. These are signals, not walls: a slow test suite must not hostage the pipeline, and a project with no detectable quality commands must not block verify entry. The warning surfaces the degraded state without halting.
46
+
47
+ - **`state.quality_gate?.run?.status === "pass"` OR `state.quality_gate === null`** → Continue silently. `pass` is the happy path; `null` means the gate has never been run for this cycle (the user skipped the quality-gate stage entirely, which is permitted - verify only *checks* the gate result, never *runs* the gate itself).
48
+
49
+ This step is a pure read against the snapshot already loaded in Step 2 - no extra MCP call is required.
50
+
51
+ 3. Resume detection (read `state.position.status` from the snapshot):
52
+ - If `status==in_progress` and `.design/DESIGN-VERIFICATION.md` exists: RESUME - skip re-spawning agents, go to Step 2 (gap-response loop).
53
+ - Otherwise: call `mcp__gdd_state__update_progress` with `task_progress: "0/3"`, `status: "in_progress"` to open the stage, then proceed to Step 1.
54
+ 4. If STATE.md is missing entirely (edge case - verify is never the entry point): block with "No STATE.md found - run /get-design-done:discover first." Do NOT attempt to create a skeleton from verify; upstream stages own bootstrap.
55
+
56
+ ---
57
+
58
+ ## Flipping a must-have status
59
+
60
+ When verification concludes that M-XX is satisfied (or failed), record the result by issuing:
61
+
62
+ `mcp__gdd_state__add_must_have` with the SAME `id` as the existing entry and the updated `status`:
63
+
64
+ ```json
65
+ { "id": "M-03", "text": "Dark mode toggle persists to localStorage", "status": "pass" }
66
+ ```
67
+
68
+ The gdd-state mutator treats an `add_must_have` with an existing id as an **update-in-place**, not a duplicate append. The entry's position in the `<must_haves>` block is preserved. This is intentional design - verify doesn't need a dedicated `update_must_have_status` tool because `add_must_have` handles both cases correctly.
69
+
70
+ Pass the original `text` verbatim when you're only flipping the status; supplying a changed `text` overwrites the prose in-place as well (useful when the M-XX description was imprecise and the verifier can restate it). Omit `text` by passing the value from the earlier `mcp__gdd_state__get` snapshot.
71
+
72
+ ---
73
+
74
+ ## Connection Probes
75
+
76
+ ### Probe Preview connection
77
+
78
+ Run at stage entry, after reading STATE.md:
79
+
80
+ ```
81
+ Step P1 — ToolSearch check:
82
+ ToolSearch({ query: "Claude_Preview", max_results: 5 })
83
+ -> Empty result -> preview: not_loaded (MCP not registered — skip all Preview steps in this stage)
84
+ -> Non-empty result -> proceed to Step P2
85
+
86
+ Step P2 — Live tool call:
87
+ call mcp__Claude_Preview__preview_list
88
+ -> Success -> preview: available
89
+ -> Error containing "permission"/blocked -> preview: permission_denied
90
+ -> Any other error -> preview: unreachable
91
+
92
+ Record the preview probe result via `mcp__gdd_state__probe_connections` (batched with the storybook and chromatic probes below — one call per stage, see "Batched connections write" at the end of this section).
93
+ ```
94
+
95
+ When `preview: available`, the design-verifier agent runs Stage 4B - Screenshot Evidence to resolve `? VISUAL` heuristic flags with real screenshot evidence. See `agents/design-verifier.md` Stage 4B for the screenshot evidence loop.
96
+
97
+ ### Probe Storybook connection
98
+
99
+ Run at stage entry, after reading STATE.md:
100
+
101
+ Step B1 - Project detection:
102
+ Bash: ls .storybook/ 2>/dev/null || grep -l '"storybook"' package.json 2>/dev/null
103
+ -> Found -> storybook_project: true -> proceed to Step B2
104
+ -> Not found -> storybook: not_configured (skip all Storybook steps)
105
+
106
+ Step B2 - Dev server detection:
107
+ Bash: curl -sf http://localhost:6006/index.json 2>/dev/null | head -1
108
+ -> Returns JSON -> storybook: available
109
+ -> Fails -> Bash: curl -sf http://localhost:6006/stories.json 2>/dev/null | head -1
110
+ -> Returns JSON -> storybook: available (compat endpoint)
111
+ -> Fails -> storybook: unavailable
112
+
113
+ Record the storybook probe result for the batched `mcp__gdd_state__probe_connections` call (see below).
114
+
115
+ ### Storybook A11y Loop (when storybook: available)
116
+
117
+ If `state.connections.storybook === "available"` (from the earlier `mcp__gdd_state__get` snapshot):
118
+ 1. Run: Bash: npx storybook test `--ci` 2>&1 | tee .design/storybook-a11y-report.txt
119
+ 2. Read .design/storybook-a11y-report.txt - pass to design-verifier as additional a11y evidence
120
+ 3. design-verifier reads this file in its a11y gap analysis section and annotates DESIGN-VERIFICATION.md with per-story violations
121
+
122
+ If storybook: unavailable - skip this section; run standard WCAG grep-based a11y checks only.
123
+ If storybook: not_configured - skip; emit no note (opt-in feature).
124
+
125
+ ### Probe Chromatic connection
126
+
127
+ Run at stage entry, after reading STATE.md:
128
+
129
+ Step C1 - CLI presence:
130
+ Bash: command -v chromatic 2>/dev/null || npx chromatic `--version` 2>/dev/null
131
+ -> found -> proceed to Step C2
132
+ -> not found -> chromatic: not_configured (skip all Chromatic steps)
133
+
134
+ Step C2 - Token check:
135
+ Bash: test -n "${CHROMATIC_PROJECT_TOKEN}"
136
+ -> true -> chromatic: available
137
+ -> false -> chromatic: unavailable
138
+
139
+ Also check: if storybook: not_configured -> chromatic effectively unavailable (emit note, do not run).
140
+ Record the chromatic probe result for the batched `mcp__gdd_state__probe_connections` call below.
141
+
142
+ ### Batched connections write
143
+
144
+ After all three probes (preview, storybook, chromatic) have a verdict, call `mcp__gdd_state__probe_connections` ONCE with `probe_results` = an array of `{ name, status }` entries - one per probed connection. Example:
145
+
146
+ ```json
147
+ [
148
+ { "name": "preview", "status": "available" },
149
+ { "name": "storybook", "status": "unavailable" },
150
+ { "name": "chromatic", "status": "not_configured" }
151
+ ]
152
+ ```
153
+
154
+ Unspecified connections keep their existing value. Do NOT issue multiple `probe_connections` calls - the tool is designed for a single batch write per stage.
155
+
156
+ ### Chromatic Visual Delta (when chromatic: available)
157
+
158
+ After design executor has run (when verifying post-design):
159
+ 1. Run: Bash: npx chromatic `--project-token` $CHROMATIC_PROJECT_TOKEN `--output` json 2>&1 | tee .design/chromatic-results.json
160
+ 2. Pass .design/chromatic-results.json to design-verifier for narration (see design-verifier.md Chromatic Delta Narration section)
161
+ If chromatic: unavailable or not_configured: skip; note in DESIGN-VERIFICATION.md "visual regression check skipped".
162
+
163
+ ---
164
+
165
+ ## Prerequisite Checks
166
+
167
+ **DESIGN-PLAN.md prerequisite check:**
168
+ - **Normal mode:** Check that `.design/DESIGN-PLAN.md` exists. If missing, block with: "Verify requires DESIGN-PLAN.md. Run `{{command_prefix}}plan` first, or use `--post-handoff` if starting from a Claude Design handoff bundle."
169
+ - **Post-handoff mode** (`post_handoff=true` OR STATE.md `status: handoff-sourced`): Skip the DESIGN-PLAN.md check entirely - handoff workflows have no DESIGN-PLAN.md.
170
+
171
+ Abort only if no `.design/` directory exists (user has not run prior stages). Output: "No .design/ directory found. Run /get-design-done:discover first."
172
+
173
+ ## Post-Handoff Mode
174
+
175
+ When `--post-handoff` flag is present OR STATE.md `<position>` contains `status: handoff-sourced`:
176
+
177
+ 1. **Skip DESIGN-PLAN.md prerequisite check** (no plan exists in handoff flows)
178
+ 2. **Pass `post_handoff: true` to design-verifier** spawn prompt (see Step 1b below)
179
+ 3. **Pass `handoff_path`** from STATE.md to design-verifier spawn prompt
180
+ 4. **DESIGN-VERIFICATION.md** will include a `## Handoff Faithfulness` section generated by design-verifier (see `agents/design-verifier.md` Handoff Faithfulness Phase)
181
+
182
+ Also pass post-handoff context to design-auditor: auditor skips DESIGN-PLAN.md reads and focuses on implementation-vs-bundle gap analysis.
183
+
184
+ ## Flag Parsing
185
+
186
+ - `--auto` -> `auto_mode=true` (no interactive prompts; skip visual UAT interactive steps; on gaps: save-and-exit rather than prompt for fix)
187
+ - `--post-handoff` -> `post_handoff=true` (relax DESIGN-PLAN.md prerequisite; instruct verifier to add Handoff Faithfulness section; see ## Post-Handoff Mode below)
188
+
189
+ ## Parallelism Decision (before agent spawns)
190
+
191
+ - Read `.design/config.json` `parallelism` (or defaults from `reference/config-schema.md`).
192
+ - Apply rules from `reference/parallelism-rules.md`.
193
+ - `design-verifier` depends on `design-auditor` output (rule 1) -> serial between those two. `design-integration-checker` is independent of the auditor's *file* output but runs after verifier in the current sequence; if config opts in, `design-auditor` and `design-integration-checker` can parallelize (disjoint writes). Default: serial.
194
+ - Record `<parallelism_decision>` via `mcp__gdd_state__set_status` (e.g., `status: "verify_parallelism_decided: <serial|parallel>"`) before spawning. Do not write STATE.md directly.
195
+
196
+ ---
197
+
198
+ ## Step 1 - Spawn Auditor + Verifier + Integration Checker
199
+
200
+ Initialize iteration counter to 0 (used for fix loop limit in Step 3).
201
+
202
+ Three agents run in sequence. Each waits for its completion marker before the next is spawned.
203
+
204
+ **Note on lazy gates:** Each full checker is preceded by a cheap Haiku gate that reads the diff and may return `{spawn: false}` to short-circuit. When gated out, `lazy_skipped: true` is appended to `.design/telemetry/costs.jsonl`. Gates: `design-verifier-gate` (before 1b), `design-integration-checker-gate` (before 1c). `design-context-checker-gate` is wired into `skills/discover/SKILL.md` Step 1.75.
205
+
206
+ ### 1a. Run design-auditor first (retrospective 7-pillar audit)
207
+
208
+ ```
209
+ Task("design-auditor", """
210
+ <required_reading>
211
+ @.design/STATE.md
212
+ @.design/DESIGN-CONTEXT.md
213
+ @.design/DESIGN-PLAN.md
214
+ @.design/tasks/
215
+ @reference/audit-scoring.md
216
+ </required_reading>
217
+
218
+ You are the design-auditor agent. Run the 7-pillar retrospective audit (copy, visual hierarchy,
219
+ color, typography, layout/spacing, experience design) against the completed design work.
220
+
221
+ Score each pillar 1-4. Write your findings to .design/DESIGN-AUDIT.md.
222
+
223
+ This audit SUPPLEMENTS the 7-category 0-10 system in reference/audit-scoring.md — do not replace
224
+ or contradict it. Your output will be read by design-verifier as additional context.
225
+
226
+ Emit `## AUDIT COMPLETE` when done.
227
+ """)
228
+ ```
229
+
230
+ Wait for `## AUDIT COMPLETE` in the agent response. Once detected, call `mcp__gdd_state__update_progress` with `task_progress: "1/3"` and a short `status` summary (e.g., `status: "audit_done"`).
231
+
232
+ ### 1b-gate. Lazy gate - should design-verifier run?
233
+
234
+ Spawn the cheap Haiku gate before the expensive verifier:
235
+
236
+ Task("design-verifier-gate", """
237
+ <required_reading>
238
+ @.design/STATE.md
239
+ </required_reading>
240
+
241
+ You are the design-verifier-gate. Read the diff since the last verified commit
242
+ and decide whether design-verifier should spawn.
243
+
244
+ Context:
245
+ diff_files: <output of `git diff --name-only <baseline_sha>..HEAD`>
246
+ diff_body: <output of `git diff <baseline_sha>..HEAD` truncated to 4000 lines>
247
+ baseline_sha: <from .design/STATE.md last_verified_sha, or HEAD~1 if absent>
248
+
249
+ Apply the heuristic. Emit JSON + `## GATE COMPLETE`.
250
+ """)
251
+
252
+ Wait for `## GATE COMPLETE`. Parse the JSON:
253
+
254
+ - `spawn: false` -> append pending telemetry row `{ts, agent: "design-verifier", tier: "skipped", tokens_in: 0, tokens_out: 0, cache_hit: false, est_cost_usd: 0, lazy_skipped: true, gate_rationale: "<from gate>", cycle, phase}` (PreToolUse hook from 10.1-01 flushes on next tool use; orchestrator MAY stub-append directly to `.design/telemetry/costs.jsonl` until 10.1-05 lands). Skip 1b. Call `mcp__gdd_state__update_progress` with `task_progress: "2/3"` and `status: "verifier_gate_skipped"`. Emit `design-verifier skipped — gate rationale: <rationale>`.
255
+ - `spawn: true` -> proceed to 1b as currently written.
256
+
257
+ ### 1b. Run design-verifier (reads auditor output as additional input)
258
+
259
+ ```
260
+ Task("design-verifier", """
261
+ <required_reading>
262
+ @.design/STATE.md
263
+ @.design/DESIGN-AUDIT.md
264
+ @.design/DESIGN-PLAN.md
265
+ @.design/DESIGN-CONTEXT.md
266
+ @.design/tasks/
267
+ @reference/audit-scoring.md
268
+ @reference/heuristics.md
269
+ @reference/review-format.md
270
+ @reference/accessibility.md
271
+ </required_reading>
272
+
273
+ You are the design-verifier agent. Run the 5-phase verification against completed design work.
274
+
275
+ DESIGN-AUDIT.md (above) contains a retrospective 7-pillar qualitative audit from design-auditor.
276
+ Read it as supplementary signal — incorporate the priority fix list into your Stage 5 gap analysis
277
+ where relevant. The auditor's 1-4 scores complement your 0-10 category scores; they do not
278
+ replace your Stage 1 category scoring.
279
+
280
+ Context:
281
+ auto_mode: <true|false>
282
+ re_verify: false
283
+ post_handoff: <true|false — true when --post-handoff flag active or STATE.md status==handoff-sourced>
284
+ handoff_path: <value from STATE.md handoff_path, or empty string>
285
+
286
+ Write .design/DESIGN-VERIFICATION.md. If post_handoff is true, include ## Handoff Faithfulness section
287
+ (see agents/design-verifier.md Handoff Faithfulness Phase). If gaps found, emit `## GAPS FOUND` followed
288
+ by structured gap list, then `## VERIFICATION COMPLETE`. If no gaps, just emit `## VERIFICATION COMPLETE`.
289
+ """)
290
+ ```
291
+
292
+ Wait for `## VERIFICATION COMPLETE` in the agent response. Once detected, call `mcp__gdd_state__update_progress` with `task_progress: "2/3"` and a short `status` summary (e.g., `status: "verifier_done"`).
293
+
294
+ ### 1c-gate. Lazy gate - should design-integration-checker run?
295
+
296
+ Same pattern as 1b-gate:
297
+
298
+ Task("design-integration-checker-gate", """
299
+ <required_reading>
300
+ @.design/STATE.md
301
+ </required_reading>
302
+
303
+ You are the design-integration-checker-gate. Read the diff and decide whether
304
+ design-integration-checker should spawn.
305
+
306
+ Context:
307
+ diff_files: <git diff `--name-only` output>
308
+ diff_body: <git diff output, truncated>
309
+ baseline_sha: <from STATE.md or HEAD~1>
310
+
311
+ Apply the heuristic. Emit JSON + `## GATE COMPLETE`.
312
+ """)
313
+
314
+ Wait for `## GATE COMPLETE`. Parse JSON:
315
+
316
+ - `spawn: false` -> append `lazy_skipped: true` telemetry row (same shape), skip 1c, call `mcp__gdd_state__update_progress` with `task_progress: "3/3"` and `status: "integration_checker_gate_skipped"`, emit `design-integration-checker skipped — gate rationale: <rationale>`.
317
+ - `spawn: true` -> proceed to 1c as currently written.
318
+
319
+ ### 1c. Run design-integration-checker (post-verification decision wiring check)
320
+
321
+ ```
322
+ Task("design-integration-checker", """
323
+ <required_reading>
324
+ @.design/STATE.md
325
+ @.design/DESIGN-CONTEXT.md
326
+ @.design/DESIGN-VERIFICATION.md
327
+ </required_reading>
328
+
329
+ You are the design-integration-checker agent. Verify that each D-XX design decision recorded
330
+ in DESIGN-CONTEXT.md is actually reflected in the source code.
331
+
332
+ Check each decision by type:
333
+ - Typography decisions -> grep font-size/scale values against declared scale
334
+ - Color decisions -> grep for removed colors (expect 0 hits) and added tokens (expect >=1 hit)
335
+ - Layout/spacing decisions -> grep spacing values against declared grid
336
+ - Component decisions -> grep for old patterns (expect 0) and new patterns (expect >=1)
337
+
338
+ Return: Connected count, Orphaned count, Missing count with per-decision evidence.
339
+ Emit `## INTEGRATION CHECK COMPLETE` when done.
340
+ """)
341
+ ```
342
+
343
+ Wait for `## INTEGRATION CHECK COMPLETE` in the agent response. Once detected, call `mcp__gdd_state__update_progress` with `task_progress: "3/3"` and a short `status` summary (e.g., `status: "integration_check_done"`).
344
+
345
+ **Note:** Integration-checker findings (Orphaned and Missing decisions) are treated as additional gaps and fed into the gap-response loop in Step 2 alongside verifier gaps.
346
+
347
+ ---
348
+
349
+ ## Step 2 - Interpret Result
350
+
351
+ Check agent responses for gaps. Gaps come from two sources:
352
+ - design-verifier: `## GAPS FOUND` marker in the verifier response (G-NN entries)
353
+ - design-integration-checker: Orphaned or Missing decisions in the integration checker response (any decision with status Orphaned or Missing is a gap)
354
+
355
+ ### Consolidate gaps:
356
+
357
+ Merge verifier gaps (G-NN entries) and integration-checker gaps (Orphaned/Missing D-XX decisions) into a single gap list. Integration-checker Orphaned decisions become MAJOR gaps; Missing decisions become BLOCKER gaps (a decision that was never applied).
358
+
359
+ ### If NO gaps from either source (PASS):
360
+
361
+ - For each M-XX from the earlier `mcp__gdd_state__get` snapshot (`state.must_haves`): call `mcp__gdd_state__add_must_have` with the same `id`, the same `text`, and `status: "pass"`. The mutator updates in-place (see "Flipping a must-have status" above).
362
+ - Go to **Stage exit** with status=completed.
363
+
364
+ ### If GAPS FOUND (from either source):
365
+
366
+ - Parse all gaps (verifier + integration-checker combined).
367
+ - Count gaps by severity (BLOCKER, MAJOR, MINOR, COSMETIC).
368
+ - If `auto_mode=true`: preserve DESIGN-VERIFICATION.md, call `mcp__gdd_state__set_status` with `status: "blocked"`, then call `mcp__gdd_state__add_blocker` with `stage: "verify"` and `text: "N blockers found — see .design/DESIGN-VERIFICATION.md and integration-checker output"` (the mutator stamps the ISO date automatically). Exit with message:
369
+ ```
370
+ Verification failed — N gaps found (X blockers, Y majors, Z minors, W cosmetics).
371
+ Report: .design/DESIGN-VERIFICATION.md
372
+ Fix gaps and re-run: /get-design-done:verify
373
+ ```
374
+ - If `auto_mode=false`: present gap summary and menu (go to Step 3).
375
+
376
+ ---
377
+
378
+ ## Step 3 - Gap Response Loop
379
+
380
+ Present to the user:
381
+
382
+ ```
383
+ === Verification found N gaps ===
384
+ BLOCKER: X
385
+ MAJOR: Y
386
+ MINOR: Z
387
+ COSMETIC:W
388
+
389
+ Options:
390
+ [1] Fix now — inline fix for addressable gaps, then re-verify
391
+ [2] Save and exit — work preserved; fix in a later session
392
+ [3] Accept as-is — mark verify complete despite gaps (not recommended for blockers)
393
+
394
+ Choose:
395
+ =================================
396
+ ```
397
+
398
+ ### If user chose [2] Save and exit:
399
+
400
+ - Preserve DESIGN-VERIFICATION.md.
401
+ - Call `mcp__gdd_state__set_status` with `status: "blocked"`.
402
+ - Call `mcp__gdd_state__add_blocker` with `stage: "verify"` and `text: "N gaps outstanding — see .design/DESIGN-VERIFICATION.md"` (ISO date stamped by the mutator).
403
+ - Call `mcp__gdd_state__checkpoint` to record the save-and-exit checkpoint.
404
+ - Exit:
405
+ ```
406
+ Gaps saved. Resume with: /get-design-done:verify
407
+ Report: .design/DESIGN-VERIFICATION.md
408
+ ```
409
+
410
+ ### If user chose [3] Accept as-is:
411
+
412
+ - For each unmet must-have (from the earlier snapshot, comparing against verifier gaps): call `mcp__gdd_state__add_must_have` with the same `id`, the same `text`, and `status: "fail"` (update-in-place idiom). Then proceed to exit.
413
+ - Call `mcp__gdd_state__add_blocker` with `stage: "verify"` and `text: "accepted with N unresolved gaps"`.
414
+ - Go to **Stage exit** with status=completed.
415
+
416
+ ### If user chose [1] Fix now:
417
+
418
+ Check fix iteration counter. If counter >= 3:
419
+ ```
420
+ Maximum fix iterations (3) reached. Saving current state and exiting.
421
+ Outstanding gaps remain — see .design/DESIGN-VERIFICATION.md.
422
+ ```
423
+ Treat as Save and exit (option 2 above).
424
+
425
+ Otherwise: increment iteration counter and spawn design-fixer:
426
+
427
+ Task("design-fixer", """
428
+ <required_reading>
429
+ @.design/STATE.md
430
+ @.design/DESIGN-VERIFICATION.md
431
+ @.design/DESIGN-CONTEXT.md
432
+ </required_reading>
433
+
434
+ Fix all BLOCKER and MAJOR gaps from ## Stage 5 - Gaps in DESIGN-VERIFICATION.md.
435
+ For each gap: apply the targeted fix to the file/location in the gap's Location field.
436
+ After each fix, make an atomic commit: fix(design-gap-GNN): [gap title].
437
+
438
+ Context:
439
+ auto_mode: <true|false>
440
+
441
+ Emit ## FIX COMPLETE when all in-scope gaps have been attempted (partial success is still ## FIX COMPLETE).
442
+ Record any gap that could not be fixed via mcp__gdd_state__add_blocker with stage: "verify".
443
+ """)
444
+
445
+ Wait for `## FIX COMPLETE` in the agent response before continuing.
446
+
447
+ After the design-fixer spawn returns `## FIX COMPLETE`, re-spawn design-verifier with `re_verify=true` and loop to Step 2:
448
+
449
+ ```
450
+ Task("design-verifier", """
451
+ <required_reading>
452
+ @.design/STATE.md
453
+ @.design/DESIGN-AUDIT.md
454
+ @.design/DESIGN-PLAN.md
455
+ @.design/DESIGN-CONTEXT.md
456
+ @.design/tasks/
457
+ @reference/audit-scoring.md
458
+ @reference/heuristics.md
459
+ @reference/review-format.md
460
+ @reference/accessibility.md
461
+ </required_reading>
462
+
463
+ You are the design-verifier agent. This is a re-verification run after inline fixes.
464
+
465
+ DESIGN-AUDIT.md contains the retrospective 7-pillar audit from design-auditor (read as supplementary context).
466
+
467
+ Context:
468
+ auto_mode: <true|false>
469
+ re_verify: true
470
+
471
+ Focus verification on previously-failed must-haves first. Run full 5-phase pass.
472
+ Write updated .design/DESIGN-VERIFICATION.md. Emit ## GAPS FOUND (if any), then ## VERIFICATION COMPLETE.
473
+ """)
474
+ ```
475
+
476
+ ---
477
+
478
+ ## Stage exit
479
+
480
+ 1. Call `mcp__gdd_state__update_progress` with `task_progress: "<verified>/<total>"` (the total is `state.must_haves.length` from the entry snapshot; verified is the count set to `pass`) and `status: "verify_complete"`.
481
+ 2. Call `mcp__gdd_state__set_status` with one of:
482
+ - `status: "pipeline_complete"` - all must-haves passed and no outstanding gaps.
483
+ - `status: "verify_failed_requires_loop"` - gaps remain (save-and-exit, accept-as-is with fails, or auto-mode blocker).
484
+ 3. Call `mcp__gdd_state__checkpoint` - stamps `frontmatter.last_checkpoint` and appends a `verify_completed_at` timestamp entry. No direct STATE.md writes; the checkpoint tool owns the final persist.
485
+
486
+ ---
487
+
488
+ ## After Completion
489
+
490
+ Print summary:
491
+
492
+ ```
493
+ === Verify complete ===
494
+ Status: PASS | FAIL | ACCEPTED-WITH-GAPS
495
+ Gaps: X blockers, Y majors, Z minors, W cosmetics
496
+
497
+ Agents run:
498
+ design-auditor -> .design/DESIGN-AUDIT.md (7-pillar qualitative)
499
+ design-verifier-gate -> JSON gate decision (may skip design-verifier)
500
+ design-verifier -> .design/DESIGN-VERIFICATION.md (7-category + heuristics + UAT)
501
+ design-integration-checker-gate -> JSON gate decision (may skip design-integration-checker)
502
+ design-integration-checker -> inline (D-XX decision wiring)
503
+
504
+ Reports:
505
+ Qualitative audit: .design/DESIGN-AUDIT.md
506
+ Full verification: .design/DESIGN-VERIFICATION.md
507
+
508
+ Next: [if pass] pipeline complete — run /get-design-done:discover for next session
509
+ [if fail] fix gaps and re-run /get-design-done:verify
510
+ ======================
511
+ ```
@@ -0,0 +1,81 @@
1
+ ---
2
+ name: warm-cache
3
+ description: "Pre-warms Anthropic's 5-min prompt cache across all agents that import reference/shared-preamble.md. Issues one no-op Haiku ping per agent so the identical preamble-first prefix lives in Anthropic's cache before a design sprint starts. Layer A of the D-08 two-layer cache. Run this once at the start of a {{command_prefix}}* sprint for ~90% input-cost savings on the first repeated spawn."
4
+ user-invocable: true
5
+ argument-hint: "[--agents <comma-list>]"
6
+ tools: Read, Bash, Grep
7
+ disable-model-invocation: true
8
+ ---
9
+
10
+ # warm-cache
11
+
12
+ ## Role
13
+
14
+ You are the Layer A cache primer. You enumerate the agent roster by scanning `agents/*.md` for files that import `reference/shared-preamble.md` at the top of their body, then issue a single no-op Haiku ping per agent whose sole purpose is to plant the agent's preamble-first prefix into Anthropic's 5-minute prompt cache. You do not do real work. You do not write files. You do not touch `.design/cache-manifest.json` (that's Layer B, owned by `gdd-cache-manager`).
15
+
16
+ ## Invocation Contract
17
+
18
+ - **Command form**: `{{command_prefix}}warm-cache` - warms all agents that import the shared preamble.
19
+ - **With filter**: `{{command_prefix}}warm-cache --agents design-verifier,design-planner,design-integration-checker` - warms only the named agents (comma-separated, no spaces, matches agent file basename without `.md`).
20
+ - **Output**: a single markdown summary to stdout -
21
+ ```
22
+ ## Warm-cache complete
23
+ - Agents warmed: 14
24
+ - Skipped (no shared preamble import): 3
25
+ - Duration: 4.2s
26
+ - Next 5 min: repeated spawns of these agents pay cached_input_per_1m rate
27
+ ```
28
+ - **Exit code**: 0 on success, 1 if the shared preamble file is missing (warn and continue in that case - do not fail the sprint).
29
+
30
+ ## Step-by-step Flow
31
+
32
+ ### Step 1: locate shared preamble
33
+
34
+ Check `reference/shared-preamble.md` exists. If missing, print `warm-cache: reference/shared-preamble.md not found — Layer A cache priming requires Plan 10.1-04 to land first. Skipping.` and exit 0.
35
+
36
+ ### Step 2: enumerate candidate agents
37
+
38
+ - Glob `agents/*.md` excluding `agents/README.md`.
39
+ - For each agent file, grep for the literal string `@reference/shared-preamble.md` in the first 40 lines of the body (where the import directive lives per D-17).
40
+ - Keep only files that match.
41
+ - If `--agents` flag supplied, intersect the enumerated list with the flag-supplied comma-list. Report filtered-out agents in the output summary.
42
+
43
+ ### Step 3: issue one no-op Haiku ping per agent
44
+
45
+ For each kept agent, spawn the agent at tier `haiku` with an input payload designed to be the smallest possible valid invocation:
46
+
47
+ ```
48
+ No-op warm: acknowledge and return "ok". Do not read files. Do not write files. Do not emit anything beyond the two characters "ok".
49
+ ```
50
+
51
+ Spawns run serially - parallelism buys nothing here because Anthropic's prompt cache keys on prompt prefix, not on concurrent calls. Swallow spawn errors per agent (log and continue) - a single broken agent must not abort the sprint.
52
+
53
+ ### Step 4: emit summary
54
+
55
+ Print the markdown summary described in the Invocation Contract.
56
+
57
+ ## Concrete Command Example
58
+
59
+ Full + filtered command-output examples live in `./../cache-manager/cache-policy.md#concrete-warm-cache-command-examples-layer-a` so this skill stays close to its step-by-step flow rather than its sample output.
60
+
61
+ ## Integration Points
62
+
63
+ - **Pre-sprint**: `{{command_prefix}}warm-cache` is the recommended first line of a `{{command_prefix}}discover`, `{{command_prefix}}plan`, or `{{command_prefix}}verify` sprint. Users type it before the real command, or an orchestrator-level wrapper runs it automatically if `agent-metrics.json` (Plan 10.1-05) indicates the last sprint was > 5 min ago.
64
+ - **`reference/shared-preamble.md`** (authored in Plan 10.1-04) is the essential file for this command - agents import it first per D-17, which makes the first N tokens of every agent's rendered system prompt identical, which is what Anthropic's prompt cache keys on.
65
+ - **No interaction with `hooks/budget-enforcer.ts`** - the hook is a PreToolUse gate; warm-cache runs as an ordinary Agent tool call itself and is subject to the hook (each no-op Haiku ping is budgeted and logged like any other spawn). This is intentional: warm-cache's own telemetry rows in `.design/telemetry/costs.jsonl` are the evidence that cache priming happened.
66
+
67
+ ## Cost Model
68
+
69
+ Full per-ping math, total-cost arithmetic for a 14-agent warm, and payback calculation versus a downstream Opus spawn live in `./../cache-manager/cache-policy.md#cost-model-layer-a`. Top-line: a full warm is ~$0.001 and pays back ~500× on the first repeated planner spawn.
70
+
71
+ ## Failure Modes
72
+
73
+ - Shared preamble missing → print warning, exit 0. Sprint continues without Layer A priming.
74
+ - Individual agent spawn fails → log, continue to next agent.
75
+ - Budget cap hit during warm-cache (hypothetical - the total cost is trivial) → hook blocks per D-02, warm-cache surfaces the error in the summary and exits 0. User can raise cap or proceed without priming.
76
+
77
+ ## Non-Goals
78
+
79
+ - Does not touch Layer B (`.design/cache-manifest.json`). That is the cache-manager skill's territory.
80
+ - Does not attempt to bypass or accelerate Anthropic's cache beyond issuing real API calls at minimal cost. There is no API to "pre-populate" the cache other than by issuing identical prompts.
81
+ - Does not persist between Anthropic's 5-min TTL. After 5 minutes of inactivity, a re-warm is needed.