bug(workstreams/quick): quick-tasks-append and quick-tasks-migrate hardcode root .planning/STATE.md — --ws / GSD_WORKSTREAM ignored
Pre-submission checklist
- I have searched existing issues and this bug has not already been reported
Related but different: #4905 / PR #5043 touch the same two call sites, but only the Date column; #4256 (todos) and #3749 (GSD_PROJECT) are the same class of bug for other writers.
GSD Version
1.15.0 (the same code is on next today)
Runtime
Claude Code
Operating System
Windows (Git Bash)
Node.js Version
v24.x
Installation Method
Global install into ~/.claude/gsd-core
What happened?
In workstream mode, step 7 of /gsd-quick cannot record the finished task. quick-tasks-append fails with:
Error: quick-tasks-append: STATE.md not found at <project>/.planning/STATE.mdThis happens even when the workstream is given explicitly with --ws <name> or GSD_WORKSTREAM=<name>. The workstream's own STATE.md at .planning/workstreams/<name>/STATE.md exists and has a ### Quick Tasks Completed table.
quick-tasks-migrate hits the same path problem, but it doesn't fail: it returns { ok: true, migrated: false, reason: "STATE.md not found at …" } and exits 0. So the migration that quick.md Step 7 runs before the first append is silently skipped for every workstream.
The rest of the quick flow does resolve the workstream: init.quick --ws <name> returns quick_dir/task_dir under .planning/workstreams/<name>/quick/. Only the STATE.md write fails.
Root cause: both routes build the path from cwd literally, instead of through the workstream-aware resolver that the global --ws/GSD_WORKSTREAM handling sets up (applyResolvedWorkstreamEnv → planningDir()/planningPaths()):
gsd-core/bin/gsd-tools.cjsrouteQuickTasksMigrate:const statePath = path.join(cwd, '.planning', 'STATE.md');(line 1436)gsd-core/bin/gsd-tools.cjsquick-tasks-appendroute:const statePath = path.join(cwd, '.planning', 'STATE.md');(line 1510)
This is the same reader/writer split that #4256 fixed for todos: readers go through planningDir(), these two writers use the literal root path.
What did you expect?
quick-tasks-append and quick-tasks-migrate resolve STATE.md through planningPaths()/planningDir(), the same way init.quick resolves quick_dir. With --ws <name> (or GSD_WORKSTREAM, or the active workstream pointer), the row goes into .planning/workstreams/<name>/STATE.md, and the migration runs against that file.
A file that is not found should also not be reported as ok: true by quick-tasks-migrate when a workstream is active. As it stands, the failure is only visible on the later append.
Steps to reproduce
- A project in workstream mode:
.planning/workstreams/<ws>/{ROADMAP.md,STATE.md}exists and there is no root.planning/STATE.md. The workstreamSTATE.mdhas a### Quick Tasks Completedtable. gsd-tools query init.quick "some task" --validate --ws <ws>returnstask_dirunder.planning/workstreams/<ws>/quick/(correct).gsd-tools quick-tasks-migrate --ws <ws>prints{ "ok": true, "migrated": false, "reason": "STATE.md not found at <project>/.planning/STATE.md" }and exits 0.gsd-tools quick-tasks-append --ws <ws> --quick-id 260927-abc --slug some-task --task "some task" --status Verifiedfails withError: quick-tasks-append: STATE.md not found at <project>/.planning/STATE.md.- Same result with
GSD_WORKSTREAM=<ws>exported instead of--ws.
Workaround: append the row to the workstream STATE.md by hand, escaping | in the description.
Source: open-gsd/gsd-core