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
{{ message }}
Repository navigation
repo-fleet-hygiene: a bare path and a drive root are outside the flag grammar, and no-argument scope is the project directory rather than the machine #2599
The skill's argument grammar accepts only --root, --repo, --config, --canonical, --max-depth, and --project-dir, and instructs the caller to reject anything outside it. A bare path — the most natural thing an operator types — is therefore invalid.
Separately, the no-scope default is close to the opposite of what an operator expects from a fleet tool: it uses the project directory as an exact --repo target and hard-fails when that directory is not a working tree. A machine-wide audit is the expected default for a plugin whose purpose is machine-wide hygiene.
Evidence
The invocation /repo-fleet-hygiene:audit D: is outside the grammar. Interpreting it required a judgement call by the caller, and the interpretation chosen (--root "D:/") then hit the abort described in the separate discovery issue.
Operator intent for a bare drive letter is unambiguous: "every repository on this drive." A drive root is also self-evidently not a repository, so failing on that basis reads as pedantry rather than safety.
Proposed change
Accept three levels of granularity:
no argument → machine-wide discovery
a drive or directory → that volume or tree
a repository path → that repository
Concretely:
A bare positional path is treated as --root; if it is itself a Git working tree, as --repo.
Keep reject-on-unknown for anything beginning with -, which is where the injection concern actually lives.
A drive root is a legitimate discovery root. If it genuinely contains no repositories, that is a finding ("0 repositories found under D:/"), not an error.
For the machine-wide default, compose cheap authoritative sources before any filesystem sweep:
known agent state (project list in ~/.claude.json, tool worktree roots)
instant
4
bounded filesystem sweep of fixed drives plus the home directory, with the exclusion list
slow — opt-in or cached
Then resolve every hit to its canonical main worktree and deduplicate. That step is not optional: ghq list reports each worktree as a repository of its own, so rung 1 alone is actively misleading.
On the fleet this was measured against, rungs 1–3 would have found every repository, including the one outside ghq root (a chezmoi source checkout in the home directory).
Acceptance criteria
audit D: and audit /path/to/tree both work without flags.
audit with no argument audits the machine rather than failing on the project directory.
A drive root containing no repositories reports zero found rather than erroring.
Discovery output distinguishes canonical repositories from linked worktrees, and the count reported is of repositories.
Reopening — the bare-path half landed; the machine-wide half did not, and the skill layer was reverted eight minutes later
PR #2638 (b7e56070) landed the parsing work and it is good: normalize_discovery_root() maps D: → D:/, the positional *) arm accepts a bare path while -*) still hard-rejects, and an empty discovery root now reports zero repositories instead of erroring. A genuine bug was caught and fixed before merge — a symlinked or unreadable root would otherwise have reported a false clean empty audit.
Two acceptance criteria remain unmet, and one landed change was undone by a later PR.
Criterion 2 is not met
audit with no argument audits the machine rather than failing on the project directory
What shipped stops failing on the project directory and starts failing outright: audit-fleet.sh:1069 — fail "no scope resolved: no bare path, --root, or --repo, and no config-supplied fleet.root/fleet.repo". Without config, a bare audit still hard-fails. The failure moved; it did not become machine-wide discovery.
The discovery ladder was never implemented
grep -n "ghq\|claude\.json" over the landed script returns nothing. Only rung 2 (configured fleet.root / fleet.repo) exists. Rung 1 (ghq list --full-path), rung 3 (the ~/.claude.json project list), and rung 4 (bounded FS sweep) are absent.
Canonical-main deduplication — which the issue called "not optional" — was already present and survives.
PR #2646 reverted the skill layer eight minutes after #2638 landed
Both are on main. The script keeps #2638's behaviour; skills/audit/SKILL.md was reverted to pre-#2638 text:
Script (actual)
SKILL.md (documented)
:484 bare positional accepted
:4argument-hint no longer lists a positional form; the - <dir>: bare positional path bullet deleted
:1069 hard-fails with a scope remedy
:59 still says the project directory is used as an exact --repo target
project dir is a config rung only
:46 still calls --project-dir "the no-scope fallback target"
—
:77 "reject any arguments outside this grammar" — and bare paths are no longer in the enumerated grammar
The skill body now instructs an agent to reject audit D: — the exact invocation this issue exists to enable — while the bundled script accepts it. It is an instruction-layer regression rather than a hard parser gate, but the documented contract and the implemented contract contradict each other.
Also reverted and still live: SKILL.md no longer documents bare-repo-with-working-tree (shipped by #2633 for #2602) — git grep -c on main returns 0.
Nothing caught it. scripts/docs-only-paths.txt holds exactly one prefix (docs/topics/), so plugin-gate ran the full suite on #2646 — there is simply no assertion tying SKILL.md prose to script behaviour. All 38 checks were green.
Remaining work
Restore SKILL.md: argument-hint, the bare-path bullet, the --project-dir description, the no-scope paragraph at :59, the in-grammar clause at :77, and the bare-repo-with-working-tree bullet.
Implement the discovery ladder, or amend this issue to drop it explicitly rather than leaving it silently unbuilt.
Add a gate tying the documented grammar to the actual argument parser — this class passed 38 green checks.
Two process notes
Semver. A change whose own CHANGELOG entry calls it a "breaking change for bare /repo-fleet-hygiene:audit invocations" shipped as 0.19.0 → 0.19.1, a patch bump, in a plugin whose CHANGELOG header declares semantic versioning.
Windows CI.plugin-gate runs scripts/run-plugin-tests.sh on ubuntu-24.04 only; the sole Windows job runs lib/hook-utils.test.sh. A PR entirely about Windows drive roots had zero Windows CI, and its new chmod a-rx unreadable-root test is specifically unreliable under Git Bash ACL emulation — never exercised there.
Activity
fix(repo-fleet-hygiene): accept bare paths and drive roots as --root
fix(repo-fleet-hygiene): accept bare paths and drive roots as --root
fix(repo-fleet-hygiene): accept bare paths and drive roots as --root
fix(repo-fleet-hygiene): accept bare paths and drive roots as --root
fix(repo-fleet-hygiene): document bare-path grammar and default-scope…
fix(repo-fleet-hygiene): document bare-path grammar and default-scope…
fix(repo-fleet-hygiene): accept bare paths and drive roots as --root
fix(repo-fleet-hygiene): accept bare paths and drive roots as --root
fix(repo-fleet-hygiene): accept bare paths and drive roots as --root
fix(repo-fleet-hygiene): accept bare paths and drive roots as --root
fix(repo-fleet-hygiene): accept bare paths and drive roots as --root
fix(repo-fleet-hygiene): accept bare paths and drive roots as --root
fix(repo-fleet-hygiene): keep bare-path grammar and epic evals with #…
kyle-sexton commentedon Aug 15, 2026
Reopening — the bare-path half landed; the machine-wide half did not, and the skill layer was reverted eight minutes later
PR #2638 (
b7e56070) landed the parsing work and it is good:normalize_discovery_root()mapsD:→D:/, the positional*)arm accepts a bare path while-*)still hard-rejects, and an empty discovery root now reports zero repositories instead of erroring. A genuine bug was caught and fixed before merge — a symlinked or unreadable root would otherwise have reported a false clean empty audit.Two acceptance criteria remain unmet, and one landed change was undone by a later PR.
Criterion 2 is not met
What shipped stops failing on the project directory and starts failing outright:
audit-fleet.sh:1069—fail "no scope resolved: no bare path, --root, or --repo, and no config-supplied fleet.root/fleet.repo". Without config, a bareauditstill hard-fails. The failure moved; it did not become machine-wide discovery.The discovery ladder was never implemented
grep -n "ghq\|claude\.json"over the landed script returns nothing. Only rung 2 (configuredfleet.root/fleet.repo) exists. Rung 1 (ghq list --full-path), rung 3 (the~/.claude.jsonproject list), and rung 4 (bounded FS sweep) are absent.Canonical-main deduplication — which the issue called "not optional" — was already present and survives.
PR #2646 reverted the skill layer eight minutes after #2638 landed
Both are on
main. The script keeps #2638's behaviour;skills/audit/SKILL.mdwas reverted to pre-#2638 text::484bare positional accepted:4argument-hintno longer lists a positional form; the- <dir>: bare positional pathbullet deleted:1069hard-fails with a scope remedy:59still says the project directory is used as an exact--repotarget:46still calls--project-dir"the no-scope fallback target":77"reject any arguments outside this grammar" — and bare paths are no longer in the enumerated grammarThe skill body now instructs an agent to reject
audit D:— the exact invocation this issue exists to enable — while the bundled script accepts it. It is an instruction-layer regression rather than a hard parser gate, but the documented contract and the implemented contract contradict each other.Also reverted and still live:
SKILL.mdno longer documentsbare-repo-with-working-tree(shipped by #2633 for #2602) —git grep -conmainreturns 0.Nothing caught it.
scripts/docs-only-paths.txtholds exactly one prefix (docs/topics/), soplugin-gateran the full suite on #2646 — there is simply no assertion tyingSKILL.mdprose to script behaviour. All 38 checks were green.Remaining work
SKILL.md:argument-hint, the bare-path bullet, the--project-dirdescription, the no-scope paragraph at:59, the in-grammar clause at:77, and thebare-repo-with-working-treebullet.Two process notes
Semver. A change whose own CHANGELOG entry calls it a "breaking change for bare
/repo-fleet-hygiene:auditinvocations" shipped as0.19.0 → 0.19.1, a patch bump, in a plugin whose CHANGELOG header declares semantic versioning.Windows CI.
plugin-gaterunsscripts/run-plugin-tests.shonubuntu-24.04only; the sole Windows job runslib/hook-utils.test.sh. A PR entirely about Windows drive roots had zero Windows CI, and its newchmod a-rxunreadable-root test is specifically unreliable under Git Bash ACL emulation — never exercised there.kyle-sexton commentedon Aug 15, 2026
Shipped on main via #2638 (repo-fleet-hygiene 0.19.1 bare-path/drive-root grammar and no-argument scope hard-fail).
docs(repo-fleet-hygiene): restore the documented argument grammar
fix(repo-fleet-hygiene): changelog parity and doc review follow-ups
docs(repo-fleet-hygiene): restore the documented argument grammar (#2670
docs(repo-fleet-hygiene): restore the documented argument grammar (#2670
fix(repo-fleet-hygiene): distinguish --root and --repo in Scope header (