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
从多源重建会话:
undefined

What 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
  • 任务列表状态
  • 任何待处理/阻塞项
undefined

2. Categorize Findings

2. 分类发现

Sort into five buckets:
BucketQuestionExample
Went wellWhat should we keep doing?Module separation, lazy imports
FrictionWhat slowed us down?Guessed at API, wrong return types
Bugs introducedWhat broke and why?Dict access on dataclass
Missing artifactsWhat docs/tools would have prevented friction?Module API reference
Architecture insightsWhat 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
{repo}/.groom/retro.md
via
/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 —
/groom
reads retro.md to calibrate future effort estimates and issue scoping.
如果本次会话实现了一个GitHub Issue,通过/retro append将实现反馈追加到
{repo}/.groom/retro.md
  • Issue编号
  • 预估工作量(来自Issue的工作量标签)与实际工作量对比
  • 范围变更(实现过程中新增/移除的内容)
  • 遇到的阻塞项
  • 可复用的未来范围规划模式
这会为梳理流程提供反馈循环——/groom会读取retro.md来校准未来的工作量估算和Issue范围规划。

3.6. Tune Repo

3.6. 调整仓库

Run
/tune-repo
to refresh
.glance.md
summaries, update CLAUDE.md/AGENTS.md if drift is detected, and seed memory with new gotchas from the session.
运行/tune-repo来刷新
.glance.md
摘要,若发现偏差则更新CLAUDE.md/AGENTS.md,并将会话中发现的新问题存入自动记忆。

4. Execute Codification

4. 执行固化

For each item to codify:
  1. Read the target file
  2. Check for existing coverage (avoid duplication)
  3. Add the learning in the file's native format
  4. Verify no conflicts with existing content
Codification targets by type:
TargetLocationFormat
Hook
~/.claude/settings.json
+
~/.claude/hooks/
Python/bash script
Agent
~/.claude/agents/
YAML agent config
Skill update
~/.claude/skills/*/SKILL.md
Markdown with frontmatter
Auto-memory
~/.claude/projects/*/memory/*.md
Markdown notes
CLAUDE.md
~/.claude/CLAUDE.md
Staging section
Concise pattern
Project docsRepo
CLAUDE.md
,
AGENTS.md
,
docs/
Varies
针对每个需要固化的项:
  1. 读取目标文件
  2. 检查是否已有相关内容(避免重复)
  3. 以文件原生格式添加经验
  4. 验证与现有内容无冲突
按类型划分的固化目标:
目标位置格式
Hook
~/.claude/settings.json
+
~/.claude/hooks/
Python/bash脚本
Agent
~/.claude/agents/
YAML Agent配置文件
Skill更新
~/.claude/skills/*/SKILL.md
带前置元数据的Markdown
自动记忆
~/.claude/projects/*/memory/*.md
Markdown笔记
CLAUDE.md
~/.claude/CLAUDE.md
的Staging章节
简洁的模式说明
项目文档仓库中的
CLAUDE.md
AGENTS.md
docs/
格式多样

5. Report

5. 生成报告

Output structured summary:
undefined
输出结构化摘要:
undefined

Session 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
  • [任何未完成或标记为待处理的内容]
undefined

Integration

集成

ConsumesProduces
Session context (conversation)Updated CLAUDE.md staging
git diff
,
git log
New/updated skill files
Task list stateNew/updated hooks
Error logs from sessionAuto-memory entries
New/updated agents
.groom/retro.md
entries
Hands off to:
  • /commit
    — if codification artifacts should be committed
  • /distill
    — if staging section is getting long (graduate to skills/agents)
输入输出
会话上下文(对话内容)更新后的CLAUDE.md Staging章节
git diff
git log
新增/更新的Skill文件
任务列表状态新增/更新的Hook
会话中的错误日志自动记忆条目
新增/更新的Agent
.groom/retro.md
条目
交接至:
  • /commit
    — 若固化的工件需要提交
  • /distill
    — 若Staging章节过长(提炼为Skill/Agent)

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:
  1. Read
    ~/.claude/skills/visualize/prompts/done-retro.md
  2. Read the template(s) referenced in the prompt
  3. Read
    ~/.claude/skills/visualize/references/css-patterns.md
  4. Generate self-contained HTML capturing this session's output
  5. Write to
    ~/.agent/diagrams/retro-{date}.html
  6. Open in browser:
    open ~/.agent/diagrams/retro-{date}.html
  7. 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摘要:
  1. 读取
    ~/.claude/skills/visualize/prompts/done-retro.md
  2. 读取提示中引用的模板
  3. 读取
    ~/.claude/skills/visualize/references/css-patterns.md
  4. 生成包含本次会话输出的独立HTML文件
  5. 写入至
    ~/.agent/diagrams/retro-{date}.html
  6. 在浏览器中打开:
    open ~/.agent/diagrams/retro-{date}.html
  7. 告知用户文件路径
以下情况跳过可视化输出:
  • 会话内容琐碎(仅单个发现、快速修复)
  • 用户明确选择跳过(
    --no-visual
  • 无可用浏览器(SSH会话)