# Bloat flows: how to classify and discuss them Use when the user asks where space goes, wants a lasting order, or a scan is being classified. Re-measure every number; these are classes, not sizes. Record the user's own standing decisions in your own notes, not in this skill. ## How to discuss it - Go flow by flow (one flow per turn: projects, media production, outside Desktop ...), each with: what it is, WHY it exists (root cause), measured GB, the rule that stops it recurring, then numbered approval candidates. - When asked "why are there N of X", answer with evidence (creation/modification dates via `stat -f '%SB'`/`%Sm`, which task created it), not speculation. - "Keep only that" / "delete all" style answers are bulk approvals: re-show the numbered list with sizes once and ask for the final OK before trashing. ## Flow 1: parallel worktrees - Every dispatched worktree rebuilds its own `build/`, `node_modules`, toolchain dirs; merged worktrees are left behind. - Rules worth proposing: remove a worktree the day its branch merges (`git worktree remove`, clean status only); cap worktrees per project; `flutter clean` (or the stack's clean command) when a worktree's work finishes; prefer a package manager with a shared store (pnpm) over per-worktree full copies; one shared language cache (e.g. `GOCACHE`/`GOPATH`) instead of a per-worktree toolchain. - Mobile repos: test builds with a single ABI and a single mode; build all ABIs/release only for store upload. ## Flow 2: media production folders - Render pipelines often keep frame sequences in `out/` that dominate size. `out/` is NOT always wholly regenerable: some projects keep their only final videos there. Trash only frames, previews and intermediate renders; keep every video that has no identical counterpart in the delivery folder. Verify identity with a hash (`shasum -a 256`), not size alone. - Frames stay while the project is in revision; clear them only when the user declares the project finished (a marker file such as `HAZIR.md` helps). - Shareable: identical single dependencies (e.g. one `node_modules` with the same package) can live once in the parent folder (Node resolves upward). Stock model weights go to the global cache; generic fonts/textures to a shared generic-asset folder, kept separate from identity assets (voices, style refs). - Never move or trash a shared venv or cache without repointing every consumer first. - Archive outputs to the user's chosen archive location with a one-way copy verified by count + bytes (or hash); trashing the source is a separate per-project approval. ## Asking owners (multi-agent setups) - Who decides a folder is finished: the agent or person that owns the project. Send one message per owner listing paths with measured GB and final-file locations, with a fixed answer format such as ` | DELETE / PARTIAL / KEEP | reason | files to keep`. Owners often answer without measuring, so do the byte/hash comparison yourself before trashing. - Worktree owners: send one query per owner listing each worktree with measured GB, ahead-count (`git rev-list --count main..HEAD`), last commit age, untracked files and live-use PIDs. Allowed outcomes: remove (after copying real untracked work to an archive, never secret files such as `.env*`), local merge + tests + remove, or keep. No push. Put only actions the user named into an owner query; extra cleanup is a separate proposal to the user. - Re-measure worktree lists right before acting: owners keep creating worktrees, so an approved count goes stale within hours. - A worktree checked out on `main` while the root repo sits on a feature branch may be the live `main` working copy (e.g. a scheduled job commits into it). Check its reflog and scheduled jobs before calling it removable. - Before trashing a mobile `build/`, list release outputs with dates; a same-day release may be the pending store upload. ## Consolidating a shared cache (recipe) - node_modules across sibling projects with an identical single dependency: verify the version in every copy, `mv` one copy to the parent folder (same volume, atomic), `/usr/bin/trash` the rest after approval, then check module resolution from a child dir; the owner confirms with a short real render. Also find dangling nested symlinks: `find -name node_modules -type l ! -exec test -e {} \; -print`. - Project-local model cache to the global cache: grep the project's launcher/config (not secret files) for the cache variable, compare blob sizes per model (a global copy can hold tiny placeholder blobs), verify each blob's `shasum -a 256` equals its filename, then repoint the config and prove offline loading with the project's own environment before trashing the project copy. Leave a symlink at the old path as a safety net. - Do not take a teammate's "global copy is identical" at face value: re-check blob byte sizes yourself before trashing the only full copy. - Shared project assets (fonts, reference voices): run `scripts/dedupe_shared_assets.py ...` dry-run first, then `--do`; afterwards no dangling symlinks, and owners re-render. ## Moving folders - Before proposing new paths, collect each owner's hardcoded-path list (service start scripts, env defaults, allowlists, registry paths); move only together with the matching config change. - After moving any repo that has worktrees, run `git worktree repair` in the main repo. ## Flow 3: outside Desktop (usually larger than Desktop) Scan an allowlist with `du -skx` per child, pruning backups, phone sync, health, photos and any private folders the user closed; do not descend Documents/Pictures without asking. Typical classes: - Mobile dev: emulators, simulators, Gradle, SDKs, Xcode. Keep the emulators the user/owner names; remove others with `/usr/bin/trash` on both the `.avd` folder and its `.ini` after approval and after `pgrep -f qemu-system` is empty. - AI models and runtimes: local model stores and caches. - Agent scratch/workspace folders: report sizes only (do not open other agents' files) and ask the owner to keep only finished outputs. - Package caches (uv, npm, pip, pnpm, Homebrew, Playwright, go-build): regenerable; clear with each tool's own clean command after approval. - Old personal app data: report size and date only, never open; the user decides.