explanation-traces
Installation
SKILL.md
Explanation Traces: Structured Decision Query
Overview
This skill reads the per-dispatch route event log and presents routing decisions and their outcomes as a human-readable timeline. It answers "why did I get routed here?" from what was recorded at decision time — never from post-hoc reconstruction or rationalization.
The log: <CLAUDE_LEARNING_DIR>/route-events.jsonl, default ~/.claude/learning/route-events.jsonl. Append-only JSONL — one JSON object per line. Written via hooks/lib/route_events.py by two producers:
| Producer | Fires on | Appends |
|---|---|---|
hooks/routing-decision-recorder.py |
PostToolUse (Agent dispatch) | One DECISION event per /do-routed dispatch |
hooks/routing-outcome-finalizer.py |
UserPromptSubmit | One OUTCOME event when it finalizes a pending dispatch |
The log is auxiliary instrumentation: writes are failure-safe (worst case one lost line), and the aggregate routing rows in learning.db stay authoritative for the confidence loop.