Skip to content

docs(repo-fleet-hygiene): restore the documented argument grammar - #2670

Merged
kyle-sexton merged 2 commits into
mainfrom
fix/2599-skill-grammar-restore
Aug 15, 2026
Merged

docs(repo-fleet-hygiene): restore the documented argument grammar#2670
kyle-sexton merged 2 commits into
mainfrom
fix/2599-skill-grammar-restore

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

No linked issue

Summary

The skill body instructed an agent to reject /repo-fleet-hygiene:audit D: — the exact invocation #2599 exists to enable — while the bundled script accepted it. This restores the documented grammar to match the script as it actually behaves on main.

Fix

PR #2638 shipped bare positional paths and drive roots, and replaced the project-directory scope fallback with a hard failure that names its remedies. PR #2646 merged eight minutes later from a branch cut before it; the rebase was textually clean but carried pre-#2638 prose forward, reverting the skill layer while leaving the script untouched.

Restored, each verified against origin/main's audit-fleet.sh:

Restored Script behaviour it now matches
bare positional <dir> in the argument list and argument-hint :484 [[ -n "$1" ]] || fail "bare path requires a directory", with normalize_discovery_root mapping D:D:/
--project-dir documented as a config rung only project dir is no longer a scope target anywhere in the script
the no-scope paragraph, rewritten to describe the hard failure :1069 fail "no scope resolved: no bare path, --root, or --repo, and no config-supplied fleet.root/fleet.repo"
the reject-outside-the-grammar clause now says plainly that a bare path is in the grammar; only an unrecognized --prefixed flag is refused, matching the script's -*) arm

Also restores the bare-repo-with-working-tree handoff row (#2633 / #2602), dropped by the same revert — git grep -c on main returned 0 — with its documented remedy (git config --local core.bare false) and the fact that linked worktrees keep working, since the state looks alarming and is not.

Also corrected: an unimplemented capability claimed as shipped

README.md and the plugin description both claimed machine-wide repository discovery. It does not exist: grep -n "ghq\|claude\.json" over the landed script returns nothing, only the configured-roots rung is implemented, and a no-argument run hard-fails. The README row is split into what shipped (bounded discovery via bare path, drive root, --root, --repo, config rungs) and what did not (the ghq / configured-roots / agent-state / bounded-sweep ladder, still unshipped remaining contract work). The plugin description now says "Cross-repository" rather than "Machine-wide".

docs/CATALOG.md regenerated from the manifest rather than hand-edited.

Verification

node scripts/generate-catalog.mjs --check     → Catalog is in sync with the manifests.
node scripts/generate-cheatsheet.mjs --check  → Cheat sheet is in sync with skill frontmatter.
markdownlint-cli2 (SKILL.md, README.md)       → 0 error(s)
check-skill.sh audit                          → all 8 base-ref trigger phrases preserved
                                                description 642/1536 chars
                                                SKILL.md 302/500 lines
                                                markdownlint clean

The trigger-preservation check matters here specifically: the plugin description was reworded, and that gate fails on a silently dropped trigger phrase.

Version bumped to 0.22.1 with a CHANGELOG entry so changelog-parity clears for the plugin-file edits.

Why nothing caught this

scripts/docs-only-paths.txt contains exactly one prefix (docs/topics/), so plugin-gate did run the full suite on #2646 — all 38 checks green. There is simply no assertion tying SKILL.md prose to the script's actual argument parser. That gap is worth its own issue: this is the second silent revert on main in a day (the first was #2633's stale-base squash, repaired by #2640), and both passed CI.

Related

Refs #2599 (already closed by #2638; this PR only restores the documented grammar that #2638 shipped).

@cursor

cursor Bot commented Aug 15, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@claude

claude Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Claude finished @kyle-sexton's task in 3m 6s —— View job


Code review complete

  • Gather context (PR diff, CLAUDE.md, /review:code-review skill instructions)
  • Review changed files for correctness/maintainability per skill criteria
  • Verify claims against audit-fleet.sh on origin/main
  • Post findings (inline + summary)

Skip-gate check: PR is open, not a draft, and the change is substantive (grammar-correctness restoration across a skill's documented contract) — full review performed.

Verification performed: I independently checked every behavioral claim in the PR description against origin/main's plugins/repo-fleet-hygiene/skills/audit/scripts/audit-fleet.sh (read via git show, not the author's test-plan output):

  • Bare positional <dir>--root equivalent, with the -*) arm rejecting only unrecognized dashed flags — matches audit-fleet.sh:474-486.
  • normalize_discovery_root maps a drive-letter-only arg (D:) to D:/ — matches lines ~44-51.
  • --project-dir feeds only the project-scoped config rung, no longer a scope fallback — matches PROJECT_DIR_ARG usage and the UNRESOLVED_SCOPE block around line 690.
  • The no-scope hard failure message — matches reject_target default "no scope resolved: ..." around line 1069.
  • bare-repo-with-working-tree finding + git config --local core.bare false remedy — matches lines ~952-2435 (this row was indeed absent from main's SKILL.md, confirming the PR's git grep -c → 0 claim).
  • No ghq/claude.json machine-wide discovery in the shipped script — confirmed, no matches.
  • docs/CATALOG.md's regenerated line is byte-for-byte identical to the new plugin.json description — confirmed.

