handoff
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseHandoff
Handoff
把当前会话压成一段给新会话的文本指令,只打印一个代码块,不落盘。仅用于换上下文(换工具 / 换目录 / 交给别人 / 并行分叉);同一会话只是上下文变长 → 。
/compactTurn 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
- 零副作用:不写文件、不改配置、不 ;代码块外最多一句收尾话。
git add/commit - ≤40 行,一屏读完;无内容的小节整节删。
- 每条结论带锚点:或命令结果;取不到证据标
path:line,没跑过标[待核实],决策没落点标[未验证]。[未落盘] - 不抄对话、不贴代码、不复述已落盘的 spec/plan/ADR;不写密钥;不替用户执行「下一步」。
- Zero side effects: do not write files, change configuration, or run ; include at most one closing sentence outside the code block.
git add/commit - ≤40 lines and readable on one screen; omit any empty sections entirely.
- Every conclusion must include an anchor: or a command result; mark unavailable evidence as
path:line, unexecuted checks as[To Be Verified], and decisions that have not been persisted as[Unverified].[Not Persisted] - 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 HEADgit status --porcelaingit log --oneline -5Collect evidence (read-only): , , . Then follow the skeleton, writing “Next Steps” first and filling in the remaining sections afterward.
git rev-parse --abbrev-ref HEADgit status --porcelaingit log --oneline -5输出骨架
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”.For this run only: <purpose>- : One sentence + completion criteria / out of scope
## Task - : Time | Branch | short-sha | Working tree status | Verified: <command → result>
## Current Status - : Conclusion (
## Completed) ✔path:line, marked<command>if it has not been run[Unverified] - : Ordered list; item 1 must be ready to start immediately
## Next Steps - : Decisions required / do not retry again (approach → failure reason)
## Open Questions