- PRD.md: Product Requirements Document (single source of truth for all requirements) - .claude/settings.local.json: Claude Code agent permission config - .claude/commands/: project-specific slash commands - .claude/skills/: project-specific skill definitions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
6.0 KiB
name, description, license, compatibility, metadata
| name | description | license | compatibility | metadata | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| continue | Capture a full project status snapshot so the next session can continue seamlessly from where this one left off. Use when the user is ending a session and wants to preserve context for resumption. | MIT | Requires git. OpenSpec CLI optional (gracefully skipped if unavailable). |
|
Capture the full current project status and store it in persistent memory so the next session can pick up exactly where this one left off — no context lost, no recap needed.
Input: No arguments required. Invoke at any point when ending a session.
Steps
-
Capture git state
Run the following in parallel:
git status git branch --show-current git log --oneline -10 git diff --stat HEAD git stash listRecord:
- Current branch name
- Uncommitted files (staged and unstaged), with change type (M/A/D/?)
- Last 10 commit messages (for continuity context)
- Summary of diff stats if uncommitted changes exist
- Any stashed work
-
Capture OpenSpec change state
Run
openspec list --jsonto get all active changes.For each active (non-archived) change, run:
openspec status --change "<name>" --jsonFor each active change, also read its
tasks.mdto count:- Total tasks
- Completed tasks (
- [x]) - Pending tasks (
- [ ]) - The text of the next pending task (to know what's up next)
Record per change:
- Change name
- Schema
- Artifact completion (which are done, which are pending)
- Task progress (X of Y complete)
- Next pending task description
- Any delta specs present (
openspec/changes/<name>/specs/)
If
openspecCLI is unavailable or fails: Note it and skip this section gracefully. If no active changes: Note that there are no active OpenSpec changes. -
Capture in-session conversation context
Summarize what was worked on in this session based on the conversation:
- What was the user trying to accomplish?
- What was completed?
- What was left in-progress or blocked?
- Any key decisions made during this session
- Any open questions or next actions the user mentioned
Keep this factual and brief — 3–8 bullet points.
-
Capture memory file state
Read
MEMORY.mdfrom the project memory directory:~/.claude/projects/-home-ubuntu-vj-ai-agents-dev-sentryagent-idp/memory/MEMORY.mdNote the existing memory entries to avoid duplication in the next step.
-
Write session snapshot to memory
Write a
session_snapshot.mdfile to the project memory directory:~/.claude/projects/-home-ubuntu-vj-ai-agents-dev-sentryagent-idp/memory/session_snapshot.mdUse this structure:
--- name: Session Snapshot description: Last session status — git state, OpenSpec progress, and conversation context for seamless resumption type: project --- **Session ended:** YYYY-MM-DD (today's date) ## Git State **Branch:** <branch-name> **Uncommitted changes:** <count> files (<list filenames>) **Last commit:** <hash> <message> <If uncommitted changes exist, list them with their status> <If stashes exist, list them> ## OpenSpec Changes <For each active change:> ### <change-name> - **Schema:** <schema-name> - **Artifacts:** <done-count>/<total-count> complete (<list incomplete artifact names>) - **Tasks:** <done-count>/<total-count> complete - **Next task:** <text of next pending task> - **Delta specs:** <present / none> <If no active changes:> No active OpenSpec changes. ## Session Work <Bullet list of what was worked on, completed, and left in-progress> ## Next Actions <Bullet list of concrete next steps to resume — derived from pending tasks, blockers, open questions>IMPORTANT: Always overwrite
session_snapshot.md— this is a rolling snapshot, not a log. Only the most recent session state matters. -
Update MEMORY.md index
Read the current
MEMORY.md. Ifsession_snapshot.mdis not already listed, add it:- [Session Snapshot](session_snapshot.md) — Last session: YYYY-MM-DD | branch: <name> | <N> active changes | <N> uncommitted filesIf it is already listed, update the line to reflect today's date and current state.
Write the updated
MEMORY.md. -
Display break summary
Show a clean summary so the user knows the snapshot is complete:
## Snapshot Saved — See You Next Session **Branch:** <branch-name> **Uncommitted files:** <count> (<filenames>) **Active changes:** <count> <For each active change:> - <change-name>: <done>/<total> tasks complete — Next: "<next task text>" **Session context saved to memory.** To resume: start a new session and run /continue — Claude will load the snapshot and pick up where you left off.
Output On Success
## Snapshot Saved — See You Next Session
**Branch:** develop
**Uncommitted files:** 3 (src/auth/token.ts, tests/auth.test.ts, README.md)
**Active changes:** 1
- add-agent-auth: 4/7 tasks complete — Next: "Implement JWT signing with RS256"
**Session context saved to memory.**
To resume: start a new session and run /continue — Claude will load the snapshot and pick up where you left off.
Guardrails
- Always overwrite
session_snapshot.md— do NOT append or create versioned copies - Never include secrets, tokens, or credentials in the snapshot
- If
openspec listfails (CLI not available), note that and skip OpenSpec capture gracefully - If git is unavailable, note that and skip git capture gracefully
- Keep the session context summary factual — no speculation beyond what the user explicitly stated
- The MEMORY.md index line for
session_snapshot.mdmust stay under 150 characters - This skill does NOT commit code, push branches, or modify any project files — it only writes to the memory directory
- Session date must use the actual current date (not a placeholder)