Add stats subcommand #1
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#1
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
Adds an audit-log-driven Stats section to the
claude-permit report --htmlsubcommand. Turnsaudit.jsonlinto aggregates — session scorecards, trends, hit counts, LLM latency — rendered alongside the rules inventory built in #10.Precursor
#10 — establishes the
claude-permit report --htmlsubcommand and the v1 HTML shell (header strip + rules tables, no audit data). This issue is the follow-up that layers audit-log-driven sections on top of that shell.User Stories Served
Suggested Capabilities
Rendered as sections within the HTML report from #10:
CLI flags to filter what the report includes:
--since 7d— time window--session <id>— single-session focus--json— machine-readable alternative to HTML (optional)Context
See wiki: Data Capture Analysis — "Structural Issues §3: No aggregation layer"
The raw data in
audit.jsonlis comprehensive. The gap is purely in consumption — no code reads the log today except the/auditskill doing manual jq-style filtering.Related: #9 —
auditsubcommand for rule review-and-promote workflow. Overlaps on the audit-log parsing layer; if this ships first, #9 can build on the shared parsing code rather than duplicating it.Sibling issue filed: #20 (friction insights). Split: this issue (#1) owns the pure descriptive stats (latency, hit counts, totals, trends — neutral data); #20 owns the opinionated friction view (promote/deny/stuck flags, suggestions). Both render as separate sections in the same HTML report.