From AI Code to Trusted Software: Harness Engineering in Practice从 AI 代码到可信软件:工程护栏(Harness Engineering)的实践应用

From AI Code to Trusted Software: Harness Engineering in Practice

The bottleneck in AI-assisted delivery is not code generation, it is verificationAI 辅助交付的瓶颈不在于代码生成,而在于验证

Travis Frisinger

September 04, 2026 2026年9月4日

If the same reasoning path writes the system change and defines the proof of success, you may be setting yourself up for an avoidable failure in the future. Harness engineering is meant to act as an extension of your own organizational guardrails, which were always meant to reduce risk and improve quality.如果同一推理路径既负责编写系统变更,又负责定义成功证明,那么你可能会为未来埋下可避免的失败隐患。工程护栏旨在充当组织准则的延伸,而这些准则的初衷始终是降低风险并提高质量。

Travis Frisinger, Head of Agentic AI

Travis Frisinger,智能体 AI 主管

Your team is shipping more AI-written code every quarter. How do you know it is any good?你的团队每个季度都在交付更多由 AI 编写的代码。你如何确定这些代码的质量?

Good means it meets your standards, and you have probably already tried handing your agents the standards: a context file, a style guide, the wiki pasted into the prompt. The agent reads them, agrees, and still breaks them, because instructions to a model are suggestions. What the repository permits is what actually happens. Your people absorb standards through review comments and hallway corrections, and the lessons stick. An agent apologizes and forgets by the next session. The only place its lessons can accumulate is the repository itself.所谓“好”,是指它符合你们的标准。你可能已经尝试过将这些标准交给 AI 智能体:比如上下文文件、风格指南,或是贴在提示词里的 Wiki 文档。智能体读了这些并表示同意,但转头还是会违反规则,因为对模型而言,指令只是建议。代码仓库允许什么,什么才会真正发生。团队成员通过代码审查意见和日常纠正来内化标准,这些经验会留存下来。而智能体在道歉后,到了下一次会话就会忘得一干二净。它唯一能积累经验的地方,就是代码仓库本身。

That gap used to be an annoyance. With AI doing real engineering work, the quality gap is the whole game.这种差距过去只是个小麻烦。但随着 AI 开始承担真正的工程工作,质量差距就成了决定成败的关键。

Harness engineering is the discipline that closes it. It is the process of imbuing a repository with your standards so that the repository itself enforces them: permissions and boundaries that say what any actor may touch, quality gates that fail closed, evidence attached to every change, and observability that spans runs rather than moments.工程护栏正是弥合这一差距的学科。它是一套将标准注入代码仓库的过程,使仓库本身能够强制执行这些标准:通过权限和边界明确规定任何参与者可以触碰什么,通过强制关闭的质量门禁,为每次变更附上证据,并实现跨运行周期而非瞬时的可观测性。

Models supply software delivery capacity. The harness supplies observable accountability: every change carries what was done, which rule allowed it, and what happened as a result, no matter which model, agent, or person did the work.模型提供软件交付能力,而工程护栏提供可观测的问责机制:无论是由哪个模型、智能体或个人完成的工作,每一次变更都携带了“做了什么”、“遵循了哪条规则”以及“结果如何”的完整记录。

Why now为何是现在

The industry started using the term harness engineering back in February, 2026. Since then, Thoughtworks, LangChain, and others have built serious thought leadership around the same shape. When several firms independently converge on the same word, it usually means they are trying to name the same problem.业界从 2026 年 2 月开始使用“工程护栏”这个术语。自那时起,Thoughtworks、LangChain 等公司围绕这一概念构建了深度的思想领导力。当多家公司独立地汇聚到同一个词汇时,通常意味着他们都在试图定义同一个问题。

The real problem is this: AI pilots demo brilliantly and then stall on the way to production. Not because code generation is weak; that stopped being the bottleneck some time ago. The bottleneck is verification.真正的问题在于:AI 试点项目在演示时效果惊人,但在进入生产环境的过程中却停滞不前。这并非因为代码生成能力不足——那早已不再是瓶颈。真正的瓶颈是验证。

