Ensure clean handoff to the next session. Reconciles work queue, verifies features, syncs documentation, captures deferred work, and plans next session priorities. Use at the end of every session before closing.
Ensure clean handoff to the next session.
Operating mode: Draft-first, review-second. You were present for the entire session — don't ask the user to recount what happened. Draft everything you can from session context (summary, queue reconciliation, verification assessment, deferred work, docs sync). Present the complete draft for review. Only ask questions for information you genuinely don't have.
Project-specific customizations are authoritative. Before executing the flow below, locate the operating document's SESSION WORKFLOW section (the Before /session-end: subsection or equivalent). Any steps listed there are MANDATORY — they encode project-specific hygiene the generic framework can't know about (kit-table sync, schema docs, deployment notes, domain-specific sync lists). Merge them into the flow: when a project step and a generic step overlap, the project step wins; when the skill has something the operating doc doesn't, keep it.
Draft a summary of what was accomplished. Be specific — what changed, what was deployed, what was decided. 1-3 bullet points.
Present the draft. The user corrects or approves.
CRITICAL: Prevents completed work from being lost between sessions.
Read CURRENT PRIORITIES from the operating document. For EACH priority, determine status from what you observed this session:
Match work to priorities by code changes achieved, not just descriptions. A priority might be addressed by a commit that doesn't mention it by name.
Draft the reconciliation. Present for confirmation before proceeding.
The NEXT pointer and full next-session plan are determined in Step 8 (Next Session Planning), after all information-gathering steps are complete.
CRITICAL: Before documenting work as complete, verify it actually works.
Assess from session context: did this session implement data flow changes, new fields, or features that touch multiple code paths?
If YES:
Identify the code paths — what data types were touched, and what's the flow?
| Data Type | Code Paths to Verify |
|---|---|
| [Type] | [Source -> processing -> storage -> display] |
Evidence requirement: For each feature, you should be able to say:
Impact radius: If this session added or modified a data pipeline, transformer, or user-facing display:
Flag any change that only applies to new data/users without a documented plan for existing state.
If verification was incomplete:
Skip if the repo is private AND the project has no public-facing surfaces.
Code-level (secrets in source):
Before committing, grep modified files for: absolute machine paths (/Users/, /home/), email addresses, API keys/tokens, proprietary details. Fix before committing.
Data-level (PII at public surfaces): If the project has a PRIVACY BOUNDARIES table in the operating document, check whether this session's changes touch any declared boundary. If yes:
If the project handles third-party PII and has NO declared boundaries, flag the gap.
Start with the operating document's SESSION WORKFLOW section. Any project-specific sync items there are authoritative — e.g. "kit table", "marketing site", "schema docs", "pricing config". Execute those first, then use the generic checklist below to catch anything the project didn't call out.
Assess from session context: did this session change any documented domain? Draft the list of affected docs:
Customize this checklist to the project's actual domains.
Source of truth hierarchy: Code/config files first, then documentation, then operating document metrics. Update upstream before downstream.
Ask: "Were there any discussions or decisions that didn't get captured? Topics to continue next session?"
(This is a genuine question — you can't know about unspoken decisions or context the user hasn't shared.)
If yes:
Assess from session context: were any planned items bumped? Draft the deferred items list.
CRITICAL: This is the primary handoff to the next session. What you write here is what session-start reads. If it's vague, the next session starts blind.
Based on the reconciliation (Step 2), carry-forward items, deferred work, and open threads, synthesize what comes next.
Draft a prioritized plan (not just titles) with:
Ask the user: "Here's my read on next priorities. Does this match your thinking?"
Get confirmation before proceeding to Step 9. This plan is written verbatim to the operating document — it must survive intact.
Skip if no metrics table. Update values and "Last Validated" date if sources of truth changed.
If queue hygiene was performed this session (backlog pruned, priorities re-evaluated, parking lot reviewed), update Last queue hygiene to the current session number.
Check operating document size (character count).
Thresholds (standard profile):
If YELLOW or RED, run archiving:
Add condensed entry (~8 lines max):
### Session #XX Complete ([Date])
[Brief title]
- [1-3 bullets of what changed]
- **Deployment**: vXXX (if applicable)
Skip if not applicable.
Quick check on local settings size. If >50 permission entries, flag for review:
Don't block session-end on this — just flag it.
## Session End Checklist
Work Tracking:
- [ ] Each CURRENT PRIORITY reconciled
- [ ] Completed items moved to COMPLETE
- [ ] Session Progress NEXT pointer is specific
- [ ] UPCOMING SESSIONS has full prioritized plan
- [ ] Deferred items tracked (if any bumped)
- [ ] Open discussions captured (if any)
Verification:
- [ ] Code paths tested (not just implemented)
- [ ] Evidence of testing documented
- [ ] Impact radius assessed
Documentation:
- [ ] Operating document updated (progress, queue, metrics)
- [ ] Other docs flagged for update
- [ ] Privacy audit (public repos)
Hygiene:
- [ ] Settings hygiene (if >50 entries)
- [ ] Working contract updated (if applicable)
- [ ] Size check (GREEN/YELLOW/RED)
Ready to close:
1. Review operating document changes
2. Commit if appropriate
**Session complete. Safe to exit.**