---
name: code-checkpoint
description: Save in-progress code work as a structured WIP commit — decisions, remaining steps, blockers — so a crashed session, context compaction, or PTO doesn't lose what you've already figured out. Use mid-way through multi-step code work, before risky operations, or before pausing for the day.
allowed-tools:
  - Bash
  - Read
---

Save a checkpoint for the current code work.

Refuses to run on `trunk` / `main` / `master` — checkpoints live on feature branches only.

Run:
```
scripts/checkpoint.sh "$SUMMARY" $ARGUMENTS
```

Where `$SUMMARY` is a one-line description ("paytrace review halfway", "RSM dashboard wiring embeddings module") and `$ARGUMENTS` are zero or more of:

- `--decision "<text>"` — a choice you made and why (one flag per decision)
- `--remaining "<text>"` — a step still to do (one flag per item)
- `--blocked "<text>"` — something waiting on a person/build/answer

When the TAM asks you to checkpoint or you're about to pause multi-step work, draft a proposed summary + decisions + remaining + blocked from the conversation context, present it for confirmation, then run the script.

The commit lands on the current feature branch only — never pushed automatically. To recall it next session: `scripts/context_restore.sh` (or use the `code-resume` skill).

For an overview of all in-flight checkpoints across branches: `python3 scripts/code_checkpoint_nudge.py list`

Background docs: `docs/checkpoint-mode.md`
