Captures session context before ending work. Writes handoff notes, updates project context (architecture decisions, goals, milestones), appends knowledge insights, and updates requirement statuses. Does NOT record completed items (git has that). Use at the end of every session.
Captures context for the next session. Focuses on decisions, unresolved items, and what to do next — not what was completed (git log has that).
Based on the conversation context, gather:
Do NOT present anything to the user yet — save files first.
Important: Do NOT record "completed" items. Git history captures what changed. Focus on the reasoning and context that git cannot capture.
Read the current (if it exists) to get:
HANDOFF.md- [ ] unresolved items from the previous session that weren't addressed this session — carry them forwardOverwrite HANDOFF.md with a single entry (previous session context lives in git history):
# Handoff
## {YYYY-MM-DD} | session {N}
### Intent
{what we were trying to accomplish}
### Decisions
- {decision} — because {reasoning}
### Unresolved
- [ ] {carried from previous session if not resolved}
- [ ] {new open questions or untested items}
### Handoff
1. {highest priority next step}
2. {next priority}
If the file doesn't exist, create it starting at session 1.
If any of these occurred during the session, append entries to KNOWLEDGE.md:
Use the entry format from KNOWLEDGE.md (Context, Problem, Solution, Prevention). Skip if nothing novel was discovered.
If CONTEXT.md exists, review the session for project-level context changes:
Architecture Decisions: If a significant architectural decision was made this session, append a new ADR entry.
ADR Archival: If the total ADR count exceeds 10, compress superseded ADRs to one-line entries in the ## ADR Archive section.
Deliverables & Milestones: Update the table if any deliverable progressed.
Active Goals: Update if goals were completed, added, or reprioritized.
Constraints: Add new constraints discovered during the session.
Last updated: Update the date in the header line.
Skip this step if:
CONTEXT.md doesn't existFor any work items that changed status:
in-progress items with current statedoneShow the user what was captured:
"Session wrapped. Here's the handoff:" {handoff summary} {if CONTEXT.md was updated: "Updated CONTEXT.md: {brief description of changes}"} "Run
/recovernext time to pick up where we left off."
/recover — pick up where you left off next session