/aria-knowledge:audit-rules [promote <labels>]from aria-knowledge
Mines memory feedback rows, rules backlogs, and always-on indexes for recurring user corrections that deserve promotion to numbered standing rules. Clusters by theme, verifies quotes at source, ranks by cross-session recurrence, and writes rules only on explicit approval.
Ships in aria-knowledge. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Canonical invocation: /audit rules (argument forms ride the umbrella too: /audit rules promote R1 R3). The direct /audit-rules form is retained for compatibility and is not advertised.
Mine the corpus your corrections have already accumulated in — memory feedback_* rows and their
indexes, the rules backlog, staged /audit style output — for candidates that have earned promotion
to numbered rules in rules/user-rules.md. This is a DEPTH pass on one shape (recurring user
corrections → standing-rule candidates); /audit knowledge remains the breadth pass that
dispositions everything. Evidence-gated end to end: a candidate that cannot show dated, at-source
verified receipts across ≥2 distinct sessions does not get proposed, and nothing writes a rule
except an explicit per-run approval naming the candidates.
Before Step 0: check that the Bash tool is available. This skill needs it (corpus greps, the
digest regeneration in Step 7). No Cowork counterpart of this skill exists — do not offer one.
If Bash is NOT available, say so and ask: "Stop here?" (y / n)
y / no response — exit cleanly; nothing scanned, nothing written.n — proceed in DEGRADED read-only mode: Steps 0–5 (analysis + report) using Read/Grep only,
and Step 7 (promotion mechanics) is unavailable — state that plainly in the report rather than
reporting any promotion as done.Opt-in only, never cadence-fired: like /audit style and /audit usage, this sub-audit runs
only on explicit invocation. No SessionStart nudge, activity threshold, or cadence may fire it.
Read ~/.claude/aria-knowledge.local.md; resolve knowledge_folder. If unconfigured, stop:
"aria-knowledge is not configured. Run /setup to get started."
If invoked as promote <labels> (e.g. /audit rules promote R1 R3): skip harvest entirely.
Resolve the labels from the newest staged block this skill previously wrote in
{knowledge_folder}/intake/rules-backlog.md (Step 6's stage disposition persists candidates WITH
their R-labels exactly so a later session can approve without re-harvesting). If no staged block
exists, say so and offer a fresh run. On resolution, jump to Step 7 for the named candidates only.
Harvest surfaces, in priority order:
{knowledge_folder}/rules/user-rules.md — the existing rule set (dedupe + amendment target).{knowledge_folder}/intake/rules-backlog.md — staged candidates, including /audit style's
receipt-gated output (that skill is this one's transcript-mining FEEDER; this skill never mines
transcripts itself).~/.claude/projects/<cwd-encoded>/memory/):
MEMORY.md and the feedback_*.md topic files.@-import chain from the project's CLAUDE.md lineage plus [[link]]/markdown-link references
from MEMORY.md rows, depth-bounded to 2 hops. Anything deeper is out of harvest scope and
the Step 5 scan-health section says so. Never a hardcoded path list — index layouts are
user-specific.{knowledge_folder}/intake/insights-backlog.md — corroboration only, never a primary
candidate source (an insight alone is below the Step 4 bar until a second instance
corroborates), and read only for entries newer than the boundary stamped in
{knowledge_folder}/logs/rule-audit-log.md (created lazily; the boundary advances only on a
stage/promote disposition, never on cancel).Scan the surfaces for the correction signature: a dated verbatim user quote attached to a behavioral instruction; a hard-prohibition clause ("NEVER…", "ALWAYS…") paired with an incident; a row naming two or more instances; a backlog entry typed as a rule candidate.
Cluster by THEME, not by row. Rows that cross-link each other or describe one behavior from different angles form ONE candidate (measured origin: the strongest candidate in this skill's reference run spanned three memory rows describing one turn-close behavior).
Against rules/user-rules.md by substance, not title — a candidate duplicating an existing
rule is DECLINED with that rule cited. Against the plugin-managed working-rules.md — duplicating
a numbered universal rule is likewise a decline-with-citation. Partial overlap yields the amend
disposition, naming the exact rule (or memory row) and clause it would amend.
For every quote a candidate relies on, open the topic file and confirm the quote and its date. An index row's slug or one-line summary is never evidence — a slug is an address, not an assertion, and index rows go stale against their topic files. If a row and its topic file disagree, the candidate carries the topic file's version, flagged, and the disagreement itself is surfaced in the report.
Classify each candidate:
Rank by: instance count across distinct sessions/arcs (the load-bearing axis) · quote
availability · cost-per-miss (what each recurrence cost). Candidates with ≥2 distinct instances
form the proposed set, labelled R1..Rn. Below the bar → the watch list, rendered in the
report with a named revisit trigger. Nothing harvested is silently dropped: proposed, watch,
declined-with-reason, or folded — every item lands in exactly one.
Emit-all fixed structure; a zero state is a distinct signal, never an omitted section.
Per proposed candidate: rule statement · verbatim quotes with dates · instance count · current home(s) · falsifier · what promotion costs (which rows collapse, which files get stamped) · TRANSCRIPTION/DERIVED tag · recommendation. Then: the watch list (each with its revisit trigger) · the declined list (each with its reason and the duplicated rule where applicable) · scan health (surfaces read · quotes verified at source vs unverifiable · hop-bound exclusions).
[approve <labels> | all | all minus <labels>] Promote the named candidates now (runs Step 7).
[stage] (default) Write/refresh the ranked candidates into rules-backlog.md WITH their
R-labels and recurrence evidence, for the normal /audit knowledge cadence.
No rule is written.
[cancel] Write nothing; the boundary does not advance.
The default never writes a rule. Promotion happens only on an explicit approve naming candidates
— Rule 23 embedded structurally. The staged block is the persistence surface for a later-session
promote <labels> re-entry. Advance the rule-audit-log.md boundary on stage/promote only.
promote <labels> re-entry)For each approved candidate, in order:
rules/user-rules.md (next U<n>, or apply the named amendment): a
lead paragraph carrying the operative claim, Why with the dated quotes, How to apply,
Falsifier, Origin with the approval stamp (who approved, when) and the source rows.bash "${CLAUDE_PLUGIN_ROOT}/scripts/check-rule-lead-bytes.sh" {knowledge_folder}/rules/user-rules.md. The always-on digest builder truncates each rule's
first paragraph at 240 BYTES (multi-byte punctuation counts ×2–3) — a failing lead is
reworded before proceeding, never shipped to truncate.###→#### with a disposition
note; bodies preserved.bash "${CLAUDE_PLUGIN_ROOT}/scripts/session-start-check.sh" </dev/null (empty stdin — the hook reads stdin and would block on an open one) — never by hand-editing
~/.claude/rules/aria-user-rules.md (its header forbids it; the generator rewrites it only
when the rendered content differs, so the rerun is cheap). Then verify: the emitted rule count includes the new rules, and none
of the NEW rules' digest lines carry a truncation ellipsis (scope the check to the new rules —
older rules may legitimately carry one).working-rules.md (plugin-managed). Promotion targets are user-owned surfaces only./audit style owns it and stages here. If a
promoted rule's census ever shows a correction that existed only in transcripts, that is the
named trigger to revisit this bound (and a capture-pipeline defect to fix at source meanwhile).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
rule-mining, correction-promotion, knowledge-audit, user-rules
npx claudepluginhub mikeprasad/aria-knowledge --plugin aria-knowledge40 skills in this plugin
/aria-assistMorning product-management review across all your projects. Use when the user runs /aria-assist, asks for a morning review / daily PM digest / "what should I do today across my products", or when the launchd job fires it headless. Two modes - `generate` (headless: read facts, deep-review ACTIVE projects, apply logged light writes, write the dated digest + per-project PM-REVIEW.md) and `review` (interactive: load today's digest, walk proposals, execute approved ones). Roster comes from projects_list; settings from pm_* keys in aria-knowledge.local.md. (Claude Code variant — full scheduler path. Other ports run manual-only generate/review.)/ask/ask — Query-Driven Knowledge CreationResearch a question, check existing knowledge first, draft a knowledge doc from the answer, and save directly to the appropriate category. Use when user says '/ask', 'ask about', 'research and save', 'I want to learn about', 'what is the pattern for'. Skips backlogs — the user reviews the answer in real-time before saving. (Code port — ADR-094.)/audit/audit — Audit Family DispatcherUmbrella for the audit family — the canonical way to run every sub-audit: '/audit knowledge' (scan memory and plans for extractable knowledge, backlog-to-promotion review), '/audit config' (CLAUDE.md/settings/docs drift and staleness), '/audit style' (mine session-log history for revealed working-style rules), '/audit usage' (value/ROI report over your own corpus), '/audit rules' (mine your distilled corrections for promotable standing rules), or '/audit share' (batch-review personal knowledge for promotion to the team-shared tier). Trigger: '/audit', 'run an audit', 'knowledge audit', 'config audit', 'audit my style', 'audit my rules', 'usage report', 'share knowledge', 'promote to team'.Other plugins' skills for the same job