--- name: handoff description: Records and prunes the handoff file, the state that carries between sessions. Use at the end of a session, before a context reset, or when the user asks where things stand. --- # Handoff file The handoff file holds what a new session needs and cannot find by looking: what to do next, what waits on the user, known defects that are not fixed yet, open decisions, and gotchas that are not fixed at their site yet. **Where the file is:** the path in the project `AGENTS.md`, section `## Docs layout` (key: handoff file). Default: `HANDOFF.md` at the repository root. If `## Docs layout` is missing, use the default and tell the user once that they can add the path to `AGENTS.md`. This skill calls the file "the handoff file". Everything else has a home already: - the code and the commits; - `AGENTS.md` (working rules); - the decisions log (gaps between the spec and the code, and how the team resolved them: `## Docs layout`); - the spec (what the system must do) and the handbook (how the code does it); - a skill or an agent file of the project; - a plan file. A copy of these in the handoff file is a **cache**, and a cache becomes stale. **Do not copy the state of the repository.** git holds the commit, the branch, the distance to the remote, a clean or changed tree, and the worktrees, and git is never stale. A new session gets them with `git status -sb`, `git log -1 --oneline`, and `git worktree list`. Write a git fact only when its *reason* is not in git, for example "the refactor on branch `x` stops at step 3, on purpose". Then it is a normal entry in Next or Queue, with an exit. The same applies to results that a command gives again: a test count, a gate result, a file count. If nobody prunes the file, it fills with **sediment**: old layers that nobody dares to delete, until they hide the live items. The cure: every entry has an **exit**, a condition that removes it from the file, and a place where it goes. **Budget: 2,000 words** (`wc -w `). If the file is over the budget, prune it before you record. ## Sections Use these sections, in this order. Each entry is one to three lines. Put longer detail in a plan file, and let the entry point to it. | Section | Holds | Exit | |---|---|---| | Header line | `Last edited: