Run this checklist in order. Do NOT skip steps. Do NOT stop before push succeeds.
- •
Check for uncommitted changes
bashgit status
If working tree is clean and up to date with origin, report "Nothing to do" and stop.
- •
Quality gates (only if code changed)
bashuv run ruff check --fix src/ tests/ uv run pytest -q
If tests fail, STOP. Report the failures. Do not commit broken code.
- •
Check for debug prints or stray TODOs Search for
print(in src/ (excluding known logging). Search forTODOwithout context. Flag anything suspicious but do not auto-remove. - •
Stage and commit Review what changed. Prefer small commits that preserve bisectability — one commit per coherent change. Do NOT include "Co-Authored-By" or "Generated with Claude Code" lines.
- •
Sync beads
bashbd sync 2>/dev/null || echo "No beads changes"
- •
Push
bashgit pull --rebase && git push
If push fails, resolve and retry. Do NOT stop until push succeeds.
- •
Verify
bashgit status
Must show "up to date with origin". If not, something went wrong — diagnose.
- •
Documentation check If any of these changed, flag which docs need updating:
- •CLI commands → README.md
- •Database schema → ARCHITECTURE.md + decisions.md
- •New modules → README.md + ARCHITECTURE.md
- •Design decisions → decisions.md
- •
File issues for remaining work If there's unfinished work, create beads issues before ending.
- •
Hand-off prompt Generate a continuation prompt for the next session:
code**Completed this session:** - [what was done] **Next:** - [what to do next] Key files: [relevant files]
Report each step. The session is complete ONLY when step 7 shows clean and pushed.