Files
Keysat e2377f4c8c handoff: suggest a next-session opener in the final report
Pair the existing /compact keep-alive line with a paste-able opener for a
fresh context window. Constrained to a pointer into AGENTS.md Current state,
not a state payload, so it stays safe to lose.
2026-06-17 08:14:01 -05:00

58 lines
3.3 KiB
Markdown

# Session handoff
The session is about to end. Run the close-out checklist below. Use judgment — skip any
step that doesn't apply to what was done this session, and tell the user what you skipped
and why. The user may provide optional focus notes; weave them in where relevant.
## 1. Verify the work is on disk
- If this is a git repo, run `git status` and report any uncommitted or untracked changes
related to this session's work.
- If meaningful work is uncommitted, propose a commit (or a few logical commits) with clear
messages. Wait for the user's approval before committing — do not commit on your own.
After committing, push if a remote is configured.
- If this is not a git repo, list every file created or modified this session and confirm
each one is actually written to disk, not just discussed in conversation.
## 2. Update AGENTS.md — durable knowledge only
- Add or refresh only what every future session will need: architectural decisions made,
conventions or patterns established, gotchas discovered, key commands, dependency or
structure facts learned the hard way.
- Keep it lean. AGENTS.md loads at the start of every future session, so no session
narrative, no play-by-play. If anything in it is now obsolete or contradicted by today's
work, fix or remove it.
- If a piece of guidance is subsystem-specific rather than whole-repo, put it in
docs/guides/<topic>.md with paths: frontmatter, symlink it from the harness's rules
directory, and add its one-line index entry in AGENTS.md instead.
## 3. Update the Current state section — session state
- Rewrite the `## Current state` section at the bottom of AGENTS.md. It represents current
state, not a running log — overwrite, don't append. Present tense, 15 lines max. Cover:
- What's done and working, including anything finished this session
- What's in progress and exactly where it stands
- Next steps in priority order
- Open questions, risks, or anything the user flagged that wasn't resolved
- Test/build status if worth knowing
- Anything longer-term than the next steps goes in `ROADMAP.md` at the repo root, not here
— create it if it doesn't exist yet and there's backlog to record. If Current state is
accumulating history, prune it: finished narrative to the git log, still-real longer-term
items to ROADMAP.md.
- Keep the two in sync: when the next steps here run thin, pull the next item(s) up from
ROADMAP.md so a fresh session always finds concrete next steps in Current state.
## 4. Final report
Reply with a short summary: what got committed or pushed, what went into durable knowledge
versus Current state, and anything still unresolved. If everything is clean, say it's safe
to exit. Then give the user two ways to carry the thread forward, labelled:
- **Keep this session:** a one-line `/compact Focus on ...` command tailored to what matters
most from this session.
- **Start fresh:** a paste-able opener for the next session's first message — a *pointer, not
a payload*. Name the one thing to pick up and where it stands (e.g. "Resume the Case B
design backfill, pick up at Phase D reconcile"), and trust AGENTS.md Current state — which a
fresh session already loads — for the rest. It must be safe to lose: never carry state in the
opener that isn't already on disk.