[BUG] gsd-tools.cjs `state.complete-phase` sets milestone-level `status: completed` when only 1 phase shipped + `state.milestone-switch` silent no-op
Bug 1: state.complete-phase prematurely sets milestone-level status: completed
Reproduction
- Have a multi-phase milestone in
.planning/STATE.md(e.g. a milestone with 5 phases: 022 + 023 + 024 + 025 + 026) - Ship phase 022; run:
gsd-sdk query state.complete-phase --phase 022 - Inspect
.planning/STATE.mdfrontmatter
Expected
Milestone-level status: in_progress remains until ALL phases complete.
Actual
Milestone-level status: completed set after the FIRST phase closes, with 4 phases still pending.
Source artifact
Discovered during a multi-phase milestone close ceremony. The bug causes milestone-completion ceremonies to fire prematurely after the first per-phase close, requiring manual STATE.md frontmatter workarounds.
---
Bug 2: state.milestone-switch returns {switched: true} without writing to STATE.md
Reproduction
- Have STATE.md frontmatter with
milestone: vX.Y - Run:
gsd-sdk query state.milestone-switch --milestone vX.Z - Observe stdout:
{\"switched\": true, ...} - Inspect STATE.md frontmatter
Expected
STATE.md frontmatter \milestone:\ field updated to \vX.Z\.
Actual
STATE.md frontmatter unchanged. The CLI silently no-ops on write while returning \switched: true\ to the caller — a latent bug class affecting any orchestrator that trusts the return value without re-reading STATE.
Suggested fix
Add a post-write STATE.md sha256 assertion in \state.milestone-switch\ handler before returning \switched: true\. Mirror the assertion pattern already present in \state.complete-phase\ (which DOES write, despite the milestone-level bug above).
---
Environment
- gsd-sdk v1.42.2
- get-shit-done-cc (Claude Code plugin)
- macOS Darwin 25.5.0
Disposition
Both bugs reproducible via local workarounds. Filed as user-side observation against the canonical GSD plugin distribution repo. If this is the wrong repo (e.g. the plugin lives in a separate get-shit-done-cc monorepo), please redirect.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