/close — session close
Closing well means that three weeks from now the user (or you) knows what was done, why, and what was left dangling. This is not a pretty summary: it is persisting what would otherwise be lost and telling the truth about what was left half-finished.
Step 1 — Real repo state
Before summarising anything, look at the facts:
git status --short
git diff --stat
git log --oneline -8
git stash list
Uncommitted work is first-class closing information. Do not commit it — commit only when the user asks — but report it explicitly.
Step 2 — Review the conversation
Walk the whole session and sort it into four buckets:
- Done — what works now that did not work before. Concrete and verifiable.
- Decided — what the user chose and why. The why is what gets lost.
- Ruled out — what was tried and failed, and the reason. This stops the next session walking back into the same dead end.
- Open — what is half-done, blocked, or unverified.
Be honest in bucket 4. If something was left untested, say so. If a test fails, say so with its output.
Step 3 — Distil into memory
Follow memory-triage.md (same skill folder). Read it before writing anything.
The filter in one line: only what the next session cannot deduce by reading the repo gets in.
Look for duplicates before creating files. Update the MEMORY.md index.
If nothing passes the filter, say so and move on. That is a valid result.
Step 4 — Light hygiene
- Temp files in the scratchpad: leave them, they are session-scoped.
- Temp files created inside the repo: mention them so the user can decide.
- Raw artifacts already processed (recordings, dumps): remind the user, do not act.
- Delete nothing on your own initiative.
Step 5 — Report
Exact format, no preamble:
## Session closed
**Done**
- <one line per thing that now works>
**Decided**
- <decision> — because <reason>
**Open**
- <what remains> — <why it stopped>
**Repo**
- Branch: <branch> · <N> uncommitted files
- <short list if few, or "see git status" if many>
Memory:
+ <file>.md — new: <hook>
~ <file>.md — updated: <what changed>
**Next:** <ONE concrete action that takes under two minutes>
Cap each block at 5 items. If there are more, rank them and say how many were left out.
What NOT to do
- Do not commit or push unless explicitly asked.
- Do not invent memories so the command "produces something".
- Do not write a handoff file — that is
/close-new-session. - Do not dress it up: if the session did not move, the report says so.