@hegemonart/get-design-done 1.19.6 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +4 -4
- package/.claude-plugin/plugin.json +2 -2
- package/CHANGELOG.md +60 -0
- package/README.md +12 -0
- package/agents/design-reflector.md +13 -0
- package/connections/connections.md +3 -0
- package/connections/figma.md +2 -0
- package/connections/gdd-state.md +186 -0
- package/hooks/budget-enforcer.ts +716 -0
- package/hooks/context-exhaustion.ts +251 -0
- package/hooks/gdd-read-injection-scanner.ts +172 -0
- package/hooks/hooks.json +3 -3
- package/package.json +19 -6
- package/reference/config-schema.md +2 -2
- package/reference/error-recovery.md +58 -0
- package/reference/registry.json +7 -0
- package/reference/schemas/budget.schema.json +42 -0
- package/reference/schemas/events.schema.json +55 -0
- package/reference/schemas/generated.d.ts +419 -0
- package/reference/schemas/iteration-budget.schema.json +36 -0
- package/reference/schemas/mcp-gdd-state-tools.schema.json +89 -0
- package/reference/schemas/rate-limits.schema.json +31 -0
- package/scripts/aggregate-agent-metrics.ts +282 -0
- package/scripts/codegen-schema-types.ts +149 -0
- package/scripts/lib/error-classifier.cjs +232 -0
- package/scripts/lib/error-classifier.d.cts +44 -0
- package/scripts/lib/event-stream/emitter.ts +88 -0
- package/scripts/lib/event-stream/index.ts +154 -0
- package/scripts/lib/event-stream/types.ts +127 -0
- package/scripts/lib/event-stream/writer.ts +154 -0
- package/scripts/lib/gdd-errors/classification.ts +124 -0
- package/scripts/lib/gdd-errors/index.ts +218 -0
- package/scripts/lib/gdd-state/gates.ts +216 -0
- package/scripts/lib/gdd-state/index.ts +167 -0
- package/scripts/lib/gdd-state/lockfile.ts +232 -0
- package/scripts/lib/gdd-state/mutator.ts +574 -0
- package/scripts/lib/gdd-state/parser.ts +523 -0
- package/scripts/lib/gdd-state/types.ts +179 -0
- package/scripts/lib/iteration-budget.cjs +205 -0
- package/scripts/lib/iteration-budget.d.cts +32 -0
- package/scripts/lib/jittered-backoff.cjs +112 -0
- package/scripts/lib/jittered-backoff.d.cts +38 -0
- package/scripts/lib/lockfile.cjs +177 -0
- package/scripts/lib/lockfile.d.cts +21 -0
- package/scripts/lib/prompt-sanitizer/index.ts +435 -0
- package/scripts/lib/prompt-sanitizer/patterns.ts +173 -0
- package/scripts/lib/rate-guard.cjs +365 -0
- package/scripts/lib/rate-guard.d.cts +38 -0
- package/scripts/mcp-servers/gdd-state/schemas/add_blocker.schema.json +67 -0
- package/scripts/mcp-servers/gdd-state/schemas/add_decision.schema.json +68 -0
- package/scripts/mcp-servers/gdd-state/schemas/add_must_have.schema.json +68 -0
- package/scripts/mcp-servers/gdd-state/schemas/checkpoint.schema.json +51 -0
- package/scripts/mcp-servers/gdd-state/schemas/frontmatter_update.schema.json +62 -0
- package/scripts/mcp-servers/gdd-state/schemas/get.schema.json +51 -0
- package/scripts/mcp-servers/gdd-state/schemas/probe_connections.schema.json +75 -0
- package/scripts/mcp-servers/gdd-state/schemas/resolve_blocker.schema.json +66 -0
- package/scripts/mcp-servers/gdd-state/schemas/set_status.schema.json +47 -0
- package/scripts/mcp-servers/gdd-state/schemas/transition_stage.schema.json +70 -0
- package/scripts/mcp-servers/gdd-state/schemas/update_progress.schema.json +58 -0
- package/scripts/mcp-servers/gdd-state/server.ts +288 -0
- package/scripts/mcp-servers/gdd-state/tools/add_blocker.ts +72 -0
- package/scripts/mcp-servers/gdd-state/tools/add_decision.ts +89 -0
- package/scripts/mcp-servers/gdd-state/tools/add_must_have.ts +113 -0
- package/scripts/mcp-servers/gdd-state/tools/checkpoint.ts +60 -0
- package/scripts/mcp-servers/gdd-state/tools/frontmatter_update.ts +91 -0
- package/scripts/mcp-servers/gdd-state/tools/get.ts +51 -0
- package/scripts/mcp-servers/gdd-state/tools/index.ts +51 -0
- package/scripts/mcp-servers/gdd-state/tools/probe_connections.ts +73 -0
- package/scripts/mcp-servers/gdd-state/tools/resolve_blocker.ts +84 -0
- package/scripts/mcp-servers/gdd-state/tools/set_status.ts +54 -0
- package/scripts/mcp-servers/gdd-state/tools/shared.ts +194 -0
- package/scripts/mcp-servers/gdd-state/tools/transition_stage.ts +80 -0
- package/scripts/mcp-servers/gdd-state/tools/update_progress.ts +81 -0
- package/scripts/validate-frontmatter.ts +114 -0
- package/scripts/validate-schemas.ts +401 -0
- package/skills/brief/SKILL.md +15 -6
- package/skills/design/SKILL.md +31 -13
- package/skills/explore/SKILL.md +41 -17
- package/skills/health/SKILL.md +15 -4
- package/skills/optimize/SKILL.md +3 -3
- package/skills/pause/SKILL.md +16 -10
- package/skills/plan/SKILL.md +33 -17
- package/skills/progress/SKILL.md +15 -11
- package/skills/resume/SKILL.md +19 -10
- package/skills/settings/SKILL.md +11 -3
- package/skills/todo/SKILL.md +12 -3
- package/skills/verify/SKILL.md +65 -29
- package/hooks/budget-enforcer.js +0 -329
- package/hooks/context-exhaustion.js +0 -127
- package/hooks/gdd-read-injection-scanner.js +0 -39
- package/scripts/aggregate-agent-metrics.js +0 -173
- package/scripts/validate-frontmatter.cjs +0 -68
- package/scripts/validate-schemas.cjs +0 -242
package/skills/design/SKILL.md
CHANGED
|
@@ -3,6 +3,7 @@ name: design
|
|
|
3
3
|
description: "Stage 4 of 5 — reads DESIGN-PLAN.md, spawns design-executor per task with wave coordination and parallel/sequential routing. Thin orchestrator."
|
|
4
4
|
argument-hint: "[--auto] [--parallel]"
|
|
5
5
|
user-invocable: true
|
|
6
|
+
tools: Read, Write, Bash, Grep, Glob, Task, AskUserQuestion, mcp__gdd_state__get, mcp__gdd_state__transition_stage, mcp__gdd_state__update_progress, mcp__gdd_state__set_status, mcp__gdd_state__add_blocker, mcp__gdd_state__resolve_blocker, mcp__gdd_state__checkpoint
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
# Get Design Done — Design
|
|
@@ -11,13 +12,12 @@ user-invocable: true
|
|
|
11
12
|
|
|
12
13
|
---
|
|
13
14
|
|
|
14
|
-
##
|
|
15
|
+
## Stage entry
|
|
15
16
|
|
|
16
|
-
1.
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
2. Probe `<connections>`, update `last_checkpoint`, write STATE.md.
|
|
17
|
+
1. Call `mcp__gdd_state__transition_stage` with `to: "design"`.
|
|
18
|
+
- Gate failure surfaces `error.context.blockers` to the user; do not advance.
|
|
19
|
+
- If the transition succeeds and the prior stage was already `design` with `status: in_progress`, this is a RESUME — use `task_progress` numerator as source of truth and skip tasks that already have a corresponding `.design/tasks/task-NN.md` file.
|
|
20
|
+
2. Call `mcp__gdd_state__get` → snapshot `state`; read `state.position.wave` to decide execution plan.
|
|
21
21
|
|
|
22
22
|
Abort only if `.design/DESIGN-PLAN.md` is missing:
|
|
23
23
|
> "No plan found. Run `/get-design-done:plan` first."
|
|
@@ -82,9 +82,22 @@ For each wave:
|
|
|
82
82
|
1. Read `.design/config.json` `parallelism` (or defaults from `reference/config-schema.md`).
|
|
83
83
|
2. Collect candidates in the wave; check `Touches:`, `writes:`, `parallel-safe`, and `typical-duration-seconds` fields.
|
|
84
84
|
3. Apply rules in order from `reference/parallelism-rules.md` (hard → soft). Overlapping Touches split into sequential sub-waves.
|
|
85
|
-
4.
|
|
85
|
+
4. Record the parallelism decision for this wave via `mcp__gdd_state__update_progress` with `task_progress: "<completed>/<total>"` and `status: "design_wave_<N>_parallelism: <parallel|serial>, reason=<short-reason>"` — the status string is the canonical carrier (mirrors the plan-stage convention from Plan 20-09; a dedicated tool may be added in a follow-on plan).
|
|
86
86
|
5. If `parallel`: spawn all candidates via concurrent `Task()` calls in one response. If `serial`: spawn sequentially.
|
|
87
87
|
|
|
88
|
+
### Executor prompt template (applies to every spawned design-executor)
|
|
89
|
+
|
|
90
|
+
Every spawned executor receives the following STATE.md contract in its prompt:
|
|
91
|
+
|
|
92
|
+
> **STATE.md mutation protocol** — When you complete a task in your assigned batch, update STATE.md ONLY via the `gdd-state` MCP tools. Specifically:
|
|
93
|
+
> - Report task progress: `mcp__gdd_state__update_progress` with your new `task_progress` fraction.
|
|
94
|
+
> - Add blockers: `mcp__gdd_state__add_blocker` with `{ stage: "design", date: <today>, text: "..." }`.
|
|
95
|
+
> - Resolve your own blockers on fix: `mcp__gdd_state__resolve_blocker` with the blocker id.
|
|
96
|
+
>
|
|
97
|
+
> Do NOT `Read` + `Write` `.design/STATE.md` directly — the MCP tools enforce the lockfile and emit mutation events. Direct writes corrupt parallel state.
|
|
98
|
+
|
|
99
|
+
Inline this protocol block verbatim inside every design-executor prompt in both the parallel-batch and sequential-tail spawns below. Concurrent executors (Phase 10.1 parallel mode) each emit `update_progress` calls; the lockfile (Plan 20-01) and event stream (Plan 20-06) serialize them safely.
|
|
100
|
+
|
|
88
101
|
## Step 2 — Wave-by-Wave Execution
|
|
89
102
|
|
|
90
103
|
For each Wave in order (Wave 1, Wave 2, ...):
|
|
@@ -151,7 +164,10 @@ Merging worktrees...
|
|
|
151
164
|
|
|
152
165
|
Merge each worktree branch back into the working directory. Each agent touched non-overlapping files (guaranteed by the conflict check on `Touches:` fields). If an unexpected merge conflict appears, flag it and ask the user to resolve before continuing.
|
|
153
166
|
|
|
154
|
-
|
|
167
|
+
After merge, roll up the batch's progress:
|
|
168
|
+
|
|
169
|
+
- Call `mcp__gdd_state__update_progress` with `task_progress: "<completed>/<total>"` and `status: "design_wave_<N>_parallel_batch_complete"`.
|
|
170
|
+
- Call `mcp__gdd_state__checkpoint` — records the wave boundary in `<timestamps>` and bumps `last_checkpoint`.
|
|
155
171
|
|
|
156
172
|
### Sequential tail (Parallel: false tasks, or all tasks if `parallel_mode=false`)
|
|
157
173
|
|
|
@@ -195,7 +211,9 @@ Emit `## EXECUTION COMPLETE` when done.
|
|
|
195
211
|
""", subagent_type="design-executor")
|
|
196
212
|
```
|
|
197
213
|
|
|
198
|
-
|
|
214
|
+
After each task completes, call `mcp__gdd_state__update_progress` with the new `task_progress: "<completed>/<total>"` and `status: "design_wave_<N>_task_<NN>_complete"`.
|
|
215
|
+
|
|
216
|
+
After the final sequential task of the wave, call `mcp__gdd_state__checkpoint` — records the wave boundary in `<timestamps>` and bumps `last_checkpoint`.
|
|
199
217
|
|
|
200
218
|
---
|
|
201
219
|
|
|
@@ -220,17 +238,17 @@ Skip checkpoint if `auto_mode=true`.
|
|
|
220
238
|
|
|
221
239
|
After each wave, check task-NN.md files for `status: deviation`. If any found:
|
|
222
240
|
|
|
223
|
-
-
|
|
241
|
+
- Call `mcp__gdd_state__get` → read `state.blockers`; present affected task IDs and their blocker descriptions from the returned snapshot.
|
|
224
242
|
- Offer: (a) stop stage, (b) continue remaining tasks
|
|
225
243
|
- In `auto_mode`: continue automatically, log all deviations
|
|
244
|
+
- When a blocker is addressed (fix committed by a follow-up task), call `mcp__gdd_state__resolve_blocker` with the blocker id to clear it from the live state.
|
|
226
245
|
|
|
227
246
|
---
|
|
228
247
|
|
|
229
248
|
## State Update (exit)
|
|
230
249
|
|
|
231
|
-
1.
|
|
232
|
-
2.
|
|
233
|
-
3. Write STATE.md.
|
|
250
|
+
1. Call `mcp__gdd_state__set_status` with `status: "design_complete"` — marks the stage completed without transitioning; verify calls `transition_stage` on its entry, keeping the transition atomic with the owning stage.
|
|
251
|
+
2. Call `mcp__gdd_state__checkpoint` — stamps `last_checkpoint` and appends a `design_completed_at` entry to `<timestamps>`.
|
|
234
252
|
|
|
235
253
|
---
|
|
236
254
|
|
package/skills/explore/SKILL.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: gdd-explore
|
|
3
3
|
description: "Codebase inventory + design context — runs scan patterns and design-discussant interview, produces DESIGN.md + DESIGN-DEBT.md + DESIGN-CONTEXT.md (Stage 2 of 5)"
|
|
4
4
|
argument-hint: "[--skip-interview] [--skip-scan]"
|
|
5
|
-
tools: Read, Write, Bash, Grep, Glob, Task, AskUserQuestion
|
|
5
|
+
tools: Read, Write, Bash, Grep, Glob, Task, AskUserQuestion, mcp__gdd_state__get, mcp__gdd_state__transition_stage, mcp__gdd_state__probe_connections, mcp__gdd_state__update_progress, mcp__gdd_state__set_status, mcp__gdd_state__add_blocker, mcp__gdd_state__checkpoint, mcp__gdd_state__add_decision
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Get Design Done — Explore
|
|
@@ -13,9 +13,18 @@ tools: Read, Write, Bash, Grep, Glob, Task, AskUserQuestion
|
|
|
13
13
|
|
|
14
14
|
---
|
|
15
15
|
|
|
16
|
+
## Stage entry
|
|
17
|
+
|
|
18
|
+
All STATE.md persistence in this skill goes through `gdd-state` MCP tools — no direct edits. The skill writes to `.design/STATE.md` (connections, decisions, progress, checkpoint) via those tools, and to plain design docs (listed above) via `Write`.
|
|
19
|
+
|
|
20
|
+
1. Call `mcp__gdd_state__transition_stage` with `to: "explore"`.
|
|
21
|
+
- On success: proceed to probes.
|
|
22
|
+
- On gate failure: emit blockers to the user (do not advance). Each blocker is a line in the `error.context.blockers` array; print them verbatim.
|
|
23
|
+
2. Call `mcp__gdd_state__get` with no arguments — snapshot the parsed state into a local `state` variable for downstream steps.
|
|
24
|
+
|
|
16
25
|
## Step 1 — Connection probe
|
|
17
26
|
|
|
18
|
-
Probe connection availability
|
|
27
|
+
Probe connection availability (the batched write lands at the end of this step — see "Commit probe results" below):
|
|
19
28
|
|
|
20
29
|
**A — Figma probe (variant-agnostic):**
|
|
21
30
|
```
|
|
@@ -68,11 +77,27 @@ Empty → pencil-dev: not_configured
|
|
|
68
77
|
Found → pencil-dev: available
|
|
69
78
|
```
|
|
70
79
|
|
|
71
|
-
|
|
80
|
+
## Commit probe results
|
|
81
|
+
|
|
82
|
+
After all probes complete, commit results in a single call:
|
|
83
|
+
|
|
84
|
+
`mcp__gdd_state__probe_connections` with `probe_results` = an array of `{ name, status }` entries — one per probed connection. Example:
|
|
85
|
+
|
|
86
|
+
```json
|
|
87
|
+
{
|
|
88
|
+
"probe_results": [
|
|
89
|
+
{ "name": "figma", "status": "available" },
|
|
90
|
+
{ "name": "refero", "status": "not_configured" },
|
|
91
|
+
{ "name": "preview", "status": "unavailable" }
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Unspecified connections keep their existing value. Do NOT issue multiple `probe_connections` calls — the tool is designed for a single batch write per stage.
|
|
72
97
|
|
|
73
98
|
## Step 1.5 — 21st.dev Prior-Art Check (when 21st-dev: available)
|
|
74
99
|
|
|
75
|
-
If `21st-dev
|
|
100
|
+
If `state.connections.21st-dev === "not_configured"` (from the snapshot captured at stage entry): skip this step entirely.
|
|
76
101
|
|
|
77
102
|
When the explore stage identifies any greenfield component in scope (component name from BRIEF.md or user request that does not yet have an implementation file):
|
|
78
103
|
|
|
@@ -101,7 +126,7 @@ If no greenfield components in scope: skip this step.
|
|
|
101
126
|
**Parallelism decision (before any multi-agent spawn):**
|
|
102
127
|
1. Read `.design/config.json` `parallelism` (or defaults from `reference/config-schema.md`).
|
|
103
128
|
2. Apply rules from `reference/parallelism-rules.md` (hard → soft).
|
|
104
|
-
3.
|
|
129
|
+
3. Record the verdict via `mcp__gdd_state__set_status` with a short status label (e.g., `status: "explore_parallel"` or `"explore_serial"`) carrying the stage/verdict/reason/agents payload.
|
|
105
130
|
4. If verdict is `parallel`, dispatch via multiple `Task()` calls in one response; if `serial`, spawn sequentially.
|
|
106
131
|
|
|
107
132
|
Run the canonical scan grep/glob inventory (preserves PLAT-01/02 POSIX ERE patterns from Phase 1):
|
|
@@ -117,11 +142,11 @@ Write findings to:
|
|
|
117
142
|
- `.design/DESIGN.md` — current design system inventory + baseline score
|
|
118
143
|
- `.design/DESIGN-DEBT.md` — prioritized debt roadmap
|
|
119
144
|
|
|
120
|
-
|
|
145
|
+
Record scan progress: call `mcp__gdd_state__update_progress` with `task_progress: "<completed>/<total>"` to reflect the scan pass.
|
|
121
146
|
|
|
122
147
|
## Step 2.5 — Detect prior sketches and project-local conventions
|
|
123
148
|
|
|
124
|
-
**Sketches**: If `.design/sketches/` exists, list all sketch slugs — group by those with `WINNER.md` (completed wrap-ups) vs without (pending).
|
|
149
|
+
**Sketches**: If `.design/sketches/` exists, list all sketch slugs — group by those with `WINNER.md` (completed wrap-ups) vs without (pending). Call `mcp__gdd_state__set_status` with a brief note (e.g., `status: "explore_sketches_present"`) so downstream stages see the history. Include the inventory in DESIGN.md under a "Prior Explorations" section.
|
|
125
150
|
|
|
126
151
|
**Project-local skills**: Read any `./.claude/skills/design-*-conventions.md` files if present. Include their content in DESIGN-CONTEXT.md under a `<project_conventions>` section — these are codified decisions from prior `/gdd:sketch-wrap-up` runs or manual edits, and they override defaults.
|
|
127
152
|
|
|
@@ -134,13 +159,13 @@ Mark STATE.md `task_progress` for the scan pass.
|
|
|
134
159
|
### 3.a — Pre-load context
|
|
135
160
|
|
|
136
161
|
Read in this order:
|
|
137
|
-
1.
|
|
162
|
+
1. `state.decisions` from the snapshot captured at stage entry — existing D-XX entries (do NOT re-ask anything covered). If the snapshot is stale, refresh by calling `mcp__gdd_state__get`.
|
|
138
163
|
2. `.design/BRIEF.md` — problem statement, audience, constraints
|
|
139
164
|
3. `.design/DESIGN.md` — auto-detected inventory from Step 2
|
|
140
165
|
4. `.design/DESIGN-CONTEXT.md` if it exists — `<gray_areas>` block lists unresolved topics
|
|
141
166
|
5. `./.claude/skills/design-*-conventions.md` if any — locked project conventions, treat as authoritative
|
|
142
167
|
|
|
143
|
-
If
|
|
168
|
+
If `state.connections` shows `figma: available`, read the resolved `prefix=` from the same entry and call `{prefix}get_variable_defs`, then draft tentative D-XX entries (mark `(tentative — confirm with user)`) before asking.
|
|
144
169
|
|
|
145
170
|
### 3.b — Identify question set
|
|
146
171
|
|
|
@@ -164,27 +189,26 @@ Reject generic answers ("modern", "clean", "professional"). If the answer is vag
|
|
|
164
189
|
### 3.d — Record after each answer
|
|
165
190
|
|
|
166
191
|
After each confirmed answer:
|
|
167
|
-
1.
|
|
192
|
+
1. Call `mcp__gdd_state__add_decision` with the decision payload. The tool assigns the next `D-NN` id and persists atomically. Format the summary as:
|
|
168
193
|
```
|
|
169
|
-
|
|
194
|
+
[Category] Decision summary — short rationale
|
|
170
195
|
```
|
|
171
196
|
2. Append one JSON line to `.design/learnings/question-quality.jsonl` (create if absent):
|
|
172
197
|
```json
|
|
173
198
|
{"ts":"<iso>","question_id":"Q-NN","question_text":"<verbatim>","answer_summary":"<one sentence>","quality":"high|medium|low|skipped","evidence":"<why>","cycle":"<active-cycle-slug>"}
|
|
174
199
|
```
|
|
175
200
|
Quality classification: `skipped` if user picked Skip / "doesn't matter"; `low` if < 10 words and not a specific value; `medium` if hedged ("maybe", "I think", "not sure"); `high` otherwise.
|
|
176
|
-
3.
|
|
201
|
+
3. `add_decision` commits incrementally — the decision survives a crash mid-interview without an explicit save step.
|
|
177
202
|
|
|
178
203
|
### 3.e — Produce DESIGN-CONTEXT.md
|
|
179
204
|
|
|
180
205
|
When all questions are answered, write `.design/DESIGN-CONTEXT.md` summarizing the locked decisions, remaining gray areas, and any Figma-sourced tentatives that were confirmed or rejected. Set frontmatter `status: complete`.
|
|
181
206
|
|
|
182
|
-
## Step 4 —
|
|
207
|
+
## Step 4 — Close out explore
|
|
183
208
|
|
|
184
|
-
-
|
|
185
|
-
-
|
|
186
|
-
-
|
|
187
|
-
- Update `last_checkpoint`. Write STATE.md.
|
|
209
|
+
- If the synthesizer (or equivalent mapper batch) ran in Step 2, call `mcp__gdd_state__update_progress` with `task_progress: "<mappers-completed>/<mappers-total>"` and `status: "explore_mappers_done"` before advancing.
|
|
210
|
+
- Call `mcp__gdd_state__checkpoint` — bumps `frontmatter.last_checkpoint` + appends a timestamp entry.
|
|
211
|
+
- Stage advance to `plan` happens at the next stage's entry (the plan skill will transition from its own entry step); do not edit frontmatter directly from this skill.
|
|
188
212
|
|
|
189
213
|
## After Writing
|
|
190
214
|
|
package/skills/health/SKILL.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gdd-health
|
|
3
3
|
description: "Reports .design/ artifact health — staleness, missing files, token drift, broken state transitions."
|
|
4
|
-
tools: Read, Bash, Glob, Grep
|
|
4
|
+
tools: Read, Bash, Glob, Grep, mcp__gdd_state__get
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# /gdd:health
|
|
@@ -11,7 +11,7 @@ tools: Read, Bash, Glob, Grep
|
|
|
11
11
|
## Checks
|
|
12
12
|
|
|
13
13
|
1. **Artifact inventory** — `ls -la .design/*.md` with size and mtime. Print a table.
|
|
14
|
-
2. **Missing expected artifacts** — by `stage
|
|
14
|
+
2. **Missing expected artifacts** — by `stage` field from the `mcp__gdd_state__get` snapshot:
|
|
15
15
|
- `brief` expects BRIEF.md
|
|
16
16
|
- `explore` expects DESIGN.md, DESIGN-DEBT.md, DESIGN-CONTEXT.md
|
|
17
17
|
- `plan` expects DESIGN-PLAN.md
|
|
@@ -20,9 +20,16 @@ tools: Read, Bash, Glob, Grep
|
|
|
20
20
|
FAIL per missing.
|
|
21
21
|
3. **Token drift** — `wc -c .design/DESIGN.md .design/DESIGN-CONTEXT.md`; approx tokens = bytes/4. WARN if combined >40000.
|
|
22
22
|
4. **Aged DESIGN-DEBT** — items in `.design/DESIGN-DEBT.md` not touched in >14 days (file mtime). WARN.
|
|
23
|
-
5. **Broken state transitions** —
|
|
23
|
+
5. **Broken state transitions** — `stage` field from the snapshot inconsistent with artifacts present (e.g. stage=`verify` but DESIGN-SUMMARY.md missing). FAIL.
|
|
24
24
|
6. **Pending sketch/spike wrap-ups** — any `.design/sketches/*` or `.design/spikes/*` directory lacking a SUMMARY.md. WARN.
|
|
25
|
-
7. **Seed germination** — scan `.design/SEEDS.md` (if present) for seeds whose trigger keywords match
|
|
25
|
+
7. **Seed germination** — scan `.design/SEEDS.md` (if present) for seeds whose trigger keywords match the snapshot or CYCLES.md content. List as "Seed ready: <text>".
|
|
26
|
+
|
|
27
|
+
## State snapshot
|
|
28
|
+
|
|
29
|
+
Call `mcp__gdd_state__get` once at the start to pull the snapshot used by checks 2, 5, and 7. Aggregate health math stays prose-level:
|
|
30
|
+
- Count available connections from `<connections>`.
|
|
31
|
+
- Count open blockers from `<blockers>` where `resolved` is absent.
|
|
32
|
+
- Count pending must-haves from `<must_haves>` where `status: "pending"`.
|
|
26
33
|
|
|
27
34
|
## Output
|
|
28
35
|
|
|
@@ -55,4 +62,8 @@ After the health table, emit the plugin-update banner if one is present:
|
|
|
55
62
|
|
|
56
63
|
Written by `hooks/update-check.sh`; suppressed mid-pipeline and when the latest release is dismissed.
|
|
57
64
|
|
|
65
|
+
## Do Not
|
|
66
|
+
|
|
67
|
+
- Do not mutate STATE.md — this skill is read-only. Only `mcp__gdd_state__get` is permitted.
|
|
68
|
+
|
|
58
69
|
## HEALTH COMPLETE
|
package/skills/optimize/SKILL.md
CHANGED
|
@@ -19,7 +19,7 @@ This skill is **advisory only**. It never edits `agents/*.md`, `.design/budget.j
|
|
|
19
19
|
Before analysis, invoke the aggregator to ensure metrics are current:
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
node scripts/aggregate-agent-metrics.
|
|
22
|
+
node --experimental-strip-types scripts/aggregate-agent-metrics.ts
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
This is idempotent. If `--refresh` flag is absent and `.design/agent-metrics.json` was generated within the last 60 seconds, the skill may skip this step.
|
|
@@ -27,7 +27,7 @@ This is idempotent. If `--refresh` flag is absent and `.design/agent-metrics.jso
|
|
|
27
27
|
## Inputs
|
|
28
28
|
|
|
29
29
|
- `.design/telemetry/costs.jsonl` — append-only; skill reads tail. Tolerant of malformed lines.
|
|
30
|
-
- `.design/agent-metrics.json` — per-agent aggregate produced by `scripts/aggregate-agent-metrics.
|
|
30
|
+
- `.design/agent-metrics.json` — per-agent aggregate produced by `scripts/aggregate-agent-metrics.ts`. Source of truth for `cache_hit_rate`, `lazy_skip_rate`, `total_cost_usd`, `total_spawns`.
|
|
31
31
|
- `agents/*.md` — frontmatter cross-reference when checking tier override churn + typical-duration drift.
|
|
32
32
|
- `.design/budget.json` — `tier_overrides` table for cross-check (optional; proceed if missing).
|
|
33
33
|
|
|
@@ -116,5 +116,5 @@ The Phase 11 reflector (`agents/design-reflector.md`) reads both `costs.jsonl` a
|
|
|
116
116
|
## Failure Modes
|
|
117
117
|
|
|
118
118
|
- Missing `.design/telemetry/costs.jsonl` → emit a single line `"No telemetry data yet — run one or more /gdd:* commands to accumulate data, then retry."` and still write the `## OPTIMIZE COMPLETE` marker.
|
|
119
|
-
- Missing `.design/agent-metrics.json` after refresh → emit `"Aggregator failed — check \`node scripts/aggregate-agent-metrics.
|
|
119
|
+
- Missing `.design/agent-metrics.json` after refresh → emit `"Aggregator failed — check \`node --experimental-strip-types scripts/aggregate-agent-metrics.ts\` output manually."`.
|
|
120
120
|
- Zero rules matched → still write the recommendations file with `"No recommendations — all agents within healthy thresholds."` and the `## OPTIMIZE COMPLETE` marker.
|
package/skills/pause/SKILL.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: gdd-pause
|
|
3
3
|
description: "Write a numbered checkpoint so work can resume in a new session without re-running completed stages."
|
|
4
4
|
argument-hint: "[context note]"
|
|
5
|
-
tools: Read, Write, Bash, AskUserQuestion
|
|
5
|
+
tools: Read, Write, Bash, AskUserQuestion, mcp__gdd_state__get, mcp__gdd_state__set_status, mcp__gdd_state__add_blocker, mcp__gdd_state__checkpoint
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
@reference/retrieval-contract.md
|
|
@@ -16,11 +16,11 @@ Each invocation writes an **immutable numbered checkpoint** — it does not over
|
|
|
16
16
|
|
|
17
17
|
## Steps
|
|
18
18
|
|
|
19
|
-
1.
|
|
20
|
-
- `stage
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
- Open todos (
|
|
19
|
+
1. `mcp__gdd_state__get` → snapshot current pipeline state. Extract:
|
|
20
|
+
- Current `stage` and `cycle`
|
|
21
|
+
- `last_checkpoint` timestamp
|
|
22
|
+
- `task_progress` and `status` for the current run
|
|
23
|
+
- Open todos (from `.design/TODO.md` if present — this file is outside the MCP catalog, so `Read` is still used)
|
|
24
24
|
- Active sketch/spike directories (scan `.design/sketches/` and `.design/spikes/` for in-progress markers)
|
|
25
25
|
|
|
26
26
|
2. **Determine checkpoint number**: run
|
|
@@ -32,7 +32,12 @@ Each invocation writes an **immutable numbered checkpoint** — it does not over
|
|
|
32
32
|
3. **Collect context**: if no context argument was passed, ask (AskUserQuestion):
|
|
33
33
|
"What are you in the middle of? (optional context to capture)"
|
|
34
34
|
|
|
35
|
-
4. **
|
|
35
|
+
4. **Flip status via MCP** so `/gdd:resume` can detect the pause and recover the prior status:
|
|
36
|
+
1. `mcp__gdd_state__set_status` with `status: "paused:<prior-status>"` — the `paused:` prefix preserves the prior status for resume parsing.
|
|
37
|
+
2. If the user supplied a context/blocker message: `mcp__gdd_state__add_blocker` with `{ stage: <current>, date: <today>, text: <message> }`.
|
|
38
|
+
3. `mcp__gdd_state__checkpoint` to stamp `last_checkpoint` via MCP.
|
|
39
|
+
|
|
40
|
+
5. **Write numbered checkpoint**: create `.design/checkpoints/` with `mkdir -p`, then write:
|
|
36
41
|
```
|
|
37
42
|
.design/checkpoints/NN-<stage>-<ISO-date>.md
|
|
38
43
|
```
|
|
@@ -52,19 +57,20 @@ Each invocation writes an **immutable numbered checkpoint** — it does not over
|
|
|
52
57
|
**Completed this session**: <list>
|
|
53
58
|
```
|
|
54
59
|
|
|
55
|
-
|
|
60
|
+
6. **Update HANDOFF.md pointer**: write `.design/HANDOFF.md` with:
|
|
56
61
|
```markdown
|
|
57
62
|
# Session Handoff (pointer)
|
|
58
63
|
Latest checkpoint: `.design/checkpoints/NN-<stage>-<ISO-date>.md`
|
|
59
64
|
Run `/gdd:resume` to restore, or `/gdd:resume N` for a specific checkpoint.
|
|
60
65
|
```
|
|
61
66
|
|
|
62
|
-
|
|
67
|
+
7. Print: "Checkpoint NN saved. Run `/gdd:resume` or `/gdd:continue` to pick back up."
|
|
63
68
|
|
|
64
69
|
## Do Not
|
|
65
70
|
|
|
66
|
-
- Do not
|
|
71
|
+
- Do not mutate STATE.md directly — all STATE.md writes go through the `gdd-state` MCP tools above. Checkpoint files + HANDOFF.md are sibling artifacts, written with `Write`.
|
|
67
72
|
- Do not abort in-progress sketches; just record them.
|
|
68
73
|
- Do not delete previous checkpoint files.
|
|
74
|
+
- Do not call `mcp__gdd_state__transition_stage` — pause is status-only, never a stage transition.
|
|
69
75
|
|
|
70
76
|
## PAUSE COMPLETE
|
package/skills/plan/SKILL.md
CHANGED
|
@@ -3,20 +3,18 @@ name: plan
|
|
|
3
3
|
description: "Stage 3 of 5 — reads DESIGN-CONTEXT.md, spawns design-phase-researcher (optional) + design-planner + design-plan-checker, writes DESIGN-PLAN.md. Thin orchestrator."
|
|
4
4
|
argument-hint: "[--auto] [--parallel]"
|
|
5
5
|
user-invocable: true
|
|
6
|
+
tools: Read, Write, Bash, Glob, Task, AskUserQuestion, ToolSearch, mcp__gdd_state__get, mcp__gdd_state__transition_stage, mcp__gdd_state__add_decision, mcp__gdd_state__add_must_have, mcp__gdd_state__update_progress, mcp__gdd_state__set_status, mcp__gdd_state__add_blocker, mcp__gdd_state__checkpoint
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
# Get Design Done — Plan
|
|
9
10
|
|
|
10
11
|
**Stage 3 of 5** in the get-design-done pipeline. Thin orchestrator. All planning intelligence lives in agents/design-planner.md.
|
|
11
12
|
|
|
12
|
-
##
|
|
13
|
+
## Stage entry
|
|
13
14
|
|
|
14
|
-
1.
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
- Otherwise: normal transition — set frontmatter stage=plan, `<position>` stage=plan, status=in_progress, task_progress=0/3.
|
|
18
|
-
2. Update `<connections>` by probing MCP availability (figma, refero).
|
|
19
|
-
3. Update last_checkpoint. Write STATE.md.
|
|
15
|
+
1. `mcp__gdd_state__transition_stage` with `to: "plan"`.
|
|
16
|
+
- Gate failure surfaces `error.context.blockers` to the user; do not advance.
|
|
17
|
+
2. `mcp__gdd_state__get` → snapshot `state`. Use this snapshot for `<position>`, `<connections>`, `<must_haves>`, `<blockers>`, `<decisions>` in the current stage; do not re-read STATE.md directly.
|
|
20
18
|
|
|
21
19
|
Abort with a clear error only if the user is trying to plan without DESIGN-CONTEXT.md — that is the true prerequisite, not STATE.md.
|
|
22
20
|
|
|
@@ -31,7 +29,11 @@ Parse $ARGUMENTS:
|
|
|
31
29
|
- Read `.design/config.json` `parallelism` (or defaults from `reference/config-schema.md`).
|
|
32
30
|
- Apply rules from `reference/parallelism-rules.md`.
|
|
33
31
|
- Plan's pipeline is inherently sequential (researcher → pattern-mapper → planner → checker). Expected verdict: **serial** (rule 1).
|
|
34
|
-
|
|
32
|
+
|
|
33
|
+
<!-- Parallelism decision is currently carried as the status string of an update_progress call. A dedicated tool may be added in a follow-on plan; until then, the status string is the canonical carrier. -->
|
|
34
|
+
|
|
35
|
+
After the parallelism decision is made:
|
|
36
|
+
- Call `mcp__gdd_state__update_progress` with `task_progress: "<current>/<total>"` and `status: "plan_parallelism_decided: batch_size=<N>, reason=<short-reason>"`.
|
|
35
37
|
|
|
36
38
|
## Probe Chromatic connection
|
|
37
39
|
|
|
@@ -48,7 +50,8 @@ Step C2 — Token check:
|
|
|
48
50
|
→ false → chromatic: unavailable
|
|
49
51
|
|
|
50
52
|
Also check: if storybook: not_configured → chromatic effectively unavailable (emit note, do not run).
|
|
51
|
-
|
|
53
|
+
|
|
54
|
+
Write chromatic status to STATE.md `<connections>` via `mcp__gdd_state__probe_connections` — pass the single-entry probe result (`[{ name: "chromatic", status: "<verdict>" }]`). Do not edit `<connections>` directly.
|
|
52
55
|
|
|
53
56
|
## Chromatic Change-Risk Scoping (when chromatic: available)
|
|
54
57
|
|
|
@@ -82,7 +85,7 @@ Emit `## RESEARCH COMPLETE` when done.
|
|
|
82
85
|
""")
|
|
83
86
|
```
|
|
84
87
|
|
|
85
|
-
Wait for `## RESEARCH COMPLETE`.
|
|
88
|
+
Wait for `## RESEARCH COMPLETE`. Call `mcp__gdd_state__update_progress` with `task_progress: "1/3"` and a short `status` summary.
|
|
86
89
|
|
|
87
90
|
## Step 1.5 — Pattern Mapping (mandatory, brownfield protection)
|
|
88
91
|
|
|
@@ -104,7 +107,7 @@ Emit `## MAPPING COMPLETE` when done.
|
|
|
104
107
|
""")
|
|
105
108
|
```
|
|
106
109
|
|
|
107
|
-
Wait for `## MAPPING COMPLETE`.
|
|
110
|
+
Wait for `## MAPPING COMPLETE`. Call `mcp__gdd_state__update_progress` with `task_progress: "1/3"` and a short `status` summary.
|
|
108
111
|
|
|
109
112
|
## Step 1.6 — Assumptions Analysis (optional, same flag as research)
|
|
110
113
|
|
|
@@ -145,6 +148,18 @@ Wait for `## SYNTHESIS COMPLETE`. Write to `.design/DESIGN-PREPLAN-BRIEF.md` (ov
|
|
|
145
148
|
|
|
146
149
|
**Parallel synthesizer note (future):** if a future plan variant spawns N parallel phase-researchers (e.g., one per project-type family), wire synthesize the same way as `skills/map/` Step 3.5.
|
|
147
150
|
|
|
151
|
+
## Research-synthesis persistence (decisions + must-haves)
|
|
152
|
+
|
|
153
|
+
When the synthesizer (design-phase-researcher / design-pattern-mapper / design-assumptions-analyzer) produces D-XX decisions and M-XX must-haves, persist each one through MCP instead of editing STATE.md directly.
|
|
154
|
+
|
|
155
|
+
For each D-XX decision the synthesizer produces:
|
|
156
|
+
- Call `mcp__gdd_state__add_decision` with `{ id: "D-XX", text: "...", status: "locked"|"tentative" }`.
|
|
157
|
+
|
|
158
|
+
For each M-XX must-have the synthesizer produces:
|
|
159
|
+
- Call `mcp__gdd_state__add_must_have` with `{ id: "M-XX", text: "...", status: "pending" }`.
|
|
160
|
+
|
|
161
|
+
Issue these sequentially. Each call is event-emitting and lockfile-safe. Parallel issuance would serialize on the STATE.md lockfile with no throughput gain.
|
|
162
|
+
|
|
148
163
|
## Step 2 — Plan
|
|
149
164
|
|
|
150
165
|
```
|
|
@@ -178,7 +193,7 @@ Emit `## PLANNING COMPLETE` when done.
|
|
|
178
193
|
""")
|
|
179
194
|
```
|
|
180
195
|
|
|
181
|
-
Wait for `## PLANNING COMPLETE`.
|
|
196
|
+
Wait for `## PLANNING COMPLETE`. Call `mcp__gdd_state__update_progress` with `task_progress: "2/3"` and a short `status` summary.
|
|
182
197
|
|
|
183
198
|
## Step 3 — Check
|
|
184
199
|
|
|
@@ -204,17 +219,18 @@ Emit `## PLAN CHECK COMPLETE` when done.
|
|
|
204
219
|
""")
|
|
205
220
|
```
|
|
206
221
|
|
|
207
|
-
Wait for `## PLAN CHECK COMPLETE`.
|
|
222
|
+
Wait for `## PLAN CHECK COMPLETE`. Call `mcp__gdd_state__update_progress` with `task_progress: "3/3"` and a short `status` summary.
|
|
208
223
|
|
|
209
224
|
If `## PLAN CHECK RESULT: ISSUES FOUND` and any BLOCKER issues:
|
|
210
225
|
- Present issues to user and offer: (a) revise plan now — re-spawn design-planner with issue list, (b) accept and proceed, (c) abort.
|
|
211
226
|
- If auto_mode: auto-accept WARNING issues, abort on BLOCKER issues.
|
|
212
227
|
|
|
213
|
-
##
|
|
228
|
+
## Stage exit
|
|
229
|
+
|
|
230
|
+
1. Call `mcp__gdd_state__set_status` with `status: "plan_complete"`.
|
|
231
|
+
2. Call `mcp__gdd_state__checkpoint` to stamp `last_checkpoint` and finalize the plan stage.
|
|
214
232
|
|
|
215
|
-
|
|
216
|
-
2. Set `<timestamps>` plan_completed_at=now.
|
|
217
|
-
3. Update last_checkpoint. Write STATE.md.
|
|
233
|
+
The next stage (design) calls `mcp__gdd_state__transition_stage` on entry — this skill does NOT issue the transition itself, preserving the stage-owned-transition discipline established by brief→explore and explore→plan.
|
|
218
234
|
|
|
219
235
|
## After Completion
|
|
220
236
|
|
package/skills/progress/SKILL.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: gdd-progress
|
|
3
3
|
description: "Shows current pipeline position and routes to next action. --forensic runs 6-check integrity audit."
|
|
4
4
|
argument-hint: "[--forensic]"
|
|
5
|
-
tools: Read, Bash, Grep, Glob
|
|
5
|
+
tools: Read, Bash, Grep, Glob, mcp__gdd_state__get
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
@reference/retrieval-contract.md
|
|
@@ -13,12 +13,12 @@ tools: Read, Bash, Grep, Glob
|
|
|
13
13
|
|
|
14
14
|
## Step 1 — Read state
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
- `stage
|
|
18
|
-
-
|
|
19
|
-
-
|
|
16
|
+
Call `mcp__gdd_state__get` → parsed state object. Extract:
|
|
17
|
+
- `stage`, `cycle`, `last_checkpoint`
|
|
18
|
+
- `task_progress`, `status` (from `<position>`)
|
|
19
|
+
- `decisions.length`, open todos from `.design/TODO.md` (count unchecked `- [ ]` — this file is outside the MCP catalog, so `Read` is still used)
|
|
20
20
|
|
|
21
|
-
If STATE.md
|
|
21
|
+
If `mcp__gdd_state__get` returns a "STATE.md missing" error, print: "No pipeline state. Run `/gdd:brief` first." and stop.
|
|
22
22
|
|
|
23
23
|
## Step 2 — Default output
|
|
24
24
|
|
|
@@ -35,7 +35,7 @@ Recommend next stage via the same logic as `/gdd:next` (route by which artifacts
|
|
|
35
35
|
|
|
36
36
|
### First-run connection nudge
|
|
37
37
|
|
|
38
|
-
After the pipeline state block, check
|
|
38
|
+
After the pipeline state block, check the `<connections>` field from the `mcp__gdd_state__get` snapshot. If every entry is `not_configured` AND `.design/config.json > connections_onboarding` is absent (user has never run the wizard), append once:
|
|
39
39
|
|
|
40
40
|
```
|
|
41
41
|
Tip: run /gdd:connections to see what integrations can plug in (Figma, Storybook, Chromatic, etc.).
|
|
@@ -48,13 +48,13 @@ Suppress the nudge on subsequent invocations in the same session (track via a tr
|
|
|
48
48
|
Run these six checks and print PASS/WARN/FAIL per check:
|
|
49
49
|
|
|
50
50
|
1. **Stale artifacts** — compare mtime of `.design/DESIGN.md` against most recent file under `src/` via `ls -lt`. WARN if DESIGN.md is older by >7 days.
|
|
51
|
-
2. **Missing transitions** —
|
|
51
|
+
2. **Missing transitions** — `stage` from the `mcp__gdd_state__get` snapshot vs artifacts present. e.g. stage=`plan` requires DESIGN-CONTEXT.md. FAIL if expected artifact missing.
|
|
52
52
|
3. **Token drift** — `wc -c .design/DESIGN.md .design/DESIGN-CONTEXT.md`; tokens ≈ bytes/4. WARN if combined >50000 tokens.
|
|
53
53
|
4. **Aged DESIGN-DEBT** — read `.design/DESIGN-DEBT.md`; any item whose line predates HEAD by >14 days (check `git blame` or file mtime fallback) → WARN.
|
|
54
|
-
5. **Cycle alignment** — if `cycle
|
|
55
|
-
6. **Connection status** — re-probe figma/refero via ToolSearch; compare to
|
|
54
|
+
5. **Cycle alignment** — if `cycle` from the snapshot is set but `.design/CYCLES.md` has no matching heading → FAIL.
|
|
55
|
+
6. **Connection status** — re-probe figma/refero via ToolSearch; compare to the `<connections>` field in the snapshot. WARN on mismatch.
|
|
56
56
|
|
|
57
|
-
Also scan `.design/SEEDS.md` (if present) for seeds whose trigger keywords match
|
|
57
|
+
Also scan `.design/SEEDS.md` (if present) for seeds whose trigger keywords match the snapshot or CYCLES.md content; list them as "Seed ready to germinate: <text>".
|
|
58
58
|
|
|
59
59
|
Print:
|
|
60
60
|
```
|
|
@@ -79,4 +79,8 @@ After printing the pipeline state, emit the plugin-update banner if one is prese
|
|
|
79
79
|
|
|
80
80
|
No-op when: no new release exists, state-machine guard is active (stage in plan|design|verify), or the latest tag has been dismissed via `/gdd:check-update --dismiss`.
|
|
81
81
|
|
|
82
|
+
## Do Not
|
|
83
|
+
|
|
84
|
+
- Do not mutate STATE.md — this skill is read-only. Only `mcp__gdd_state__get` is permitted.
|
|
85
|
+
|
|
82
86
|
## PROGRESS COMPLETE
|
package/skills/resume/SKILL.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: gdd-resume
|
|
3
3
|
description: "Restore session context from a numbered checkpoint. Lists available checkpoints when no argument given."
|
|
4
4
|
argument-hint: "[<N>]"
|
|
5
|
-
tools: Read, Write, Bash, Glob, AskUserQuestion
|
|
5
|
+
tools: Read, Write, Bash, Glob, AskUserQuestion, mcp__gdd_state__get, mcp__gdd_state__set_status, mcp__gdd_state__resolve_blocker, mcp__gdd_state__checkpoint
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
@reference/retrieval-contract.md
|
|
@@ -29,7 +29,15 @@ Inverse of `/gdd:pause`. Reads a checkpoint file, prints a clear "you were here"
|
|
|
29
29
|
|
|
30
30
|
3. **Read checkpoint**: load `.design/checkpoints/NN-*.md`. If not found, try `.design/HANDOFF.md` as legacy fallback.
|
|
31
31
|
|
|
32
|
-
4. **
|
|
32
|
+
4. **Check paused status via MCP**: call `mcp__gdd_state__get` and inspect `status`. If it does **not** start with `paused:`, print "No pause to resume" and exit — the prior session was not paused via `/gdd:pause`, so there is nothing to restore.
|
|
33
|
+
|
|
34
|
+
5. **Restore prior status via MCP**: parse the prior status from the `paused:<prior>` prefix. Call `mcp__gdd_state__set_status` with `status: <prior>` to restore the pre-pause state.
|
|
35
|
+
|
|
36
|
+
6. **Clear the pause blocker**: optionally call `mcp__gdd_state__resolve_blocker` to clear the pause-related blocker (match by text containing "paused"). Skip if no such blocker exists.
|
|
37
|
+
|
|
38
|
+
7. **Stamp last_checkpoint via MCP**: call `mcp__gdd_state__checkpoint`.
|
|
39
|
+
|
|
40
|
+
8. **Print summary** in this exact shape:
|
|
33
41
|
```
|
|
34
42
|
Checkpoint NN restored.
|
|
35
43
|
Saved: <timestamp>
|
|
@@ -39,20 +47,21 @@ Inverse of `/gdd:pause`. Reads a checkpoint file, prints a clear "you were here"
|
|
|
39
47
|
Open todos: <N>
|
|
40
48
|
```
|
|
41
49
|
|
|
42
|
-
|
|
50
|
+
9. **Staleness check**: compare mtime of `.design/` artifacts vs `src/` via Bash `stat` when available. If `src/` has commits newer than the checkpoint timestamp, warn:
|
|
43
51
|
"Source has changed since checkpoint NN — consider re-running explore or verify."
|
|
44
52
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
53
|
+
10. **Route recommendation** based on checkpoint `Stage:` field:
|
|
54
|
+
- `brief` → "Run `/gdd:brief`"
|
|
55
|
+
- `explore` → "Run `/gdd:explore`"
|
|
56
|
+
- `plan` → "Run `/gdd:plan`"
|
|
57
|
+
- `design` → "Run `/gdd:design` to continue"
|
|
58
|
+
- `verify` → "Run `/gdd:verify`"
|
|
51
59
|
|
|
52
60
|
## Do Not
|
|
53
61
|
|
|
54
62
|
- Do not delete checkpoint files.
|
|
55
|
-
- Do not
|
|
63
|
+
- Do not mutate STATE.md directly — all STATE.md writes go through the `gdd-state` MCP tools above.
|
|
56
64
|
- Do not auto-execute the next command — just recommend.
|
|
65
|
+
- Do not call `mcp__gdd_state__transition_stage` — resume restores prior status without moving the pipeline.
|
|
57
66
|
|
|
58
67
|
## RESUME COMPLETE
|