const SKILL: &str = "---\nname: handoff\ndescription: Use when the user asks for a handoff to the next session - \"do a handoff\", \"hand off to the next session\", \"write the handoff\", \"prep the next session\", \"handoff for next time\". Produces the project\'s rolling current-state handoff document.\nargument-hint: \"What will the next session be used for?\"\ndisable-model-invocation: false\n---\n\n# Handoff\n\nWrite a handoff document so a fresh agent can continue this session\'s work. The handoff is a\ncurrent-state document: one per project, rewritten each time, never accumulated.\n\n## Step 1 - Memory first (REQUIRED, before any handoff text)\n\nComplete every learning from this session into memory BEFORE writing the handoff, so the handoff\ncan reference them instead of restating them:\n\n- Session learnings, traps and corrections -> the session\'s project memory files. If a memory\n file covers the topic, update it in place and delete superseded narration; never append an\n \"update\" section under the old content.\n- Cross-project patterns or workarounds -> TIL files (`til/`), no need to ask.\n- Update the memory index (`MEMORY.md`) in the SAME edit as any claim it points at.\n\nA learning that exists only in the handoff is not recorded - the handoff gets rewritten, memory\npersists.\n\n## Where the handoff goes: lead or worker\n\nThe project memory directory is shared by every session in the project, so the destination\ndepends on the SEAT, not only the project. Ask `agents__whoami` when that tool is available\n(forge sessions only):\n\n- **label `lead`, or no forge at all** -> `handoff.md` in the project memory directory, indexed\n in `MEMORY.md` by Step 3. This is the project\'s rolling state, and the lead owns it.\n- **any other label (a forge worker)** -> `workers/<label>.md` in the same memory directory, and\n **never** `handoff.md`, and **no** `MEMORY.md` line. A worker\'s continuity is already carried\n by its own resumable session and its messages to the lead; the shared file is\n the lead\'s, and a worker writing it overwrites the lead\'s rolling state with its own.\n\nThe content and shape below are the same for both. Only the address differs.\n\n**The project index is the lead\'s as well.** Step 1\'s \"update the memory index in the same edit\"\nis the lead\'s duty; a worker records its learnings in its own file and leaves `MEMORY.md` alone,\nso the index never lists a seat that has gone.\n\n## Step 2 - Write the handoff\n\n**Location: the session\'s project memory directory** - the one whose `MEMORY.md` auto-loads for\nthis project. **The file is `handoff.md` in that directory** for a lead; a worker writes\n`workers/<label>.md` as the seat section says. Rewrite it in place each time. Never\nwrite it to /tmp (invisible to a fresh session and wiped on reboot) and never into the\nworkspace\'s tracked tree (it is a generated doc; committing it pollutes git - the memory dir is\nthe gitignored home for exactly this).\n\n**Write the continuation the next session needs, in your own shape.** There is no set of parts\nor headings to fill in. Whatever shape reads best, it has to carry:\n\n- where things stand: what is done and verified, what is in flight, what is unchanged.\n- what is in flight, with the id that names it: the board row, PR, branch or session.\n- what you tried that failed, and what stopped it.\n- the exact next action, and the file, command or row it starts at.\n\nPoint at what you recorded rather than retelling it - the memory files by name, the board rows\nby id, the PR numbers, the transcript. Anything the session was expected to handle and could not\nfinish belongs here with the reason it stopped.\n\nRedact sensitive information (API keys, passwords, PII).\n\nIf the user passed arguments, treat them as the next session\'s focus and tailor the note\naccordingly.\n\n## Step 3 - Index\n\nAdd or update the `handoff.md` line in the project memory\'s `MEMORY.md` in the same pass. The\nline leads with a status token (SHIPPED / IN FLIGHT / BLOCKED) plus a one-line hook - the index\nline is what the next session actually sees; the file is only reachable through it.\n\nA worker writes no index line: its file is its own seat\'s, reached by the worker itself.\n\n## Forge: close out and exit\n\nWhen forge hands the seat over, three things happen on top of the steps above.\n\n**Close out what is running.** Anything this session started and did not finish must not outlive\nit: a live sub-agent, a background command, a monitor, a process it spawned. For each one,\nrecord in memory what it is and how to resume it - the command, the id it ran under, where its\noutput goes - then stop it. A successor that finds half-finished work and no record of the\nprocess that owns it cannot tell the two apart.\n\n**Leave nothing unfinished unrecorded.** List what this session was expected to handle and could\nnot finish in this turn - a blocked ask, a deferred fix, a call that was refused, a question left\nopen - with the reason it stopped and where its context lives. The next session starts exactly\nwhere this one stopped; anything left out is lost when the turn ends.\n\n**Exit through the tool.** Forge takes the note as you wrote it - there are no headings to fill\nin, and your Step 2 document is the note. Write it where the seat section and Step 2 say, then\npass the same text to\n`agents__handoff` as `brief` as the turn\'s last act. Memory first, then close out what is\nrunning, then the note. Do not call `agents__handoff` for any other reason - a handoff starts at\n`/handoff` or at the automatic trigger (fill or compaction).\n";Expand description
The handoff skill forge ships and installs into the config dir.