Session Catchup Briefing
Read the state before changing it. Report it; do not act on it. Run everything fresh - never answer from cached or remembered state. An optional numeric argument sets how many recent commits to show (default 10).
Gather
- Git:
git status,git log --oneline -<N>, andgit diff --stat HEAD~<N>(fall back to the first commit if history is short). - Environment: active tmux sessions (
tmux list-sessions), python/venv presence if the project uses one. - Memory: list the project's auto-memory directory under
~/.claude/projects/<encoded-cwd>/memory/by modification time. - Tasks: check the task list for anything left in progress by a previous session.
- Handoff and state: read
HANDOFF.md, andSTATE.mdif the project keeps one, at the repo root.HANDOFF.mduses seven headings, in order: Goal; Files touched; Commands run (each with its exit code); Tried and failed; Open assumptions; Next single action; Written at (the output ofgit rev-parse HEAD). The verify command that proves the work sits under Commands run. Note each file's modification time and its status words so freshness can be checked against git (see Red flags). - Loam pin: only when
.copier-answers.ymlexists at the repo root (the project was seeded from Loam). Read its_commit. It is a red flag when_commitdoes not match^v[0-9]+\.[0-9]+\.[0-9]+$(a bare SHA, or agit describestring such asv2.1.0-39-g0d0cb03, is not a release tag), or when it is not the newest tag. Find the newest tag withgit -c http.lowSpeedLimit=1 -c http.lowSpeedTime=5 ls-remote --tags https://github.com/samyakjhaveri/loamsorted by version, ignore lines ending in^{}(thegh:shorthand is Copier-only and fails in git; the low-speed bound aborts the fetch after about 5 seconds when offline, withouttimeout). When it fails (offline), compare againstVERSIONin the template checkout (strip the leading v before comparing) only if_src_pathpoints to a reachable local Loam checkout; otherwise printpin check skipped: offline.
Red flags - put these at the TOP of the briefing
- Uncommitted changes or a detached HEAD.
- A merge or rebase in progress.
- Active tmux sessions that may be running long jobs.
- Memory files untouched for 14+ days.
- In-progress tasks from a previous session.
- A stale
HANDOFF.mdorSTATE.md. Flag either file when any of these hold:- its modification time is older than the last commit:
git log -1 --format=%ctversus the file's mtime (stat -f %m <file>on macOS,stat -c %Y <file>on Linux); - its status words contradict git: it says "uncommitted" or "dirty" while
git status --porcelainis empty; or "clean" or "committed" whilegit status --porcelainis non-empty; or "pushed" whilegit status -sbshows the branch ahead of its upstream; or its "Written at" hash is notgit rev-parse HEAD. Report the drift; the repository state overrides the handoff, never the reverse.
- its modification time is older than the last commit:
- Loam pin drift: print
Loam pin <commit> is not the latest release <tag>; run uvx copier update --trustwhen the pin is behind the newest tag, orLoam pin <commit> is not a release tagwhen_commitis not avX.Y.Ztag.
Briefing format
Keep it to one screen. State only - the user decides what to do with it.
=== CATCHUP BRIEFING ===
[red flags, if any]
Branch / status / last commit
Recent commits (N)
Changed files since HEAD~N (diffstat)
Environment: tmux / venv / python
Memory: file count, most recent, stale list
Handoff / State: next single action + verify command (or: none; or: STALE - hash / mtime / status words disagree with git)
Loam pin: _commit + verdict (latest / not the latest / not a release tag / offline) - or: not a Loam project
Open tasks (or: none)
=== END BRIEFING ===
