audit · diff
git:20260819.2e7ae9e to git:20261014.dae3501
46 added, 36 removed. Audit A to A.
---
name: audit
description: "Umbrella for the audit family. Routes to the sub-audits: knowledge (backlog→knowledge promotion), config (CLAUDE.md/settings drift), style (mine session-log history for revealed working-style rules), and usage (value/ROI report for your own corpus). Use '/audit' for a menu, or '/audit knowledge|config|style|usage|all' to skip it. Trigger: '/audit', '/audit usage', 'run an audit', 'audit everyth..."
argument-hint: "[knowledge|config|style|all]"
allowed-tools: Read, Glob, Grep, Bash, Skill
---
# /audit — Audit Family Dispatcher
- A thin umbrella over the four sub-audits. `/audit` does not scan anything itself — it resolves which sub-audit(s) the user means, then delegates to the sub-skill that owns the actual work. Think of it as a menu + router, not another audit implementation.
+ A thin umbrella over the six sub-audits. `/audit` does not scan anything itself — it resolves which
+ sub-audit(s) the user means, then delegates to the sub-skill that owns the actual work. Think of it
+ as a menu + router, not another audit implementation. **The `/audit <verb>` forms are the canonical
+ invocations for the whole family** (see "Canonical forms and compatibility" below).
- ## Step 0: Parse the Verb
+ ## Step 0: Parse the Verb (+ passthrough arguments)
- `/audit` takes at most one trailing verb. Resolve it against the grammar below before doing anything else.
+ `/audit` takes a **verb followed by optional arguments**. Resolve the FIRST token against the
+ grammar below before doing anything else. **Arguments are legal only AFTER a recognized verb** —
+ any remaining tokens after a recognized verb are passed through to the sub-skill unchanged (e.g.
+ `/audit style recent`, `/audit rules promote R1 R3`). An unrecognized first token always hits the
+ unknown-verb branch, exactly as before — passthrough never weakens the never-silently-guess rule.
| Input | Resolution |
|---|---|
| `/audit` (bare, no argument) | Present the **bare-menu** (Step 1) and wait for a pick. |
- | `/audit knowledge` | Delegate directly to `audit-knowledge` (Step 2). |
- | `/audit config` | Delegate directly to `audit-config` (Step 2). |
- | `/audit style` | Delegate directly to `audit-style` (Step 2). Style is **opt-in only** — see the note at the end of this section. |
- | `/audit usage` | Delegate directly to `audit-usage` (Step 2). Usage is **opt-in only** — same note as style. |
- | `/audit all` | Run all four sub-audits in sequence — knowledge → config → style → usage — each to completion, then print a combined one-line tally (Step 3). |
- | anything else (unrecognized verb) | **Unknown-verb branch** — do not guess or silently fall through. List the valid verbs and stop: *"'{verb}' is not a valid /audit sub-command. Valid verbs: knowledge, config, style, usage, all. Run bare `/audit` for a menu."* |
+ | `/audit knowledge [args…]` | Delegate to `audit-knowledge` with the args (Step 2). |
+ | `/audit config [args…]` | Delegate to `audit-config` with the args (Step 2). |
+ | `/audit style [args…]` | Delegate to `audit-style` with the args (Step 2). Style is **opt-in only** — see the note at the end of this section. |
+ | `/audit usage [args…]` | Delegate to `audit-usage` with the args (Step 2). Usage is **opt-in only** — same note as style. |
+ | `/audit rules [args…]` | Delegate to `audit-rules` with the args (Step 2) — e.g. `/audit rules promote R1 R3`. Rules is **opt-in only** — same note as style. |
+ | `/audit share [args…]` | Delegate to `audit-share` with the args (Step 2) — batch-review personal knowledge for promotion to the team-shared tier. Share is **opt-in only** — same note as style, and it additionally requires the shared-knowledge config (`projects_enabled` plus a non-empty `projects_shared_knowledge`). |
+ | anything else (unrecognized verb) | **Unknown-verb branch** — do not guess or silently fall through. List the valid verbs and stop: *"'{verb}' is not a valid /audit sub-command. Valid verbs: knowledge, config, style, usage, rules, share. Run bare `/audit` for a menu."* |
- **Style is opt-in, never routine.** `/audit style` only runs when explicitly selected — either the user types `/audit style` / `/audit all` directly, or picks "style" off the bare-menu in Step 1. It is never fired automatically by the SessionStart audit-cadence nudge the way `/audit-knowledge` and `/audit-config` can be — session-start cadence checks are a knowledge/config concern, not a style-mining concern, so `/audit style` stays a deliberate, explicit action every time.
+ **Style, usage, rules and share are opt-in, never routine.** They run only when explicitly
+ selected — the user types the `/audit <verb>` form directly, or picks it off the bare-menu in
+ Step 1. None of the four is ever fired automatically by the SessionStart audit-cadence nudge the
+ way `/audit knowledge` and `/audit config` can be — session-start cadence checks are a
+ knowledge/config concern; style-mining, usage reporting, rule-mining and cross-tier sharing stay
+ deliberate, explicit actions every time. Share carries the strongest form of this: it writes into
+ a team-shared and possibly public repo, so it is never anything but an explicit, per-item choice.
## Step 1: Bare `/audit` — Present the Menu
- When invoked with no argument, present the four options and wait for the user to pick one before doing anything else:
+ When invoked with no argument, present the options and wait for the user to pick one before doing anything else:
> **Which audit?**
> 1. `knowledge` — scan Claude memory and plans for extractable knowledge (backlog → promotion review)
> 2. `config` — check CLAUDE.md files, plugin manifests, and knowledge docs for drift and staleness
> 3. `style` — mine session-log history for revealed working-style rules (opt-in — not part of routine cadence)
> 4. `usage` — value/ROI report for your own corpus (cost + quality + trends; opt-in — not routine cadence)
- > 5. `all` — run all four in sequence, then a combined tally
+ > 5. `rules` — mine your distilled corrections for promotable standing rules (opt-in — not routine cadence)
+ > 6. `share` — batch-review personal knowledge for promotion to the team-shared tier (opt-in; requires the shared-knowledge config)
Do not default to any one sub-audit and do not run anything before the user picks. A bare `/audit` with no reply is a no-op — exit cleanly, nothing was scanned.
## Step 2: Delegate to a Resolved Sub-Skill
- Once a verb is resolved (from Step 0's direct-invocation column or Step 1's menu pick), delegate to the matching sub-skill via the `Skill` tool, with no additional arguments — the sub-skill runs its own full step sequence (config resolution, cadence/mode determination, findings presentation, user review, promotion) exactly as it would under direct invocation:
+ Once a verb is resolved (from Step 0's direct-invocation column or Step 1's menu pick), delegate to the matching sub-skill via the `Skill` tool, **passing through any trailing arguments from the invocation** — the sub-skill runs its own full step sequence (config resolution, cadence/mode determination, findings presentation, user review, promotion) exactly as it would under direct invocation:
- - `knowledge` → Use the `Skill` tool to invoke `audit-knowledge`.
- - `config` → Use the `Skill` tool to invoke `audit-config`.
- - `style` → Use the `Skill` tool to invoke `audit-style`.
- - `usage` → Use the `Skill` tool to invoke `audit-usage`.
+ - `knowledge` → Use the `Skill` tool to invoke `audit-knowledge` (with any passthrough args).
+ - `config` → Use the `Skill` tool to invoke `audit-config` (with any passthrough args).
+ - `style` → Use the `Skill` tool to invoke `audit-style` (with any passthrough args).
+ - `usage` → Use the `Skill` tool to invoke `audit-usage` (with any passthrough args).
+ - `rules` → Use the `Skill` tool to invoke `audit-rules` (with any passthrough args).
+ - `share` → Use the `Skill` tool to invoke `audit-share` (with any passthrough args).
`/audit`'s job ends at the handoff — it does not re-implement, intercept, or post-process what the sub-skill does. Whatever the sub-skill reports (findings, promotions, "nothing new to extract") is the final output of that leg.
- ## Step 3: `/audit all` — Sequence + Tally
-
- `/audit all` runs the four sub-audits **in sequence, each to completion**, not in parallel and not short-circuited on an early empty result:
-
- 1. Use the `Skill` tool to invoke `audit-knowledge`. Let it run its full flow (including any user-review prompts) to completion.
- 2. Use the `Skill` tool to invoke `audit-config`. Let it run its full flow to completion.
- 3. Use the `Skill` tool to invoke `audit-style`. Let it run its full flow to completion.
- 4. Use the `Skill` tool to invoke `audit-usage`. Let it run its full flow to completion.
-
- After all four finish, print a combined one-line tally summarizing what each leg did, e.g.:
-
- > **Audit all — summary:** knowledge: 3 promoted, 1 rejected · config: 2 drift items flagged, 0 fixed · style: 1 rule candidate staged · usage: report written.
-
- If any leg errors or the user backs out mid-leg (e.g., declines a runtime-mismatch gate), note that leg as incomplete in the tally rather than silently omitting it, and continue to the next leg — one leg's early exit doesn't cancel the other two.
+ ## Canonical forms and compatibility
- ## Back-Compat: Direct Sub-Skill Invocation Still Works
+ **The `/audit <verb>` space forms are the canonical, advertised invocations for the whole family.**
+ Every doc, help table, and cadence nudge names them — the SessionStart audit-cadence nudge says
+ `/audit knowledge` and `/audit config`.
- `/audit` is an added convenience layer, not a replacement. `/audit-knowledge` and `/audit-config` remain **directly invocable** exactly as before — nothing about adding `/audit` changes their standalone triggers, and the SessionStart audit-cadence nudge continues to name them directly (`/audit-knowledge`, `/audit-config`) rather than routing through `/audit`. `/audit-style` and `/audit-usage` are likewise directly invocable. Use `/audit knowledge|config|style|usage` when you want the umbrella's menu/tally framing; use the bare `/audit-knowledge` / `/audit-config` / `/audit-style` / `/audit-usage` forms when you want that one audit with no dispatcher layer in between. Both paths land on the same sub-skill — this is a routing convenience, not a new code path.
+ **Compatibility aliases (never advertised):** `/audit-knowledge` · `/audit-config` · `/audit-style` · `/audit-usage` · `/audit-rules` — all still resolve.
+ The sub-skill files are this dispatcher's delegation targets and keep their names, but the
+ hyphenated forms are aliases, not separate behaviour, and are never advertised as the canonical
+ form (the same posture as the legacy `linear` spellings elsewhere in the family). Both paths land
+ on the same sub-skill.
## Rules
- - **Never silently guess a verb.** An unrecognized argument always hits the unknown-verb branch in Step 0 — list the valid verbs and stop.
- - **Never auto-run style or usage.** `/audit style` and `/audit usage` fire only on explicit selection (direct invocation or menu pick) — never as part of a cadence nudge or as part of resolving a bare `/audit` without a menu pick.
+ - **Never silently guess a verb.** An unrecognized first token always hits the unknown-verb branch in Step 0 — list the valid verbs and stop. Passthrough args exist only after a recognized verb.
+ - **Never auto-run style, usage, rules, or share.** They fire only on explicit selection (direct invocation or menu pick) — never as part of a cadence nudge or as part of resolving a bare `/audit` without a menu pick.
- **Never reimplement sub-audit logic here.** This skill's job is parse-and-delegate; all scanning, cadence math, and promotion logic lives in the sub-skill being delegated to.
- - **`/audit all` is sequential, not short-circuited.** Every leg runs to completion regardless of what the prior leg found, and every leg's outcome (including "declined" or "errored") shows up in the final tally.
+ - **There is no run-everything verb.** `all` was removed in v2.50.0: six sub-audits is past the point where a blind sequence is a sensible default, and four of the six are opt-in by design — a run-everything would have been firing them against their own stated posture.