- Canonical invocation pattern (works from any folder):
python /path/to/context_checkpoint.py --repo-root <TARGET_REPO> <snapshot|resume> ...
- Checkpoint files live in
<repo-root>/runtime/checkpoints/by default. - Optional override:
--checkpoint-dir <PATH>- relative paths are resolved from
--repo-root; absolute paths are used as-is.
- Update both
runtime/checkpoints/LATEST.mdandruntime/checkpoints/LATEST.jsonat:- phase start
- post-green tests
- PR open
- post-merge
- Use per-workstream tracks so parallel agents do not overwrite each other.
- Required track protocol:
- every
snapshotmust include--track "<WORKSTREAM_NAME>"(required) - example tracks:
MNO_LEAN_RETRIEVAL WORK,JX_JUMP_DEBUG WORK - use
--no-set-currentwhen checkpointing a secondary parallel track - never delete another track from
LATEST.*; append/update only your own track
- every
--extraprotocol:- every
--extraentry must bekey=value - malformed entries fail fast; do not pass free-form strings
- every
LATEST.mdmust include:## CURRENT(selected track summary)- one
## <WORKSTREAM_NAME>section for each parallel stream
LATEST.jsonmust include:current_tracktracksmap keyed by workstream name
- Include
step,note,branch,head,next_cmd, and validations per track. - Snapshot example:
python /path/to/context_checkpoint.py --repo-root . snapshot --step "phase start" --note "beginning implementation" --next-cmd "python -m pytest -q" --track "MNO_LEAN_RETRIEVAL WORK"
- Resume order after compaction/crash:
- read
LATEST.md+LATEST.json - verify
git status --short --branchand head commit (if available) - resume your track and run that track's
next_cmd(python /path/to/context_checkpoint.py --repo-root . resume --track "<WORKSTREAM_NAME>") - write fresh checkpoint before edits
- read