claude-code - 💡(How to fix) Fix [BUG] gsd-tools.cjs `state.complete-phase` sets milestone-level `status: completed` when only 1 phase shipped + `state.milestone-switch` silent no-op

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Fix Action

Fix / Workaround

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.

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.

RAW_BUFFERClick to expand / collapse

Bug 1: state.complete-phase prematurely sets milestone-level status: completed

Reproduction

  1. Have a multi-phase milestone in .planning/STATE.md (e.g. a milestone with 5 phases: 022 + 023 + 024 + 025 + 026)
  2. Ship phase 022; run: gsd-sdk query state.complete-phase --phase 022
  3. Inspect .planning/STATE.md frontmatter

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

  1. Have STATE.md frontmatter with milestone: vX.Y
  2. Run: gsd-sdk query state.milestone-switch --milestone vX.Z
  3. Observe stdout: {\"switched\": true, ...}
  4. 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.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING