reflect

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Reflect

反思

Success Criteria

成功标准

  • Every mistake/friction point cites the specific moment and its impact
  • Improvements are actionable and prioritized (cap defined in step 4)
  • Each skill audit proposes measurable changes (not vague suggestions)
  • User is asked which items to persist to memory
  • If review activity occurred, review-trap patterns are captured to persistent memory, or explicitly marked as "none"
  • 每个错误/摩擦点都需明确指出具体发生时刻及其影响
  • 改进措施需具备可执行性并按优先级排序(第4步中定义上限)
  • 每项技能审核需提出可衡量的改进方案(而非模糊建议)
  • 需询问用户哪些内容需要留存至记忆库
  • 若涉及评审活动,需将评审陷阱模式留存至持久记忆库,或明确标记为“无”

Process

流程

1. Session Review

1. 会话回顾

Scan the full conversation. For each finding, cite the specific exchange (quote or paraphrase) and its impact.
CategorySignal
MistakesWrong outputs, incorrect assumptions, hallucinated facts
FrictionRepeated clarifications, verbose responses, misread intent
Wasted effortWork discarded, wrong approaches tried first
WinsApproaches worth repeating, smooth interactions
Skip one-time typos, external tool failures, and issues outside agent control.
扫描完整对话内容。针对每个发现,引用具体对话内容(原文引用或转述)及其影响。
分类信号
错误输出错误、假设错误、事实幻觉
摩擦反复澄清、回复冗长、误解意图
无效工作工作成果被丢弃、优先尝试了错误方法
亮点值得复用的方法、顺畅的交互过程
可忽略一次性拼写错误、外部工具故障及Agent无法控制的问题。

2. Review Activity Scan (if applicable)

2. 评审活动扫描(如适用)

If the session included PR or MR review activity in either direction, run this scan before moving on. Skip only if no reviews happened.
Inbound (my code was reviewed): For each review comment received:
  • Did I accept it? If yes, what pattern did the reviewer catch that I missed? Is it a recurring blind spot? Capture the one-liner to persistent memory.
  • Did I push back? If I was right and the reviewer was wrong, nothing to capture. If I was wrong and had to retract mid-thread, capture what I learned.
Outbound (I reviewed someone else's code): For each comment I authored:
  • Was it accepted? Nothing to capture -- good call.
  • Was it rejected with a valid counter? That's a review trap. Capture the pattern: what heuristic did I apply that produced a wrong comment?
"No harvestable items" is a valid outcome -- say so explicitly. Don't let the step quietly drop off.
若会话中包含双向PR或MR评审活动,需先执行此扫描。无评审活动时可跳过。
Inbound(我的代码被评审): 针对每条收到的评审意见:
  • 我是否接受了该意见?若是,评审者发现了我遗漏的何种模式?是否为反复出现的盲区?将总结内容留存至持久记忆库。
  • 我是否提出了反驳?若我正确而评审者错误,则无需留存;若我错误并在对话中撤回观点,则需记录学到的内容。
Outbound(我评审他人代码): 针对每条我提出的评审意见:
  • 是否被接受?无需留存——判断正确。
  • 是否被对方以合理理由驳回?这属于评审陷阱。记录模式:我采用了何种启发式方法导致提出错误意见?
“无可留存内容”是有效结果——需明确说明,不可跳过此步骤。

3. Operational Learnings

3. 运营经验总结

Before listing improvements, scan the session for operational insights worth preserving. Apply the 5-minute filter: would knowing this save 5+ minutes in a future session? If yes, include it. Examples: a project-specific quirk, a project command that failed for a project-specific reason, an approach that worked better than expected.
Exclude harness-level noise — "File has not been read yet", token-limit truncations, bash-quoting slips, and other tooling artifacts. Those aren't project learnings; capture the project's behavior, not the agent's mechanics.
在列出改进措施前,扫描会话内容以找出值得留存的运营洞察。应用5分钟筛选法则:了解此内容能否在未来会话中节省5分钟以上时间?若是,则纳入。示例:项目特定的特殊规则、因项目特定原因失败的项目命令、比预期效果更好的方法。
排除工具层面的干扰——如“文件尚未读取”、token限制截断、bash引号错误及其他工具 artifacts。这些不属于项目经验;需记录项目的行为,而非Agent的机制。

4. Improvements

4. 改进措施

Numbered list of concrete improvements, ranked by impact. Each item: one sentence, imperative, actionable. Cap at 10 items: if more surface, the bottom items are noise -- drop them rather than batching or splitting.
Ask: "Which of these should I remember for future chats?"
Save approved items to memory files at
~/.claude/projects/<project-slug>/memory/
(replace
<project-slug>
with the slug matching the current working directory, e.g.,
-home-ilia-ai-whetstone
) using the Write tool with proper frontmatter (see MEMORY.md index).
Before writing, grep the existing memory directory for the item's key terms. On a near-duplicate, update that file instead of adding a second. On a direct contradiction with an entry already on file ("use tabs" when "use spaces" is recorded), do not blind-append — surface both and let the user choose merge, replace, or keep-both. Silent duplicate and contradiction accumulation is the main way a curated memory index rots.
按影响优先级排序的具体改进措施编号列表。每项内容:一句话、祈使句、可执行。上限为10项:若超出,末尾的内容视为无效信息——直接删除,而非批量处理或拆分。
询问:“其中哪些内容我需要在未来对话中记住?”
将用户认可的内容保存至
~/.claude/projects/<project-slug>/memory/
路径下的记忆文件中(将
<project-slug>
替换为与当前工作目录匹配的标识,例如
-home-ilia-ai-whetstone
),使用Write工具并添加正确的前置内容(参见MEMORY.md索引)。
写入前,需在现有记忆目录中搜索该内容的关键词。若存在近似重复内容,更新现有文件而非添加新文件;若与已记录内容直接矛盾(如已记录“使用空格”,新内容为“使用制表符”),不可盲目追加——需同时展示两者,让用户选择合并、替换或保留两者。无声积累重复和矛盾内容是精心维护的记忆库失效的主要原因。

5. Skill Audit (if skills were used)

5. 技能审核(若使用了技能)

For each skill invoked during the session:
A. Self-check gate -- If the skill lacks success criteria + verification loop:
  • Add
    ## Success Criteria
    at top (3-5 measurable checks)
  • Add
    ## Self-Check
    at bottom: "Verify all success criteria are met before presenting output. If not, iterate (max 5 times)."
B. Token efficiency -- Flag: redundant phrasing, mergeable sections, oversized examples, "Claude already knows this" content, inert frontmatter metadata.
C. Other -- Missing edge cases, vague directives (rewrite as measurable criteria or remove), naked negations (add "do Y instead" or remove).
D. Guidance mismatch -- fires when a skill was invoked and its advice turned out wrong, stale, or inapplicable here. A, B, and C all judge a skill standing alone; this one anchors the finding to the line that actually misfired. Record four fields, all required:
  • the verbatim excerpt from SKILL.md or its reference that produced the wrong behavior
  • the project context that made it not apply (language, runner, framework version, house convention)
  • what happened when it was followed
  • what was done instead
A skill invoked with no mismatch gets an explicit "no mismatch" line, same discipline as "no harvestable items is a valid outcome". "Line X is wrong in context Y, here's the workaround" is an actionable edit; "this skill has vague directives" is a research task.
Present proposed changes as diffs. Ask: "Apply these? (all / pick / skip)"
针对会话中调用的每项技能:
A. 自检关卡——若技能缺少成功标准+验证循环:
  • 在顶部添加
    ## Success Criteria
    (3-5项可衡量的检查标准)
  • 在底部添加
    ## Self-Check
    :“在呈现输出前验证所有成功标准是否满足。若未满足,进行迭代(最多5次)。”
B. Token效率——标记以下问题:冗余表述、可合并的章节、过大的示例、“Claude已知晓”的内容、无效的前置元数据。
C. 其他问题——缺失的边缘案例、模糊的指令(改写为可衡量的标准或删除)、单纯的否定表述(添加“改为执行Y”或删除)。
D. 指导不匹配——当调用技能后,其建议被证明在此场景下错误、过时或不适用时触发。A、B、C均独立评估技能本身;此项则将发现与实际失效的具体内容关联。需记录四个必填字段:
  • 来自SKILL.md或其引用的原文摘录,该内容导致了错误行为
  • 使其不适用的项目上下文(语言、运行环境、框架版本、内部规范)
  • 遵循该建议后发生的情况
  • 最终采取的替代方案
未出现不匹配情况的技能需明确标注“无匹配问题”,与“无可留存内容”一样需严谨对待。“在Y场景下第X行内容错误,以下是解决方案”是可执行的编辑建议;“此技能指令模糊”则是研究任务。
以diff形式呈现拟议的修改。询问:“是否应用这些修改?(全部/选择部分/跳过)”

6. Capture Markers

6. 捕获标记

The
remember:
prefix
is the highest-confidence capture signal. When the user writes a message beginning with
remember:
, treat everything after the colon as a memory candidate — no interpretation required. Save directly to the appropriate memory file with a one-line summary and the user's exact phrasing. "Directly" waives interpretation, not the step-4 pre-write check: still grep existing memory for duplicates and contradictions before writing (a
remember:
that contradicts a recorded entry gets the same merge/replace/keep-both handling). Example:
remember: we never use Pest, always PHPUnit
→ save to
feedback_phpunit_over_pest.md
.
Correction patterns to watch for (lower-confidence, batch these for review at
/ia-reflect
time):
  • "no, use X" / "actually, X" / "don't use Y, use X"
  • "stop doing X" / "never X"
  • "that's wrong — the right way is..."
  • repeated clarifications of the same thing within a session