I could not execute node scripts/generate-catalog.mjs --check, generate-cheatsheet.mjs --check, or check-skill.sh myself (Bash execution beyond git/read-only inspection was not approved in this run), so those specific author-claimed outputs are unverified by me — flagging per this lane's rule against restating a PR's own claimed verification as independently confirmed. The static text comparisons above stand on their own regardless.

Finding (posted inline on plugins/repo-fleet-hygiene/skills/audit/SKILL.md:2)

The PR's "Also corrected" section fixes the machine-wide overclaim in README.md's capability table and plugin.json's description, but the same overclaim survives in this skill's own frontmatter description (line 2: "Coordinate Git/GitHub hygiene across a machine-wide fleet") and in the ## Purpose section (line 15: "Coordinate machine-wide repository hygiene," outside this PR's diff hunks so not inline-commentable — permalink). This is the more consequential surface: it's what a routing agent reads to decide the skill applies, and it now directly contradicts the capability table introduced three files over in this same PR. Given the PR's explicit purpose is aligning prose with the script's actual (bounded, not machine-wide) behavior, recommend swapping "machine-wide" → "cross-repository" in both spots for consistency with README.md/plugin.json.

No other correctness or maintainability issues found — the restored grammar text, the no-scope failure copy, the --project-dir clarification, and the bare-repo-with-working-tree table row all verified accurate against the script as it behaves on main.

@claude

claude Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Claude finished @kyle-sexton's task in 48s —— View job


Security review

  • Gather context (PR diff, changed files)
  • Run skip-gate check
  • Review changed files for security-relevant surface
  • Adversarial validation of any candidates
  • Post final findings

Skip gate triggered — no findings to report.

All 22 additions / 14 deletions in this PR are prose-only:

  • docs/CATALOG.md — regenerated catalog blurb text
  • plugins/repo-fleet-hygiene/.claude-plugin/plugin.json — one-line description wording change ("Machine-wide" → "Cross-repository")
  • plugins/repo-fleet-hygiene/README.md — capability table row split into shipped vs. not-shipped
  • plugins/repo-fleet-hygiene/skills/audit/SKILL.mdargument-hint and body prose corrected to match the argument grammar audit-fleet.sh already implements on main

No script, workflow, or executable logic changed — plugins/repo-fleet-hygiene/scripts/audit-fleet.sh is untouched by this PR, and allowed-tools in SKILL.md frontmatter is unchanged (Bash(${CLAUDE_SKILL_DIR}/scripts/audit-fleet.sh:*)). The updated prose is descriptive documentation for an agent to read, not new argument-parsing or shell-execution logic; the "never assemble a shell fragment from config/repo/remote/branch text" guardrail sentence is carried forward unchanged. There is no new injection surface, no permission widening, no credential handling, and no GitHub Actions change in this diff.

This is a documentation-accuracy fix (skill prose vs. already-shipped script behavior) with no security-relevant surface. Skip gate condition 2 applies — stopping here per the review criteria.

@github-actions

Copy link
Copy Markdown

Last security-reviewed head: a24ddf5138d8131ef234b998a8cb2d0b0e5309e8. On the next push, the relevance gate compares only the commits since this SHA; delete this comment to force a full re-review.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a24ddf5138

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/repo-fleet-hygiene/README.md Outdated
Comment thread plugins/repo-fleet-hygiene/README.md Outdated
Comment thread plugins/repo-fleet-hygiene/skills/audit/SKILL.md Outdated
@github-actions

