| name | save |
| description | Mid-session checkpoint (log, database, commit, push) without closing |
| user-invocable | true |
| argument-hint | [note] |
Mid-Session Checkpoint - Save progress without ending the session
Alias: /checkpoint
What it does:
- Create/update session log (append mode)
- Apply Post-Action Protocol (update project + database entities)
- Update diary if significant
- Git commit + push
- Continue working (session stays open)
When to use:
- After completing a significant chunk of work
- After external actions (email sent, deploy, DNS change)
- Before switching project/topic mid-session
- Long sessions where losing context would hurt
Instructions:
Step 1: Session Log (Append Mode)
If a log for today + current project already exists, append to it. Otherwise create new.
import os, glob
from datetime import date
today = date.today()
year = today.year
today_str = today.isoformat()
existing = glob.glob(f'diary/{year}/{today_str}-{project}-*.md')
if existing:
pass
else:
from brain_writer import create_log
create_log(today_str, f'{project}-checkpoint', """
## Work Done (checkpoint)
- [bullet points of work so far]
## Status
In progress - session continues
""", tags=['session', 'checkpoint', '{project}'], project='{project}')
Status: Always open (session is still active).
Step 2: Post-Action Protocol
2a. Update project file (ALWAYS)
| Cosa | Dove va | Dove NON va |
|---|
| Stato attuale | index.md — UNA riga, SOSTITUISCI | Non appendere timeline |
| Eventi datati | diary/YYYY/ con tag progetto | NON in index.md |
| Issue tracking | {progetto}/issues.md | NON in index.md |
2b. Update people/companies (if relevant)
2c. Update diary (se c'e lavoro concreto)
2d. When to ask vs. act
- Act without asking: updating existing files, appending to diary
- Ask first: creating new project files
- Heuristic: if 80%+ confident, just do it
Step 3: Cleanup Backup Files
ls -t .claude.json.backup.* 2>/dev/null | tail -n +3 | xargs rm -f 2>/dev/null
Step 4: Git Commit + Push
Push sul branch corrente, sul remote tracked. Niente assunzioni su main o su uno specifico repo.
BRANCH=$(git branch --show-current)
REMOTE=$(git config "branch.${BRANCH}.remote" || echo origin)
git add -A && git commit -m "Checkpoint: {project} - {brief summary}
Co-Authored-By: Claude <noreply@anthropic.com>"
git push "$REMOTE" "$BRANCH"
Step 5: Update Tmux Pane Title
~/.tmux/set-pane-title.sh "EMOJI project / fase"
Step 6: Pending Items Review
Ancora in sospeso:
- [item 1] — [why it's open]
- [item 2] — [why it's open]
(oppure: niente in sospeso)
Output
Checkpoint saved
diary/{YYYY}/{YYYY-MM-DD}-{project}-desc.md (updated)
Project: wiki/projects/{project}/index.md (updated)
Pushed to {branch}
Args Provided:
$ARGUMENTS