Files
ai-agent/scripts/schema-baseline.json
Gabriel Vidal 71572a63fc feat(ai-agent): transcript schema-drift checker + parser canary
Claude Code's on-disk JSONL transcript format is internal and undocumented,
so a CLI update can silently break backend/conversations.py. Add
scripts/schema-drift.py as the early-warning system: it diffs a structural
footprint (key paths + content-block types, no values) of recent
~/.claude/projects transcripts against a committed baseline, and runs the
real parser over the same files cross-checking its summary against raw
record counts (usage turns, tokens, models, timestamps). New CC versions
are INFO-only; new schema paths or a failed invariant exit 1.

Baseline generated from the 300 newest transcripts (cc 2.1.206-207);
verified the check trips on a simulated usage-key rename.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 22:07:04 +02:00

9.5 KiB