bye
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSession Wrap-up
会话收尾
CRITICAL: Restore Full Session History First
重要提示:先恢复完整会话历史
Nothing proceeds until full history is reconstructed. Context compaction hides earlier work — you must recover it or the sessionlog will be incomplete.
- Use a subagent to analyze the session file (see subagent-tasks.md)
- Follow the tool-specific restoration guide:
- Claude Code: claude-code-session-restoration.md
- Cursor: cursor-session-restoration.md
- Combine restored history with current context before continuing
If restoration finds no prior work beyond current context, proceed — but log that restoration was attempted.
Parallel session safety: The user may have multiple sessions running. Filter byand timestamp correlation. Never combine work from other sessions. If uncertain, ASK.$CLAUDE_SESSION_ID
在完整历史重建完成前,不得进行任何后续操作。 上下文压缩会隐藏早期工作内容——你必须恢复这些内容,否则会话日志会不完整。
- 使用子代理(subagent)分析会话文件(参见 subagent-tasks.md)
- 遵循对应工具的恢复指南:
- Claude Code: claude-code-session-restoration.md
- Cursor: cursor-session-restoration.md
- 在继续后续步骤前,将恢复的历史与当前上下文合并
如果恢复操作发现除当前上下文外无其他早期工作内容,可继续流程,但需记录已尝试进行恢复操作。
并行会话安全提示: 用户可能同时运行多个会话。请通过和时间戳关联进行筛选。绝不能合并其他会话的工作内容。如有疑问,请询问用户。$CLAUDE_SESSION_ID
Session Type Detection
会话类型检测
After restoring history, classify the session:
| Signal | Type | Action |
|---|---|---|
| Subagent | STOP — do not run /bye |
| Metadata session | SKIP — not a real work session |
First messages reference executing a plan; recent file in | Plan execution | Read plan file; sessionlog documents execution vs plan |
System message contains | Plan creation | Plan file is the deliverable |
| None of above | Normal | Continue with checklist |
恢复历史后,对会话进行分类:
| 信号 | 类型 | 操作 |
|---|---|---|
| 子代理会话 | 终止 — 不执行/bye指令 |
| 元数据会话 | 跳过 — 非实际工作会话 |
初始消息提及执行计划; | 计划执行会话 | 读取计划文件;会话日志需记录实际执行与计划的对比情况 |
系统消息包含 | 计划创建会话 | 计划文件为交付成果 |
| 不符合以上任何情况 | 常规会话 | 继续执行检查清单 |
Session Wrap-up Checklist
会话收尾检查清单
- Determine scope — everything between last /bye (or session start) and now. Verify each item was discussed in THIS conversation.
- Assess work — files created, files modified, decisions made, research done, tasks completed, tasks remaining.
- Trivial session? If just Q&A with no file changes, ask: "Skip sessionlog?"
- Create or update sessionlog — see sessionlog-template.md for format, naming, and create-vs-update logic.
- Update project status — if work relates to , update its
projects/*/.status.md - Handle git — see git decision table below.
- Print final summary — see template below.
- 确定范围 — 涵盖上次执行/bye指令(或会话开始)至当前的所有内容。验证每一项内容均在本次对话中讨论过。
- 评估工作内容 — 已创建的文件、已修改的文件、已做出的决策、已完成的研究、已结束的任务、剩余的任务。
- 是否为小型会话? 如果仅为问答且未修改任何文件,询问用户:"是否跳过会话日志生成?"
- 创建或更新会话日志 — 格式、命名规则及创建/更新逻辑请参见 sessionlog-template.md。
- 更新项目状态 — 如果工作内容与相关,更新其
projects/*/文件。status.md - 处理Git操作 — 请参考下方的Git决策表。
- 打印最终总结 — 请使用下方的模板。
Git Decision Table
Git决策表
| Situation | Action |
|---|---|
| Files I created/edited THIS session | Auto-commit |
| Untracked files from before | ASK |
| Modified files I didn't touch | ASK — likely parallel session |
| .env, credentials, secrets | NEVER, warn user |
Commit message:
[Brief description]\n\nSession wrap-up: YYYY-MM-DDPush if remote tracking exists.
| 场景 | 操作 |
|---|---|
| 本次会话中我创建/编辑的文件 | 自动提交 |
| 之前存在的未追踪文件 | 询问用户 |
| 我未修改过的已修改文件 | 询问用户 — 可能来自并行会话 |
| .env、凭证、密钥文件 | 绝不提交,并向用户发出警告 |
提交信息:
[简要描述]\n\n会话收尾:YYYY-MM-DD若存在远程追踪分支则进行推送。
Final Summary Template
最终总结模板
undefinedundefinedSession Complete
会话完成
Accomplished:
- [item 1]
- [item 2]
Committed: [hash]
- [file list]
Pending:
- [task 1]
Sessionlog:
sessionlogs/[file].mdReady to clear context.
undefined已完成内容:
- [项1]
- [项2]
已提交: [哈希值]
- [文件列表]
待办事项:
- [任务1]
会话日志:
sessionlogs/[file].md已准备好清除上下文。
undefined