Skip to content

Instantly share code, notes, and snippets.

@facastagnini
Created February 27, 2026 23:30
Show Gist options
  • Select an option

  • Save facastagnini/7570fef0a0d9f978f063443646ca9cc4 to your computer and use it in GitHub Desktop.

Select an option

Save facastagnini/7570fef0a0d9f978f063443646ca9cc4 to your computer and use it in GitHub Desktop.
# Session End — Wrap-Up Procedure
You are performing an end-of-session wrap-up. Follow these steps in order. Be thorough but concise.
## Step 1: Understand What Happened
Review the full conversation history to build a clear picture of:
- What was accomplished this session
- What decisions were made
- What's still open or unfinished
- Any patterns, preferences, or lessons learned
## Step 2: Pre-read all files in parallel
Read these files simultaneously (single response, parallel Read calls) so later steps already have the content loaded:
- CLAUDE.md
- CHANGELOG.md
- TODO.md
- Memory files (`~/.claude/projects/.../memory/`)
If any file doesn't exist yet, note it — it will be created in the relevant step.
## Step 3: Update CLAUDE.md
Using the already-loaded content (or create it if it doesn't exist), update CLAUDE.md to reflect the **current state of the project**. CLAUDE.md must stay **concise** and focused on:
- Project purpose and goals
- Architecture and key design decisions
- Preferred technologies, libraries, and tools
- Coding style, conventions, and guidelines
- User preferences and workflow notes
- Repository structure (if it changed)
- Current status of active work (brief — not a changelog)
**Rules:**
- Remove stale or outdated information
- Do NOT put detailed change history here (that goes in CHANGELOG.md)
- Do NOT put task lists here (that goes in TODO.md)
- Keep it under 300 lines if possible
- Show the user the proposed changes and get approval before writing
## Step 4: Update CHANGELOG.md
Using the already-loaded content (or create it if it doesn't exist), append a new entry at the **top** of the log (most recent first) with this format:
```
## YYYY-MM-DD
- Bullet point summary of each meaningful change or decision
- Include context on WHY, not just what
- Note any important decisions and their rationale
```
Show the user the proposed entry for approval before writing.
## Step 5: Update TODO.md
Using the already-loaded content (or create it if it doesn't exist), update it to reflect the current state:
- Mark completed items as done or remove them
- Add any new items discovered during the session
- Organize by priority or category if the list is long
Use a simple checkbox format:
```
- [ ] Open item
- [x] Completed item
```
Show the user the proposed changes for approval before writing.
## Step 6: Update Memory Files
Review whether anything learned this session should be saved to the Claude Code memory files (`~/.claude/projects/.../memory/`). This includes:
- Stable patterns confirmed across interactions
- User preferences for workflow or communication
- Solutions to problems that might recur
- Key architectural decisions
Only update memory if there's genuinely something new and durable to record. Skip this step if nothing qualifies.
## Step 7: Git commit
Check if the project is a git repository. If yes:
Execute the skill called `qgit`
If not a git repo, skip this step entirely.
## Important
- Always show proposed changes and ask for approval at each step — never auto-write
- If the user wants to skip a step, skip it
- If a file doesn't need changes, say so and move on
- Be concise in your summaries — the user values brevity and clarity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment