Skip to main content

In 2026, the software engineering community is divided by a simple question: Should AI engineers still read the code generated by their agents? One camp argues that code has become virtually free to produce and discard, so humans should focus on systems and guardrails rather than implementation details. The other warns that blindly trusting AI code introduces compounding defects with zero learning, and the result is broken products and frustrated users.2026 年,软件工程社区被一个简单的问题所困扰:AI 工程师是否仍应阅读其代理生成的代码?一方认为,代码的生产和废弃成本几乎为零,因此人类应专注于系统和护栏,而非实现细节。另一方则警告称,盲目信任 AI 代码会导致缺陷累积且无法从中学习,最终导致产品崩溃和用户不满。

The choice looks binary, but it dissolves once you ask a better question: Which decisions genuinely require human comprehension, and which can be routed to systems inspection?这个选择看似非黑即白,但一旦你提出一个更好的问题,它便迎刃而解:哪些决策真正需要人类理解,哪些可以交给系统检查?

Through 2024 and 2025, a lot of organizations quietly chose speed over understanding to keep pace with agent output. By 2026 the bill has arrived. Pull requests merged without any human or agentic review are up 31.3%, and for every PR merged, production incidents run at more than three times the rate seen in low AI adoption baselines (Faros AI). CodeRabbit’s analysis found AI-coauthored PRs carry 1.7 times more bugs than human-written code, a Lightrun survey of engineering leaders found 43% of AI-generated changes need debugging in production, and monthly production incidents are up 57.9% year-over-year.在 2024 年和 2025 年期间,许多组织为了跟上代理的输出速度,悄悄选择了速度而非理解。到 2026 年,账单来了。未经任何人工或代理审核而合并的拉取请求(PR)增加了 31.3%,每合并一个 PR,生产事故的发生率是低 AI 采用率基准的三倍以上(Faros AI 数据)。CodeRabbit 的分析发现,AI 协作编写的 PR 中包含的漏洞是人工编写代码的 1.7 倍;Lightrun 对工程领导者的调查显示,43% 的 AI 生成的变更需要在生产环境中进行调试,且每月生产事故同比增加了 57.9%。

Code quality is the symptom, not the disease. The deeper problem is epistemic agency: knowing what your system is doing and why. Lose that, and you lose the ability to make architectural decisions at all. You become a passenger in a system you built.代码质量只是症状,而非病因。更深层的问题是认知主体性:了解你的系统在做什么以及为什么这样做。一旦失去这一点,你将彻底失去做出架构决策的能力。你将成为自己所构建系统中的一名乘客。

Understanding cognitive debt理解认知债务

Cognitive debt is the gap between your system’s complexity and your team’s comprehension of it. Unlike financial debt, which you can pay down, cognitive debt tends only to accumulate. Every quarter you ship faster than you understand, the gap grows a little wider, until eventually it grows wide enough that your team can no longer make safe architectural decisions. At that point you are effectively locked into whatever path the agents chose for you.认知债务是系统复杂性与团队理解力之间的差距。与可以通过偿还来消除的财务债务不同,认知债务往往只会不断累积。每个季度你交付的速度超过了理解的速度,差距就会扩大一点,最终大到团队无法再做出安全的架构决策。到那时,你实际上已被锁定在代理为你选择的任何路径上。

It builds through three mechanisms that run in parallel:它通过三种并行机制形成:

  • Vibe coding. You ship a system you don’t fully comprehend, betting that automated checks will catch anything serious. For a quarter or two the bet usually pays off, and velocity metrics climb, but the debt accumulates where nobody’s looking.“氛围编程”(Vibe coding)。你交付了一个自己并未完全理解的系统,赌的是自动化检查能捕获任何严重问题。在一两个季度内,这种赌注通常会奏效,速度指标也会上升,但债务却在无人关注的地方累积。
  • Compounding complexity. As the system grows, your room to course-correct shrinks. Sonar’s 2026 survey of more than 1,100 developers found that 96% harbor doubts about the reliability of AI-generated code, yet the pressure to ship still outweighs the discipline of careful review. Each quarter that trade repeats, the situation gets harder to reverse.复杂性复合。随着系统的增长,纠偏的空间会缩小。Sonar 2026 年对超过 1,100 名开发者的调查发现,96% 的人对 AI 生成代码的可靠性存疑,但交付压力依然超过了严谨审查的纪律。这种权衡每重复一个季度,情况就越难逆转。
  • Lock-out risk. When an incident finally demands that you understand a system whose comprehension you handed to an agent, you can’t respond in time. Amazon lived through a version of this in March 2026. Two outages in three days, roughly six hours each, cost millions in lost orders. Public reporting pointed to AI-assisted code shipped without governance checkpoints. A human reviewer might well have caught the blind spot, simply by asking the kind of question an autonomous agent never thinks to ask.锁定风险。当事故最终要求你理解一个已交给代理理解的系统时,你将无法及时响应。亚马逊在 2026 年 3 月经历过这种情况。三天内发生两次中断,每次约六小时,造成了数百万美元的订单损失。公开报道指出,这是由于缺乏治理检查点的 AI 辅助代码所致。如果有人工审核员,很可能通过提出一个自动代理从未想过的问题,从而发现这一盲点。