An agent can produce a plausible change faster than your team can decide whether to trust it, and a backlog of plausible-but-unverified changes is not velocity. It is inventory and technical debt waiting to break something in the middle of the night.智能体生成看似合理的变更的速度,远超团队判断其是否可信的速度。积压一堆看似合理却未经核实的变更,并不能带来交付速度,反而会变成库存和技术债务,随时可能在深夜引发系统故障。

This is not just the stuff of software wonks and conference talks. Engineers are publicly building personal software factories: agent loops that pick up issues, write code, validate it, and report back overnight. Enterprises like Ramp, Stripe, and DoorDash have built their own internal versions to drive business outcomes and efficiency, and vendors now sell the platform outright off-the-shelf. Some of your engineers are probably running one right now in production.这不仅仅是软件极客和会议演讲的内容。工程师们正在公开构建个人的“软件工厂”:通过智能体循环自动获取问题、编写代码、验证并报告进度。像 Ramp、Stripe 和 DoorDash 这样的企业已经构建了内部版本以提升业务成果和效率,供应商现在也开始直接销售现成的平台产品。你们的工程师中,可能就有人正在生产环境中运行着这样的系统。

Building the harness the factory will run on is becoming table stakes to delivering agentic workflows at enterprise scale. You can buy the model access. You cannot buy the harness, because the harness is your own standards made enforceable in your own repositories. That is where the trust comes from, and no vendor ships it in the box.构建工厂赖以运行的护栏,正成为企业规模化交付智能体工作流的入场券。你可以购买模型访问权限,但买不到工程护栏,因为护栏本质上是你自己的标准在自己的代码仓库中变得可执行。这就是信任的来源,没有任何供应商能直接打包交付。

There is a maturity arc in how engineering teams hand work to AI:工程团队将工作移交给 AI 的过程存在一个成熟度曲线:

  • Assisted. The model suggests. A person asks, reads the code, and decides what ships.辅助式(Assisted):模型提供建议。人工提问、阅读代码并决定是否发布。
  • Harnessed. The system executes multi-step work under gates. A person reviews the evidence and approves the outcome.护栏式(Harnessed):系统在门禁下执行多步工作。人工审查证据并批准结果。
  • Risk-tiered. The gates grade the risk. Low-risk changes merge on their own, and a person reviews intent only where the risk says so.风险分级式(Risk-tiered):门禁对风险进行评级。低风险变更自动合并,仅在风险评估要求时才由人工审查意图。
  • Autonomous. Work enters, and the harness executes and validates it. Humans govern the boundaries, inspect the evidence, and intervene when the system falls outside them.自主式(Autonomous):任务进入系统,由护栏执行和验证。人类负责治理边界、检查证据,并在系统超出范围时进行干预。

Figure 1. Every wider loop keeps a human checkpoint. The checkpoint moves earlier: from the diff, to the evidence, to intent on the risky cases only, to the boundaries.图 1. 越宽泛的循环越需要保留人工检查点。检查点的位置在不断前移:从差异比对(diff),到证据检查,再到仅针对高风险案例的意图审查,最终到边界治理。

Notice what stays consistent: the human is never removed from the broader workflow. The human role moves upward, and it becomes conditional before it leaves any one loop for a wider one. At the same time, more of the review, challenge, and reflection can itself become governed machine work.请注意始终保持不变的一点:人类从未被排除在更广泛的工作流之外。人类的角色在不断提升,且在进入更宽泛的循环之前,人类的参与变得更加有条件。与此同时,更多的审查、质疑和反思过程本身也可以转化为受控的机器工作。

Harness engineering is what makes each step toward greater autonomy safe to take.工程护栏正是让每一步向更高自主性迈进都变得安全可靠的关键。

What it looks like when it is real当它落地时是什么样子的

Three patterns show up in every serious implementation I have seen or built on client engagements. None of these patterns require exotic machinery: everything is built from parts your repository host already has. A required check that blocks a merge is a gate, and every repository host already has one. The parts do not change as a team matures. What changes is how many of them are required.在我见过或参与构建的每一个严肃的实现方案中,都有三种模式。这些模式不需要复杂的机器:一切都基于你代码仓库托管平台已有的功能。一个阻塞合并的必要检查就是一个门禁,每个仓库托管平台都有。随着团队成熟,组件本身不会变,变的是对它们的需求数量。

Gates that fail closed. At its simplest, a gate is simply a required check: a change that cannot produce its evidence does not merge. That holds for a senior engineer having a confident day, and it holds for an agent that produced something plausible at 3 a.m. As the harness matures, even the gate reader stops being trusted: my factory's merge step asks the host which required checks passed, and an error in that probe counts as a failure.强制关闭的门禁。最简单的情况下,门禁就是一个必要检查:无法提供证据的变更无法合并。这对自信满满的高级工程师适用,对凌晨三点生成了看似合理代码的智能体同样适用。随着护栏成熟,甚至连门禁读取器本身也不再被盲目信任:我工厂的合并步骤会向托管平台询问哪些必要检查已通过,如果该探测过程出现错误,则直接计为失败。

When the infrastructure itself has a problem, the answer is stop, not shrug: the same system, hitting a spend limit mid-run, stops the day's work rather than degrade quietly, and a budget-stopped day cannot restart itself through retries. Silent degradation is how trust dies and how budgets are quickly exceeded.当基础设施本身出现问题时,应对措施是“停止”而非“无视”:同一个系统如果运行中触及了支出限额,它会停止当天的任务而不是悄悄降级。且一旦因预算耗尽停止,系统不会自动重启。静默降级是信任破灭和预算超支的根源。

Evidence as the working currency. In a harnessed repository, every merged change adds its own verdict to the ledger: what was checked, by what, and with what result. A mature harness adds provenance: my factory appends a reproducibility manifest to the pull request, the models, prompts, and configuration in effect at authoring time, so that months later when a root cause analysis asks "what produced this change?", the record answers on its own.以证据作为工作货币。在受护栏保护的仓库中,每一次合并的变更都会向账本添加自己的判决:检查了什么、由什么检查、结果如何。成熟的护栏会增加溯源信息:我的工厂会将可重现性清单附加到拉取请求中,包含创作时生效的模型、提示词和配置。这样几个月后,当根本原因分析问起“是什么产生了这次变更?”时,记录本身就能给出答案。

The review process stops meaning reading every diff and starts meaning auditing verdicts and sampling deeply where the evidence looks thin on the surface. That is not a lowering of the quality bar or sweeping reviews under the rug. It is the same quality bar, held at a higher altitude where humans operate day-to-day.审查过程不再意味着阅读每一行差异,而是意味着审计判决结果,并在证据表面看起来薄弱的地方进行深入抽样。这并不是降低质量标准,也不是掩盖审查。这是在更高的维度上保持同样的质量标准,而人类正是以此维度进行日常运作的。

One caution that the measurements insist on: if the same reasoning path writes the change and defines the proof, you may only have one opinion wearing two hats. Verification needs a reviewer whose charge, evidence, or objective is independent of the author's. Model diversity is one more lever. A judge running on a different model family does not share the author model's blind spots, so the two are less likely to fail in the same way.测量数据坚持的一点警示:如果同一推理路径既编写变更又定义证明,你可能只是在让同一个观点戴着两顶帽子。验证需要一个其职责、证据或目标与作者独立的审查者。模型多样性是另一个杠杆。运行在不同模型家族上的判定器不会共享作者模型的盲点,因此两者不太可能以相同的方式失败。

The old disciplines, compiled. The practices your best teams spent twenty years internalizing move from being embedded culture to configuration templates. Every project leads with tests first, small diffs, executable acceptance criteria and traceable changes. In my factory, 'test before commit' is written law, a hook blocks any agent from claiming done while a test fails, and branch protection is a versioned ruleset, not a static and outdated wiki page at the repo level.旧学科的编译化。你们最优秀的团队花费二十年内化的实践,正从嵌入式文化转变为配置模板。每个项目都优先考虑测试、小批量差异、可执行的验收标准和可追溯的变更。在我的工厂里,“提交前测试”是成文法,钩子(hook)会阻止任何智能体在测试失败时声称任务完成,分支保护是一个版本化的规则集,而不是仓库级别静态且过时的 Wiki 页面。

Where this goes: the repo becomes a mini-organization未来走向:仓库成为微型组织

Here is the part that surprised me, and the reason harness engineering deserves an executive's attention, not just an architect's.接下来这一点让我感到惊讶,也是工程护栏值得高管而非仅仅是架构师关注的原因。

