Stats schema
The v2 stats.json schema — session buckets, lifetime counters, migration from v1.
All savings accounting is persisted at ~/.ashlr/stats.json. The schema is versioned; current is v2.
Top-level shape
LifetimeBucket
SessionBucket
Keyed by CLAUDE_SESSION_ID (or a PPID-derived fallback when the env var is absent).
CalibrationState
Migration from v1
v1 stats had a flat { tokensSaved, costSaved, byTool } shape without sessions. On first run of v1.2+, the stats file is auto-migrated: the flat totals are moved into lifetime, and sessions is initialized empty. The migration is non-destructive — v1 data is preserved in lifetime.
Session log
In addition to stats.json, every tool call is appended to ~/.ashlr/session-log.jsonl as a newline-delimited JSON event:
The session log is the source of truth for /ashlr-usage and /ashlr-dashboard. It is never read by the MCP servers during a session — only written.