Add claude-permit report --html subcommand: v1 system snapshot #10
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#10
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
First iteration of a static HTML dashboard for
claude-permit. Renders a read-only system snapshot so the user can actually see their current config — rules, config paths, audit log size — without grepping through TOML files. No audit-log parsing in this iteration; that's the follow-up (#1).Supersedes the
statsnaming in #1: the subcommand is renamed toreport --htmlso it can grow tabs/sections (inventory, stats, trends) over time without a later rename.Command
Generates a self-contained HTML file (inline CSS/JS, no external assets). Single-binary feel preserved — no server process.
What's needed
Header strip (top of page)
~/.claude/claude-permit/config.toml,auto-rules.toml,audit.jsonldeny, Nask, Nallow, Ndeny_promote, N auto-promotedRules section (four tables, one per kind)
Columns:
command,file_pathregexes)config.tomlvsauto-rules.tomlpromoted_at, LLM reasoning (if present)Sortable client-side. No filter UI in v1.
Data sources
config.toml(user-managed rules)auto-rules.toml(machine-managed, auto-promoted)Nothing from
audit.jsonlin this iteration — deliberately scoped out.Out of scope (deferred)
audit.jsonl(counts, trends, latency, hit rates) — that's #1Relationship to other issues
stats) → renamed toreport --htmland becomes the follow-up: adds an audit-log-driven "Stats" section to this same report (session scorecards, trends, hit counts, LLM latency). Shares the HTML skeleton and command built here.Design considerations
claude-permit report --html out.htmland opens in a browser. No server, no build step, no external CDN dependencies.Context
Motivation: user has zero visibility into the system right now. First tangible step toward observability is seeing the state that already exists in TOML files.
Implemented.
report --htmlsubcommand wired in src/main.rs:42 and src/main.rs:107, with dedicated src/report.rs module. Implementing commits:ee98754(feat),84dc662(fixes),aba0b60(regression tests).