交接文档恢复工作
resume-handoff
从保存的交接文档恢复工作,在继续之前先根据当前代码库验证其状态。适用于上下文清空后或在新会话中(通过路径、会话名称或 GitHub issue)从保存的交接文档恢复工作。
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- resume-handoff
- description
- Resume work from a saved handoff document, validating its state against the current codebase before continuing. Use when resuming work from a saved handoff after a context clear or in a new session (path, session name, or GitHub issue).
02 资源文件 1
03 SKILL.md 正文
Resume work from a handoff document
Resume work from a handoff document through an interactive process. Handoffs (written by create-handoff) carry context, learnings, and next steps from a previous session. Validate that the handoff still matches the codebase, then continue — never assume the snapshot is current.
Initial Response
When this command is invoked:
-
If the path to a handoff document was provided:
- If a handoff document path was provided as a parameter, skip the default message
- Immediately read the handoff document FULLY
- Immediately read any research or plan documents that it links to under
thoughts/shared/plans. do NOT use a sub-agent to read these critical files. - Begin the analysis process by ingesting relevant context from the handoff document, reading additional files it mentions
- Then propose a course of action to the user and confirm, or ask for clarification on direction.
-
If a session name or GitHub issue (like
rbac-refactoror#1372) was provided:- locate the most recent handoff document for that work stream. Handoffs are located in
thoughts/shared/handoffs/{session-name}/where{session-name}matches the active ledger name (kebab-case, e.g.rbac-refactor,export-contract). If a GitHub issue number was given, use the session-name folder whose handoffs reference that issue. List this directory's contents. - There may be zero, one or multiple files in the directory.
- If there are zero files in the directory, or the directory does not exist: tell the user: "I'm sorry, I can't seem to find that handoff document. Can you please provide me with a path to it?"
- If there is only one file in the directory: proceed with that handoff
- If there are multiple files in the directory: using the date and time specified in the file name (it will be in the format
YYYY-MM-DD_HH-MM-SSin 24-hour time format, e.g.2026-06-20_14-30-00_description.md), proceed with the most recent handoff document. - Immediately read the handoff document FULLY
- Immediately read any research or plan documents that it links to under
thoughts/shared/plans; do NOT use a sub-agent to read these critical files. - Begin the analysis process by ingesting relevant context from the handoff document, reading additional files it mentions
- Then propose a course of action to the user and confirm, or ask for clarification on direction.
- locate the most recent handoff document for that work stream. Handoffs are located in
-
If no parameters provided, respond with:
I'll help you resume work from a handoff document. Let me find the available handoffs.
Which handoff would you like to resume from?
Tip: You can invoke this command directly with a handoff path: `/resume-handoff thoughts/shared/handoffs/{session-name}/YYYY-MM-DD_HH-MM-SS_description.md`
or using a session name (or related GitHub issue) to resume from the most recent handoff for that work stream: `/resume-handoff rbac-refactor`
Then wait for the user's input.
Process Steps
Step 1: Read and Analyze Handoff
-
Read handoff document completely:
- Use the Read tool WITHOUT limit/offset parameters
- Extract all sections:
- Task(s) and their statuses
- Recent changes
- Learnings
- Artifacts
- Action items and next steps
- Other notes
-
Spawn focused research tasks: Based on the handoff content, spawn parallel research tasks to verify current state:
Task 1 - Gather artifact context: Read all artifacts mentioned in the handoff. 1. Read feature documents listed in "Artifacts" 2. Read implementation plans referenced 3. Read any research documents mentioned 4. Extract key requirements and decisions Use tools: Read Return: Summary of artifact contents and key decisions -
Wait for ALL sub-tasks to complete before proceeding
-
Read critical files identified:
- Read files from "Learnings" section completely
- Read files from "Recent changes" to understand modifications
- Read any new related files discovered during research
Step 2: Synthesize and Present Analysis
-
Verify the handoff against the current codebase, since the snapshot may be stale:
- For every item in "Recent changes", confirm it is still present/missing/modified.
- For every "Learnings" file:line reference, confirm it is still valid or note what changed.
- Match the situation to the divergence type (clean / diverged / incomplete / stale)
and adapt the plan accordingly — see
reference/synthesis-and-reconciliation.md.
-
Present the analysis using the template in
reference/synthesis-and-reconciliation.md(original tasks vs verification, validated learnings, recent-change status, artifacts, recommended next actions, potential issues). -
Get confirmation before proceeding.
Step 3: Create Action Plan
-
Use TodoWrite to create task list:
- Convert action items from handoff into todos
- Add any new tasks discovered during analysis
- Prioritize based on dependencies and handoff guidance
-
Present the plan:
I've created a task list based on the handoff and current analysis: [Show todo list] Ready to begin with the first task: [task description]?
Step 4: Begin Implementation
- Start with the first approved task
- Reference learnings from handoff throughout implementation
- Apply patterns and approaches documented in the handoff, and avoid the mistakes its "Learnings" / "What Failed" sections call out
- Update progress as tasks are completed, and reference the handoff path in commits
04 同仓库更多 Skills
技术文档写作规范
writing-standards
遵循 AS v2 技术写作规范(清晰、简洁、主动语态、Python/Django 惯例)。适用于撰写 README、文档字符串(PEP 257)、提交信息、PR 描述、错误信息或任何技术文档。
成果验证关卡
verification-gate
在宣称成功之前先进行验证。适用于准备表示某功能可用/已完成、实现功能后、修复缺陷后,或推送代码前——先运行验证命令并确认输出。
测试驱动开发
test-driven-development
在 AS v2(pytest + Django/DRF)中先编写失败的测试,再进行实现。适用于实现功能或修复缺陷时,在编写任何生产代码之前使用。
子智能体编排开发
subagent-development
在 AS v2 中编排子智能体——将任务拆解为相互独立的领域,并行处理并进行两阶段审查。适用于委派探索、实现或跨文件验证,以加快工作进度并节省主上下文。
自动化安全扫描
security-scan
为 AS v2 提供自动化安全扫描。在提交前或审查变更中的漏洞时使用。执行依赖审计(pip-audit、npm audit)、密钥检测(grep 模式)和代码模式扫描(SQL 注入、XSS、eval、pickle、硬编码密钥)。与项目 hooks 系统集成。
代码审查反馈处理
receiving-code-review
为 AS v2 分类并响应代码审查反馈。当 PR 有审查意见、用户分享反馈、CI/lint 标记问题,或在 /review-staged 或 /review-enhanced 运行之后使用。