Principal drift, the loss of control, is what the Amazon incident looked like from the outside. Cognitive debt, the loss of understanding, is what made it possible. In high-velocity domains such as financial services, SaaS platforms, and real-time systems, the consequences tend to surface within about six months if nobody is actively governing for them. In slower-moving domains the runway is longer, but the eventual risk is no different. The question worth asking every quarter is whether your team still understands the systems it is shipping.原则漂移(即失去控制)是亚马逊事件从外部看的样子。认知债务(即失去理解)是导致这一结果的原因。在金融服务、SaaS 平台和实时系统等高频领域,如果没人主动进行治理,后果通常会在六个月内显现。在节奏较慢的领域,缓冲期较长,但最终风险并无二致。每个季度都值得问自己一个问题:你的团队是否仍然理解其正在交付的系统?

A framework: Task routing, separation, and embedding techniques框架:任务路由、分离与嵌入技术

The way out is to route different work to different gates according to actual risk. The same engineer can be a line-by-line reviewer on security-critical work and a systems inspector on utilities.解决之道是根据实际风险将不同的工作路由到不同的关卡。同一位工程师既可以是安全关键工作的逐行审核员,也可以是工具类代码的系统检查员。

Full review, where you read every line, is warranted for authentication and security primitives, money movement, permission logic, and destructive data changes. Systems inspection, where you review the design without reading every line, is enough for noncritical utilities, highly decoupled PRs, and changes already protected by robust test harnesses and shadow rollouts. To work out where a given change sits, three questions get you most of the way: Does this PR directly control access, money, or data integrity? Would a bug here cause production downtime lasting more than 15 minutes? Can the change be rolled back without manual intervention? A yes to any of these usually means tier 1. Those thresholds are starting points, not universal law. A real-time trading system might treat one minute of downtime as tier 1, while a batch pipeline could tolerate 16 hours. In financial services “money movement” is unambiguous; in SaaS you’ll have to decide whether code that merely touches authentication, rather than controlling it, belongs in tier 1. Write your thresholds down, revisit them quarterly, and adjust as the systems evolve.对于身份验证和安全基元、资金流转、权限逻辑和破坏性数据变更,有必要进行全面审核(即阅读每一行代码)。对于非关键工具、高度解耦的 PR 以及已有稳健测试工具和影子发布保护的变更,系统检查(即在不阅读每一行的情况下审查设计)已足够。要确定某项变更处于什么位置,三个问题就能解决大部分问题:此 PR 是否直接控制访问、资金或数据完整性?此处的错误是否会导致超过 15 分钟的生产停机?该变更是否可以在无需人工干预的情况下回滚?对其中任何一个问题的回答为“是”,通常意味着它属于一级(Tier 1)。这些阈值是起点,而非普遍法则。实时交易系统可能将一分钟的停机视为一级,而批处理管道可能容忍 16 小时。在金融服务中,“资金流转”是不言自明的;在 SaaS 中,你必须决定仅仅触及身份验证而非控制它的代码是否属于一级。写下你的阈值,每季度重新审视,并随着系统的演进而调整。

One rule holds regardless of tier: Never let the same agent that authored a change be its only reviewer. Keep the builder and the reviewer separate. An agent that writes code and then validates its own work is a closed loop with no vantage point outside its own reasoning, and a second reviewer, human or agent, brings the outside perspective that catches what the first one can’t see. It has a cost. Two agents roughly doubles the compute, and a human reviewer adds 15 to 30 minutes per PR. On tier 1 code that’s easy to justify. On tier 2 you might reasonably let a single agent build and check its own work, provided you compensate with stronger test coverage. Make the call deliberately and revisit it.无论级别如何,有一条规则始终适用:永远不要让编写变更的同一个代理成为其唯一的审核员。保持构建者和审核员的分离。一个编写代码并验证自己工作的代理是一个没有外部视角的闭环,而第二个审核员(无论是人还是代理)能带来第一个审核员无法看到的外部视角。这是有成本的。两个代理大约会使计算量翻倍,人工审核员每个 PR 会增加 15 到 30 分钟。对于一级代码,这很容易证明其合理性。对于二级代码,你可以合理地让单个代理构建并检查自己的工作,前提是你通过更强的测试覆盖率进行补偿。慎重做出决定并定期重新审视。

Routing tells you which decisions need a human, but it does nothing to keep that human capable of deciding once the volume climbs. Three techniques help with that, and each addresses a different failure:路由告诉你需要哪些决策需要人工参与,但一旦工作量增加,它并不能保证该人仍有能力做出决定。三种技术有助于解决这个问题,每种技术针对不同的失败点:

  •  Literate code explanations with comprehension checkpoints keep an engineer able to explain a change to themselves and to others. The idea is to have the AI teach rather than merely generate. For a tier 1 PR, ask it to produce a structured explanation that sets the context, spells out the intent, and finishes with a few interactive checkpoints. One engineer’s rule of thumb is not to submit agent-written code to the team until they can pass a five-question quiz on what it does.带有理解检查点的读写代码解释(Literate code explanations)能使工程师能够向自己和他人解释变更。其理念是让 AI 进行教学,而不仅仅是生成。对于一级 PR,要求它生成结构化的解释,设定背景,明确意图,并以几个交互式检查点结束。一位工程师的经验法则是:在能通过关于其功能的五题测验之前,不要向团队提交代理编写的代码。
  • Ephemeral visualization tools keep an engineer able to predict how a change behaves under load and at the edges. Rather than asking the AI for a prose explanation, ask it to build a throwaway microworld: a visual debugger that traces a gnarly parser step-by-step, or a schema migration rendered as something you can click through. Seeing the behavior tends to stick where reading about it does not.临时可视化工具能使工程师能够预测变更在负载和边缘情况下的行为。与其向 AI 索要文字解释,不如要求它构建一个一次性的微观世界:一个逐步跟踪复杂解析器的可视化调试器,或者一个可以点击查看的模式迁移过程。看到行为往往比阅读它更容易让人记住。
  • Shared collaborative spaces keep a team able to work at the pace the agents set. Cognitive debt is fundamentally social. Understanding that lives in one person’s head walks out of the door when they do, whereas understanding worked out in the open, in a channel where product managers, engineers, and agents argue things through together, becomes something the whole team owns. Slack, Discord, and Notion all serve; the point is that the mental model gets built in comments and debate rather than in private.共享协作空间使团队能够以代理设定的节奏工作。认知债务本质上是社会性的。存在于一个人脑中的理解会随其离职而消失,而公开讨论的理解(在产品经理、工程师和代理共同争论的频道中)则成为整个团队拥有的资产。Slack、Discord 和 Notion 都可以使用;重点在于思维模型是在评论和辩论中建立的,而不是在私下里。

Tier 1 code really does want all three. On tier 2 you can pick and choose. A word on the time estimates in this section: They’re illustrative, drawn from practitioners describing their own workflows rather than from any controlled study, so treat them as order of magnitude rather than gospel. On that basis the three techniques together tend to add something on the order of an hour to a critical PR. When someone objects that there is no time for this, it helps to emphasize the trade you’re making between review time now and incident time later. The later bill tends to arrive with a multiplier attached, paid in postmortems and hotfixes. The teams that have measured it carefully generally find the return turns positive within two or three quarters.一级代码确实需要这三种技术。对于二级代码,你可以选择使用。关于本节中的时间估算:它们是说明性的,来自从业者描述的自身工作流程,而非受控研究,因此请将其视为数量级而非金科玉律。基于此,这三种技术加在一起通常会为关键 PR 增加大约一小时的时间。当有人反对说没有时间做这些时,强调你是在用现在的审核时间换取以后的事故时间,这会有所帮助。后来的账单通常带有乘数,以事后分析和热修复的形式支付。仔细衡量过这一点的团队通常发现,回报在两到三个季度内就会转正。

The ground is still shifting. Autonomous loops, where a system discovers a task, plans it, executes it, and evaluates the result without step-by-step direction, are arriving now, and the routing framework and embedding techniques you put in place today are exactly the foundation you’ll run them on.形势仍在变化。自主循环(系统发现任务、规划、执行并评估结果,无需分步指导)正在到来,你今天建立的路由框架和嵌入技术正是你运行它们的基础。

