Handover Sync
Overview
Produce a concrete end-of-session summary grounded in the repository's actual changes, then update the project's handoff documents so another agent can resume work quickly.
Treat this as a documentation-sync workflow, not a chat summary. Write facts tied to files, behaviors, validations, and remaining risks.
Language Policy
Choose the working language from the user's latest request:
- - If the user asks in Chinese, write the summary and handover updates in Chinese.
- If the user asks in English, write the summary and handover updates in English.
- If the user explicitly requests bilingual output, provide both versions.
When touching an existing doc with a strong established language, preserve that document's language unless the user explicitly asks to switch or translate it. Do not silently translate old sections.
Workflow
- 1. Identify the repo root and the effective summary date.
Default to the current local date unless the user asks for a different window such as "this week" or "since the last handoff".
- 2. Inspect existing handoff targets before writing.
Look for
handover.md,
README.md, and any directly related docs that explain run steps, TODOs, or known issues. If a required file does not exist, create it instead of silently skipping it.
- 3. Load the template that matches the working language.
- - Chinese: INLINECODE2
- English: INLINECODE3
These templates define the minimum sections and quality bar. Do not compress them into vague bullets.
- 4. Gather evidence from the repo before drafting.
Use direct repo inspection instead of memory:
- - INLINECODE4
- INLINECODE5
- INLINECODE6
- INLINECODE7 when commit history matters
- targeted reads of
handover.md, README.md, and the files changed today
If the directory is not a git repo, fall back to file timestamps, existing handoff history, and the files the user explicitly mentioned.
- 5. Derive the narrative from evidence.
Map real code and validation output into the template's required sections:
- - session scope and goal
- current repository state
- actual problems encountered
- cause analysis and conclusions
- implemented fixes with file-level grounding
- validations actually performed
- environment assumptions and commands
- known pitfalls and rejected approaches
- resume guide for the next person
- remaining limitations and boundaries
- final product goal when discussed
- concrete next TODO items
- 6. Update documents together by default.
Unless the user explicitly narrows scope, update all of the following:
- - INLINECODE10
- INLINECODE11 sections directly affected by today's conclusions
- any nearby TODO or runbook notes needed to keep the handoff accurate
Do not update only one file if the summary changes the project's current understanding.
- 7. Verify the docs after editing.
Read the changed sections back and check that they:
- - mention concrete files, commands, failures, or behaviors
- distinguish verified facts from current judgment
- state what the next person should do first
- state which commands or setup steps were actually used
- call out unresolved issues explicitly
- leave enough context for a different agent to continue
Writing Rules
Write in terms of observable facts. Avoid generic phrases such as "improved stability" unless the specific behavior and evidence are named.
Mark stopgap solutions clearly as MVP or temporary when they are not final production solutions.
When the user has already stated a long-term delivery target such as packaging, installer support, or a desktop release, record that target in the handoff instead of only the local patch.
If verification did not happen, say so explicitly and list what remains unverified.
If you considered multiple approaches, record which ones were rejected and why. This prevents the next person from repeating dead ends.
Always include enough repo-specific context that a new person can answer three questions quickly:
- - What changed?
- What is still broken or risky?
- What should I do next, in what order?
File Strategy
Use the repo's existing structure when present. If handover.md already contains historical entries, append or update it in-place instead of rewriting unrelated history.
Only touch the README sections that became stale because of today's findings. Keep README user-facing; reserve deep investigation details for the handoff unless the README truly needs them.
Resources
references/session_summary_template.md
Chinese handoff template.
references/session_summary_template.en.md
English handoff template.
This skill intentionally does not require helper scripts. Use the model's normal repo inspection tools and the template above.
交接同步
概述
基于仓库的实际变更生成具体的会话结束摘要,然后更新项目的交接文档,以便其他代理能够快速恢复工作。
将此视为文档同步工作流程,而非聊天摘要。撰写与文件、行为、验证和剩余风险相关的事实。
语言策略
从用户的最新请求中选择工作语言:
- - 如果用户用中文提问,则用中文撰写摘要和交接更新。
- 如果用户用英文提问,则用英文撰写摘要和交接更新。
- 如果用户明确要求双语输出,则提供两个版本。
当处理已有明确语言的现有文档时,保留该文档的语言,除非用户明确要求切换或翻译。不要静默翻译旧章节。
工作流程
- 1. 确定仓库根目录和有效的摘要日期。
默认使用当前本地日期,除非用户要求不同的时间范围,例如本周或自上次交接以来。
- 2. 在撰写之前检查现有的交接目标。
查找 handover.md、README.md 以及任何直接相关的文档,这些文档解释了运行步骤、待办事项或已知问题。如果所需文件不存在,则创建它,而不是静默跳过。
- 3. 加载与工作语言匹配的模板。
- 中文:references/session
summarytemplate.md
- 英文:references/session
summarytemplate.en.md
这些模板定义了最低限度的章节和质量标准。不要将它们压缩成模糊的要点。
- 4. 在起草之前从仓库收集证据。
使用直接的仓库检查而非记忆:
- git status --short
- git diff --name-only
- git diff --stat
- git log --since <日期> 00:00:00 --oneline(当提交历史重要时)
- 有针对性地读取 handover.md、README.md 以及当天更改的文件
如果目录不是 git 仓库,则回退到文件时间戳、现有的交接历史以及用户明确提到的文件。
- 5. 从证据中推导出叙述。
将真实代码和验证输出映射到模板所需的章节:
- 会话范围和目标
- 当前仓库状态
- 实际遇到的问题
- 原因分析和结论
- 已实施的修复(附带文件级依据)
- 实际执行的验证
- 环境假设和命令
- 已知陷阱和被拒绝的方法
- 下一位人员的恢复指南
- 剩余限制和边界
- 讨论过的最终产品目标
- 具体的下一个待办事项
- 6. 默认情况下一起更新文档。
除非用户明确缩小范围,否则更新以下所有内容:
- handover.md
- 受当天结论直接影响的 README.md 章节
- 任何保持交接准确性所需的附近待办事项或运行手册笔记
如果摘要改变了项目当前的理解,不要只更新一个文件。
- 7. 编辑后验证文档。
重新读取更改的章节,并检查它们是否:
- 提到了具体的文件、命令、失败或行为
- 区分了已验证的事实和当前的判断
- 说明了下一个人应该首先做什么
- 说明了实际使用了哪些命令或设置步骤
- 明确指出了未解决的问题
- 为不同的代理留下足够的上下文以继续
写作规则
以可观察的事实为基础进行写作。避免使用诸如改进了稳定性之类的通用短语,除非具体的行为和证据被命名。
当解决方案不是最终的生产解决方案时,明确将其标记为 MVP 或临时方案。
当用户已经陈述了长期交付目标(如打包、安装程序支持或桌面发布)时,在交接中记录该目标,而不仅仅是本地补丁。
如果验证没有发生,则明确说明,并列出哪些内容仍未验证。
如果你考虑了多种方法,记录哪些被拒绝了以及原因。这可以防止下一个人重复走死胡同。
始终包含足够的仓库特定上下文,以便新人能够快速回答三个问题:
- - 发生了什么变化?
- 什么仍然存在问题或风险?
- 我应该下一步做什么,按什么顺序?
文件策略
如果存在,使用仓库的现有结构。如果 handover.md 已经包含历史条目,则就地追加或更新,而不是重写无关的历史。
只触及因当天发现而变得过时的 README 章节。保持 README 面向用户;将深度调查细节保留在交接中,除非 README 确实需要它们。
资源
references/sessionsummarytemplate.md
中文交接模板。
references/sessionsummarytemplate.en.md
英文交接模板。
此技能有意不要求辅助脚本。使用模型的常规仓库检查工具和上述模板。