Skip to content

feat(sdk): post-merge worktree cleanup lifecycle (#530)#540

Merged
bradygaster merged 3 commits intodevfrom
squad/530-worktree-cleanup
Mar 23, 2026
Merged

feat(sdk): post-merge worktree cleanup lifecycle (#530)#540
bradygaster merged 3 commits intodevfrom
squad/530-worktree-cleanup

Conversation

@bradygaster
Copy link
Copy Markdown
Owner

New worktree-lifecycle.ts module with listWorktrees, findMergedWorktrees, cleanupWorktree. 19 tests.\n\nCloses #530

bradygaster and others added 3 commits March 22, 2026 15:52
- Add orchestration log: 2026-03-22T22-45-flight-triage-525.md
- Add session log: 2026-03-22T22-45-triage-session.md
- Merge decision inbox (6 files) into decisions.md:
  - flight-triage-525.md (validated #525, P2 rating, sub-issue decomposition, top-5 v1 priorities)
  - eecom-economy-mode.md (economy mode design decision)
  - eecom-node-sqlite.md (Node 22.5.0+ hard-fail decision)
  - eecom-rate-limit-ux.md (rate limit detection and recovery)
  - procedures-economy-mode-governance.md (squad.agent.md governance proposal)
  - procedures-personal-squad-governance.md (consult mode governance proposal)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add listWorktrees() to parse git worktree state
- Add findMergedWorktrees() to detect cleanup candidates
- Add cleanupWorktree() with force and dry-run options
- Add cleanupMergedWorktrees() for batch cleanup (Ralph heartbeat)
- Handle edge cases: dirty, locked, missing, main worktree
- Add comprehensive tests with real git repos

Closes #530

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bradygaster bradygaster merged commit c7462b5 into dev Mar 23, 2026
0 of 2 checks passed
chrislomonico pushed a commit to clomonico/squad that referenced this pull request Mar 26, 2026
…radygaster#540)

Wires 5 ghost commands: hire→init, heartbeat→doctor, shell→REPL, loop→triage, run→stub with redirect.

Closes bradygaster#501, Closes bradygaster#503, Closes bradygaster#504, Closes bradygaster#507, Closes bradygaster#509

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bradygaster bradygaster deleted the squad/530-worktree-cleanup branch March 26, 2026 07: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