The AI Engineering Skills Map In Detail — Using Coding Agents How to Use Coding Agents Effectively from Planning to Execution and MonitoringAI 工程技能图谱详解 — 如何使用编码智能体:从规划到执行与监控的有效实践

Reading time阅读时长
5 min read5 分钟阅读
AI Engineering skills map — Using Coding Agents

Dear friends,亲爱的朋友们:

A key AI engineering skill is using coding agents. Your skill at steering them both to write code and to carry out non-code tasks, such as analyzing data or managing system operations, allows you to get a lot more done.使用编码智能体是 AI 工程的一项核心技能。无论是指挥它们编写代码,还是执行分析数据、管理系统运维等非代码任务,你驾驭智能体的能力越强,工作效率就越高。

The rapid pace of evolution for coding agents means this skill, too, is evolving rapidly — faster than other top-level AI engineering skills. Proprietary agents (like Claude Code, Codex, and Cursor) and open agents (like OpenCode and Pi) progress in strides via both harness and model improvements. So keeping up with how to use coding agents requires a continuous process of experimentation, building, and learning. 编码智能体的快速演进意味着这项技能也在飞速发展,其速度超过了其他顶尖 AI 工程技能。专有智能体(如 Claude Code、Codex 和 Cursor)和开源智能体(如 OpenCode 和 Pi)正通过工具框架和模型的双重改进取得长足进步。因此,跟上编码智能体的使用步伐,需要持续不断地进行实验、构建和学习。

In interviewing dozens of top AI Engineers and reflecting on our own team’s use of coding agents, we found a consistent high-level workflow for building software with them. The key steps are:在采访了数十位顶尖 AI 工程师并反思了我们团队自身对编码智能体的使用经验后,我们总结出了一套利用它们构建软件的高阶通用工作流。关键步骤如下:

  • Planning. This includes (i) brainstorming, which may include research, experimentation, and understanding the existing codebase (if any) and (ii) writing a spec that captures requirements, technical design, and architecture, followed by generating an execution plan. You might also review the plan to interrogate key assumptions and check for security, overengineering, and other gaps.规划。这包括 (i) 头脑风暴,可能涉及研究、实验以及理解现有代码库(如有);(ii) 编写包含需求、技术设计和架构的规范文档,随后生成执行计划。你还可以审查该计划,以审视关键假设,并检查安全性、过度工程化及其他潜在疏漏。
  • Execution, where you build, test, and verify, with the right balance between agent autonomy and human oversight. This involves (i) having the agent build the software, with a calibrated level of agent autonomy and (ii) verifying its output via automated and/or human checks.执行。在此阶段,你将在智能体自主性和人工监管之间取得平衡,进行构建、测试和验证。这包括 (i) 让智能体以校准后的自主水平构建软件;(ii) 通过自动化检查和/或人工审核来验证其输出。
  • Deployment and monitoring, in which you (i) deploy, perhaps gated with a CI/CD pipeline or additional human gates, and (ii) use agents to watch logs, surface issues, and propose and execute improvements.部署与监控。在此阶段,你将 (i) 进行部署,可能通过 CI/CD 流水线或额外的人工关卡进行控制;(ii) 利用智能体观察日志、发现问题,并提出并执行改进措施。

This high-level workflow is similar to the one typically used to build software before coding agents. Now, we focus much less on code and instead focus on deciding what to build, designing the architecture, writing the spec, and verifying outputs.这一高阶工作流与在编码智能体出现前构建软件所用的流程类似。现在,我们将重心从编写代码转移到了决定构建什么、设计架构、编写规范以及验证输出上。

The duration of each step can vary significantly between projects, and steps can be omitted. For example, the spec for a greenfield (meaning built-from-scratch) prototype might be loosely described in a quickly written prompt, whereas the spec for a brownfield (pre-existing) project with many users might require much more effort to write and verify. Further, the workflow is highly iterative, and skilled developers know when feedback from a later step should lead them back to an earlier one. For example, if verification fails, they know how to steer the agent to rebuild and fix errors; or if monitoring surfaces issues, how to have agents update the system and redeploy.每个步骤的持续时间在不同项目间差异巨大,有时某些步骤甚至可以省略。例如,对于一个从零开始的“绿地”原型项目,其规范可能只需在快速编写的提示词中简单描述;而对于一个拥有大量用户的“棕地”(现有)项目,编写和验证规范则需要投入更多精力。此外,该工作流具有高度的迭代性,熟练的开发者知道何时应根据后续步骤的反馈返回到前序步骤。例如,如果验证失败,他们知道如何引导智能体重构并修复错误;或者如果监控发现了问题,他们知道如何让智能体更新系统并重新部署。

