Impact
App-managed worktrees can leave behind large .build directories after branches are abandoned, merged, or no longer active. Developers can reclaim space manually, but ad-hoc deletion is risky: it is easy to remove build state from a dirty or actively used worktree.
The build-storm mitigation work adds build-cache visibility. The next step is a safe, explicit hygiene flow.
Current behavior
- Build-cache size/footprint can be inspected.
- There is no conductor-managed cleanup plan.
- There is no retention policy.
- There is no dry-run eligibility report explaining what is safe to remove.
- Manual cleanup risks touching active, dirty, or in-progress worktrees.
Expected behavior
RepoPrompt CE should provide a safe build-cache hygiene flow for app-managed worktrees.
The default mode should be non-mutating and explain:
- which
.build directories exist
- how large they are
- whether they appear stale
- whether they are eligible for cleanup
- why a cache is skipped
Actual deletion should require explicit confirmation and should only delete build-cache directories, never source trees or git state.
Proposed scope
Add a conductor-native cleanup planning flow, likely as an extension of build-cache diagnostics.
It should classify worktree build caches using signals such as:
- dirty vs. clean worktree state
- active daemon jobs
- live/bound agent sessions where available
- branch/worktree staleness
- age or last build activity
- cache size
Safety rules should be conservative:
- skip dirty worktrees
- skip worktrees with active jobs
- skip live/bound worktrees
- never delete worktree source directories
- require explicit confirmation for mutation
- default to dry-run
Non-goals
Acceptance criteria
Impact
App-managed worktrees can leave behind large
.builddirectories after branches are abandoned, merged, or no longer active. Developers can reclaim space manually, but ad-hoc deletion is risky: it is easy to remove build state from a dirty or actively used worktree.The build-storm mitigation work adds build-cache visibility. The next step is a safe, explicit hygiene flow.
Current behavior
Expected behavior
RepoPrompt CE should provide a safe build-cache hygiene flow for app-managed worktrees.
The default mode should be non-mutating and explain:
.builddirectories existActual deletion should require explicit confirmation and should only delete build-cache directories, never source trees or git state.
Proposed scope
Add a conductor-native cleanup planning flow, likely as an extension of build-cache diagnostics.
It should classify worktree build caches using signals such as:
Safety rules should be conservative:
Non-goals
Acceptance criteria