It did not show up in the first weeks. It showed up months in, once I understood the operator's seat: the person who runs the factory rather than working inside it. Early on I was directing the code, one instruction and one diff at a time. Somewhere along the way I began directing the system instead. I set the intent, the boundaries, and the conditions for acceptable work. The factory handled the execution and left evidence behind. What that evidence taught me changed what I asked for next. Over time, the factory began organizing those expectations into its own structure, separating how work should be done from what the resulting software had to be. I had not designed that structure in advance. It emerged before I even had a name for it.这在最初几周并未显现,而是在数月后,当我理解了“操作员席位”——即运行工厂而非在工厂内工作的人——的角色时才发现。起初,我是在指导代码,一次指令一个差异。在某个过程中,我开始转而指导系统。我设定意图、边界和可接受工作的条件。工厂负责执行并留下证据。证据教给我的东西改变了我下一步的要求。随着时间推移,工厂开始将这些期望组织成自己的结构,将“工作应如何完成”与“最终软件必须是什么”分离开来。我并没有预先设计这种结构,它在我甚至还没给它命名之前就自然涌现了。

There is an old law in this business of software engineering: software ends up shaped like the organization that builds it. A harnessed code repository runs Conway's Law in reverse. Wire enough standards, evidence, and judgment into a repository, and an organization starts taking shape inside the software.软件工程界有一条古老的定律:软件最终会呈现出构建它的组织的形状。受护栏保护的代码仓库在反向运行康威定律。只要在仓库中编织足够的标准、证据和判断力,组织就会在软件内部成形。

Once your standards are executable, the repository can hold agent-based roles filling specific seats, not just generic scripts. And those seats can cover diverse responsibilities and working styles: a product seat that grooms intent into well-formed work, a quality review seat that judges changes with named charges of failure. For instance: one attacks feasibility, one attacks security, one attacks the user's experience. These are fully auditable decision records that nobody, human or machine, can skip. Once implemented, immutable ledgers can track whether each reviewer's findings survive scrutiny, so the judges themselves get calibrated over time based on your risk tolerance and working style.一旦你的标准可执行,仓库就可以容纳基于智能体的角色来填补特定席位,而不仅仅是通用脚本。这些席位可以涵盖不同的职责和工作风格:一个负责将意图梳理为规范工作的“产品席位”,一个负责以明确失败指控来评判变更的“质量审查席位”。例如:一个攻击可行性,一个攻击安全性,一个攻击用户体验。这些都是完全可审计的决策记录,无论是人还是机器都无法跳过。一旦实施,不可篡改的账本可以追踪每个审查者的结论是否经得起推敲,从而根据你的风险偏好和工作风格,对判定器本身进行持续校准。

These role-based seats convert to autonomous agents only when their output can be verified mechanically; where complex judgment is the verification, the seat remains a human one.这些基于角色的席位只有在产出可以被机械验证时才能转化为自主智能体;当复杂的判断就是验证本身时,该席位仍需由人类担任。

This is not speculation. In our research system, HydraFlow, repositories now convene review councils before designs land, file dissent by name, and keep calibration records on their own judges.这并非臆测。在我们的研究系统 HydraFlow 中,仓库现在会在设计落地前召集审查委员会,按姓名存档异议,并自行保留对判定器的校准记录。

Humans did not disappear in this modern world of agentic software development. Their role moved up: setting and ratifying direction, defining authority, and auditing the institution, while the system increasingly participates in those same processes under articles that govern how change becomes legitimate.在当今智能体软件开发的现代世界中,人类并没有消失。他们的角色提升了:设定和批准方向、定义权限并审计机构,而系统则在治理变更如何合法化的条款下,越来越多地参与到这些过程中。

A production-grade repository run this way stops resembling a codebase with bolt-on automation tooling and starts resembling something else entirely.以这种方式运行的生产级仓库,不再像是一个带有外挂自动化工具的代码库,而更像是一个完全不同的事物。

A framework for governing it治理框架

I wrote recently on my own blog about what six months of running a personal software factory taught me, What Matters After the Software Factory Works. The lessons eventually compressed to four words:我最近在博客上写了关于运行个人软件工厂六个月的经验总结《软件工厂运作后什么最重要》。这些经验最终压缩为四个词:

