@reference/retrieval-contract.md @reference/cycle-handoff-preamble.md
{{command_prefix}}resume
Inverse of {{command_prefix}}pause. Reads a checkpoint file, prints a clear "you were here" summary, and routes to the next command.
Step 0 - Prime cycle context
Two paths - MCP preferred when available, file-read fallback otherwise. This runs BEFORE checkpoint restoration so the "you were here" summary has full cycle context (phase, plans, decisions).
MCP path (preferred)
When mcp__gdd_status is exposed (Phase 27.7+, registered via npx @hegemonart/get-design-done --register-mcp):
- Call
mcp__gdd_status(no args) →{phase, branch, last_decisions, last_completed_plans, blocker_count}. One call replaces reading STATE.md + parsing frontmatter + extracting decisions. - Call
mcp__gdd_cycle_recap(no args) → diff vs last cycle snapshot. Critical for session-restoration context: what changed since you paused? - Call
mcp__gdd_decisions_list(no args) → full D-XX list with rationale. Use for the "decisions you made" line in the resume summary. - (Optional) Call
mcp__gdd_plans_list(no args) → current phase plans + status, to identify next incomplete plan.
Three to four MCP calls = full resume priming (~5s, ~32k tokens - Storybloq benchmark). Proceed to Step 1.
File-read path (fallback)
When MCP tools are not available:
Read .design/STATE.mdand parse the frontmatter +<position>,<decisions>,<plans>sections. Extractcycle,branch,last N decisions,completed plans.- Also
Read .design/CYCLES.md(if present) to see prior cycle state for the recap. - Proceed to Step 1.
This path loads the same context in 3–5 file reads (~60s, ~46.5k tokens - file-reading baseline).
Steps
-
Parse argument:
- If argument is a number N → restore checkpoint N.
- If no argument → list available checkpoints and ask which to restore (see step 2).
-
List mode (no argument):
bashls .design/checkpoints/ 2>/dev/null | sort -nIf empty, fall back to reading
.design/HANDOFF.md(legacy single-slot format). If checkpoints exist, present the list and ask (AskUserQuestion): "Which checkpoint would you like to restore? (enter number, or press Enter for the latest)" Use the answer (or latest if Enter pressed) as N. -
Read checkpoint: load
.design/checkpoints/NN-*.md. If not found, try.design/HANDOFF.mdas legacy fallback. -
Check paused status via MCP: call
mcp__gdd_state__getand inspectstatus. If it does not start withpaused:, print "No pause to resume" and exit - the prior session was not paused via{{command_prefix}}pause, so there is nothing to restore. -
Restore prior status via MCP: parse the prior status from the
paused:<prior>prefix. Callmcp__gdd_state__set_statuswithstatus: <prior>to restore the pre-pause state. -
Clear the pause blocker: optionally call
mcp__gdd_state__resolve_blockerto clear the pause-related blocker (match by text containing "paused"). Skip if no such blocker exists. -
Stamp last_checkpoint via MCP: call
mcp__gdd_state__checkpoint. -
Print summary in this exact shape:
Checkpoint NN restored. Saved: <timestamp> You were: <in-progress description> Next step: <next> Active sketch: <path or none> Open todos: <N> -
Staleness check: compare mtime of
.design/artifacts vssrc/via Bashstatwhen available. Ifsrc/has commits newer than the checkpoint timestamp, warn: "Source has changed since checkpoint NN - consider re-running explore or verify." -
Route recommendation based on checkpoint
Stage:field:brief→ "Run{{command_prefix}}brief"explore→ "Run{{command_prefix}}explore"plan→ "Run{{command_prefix}}plan"design→ "Run{{command_prefix}}designto continue"verify→ "Run{{command_prefix}}verify"
Do Not
- Do not delete checkpoint files.
- Do not mutate STATE.md directly - all STATE.md writes go through the
gdd-stateMCP tools above. - Do not auto-execute the next command - just recommend.
- Do not call
mcp__gdd_state__transition_stage- resume restores prior status without moving the pipeline.


