diff --git a/.claude/commands/checkpoint.md b/.claude/commands/checkpoint.md new file mode 100644 index 0000000..f6526c5 --- /dev/null +++ b/.claude/commands/checkpoint.md @@ -0,0 +1,36 @@ +--- +description: Create checkpoint tag before major change or after important milestone +--- + +Create a checkpoint tag to mark a stable point before implementing major changes or after completing important work. + +**Tag format**: `CHECKPOINT__` +- Name should be uppercase with underscores (e.g., `BEFORE_ACTIVITY_TRACKER`, `AFTER_SESSION_EXTENSION`) +- Short version is major.minor.patch extracted from project.env + +**Step 1: Get current version** +Use the Bash tool to extract the short version: +```bash +grep "^VERSION=" project.env | sed 's/VERSION="//;s/_.*//' +``` + +**Step 2: Determine checkpoint name** +Based on context, suggest a checkpoint name: +- Before implementation: `BEFORE_` +- After completion: `AFTER_` +- Stable release point: `STABLE_` + +If unclear, ask the user for the checkpoint name. + +**Step 3: Create and push tag** +Use the Bash tool to create annotated tag and push: +```bash +git tag -a CHECKPOINT__ -m "Checkpoint: " && \ +git push origin CHECKPOINT__ +``` + +**Step 4: Confirm** +Inform the user: +- The full tag name created +- That it was pushed to origin +- How to revert to this checkpoint if needed: `git checkout CHECKPOINT__`