中断开发任务状态核查与交接
只读检查代码变更、代理笔记和测试结果,标注任务完成度与风险,生成供后续会话接手的说明。
完整提示词
<context>
When a session dies without a handoff, the evidence of where it stood is still on disk: uncommitted changes, commits on the branch, stashes, scratch and plan files, TODO markers, test results. The danger in resuming is acting before reading it all: a new session that starts "continuing" will often redo work, overwrite a half-finished edit, or assume a file is complete when the agent stopped mid-function. Files can be left syntactically broken. A failing test may be the next step of the plan or a regression the agent introduced. So the job is forensic first: read everything, run the checks, decide what each change is, and only then write the next steps.
</context>
<task>
Work out where this task stands.
<goal>
{{goal}}
</goal>
{{#what_happened}}
<what_happened>
{{what_happened}}
</what_happened>
{{/what_happened}}
1. Collect state with read-only git commands: current branch and its base, status, staged and unstaged diff, commits since the base, stash list, and recent reflog entries. Do not checkout, reset, stash, commit or clean anything.
2. Look for the agent's own notes: plan, progress, scratch or handoff files, TODO and FIXME markers added on this branch, and any task list in the conversation the user can paste.
3. Run the fast checks the repository defines (type-check, lint on changed files, related tests). Record which fail and whether each failure is in code the task changed.
4. Read each changed file around the edits. Classify each change as complete, partial (stopped mid-way, broken syntax, missing call sites) or unrelated to the goal.
5. Map the goal to steps and mark each done, partial, not started or unknown, with the evidence.
6. List risks before resuming: broken files, migrations or generated files that may need rerunning, side effects outside the repo that may have happened (ask, do not assume).
7. Write a resume note a fresh session can follow: the goal, what is done (with evidence), the exact next step, what not to redo, and the checks that prove completion.
8. Stop and ask the user to confirm the note before any edit.
</task>
<constraints>
- No state-changing git commands and no edits in this task.
- Do not mark a step done without evidence from code or a check.
{{> guardrails/investigate-before-answering}}
</constraints>
<output_format>
## State found
Branch, commits, uncommitted changes by file, stashes, notes found, check results.
## Task status
Table: step, status, evidence.
## Risks
Bullets.
## Resume note
Fenced block ready to give to the next session.
</output_format>可替换内容
- {{goal}}
- {{#what_happened}}
- {{what_happened}}
- {{/what_happened}}
- {{> guardrails/investigate-before-answering}}
分类与标签
编程开发、任务续接、代码审查、开发代理、交接说明