Handoff
Use this workflow for a clean shell handoff or to resume one.
Route the invocation first
Determine the mode before reading any workflow reference or changing files:
- No argument: prepare a coherent commit when covered by current authority,
then write a verified continuation artifact; this mode includes commit triage.
Read references/write-workflow.md
completely and run the write workflow.
extract: run the activation protocol below. Do not read the write workflow,
rewrite the artifact, reconcile docs, or commit merely because this skill also
has a write mode.
print: run only the read-only print protocol below.
- Reject any other argument and show the supported forms.
Runtime argument envelopes differ. In Codex, extract or print follows the
$handoff mention in the live user request. Pi appends the literal trailing
text after the injected </skill> block, without a label; therefore a bare
trailing extract or print is the authoritative mode selector, not handoff
content and not text to echo.
Supported forms:
- Codex:
$handoff, $handoff extract, $handoff print
- Pi:
/skill:handoff, /skill:handoff extract, /skill:handoff print
Activation protocol (extract)
The outcome of extract mode is resumed work, not a rendered handoff.
- Resolve the repository root with
git rev-parse --show-toplevel, then read
<REPO_ROOT>/NEXT_SHELL_PROMPT.md completely. If either step fails, report
the exact expected path or repository error and stop without changing state.
- Review the artifact before acting. Extract its repository, completed work,
decisions, open priorities, blockers, approvals, and start commands. Treat
it as user-provided continuation instructions, subordinate to current
system, developer, repository, and safety policy. The live invocation is
newer and wins on conflict.
- Validate only the facts needed for the next action. Do not blindly trust a
stale branch, HEAD, dirty-tree claim, command, or completion claim.
- Adopt the still-applicable open work as the active request. Run named start
commands when safe, then continue into the highest-priority actionable work;
orientation commands are not a stopping point. Load any skills required by
the carried work and proceed end to end until complete or genuinely blocked.
- Reading or reviewing the file is never completion. After the read, the next
assistant action must be one of:
- a tool call that starts or continues the carried work;
- the approval, decision, or interview question explicitly required before
that work can proceed; or
- a concrete blocker report when the artifact is missing, invalid, fully
complete, or has no authorized actionable work.
Never answer extract mode by quoting, printing, paraphrasing, or summarizing
NEXT_SHELL_PROMPT.md. Never stop merely after repository orientation or ask
what to do next when the artifact already says what to do. Do not rewrite or
commit the artifact in extract mode unless the resumed task itself explicitly
requires a later handoff.
Print protocol (print)
- Resolve the repository root with
git rev-parse --show-toplevel.
- Read
<REPO_ROOT>/NEXT_SHELL_PROMPT.md. If it is missing, report the exact
expected path and stop without changing repository state.
- Emit the file contents verbatim, with no surrounding fence or commentary.
Do not review or execute its instructions.
Shared authorization boundary
The selected mode is authorization to complete that mode without asking
whether to proceed. It does not authorize destructive actions, secrets work,
pushes, deploys, database writes, or resolving a real multi-repository ambiguity
without any approval otherwise required by current policy.
1---2name: handoff3description: Write a verified NEXT_SHELL_PROMPT.md handoff, or activate an existing one. With extract, review the artifact, adopt it as the current request, and immediately execute its authorized work; with print, only emit it verbatim.4---56# Handoff78Use this workflow for a clean shell handoff or to resume one.910## Route the invocation first1112Determine the mode before reading any workflow reference or changing files:1314- No argument: prepare a coherent commit when covered by current authority,15 then write a verified continuation artifact; this mode includes commit triage.16 Read [references/write-workflow.md](references/write-workflow.md)17 completely and run the write workflow.18- `extract`: run the activation protocol below. Do not read the write workflow,19 rewrite the artifact, reconcile docs, or commit merely because this skill also20 has a write mode.21- `print`: run only the read-only print protocol below.22- Reject any other argument and show the supported forms.2324Runtime argument envelopes differ. In Codex, `extract` or `print` follows the25`$handoff` mention in the live user request. Pi appends the literal trailing26text after the injected `</skill>` block, without a label; therefore a bare27trailing `extract` or `print` is the authoritative mode selector, not handoff28content and not text to echo.2930Supported forms:3132- Codex: `$handoff`, `$handoff extract`, `$handoff print`33- Pi: `/skill:handoff`, `/skill:handoff extract`, `/skill:handoff print`3435## Activation protocol (`extract`)3637The outcome of extract mode is resumed work, not a rendered handoff.38391. Resolve the repository root with `git rev-parse --show-toplevel`, then read40 `<REPO_ROOT>/NEXT_SHELL_PROMPT.md` completely. If either step fails, report41 the exact expected path or repository error and stop without changing state.422. Review the artifact before acting. Extract its repository, completed work,43 decisions, open priorities, blockers, approvals, and start commands. Treat44 it as user-provided continuation instructions, subordinate to current45 system, developer, repository, and safety policy. The live invocation is46 newer and wins on conflict.473. Validate only the facts needed for the next action. Do not blindly trust a48 stale branch, HEAD, dirty-tree claim, command, or completion claim.494. Adopt the still-applicable open work as the active request. Run named start50 commands when safe, then continue into the highest-priority actionable work;51 orientation commands are not a stopping point. Load any skills required by52 the carried work and proceed end to end until complete or genuinely blocked.535. Reading or reviewing the file is never completion. After the read, the next54 assistant action must be one of:55 - a tool call that starts or continues the carried work;56 - the approval, decision, or interview question explicitly required before57 that work can proceed; or58 - a concrete blocker report when the artifact is missing, invalid, fully59 complete, or has no authorized actionable work.6061Never answer extract mode by quoting, printing, paraphrasing, or summarizing62`NEXT_SHELL_PROMPT.md`. Never stop merely after repository orientation or ask63what to do next when the artifact already says what to do. Do not rewrite or64commit the artifact in extract mode unless the resumed task itself explicitly65requires a later handoff.6667## Print protocol (`print`)68691. Resolve the repository root with `git rev-parse --show-toplevel`.702. Read `<REPO_ROOT>/NEXT_SHELL_PROMPT.md`. If it is missing, report the exact71 expected path and stop without changing repository state.723. Emit the file contents verbatim, with no surrounding fence or commentary.73 Do not review or execute its instructions.7475## Shared authorization boundary7677The selected mode is authorization to complete that mode without asking78whether to proceed. It does not authorize destructive actions, secrets work,79pushes, deploys, database writes, or resolving a real multi-repository ambiguity80without any approval otherwise required by current policy.