Agent Scorecard
Display the current session's compliance scorecard based on ground-truth hook data.
Process
- Read
.claude/sessions/compliance.jsonl - Find the most recent
session_startevent - Aggregate all events since that start:
edit_complianceevents (was_read_first, was_overridden)commit_complianceevents (tests_passed_first, was_overridden)safety_triggerevents (pattern, severity, occurrence)override_grantedevents (action, reason)
- Calculate session score (start at 10, deductions for violations)
- Build and display the scorecard
Score Calculation
- Start at 10.0
- Each unread edit: -1.0 (overridden: -0.5)
- Each untested commit: -1.5 (overridden: -0.75)
- Each safety trigger: -0.5
- Repeated violations (>5 total): -0.25 per additional
Output Format
+----------------------------------------------------------+
| AGENT SCORECARD -- YYYY-MM-DD |
+----------------------------------------------------------+
| Score: X.X / 10 ######.... |
| Edits without reading first: N / M XX% |
| Commits without tests: N / M XX% |
| Destructive commands caught: N |
| Timeline: |
| HH:MM EDIT file.py (read first) |
| HH:MM EDIT other.py ** NOT READ ** |
| HH:MM COMMIT (tests passed) |
+----------------------------------------------------------+
Rules
- Only show data from the CURRENT session (since last session_start)
- Never fabricate data — if compliance.jsonl is empty, say so
- Show the timeline in chronological order
- Score is calculated, never estimated