To use coding agents effectively in this workflow, the key skills are:要在该工作流中有效使用编码智能体,核心技能包括:

  • Directing the workflow指挥工作流
  • Enabling agent autonomy启用智能体自主性
  • Reviewing the work审查工作成果
  • Customizing the agent and its environment定制智能体及其环境
  • Coding agent foundations掌握编码智能体基础

Directing the workflow. You know how to navigate each step of the workflow above. This involves deciding how much human and how much agent effort to spend on each and when to go back to an earlier step to iterate. It requires deeply understanding the tradeoffs of speed, cost, technical risk, and human effort, so you can decide how much to research and plan up front, when to retain human ownership over critical work, how to choose the architecture, how much detail to write into a set of planning artifacts (like a spec), and how to decompose the work into verifiable steps.指挥工作流。你需要知道如何驾驭上述工作流的每一步。这涉及决定在每一步中投入多少人力和智能体精力,以及何时返回前一步进行迭代。这需要深入理解速度、成本、技术风险和人力投入之间的权衡,以便决定前期研究和规划的深度、在关键工作中保留多少人工所有权、如何选择架构、规划文档(如规范)中应写入多少细节,以及如何将工作分解为可验证的步骤。

Enabling agent autonomy. When applying a coding agent to the steps in the workflow, you choose the autonomy level: Do you watch it and go back-and-forth interactively or delegate a larger chunk of work to it? And when do you set a clear goal and have it loop until it succeeds? Additionally, you have to manage the context carefully for the agent. As the build proceeds through different phases, you will calibrate when to make sure key learnings, user feedback, and assumptions — including assumptions that changed partway through the build — are captured for the agent to use downstream. Additionally, you will decide when to set up many agents to run in parallel on a decomposition of the task — either by having a human or a higher-level agent orchestrate these other agents — and how to manage human attention across concurrent agent sessions. You also know how to run agents safely, setting permissions and gating actions appropriately to let development proceed quickly while limiting the risk of leaks, data loss, or other damage.启用智能体自主性。在将编码智能体应用于工作流时,你需要选择自主水平:是进行交互式监督,还是委托给它一大块工作?何时设定明确目标并让其循环执行直到成功?此外,你必须仔细管理智能体的上下文。随着构建进入不同阶段,你需要校准何时确保关键经验、用户反馈和假设(包括构建中途发生变化的假设)被记录下来,以供智能体在后续环节使用。此外,你还要决定何时设置多个智能体并行处理分解后的任务——无论是通过人工还是更高级别的智能体来协调——以及如何管理跨并发智能体任务的人力投入。你还需懂得如何安全地运行智能体,通过设置权限和控制动作,在加快开发速度的同时,限制泄露、数据丢失或其他损害的风险。

Reviewing the work. The output of a coding agent is uncertain. We don’t know in advance what good ideas it might come up with and what bugs it will implement. Reviewing and verifying the output is a key step to ensure you are getting the result you want and to redirect the agent if not. You will design testing and validation that is matched to the task, applying both behavioral and functional verification as needed. You might also test user flows, perhaps having an agent provide screenshots as evidence of success or failure. For qualitative/behavioral evaluation, eval sets, perhaps with LLM-as-a-judge, can be used.审查工作成果。编码智能体的输出具有不确定性。我们无法预知它会提出什么好主意,也无法预知它会引入什么 Bug。审查和验证输出是确保获得预期结果以及在必要时重定向智能体的关键步骤。你将设计与任务相匹配的测试和验证方案,根据需要应用行为验证和功能验证。你可能还会测试用户流程,例如让智能体提供截图作为成功或失败的证据。对于定性/行为评估,可以使用评估集,甚至采用“以 LLM 为裁判”的评估方式。

You also need to decide how much of these tests should be automated. Some workflows will have all testing and validation fully automated so the agent can check its work and know when it has succeeded in completing a task. You have to evaluate the tests to ensure they correspond to your aims, and you will evolve them if not. Additionally, you use agentic code review and run AI-enabled security and architecture audits. When AI review isn’t sufficient, you judiciously insert human reviews of the code behavior (and, infrequently, of code as well) while exploring how to automate this review further. Finally, you verify deployment and can operationalize monitoring and incident management with agents.你还需要决定这些测试中有多少应该自动化。有些工作流会将所有测试和验证完全自动化,以便智能体能检查自己的工作并判断任务是否成功完成。你必须评估这些测试以确保它们符合你的目标,并在必要时对其进行改进。此外,你还可以使用智能体代码评审,并运行 AI 赋能的安全和架构审计。当 AI 评审不足以应对时,你需要审慎地插入人工对代码行为(极少数情况下也包括代码本身)的评审,同时探索如何进一步自动化这些评审。最后,你还要验证部署,并能通过智能体实现监控和事件管理。

