hl-checkpoint
Checkpoint
Input: [--stuck]
Inspect the worktree state and any existing handoff file. A clean tree or a non-Git directory does not prove the context is saved.
Save objective, decisions, evidence, pending work, and next action where the project's handoff rules say. No rule: ask the user for a path. Do this before recommending a context reset.
Changes remain: offer commit, stash, leave files in place, or abort, and wait for the user's choice. Never commit or stash on your own. A requested stash uses git stash push --include-untracked, never --all, so ignored files such as credentials stay out; then check git stash list and git status before continuing.
Report the handoff path, what happened to the worktree, and anything not saved. Never clear the context yourself. Uncommitted files are not lost; do not say they are.
Stuck
With --stuck, diagnose the loop before any other attempt. Edit nothing.