Optional capture hook: a
UserPromptSubmit
hook can pattern-match the markers above into
~/.claude/learnings-queue.json
as the user types, so
/ia-reflect
processes the queue deterministically instead of re-scanning the full transcript. Not shipped with this skill; document the convention and leave implementation to users who need it.
remember:
前缀
是最高置信度的捕获信号。当用户发送以
remember:
开头的消息时,将冒号后的所有内容视为记忆候选——无需解读。直接保存至对应的记忆文件,包含一句话总结和用户的原始表述。“直接”指无需解读,但仍需执行第4步的写入前检查:保存前仍需在现有记忆中搜索重复和矛盾内容(若
remember:
内容与已记录内容矛盾,需同样处理合并/替换/保留两者)。示例:
remember: we never use Pest, always PHPUnit
→ 保存至
feedback_phpunit_over_pest.md
需关注的修正模式(置信度较低,批量收集后在
/ia-reflect
时进行评审):
  • “不,使用X” / “实际上,X” / “不要用Y,用X”
  • “停止做X” / “永远不要X”
  • “那是错的——正确方法是……”
  • 会话中对同一内容的反复澄清
可选捕获钩子
UserPromptSubmit
钩子可在用户输入时将上述标记模式匹配至
~/.claude/learnings-queue.json
,以便
/ia-reflect
可确定性地处理队列,而非重新扫描完整对话记录。此功能未随本技能发布;需记录此约定,由有需求的用户自行实现。

7. Pattern Detection

7. 模式检测

If 2+ similar tasks appear that no existing skill covers, suggest a new skill (1-2 sentence description). Create only after confirmation.
Proactive trigger: When the user corrects you, clarifies the same thing twice, or shows frustration, offer a retrospective when they're ready -- "I'll review what we can improve." Name the invocation the active harness actually supports (
/ia-reflect
in Claude Code, this skill by name elsewhere); never print a slash command on a harness that has none.
若出现2次及以上类似任务且现有技能均无法覆盖,建议创建新技能(1-2句话描述)。需在用户确认后再创建。
主动触发条件: 当用户纠正你、反复澄清同一内容或表现出沮丧时,在其准备好后主动提出回顾——“我将复盘我们可以改进的地方。”需提及当前使用的工具实际支持的调用方式(Claude Code中为
/ia-reflect
,其他环境中为技能名称);切勿在不支持斜杠命令的工具中打印斜杠命令。

Self-Check

自检

Before presenting output, verify all success criteria are met. If any fail, revise (max 5 iterations).
在呈现输出前,验证所有成功标准是否满足。若有未满足项,进行修订(最多5次迭代)。