Files
claude-foundations/context/transcript-tracking.md
Paul O'Reilly 6dfa20c47c End-of-session: transcript tracking log, context update, README docs
- Add session log (2026-04-13) covering transcript backup tracking system
- Add context/transcript-tracking.md: first-run verification checklist for
  the Sonnet subagent path in /log
- Update CONTEXT.md with transcript tracking entry
- Update README.md: document extract-transcripts.py and list-transcripts-here.sh;
  note that install-hooks.sh now covers skill-helper scripts too
- Prune 3 reflected logs older than retention_days (7): 2026-03-23, -25, -29

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 14:09:22 +12:00

1.9 KiB

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