智能体
x.com ·
@meng shao(@shao__meng)
Clean Code 作者 Uncle Bob 反思 AI Agent 约束框架:模型进步让 Harness 变得多余
转述 Clean Code 作者 Uncle Bob(Robert C. Martin)的公开自我修正:他花数周构建用门禁、测试、工具和协议约束 AI Agent 的 Harness,但期间底层模型能力大幅提升,使其框架变得多余,他甚至认为除最宽松的框架外可能都不再需要。他提出三点观察:Agent 已具备资深工程师级别的系统结构讨论能力,会反驳并说服他;交付能力达到可委托水平,给出重大任务和几条原则后离开 40 分钟即可完成,覆盖率、CRAP、变异测试和架构质量达标;但他并未放弃工程约束,单元测试、变更风险度量和变异测试仍有价值。其引申结论是流程资产折旧极快,验证型工具比控制型工具更持久,人的角色正从过程控制者转向意图定义者与最终审查者。
AI推荐理由 内容转述并引用了 Uncle Bob(Robert C. Martin)关于 AI Agent 约束框架(Harness)的公开自我修正,包含其原推文与三层观察,属于有具体观点和一手引用的行业讨论,而非无依据传闻。新信息在于:作者称数周构建的门禁/测试/协议框架因模型能力提升而变得多余,并提出验证型工具(单元测试、CRAP、变异测试)比控制型工具更持久、人的角色从过程控制者转向意图定义者与最终审查者。局限是这属于个人经验性观察,未提供可复现数据或基准,且转述者非原作者,不能视为官方结论;互动量仅作传播信号,不参与评分。
72
正文
当 Harness 赶不上模型的进步:Clean Code 作者 Uncle Bob 的一次公开自我修正!
几周以来,Uncle Bob 一直在构建一套 Harness,用门禁、测试、工具、协议把 AI Agent 的行为牢牢约束在他规定的工作方式里。但当他埋头其间时,底层模型进步飞快,等他抬头时,这套精心打造的框架已经多余了。他甚至提出:除了最宽松的框架之外,任何框架可能都不再需要。
Uncle Bob 的三层观察
1. Agent 已具备"资深工程师"级别的对话能力。他与 Grok、Codex 就系统结构进行过长时间辩论——这些模型有自己的立场,会反驳他,他不止一次被对方说服。这已经越过了“工具”的边界,更接近同行评审。
2. 交付能力达到了"可委托"水平。 现在他只需给出一个重大任务和几条指导原则,离开 40 分钟,回来时任务已完成:覆盖率很高、变更风险度量达标、变异测试通过、架构干净、代码质量优秀。运行行为未必完美,但通常几次微调即可收尾。
3. 但他并未抛弃工程约束。 单元测试、变更风险度量、变异测试依然有价值;它们仍能发现 bug、提供有效反馈,尽管有时会为了指标而过度设计。
更深一层的启示
· 流程资产的折旧极快。 针对旧模型的短板做的重度工程投入,会被下一轮模型能力的提升直接“蒸发”。几周的 Harness 工作就是典型例子。
· 验证型工具比控制型工具更持久。 测试与变异测试是质量信号,其价值不依赖模型强弱;而门禁和协议是行为枷锁,模型一强就成了多余的摩擦。
· 人的角色正在迁移。 从“过程的控制者”退到“意图的定义者 + 最后的审查者”;定方向、给原则、做收尾微调。


Uncle Bob Martin@unclebobmartin
OK. It's time to rethink this.
I've spend the last several weeks working on a harness that tightly constrains the agents to work the way that I want them to work. I set up all kinds of gates, and tests, and tools, and protocols, and ...
And while I was heads-down getting that to work, the agents got a LOT better. So much so that when I came up for air, the need for my harness was obviated. Indeed, the need for \_any\_ but the most liberal of harnesses may be obviated.
Just how good these things have gotten blows me away. I have had long debates with grok and codex about the structure of systems -- as if they were senior engineers. They often disagree with me and have their own perspectives. I have, more than once, found myself agreeing with their views.
I have not given up on constraints and tooling. Unit testing is still important. So is CRAP and Mutation testing. These tools still find bugs and offer useful constraints, though they can leave scars.
However, the agents have gotten so good that I can now give one a very significant task with a few guidelines and it will faithfully implement it. I can walk away for 40 minutes and when I return it will be done. CRAP will be satisfied, Coverage will be high, and Mutation testing complete. The architecture will be clean, and the code will be very good.
The end result may not behave perfectly, but it's so close that a couple of tweaks usually puts it into place.
What does this mean going forward? I'm not sure. But I'm beginning to think that harnesses should not treat agents as components within a software design.
[🔗 View Quoted Tweet](https://x.com/unclebobmartin/status/2098432570887217520)
💬1🔄0❤️4👀342📊2