@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.
- package/.claude-plugin/marketplace.json +63 -0
- package/.claude-plugin/plugin.json +54 -0
- package/CHANGELOG.md +221 -0
- package/LICENSE +21 -0
- package/README.md +724 -0
- package/SKILL.md +232 -0
- package/agents/README.md +226 -0
- package/agents/a11y-mapper.md +118 -0
- package/agents/component-taxonomy-mapper.md +88 -0
- package/agents/design-advisor.md +139 -0
- package/agents/design-assumptions-analyzer.md +171 -0
- package/agents/design-auditor.md +383 -0
- package/agents/design-context-builder.md +544 -0
- package/agents/design-context-checker-gate.md +90 -0
- package/agents/design-context-checker.md +260 -0
- package/agents/design-discussant.md +98 -0
- package/agents/design-doc-writer.md +229 -0
- package/agents/design-executor.md +452 -0
- package/agents/design-figma-writer.md +302 -0
- package/agents/design-fixer.md +180 -0
- package/agents/design-integration-checker-gate.md +93 -0
- package/agents/design-integration-checker.md +326 -0
- package/agents/design-pattern-mapper.md +206 -0
- package/agents/design-phase-researcher.md +229 -0
- package/agents/design-plan-checker.md +164 -0
- package/agents/design-planner.md +352 -0
- package/agents/design-reflector.md +175 -0
- package/agents/design-research-synthesizer.md +127 -0
- package/agents/design-verifier-gate.md +97 -0
- package/agents/design-verifier.md +605 -0
- package/agents/gdd-graphify-sync.md +100 -0
- package/agents/gdd-intel-updater.md +88 -0
- package/agents/gdd-learnings-extractor.md +85 -0
- package/agents/motion-mapper.md +103 -0
- package/agents/token-mapper.md +103 -0
- package/agents/visual-hierarchy-mapper.md +95 -0
- package/connections/chromatic.md +247 -0
- package/connections/claude-design.md +190 -0
- package/connections/connections.md +218 -0
- package/connections/figma-writer.md +139 -0
- package/connections/figma.md +146 -0
- package/connections/graphify.md +197 -0
- package/connections/pinterest.md +153 -0
- package/connections/preview.md +173 -0
- package/connections/refero.md +189 -0
- package/connections/storybook.md +280 -0
- package/hooks/budget-enforcer.js +318 -0
- package/hooks/context-exhaustion.js +127 -0
- package/hooks/gdd-read-injection-scanner.js +44 -0
- package/hooks/hooks.json +44 -0
- package/package.json +60 -0
- package/reference/BRANCH-PROTECTION.md +65 -0
- package/reference/DEPRECATIONS.md +41 -0
- package/reference/STATE-TEMPLATE.md +200 -0
- package/reference/accessibility.md +190 -0
- package/reference/anti-patterns.md +336 -0
- package/reference/audit-scoring.md +205 -0
- package/reference/checklists.md +137 -0
- package/reference/config-schema.md +319 -0
- package/reference/debugger-philosophy.md +32 -0
- package/reference/heuristics.md +201 -0
- package/reference/intel-schema.md +266 -0
- package/reference/model-prices.md +37 -0
- package/reference/model-tiers.md +118 -0
- package/reference/motion.md +285 -0
- package/reference/parallelism-rules.md +108 -0
- package/reference/priority-matrix.md +31 -0
- package/reference/project-skills-guide.md +42 -0
- package/reference/review-format.md +107 -0
- package/reference/schemas/config.schema.json +41 -0
- package/reference/schemas/hooks.schema.json +55 -0
- package/reference/schemas/intel.schema.json +191 -0
- package/reference/schemas/marketplace.schema.json +72 -0
- package/reference/schemas/plugin.schema.json +59 -0
- package/reference/shared-preamble.md +82 -0
- package/reference/typography.md +229 -0
- package/scripts/aggregate-agent-metrics.js +144 -0
- package/scripts/apply-branch-protection.sh +75 -0
- package/scripts/bootstrap-manifest.txt +3 -0
- package/scripts/bootstrap.sh +80 -0
- package/scripts/build-intel.cjs +458 -0
- package/scripts/detect-stale-refs.cjs +101 -0
- package/scripts/extract-changelog-section.cjs +57 -0
- package/scripts/release-smoke-test.cjs +169 -0
- package/scripts/rollback-release.sh +42 -0
- package/scripts/run-injection-scanner-ci.cjs +92 -0
- package/scripts/validate-frontmatter.cjs +68 -0
- package/scripts/validate-schemas.cjs +225 -0
- package/scripts/verify-version-sync.cjs +30 -0
- package/skills/add-backlog/SKILL.md +47 -0
- package/skills/analyze-dependencies/SKILL.md +184 -0
- package/skills/apply-reflections/SKILL.md +112 -0
- package/skills/audit/SKILL.md +54 -0
- package/skills/brief/SKILL.md +75 -0
- package/skills/cache-manager/SKILL.md +120 -0
- package/skills/compare/SKILL.md +322 -0
- package/skills/complete-cycle/SKILL.md +33 -0
- package/skills/darkmode/SKILL.md +331 -0
- package/skills/debug/SKILL.md +38 -0
- package/skills/design/SKILL.md +281 -0
- package/skills/discover/SKILL.md +172 -0
- package/skills/discuss/SKILL.md +67 -0
- package/skills/do/SKILL.md +45 -0
- package/skills/explore/SKILL.md +109 -0
- package/skills/extract-learnings/SKILL.md +98 -0
- package/skills/fast/SKILL.md +44 -0
- package/skills/figma-write/SKILL.md +40 -0
- package/skills/graphify/SKILL.md +48 -0
- package/skills/health/SKILL.md +48 -0
- package/skills/help/SKILL.md +76 -0
- package/skills/list-assumptions/SKILL.md +60 -0
- package/skills/map/SKILL.md +112 -0
- package/skills/new-cycle/SKILL.md +35 -0
- package/skills/new-project/SKILL.md +53 -0
- package/skills/next/SKILL.md +42 -0
- package/skills/note/SKILL.md +47 -0
- package/skills/optimize/SKILL.md +120 -0
- package/skills/pause/SKILL.md +41 -0
- package/skills/plan/SKILL.md +251 -0
- package/skills/plant-seed/SKILL.md +47 -0
- package/skills/pr-branch/SKILL.md +31 -0
- package/skills/progress/SKILL.md +60 -0
- package/skills/quick/SKILL.md +43 -0
- package/skills/reapply-patches/SKILL.md +31 -0
- package/skills/reflect/SKILL.md +73 -0
- package/skills/resume/SKILL.md +37 -0
- package/skills/review-backlog/SKILL.md +45 -0
- package/skills/router/SKILL.md +67 -0
- package/skills/scan/SKILL.md +721 -0
- package/skills/settings/SKILL.md +78 -0
- package/skills/ship/SKILL.md +31 -0
- package/skills/sketch/SKILL.md +78 -0
- package/skills/sketch-wrap-up/SKILL.md +88 -0
- package/skills/skill-manifest/SKILL.md +79 -0
- package/skills/spike/SKILL.md +67 -0
- package/skills/spike-wrap-up/SKILL.md +81 -0
- package/skills/stats/SKILL.md +50 -0
- package/skills/style/SKILL.md +193 -0
- package/skills/synthesize/SKILL.md +93 -0
- package/skills/todo/SKILL.md +54 -0
- package/skills/undo/SKILL.md +30 -0
- package/skills/update/SKILL.md +36 -0
- package/skills/verify/SKILL.md +452 -0
- package/skills/warm-cache/SKILL.md +113 -0
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: verify
|
|
3
|
+
description: "Stage 5 of 5 — spawns design-auditor, design-verifier, and design-integration-checker in sequence; interprets pass/gap result; handles gap-response loop with inline fix (Phase 5 will add AGENT-12 remediation agent). Thin orchestrator."
|
|
4
|
+
argument-hint: "[--auto]"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Get Design Done — Verify
|
|
9
|
+
|
|
10
|
+
**Stage 5 of 5** in the get-design-done pipeline. Thin orchestrator. Verification intelligence lives in three agents: design-auditor, design-verifier, and design-integration-checker.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## State Integration
|
|
15
|
+
|
|
16
|
+
1. Read `.design/STATE.md`.
|
|
17
|
+
- If missing: create minimal skeleton from `reference/STATE-TEMPLATE.md` with `stage=verify`, `status=in_progress`; log warning to user: "No STATE.md found — creating minimal skeleton."
|
|
18
|
+
- If present and `stage==verify` and `status==in_progress`: RESUME — if `.design/DESIGN-VERIFICATION.md` exists, pick up from the gap-response loop (skip re-spawning agents, go to Step 2). Otherwise re-spawn all three agents from Step 1.
|
|
19
|
+
- Otherwise: normal transition — set `stage=verify`, `status=in_progress`, `task_progress=0/3`.
|
|
20
|
+
2. Update `<connections>`, `last_checkpoint`. Write STATE.md.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
### Probe Preview connection
|
|
25
|
+
|
|
26
|
+
Run at stage entry, after reading STATE.md:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
Step P1 — ToolSearch check:
|
|
30
|
+
ToolSearch({ query: "Claude_Preview", max_results: 5 })
|
|
31
|
+
→ Empty result → preview: not_configured (skip all Preview steps in this stage)
|
|
32
|
+
→ Non-empty result → proceed to Step P2
|
|
33
|
+
|
|
34
|
+
Step P2 — Live tool call:
|
|
35
|
+
call mcp__Claude_Preview__preview_list
|
|
36
|
+
→ Success → preview: available
|
|
37
|
+
→ Error → preview: unavailable
|
|
38
|
+
|
|
39
|
+
Write preview status to .design/STATE.md <connections>.
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
When `preview: available`, the design-verifier agent runs Phase 4B — Screenshot Evidence to resolve `? VISUAL` heuristic flags with real screenshot evidence. See `agents/design-verifier.md` Phase 4B for the screenshot evidence loop.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
### Probe Storybook connection
|
|
47
|
+
|
|
48
|
+
Run at stage entry, after reading STATE.md:
|
|
49
|
+
|
|
50
|
+
Step B1 — Project detection:
|
|
51
|
+
Bash: ls .storybook/ 2>/dev/null || grep -l '"storybook"' package.json 2>/dev/null
|
|
52
|
+
→ Found → storybook_project: true → proceed to Step B2
|
|
53
|
+
→ Not found → storybook: not_configured (skip all Storybook steps)
|
|
54
|
+
|
|
55
|
+
Step B2 — Dev server detection:
|
|
56
|
+
Bash: curl -sf http://localhost:6006/index.json 2>/dev/null | head -1
|
|
57
|
+
→ Returns JSON → storybook: available
|
|
58
|
+
→ Fails → Bash: curl -sf http://localhost:6006/stories.json 2>/dev/null | head -1
|
|
59
|
+
→ Returns JSON → storybook: available (compat endpoint)
|
|
60
|
+
→ Fails → storybook: unavailable
|
|
61
|
+
|
|
62
|
+
Write storybook status to .design/STATE.md `<connections>`.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
### Storybook A11y Loop (when storybook: available)
|
|
67
|
+
|
|
68
|
+
If `storybook: available` in STATE.md `<connections>`:
|
|
69
|
+
1. Run: Bash: npx storybook test --ci 2>&1 | tee .design/storybook-a11y-report.txt
|
|
70
|
+
2. Read .design/storybook-a11y-report.txt — pass to design-verifier as additional a11y evidence
|
|
71
|
+
3. design-verifier reads this file in its a11y gap analysis section and annotates DESIGN-VERIFICATION.md with per-story violations
|
|
72
|
+
|
|
73
|
+
If storybook: unavailable — skip this section; run standard WCAG grep-based a11y checks only.
|
|
74
|
+
If storybook: not_configured — skip; emit no note (opt-in feature).
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
### Probe Chromatic connection
|
|
79
|
+
|
|
80
|
+
Run at stage entry, after reading STATE.md:
|
|
81
|
+
|
|
82
|
+
Step C1 — CLI presence:
|
|
83
|
+
Bash: command -v chromatic 2>/dev/null || npx chromatic --version 2>/dev/null
|
|
84
|
+
→ found → proceed to Step C2
|
|
85
|
+
→ not found → chromatic: not_configured (skip all Chromatic steps)
|
|
86
|
+
|
|
87
|
+
Step C2 — Token check:
|
|
88
|
+
Bash: test -n "${CHROMATIC_PROJECT_TOKEN}"
|
|
89
|
+
→ true → chromatic: available
|
|
90
|
+
→ false → chromatic: unavailable
|
|
91
|
+
|
|
92
|
+
Also check: if storybook: not_configured → chromatic effectively unavailable (emit note, do not run).
|
|
93
|
+
Write chromatic status to .design/STATE.md <connections>.
|
|
94
|
+
|
|
95
|
+
### Chromatic Visual Delta (when chromatic: available)
|
|
96
|
+
|
|
97
|
+
After design executor has run (when verifying post-design):
|
|
98
|
+
1. Run: Bash: npx chromatic --project-token $CHROMATIC_PROJECT_TOKEN --output json 2>&1 | tee .design/chromatic-results.json
|
|
99
|
+
2. Pass .design/chromatic-results.json to design-verifier for narration (see design-verifier.md Chromatic Delta Narration section)
|
|
100
|
+
If chromatic: unavailable or not_configured: skip; note in DESIGN-VERIFICATION.md "visual regression check skipped".
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
**DESIGN-PLAN.md prerequisite check:**
|
|
105
|
+
- **Normal mode:** Check that `.design/DESIGN-PLAN.md` exists. If missing, block with: "Verify requires DESIGN-PLAN.md. Run `/gdd:plan` first, or use `--post-handoff` if starting from a Claude Design handoff bundle."
|
|
106
|
+
- **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.
|
|
107
|
+
|
|
108
|
+
Abort only if no `.design/` directory exists (user has not run prior stages). Output: "No .design/ directory found. Run /get-design-done:discover first."
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Post-Handoff Mode
|
|
113
|
+
|
|
114
|
+
When `--post-handoff` flag is present OR STATE.md `<position>` contains `status: handoff-sourced`:
|
|
115
|
+
|
|
116
|
+
1. **Skip DESIGN-PLAN.md prerequisite check** (no plan exists in handoff flows)
|
|
117
|
+
2. **Pass `post_handoff: true` to design-verifier** spawn prompt (see Step 1b below)
|
|
118
|
+
3. **Pass `handoff_path`** from STATE.md to design-verifier spawn prompt
|
|
119
|
+
4. **DESIGN-VERIFICATION.md** will include a `## Handoff Faithfulness` section generated by design-verifier (see `agents/design-verifier.md` Handoff Faithfulness Phase)
|
|
120
|
+
|
|
121
|
+
Also pass post-handoff context to design-auditor: auditor skips DESIGN-PLAN.md reads and focuses on implementation-vs-bundle gap analysis.
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Flag Parsing
|
|
126
|
+
|
|
127
|
+
- `--auto` → `auto_mode=true` (no interactive prompts; skip visual UAT interactive steps; on gaps: save-and-exit rather than prompt for fix)
|
|
128
|
+
- `--post-handoff` → `post_handoff=true` (relax DESIGN-PLAN.md prerequisite; instruct verifier to add Handoff Faithfulness section; see ## Post-Handoff Mode below)
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Parallelism Decision (before agent spawns)
|
|
133
|
+
|
|
134
|
+
- Read `.design/config.json` `parallelism` (or defaults from `reference/config-schema.md`).
|
|
135
|
+
- Apply rules from `reference/parallelism-rules.md`.
|
|
136
|
+
- `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.
|
|
137
|
+
- Write `<parallelism_decision>` to STATE.md before spawning.
|
|
138
|
+
|
|
139
|
+
## Step 1 — Spawn Auditor + Verifier + Integration Checker
|
|
140
|
+
|
|
141
|
+
Initialize iteration counter to 0 (used for fix loop limit in Step 3).
|
|
142
|
+
|
|
143
|
+
Three agents run in sequence. Each waits for its completion marker before the next is spawned.
|
|
144
|
+
|
|
145
|
+
**Note on lazy gates (Plan 10.1-04 / D-21):** 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.
|
|
146
|
+
|
|
147
|
+
### 1a. Run design-auditor first (retrospective 6-pillar audit)
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
Task("design-auditor", """
|
|
151
|
+
<required_reading>
|
|
152
|
+
@.design/STATE.md
|
|
153
|
+
@.design/DESIGN-CONTEXT.md
|
|
154
|
+
@.design/DESIGN-PLAN.md
|
|
155
|
+
@.design/tasks/
|
|
156
|
+
@reference/audit-scoring.md
|
|
157
|
+
</required_reading>
|
|
158
|
+
|
|
159
|
+
You are the design-auditor agent. Run the 6-pillar retrospective audit (copy, visual hierarchy,
|
|
160
|
+
color, typography, layout/spacing, experience design) against the completed design work.
|
|
161
|
+
|
|
162
|
+
Score each pillar 1–4. Write your findings to .design/DESIGN-AUDIT.md.
|
|
163
|
+
|
|
164
|
+
This audit SUPPLEMENTS the 7-category 0-10 system in reference/audit-scoring.md — do not replace
|
|
165
|
+
or contradict it. Your output will be read by design-verifier as additional context.
|
|
166
|
+
|
|
167
|
+
Emit `## AUDIT COMPLETE` when done.
|
|
168
|
+
""")
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Wait for `## AUDIT COMPLETE` in the agent response. Once detected, update STATE.md `task_progress=1/3`.
|
|
172
|
+
|
|
173
|
+
### 1b-gate. Lazy gate — should design-verifier run?
|
|
174
|
+
|
|
175
|
+
Spawn the cheap Haiku gate before the expensive verifier:
|
|
176
|
+
|
|
177
|
+
Task("design-verifier-gate", """
|
|
178
|
+
<required_reading>
|
|
179
|
+
@.design/STATE.md
|
|
180
|
+
</required_reading>
|
|
181
|
+
|
|
182
|
+
You are the design-verifier-gate. Read the diff since the last verified commit
|
|
183
|
+
and decide whether design-verifier should spawn.
|
|
184
|
+
|
|
185
|
+
Context:
|
|
186
|
+
diff_files: <output of `git diff --name-only <baseline_sha>..HEAD`>
|
|
187
|
+
diff_body: <output of `git diff <baseline_sha>..HEAD` truncated to 4000 lines>
|
|
188
|
+
baseline_sha: <from .design/STATE.md last_verified_sha, or HEAD~1 if absent>
|
|
189
|
+
|
|
190
|
+
Apply the heuristic. Emit JSON + `## GATE COMPLETE`.
|
|
191
|
+
""")
|
|
192
|
+
|
|
193
|
+
Wait for `## GATE COMPLETE`. Parse the JSON:
|
|
194
|
+
|
|
195
|
+
- `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. Set `task_progress=2/3`. Emit `design-verifier skipped — gate rationale: <rationale>`.
|
|
196
|
+
- `spawn: true` → proceed to 1b as currently written.
|
|
197
|
+
|
|
198
|
+
### 1b. Run design-verifier (reads auditor output as additional input)
|
|
199
|
+
|
|
200
|
+
```
|
|
201
|
+
Task("design-verifier", """
|
|
202
|
+
<required_reading>
|
|
203
|
+
@.design/STATE.md
|
|
204
|
+
@.design/DESIGN-AUDIT.md
|
|
205
|
+
@.design/DESIGN-PLAN.md
|
|
206
|
+
@.design/DESIGN-CONTEXT.md
|
|
207
|
+
@.design/tasks/
|
|
208
|
+
@reference/audit-scoring.md
|
|
209
|
+
@reference/heuristics.md
|
|
210
|
+
@reference/review-format.md
|
|
211
|
+
@reference/accessibility.md
|
|
212
|
+
</required_reading>
|
|
213
|
+
|
|
214
|
+
You are the design-verifier agent. Run the 5-phase verification against completed design work.
|
|
215
|
+
|
|
216
|
+
DESIGN-AUDIT.md (above) contains a retrospective 6-pillar qualitative audit from design-auditor.
|
|
217
|
+
Read it as supplementary signal — incorporate the priority fix list into your Phase 5 gap analysis
|
|
218
|
+
where relevant. The auditor's 1–4 scores complement your 0–10 category scores; they do not
|
|
219
|
+
replace your Phase 1 category scoring.
|
|
220
|
+
|
|
221
|
+
Context:
|
|
222
|
+
auto_mode: <true|false>
|
|
223
|
+
re_verify: false
|
|
224
|
+
post_handoff: <true|false — true when --post-handoff flag active or STATE.md status==handoff-sourced>
|
|
225
|
+
handoff_path: <value from STATE.md handoff_path, or empty string>
|
|
226
|
+
|
|
227
|
+
Write .design/DESIGN-VERIFICATION.md. If post_handoff is true, include ## Handoff Faithfulness section
|
|
228
|
+
(see agents/design-verifier.md Handoff Faithfulness Phase). If gaps found, emit `## GAPS FOUND` followed
|
|
229
|
+
by structured gap list, then `## VERIFICATION COMPLETE`. If no gaps, just emit `## VERIFICATION COMPLETE`.
|
|
230
|
+
""")
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
Wait for `## VERIFICATION COMPLETE` in the agent response. Once detected, update STATE.md `task_progress=2/3`.
|
|
234
|
+
|
|
235
|
+
### 1c-gate. Lazy gate — should design-integration-checker run?
|
|
236
|
+
|
|
237
|
+
Same pattern as 1b-gate:
|
|
238
|
+
|
|
239
|
+
Task("design-integration-checker-gate", """
|
|
240
|
+
<required_reading>
|
|
241
|
+
@.design/STATE.md
|
|
242
|
+
</required_reading>
|
|
243
|
+
|
|
244
|
+
You are the design-integration-checker-gate. Read the diff and decide whether
|
|
245
|
+
design-integration-checker should spawn.
|
|
246
|
+
|
|
247
|
+
Context:
|
|
248
|
+
diff_files: <git diff --name-only output>
|
|
249
|
+
diff_body: <git diff output, truncated>
|
|
250
|
+
baseline_sha: <from STATE.md or HEAD~1>
|
|
251
|
+
|
|
252
|
+
Apply the heuristic. Emit JSON + `## GATE COMPLETE`.
|
|
253
|
+
""")
|
|
254
|
+
|
|
255
|
+
Wait for `## GATE COMPLETE`. Parse JSON:
|
|
256
|
+
|
|
257
|
+
- `spawn: false` → append `lazy_skipped: true` telemetry row (same shape), skip 1c, set `task_progress=3/3`, emit `design-integration-checker skipped — gate rationale: <rationale>`.
|
|
258
|
+
- `spawn: true` → proceed to 1c as currently written.
|
|
259
|
+
|
|
260
|
+
### 1c. Run design-integration-checker (post-verification decision wiring check)
|
|
261
|
+
|
|
262
|
+
```
|
|
263
|
+
Task("design-integration-checker", """
|
|
264
|
+
<required_reading>
|
|
265
|
+
@.design/STATE.md
|
|
266
|
+
@.design/DESIGN-CONTEXT.md
|
|
267
|
+
@.design/DESIGN-VERIFICATION.md
|
|
268
|
+
</required_reading>
|
|
269
|
+
|
|
270
|
+
You are the design-integration-checker agent. Verify that each D-XX design decision recorded
|
|
271
|
+
in DESIGN-CONTEXT.md is actually reflected in the source code.
|
|
272
|
+
|
|
273
|
+
Check each decision by type:
|
|
274
|
+
- Typography decisions → grep font-size/scale values against declared scale
|
|
275
|
+
- Color decisions → grep for removed colors (expect 0 hits) and added tokens (expect ≥1 hit)
|
|
276
|
+
- Layout/spacing decisions → grep spacing values against declared grid
|
|
277
|
+
- Component decisions → grep for old patterns (expect 0) and new patterns (expect ≥1)
|
|
278
|
+
|
|
279
|
+
Return: Connected count, Orphaned count, Missing count with per-decision evidence.
|
|
280
|
+
Emit `## INTEGRATION CHECK COMPLETE` when done.
|
|
281
|
+
""")
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
Wait for `## INTEGRATION CHECK COMPLETE` in the agent response. Once detected, update STATE.md `task_progress=3/3`.
|
|
285
|
+
|
|
286
|
+
**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.
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
## Step 2 — Interpret Result
|
|
291
|
+
|
|
292
|
+
Check agent responses for gaps. Gaps come from two sources:
|
|
293
|
+
- design-verifier: `## GAPS FOUND` marker in the verifier response (G-NN entries)
|
|
294
|
+
- design-integration-checker: Orphaned or Missing decisions in the integration checker response (any decision with status Orphaned or Missing is a gap)
|
|
295
|
+
|
|
296
|
+
### Consolidate gaps:
|
|
297
|
+
|
|
298
|
+
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).
|
|
299
|
+
|
|
300
|
+
### If NO gaps from either source (PASS):
|
|
301
|
+
|
|
302
|
+
- Update STATE.md `<must_haves>`: set each M-XX `status=pass`.
|
|
303
|
+
- Go to **State Update (exit)** with status=completed.
|
|
304
|
+
|
|
305
|
+
### If GAPS FOUND (from either source):
|
|
306
|
+
|
|
307
|
+
- Parse all gaps (verifier + integration-checker combined).
|
|
308
|
+
- Count gaps by severity (BLOCKER, MAJOR, MINOR, COSMETIC).
|
|
309
|
+
- If `auto_mode=true`: preserve DESIGN-VERIFICATION.md, update STATE.md `status=blocked`, append `<blockers>` entry: "[verify] [ISO date]: N blockers found — see .design/DESIGN-VERIFICATION.md and integration-checker output". Exit with message:
|
|
310
|
+
```
|
|
311
|
+
Verification failed — N gaps found (X blockers, Y majors, Z minors, W cosmetics).
|
|
312
|
+
Report: .design/DESIGN-VERIFICATION.md
|
|
313
|
+
Fix gaps and re-run: /get-design-done:verify
|
|
314
|
+
```
|
|
315
|
+
- If `auto_mode=false`: present gap summary and menu (go to Step 3).
|
|
316
|
+
|
|
317
|
+
---
|
|
318
|
+
|
|
319
|
+
## Step 3 — Gap Response Loop
|
|
320
|
+
|
|
321
|
+
Present to the user:
|
|
322
|
+
|
|
323
|
+
```
|
|
324
|
+
━━━ Verification found N gaps ━━━
|
|
325
|
+
BLOCKER: X
|
|
326
|
+
MAJOR: Y
|
|
327
|
+
MINOR: Z
|
|
328
|
+
COSMETIC:W
|
|
329
|
+
|
|
330
|
+
Options:
|
|
331
|
+
[1] Fix now — inline fix for addressable gaps, then re-verify
|
|
332
|
+
[2] Save and exit — work preserved; fix in a later session
|
|
333
|
+
[3] Accept as-is — mark verify complete despite gaps (not recommended for blockers)
|
|
334
|
+
|
|
335
|
+
Choose:
|
|
336
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
### If user chose [2] Save and exit:
|
|
340
|
+
|
|
341
|
+
- Preserve DESIGN-VERIFICATION.md.
|
|
342
|
+
- Update STATE.md: `<position> status=blocked`.
|
|
343
|
+
- Append `<blockers>`: "[verify] [ISO date]: N gaps outstanding — see .design/DESIGN-VERIFICATION.md".
|
|
344
|
+
- Write STATE.md.
|
|
345
|
+
- Exit:
|
|
346
|
+
```
|
|
347
|
+
Gaps saved. Resume with: /get-design-done:verify
|
|
348
|
+
Report: .design/DESIGN-VERIFICATION.md
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
### If user chose [3] Accept as-is:
|
|
352
|
+
|
|
353
|
+
- Update STATE.md `<must_haves>`: set `status=fail` for each unmet must-have, but proceed to exit.
|
|
354
|
+
- Append `<blockers>`: "[verify] [ISO date]: accepted with N unresolved gaps".
|
|
355
|
+
- Go to **State Update (exit)** with status=completed.
|
|
356
|
+
|
|
357
|
+
### If user chose [1] Fix now:
|
|
358
|
+
|
|
359
|
+
Check fix iteration counter. If counter >= 3:
|
|
360
|
+
```
|
|
361
|
+
Maximum fix iterations (3) reached. Saving current state and exiting.
|
|
362
|
+
Outstanding gaps remain — see .design/DESIGN-VERIFICATION.md.
|
|
363
|
+
```
|
|
364
|
+
Treat as Save and exit (option 2 above).
|
|
365
|
+
|
|
366
|
+
Otherwise: increment iteration counter and spawn design-fixer:
|
|
367
|
+
|
|
368
|
+
Task("design-fixer", """
|
|
369
|
+
<required_reading>
|
|
370
|
+
@.design/STATE.md
|
|
371
|
+
@.design/DESIGN-VERIFICATION.md
|
|
372
|
+
@.design/DESIGN-CONTEXT.md
|
|
373
|
+
</required_reading>
|
|
374
|
+
|
|
375
|
+
Fix all BLOCKER and MAJOR gaps from ## Phase 5 — Gaps in DESIGN-VERIFICATION.md.
|
|
376
|
+
For each gap: apply the targeted fix to the file/location in the gap's Location field.
|
|
377
|
+
After each fix, make an atomic commit: fix(design-gap-GNN): [gap title].
|
|
378
|
+
|
|
379
|
+
Context:
|
|
380
|
+
auto_mode: <true|false>
|
|
381
|
+
|
|
382
|
+
Emit ## FIX COMPLETE when all in-scope gaps have been attempted (partial success is still ## FIX COMPLETE).
|
|
383
|
+
Write a <blocker> entry to .design/STATE.md for any gap that could not be fixed.
|
|
384
|
+
""")
|
|
385
|
+
|
|
386
|
+
Wait for `## FIX COMPLETE` in the agent response before continuing.
|
|
387
|
+
|
|
388
|
+
After the design-fixer spawn returns `## FIX COMPLETE`, re-spawn design-verifier with `re_verify=true` and loop to Step 2:
|
|
389
|
+
|
|
390
|
+
```
|
|
391
|
+
Task("design-verifier", """
|
|
392
|
+
<required_reading>
|
|
393
|
+
@.design/STATE.md
|
|
394
|
+
@.design/DESIGN-AUDIT.md
|
|
395
|
+
@.design/DESIGN-PLAN.md
|
|
396
|
+
@.design/DESIGN-CONTEXT.md
|
|
397
|
+
@.design/tasks/
|
|
398
|
+
@reference/audit-scoring.md
|
|
399
|
+
@reference/heuristics.md
|
|
400
|
+
@reference/review-format.md
|
|
401
|
+
@reference/accessibility.md
|
|
402
|
+
</required_reading>
|
|
403
|
+
|
|
404
|
+
You are the design-verifier agent. This is a re-verification run after inline fixes.
|
|
405
|
+
|
|
406
|
+
DESIGN-AUDIT.md contains the retrospective 6-pillar audit from design-auditor (read as supplementary context).
|
|
407
|
+
|
|
408
|
+
Context:
|
|
409
|
+
auto_mode: <true|false>
|
|
410
|
+
re_verify: true
|
|
411
|
+
|
|
412
|
+
Focus verification on previously-failed must-haves first. Run full 5-phase pass.
|
|
413
|
+
Write updated .design/DESIGN-VERIFICATION.md. Emit ## GAPS FOUND (if any), then ## VERIFICATION COMPLETE.
|
|
414
|
+
""")
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
---
|
|
418
|
+
|
|
419
|
+
## State Update (exit)
|
|
420
|
+
|
|
421
|
+
1. `<position> status=completed` (or `blocked` for save-and-exit).
|
|
422
|
+
2. `<timestamps> verify_completed_at=<ISO date now>`.
|
|
423
|
+
3. Update `last_checkpoint`. Write STATE.md.
|
|
424
|
+
|
|
425
|
+
---
|
|
426
|
+
|
|
427
|
+
## After Completion
|
|
428
|
+
|
|
429
|
+
Print summary:
|
|
430
|
+
|
|
431
|
+
```
|
|
432
|
+
━━━ Verify complete ━━━
|
|
433
|
+
Status: PASS | FAIL | ACCEPTED-WITH-GAPS
|
|
434
|
+
Gaps: X blockers, Y majors, Z minors, W cosmetics
|
|
435
|
+
|
|
436
|
+
Agents run:
|
|
437
|
+
design-auditor → .design/DESIGN-AUDIT.md (6-pillar qualitative)
|
|
438
|
+
design-verifier-gate → JSON gate decision (may skip design-verifier)
|
|
439
|
+
design-verifier → .design/DESIGN-VERIFICATION.md (7-category + heuristics + UAT)
|
|
440
|
+
design-integration-checker-gate → JSON gate decision (may skip design-integration-checker)
|
|
441
|
+
design-integration-checker → inline (D-XX decision wiring)
|
|
442
|
+
|
|
443
|
+
Reports:
|
|
444
|
+
Qualitative audit: .design/DESIGN-AUDIT.md
|
|
445
|
+
Full verification: .design/DESIGN-VERIFICATION.md
|
|
446
|
+
|
|
447
|
+
Next: [if pass] pipeline complete — run /get-design-done:discover for next session
|
|
448
|
+
[if fail] fix gaps and re-run /get-design-done:verify
|
|
449
|
+
━━━━━━━━━━━━━━━━━━━━━
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
## VERIFY COMPLETE
|
|
@@ -0,0 +1,113 @@
|
|
|
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 /gdd:* 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
|
+
---
|
|
8
|
+
|
|
9
|
+
# warm-cache
|
|
10
|
+
|
|
11
|
+
## Role
|
|
12
|
+
|
|
13
|
+
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`).
|
|
14
|
+
|
|
15
|
+
## Invocation Contract
|
|
16
|
+
|
|
17
|
+
- **Command form**: `/gdd:warm-cache` — warms all agents that import the shared preamble.
|
|
18
|
+
- **With filter**: `/gdd: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`).
|
|
19
|
+
- **Output**: a single markdown summary to stdout —
|
|
20
|
+
```
|
|
21
|
+
## Warm-cache complete
|
|
22
|
+
- Agents warmed: 14
|
|
23
|
+
- Skipped (no shared preamble import): 3
|
|
24
|
+
- Duration: 4.2s
|
|
25
|
+
- Next 5 min: repeated spawns of these agents pay cached_input_per_1m rate
|
|
26
|
+
```
|
|
27
|
+
- **Exit code**: 0 on success, 1 if the shared preamble file is missing (warn and continue in that case — do not fail the sprint).
|
|
28
|
+
|
|
29
|
+
## Step-by-step Flow
|
|
30
|
+
|
|
31
|
+
### Step 1: locate shared preamble
|
|
32
|
+
|
|
33
|
+
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.
|
|
34
|
+
|
|
35
|
+
### Step 2: enumerate candidate agents
|
|
36
|
+
|
|
37
|
+
- Glob `agents/*.md` excluding `agents/README.md`.
|
|
38
|
+
- 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).
|
|
39
|
+
- Keep only files that match.
|
|
40
|
+
- If `--agents` flag supplied, intersect the enumerated list with the flag-supplied comma-list. Report filtered-out agents in the output summary.
|
|
41
|
+
|
|
42
|
+
### Step 3: issue one no-op Haiku ping per agent
|
|
43
|
+
|
|
44
|
+
For each kept agent, spawn the agent at tier `haiku` with an input payload designed to be the smallest possible valid invocation:
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
No-op warm: acknowledge and return "ok". Do not read files. Do not write files. Do not emit anything beyond the two characters "ok".
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
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.
|
|
51
|
+
|
|
52
|
+
### Step 4: emit summary
|
|
53
|
+
|
|
54
|
+
Print the markdown summary described in the Invocation Contract.
|
|
55
|
+
|
|
56
|
+
## Concrete Command Example
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
$ /gdd:warm-cache
|
|
60
|
+
|
|
61
|
+
Warming Anthropic prompt cache for 14 agents (5 min TTL)...
|
|
62
|
+
[1/14] design-verifier ... ok (0.3s)
|
|
63
|
+
[2/14] design-planner ... ok (0.3s)
|
|
64
|
+
[3/14] design-integration-checker ... ok (0.3s)
|
|
65
|
+
...
|
|
66
|
+
[14/14] design-reflector ... ok (0.3s)
|
|
67
|
+
|
|
68
|
+
## Warm-cache complete
|
|
69
|
+
- Agents warmed: 14
|
|
70
|
+
- Skipped (no shared preamble import): 3 (agents/README.md not an agent; 2 agents not yet migrated to shared preamble)
|
|
71
|
+
- Duration: 4.2s
|
|
72
|
+
- Next 5 min: repeated spawns of these agents pay cached_input_per_1m rate
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Filtered example:
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
$ /gdd:warm-cache --agents design-verifier,design-planner
|
|
79
|
+
|
|
80
|
+
Warming Anthropic prompt cache for 2 agents (filtered from 14)...
|
|
81
|
+
[1/2] design-verifier ... ok (0.3s)
|
|
82
|
+
[2/2] design-planner ... ok (0.3s)
|
|
83
|
+
|
|
84
|
+
## Warm-cache complete
|
|
85
|
+
- Agents warmed: 2
|
|
86
|
+
- Filtered out by --agents: 12
|
|
87
|
+
- Duration: 0.7s
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Integration Points
|
|
91
|
+
|
|
92
|
+
- **Pre-sprint**: `/gdd:warm-cache` is the recommended first line of a `/gdd:discover`, `/gdd:plan`, or `/gdd: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.
|
|
93
|
+
- **`reference/shared-preamble.md`** (authored in Plan 10.1-04) is the load-bearing 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.
|
|
94
|
+
- **No interaction with `hooks/budget-enforcer.js`** — 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.
|
|
95
|
+
|
|
96
|
+
## Cost Model
|
|
97
|
+
|
|
98
|
+
- Each no-op Haiku ping: ~50 input tokens (shared preamble + "No-op warm: acknowledge..." system+user) + ~5 output tokens ("ok").
|
|
99
|
+
- At Haiku rates (reference/model-prices.md): `(50 / 1e6) * 1.00 + (5 / 1e6) * 5.00 = $0.00005 + $0.000025 = $0.000075` per agent.
|
|
100
|
+
- 14 agents × $0.000075 = **$0.00105** total for a full warm-cache invocation.
|
|
101
|
+
- Payback: a single subsequent Opus spawn with 40k cached input tokens saves `(40000/1e6) * (15.00 - 1.50) = $0.54`. Warm-cache pays for itself ~500× over on the first repeated planner spawn.
|
|
102
|
+
|
|
103
|
+
## Failure Modes
|
|
104
|
+
|
|
105
|
+
- Shared preamble missing → print warning, exit 0. Sprint continues without Layer A priming.
|
|
106
|
+
- Individual agent spawn fails → log, continue to next agent.
|
|
107
|
+
- 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.
|
|
108
|
+
|
|
109
|
+
## Non-Goals
|
|
110
|
+
|
|
111
|
+
- Does not touch Layer B (`.design/cache-manifest.json`). That is the cache-manager skill's territory.
|
|
112
|
+
- 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.
|
|
113
|
+
- Does not persist between Anthropic's 5-min TTL. After 5 minutes of inactivity, a re-warm is needed.
|