Operationalizing this: Rolling out over time操作化:分阶段推广

This is a CTO or VP of engineering initiative, not something a single team or a lone principal engineer can carry. It needs executive sponsorship, cross-functional buy-in, and real policy behind it. Without that backing, the framework is the first thing waved through the moment a deadline looms.这是一项 CTO 或工程副总裁级别的倡议,不是单个团队或孤立的首席工程师所能承担的。它需要高管赞助、跨职能部门的支持以及真正的政策支持。如果没有这种支持,该框架在截止日期临近时将是第一个被抛弃的东西。

Sequence matters. Begin by mapping criticality across your tier 1 services: Get architects, team leads, and operations in a room to agree what tier 1 means for you and have one architect write the rubric down afterwards. Budget one to two weeks for a mid-size organization of 50 to 200 engineers, and two to four for something larger. Don’t try to run this alongside a production fire.顺序很重要。首先映射一级服务的关键性:召集架构师、团队负责人和运营人员,就一级对你们的意义达成一致,并让一位架构师事后写下准则。对于 50 到 200 名工程师的中型组织,预算一到两周时间,规模更大的组织则需两到四周。不要试图在生产环境发生火灾时执行此操作。

Next, fold the three techniques into those high-criticality flows, and resist the urge to blanket every PR at once. Once literate explanations and visualizations are working on tier 1, add builder/reviewer separation on top. When all three have become the default for tier 1 work, spend a quarter watching to confirm that understanding is holding up. A few signals tell you whether it is. If your team needs more than half an hour in an incident review to grasp what happened, comprehension has slipped. If no engineer can talk through the data flow in 10 minutes, it has slipped. If a new hire takes more than a fortnight to get productive on a service, understanding is sitting in too few heads. Pick one or two of these and track them quarter on quarter.接下来,将这三种技术融入到这些高关键性的流程中,并抵制一次性覆盖所有 PR 的冲动。一旦读写解释和可视化在一级服务上生效,再添加构建者/审核员分离。当这三者都成为一级工作的默认设置时,花一个季度观察以确认理解力是否保持。一些信号可以告诉你是否如此。如果你的团队在事故审查中需要超过半小时才能掌握发生了什么,说明理解力已经下滑。如果没有任何工程师能在 10 分钟内讲清楚数据流,说明理解力已经下滑。如果新员工需要超过两周才能在某项服务上发挥作用,说明理解力只掌握在少数人手中。选择其中一两个指标,按季度跟踪。

From there, extend the same discipline to tier 2 services, and only then, perhaps 6 to 12 months in, start planning for autonomous loops with real data on what works in your context behind you. The pull toward rolling everything out at once will be strong, but resist it. The organizations that get this right almost never move uniformly; they take one high-risk service, prove the model on it, measure what happened, and only then widen the net. Move too fast and you end up with a framework that reads beautifully in a policy document and quietly falls apart in practice.从那里开始,将同样的纪律扩展到二级服务,只有在 6 到 12 个月后,在拥有自身环境下有效数据的支持下,才开始规划自主循环。一次性全面铺开的诱惑力会很强,但要抵制它。做得好的组织几乎从不统一行动;他们会选择一项高风险服务,验证模型,衡量结果,然后再扩大范围。行动太快,你最终会得到一个在政策文档中读起来很完美,但在实践中悄然崩溃的框架。

None of it works without the surrounding structure. You need a written tier-assessment policy that engineering leadership has actually signed; CI/CD tooling that enforces the rules without anyone having to remember them, whether that is a bot labeling PRs from their changed files and blocking a tier 1 merge that lacks builder/reviewer separation, or a dashboard tracking how many tier 1 PRs went through structured review; incident postmortems honest about when a tier was assessed wrongly; and performance reviews that weight code-quality signals like defect escape rate and incident resolution time as heavily as raw velocity. Absent that scaffolding, the whole thing degrades into good advice that gets ignored under pressure. It needs product leadership onside too. If product can override a tier assessment whenever the ship date gets tight, the framework is already gone, so have that conversation early, before the first crunch rather than during it.没有周围的结构,这一切都无法运作。你需要一份工程领导层实际签署的书面分级评估政策;一套能够强制执行规则的 CI/CD 工具,无论是一个根据更改文件标记 PR 并阻止缺乏构建者/审核员分离的一级合并的机器人,还是一个跟踪通过结构化审查的一级 PR 数量的仪表板;在分级评估错误时保持诚实的事故事后分析;以及将缺陷逃逸率和事故解决时间等代码质量信号与原始速度同等看待的绩效评估。没有这些脚手架,整件事就会退化为在压力下被忽略的良好建议。产品领导层也需要加入。如果产品部门可以在发布日期紧迫时覆盖分级评估,那么框架就已经失效了,所以要在第一次紧迫关头之前,而不是期间,进行沟通。

And if you’re reading this already locked in, with a team that no longer understands its own systems, recovery is still possible, though it isn’t free. Treat it as a project rather than business as usual: Put one or two senior engineers on rebuilding understanding full time, accept a pause on new features for the affected systems for two or three quarters, and mine every incident for what it teaches you about the code you inherited. It takes discipline and resourcing, but teams do climb back out.如果你在阅读本文时已经陷入困境,团队不再理解自己的系统,恢复仍然是可能的,尽管并不容易。将其视为一个项目而非日常业务:安排一两位高级工程师全职重建理解,接受受影响系统在两到三个季度内暂停新功能,并从每一次事故中挖掘它对你所继承代码的教训。这需要纪律和资源,但团队确实可以爬出来。

The question for 2026 was never really whether every engineer should read every line. It’s whether your engineers stay capable of steering the systems they build. Get this right and code still ships quickly, understanding keeps pace, and when something breaks your team can respond because they still grasp the architecture. Task-routed governance is how you buy that: full attention on the decisions that carry real risk, lighter inspection on the ones that simply need to scale. Get it wrong, keep optimizing for speed alone, and the gap widens until steering is no longer an option.2026 年的问题从来不是每位工程师是否应该阅读每一行代码。而是你的工程师是否能保持对他们所构建系统的掌控力。做好这一点,代码依然可以快速交付,理解力也能跟上,当出现问题时,你的团队可以响应,因为他们仍然掌握着架构。任务路由治理就是你实现这一目标的手段:将全部注意力集中在具有真正风险的决策上,对那些只需要扩展的决策进行较轻的检查。如果做错了,只为速度而优化,差距就会扩大,直到掌控不再是一种选择。


References参考文献

The AI Engineering Report 2026: The AI Acceleration Whiplash, Faros AI, faros.ai/blog/ai-acceleration-whiplash-takeaways.《2026 年 AI 工程报告:AI 加速的鞭打效应》,Faros AI,faros.ai/blog/ai-acceleration-whiplash-takeaways。

State of AI vs. Human Code Generation Report, CodeRabbit, coderabbit.ai/blog/2025-was-the-year-of-ai-speed-2026-will-be-the-year-of-ai-quality.《AI 与人工代码生成现状报告》,CodeRabbit,coderabbit.ai/blog/2025-was-the-year-of-ai-speed-2026-will-be-the-year-of-ai-quality。

State of Code Developer Survey Report, Sonar, sonarsource.com/state-of-code-developer-survey-report.pdf.《代码开发者现状调查报告》,Sonar,sonarsource.com/state-of-code-developer-survey-report.pdf。

Michael Nuñez, “43% of AI-Generated Code Changes Need Debugging in Production,” VentureBeat, venturebeat.com/technology/43-of-ai-generated-code-changes-need-debugging-in-production-survey-finds.Michael Nuñez,“43% 的 AI 生成代码变更需要在生产中调试”,VentureBeat,venturebeat.com/technology/43-of-ai-generated-code-changes-need-debugging-in-production-survey-finds。

Mark Hull, “What Percentage of AI Code Is Safe in Production?,” Exceeds,  blog.exceeds.ai/acceptable-ai-code-percentage-production.Mark Hull,“生产中多少比例的 AI 代码是安全的?”,Exceeds,blog.exceeds.ai/acceptable-ai-code-percentage-production。

Post topics: AI & MLAI 与机器学习文章主题:AI 与机器学习

Try the O’Reilly learning platform尝试 O’Reilly 学习平台

With the O’Reilly learning platform, you get the resources and guidance to keep your skills sharp and stay ahead. Try it free for up to 14 days.通过 O’Reilly 学习平台,你可以获得资源和指导,以保持技能敏锐并保持领先。免费试用最长 14 天。

Start trial开始试用

Try a course for free免费试用课程

Join a live online event on the O’Reilly platform to learn from the experts shaping tech.加入 O’Reilly 平台上的在线直播活动,向塑造科技的专家学习。

See what’s coming soon查看即将推出的内容

Get the Radar Trends newsletter获取 Radar Trends 通讯

Please read our privacy policy.