Add audit subcommand for rule review-and-promote workflow #9
Labels
No labels
enhancement
observability
research
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jbr870/claude-permit#9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Add a
claude-permit auditsubcommand that turns audit-log observations into actionable rule candidates. Complements #1 (stats subcommand): #1 answers "what happened?", this one answers "what rule should I add next?".The system already auto-promotes GREEN LLM decisions to
auto-rules.toml. The review-and-promote workflow is about the cases auto-promote deliberately skips — patterns that keep hitting the LLM tier (YELLOW / latency / token cost) or pass through to Claude Code's built-in rules without a deterministic match.Relationship to #1
audit.jsonl, both do frequency aggregation and time windowing.Also related: the existing
/auditskill already provides an interactive review workflow. This subcommand is the non-interactive, CLI-reportable counterpart.What's needed
1. Analysis
claude-permit auditparsesaudit.jsonland surfaces actionable insights:git diffvariants, allnpm runvariants)2. Rule suggestion
Given a passthrough / LLM-tier pattern, emit a concrete
config.tomlrule (tool regex + field regex) that would catch it. Include a dry-run / backtest:3. Documented workflow
Step-by-step guide for the review-and-promote cycle: when to do it, what to look for, how to validate new rules before committing them.
Design considerations
Context
Severity: Feature gap
Affected: User workflow,
config.tomlDiscovered: 2026-02-26
Migrated from
devwork/inbox.md.