Skip to content

feat(#525): Implement post-merge worktree cleanup lifecycle #530

Closed

Description

@bradygaster

Parent: #525

Summary

Once a PR from a worktree branch is merged, the worktree should be cleaned up. Currently there is no lifecycle management for worktrees — they accumulate indefinitely.

Acceptance Criteria

  • Detect when a worktree's branch has been merged (via PR merge event or polling)
  • git worktree remove the completed worktree
  • git branch -d the merged branch
  • Handle edge cases: dirty worktree, unmerged changes, force cleanup flag
  • Ralph heartbeat or ceremony can trigger cleanup check
  • Logging/audit trail for cleanup actions

Assigned: EECOM (runtime owner)

Activity

  1. github-actions commented on Mar 22, 2026

    @github-actions
    Contributor

    🏗️ Squad Triage — Flight (Lead)

    Issue: #530 — feat(#525): Implement post-merge worktree cleanup lifecycle
    Assigned to: Flight (Lead)
    Reason: No specific domain match — assigned to Lead for further analysis

    @copilot evaluation: No strong capability match — routed to squad member.

    Team roster:

    • Flight (Lead) → label: squad:flight
    • Procedures (Prompt Engineer) → label: squad:procedures
    • EECOM (Core Dev) → label: squad:eecom
    • FIDO (Quality Owner) → label: squad:fido
    • PAO (DevRel) → label: squad:pao
    • CAPCOM (SDK Expert) → label: squad:capcom
    • CONTROL (TypeScript Engineer) → label: squad:control
    • Surgeon (Release Manager) → label: squad:surgeon
    • Booster (CI/CD Engineer) → label: squad:booster
    • GNC (Node.js Runtime) → label: squad:gnc
    • Network (Distribution) → label: squad:network
    • RETRO (Security) → label: squad:retro
    • INCO (CLI UX & Visual Design) → label: squad:inco
    • GUIDO (VS Code Extension) → label: squad:guido
    • Telemetry (Aspire & Observability) → label: squad:telemetry
    • VOX (REPL & Interactive Shell) → label: squad:vox
    • DSKY (TUI Engineer) → label: squad:dsky
    • Sims (E2E Test Engineer) → label: squad:sims
    • Handbook (SDK Usability) → label: squad:handbook
    • Ralph (Work Monitor) → label: squad:ralph
    • @copilot (Coding Agent) → label: squad:copilot

    To reassign, remove the current squad:* label and add the correct one.

  2. github-actions commented on Mar 22, 2026

    @github-actions
    Contributor

    📋 Assigned to EECOM (Core Dev)

    Issue: #530 — feat(#525): Implement post-merge worktree cleanup lifecycle

    EECOM will pick this up in the next Copilot session.

    For Copilot coding agent: If enabled, this issue will be worked automatically.
    Otherwise, start a Copilot session and say:
    EECOM, work on issue #530

  3. sturlath commented on Mar 23, 2026

    @sturlath
    Contributor

    @bradygaster this is so what I need! Getting super tiered of all these left over files/branches that I need to spend calls and time getting cleaned up.. so hoping for a new version of Squad.. 2 weeks of waiting is hard.. 😉

  4. added a commit that references this issue on Mar 26, 2026
    770e344
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    go:needs-researchNeeds investigationsquadSquad triage inbox — Lead will assign to a membertype:featureNew capability

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions