我不再审查我的智能体所写的代码了。现在我改做这个:
I stopped reviewing my agents' code. Here's what I do instead

原始链接: https://alexeyindeev.substack.com/p/i-stopped-reviewing-my-agents-code

Alexey 介绍了一套利用编程代理构建软件的高效工作流,并称这套方法让他在两周内合并了 562 个 PR。他的方法分为四个阶段:明确意图;设置测试、CI 等防护栏;为代理设定基于结果的目标;然后让代理以小步、功能开关和自动合并的方式持续交付。 一个协调代理负责维护整体计划,同时由多个并行子代理执行具体任务。人只需要审查计划、风险和进度报告,而不必逐行检查代码。目标可以持续运行一晚甚至数天,并且能够同时推进多个互不相关的目标。 他把代理犯错视为与人员操作失误类似:找出缺失的防护栏,予以补充,并建立反馈闭环,防止问题再次发生。他采用的机制包括自动化测试、预发布环境验证、Bugbot,以及 SRE 风格的监控。 长期运行的提示词聚焦于业务结果,例如提升 CI 速度、改善客户体验或完善平台权限,而不是处理狭窄的单项任务。Token 限制正成为瓶颈,因此他开始使用多个 Claude 账号,同时评估其他替代方案。 他的结论是:先从低风险目标开始,衡量工作涉及的范围,并逐步增加防护栏,让代理能够安全运行,同时帮助系统持续改进。

一场 Hacker News 讨论围绕开发者是否应该停止逐行审查 AI 生成的代码展开。大多数评论者仍然坚持,即使由智能体负责实现,开发者也必须对每一项变更负责。 许多人指出,看起来合理的代码可能隐藏着糟糕的架构、虚构的需求、重复的行为以及臃肿的临时方案。智能体还可能反复保留错误的决策,编写有偏见或过拟合的评估代码,并需要人类投入越来越多的纠错工作。 一个常被建议的工作流程是:在设计规划上投入大量时间,再让另一个智能体进行审查,直到解决其中的重大缺口;随后通过测试、边界情况检查、性能分析和业务结果验证来检验生成的代码。智能体适合处理简单的新项目功能,但复杂或长期维护的系统需要更严格的监督。 还有人警告称,如果主要关注用户故事是否通过测试,就可能忽视可维护性和技术债务。一名开发者提到,自己曾提交了八个由智能体生成的合并请求,却无法在团队评审时解释这些请求——这实际上是在充当一个“人类代理”。原文也受到批评,被认为更像是不受支持的营销宣传,而不是实用证据。
相关文章

原文

Heads up: this one is for power users. It assumes you already build with coding agents like Claude Code every day and are comfortable with CI, merge queues, and feature flags. If you're earlier in your AI journey, bookmark it for later. The posts in Operate are a better place to start.

Two weeks ago, I changed how I build software. Since then I've merged 562 PRs, and honestly, I spent four of those nights hiking in the mountains.

In the video I walk through exactly how I work now. Below is the written companion: the setup, the prompt, the numbers, and the things to try this week.

If you're still reviewing every line your agent writes, this one's for you.

  1. Set the intent. Plan with the agent until you agree on what's being built and why.

  2. Set the guardrails. Tests, CI, and review bots that an agent can't get around.

  3. Set a goal. One session, one coordinator agent, sub-agents doing the work.

  4. Let it merge in small pieces. Auto-merge, feature flags, verify, repeat.

The models changed dramatically in the last few weeks, Opus 5.5 especially. A couple of weeks ago, I wouldn't have told anyone to work this way. I always felt I had to check the work. Is the quality good enough? Should this get merged?

Now I feel an agent can work through a whole plan on its own, as long as two things are set up right: the right intent, and the right guardrails to make sure that intent is actually met. Get those right and you can let it really run.

Most of this work went into Sightline, our internal operations platform at Spare. It's where I try everything first.

AI code is non-deterministic and has risk. But human code is non-deterministic too, and it has the exact same risk. We built SRE systems so humans don't make mistakes. Now we need those same systems, way more beefed up, so agents don't make mistakes.

Same blameless culture we use for incidents: when an agent makes a mistake, don't blame the agent. Ask what guardrail was missing, and build that.

