### Worktree and simulator cleanup

**You own the disk and the safety gate.** Prune merged or abandoned git worktrees and, where they exist, stale iOS simulators to reclaim space. Deletion is irreversible, so every step guards against deleting something in use or holding uncommitted work. Removing a worktree, a branch, a simulator, a cache or session history is a deletion under `references/authorization.md`. Each removal needs the user's explicit authorization for that path or a set the user names. A cleanup request authorizes the audit, not the deletions.

1. Snapshot and audit. Record `df -h /`. In this parent session, call `worktree_list` for the pi-herdr-agents managed worktrees, and run `git worktree list --porcelain` for every worktree of this repository (**principle-build-the-lever**). Read paths from those listings, never hand-typed, since a hand-typed path misses a worktree that lives somewhere else (**principle-encode-lessons-in-structure**). Classify each worktree by size (`du -sh`), age, merge state (`git merge-base --is-ancestor <branch> <trunk>`), uncommitted work (`git -C <path> status --porcelain`), PR state (`gh pr list --head <branch> --state all`), whether `worktree_list` shows a live child in it, and the newest session in this working directory's session directory that names its path. Find those sessions with the per-cwd rule in `playbooks/session-pickup.md`, and never read another project's sessions. Then suggest a bucket. Keep the classification as a script you can rerun when the audit is more than a handful of paths.
2. The bucket is advice, not permission. The sessions and worktrees the user still uses are the real artifact (**principle-prove-it-works**). Ask the user which ones those are and cross-check every candidate. The user's answer wins over any bucket, including one that marked a path `safe`.
3. Verify usage before deleting. For every row whose newest session is recent, or anything you doubt, launch bare investigator children per `references/fan-out.md` to read this working directory's session files and report whether the session is ongoing and which worktrees it touches (**principle-guard-the-context-window**, transcripts are bulk). A worktree with a live child is in use, and `worktree_remove` refuses it. A path whose sessions are not in this working directory's session directory is in unknown use. Ask the user about it instead of reading further.
4. Pause on irreversible loss. `wip:N` is N tracked uncommitted edits. Show the diff and get a decision first, since removing a clean worktree is recoverable from its branch but uncommitted work is gone. `scratch:N` is untracked throwaway, but name the files before anyone drops them. Present the confirmed set as one list, each path with its bucket and reason, and ask for explicit authorization. Hold every `wip`, in-use and unknown path out of that list.
5. Prune only the authorized set, one path at a time. A managed worktree goes through `worktree_remove`. An unmanaged one goes through `git worktree remove <path>`. Use `--force` only for a path whose scratch files the user saw and authorized. If the directory survives on ignored build artifacts, `rm -rf` that exact path only when the user authorized removing it, then run `git worktree prune`. Branch refs survive, so no commits are lost. Deleting a branch is a separate authorization. Confirm with `df -h /` and list the worktrees again.
6. Simulators and other reclaimers, only where they exist. Run the simulator steps only on macOS (`uname` prints `Darwin`) with `xcrun` on `PATH`, and only with authorization for each item. Simulators are usually the next-biggest win there. `xcrun simctl --set testing delete all` (XCTestDevices clones), `xcrun simctl delete unavailable`, and `xcrun simctl runtime list` then `runtime delete <id>` for old runtimes. More when needed, each on its own authorization: Xcode `DerivedData` and `iOS DeviceSupport`, `~/Library/Application Support` directories for unused IDEs (`state.vscdb.backup`, and `snapshots/roots/<root>` where a `<root>` named for a folder you opened as a workspace balloons), and package caches (pnpm, uv, brew, yarn) on any platform. Clear only caches the user has not said to keep. On another platform, report the reclaimers that do not apply and skip them.

This is the one playbook that deletes user state with no code review to catch a slip, so the gates above are the review.

**Reply:** `df -h /` before and after with space reclaimed, the worktrees pruned with the authorization for each, and a one-line reason for each held back (in use by which session, uncommitted work, or unknown use).
