---
description: Save session context to vector memory for seamless resumption (project)
---
Create a comprehensive handoff snapshot using vector-memory-mcp.
## 1. Extract & Store Memories
Review the session for significant items worth persisting long-term.
**Extract:**
- Architectural decisions and rationale
- Implementation patterns discovered or established
- Insights about the codebase structure
- Blockers encountered and their resolutions
- Context that would be valuable for future sessions
**Skip:**
- Pleasantries and conversational filler
- Ephemeral states (e.g., "currently running tests")
- Information already stored in previous memories
For each significant item, call `mcp__vector-memory-project__store_memories` with appropriate metadata tags.
## 2. Store Handoff
Call `mcp__vector-memory-project__store_handoff` with:
```
project: [repository/project name]
branch: [current git branch]
summary: [2-3 sentences: what was the primary goal, what's the current status]
completed:
- [specific items with file paths where relevant]
- [e.g., "Implemented user auth in src/auth/login.ts"]
in_progress_blocked:
- [items still in flight with current state]
- [blockers with context on what's needed]
key_decisions:
- [decisions made and WHY - rationale is crucial]
- [e.g., "Chose JWT over sessions because X, Y, Z"]
next_steps:
- [concrete, actionable items]
- [prioritized if possible]
memory_ids:
- [IDs returned from store_memories calls above]
```
## 3. Fallback (MCP Unavailable Only)
**Only if** the MCP tools fail (connection refused, timeout, tool not found):
1. Write handoff to `handoff.md` in the repository root
2. Use this markdown format:
```markdown
# Handoff - [project]
**Date:** [ISO date] | **Branch:** [branch]
## Summary
[summary text]
## Completed
- [items]
## In Progress / Blocked
- [items]
## Key Decisions
- [items]
## Next Steps
- [items]
---
⚠️ **Note:** This file was created because vector-memory-mcp was unavailable.
Individual memories were not stored. Delete this file after MCP is restored.
```
## 4. Report to User
Summarize what was stored:
- Storage method used (MCP or file fallback)
- Number of memories created (if MCP available)
- Key topics captured
- Handoff stored confirmation
If fallback was used, warn: "MCP unavailable - handoff saved to `handoff.md`. Check your MCP configuration."
## Guidelines
- **Be thorough but concise** - capture context that would take time to reconstruct
- **Include file paths** - makes resumption faster
- **Explain decisions** - future-you won't remember why
- **Link memories** - use memory_ids to connect related context
- **Skip the obvious** - don't store things easily discoverable from code