diff --git a/src/resources/extensions/gsd/bootstrap/db-tools.ts b/src/resources/extensions/gsd/bootstrap/db-tools.ts index 3f6f9d998..718b95fe8 100644 --- a/src/resources/extensions/gsd/bootstrap/db-tools.ts +++ b/src/resources/extensions/gsd/bootstrap/db-tools.ts @@ -930,6 +930,14 @@ export function registerDbTools(pi: ExtensionAPI): void { updateSliceStatus(params.milestoneId, params.sliceId, "skipped"); invalidateStateCache(); + // Rebuild STATE.md so it reflects the skip immediately (#3477). + // Without this, /gsd auto reads stale STATE.md and resumes the skipped slice. + try { + const basePath = process.cwd(); + const { rebuildState } = await import("../doctor.js"); + await rebuildState(basePath); + } catch { /* non-fatal — STATE.md staleness is better than crashing */ } + return { content: [{ type: "text" as const, text: `Skipped slice ${params.sliceId} (${params.milestoneId}). Reason: ${params.reason ?? "User-directed skip"}. Auto-mode will advance past this slice.` }], details: { diff --git a/src/resources/extensions/gsd/prompts/rethink.md b/src/resources/extensions/gsd/prompts/rethink.md index f07a8640a..a75c2aa21 100644 --- a/src/resources/extensions/gsd/prompts/rethink.md +++ b/src/resources/extensions/gsd/prompts/rethink.md @@ -46,11 +46,12 @@ reason: "" Remove the `{ID}-PARKED.md` file from the milestone directory to reactivate it. ### Skip a slice -Mark a slice as skipped so auto-mode advances past it without executing. Use the `gsd_skip_slice` tool: +Mark a slice as skipped so auto-mode advances past it without executing. **You MUST call the `gsd_skip_slice` tool** — editing the roadmap markdown alone is NOT sufficient because auto-mode reads slice status from the database, not the roadmap file: ``` gsd_skip_slice({ milestoneId: "M003", sliceId: "S02", reason: "Descoped — feature moved to M005" }) ``` Skipped slices are treated as closed by the state machine (like "complete" but distinct). Use when a slice is no longer needed or has been superseded. The slice data is preserved for reference. +**Do NOT** just check the slice checkbox in the roadmap — this does not update the DB and auto-mode will resume the slice. ### Discard a milestone **Permanently** delete a milestone directory and prune it from QUEUE-ORDER.json. **Always confirm with the user before discarding.** Warn explicitly if the milestone has completed work.