You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/repo-fleet-hygiene:audit is correct and does not do the job it exists for.
A full run against a real 19-repository fleet produced 869 findings across 6204 lines. Independent verification found the findings accurate — 20/20 sampled re-derived, 377/377 HIGH verified by whole-population OID join, zero false negatives across 138 unflagged branches. The collector is sound and its HIGH tier can drive deletions.
The mismatch is scope. The operator's intent is a machine-wide cleanup: find every repository, remove every worktree and branch that is provably merged, and converge the machine on one worktree convention. What the plugin delivers is a per-item read-only report that then requires 38 separate gated invocations of two other skills to act on — and several of the per-repository facts it computes are already computed, more safely, by source-control:worktree.
Verification (deterministic stride sampling plus whole-population offline joins):
Category
Confidence
Sampled
Confirmed
Refuted
merged-local-branch
HIGH
12
12
0
merged-worktree
HIGH
8
8
0
reclaimable-worktree
MEDIUM
8
8
0
merged-pr-tip-drift
MEDIUM
5
5
0
github-remote-moved
HIGH
1
1
0
214/214 merged-local-branch OIDs still equal their branch tips. 163/163 merged-worktree OIDs equal both branch tip and worktree HEAD. Zero overlap between the two sets. Zero of the 214 collide with a worktree-attached, current, or default branch.
source-control:worktree meanwhile already provides status (inventory with a stranded-work axis computed from landed-work.sh — unpushed unlanded commits, with unknown treated exactly as stranded), cleanup [--dry-run] (prune, remove, verify, with Windows file-lock release and git branch -D emitted rather than run), and audit. Against that, this plugin's reclaimable-worktree rests on git status --porcelain emptiness alone.
The capability no skill in the fleet provides — fanning a cleanup across 19 repositories behind one gate — is the one that was actually wanted.
Proposed change
Narrow the plugin to the axis only it can serve, and delegate the rest.
source-control:worktree status / cleanup (already)
Per-repository branch, cache, and build hygiene
repo-hygiene:clean (already)
Fleet discovery — every repository on a machine, resolved to canonical checkouts
repo-fleet-hygiene
Cross-repository GitHub merge evidence at fleet scale
repo-fleet-hygiene
Conformance reporting against the configured worktree root
repo-fleet-hygiene (reads the key; never defines it)
Fleet batching — one confirmation gate, many repositories
repo-fleet-hygiene (missing today)
Merged remote branches
unowned — new capability
Execution model, decided with the operator:
read-only by default — report and stop, preserving today's boundary as the default
execute — act on a previously produced manifest, as a separate explicit act
report-and-execute in one unit of work — the report is still produced and shown; the operator has pre-authorized the follow-through in the same invocation
The manifest is the interchange format, and it is the only dry-run available for git worktree remove and git branch -d, neither of which has a native one. An execute pass must re-derive OIDs at execution time; nothing in a report is self-refreshing.
Acceptance criteria
The plugin no longer computes a per-repository worktree-disposability verdict of its own; it delegates to source-control:worktree status or consumes its classification.
A fleet run can hand off cleanup for N repositories behind one confirmation, not 2N.
Read-only remains the default mode; execution requires an explicit act or an explicit single-transaction flag.
The report states a per-repository verdict, not only per-item findings.
Child issues
Filed separately per this repository's one-defect-per-issue convention. This issue is the shared context they reference.
Problem
/repo-fleet-hygiene:auditis correct and does not do the job it exists for.A full run against a real 19-repository fleet produced 869 findings across 6204 lines. Independent verification found the findings accurate — 20/20 sampled re-derived, 377/377 HIGH verified by whole-population OID join, zero false negatives across 138 unflagged branches. The collector is sound and its HIGH tier can drive deletions.
The mismatch is scope. The operator's intent is a machine-wide cleanup: find every repository, remove every worktree and branch that is provably merged, and converge the machine on one worktree convention. What the plugin delivers is a per-item read-only report that then requires 38 separate gated invocations of two other skills to act on — and several of the per-repository facts it computes are already computed, more safely, by
source-control:worktree.Evidence
Fleet: 19 canonical repositories reached via 127 supplied paths, 292 linked worktrees.
reclaimable-worktreemerged-local-branchmerged-worktreelocal-ancestry-onlymerged-pr-tip-driftmerge-evidence-privacy-gatedworktree-nested-in-repositoryVerification (deterministic stride sampling plus whole-population offline joins):
merged-local-branchmerged-worktreereclaimable-worktreemerged-pr-tip-driftgithub-remote-moved214/214
merged-local-branchOIDs still equal their branch tips. 163/163merged-worktreeOIDs equal both branch tip and worktree HEAD. Zero overlap between the two sets. Zero of the 214 collide with a worktree-attached, current, or default branch.source-control:worktreemeanwhile already providesstatus(inventory with a stranded-work axis computed fromlanded-work.sh— unpushed unlanded commits, withunknowntreated exactly asstranded),cleanup [--dry-run](prune, remove, verify, with Windows file-lock release andgit branch -Demitted rather than run), andaudit. Against that, this plugin'sreclaimable-worktreerests ongit status --porcelainemptiness alone.The capability no skill in the fleet provides — fanning a cleanup across 19 repositories behind one gate — is the one that was actually wanted.
Proposed change
Narrow the plugin to the axis only it can serve, and delegate the rest.
worktree_root, creation placementsource-control:worktree(already)source-control:worktree status/cleanup(already)repo-hygiene:clean(already)Execution model, decided with the operator:
execute— act on a previously produced manifest, as a separate explicit actThe manifest is the interchange format, and it is the only dry-run available for
git worktree removeandgit branch -d, neither of which has a native one. An execute pass must re-derive OIDs at execution time; nothing in a report is self-refreshing.Acceptance criteria
source-control:worktree statusor consumes its classification.Child issues
Filed separately per this repository's one-defect-per-issue convention. This issue is the shared context they reference.
repo-fleet-hygiene
--rootaborts the entire auditreclaimable-worktreerests ongit statusalone, so ignored files are destroyed without warningmerged-pr-tip-driftevidence asserts the commits may never have been pushed when all of them are on GitHubreclaimable-worktreeduplicatessource-control:worktree's stranded-work axis with a weaker signalsource-control — the convention layer this plugin reads but must not define
git worktree addorEnterWorktree(name:)from landing inside a repositoryworktree_rootcannot vary per Git identity