Skip to content

Keep scratchpad plans until their work is merged - #28

Merged
bryanwieg merged 1 commit into
mainfrom
scratchpad-keep-unmerged-plans
Nov 27, 2026
Merged

bryanwieg merged 1 commit into
mainfrom
scratchpad-keep-unmerged-plans

Conversation

@bryanwieg

Copy link
Copy Markdown
Owner

The scratchpad cleanup could delete plans whose work was not yet merged.

  • Startup age cleanup (init.d/07-scratchpad) now skips .ai-scratchpad/plans/, including empty folders there. Excluded by path, since -delete implies -depth, which disables -prune.
  • Exit tidy-up (exit.d/20-scratchpad) may delete a plan only once its work is merged into the default branch.
  • README and session guide updated; the guide tells agents to keep plans in .ai-scratchpad/plans/.
  • test-session-init.sh checks that an old plan survives cleanup.

Testing: the Docker test suite skips on a rootless daemon, so it ran only as a direct run of the hook on a temporary project (old notes deleted, plans kept) plus ShellCheck. CI runs the full suite.

🤖 Generated with Claude Code

The startup age cleanup now skips .ai-scratchpad/plans/, and the exit
tidy-up may delete a plan only once its work is merged into the default
branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bryanwieg
bryanwieg merged commit 917af7e into main Nov 27, 2026
@bryanwieg
bryanwieg deleted the scratchpad-keep-unmerged-plans branch November 27, 2026 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant