/handoff
Intelligently analyzes the current session's achievements and updates a handoff document for the next AI session or developer.
This command is crucial for maintaining context and continuity across long-running tasks, especially when a conversation with Claude Code gets long or you need to stop work for the day. It preserves the session's progress in a structured way.
Auto-Loaded Project Context:
@docs/ai-context/HANDOFF.md
@/CLAUDE.md
Command Execution
Step 1: Process User Arguments
The command is flexible. You can provide a summary of your work, or let the AI figure it out.
- With Arguments:
/handoff "Finished the API endpoints, need to work on the frontend next."
The arguments provide a high-level summary. - Without Arguments:
/handoff
The AI will analyze the session history to determine what was accomplished.
Step 2: Analyze Current Session Achievements
The AI reviews the conversation history and tool usage to auto-detect evidence of:
- Files created, edited, or deleted.
- New features implemented or bugs fixed.
- Architectural changes or refactoring.
- Any blockers encountered or work left incomplete.
It generates an internal summary of the session's technical progress.
Step 3: Analyze Existing HANDOFF.md
The command reads the existing docs/ai-context/HANDOFF.md
file to understand the ongoing tasks and maintain a consistent structure.
Step 4: Determine Update Strategy
Based on its analysis, the AI decides how to update the handoff document:
- If the session's work relates to an existing task, it updates that section with the new progress.
- If the work is new, it creates a new section in the document.
- If a task was completed, it marks it as such and summarizes the outcome.
Step 5: Update HANDOFF.md
Intelligently
The AI makes targeted updates to the handoff document, adding sections that include:
- Current Status: A brief description of the state of the task.
- What Was Accomplished: A bulleted list of concrete achievements.
- Current Issue: Any blockers or unresolved problems.
- Next Steps: Actionable items for the next session.
- Key Files to Review: A list of relevant files.
This ensures the next AI session (or a human developer) can pick up the work exactly where it was left off, with full context.