retro

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
The user has asked for a retrospective. You are suggesting improvements to the coding agent's environment to improve future runs.
用户要求进行一次回顾总结。你需要提出对编码Agent的环境的改进建议,以提升未来的运行效果。

Steps

步骤

  1. Call the Skill tool with
    writing-for-agents
    for the writing style guide.
  2. Read the primary sources for the session 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 candidates for improvement in these categories.
  • Navigation: how easy was it for the agent to find the right files? Are there hidden dependencies between files? Would a navigation pointer 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 caught by an automated check.
  • 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 particularly token-inefficient? 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 large and unwieldy.
  • 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.
  1. Present these candidates to the user, in order of severity.
  1. 调用Skill工具并传入
    writing-for-agents
    ,获取写作风格指南。
  2. 阅读用户指定会话的主要来源。这可能意味着在本机上搜索会话日志。如果用户未指定会话,默认使用当前会话。
  3. 从以下类别中寻找可改进的候选点:
  • 导航(Navigation):Agent找到正确文件的难度如何?文件之间是否存在隐藏依赖?添加navigation pointer是否会让导航更轻松?适用场景:会话花费了大量时间查找某条信息。
  • 自动化检查(Automated checks):是否存在可以捕捉Agent所犯错误的自动化检查?比如代码检查(Linting)、类型检查、测试、文件系统检查器?适用场景:Agent犯了本可以通过自动化检查避免的错误。
  • 编码标准(Coding standards):是否应该给reviewer agent添加新的执行规则?是否需要移除或明确现有规则?适用场景:reviewer agent未能发现错误。
  • 全局AGENTS.md:是否有任何指导说明应该移至编码标准(或自动化检查)中?适用场景:仓库或用户全局范围内的AGENTS.md文件特别庞大。
  • 工具经济性(Tool economy):Agent是否进行了可以简化的高成本工具调用?是否存在任何令牌效率极低的自定义工具(CLI、MCP)?适用场景:Agent进行了高成本的工具调用。
  • 无操作指令(No-ops):查找指导文件中不会改变Agent行为的指令。适用场景:指导文件庞大且难以操作。
  • 信息访问(Information access):寻找增加Agent信息访问权限的机会。比如获取开发服务器日志、第三方服务的只读访问权限。适用场景:Agent无法获取关键信息。
  1. 按照严重程度向用户展示这些候选改进点。

Reference

参考

Implementation vs Review

实现 vs 审核

Remember that all work goes through two stages: implementation and review. The implementation agent has the most context pressure. They are responsible for exploration, writing code, and debugging failures.
The review agent has the least context pressure - 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 responsible for imposing coding standards, not the implementation agent.
请记住,所有工作都分为两个阶段:实现和审核。实现Agent面临最大的上下文压力,他们负责探索、编写代码和调试故障。
审核Agent面临的上下文压力最小——它接收差异文件,无需进行探索工作,通常也不需要编写代码或调试。
这意味着审核Agent应负责执行编码标准,而非实现Agent。

Files

文件

You have access to several files in the repo:
  • CLAUDE.md
    /
    AGENTS.md
    : these files are pushed to the context window of any agent working in this repo. They should be used incredibly sparingly, usually only for navigation pointers to other files.
  • CODING_STANDARDS.md
    : this file is read during review, not implementation. Add navigation pointers 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.
你可以访问仓库中的以下文件:
  • CLAUDE.md
    /
    AGENTS.md
    :这些文件会被推送到任何在该仓库工作的Agent的上下文窗口中。应极少使用这些文件,通常仅用于指向其他文件的navigation pointer
  • CODING_STANDARDS.md
    :该文件在审核阶段读取,而非实现阶段。如果标准文件超过1000行,添加指向文档文件夹的navigation pointer
  • 文档(Docs):将文档用作参考文件,由其他文件指向。编写新文档前先查找现有文档。
  • Skills:将Skills用于文档(因为其描述会进入Agent的上下文窗口),或用于用户调用的命令。遵循
    writing-for-agents
    Skill中的建议。