This doesn't mean quality stops mattering. Agents make messes too. That's exactly why the guardrails are the job. Here's what every Sightline PR goes through before it can merge:

So when something's queued, I know it couldn't skip a single red flag.

The guardrails also guard themselves. We ask Bugbot to keep asking for more tests. Those feedback loops in CI are what let us go this fast without risking uptime. And when something slips through, we don't just fix the code. We fix the guardrail.

Every session starts the same way. I open Claude and work out a plan together: how it's broken up, what the challenges are, what the risks are. I often ask for a UX preview too, so I can see what it'll feel like before anything gets built.

This is where I spend most of my time now. I review the plan, not the code.

Once I'm aligned on the plan, I open a session and set a goal. This is the prompt I use, word for word:

Accomplish the plan. Ship code using auto-merge. You're the coordinator. Don't do work directly. Use sub-agents for everything, and parallelize when possible.

The coordinator part helps a lot. The top-level agent only holds the plan and the status, so its context stays clean. Sub-agents do the heavy work and come and go as the plan gets built out.

I let it merge on its own, and honestly, it's fairly safe. These models are careful and don't want to break things. Ask them to feature-flag everything and they will. Because they can merge, they ship in small pieces: ship something, run end-to-end tests in staging or production, check that it works, ship the next thing. Multi-stage deploys, small increments.

A bit of a hot take: one big PR you're iterating on locally is probably riskier in the end than twenty small ones that each passed every check.

I come back and ask for a progress report. The agent builds an HTML report: what's done, what's next, and what it needs from me. That's what I review.

Here's the part I think most people miss: let goals run overnight, for days if they need to. Our custom roles goal ran for over a day. I checked in periodically, read the report, nudged it when needed, and let it keep going until it actually hit the goal.

I usually have two, three, or four goals running at once, on unrelated features so they don't step on each other. That's what lets us rip through things really fast.

Most of us still use these tools like a really fast engineer: implement this ticket, add this endpoint. That works, but it's thinking too small. With the goal workflow you can set much higher-level intent, ask open-ended questions, or hand it a whole business problem and let it figure out what needs to happen.

  • Instead of "add a role editor," the goal was "make Sightline's permissions work like Spare's everywhere."

  • Instead of "move OKRs into a package," it was "turn Sightline into a platform other teams can extend."

You can push it much further:

  • "Our CI is too slow. Make it faster." That's it. Let it find where the time goes and fix it.

  • "We're seeing low PPVH for one of our enterprise customers. Dig into five days of data and figure out how we can optimize it." That's a real business problem, not a coding task.

  • "Our front-end UX is inconsistent across the admin panel. Find the inconsistencies and help us remove them."

Those aren't tickets. They're outcomes. The models are now good enough to take an outcome, break it down, and work toward it for a day or more.

Once you work like this, tokens become the bottleneck. Individual plans don't give us enough credits anymore, and the overages are super expensive.

What I've been doing is running multiple Claude accounts, about five at around $200 each, and switching between them with a tool called Claude Swap. It watches five-hour and seven-day usage on every account and switches automatically when one hits 90%, so everything keeps running in the background.

It's not perfect. When you switch accounts you lose things like Claude artifacts and remote control from the mobile app, and I'm constantly logging in again in the browser and on my phone. It wastes time. So this week I've been looking at tools that solve the same problem without the switching: Paseo, Orca, Superset, and a few others.

Our job is moving away from shipping individual things. It's moving to building the systems that evolve our product. We set the intent, and we build systems that self-heal toward it.

We're already doing it: automations that fix our bugs, automations for SRE work, agents that do vulnerability research, and early work on remediating those security risks automatically. Next are systems that find poor quality, performance issues in the database and rendering, and inconsistencies in our UIs, and agents that fix them. Agents that find gaps in test coverage and write the tests.

It's not us figuring out each individual thing. It's standing up guardrails that keep healing the system into a better place.

  1. Stop checking the code on one real feature. Start with something low-risk. As you build confidence, try it on something bigger.

  2. Give it a problem, not a ticket. See how far it gets.

  3. Look at the surface area you're touching. What guardrail is missing so an agent can't get it wrong? What loop could fix things on its own?

I'd love to hear what's working for you. If you try this, hit reply or drop a comment with what happened. I'll be writing a lot more about how we're building with agents.

Alexey

联系我们 contact @ memedata.com