github-actions Bot commented Aug 15, 2026

Copy link
Copy Markdown

Claude has reviewed this PR 2 times. The lane skips further automatic reviews after 5; deleting this comment resets the count.

kyle-sexton and others added 2 commits August 15, 2026 04:40
The skill body told an agent to reject `audit D:` while the bundled
script accepted it. #2638 shipped bare positional paths and drive roots
and replaced the project-directory fallback with a hard scope failure;
#2646 landed eight minutes later from a branch cut before it, and its
rebase carried the pre-#2638 prose forward as a revert.

Restores, against the script as it actually behaves on main:

- the bare positional `<dir>` form, in the argument list and the hint
- `--project-dir` as a config rung only, not a scope fallback
- the no-scope paragraph, which now describes the hard failure and its
  remedies instead of the removed project-directory target
- the reject-outside-this-grammar clause, which now says plainly that a
  bare path IS in the grammar and only unknown flags are refused

Also documents `bare-repo-with-working-tree` (#2633/#2602), whose
handoff row was dropped by the same revert, and corrects the
machine-wide-discovery claim in the README and plugin description: the
ladder is not built, a no-scope run fails, and #2599 tracks it.

Catalog regenerated from the manifest.

Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
Bump to 0.22.1 with a CHANGELOG entry so plugin-file edits clear
changelog-parity. Align the audit skill description/Purpose with the
cross-repository wording already used in README and plugin.json, replace
the stale no-argument Quick start with an explicit --repo example, and
stop naming closed #2599 as the tracker for the still-unshipped
machine-wide discovery ladder.

Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
@cursor
cursor Bot force-pushed the fix/2599-skill-grammar-restore branch from 2608220 to fd4168c Compare August 15, 2026 04:40
@kyle-sexton
kyle-sexton enabled auto-merge (squash) August 15, 2026 04:40
@claude

claude Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Claude finished @cursor[bot]'s task in 2m 46s —— View job


Code review complete

  • Gather context (PR diff, docs/CATALOG.md, changed files, prior review threads)
  • Run /review:code-review skip-gate check
  • Review changed files against audit-fleet.sh on origin/main and prior findings
  • Adversarial validation of candidate findings
  • Post final findings

Skip-gate check: PR is open, not a draft, and the change is substantive (grammar-correctness + capability-claim restoration across a skill's documented contract). Full review performed.

What changed since the last review round: the newest commit (fd4168c) already resolves both open threads from the prior rounds:

Verification performed: re-checked every restored behavioral claim directly against origin/main's plugins/repo-fleet-hygiene/skills/audit/scripts/audit-fleet.sh (read via git show):

  • Bare positional path → --root equivalent; -*) arm rejects only unrecognized dashed flags — matches lines 474-486.
  • normalize_discovery_root maps a drive-letter-only arg (D:) to D:/ — matches lines 45-51.
  • No-scope hard failure message — matches line 1069.
  • bare-repo-with-working-tree finding + git config --local core.bare false remedy — matches lines 956, 2432-2435.
  • --project-dir feeds only the project-scoped config rung, not a fallback — matches lines 592, 609.
  • docs/CATALOG.md's regenerated line is byte-for-byte identical to plugin.json's new description — confirmed.
  • plugin.json is well-formed and its version (0.22.1) matches the new CHANGELOG.md top entry.

I could not run node scripts/generate-catalog.mjs --check, generate-cheatsheet.mjs --check, or markdownlint-cli2 myself in this session (no approval for non-git Bash execution) — those author-claimed outputs remain unverified by me and are flagged as such rather than restated as independently confirmed.

Finding

plugins/repo-fleet-hygiene/README.md:3-4 (permalink) — outside this PR's diff hunks, so not inline-commentable.

The README's opening sentence still claims repo-fleet-hygiene "is the machine-wide coordination layer for repository hygiene... discover canonical repositories across the machine." This is the exact overclaim this PR's "Also corrected" section exists to remove — and it now directly contradicts the capability-table row 30 lines below in the same file, which this PR just changed to say machine-wide no-argument discovery is "Not shipped." A reader hits the contradiction within the first screen of the README. Recommend rewording the intro to "cross-repository" / "across configured roots," consistent with the language this PR already applied to the capability table, plugin.json, docs/CATALOG.md, and SKILL.md.

Fix this →

No other correctness or maintainability issues found — the restored argument grammar, the no-scope failure copy, the --project-dir clarification, the bare-repo-with-working-tree table row, and the version/changelog bump all verified accurate against the script and against each other.

@kyle-sexton
kyle-sexton merged commit 6303241 into main Aug 15, 2026
42 of 44 checks passed
@kyle-sexton
kyle-sexton deleted the fix/2599-skill-grammar-restore branch August 15, 2026 04:47
cursor Bot pushed a commit that referenced this pull request Aug 15, 2026
)

