Skip to content

feat(merge-monster): post-merge branch + worktree cleanup rule#12

Merged
eric-sabe merged 3 commits into
mainfrom
feat/post-merge-cleanup
Jul 12, 2026
Merged

feat(merge-monster): post-merge branch + worktree cleanup rule#12
eric-sabe merged 3 commits into
mainfrom
feat/post-merge-cleanup

Conversation

@eric-sabe

Copy link
Copy Markdown
Owner

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:

  • clean merges only — skip contentious merges, revert candidates, worktrees carrying follow-up work
  • worktree remove --force only after status --porcelain is empty (force clears ignored files like node_modules, nothing else)
  • never the main checkout, the monster's own cwd, or a dirty tree — dirty trees are journaled for the operator

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

eric-sabe and others added 3 commits July 6, 2026 23:51
…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
@eric-sabe eric-sabe merged commit ba3a1c7 into main Jul 12, 2026
@eric-sabe eric-sabe deleted the feat/post-merge-cleanup branch July 12, 2026 15:17
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