Commands
Slash commands available inside any Claude Code session with Hedwig installed.
Install from the marketplace, then add the learned scorer once. All you need is Claude Code.
# Install $ claude plugin marketplace add tanjalshukla/HedwigCLI $ claude plugin install hedwig@hedwig-marketplace # Turn on the online classifier (once per machine) $ /hedwig-setup # Pull the latest release later $ claude plugin update hedwig@hedwig-marketplace
Installed copies are pinned to a release, so run update to get new versions. Without /hedwig-setup the plugin still runs the deterministic heuristic scorer; the update just adds the learning classifier.
Shows how many edits were auto-applied vs. surfaced this session, with plain-English reasons for each surfaced edit. The primary dashboard. Run it after any task to see what Hedwig did and why.
# Example output
Hedwig · trust runtime
Auto-applied 8 ████████████████░░░░ 80%
Surfaced 2 for your review
8 of 10 edits auto-applied this session.
Why it surfaced these:
· api/routes.py: interface change, multi-file blast radius
· auth/tokens.py is security-sensitive, no prior history
Shows all-time totals across every session in this repo.
Shows how the learned classifier has drifted from its cold-start baseline, per feature, with direction. Every delta comes from real decisions in this repo, not synthetic data.
# Example output
Hedwig · learned classifier drift (42 real decisions; scorer ACTIVE)
▼ blast radius -8.60 (more cautious)
▲ change pattern risk +8.22 (more trusting)
▲ new file +5.07 (more trusting)
▼ prior denials -3.31 (more cautious)
▲ toward auto-apply ▼ toward check-in
all drift from real decisions, no weight hand-tuned
Shows "classifier not active" until /hedwig-setup has been run and at least 10 real decisions have accumulated.
Lists self-corrections: edits Hedwig auto-applied that were later reverted by the agent or failed end-of-turn verification. Each one tightened the next similar edit and fed a corrective signal to the classifier. An empty list means nothing auto-applied had to be walked back.
# Example output
Hedwig · 1 self-correction (auto-applied, then walked back)
• api/routes.py: reverted after auto-apply
This tightened Hedwig's next decision on that file
(and, via the classifier, on risk-similar edits elsewhere).
Reviews and confirms a behavioral pattern Hedwig has noticed. Patterns accumulate evidence silently; nothing changes until you confirm. Confirmed patterns fire in the governance cascade for future edits.
# Example output
Hedwig noticed a pattern:
Always surface api_change edits in this repo for review?
Why: you reverted 4 of the last 5 auto-applied api_change edits.
Backed by 5 decisions.
Confirm with /hedwig-learn confirm
Decline with /hedwig-learn reject
Declined patterns stay in the bank for transparency; they're not discarded. Confirmed patterns can be reviewed and revoked via /hedwig-rules.
Asks Claude to review this session's decisions and propose standing rules based on what it observed. Proposed rules are candidates only; nothing changes until you confirm them via /hedwig-learn.
# Propose rules from this session's traces /hedwig-notice # See the raw trace digest first /hedwig-notice traces
Every proposed rule cites the real trace IDs behind it. Uncited proposals are rejected automatically.
Views or sets hard constraints: non-negotiable path rules that override all scoring. Use deny to block a path entirely, check_in to always surface it, or allow to always auto-apply.
# List current constraints /hedwig-rules # Block all writes under config/prod/ /hedwig-rules add deny "config/prod/**" # Always surface changes to the auth module /hedwig-rules add check_in "auth/**" # Remove a constraint /hedwig-rules remove "config/prod/**"
Hard constraints are enforced before any scoring; they override leases, the classifier, and confirmed preferences. Path patterns use shell-glob matching against repo-relative paths.
Asks Claude to scan the repo for security-sensitive files that keyword matching alone would miss (config loaders, secret parsers, token handlers) and add them to Hedwig's security floor. Run once per repo.
# Scan and add findings to the security floor /hedwig-scan
Files added here are treated like auth.py: always surfaced for review, regardless of what the classifier learns. Nothing changes until you confirm the scan's proposals.
Shows what Hedwig has stored about this repo: style guidelines, logic notes, and security facts. This is the memory layer that surfaces into the agent's context before each task.
# View stored guidelines /hedwig-memory guidelines # View logic notes /hedwig-memory notes # View security facts /hedwig-memory security
Shows which files tend to change together in this repo, based on past sessions. Useful for understanding blast radius and catching edits that touch only half of a coupled pair.
# Show co-change pairs /hedwig-cochange
Computed from session history in this repo. More sessions = better signal.