Customizing the agent and its environment. Your ability to update both the agent and the environment it works in allows your agents to efficiently get the context they need, access tools, and build correctly and efficiently. You know how to integrate agent skills, plugins, and MCP servers. Occasionally you will prune them when they are no longer necessary (such as when a new model obviates an old skill). You can use hooks to automate repeatable parts of the development process, like triggering automated code reviews or CI/CD pipelines. You can also maintain the environment the agent works in: updating the standing context (such as AGENTS.md or CLAUDE.md) with information on the codebase, key architectural assumptions, code style, and data access patterns. You know how to preserve state across multiple sessions and across parallel agents, and accumulate agent learnings over time, perhaps by running post-run retrospectives to capture what did and did not work. You also know how to set up consistent conventions and structure to make your codebase navigable to the agent, and how to occasionally clear out agent-generated debt. When you work in a team, you consider how to coordinate context across different developers’ agents.定制智能体及其环境。你更新智能体及其工作环境的能力,能让智能体高效获取所需上下文、访问工具并正确地完成构建。你知道如何集成智能体技能、插件和 MCP 服务器。偶尔,你也会在它们不再必要时进行清理(例如当新模型使旧技能过时时)。你可以使用钩子(hooks)来自动化开发流程中可重复的部分,例如触发自动化代码评审或 CI/CD 流水线。你还可以维护智能体的工作环境:通过更新常驻上下文(如 AGENTS.md 或 CLAUDE.md),记录代码库信息、关键架构假设、代码风格和数据访问模式。你知道如何跨多个会话和并行智能体保持状态,并随着时间推移积累智能体的学习成果,例如通过运行事后回顾来总结哪些有效、哪些无效。你还知道如何建立一致的规范和结构,使代码库对智能体而言易于导航,并知道如何偶尔清理智能体产生的技术债。在团队协作时,你需要考虑如何协调不同开发者所使用智能体之间的上下文。

Coding agent foundations. Finally, to make good decisions throughout, you have a good understanding of how coding agents work: how they carry out codebase search/retrieval, how they manage their context windows, how different operations (like adding tool calls, MCP servers, etc.) affect context, how agents and subagents interact, and how the agent is built by wrapping a harness around an LLM. This makes the agent less of a black box and helps you to recognize failure modes, such as overengineering a simple solution, losing rigor because the agent lacks an explicit verification process, stopping short of the goal, or agent actions that risk destruction of files or production data. It also helps you reason about the agent’s state and steer it by giving it the right prescription or context. And when monitoring a run, this understanding allows you to better spot when the agent goes off-track and requires your intervention.掌握编码智能体基础。最后,为了在整个过程中做出正确的决策,你需要深入了解编码智能体的工作原理:它们如何执行代码库搜索/检索、如何管理上下文窗口、不同的操作(如添加工具调用、MCP 服务器等)如何影响上下文、智能体与子智能体如何交互,以及智能体是如何通过在 LLM 外层封装框架构建而成的。这使得智能体不再是一个“黑盒”,并有助于你识别失效模式,例如对简单问题进行过度工程化、因缺乏明确验证过程而导致严谨性缺失、任务执行半途而废,或智能体动作可能导致文件或生产数据损坏。这也帮助你推断智能体的状态,并通过提供正确的指令或上下文来引导它。在监控运行过程时,这种理解能让你更好地发现智能体何时偏离轨道并需要你的干预。

I find that social media often gives oversimplified descriptions of how to use coding agents. For example, it is sometimes useful to get agents to run autonomously for hours and burn millions or tens of millions of tokens. But currently the practical utility of very long-horizon tasks — especially relative to their cost — has been amplified beyond reality. Instead, most effective coding agent use is a complex, highly iterative process, and being able to intervene with high-skill judgement gives much better results.我发现社交媒体往往对如何使用编码智能体给出了过于简化的描述。例如,有时让智能体自主运行数小时并消耗数千万个 Token 是有用的,但目前长周期任务的实际效用——尤其是相对于其成本而言——被过分夸大了。事实上,大多数有效的编码智能体使用场景是一个复杂且高度迭代的过程,能够运用高超的判断力进行干预,往往能带来更好的结果。

Your skill at using coding agents will make you an effective builder. This positions you to also steer the overall build. I will say more about this in next week’s letter.你驾驭编码智能体的能力将使你成为一名高效的构建者。这也让你有能力主导整体构建工作。我将在下周的信中详细探讨这一点。

Keep building!保持构建!

Andrew Andrew

Share

Subscribe to The Batch

Stay updated with weekly AI News and Insights delivered to your inbox