create-handoff

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Create Handoff

创建交接文档

You are tasked with writing a handoff document to hand off your work to another agent in a new session. You will create a handoff document that is thorough, but also concise. The goal is to compact and summarize your context without losing any of the key details of what you're working on.
你的任务是编写一份交接文档,以便在新会话中将工作交接给另一个Agent。你需要创建一份既全面又简洁的交接文档。目标是压缩并总结你的上下文信息,同时不丢失当前工作的任何关键细节。

Process

流程

1. Filepath & Metadata

1. 文件路径与元数据

Use the following information to understand how to create your document: - create your file under
.claude/scratchpad/handoffs/[feature]_description.md
, where: feature is a brief kebab-case description
使用以下信息了解如何创建文档:- 将文件创建在
.claude/scratchpad/handoffs/[feature]_description.md
路径下,其中:feature为简短的烤肉串式命名(kebab-case)描述

2. Handoff writing.

2. 交接文档撰写

use the defined filepath, and the following YAML frontmatter pattern. Structure the document with YAML frontmatter followed by content:
Use the following template structure:
markdown
---
date: [Current date and time with timezone in ISO format]
git_commit: [Current commit hash]
branch: [Current branch name]
repository: [Repository name]
topic: '[Feature/Task Name] Implementation Strategy'
last_updated: [Current date in YYYY-MM-DD format]
type: implementation_strategy
---
使用指定的文件路径,以及以下YAML前置元数据格式。文档结构为YAML前置元数据加正文内容:
使用以下模板结构:
markdown
---
date: [带时区的当前日期和时间,ISO格式]
git_commit: [当前提交哈希值]
branch: [当前分支名称]
repository: [仓库名称]
topic: '[功能/任务名称] 实现策略'
last_updated: [当前日期,格式为YYYY-MM-DD]
type: implementation_strategy
---

Handoff: ENG-XXXX {very concise description}

交接文档:ENG-XXXX {非常简洁的描述}

Task(s)

任务

{description of the task(s) that you were working on, along with the status of each (completed, work in progress, planned/discussed). If you are working on an implementation plan, make sure to call out which phase you are on. Make sure to reference the plan document and/or research document(s) you are working from that were provided to you at the beginning of the session, if applicable.}
{描述你正在处理的任务,以及每个任务的状态(已完成、进行中、计划/讨论中)。如果你正在制定实施计划,请明确说明所处的阶段。如有适用,请确保引用会话开始时提供给你的计划文档和/或研究文档。}

Critical References

关键参考资料

{List any critical specification documents, architectural decisions, or design docs that must be followed. Include only 2-3 most important file paths. Leave blank if none.}
{列出必须遵循的关键规范文档、架构决策或设计文档。仅包含2-3个最重要的文件路径。若无则留空。}

Recent changes

近期变更

{describe recent changes made to the codebase that you made in line:file syntax}
{描述你对代码库所做的近期变更,使用 路径/文件.ext:行号 格式}

Learnings

经验总结

{describe important things that you learned - e.g. patterns, root causes of bugs, or other important pieces of information someone that is picking up your work after you should know. consider listing explicit file paths.}
{描述你学到的重要内容——例如模式、bug的根本原因,或者后续接手工作的人需要了解的其他重要信息。可以考虑列出明确的文件路径。}

Artifacts

产出物

{ an exhaustive list of artifacts you produced or updated as filepaths and/or file:line references - e.g. paths to feature documents, implementation plans, etc that should be read in order to resume your work.}
{你生成或更新的所有产出物的详尽列表,以文件路径和/或 文件:行号 引用形式呈现——例如功能文档、实施计划的路径等,接手工作时需要阅读这些内容以继续推进。}

Action Items & Next Steps

行动项与下一步计划

{ a list of action items and next steps for the next agent to accomplish based on your tasks and their statuses}
{基于你的任务及其状态,列出下一个Agent需要完成的行动项和下一步计划}

Other Notes

其他说明

{ other notes, references, or useful information - e.g. where relevant sections of the codebase are, where relevant documents are, or other important things you leanrned that you want to pass on but that don't fall into the above categories}

---

##. Additional Notes & Instructions

- **more information, not less**. This is a guideline that defines the minimum of what a handoff should be. Always feel free to include more information if necessary.
- **be thorough and precise**. include both top-level objectives, and lower-level details as necessary.
- **avoid excessive code snippets**. While a brief snippet to describe some key change is important, avoid large code blocks or diffs; do not include one unless it's necessary (e.g. pertains to an error you're debugging). Prefer using `/path/to/file.ext:line` references that an agent can follow later when it's ready, e.g. `packages/dashboard/src/app/dashboard/page.tsx:12-24`
{其他说明、参考资料或有用信息——例如代码库相关部分的位置、相关文档的位置,或者你学到的其他重要内容,这些内容不属于上述类别但需要传递下去}

---

额外说明与指引

  • 信息宁多勿少。这是定义交接文档最低要求的指南。如有必要,随时可以添加更多信息。
  • 全面且精准。同时包含顶层目标和必要的底层细节。
  • 避免过多代码片段。虽然简短的片段对于描述关键变更很重要,但要避免大的代码块或差异对比;除非必要(例如与你正在调试的错误相关),否则不要包含。优先使用Agent后续可以跟进的
    /path/to/file.ext:line
    引用形式,例如
    packages/dashboard/src/app/dashboard/page.tsx:12-24