Skill Learning

retro

1. Bilingual SKILL.md

左右滑动可直接切换英文版与中文版;两种语言按段落自动对齐。英文中的蓝色虚线词语可点击查看解释。共标记 16 处。

入口 skill:retro左右滑动切换语言 · 段落位置自动对齐
The user has asked for a **retrospective**. You are suggesting improvements to the coding agent's **environment** to .
## Steps
1. Call the Skill tool with `writing-for-agents` for the writing style guide.
2. Read the the user specifies. This may mean searching through session logs on this machine. If the user doesn't specify a session, default to the current one.
3. Look for in these categories.
- **Navigation**: how easy was it for the agent to find the right files? Are there ? Would a **** make it easier? _Use when_ the session took a long time to find a piece of information. - **Automated checks**: are there automated checks that could catch errors the agent made? Linting, typing, tests, filesystem linters? _Use when_ the agent made a mistake that could have been . - **Coding standards**: should the **reviewer agent** be given a new rule to enforce? Should an existing rule be removed or clarified? _Use when_ the reviewer agent failed to catch a mistake. - **Global AGENTS.md**: are there any steering instructions that should be moved to coding standards (or automated checks) instead? _Use when_ the AGENTS.md file is particularly large - in the repo OR the user's global scope. - **Tool economy**: did the agent make expensive tool calls that could be streamlined? Is there any custom tooling (CLI's, MCP's) that is ? _Use when_ the agent made an expensive tool call. - **No-ops**: look for instructions in steering files that don't modify the agent's behavior. _Use when_ the steering files are . - **Information access**: look for opportunities to increase the agent's access to information. Teeing dev server logs, readonly access to third-party services. _Use when_ a crucial piece of information was not available to the agent.
4. Present these candidates to the user, in order of severity.
## Reference
### Implementation vs Review
Remember that all work goes through two stages: implementation and review. The implementation agent has the most ****. They are responsible for exploration, writing code, and debugging failures.
The review agent has the least - it receives a diff, so no exploration needed. It often does not need to write code or debug.
This means that the review agent should be , not the implementation agent.
### Files
You have access to several files in the repo:
- `CLAUDE.md`/`AGENTS.md`: these files are of any agent working in this repo. They should be , usually only for **s** to other files. - `CODING_STANDARDS.md`: this file is read during review, not implementation. Add **s** to docs folders if the standards file gets more than 1,000 lines long. - Docs: use docs as references files, pointed to by other files. Look for existing docs before writing new ones. - Skills: use skills for docs (since their description goes into the agent's context window), or for user-invoked commands. Follow the advice in the `writing-for-agents` skill.
用户已要求进行一次**复盘(retrospective)**。你要对编码 agent 的**环境**提出改进建议,以改善未来的运行效果。
## 步骤
1. 使用 `writing-for-agents` 调用 Skill 工具,以取得写作风格指南。
2. 阅读用户指定会话的一手资料。这可能意味着搜索本机上的会话日志。若用户没有指定会话,则默认使用当前会话。
3. 在以下类别中寻找改进候选项。
- **导航(Navigation)**:agent 是否容易找到正确文件?文件之间是否存在隐藏依赖?增加一个**导航指针(navigation pointer)**会不会更容易?_适用情形_:会话花了很长时间才找到某条信息。 - **自动化检查(Automated checks)**:是否可以用自动化检查捕获 agent 犯下的错误?例如 lint、类型检查、测试或文件系统检查器。_适用情形_:agent 的错误本可被自动化检查发现。 - **编码标准(Coding standards)**:是否应给**评审 agent(reviewer agent)**增加一条新规则?是否应删除或澄清现有规则?_适用情形_:评审 agent 未能发现错误。 - **全局 AGENTS.md(Global AGENTS.md)**:是否有任何引导指令应该改放到编码标准(或自动化检查)中?_适用情形_:仓库内或用户全局范围的 AGENTS.md 文件特别大。 - **工具经济性(Tool economy)**:agent 是否进行了可以精简的昂贵工具调用?是否有某个自定义工具(CLI、MCP)特别浪费 token?_适用情形_:agent 进行了一次昂贵工具调用。 - **无效操作(No-ops)**:在引导文件中寻找不会改变 agent 行为的指令。_适用情形_:引导文件又大又难用。 - **信息访问(Information access)**:寻找提高 agent 信息访问能力的机会,例如分流保存开发服务器日志、以只读方式访问第三方服务。_适用情形_:agent 无法获得某条关键信息。
4. 按严重程度从高到低向用户展示这些候选项。
## 参考
### 实现与评审
请记住,所有工作都经过两个阶段:实现和评审。实现 agent 承受的**上下文压力(context pressure)**最大。它负责探索、编写代码和调试失败。
评审 agent 承受的上下文压力最小,因为它收到的是 diff,不需要探索。它通常也无需编写代码或调试。
这意味着应由评审 agent 负责执行编码标准,而不是实现 agent。
### 文件
你可以访问仓库中的几个文件:
- `CLAUDE.md`/`AGENTS.md`:这些文件会被推入任何在该仓库工作的 agent 的上下文窗口。必须极其克制地使用,通常只放指向其他文件的**导航指针**。 - `CODING_STANDARDS.md`:此文件在评审阶段读取,而不是在实现阶段读取。如果标准文件超过 1,000 行,就添加指向文档目录的**导航指针**。 - 文档(Docs):把文档用作参考文件,并由其他文件指向它们。编写新文档前先寻找现有文档。 - Skills:用 skill 承载文档(因为它们的 description 会进入 agent 的上下文窗口),或用于用户显式调用的命令。遵循 `writing-for-agents` skill 中的建议。

Entry SHA-256: 264f3330f1e2382af89610ed048ba0ed6d08883eb69f596a8f1df3f1e1a4c6a1

2. Why This Skill Is Clever

一句话核心机制

把一次真实编码会话当作系统诊断样本:先读一手证据,再把失误映射到导航、自动检查、标准、上下文与信息访问等环境杠杆,最后按严重程度给出候选改进。

触发与边界

信息架构 / 执行顺序

  1. 确定待复盘会话;未指定时使用当前会话。
  2. 调用写作风格 skill,控制最终建议的可执行性与信息密度。
  3. 搜索会话日志、工具输出和变更等一手资料,不凭印象诊断。
  4. 将证据分类到导航、自动化检查、编码标准、全局 AGENTS.md、工具经济性、无效指令和信息访问。
  5. 用每个类别的 _Use when_ 条件过滤泛化建议。
  6. 按严重程度向用户展示候选改进,让人决定哪些值得落地。

最巧妙的设计点

1. 复盘对象不是 agent 的性格,而是环境

“improvements to the coding agent's environment”

Direct source: 它把失败归因从“模型不够聪明”转向可积累的环境资产,例如导航、检查、工具与权限。这样一次失误可以转化为所有未来会话都受益的系统改进。

2. 每个类别都带有适用条件

“Use when”

Direct source: 分类法没有停在抽象名称,而是为每类建议附上可观察触发信号。它阻止复盘机械地产生七类建议,也让候选项能追溯到会话证据。

3. 优先把确定性错误交给机器

“caught by an automated check”

Direct source: 能由 lint、类型、测试或文件系统规则捕获的错误,不应继续依赖模型记住提示词。这把概率性遵循升级为确定性门禁,并减少全局指令膨胀。

4. 根据上下文压力分配规则

“The implementation agent has the most context pressure”

Direct source: 实现 agent 同时承担探索、编码和调试,而评审 agent 只需要看 diff。因此编码标准由评审承担,把实现阶段的稀缺上下文留给问题本身。

5. 把常驻文件降级为路由层

“usually only for navigation pointers”

Direct source: CLAUDE.md/AGENTS.md 会被推入每次会话,所以只应保留导航指针;详细规范进入评审阶段或按需文档。这是一种“索引常驻、正文延迟加载”的上下文架构。

6. 工具效率与信息可达性同时检查

“particularly token-inefficient”

Direct source: 一边检查工具是否浪费 token,一边检查关键资料是否根本不可访问,避免只追求少调用却让 agent 缺证据。效率和可见性被放在同一诊断框架中权衡。

防失败机制与 trade-off

可迁移原则

  1. 复盘前先固定一手证据,禁止用模糊记忆生成长期规则。
  2. 把失败映射到可复用的环境杠杆,而不是只修当前输出。
  3. 每个建议类别都写清可观察的触发条件,避免模板化过度治理。
  4. 能自动检查的规则不要常驻提示词;常驻文件尽量只做导航。
  5. 按角色的上下文压力分配职责,让评审承担 diff 上可验证的标准。

今日实践题

回看最近一次 agent 反复搜索文件的会话:最小、最持久的修复应该是增加一个导航指针、改进工具输出,还是新增自动检查?哪条一手证据支持你的选择?

Evidence note

本文的步骤、七类候选项、上下文压力模型和文件职责来自选中的 retro/SKILL.md;agents/openai.yaml 与 bucket README 仅用于佐证显式调用边界和 beta/stub 状态,没有混入双语原文。隐私、迁移、返工与适用范围属于 Interpretation。

Source & provenance
Repository path
skills/in-progress/retro/SKILL.md
Generated
2026-08-28 16:19 Asia/Shanghai
Upstream commit
6654f6b60cd9d5be8b54c6fafe44346dabeb3b76
Source
View on GitHub