From 740d718941a2f9fe13a95b515ed368953edc1820 Mon Sep 17 00:00:00 2001 From: Tom Boucher Date: Tue, 12 May 2026 21:20:54 -0400 Subject: [PATCH] fix(resume-work): detect non-phase continue-here checkpoints (#3451) * fix(resume-work): detect non-phase continue-here checkpoints * docs(inbox): align changelog check with changeset policy * fix(resume-work): include sketch subdirectory checkpoints --- ...bug-3446-resume-continue-here-discovery.md | 4 ++ get-shit-done/workflows/inbox.md | 2 +- get-shit-done/workflows/resume-project.md | 11 +++-- ...46-resume-continue-here-discovery.test.cjs | 44 +++++++++++++++++++ 4 files changed, 57 insertions(+), 4 deletions(-) create mode 100644 .changeset/bug-3446-resume-continue-here-discovery.md create mode 100644 tests/bug-3446-resume-continue-here-discovery.test.cjs diff --git a/.changeset/bug-3446-resume-continue-here-discovery.md b/.changeset/bug-3446-resume-continue-here-discovery.md new file mode 100644 index 000000000..e163ffa69 --- /dev/null +++ b/.changeset/bug-3446-resume-continue-here-discovery.md @@ -0,0 +1,4 @@ +--- +type: Fixed +--- +**Resume-work now detects non-phase and legacy checkpoint handoffs** — `resume-project` now scans `.continue-here*.md` across phase, spike, sketch, deliberation, planning-root, and legacy repo-root paths so `/gsd:resume-work` can recover the most recent checkpoint outside phase-only flows. diff --git a/get-shit-done/workflows/inbox.md b/get-shit-done/workflows/inbox.md index 7b6452ed8..9e5d95011 100644 --- a/get-shit-done/workflows/inbox.md +++ b/get-shit-done/workflows/inbox.md @@ -212,7 +212,7 @@ For each classified PR, review against its template requirements. - [ ] PR title is descriptive (not just "fix" or "update") - [ ] One concern per PR (not mixing fix + enhancement) - [ ] No unrelated formatting changes visible in diff -- [ ] CHANGELOG.md updated +- [ ] `.changeset/*.md` fragment added for user-facing changes (or `no-changelog` label applied) - [ ] Not using `--no-verify` or skipping hooks **Scoring:** Same as issues — completeness percentage per PR. diff --git a/get-shit-done/workflows/resume-project.md b/get-shit-done/workflows/resume-project.md index f07582857..e7b6ea5e6 100644 --- a/get-shit-done/workflows/resume-project.md +++ b/get-shit-done/workflows/resume-project.md @@ -66,8 +66,13 @@ Look for incomplete work that needs attention: # Check for structured handoff (preferred — machine-readable) cat .planning/HANDOFF.json 2>/dev/null || true -# Check for continue-here files (mid-plan resumption) -ls .planning/phases/*/.continue-here*.md 2>/dev/null || true +# Check for continue-here files (phase + non-phase + legacy fallback) +ls .planning/phases/*/.continue-here*.md \ + .planning/spikes/*/.continue-here*.md \ + .planning/sketches/*/.continue-here*.md \ + .planning/deliberations/.continue-here*.md \ + .planning/.continue-here*.md \ + .continue-here*.md 2>/dev/null || true # Check for plans without summaries (incomplete execution) for plan in .planning/phases/*/*-PLAN.md; do @@ -93,7 +98,7 @@ fi - Flag: "Found structured handoff — resuming from task {task}/{total_tasks}" - **After successful resumption, delete HANDOFF.json** (it's a one-shot artifact) -**If .continue-here file exists (fallback):** +**If .continue-here file exists (phase/non-phase/legacy fallback):** - This is a mid-plan resumption point - Read the file for specific resumption context diff --git a/tests/bug-3446-resume-continue-here-discovery.test.cjs b/tests/bug-3446-resume-continue-here-discovery.test.cjs new file mode 100644 index 000000000..d1151896b --- /dev/null +++ b/tests/bug-3446-resume-continue-here-discovery.test.cjs @@ -0,0 +1,44 @@ +'use strict'; + +const { test, describe } = require('node:test'); +const assert = require('node:assert/strict'); +const fs = require('node:fs'); +const path = require('node:path'); + +describe('bug #3446: resume-project detects non-phase and legacy continue-here handoffs', () => { + const workflowPath = path.join(__dirname, '..', 'get-shit-done', 'workflows', 'resume-project.md'); + const workflowContent = fs.readFileSync(workflowPath, 'utf8'); + + function readCheckBlock() { + const stepStart = workflowContent.indexOf(''); + const stepEnd = workflowContent.indexOf('', stepStart); + return workflowContent.slice(stepStart, stepEnd); + } + + test('check_incomplete_work scans .planning-root continue-here fallback', () => { + const block = readCheckBlock(); + assert.match( + block, + /\.planning\/\.continue-here\*\.md/, + 'resume workflow must scan .planning/.continue-here*.md fallback path written by pause-work' + ); + }); + + test('check_incomplete_work scans sketch subdirectory continue-here checkpoints', () => { + const block = readCheckBlock(); + assert.match( + block, + /\.planning\/sketches\/\*\/\.continue-here\*\.md/, + 'resume workflow must scan .planning/sketches/*/.continue-here*.md for sketch checkpoint handoffs' + ); + }); + + test('check_incomplete_work scans legacy repo-root continue-here fallback', () => { + const block = readCheckBlock(); + assert.match( + block, + /\s\.continue-here\*\.md/, + 'resume workflow must scan legacy repo-root .continue-here*.md handoff path' + ); + }); +});