Files
skills/skills/kvb-git-branch-cleanup/apply.md
T
Kevin Veen-Birkenbach ebe7886654 feat(kvb-git): wrap the pkgmgr worktree and gc commands as skills
kvb-git-branch-gc becomes kvb-git-branch-cleanup and kvb-git-orphans-find becomes kvb-git-worktree-orphans, which drops its own orphans.py for pkgmgr's output. New wrappers: kvb-git-gc, kvb-git-worktree-cleanup and kvb-git-worktree-up. kvb-cleanup, kvb-dream, AGENTS.md and README.md point at the new names. Merges only after the pkgmgr release that ships these commands.

🎯 Fix: 90 %
💥 Break: 3 %
💸 Cost: new
⏱️ Time: new
🛡️ Security: 100 %
🏆 Score: 87
🚦 Gate: cost new, time new: cleared by the operator's commit word for the Skills wrappers (2026-11-07)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 18dade9a48a84761bf0c3a9b35584367ae0cb0e4)
2026-11-12 10:38:42 +00:00

1.1 KiB

Apply

  1. Re-read council.py list --long and drop every item claimed since the dry run.

  2. --apply refuses outside the host PID namespace (exit 2) and deletes remote branches, which is a push. Unless this session runs in the host PID namespace and the project lets agents push, hand the operator one command per repository, run from inside it, one --branch per picked item (the worktree path for a detached worktree), with the command of the skill that planned it:

    pkgmgr branch cleanup --apply --json --branch <name> --branch <name> | tee /tmp/branch-cleanup-apply-<N>.json
    
  3. Read every item's result there: done, done; image kept: <img> (still in use elsewhere), skipped: <why> (changed since the plan or during the fini hook), or failed: <why>. Report a failure as it stands; never remove by hand what pkgmgr skipped or refused.

  4. For every done item, drop its worktree and branch from the task listing them in the kvb-org-rasci register (rasci.py artifacts names it): set <task> --drop-artifact worktree:<path>, and --branch '' where the branch is gone.