Purpose is what the work is for. Articles define what must remain true. Actors do the work under delegated authority. Artifacts preserve what the organization produces and remembers.目的(Purpose)是工作的意义所在。条款(Articles)定义了必须保持不变的事实。行动者(Actors)在授权下执行工作。制品(Artifacts)保存了组织产生并记忆的内容。

PAAA, for short, describes a simple and repeatable framework for governance.简称为 PAAA,它描述了一个简单且可重复的治理框架。

Every established engineering organization has some version of these oversight structures. As engineering systems become more autonomous, the same structures increasingly need to exist inside the repository.每个成熟的工程组织都有某种形式的监督结构。随着工程系统变得越来越自主,这些结构也越来越需要存在于代码仓库内部。

The harness makes the Articles executable. People and agents staff the Actors. Evidence, decision records, ledgers, and institutional memory become the Artifacts. Intent supplies the Purpose.护栏使“条款”可执行。人员和智能体充当“行动者”。证据、决策记录、账本和机构记忆成为“制品”。意图提供“目的”。

Figure 2. The four words at weekend scale. The mission writes the rules, the rules bound the builder, the work leaves evidence, and failures flow back and rewrite the rules. One closed loop, even in a test project.图 2. 周末规模下的四个词。使命编写规则,规则约束构建者,工作留下证据,失败回流并重写规则。即使在测试项目中,也是一个闭环。

This is the larger cultural implication of harness engineering. Once a repository contains not just workflows, but authority, boundaries, evidence, memory, and mechanisms for changing its own rules, it begins to resemble the organization operating through it.这就是工程护栏更深远的文化影响。一旦仓库中不仅包含工作流,还包含权限、边界、证据、记忆以及更改自身规则的机制,它就开始像通过它运作的组织了。

Humans do not disappear from that harness engineering-guided organization. They define its purpose, grant authority, ratify its deepest rules, and audit whether the system continues to behave as intended.在工程护栏引导的组织中,人类并没有消失。他们定义目的、授予权限、批准最根本的规则,并审计系统是否持续按预期运行。

What you are building when you invest in a harness is not a smarter pipeline. It is a development organization in a box, and it reports to you.当你投资于护栏时,你构建的不是一个更智能的流水线,而是一个“盒装开发组织”,它直接向你汇报。

Where to start从哪里开始

The four framework words double as an audit your leadership team can run this quarter.这四个框架词汇也可以作为你们领导团队本季度可以进行的审计清单。

These four questions are the agenda of our half-day harness engineering working session. We run it with your engineering leaders, in your context and against your own repositories, and you leave the same day with a written answer to each question and a path forward.这四个问题是我们半天工程护栏研讨会的议程。我们与你们的工程领导者一起,在你们的语境下针对你们的代码仓库进行研讨,当天结束时,你们将得到每个问题的书面答案和前进路径。

Ask yourself the following questions:问问自己以下问题:

  • Who sets the direction for your AI initiatives, and what happens when that direction goes silent?谁为你们的 AI 计划设定方向,当该方向不再明确时会发生什么?
  • What must always remain true across your repositories and workflows, and what enforces those rules when nobody is looking?在你们的仓库和工作流中,什么必须始终保持不变,当无人监管时,是什么在强制执行这些规则?
  • Who, or what, holds each decision role in your review process, and how would you know if a role went rogue?谁或什么在你们的审查过程中担任每个决策角色,如果某个角色失控,你如何得知?
  • What do your systems remember, and where does that memory live?
     
    你们的系统记住了什么,这些记忆存在哪里?

Let's workshop this out.让我们一起来研讨吧。

Travis FrisingerTravis Frisinger

Head of Agentic AI智能体 AI 主管

Travis Frisinger serves as Head of Agentic AI at 8th Light, where he leads engineering and strategy for building production-grade AI systems. He focuses on designing adaptive architectures that help organizations integrate AI into real-world workflows, improving decision-making, reliability, and operational clarity.Travis Frisinger 担任 8th Light 的智能体 AI 主管,领导构建生产级 AI 系统的工程与战略。他专注于设计自适应架构,帮助组织将 AI 集成到现实工作流中,从而提升决策能力、可靠性和运营清晰度。