reflect
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseReflect — session retrospective
回顾 — 会话复盘
A structured self-audit after a non-trivial session: what friction did the current setup cause? What should be added, changed, or removed?
.claude/针对非简单会话的结构化自我审计:当前配置引发了哪些摩擦?应该添加、修改或移除哪些内容?
.claude/Before You Start
开始前准备
- — the ambient project context. Read it alongside this session's transcript.
CLAUDE.md - — scan every active skill's description.
.claude/skills/ - and
.claude/hooks/— see what's wired..claude/settings.json - — the seven principles are the benchmark for any proposed change.
principles/
- — 项目环境上下文。请结合本次会话的记录阅读此文件。
CLAUDE.md - — 查看每个活跃技能的描述。
.claude/skills/ - 和
.claude/hooks/— 了解已配置的内容。.claude/settings.json - — 七大原则是所有拟议变更的基准。
principles/
Step 1: collect evidence
步骤1:收集证据
Scan the session for friction signals:
- User corrections — "no, not that", "don't do X", "stop doing Y" indicate either misleading guidance or a missing rule.
- User confirmations on non-obvious choices — "yes, exactly", "that's the right call" validate a non-obvious pattern worth encoding.
- Places the agent searched for a file repeatedly — missing directory landmark in .
CLAUDE.md - Places the agent proposed an approach then had to back out — missing convention.
- Hook blocked work in a frustrating way — hook's message was not actionable.
- Skills that triggered when they shouldn't have — description is too broad.
扫描会话内容,寻找摩擦信号:
- 用户修正 — "不,不是那样"、"不要做X"、"停止做Y"表明指南存在误导或缺少相关规则。
- 用户对非显而易见选择的确认 — "对,正是如此"、"这个选择是对的"验证了某个值得编码的非显而易见模式。
- Agent重复搜索同一文件的场景 — 中缺少目录标记。
CLAUDE.md - Agent提出方案后又撤回的场景 — 缺少约定规范。
- Hook以令人沮丧的方式阻碍工作 — Hook的提示不具备可操作性。
- 技能在不应触发时被触发 — 技能描述范围过宽。
Step 2: classify findings
步骤2:分类发现
For each signal, put it into a category:
| Category | What to do |
|---|---|
| Hidden invariant or gotcha the agent didn't know | Add to |
| Repeated multi-step workflow that isn't yet a skill | Candidate for a new skill (use |
| Rule that a linter/formatter should enforce | Wire a hook; don't add prose |
| Skill that fired wrongly / too often | Tighten the description's "Do NOT use for" clause |
Rule in | Update or remove — stale guidance is worse than none |
| Generic phrase that sneaked in | Remove it. The |
将每个信号归入对应类别:
| 类别 | 处理方式 |
|---|---|
| Agent未知的隐藏约束或陷阱 | 在 |
| 重复出现的多步骤工作流,尚未封装为技能 | 可作为新技能的候选(使用 |
| 应由代码检查/格式化工具强制执行的规则 | 配置Hook;无需添加文字说明 |
| 错误触发/过于频繁触发的技能 | 收紧技能描述中的"请勿用于"条款 |
| 更新或移除——过时指南比没有指南更糟 |
| 混入的通用表述 | 删除此类内容。 |
Step 3: propose changes
步骤3:提出变更建议
Write one concrete change per finding. Example shape:
markdown
undefined针对每个发现,撰写一条具体的变更建议。示例格式:
markdown
undefinedFinding: agent created service classes inconsistently
发现:Agent创建服务类的方式不一致
Evidence: 2 instances in this session — got a extension,
did not.
src/users/service.tsServiceBasesrc/orders/service.tsClassification: hidden invariant — the codebase uses consistently, but it's
not documented.
ServiceBaseProposed change: add to under "Patterns and Conventions":
CLAUDE.mdNew services extend (), which provides logging
and error wrapping. See for the canonical example.
ServiceBasesrc/lib/service-base.tssrc/users/service.tsundefined证据: 本次会话中出现2次此类情况 — 继承了,
却没有。
src/users/service.tsServiceBasesrc/orders/service.ts分类: 隐藏约束——代码库统一使用,但未形成文档。
ServiceBase拟议变更: 在的"模式与约定"部分添加:
CLAUDE.md新服务需继承(),该类提供日志记录
和错误封装功能。可参考中的标准示例。
ServiceBasesrc/lib/service-base.tssrc/users/service.tsundefinedStep 4: apply with user confirmation
步骤4:经用户确认后执行
Never edit or skills without the user's say-so. Present all proposed changes as a single list; the user approves or rejects each. Apply only what's approved.
CLAUDE.md未经用户许可,不得编辑或技能。将所有拟议变更整理为单个列表呈现,由用户逐一批准或拒绝。仅执行获批准的变更。
CLAUDE.mdStep 5: re-validate
步骤5:重新验证
For every file touched, re-run the artifact-specific audit skill so the mechanical gates pass:
- Changed → run
CLAUDE.md(Mode 2)create-or-audit-claude-md - Changed → run
SKILL.md(Mode 2)create-or-audit-skill - Changed hook → run
*.sh(Mode 2)create-or-audit-hook
A validator regression after reflection means the reflection made things worse — fix before declaring done.
对于每一个被修改的文件,重新运行对应工件的审计技能,确保通过机械验证:
- 修改了→ 运行
CLAUDE.md(模式2)create-or-audit-claude-md - 修改了→ 运行
SKILL.md(模式2)create-or-audit-skill - 修改了Hook → 运行
*.sh(模式2)create-or-audit-hook
若复盘后验证器出现回归问题,说明复盘带来了负面影响——需修复后再宣告完成。
Verify
验证确认
For each artifact you changed, the corresponding skill's Mode 2 audit reports . If anything regressed, the reflection has not landed cleanly.
create-or-audit-*VERDICT: PASS对于每一个被修改的工件,对应的技能的模式2审计需返回。若出现任何回归问题,说明复盘未顺利完成。
create-or-audit-*VERDICT: PASSCommon Mistakes
常见错误
| Mistake | Correction |
|---|---|
| Turning one-off friction into a permanent rule | Reflect asks "would this happen again?" — one incident isn't a pattern. Usually two instances before codifying. |
| Adding a rule without deleting the stale one it contradicts | Replace, don't append. |
| Editing files without showing the user | Always propose; user approves. Reflection is collaborative, not autonomous. |
| Skipping the validator re-run | Principle 01 is evidence-based — if the validator now fails, the reflection made things worse. |
| 错误 | 修正方式 |
|---|---|
| 将一次性摩擦转化为永久规则 | 复盘时需思考"这种情况会再次发生吗?"——单次事件不构成模式。通常需出现两次实例后再进行编码固化。 |
| 添加新规则但未删除与之矛盾的过时规则 | 替换而非追加。 |
| 未向用户展示就直接编辑文件 | 始终先提出建议;由用户批准。复盘是协作过程,而非自主操作。 |
| 跳过验证器重新运行步骤 | 原则01是基于证据的——若验证器现在失败,说明复盘带来了负面影响。 |