fix(cli): require --confirm flag before phases clear deletes directories (#1832)

phases clear now checks for phase dirs before deleting. If any exist and
--confirm is absent, the command exits non-zero with a message showing the
count and how to proceed. Empty phases dir (nothing to delete) succeeds
without --confirm unchanged.

Updates new-milestone.md workflow to pass --confirm (intentional programmatic
caller). Updates existing new-milestone-clear-phases tests to match new API.

Closes #1826

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Tom Boucher
2026-04-05 18:05:32 -04:00
committed by GitHub
parent b185529f48
commit 2ded61bf45
5 changed files with 92 additions and 11 deletions

View File

@@ -140,7 +140,7 @@ Delete MILESTONE-CONTEXT.md if exists (consumed).
Clear leftover phase directories from the previous milestone:
```bash
node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" phases clear
node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" phases clear --confirm
```
```bash