Skip to content

/gsd next

/gsd next executes one unit of work and pauses for your decision, exactly like bare /gsd. It exists as an explicit alias — when you type /gsd next, the intent is clear: “give me the next unit.”

The key addition over bare /gsd is the --dry-run flag, which previews what would be dispatched next — unit type, ID, milestone, phase, estimated cost, estimated duration, budget remaining, and overall progress — without executing anything. Useful when you want to see what’s coming before committing, or after making manual edits to plan files.

/gsd next
/gsd next --dry-run
/gsd next --verbose
/gsd next --debug
FlagEffect
--dry-runShow what the next unit would be without executing it
--verboseIncrease logging detail during dispatch and execution
--debugEnable debug-level tracing and write a debug log to .gsd/

/gsd next calls the same startAuto() function with step: true. The initialization sequence, dispatch engine, and step wizard are all identical to /gsd. See that page for the full flow.

The --dry-run branch is the distinguishing feature. Instead of dispatching a unit for execution, it reads the project’s current state and maps the active phase to its corresponding unit type, then displays a richly annotated preview.

When --dry-run is active, GSD:

  1. Derives project state — Calls deriveState(), which reads all roadmap and plan files under .gsd/ to determine the active milestone, active slice, active task, and current phase.
  2. Checks for an active milestone — If there’s no active milestone (e.g. all milestones are complete and the registry is empty), it exits with “nothing to dispatch.” Note: when phase is complete, activeMilestone is still set to the last milestone entry, so the dry-run does proceed — it will display nextType: complete.
  3. Maps phase to unit type — Uses a direct phase-to-unit-type mapping (not the full dispatch loop):
PhaseUnit type dispatchedNotes
pre-planningresearch-milestone
planningplan-sliceRequires activeSlice to be set
executingexecute-taskRequires both activeSlice and activeTask
summarizingcomplete-sliceRequires activeSlice to be set
completing-milestonecomplete-milestone
validating-milestonevalidating-milestoneFalls through to verbatim
replanning-slicereplanning-sliceFalls through to verbatim
needs-discussionneeds-discussionFalls through to verbatim
blockedblockedFalls through to verbatim
discussing, researching, verifying, advancing, completephase name verbatimFalls through to verbatim
any other phasephase name verbatimCatch-all for unknown phases
  1. Loads historical metrics — Reads the in-memory metrics ledger (or falls back to the ledger on disk at .gsd/metrics.json) to calculate average cost and duration for units of the same type. Loads preferences to check the budget ceiling.
  2. Shows preview — Displays the unit type, ID, milestone, phase, estimated cost and duration (computed as averages over historical units of the same type), total spent, budget remaining, and task/slice progress.

Without --dry-run, /gsd next behaves identically to /gsd: executes one unit, auto-commits, and presents the step wizard (continue / stop / check status).

Read-only. Writes nothing.

FilePurpose
.gsd/milestones/<MID>/<MID>-ROADMAP.mdRead to derive active milestone and phase
.gsd/milestones/<MID>/slices/<SID>/<SID>-PLAN.mdRead to derive active slice and task
.gsd/milestones/<MID>/slices/<SID>/<SID>-SUMMARY.mdRead to determine slice completion
.gsd/metrics.jsonRead for historical unit cost and duration averages
.gsd/preferences.mdRead for budget ceiling (budget_ceiling)

Same as /gsd — identical file behavior since the underlying engine is the same.

Previewing the next unit:

> /gsd next --dry-run
● Dry-run preview:
Next unit: execute-task
ID: M001/S02/T03
Milestone: M001: Core Recipe Platform
Phase: executing
Est. cost: $0.82 (avg of 4 similar)
Est. duration: 18m
Spent so far: $6.40
Budget left: $43.60
Progress: 8/12 tasks, 1/4 slices

When no budget ceiling is configured, the budget line reads no ceiling set:

Budget left: no ceiling set

When the unit type has never been executed before, estimates are unavailable:

Est. cost: unknown (first of this type)
Est. duration: unknown

Running the next unit:

> /gsd next
● Dispatching unit: execute-task M001/S02/T03
─────────────────────────────────
... agent executes T03 (Delete endpoint) ...
✓ T03 complete — 3 files changed
✓ Auto-committed: "T03: Delete endpoint with soft-delete"
● What next?
❯ Continue to next unit (T04: Recipe search)
Check status
Stop

When there’s nothing to dispatch:

> /gsd next --dry-run
● No active milestone — nothing to dispatch.
  • /gsd — Identical behavior (bare entry point)
  • /gsd auto — Continuous execution without pausing
  • /gsd stop — Terminate the session gracefully
  • /gsd status — View progress dashboard
  • /gsd history — Review past unit cost and timing data