From f984f1bcde2ce64c6c550995980edcd0df95a33d Mon Sep 17 00:00:00 2001 From: Dave Date: Thu, 26 Feb 2026 10:32:16 +0000 Subject: [PATCH] story-kit: create 200_story_auto_prune_worktrees_for_archived_stories_in_watcher_sweep --- ...s_for_archived_stories_in_watcher_sweep.md | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .story_kit/work/1_upcoming/200_story_auto_prune_worktrees_for_archived_stories_in_watcher_sweep.md diff --git a/.story_kit/work/1_upcoming/200_story_auto_prune_worktrees_for_archived_stories_in_watcher_sweep.md b/.story_kit/work/1_upcoming/200_story_auto_prune_worktrees_for_archived_stories_in_watcher_sweep.md new file mode 100644 index 0000000..3e1180b --- /dev/null +++ b/.story_kit/work/1_upcoming/200_story_auto_prune_worktrees_for_archived_stories_in_watcher_sweep.md @@ -0,0 +1,20 @@ +--- +name: "Auto-prune worktrees for archived stories in watcher sweep" +--- + +# Story 200: Auto-prune worktrees for archived stories in watcher sweep + +## User Story + +As a developer, I want stale worktrees to be automatically cleaned up when their story is promoted to archived, so that disk space doesn't silently fill up over time. + +## Acceptance Criteria + +- [ ] When sweep_done_to_archived moves a story to 6_archived, its worktree (if any) is removed via remove_worktree_sync +- [ ] Worktrees for stories already in 6_archived at sweep time are also cleaned up (catches previously missed items) +- [ ] Worktree removal failures are logged but do not block the story file move or other cleanup +- [ ] Existing tests pass and new unit tests cover the worktree pruning logic + +## Out of Scope + +- TBD