From 7199e6bfba907f52b1adba73649677a4a1dafd34 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Sat, 7 Nov 2026 13:02:20 +0000 Subject: [PATCH] feat(kvb-cleanup): take the inventory from pkgmgr gc --report MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The /tmp inventory starts from one read-only pkgmgr gc --report pass over /tmp and the write-scope dirs, du -sh only without pkgmgr. The worktree-orphans rule moves into worktrees.md, keeping SKILL.md under its 600-word cap at unchanged token cost. 🎯 Fix: 95 % 💥 Break: 2 % 💸 Cost: 100 % ⏱️ Time: 100 % 🛡️ Security: 100 % 🏆 Score: 93 🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 % Co-Authored-By: Claude Opus 5.5 (cherry picked from commit ad2e97aae428fe23e3a4828776ff045766ff9722) --- skills/kvb-cleanup/SKILL.md | 11 ++++------- skills/kvb-cleanup/worktrees.md | 2 ++ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/skills/kvb-cleanup/SKILL.md b/skills/kvb-cleanup/SKILL.md index f34a18e..219fda5 100644 --- a/skills/kvb-cleanup/SKILL.md +++ b/skills/kvb-cleanup/SKILL.md @@ -25,14 +25,11 @@ Code: `sandbox.filesystem.allowWrite`) and session scratch dirs; never another user's files. Prefer the project's cleanup and teardown targets; obey rules forbidding raw commands. -- **/tmp**: `du -sh` per own top-level entry; system entries (`.X11-unix`, - `.ICE-unix`, `systemd-private-*`, `ssh-*`, `tmux-*`, sockets) are never - candidates. +- **/tmp**: `pkgmgr gc --report --docker --root /tmp --root `, + else `du -sh` per own entry; system entries (`.X11-unix`, `.ICE-unix`, `systemd-private-*`, + `ssh-*`, `tmux-*`, sockets) are never candidates. - **Docker**, **worktrees**: read `docker.md` (its `⚠ Volumes` checklist - joins Step 4) and `worktrees.md` next to this file when present. Only at - watch stage `warn` or worse, or with worktrees among the biggest consumers: - `kvb-git-worktree-orphans --sizes`, its largest orphaned worktrees as - candidates. + joins Step 4) and `worktrees.md` next to this file when present. - **Agent dirs**: pip, npm, pre-commit, act, gh, buildx caches; Ansible and build temp dirs. - **Register**: `council.py list --long`; `rasci.py artifacts` (`kvb-org-artefacts`, diff --git a/skills/kvb-cleanup/worktrees.md b/skills/kvb-cleanup/worktrees.md index c7725d9..451b5ab 100644 --- a/skills/kvb-cleanup/worktrees.md +++ b/skills/kvb-cleanup/worktrees.md @@ -7,6 +7,8 @@ whether its HEAD is in an integration line (the default branch and every branch the project merges features into; ask the operator or the project's memory). With `pkgmgr`, `pkgmgr gc --json --sizes --merged-into ` (one per line) measures it all; its candidates go to the `kvb-git-gc` skill. +At `warn` or worse, or with worktrees on top of the report, add the largest of +`kvb-git-worktree-orphans --sizes`. Clean and in a line: medium, its ignored files (`node_modules`, build output, evidence) are lost. Dirty: a candidate only when every changed, staged and