done
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese/done — Session Retrospective
/done — 会话回顾
Structured reflection that produces concrete artifacts. Not a journal entry —
every finding either becomes a codified artifact or gets explicitly justified
as not worth codifying.
结构化反思,生成具体工件。这不是日志条目——每个发现要么转化为固化的工件,要么明确说明无需固化的理由。
Process
流程
1. Gather Evidence
1. 收集证据
Reconstruct session from multiple sources:
undefined从多源重建会话:
undefinedWhat changed
变更内容
git diff --stat HEAD~N (or unstaged if no commits)
git log --oneline -10
git diff --stat HEAD~N (若未提交则查看未暂存内容)
git log --oneline -10
What was attempted (from conversation context)
尝试过的操作(来自对话上下文)
- Commands that failed and why
- Bugs encountered and root causes
- Patterns discovered
- User corrections received
- 执行失败的命令及原因
- 遇到的Bug及根本原因
- 发现的模式
- 收到的用户修正意见
Current state
当前状态
- Task list status
- Any pending/blocked items
undefined- 任务列表状态
- 任何待处理/阻塞项
undefined2. Categorize Findings
2. 分类发现
Sort into five buckets:
| Bucket | Question | Example |
|---|---|---|
| Went well | What should we keep doing? | Module separation, lazy imports |
| Friction | What slowed us down? | Guessed at API, wrong return types |
| Bugs introduced | What broke and why? | Dict access on dataclass |
| Missing artifacts | What docs/tools would have prevented friction? | Module API reference |
| Architecture insights | What design decisions proved right/wrong? | SQLite for persistence |
将内容分为五个类别:
| 类别 | 问题 | 示例 |
|---|---|---|
| 进展顺利 | 哪些做法应该保留? | 模块分离、懒加载导入 |
| 存在阻碍 | 哪些环节拖慢了进度? | 猜测API用法、错误的返回类型 |
| 引入的Bug | 哪些内容出了问题及原因? | 对数据类进行字典访问 |
| 缺失的工件 | 哪些文档/工具可以避免阻碍? | 模块API参考文档 |
| 架构见解 | 哪些设计决策被证明是正确/错误的? | 使用SQLite进行持久化 |
3. Codification Pass
3. 经验固化环节
For EACH friction point and bug, evaluate codification targets in order:
Hook → Can we prevent this automatically? (pre-edit)
Lint rule → Can a lint rule catch this at edit time? → invoke /guardrail
Agent → Can a reviewer catch this?
Skill → Is this a reusable workflow?
Memory → Should auto-memory capture this?
CLAUDE.md → Is this a convention/philosophy?
Docs → Does a reference doc need updating?Default: codify. Exception: justify not codifying.
针对每个阻碍点和Bug,按顺序评估固化目标:
Hook → 能否自动预防该问题?(编辑前)
Lint rule → 能否通过Lint规则在编辑时检测到?→ 调用/guardrail
Agent → 能否由审核者检测到?
Skill → 这是否是可复用的工作流?
Memory → 是否应让自动记忆捕获该内容?
CLAUDE.md → 这是否属于约定/理念?
Docs → 是否需要更新参考文档?默认规则:进行固化。例外情况:说明无需固化的理由。
3.5. Retro Append
3.5. 追加回顾内容
If this session implemented a GitHub issue, append implementation feedback to
via :
{repo}/.groom/retro.md/retro append- Issue number
- Predicted effort (from issue's effort label) vs actual effort
- Scope changes (what was added/removed during implementation)
- Blockers encountered
- Reusable pattern for future scoping
This feeds the grooming feedback loop — reads retro.md to calibrate
future effort estimates and issue scoping.
/groom如果本次会话实现了一个GitHub Issue,通过/retro append将实现反馈追加到:
{repo}/.groom/retro.md- Issue编号
- 预估工作量(来自Issue的工作量标签)与实际工作量对比
- 范围变更(实现过程中新增/移除的内容)
- 遇到的阻塞项
- 可复用的未来范围规划模式
这会为梳理流程提供反馈循环——/groom会读取retro.md来校准未来的工作量估算和Issue范围规划。
3.6. Tune Repo
3.6. 调整仓库
Run to refresh summaries, update CLAUDE.md/AGENTS.md if drift is detected, and seed memory with new gotchas from the session.
/tune-repo.glance.md运行/tune-repo来刷新摘要,若发现偏差则更新CLAUDE.md/AGENTS.md,并将会话中发现的新问题存入自动记忆。
.glance.md4. Execute Codification
4. 执行固化
For each item to codify:
- Read the target file
- Check for existing coverage (avoid duplication)
- Add the learning in the file's native format
- Verify no conflicts with existing content
Codification targets by type:
| Target | Location | Format |
|---|---|---|
| Hook | | Python/bash script |
| Agent | | YAML agent config |
| Skill update | | Markdown with frontmatter |
| Auto-memory | | Markdown notes |
| CLAUDE.md | | Concise pattern |
| Project docs | Repo | Varies |
针对每个需要固化的项:
- 读取目标文件
- 检查是否已有相关内容(避免重复)
- 以文件原生格式添加经验
- 验证与现有内容无冲突
按类型划分的固化目标:
| 目标 | 位置 | 格式 |
|---|---|---|
| Hook | | Python/bash脚本 |
| Agent | | YAML Agent配置文件 |
| Skill更新 | | 带前置元数据的Markdown |
| 自动记忆 | | Markdown笔记 |
| CLAUDE.md | | 简洁的模式说明 |
| 项目文档 | 仓库中的 | 格式多样 |
5. Report
5. 生成报告
Output structured summary:
undefined输出结构化摘要:
undefinedSession Retrospective
会话回顾
Went Well
进展顺利
- [item]: [why it worked]
Friction Points
阻碍点
- [item]: [what happened] → [codified to: file]
- [项]: 发生了什么 → [固化至:文件]
Bugs Introduced & Fixed
引入并修复的Bug
- [bug]: [root cause] → [codified to: file]
- [Bug]: [根本原因] → [固化至:文件]
Artifacts Created/Updated
创建/更新的工件
- [file]: [what changed]
Not Codified (with justification)
未固化(附理由)
- [item]: [specific reason]
Open Items
未完成项
- [anything left unfinished or flagged for future]
undefined- [任何未完成或标记为待处理的内容]
undefinedIntegration
集成
| Consumes | Produces |
|---|---|
| Session context (conversation) | Updated CLAUDE.md staging |
| New/updated skill files |
| Task list state | New/updated hooks |
| Error logs from session | Auto-memory entries |
| New/updated agents | |
|
Hands off to:
- — if codification artifacts should be committed
/commit - — if staging section is getting long (graduate to skills/agents)
/distill
| 输入 | 输出 |
|---|---|
| 会话上下文(对话内容) | 更新后的CLAUDE.md Staging章节 |
| 新增/更新的Skill文件 |
| 任务列表状态 | 新增/更新的Hook |
| 会话中的错误日志 | 自动记忆条目 |
| 新增/更新的Agent | |
|
交接至:
- — 若固化的工件需要提交
/commit - — 若Staging章节过长(提炼为Skill/Agent)
/distill
Anti-Patterns
反模式
- Writing a retrospective without producing artifacts ("reflecting without codifying")
- Codifying things that are already covered (check existing files first)
- Over-codifying obvious patterns that any model would know
- Creating docs nobody will read (prefer hooks/agents that enforce automatically)
- Skipping the "went well" section (positive reinforcement matters for pattern stability)
- 仅做回顾而不生成工件(“只反思不固化”)
- 固化已有覆盖的内容(先检查现有文件)
- 过度固化任何模型都应知晓的明显模式
- 创建无人会读的文档(优先选择可自动强制执行的Hook/Agent)
- 跳过“进展顺利”章节(正向强化对模式稳定性很重要)
Visual Deliverable
可视化交付物
After completing the core workflow, generate a visual HTML summary:
- Read
~/.claude/skills/visualize/prompts/done-retro.md - Read the template(s) referenced in the prompt
- Read
~/.claude/skills/visualize/references/css-patterns.md - Generate self-contained HTML capturing this session's output
- Write to
~/.agent/diagrams/retro-{date}.html - Open in browser:
open ~/.agent/diagrams/retro-{date}.html - Tell the user the file path
Skip visual output if:
- The session was trivial (single finding, quick fix)
- The user explicitly opts out ()
--no-visual - No browser available (SSH session)
完成核心工作流后,生成可视化HTML摘要:
- 读取
~/.claude/skills/visualize/prompts/done-retro.md - 读取提示中引用的模板
- 读取
~/.claude/skills/visualize/references/css-patterns.md - 生成包含本次会话输出的独立HTML文件
- 写入至
~/.agent/diagrams/retro-{date}.html - 在浏览器中打开:
open ~/.agent/diagrams/retro-{date}.html - 告知用户文件路径
以下情况跳过可视化输出:
- 会话内容琐碎(仅单个发现、快速修复)
- 用户明确选择跳过()
--no-visual - 无可用浏览器(SSH会话)