# Transcript Tracking System — Pending Verification ## Status Built and committed (2026-04-13, commit `6fd0dac`). Pending first real-run verification. ## What was built - `pre-compact-backup.sh` — fixed to derive transcript path from `session_id+cwd`; now registers each backup in `~/.claude/transcript-backups/tracking.json` - `extract-transcripts.py` — manages tracking.json; modes: `--register`, `--list`, `--extract`, `--mark-all-processed` - `list-transcripts-here.sh` — wrapper for `--list $(pwd)` (needed because SKILL.md bang commands reject `$()` substitution) - `/log` skill (in custom-claude-skills) — spawns Sonnet subagent to read JSONL backups and write `HHMMSS-transcripts.md` companion log ## What to verify on first real run When `/log` is run in a session where context compression fired at least once: 1. Check `~/.claude/transcript-backups/tracking.json` has an entry for the session with `processed: false` 2. Run `/log` — it should show unprocessed transcripts in the pre-gathered metadata 3. The Sonnet subagent should write `memory/log/YYYY-MM-DD.HHMMSS-transcripts.md` in the **project directory** (absolute path) 4. After `/log` completes, `tracking.json` entry should show `processed: true` with a `log_file` path **Known risk:** The subagent prompt template asks it to write to `[PROJECT_ABS_PATH]/memory/log/...` — if it uses a relative path from the wrong cwd, the file lands in the wrong place. If that happens, update the subagent prompt in `/log` SKILL.md to include an explicit `cd [CWD]` instruction. ## Files - Hook: `~/dev/claude/projects/claude-foundations/hooks/pre-compact-backup.sh` - Scripts: `~/dev/claude/projects/claude-foundations/scripts/extract-transcripts.py` and `list-transcripts-here.sh` - Symlinked to: `~/.claude/scripts/` - Skill: `~/dev/claude/projects/custom-claude-skills/skills/log/SKILL.md` - Tracking state: `~/.claude/transcript-backups/tracking.json`