handoff

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Handoff

Handoff

把当前会话压成一段给新会话的文本指令,只打印一个代码块,不落盘。仅用于换上下文(换工具 / 换目录 / 交给别人 / 并行分叉);同一会话只是上下文变长 →
/compact
。
Turn the current session into one text instruction for a new session; print only one code block and do not write anything to disk. Use this only to switch context (switch tools / directories / hand it to someone / create a parallel branch); if it is the same session and the context is merely growing, use
/compact
.

规则

Rules

  1. 零副作用:不写文件、不改配置、不
    git add/commit
    ;代码块外最多一句收尾话。
  2. ≤40 行,一屏读完;无内容的小节整节删。
  3. 每条结论带锚点:
    path:line
    或命令结果;取不到证据标
    [待核实]
    ,没跑过标
    [未验证]
    ,决策没落点标
    [未落盘]
    。
  4. 不抄对话、不贴代码、不复述已落盘的 spec/plan/ADR;不写密钥;不替用户执行「下一步」。
  1. Zero side effects: do not write files, change configuration, or run
    git add/commit
    ; include at most one closing sentence outside the code block.
  2. ≤40 lines and readable on one screen; omit any empty sections entirely.
  3. Every conclusion must include an anchor:
    path:line
    or a command result; mark unavailable evidence as
    [To Be Verified]
    , unexecuted checks as
    [Unverified]
    , and decisions that have not been persisted as
    [Not Persisted]
    .
  4. Do not copy the conversation, paste code, or restate specs/plans/ADRs that have already been persisted; do not include secrets; do not execute the “Next Steps” on the user's behalf.

流程

Process

取证(只读):
git rev-parse --abbrev-ref HEAD
、
git status --porcelain
、
git log --oneline -5
。然后按骨架写,先写「下一步」再回填。
Collect evidence (read-only):
git rev-parse --abbrev-ref HEAD
,
git status --porcelain
,
git log --oneline -5
. Then follow the skeleton, writing “Next Steps” first and filling in the remaining sections afterward.

输出骨架

Output Skeleton

你在继续一个已有任务:先核对分支/工作区/下面提到的文件是否还在,不一致以仓库为准,再从「下一步」第 1 条继续;不要重做「已完成」。
(用户给了用途时补一句
本次只做:<用途>
)
  • ## 任务
    :一句话 + 完成标准 / 不做的事
  • ## 当前状态
    :时间 | 分支 | short-sha | 工作区现状 | 已验证:<命令 → 结果>
  • ## 已完成
    :结论(
    path:line
    )✔
    <命令>
    ,没跑过的标
    [未验证]
  • ## 下一步
    :有序,第 1 条能直接开工
  • ## 未决问题
    :需拍板 / 别再试(做法 → 失败原因)
You are continuing an existing task: first verify that the branch, working tree, and files mentioned below still exist; if anything differs, treat the repository as the source of truth, then continue from item 1 of “Next Steps”; do not redo “Completed”.
(If the user has specified a purpose, add
For this run only: <purpose>
)
  • ## Task
    : One sentence + completion criteria / out of scope
  • ## Current Status
    : Time | Branch | short-sha | Working tree status | Verified: <command → result>
  • ## Completed
    : Conclusion (
    path:line
    ) ✔
    <command>
    , marked
    [Unverified]
    if it has not been run
  • ## Next Steps
    : Ordered list; item 1 must be ready to start immediately
  • ## Open Questions
    : Decisions required / do not retry again (approach → failure reason)