<!-- Pattern adapted from Hugo Sant'Anna's clo-author v4.2.0 (github.com/hugosantanna/clo-author),
used with permission. Original /checkpoint shape: project-level session handoff with
state snapshot + memory updates. This implementation is reimplemented in original
prose against this template's narrative-session-log + plan-on-disk + auto-memory
architecture. Attribution credit: Hugo Sant'Anna. -->
/checkpoint — Structured Session Handoff
Produce a state snapshot that the next session (yours, or a collaborator's, or a fresh-context reboot) can resume from in under a minute. The narrative quality_reports/session_logs/ continues to live separately — /checkpoint writes the structured side: facts, file pointers, and next-actions.
When to use
- Before a long break, model switch (Opus ↔ Sonnet ↔ Haiku), or end of a working day.
- Before auto-compaction would otherwise discard mid-plan context (paired with the PreCompact hook).
- Before handing off to a collaborator on the same repo.
- After completing a chunk of a multi-session plan, when "where am I" is the first question the next session will ask.
When NOT to use
- For the narrative what happened — that lives in
quality_reports/session_logs/(see.claude/rules/session-logging.md). - For commit messages — those go through
/commit, which writes its own structured commit body. - For decisions about alternatives — those go to
templates/decision-record.mdviaquality_reports/decisions/.
The three artifact types are complementary: session-log = narrative, decision-record = trade-off captured, checkpoint = state to resume from.
Workflow
PHASE 1 — Gather state
Read, in this order:
- Most recent plan —
ls -t quality_reports/plans/*.md | head -1. Extract: status (DRAFT / APPROVED / COMPLETED), title, top-level files-to-modify list, and any line that begins with "Open questions" / "Risks" / "Next". - Most recent session log —
ls -t quality_reports/session_logs/*.md | head -1. Extract: latest "Next steps" or "Blockers" lines. - MEMORY.md root — read the table of
[LEARN]entries already on disk so you don't propose duplicates. - Git state —
git log --oneline -20,git status -s,git branch --show-current. Capture: current branch, last 5 subjects, uncommitted file count. - Working files —
git diff --stat HEADto see which files changed in this session (skip if branch is freshly cut; just say "no in-session edits"). - Active TODOs — if a TodoWrite list is in flight in this session, capture the in-progress + next-pending items.
- In-flight background work — anything this session started and did not wait for: a long-running compute job, a scheduled routine (
.claude/references/scheduled-routines.md), a queued render or compile, an external review still out with a referee or another model. For each, record four things: what is running, where its artifacts land, the command that checks on it, and the verdict that ends it.
If any of these reads fails (file missing), record "(none on disk)" rather than fabricating content.
A checkpoint that omits a running job orphans it. The next session sees no trace of the work, the artifacts land in a directory nobody is watching, and the job is either re-launched from scratch or quietly abandoned half-finished — both expensive, both invisible.
PHASE 2 — Write the checkpoint
Write only what this session established. The next session is handed this file automatically (