No linked issue


## Summary

The skill body instructed an agent to **reject
`/repo-fleet-hygiene:audit D:`** — the exact invocation #2599 exists to
enable — while the bundled script accepted it. This restores the
documented grammar to match the script as it actually behaves on `main`.

## Fix

PR #2638 shipped bare positional paths and drive roots, and replaced the
project-directory scope fallback with a hard failure that names its
remedies. PR #2646 merged eight minutes later from a branch cut before
it; the rebase was textually clean but carried pre-#2638 prose forward,
reverting the skill layer while leaving the script untouched.

Restored, each verified against `origin/main`'s `audit-fleet.sh`:

| Restored | Script behaviour it now matches |
|---|---|
| bare positional `<dir>` in the argument list and `argument-hint` |
`:484` `[[ -n "$1" ]] \|\| fail "bare path requires a directory"`, with
`normalize_discovery_root` mapping `D:` → `D:/` |
| `--project-dir` documented as a config rung only | project dir is no
longer a scope target anywhere in the script |
| the no-scope paragraph, rewritten to describe the hard failure |
`:1069` `fail "no scope resolved: no bare path, --root, or --repo, and
no config-supplied fleet.root/fleet.repo"` |
| the reject-outside-the-grammar clause | now says plainly that a bare
path **is** in the grammar; only an unrecognized `-`-prefixed flag is
refused, matching the script's `-*)` arm |

Also restores the `bare-repo-with-working-tree` handoff row (#2633 /
#2602), dropped by the same revert — `git grep -c` on `main` returned 0
— with its documented remedy (`git config --local core.bare false`) and
the fact that linked worktrees keep working, since the state looks
alarming and is not.

## Also corrected: an unimplemented capability claimed as shipped

`README.md` and the plugin description both claimed **machine-wide**
repository discovery. It does not exist: `grep -n "ghq\|claude\.json"`
over the landed script returns nothing, only the configured-roots rung
is implemented, and a no-argument run hard-fails. The README row is
split into what shipped (bounded discovery via bare path, drive root,
`--root`, `--repo`, config rungs) and what did not (the ghq /
configured-roots / agent-state / bounded-sweep ladder, still unshipped
remaining contract work). The plugin description now says
"Cross-repository" rather than "Machine-wide".

`docs/CATALOG.md` regenerated from the manifest rather than hand-edited.

## Verification

```
node scripts/generate-catalog.mjs --check     → Catalog is in sync with the manifests.
node scripts/generate-cheatsheet.mjs --check  → Cheat sheet is in sync with skill frontmatter.
markdownlint-cli2 (SKILL.md, README.md)       → 0 error(s)
check-skill.sh audit                          → all 8 base-ref trigger phrases preserved
                                                description 642/1536 chars
                                                SKILL.md 302/500 lines
                                                markdownlint clean
```

The trigger-preservation check matters here specifically: the plugin
description was reworded, and that gate fails on a silently dropped
trigger phrase.

Version bumped to 0.22.1 with a CHANGELOG entry so changelog-parity
clears for the plugin-file edits.

## Why nothing caught this

`scripts/docs-only-paths.txt` contains exactly one prefix
(`docs/topics/`), so `plugin-gate` **did** run the full suite on #2646 —
all 38 checks green. There is simply no assertion tying `SKILL.md` prose
to the script's actual argument parser. That gap is worth its own issue:
this is the second silent revert on `main` in a day (the first was
#2633's stale-base squash, repaired by #2640), and both passed CI.

## Related

Refs #2599 (already closed by #2638; this PR only restores the
documented grammar that #2638 shipped).

---------

Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant