feat(merge-monster): post-merge branch + worktree cleanup rule#12
Merged
Conversation
…ement-project Sessions finishing via these commands ended at 'draft PR opened' and never enqueued — the orchestrator saw drafts pile up with no mm:ready labels (observed live, first MM session in keystone). implement-issue gains an explicit enqueue step (baton-aware, falls back to operator handoff); implement-project routes phase merges through the baton when fresh. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0162pZRzsaHRsVS9WpxUr7ga
After a clean merge (no red flags), delete the remote branch and remove the branch's local worktree when it exists and is clean. Guards: never the main checkout, the monster's own cwd, or a dirty tree (journal those for the operator). Operator directive 2026-07-10. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0162pZRzsaHRsVS9WpxUr7ga
…t of worktree; make ignored-file destruction explicit Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0162pZRzsaHRsVS9WpxUr7ga
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Operator directive 2026-07-10: when a PR merges cleanly (no red flags), the monster deletes the remote branch and removes the branch's local worktree if it exists and is clean.
Guards encoded in SKILL.md + spec:
worktree remove --forceonly afterstatus --porcelainis empty (force clears ignored files likenode_modules, nothing else)Battle-tested in keystone before landing here: 10 remote branches + ~15 stale worktrees swept in the first pass.
🤖 Generated with Claude Code
https://claude.ai/code/session_0162pZRzsaHRsVS9WpxUr7ga