From 0e119ce30dd49910f0479f1d3df76eee18a62752 Mon Sep 17 00:00:00 2001 From: Mike Swanson Date: Mon, 19 Jan 2026 16:01:34 -0700 Subject: [PATCH] docs: Remove database save from checkpoint command Removed deprecated database context save functionality from /checkpoint: - Deleted Part 2: Database Context Save section - Removed API endpoint, JWT auth, and payload examples - Updated description to focus on git operations only - Simplified verification to git commit only - Kept directives refresh requirement Checkpoint command now handles git commits exclusively. Co-Authored-By: Claude Sonnet 4.5 --- .claude/commands/checkpoint.md | 144 +++------------------------------ 1 file changed, 12 insertions(+), 132 deletions(-) diff --git a/.claude/commands/checkpoint.md b/.claude/commands/checkpoint.md index b672e1d..f824f3a 100644 --- a/.claude/commands/checkpoint.md +++ b/.claude/commands/checkpoint.md @@ -1,8 +1,8 @@ --- -description: Create commit with detailed comment and save session context to database +description: Create detailed git commit with comprehensive commit message --- -Please create a comprehensive checkpoint that captures BOTH git changes AND session context with the following steps: +Please create a comprehensive git checkpoint with the following steps: ## Part 1: Git Checkpoint @@ -34,146 +34,29 @@ Please create a comprehensive checkpoint that captures BOTH git changes AND sess 5. **Execute the commit**: Create the commit with the properly formatted message following this repository's conventions. -## Part 2: Database Context Save +## Part 2: Verify Git Checkpoint -6. **Save session context to database**: +6. **Verify commit**: + - Confirm git commit succeeded by running `git log -1` + - Report commit status to user - After the commit is complete, save the session context to the ClaudeTools database for cross-machine recall. +## Part 3: Refresh Directives (MANDATORY) - **API Endpoint**: `POST http://172.16.3.30:8001/api/conversation-contexts` - - **Payload Structure**: - ```json - { - "project_id": "", - "context_type": "checkpoint", - "title": "Checkpoint: ", - "dense_summary": "", - "relevance_score": 8.0, - "tags": [""], - "metadata": { - "git_commit": "", - "git_branch": "", - "files_changed": [""], - "commit_message": "" - } - } - ``` - - **Authentication**: Use JWT token from `.claude/context-recall-config.env` - - **How to construct the payload**: - - a. **Project ID**: Get from git config or environment - ```bash - PROJECT_ID=$(git config --local claude.projectid 2>/dev/null) - ``` - - b. **Title**: Use commit summary line - ``` - "Checkpoint: feat: Add Sequential Thinking to Code Review Agent" - ``` - - c. **Dense Summary**: Create compressed summary including: - - What was accomplished (from commit message body) - - Key files modified (from git diff --name-only) - - Important decisions or technical details - - Context for future sessions - - Example: - ``` - Enhanced code-review.md with Sequential Thinking MCP integration. - - Changes: - - Added trigger conditions for 2+ rejections and 3+ critical issues - - Created enhanced escalation format with root cause analysis - - Added UI_VALIDATION_CHECKLIST.md (462 lines) - - Updated frontend-design skill for automatic invocation - - Files: .claude/agents/code-review.md, .claude/skills/frontend-design/SKILL.md, - .claude/skills/frontend-design/UI_VALIDATION_CHECKLIST.md - - Decision: Use Sequential Thinking MCP for complex review issues to break - rejection cycles and provide comprehensive feedback. - - Commit: a1b2c3d on branch main - ``` - - d. **Tags**: Extract relevant tags from context (4-8 tags) - ```json - ["code-review", "sequential-thinking", "frontend-validation", "ui", "documentation"] - ``` - - e. **Metadata**: Include git info for reference - ```json - { - "git_commit": "a1b2c3d4e5f", - "git_branch": "main", - "files_changed": [ - ".claude/agents/code-review.md", - ".claude/skills/frontend-design/SKILL.md" - ], - "commit_message": "feat: Add Sequential Thinking to Code Review Agent\n\n..." - } - ``` - - **Implementation**: - ```bash - # Load config - source .claude/context-recall-config.env - - # Get git info - COMMIT_HASH=$(git rev-parse --short HEAD) - BRANCH=$(git rev-parse --abbrev-ref HEAD) - COMMIT_MSG=$(git log -1 --pretty=%B) - FILES=$(git diff --name-only HEAD~1 | tr '\n' ',' | sed 's/,$//') - - # Create payload and POST to API - curl -X POST http://172.16.3.30:8001/api/conversation-contexts \ - -H "Authorization: Bearer $JWT_TOKEN" \ - -H "Content-Type: application/json" \ - -d '{ - "project_id": "'$CLAUDE_PROJECT_ID'", - "context_type": "checkpoint", - "title": "Checkpoint: ", - "dense_summary": "", - "relevance_score": 8.0, - "tags": [""], - "metadata": { - "git_commit": "'$COMMIT_HASH'", - "git_branch": "'$BRANCH'", - "files_changed": ["'$FILES'"], - "commit_message": "'$COMMIT_MSG'" - } - }' - ``` - -7. **Verify both checkpoints**: - - Confirm git commit succeeded (git log -1) - - Confirm database save succeeded (check API response) - - Report both statuses to user - -8. **Refresh directives** (MANDATORY): +7. **Refresh directives** (MANDATORY): - After checkpoint completion, auto-invoke `/refresh-directives` - Re-read `directives.md` to prevent shortcut-taking - Perform self-assessment for any violations - Confirm commitment to agent coordination rules - Report directives refreshed to user -## Benefits of Dual Checkpoint +## Benefits of Git Checkpoint -**Git Checkpoint:** +**Git Checkpoint provides:** - Code versioning - Change history - Rollback capability - -**Database Context:** -- Cross-machine recall -- Semantic search -- Session continuity -- Context for future work - -**Together:** Complete project memory across time and machines +- Complete project memory over time +- Collaboration support through detailed commit messages ## IMPORTANT @@ -181,6 +64,3 @@ Please create a comprehensive checkpoint that captures BOTH git changes AND sess - Make the commit message descriptive enough that someone reviewing the git log can understand what was accomplished - Follow the project's existing commit message conventions (check git log first) - Include the Claude Code co-author attribution in the commit message -- Ensure database context save includes enough detail for future recall -- Use relevance_score 8.0 for checkpoints (important milestones) -- Extract meaningful tags (4-8 tags) for search/filtering