Harness Engineering · 双语

Harness Engineering: How to Build AI Agents That Don't Fall ApartHarness 工程:如何打造不散架的 AI 智能体

Personal bilingual reading edition, not an official translation. Author: rari (@0xwhrrari) · 2026-08-29 21:00 (UTC+8) · Source: https://x.com/0xwhrrari/status/2093685107534000560

个人双语阅读版,非官方译本。作者:rari(@0xwhrrari)· 2026-08-29 21:00(UTC+8) · 原文:https://x.com/0xwhrrari/status/2093685107534000560

Opening开篇

[Original is an image; text transcribed] HARNESS ENGINEERING: HOW TO BUILD AI AGENTS THAT DON'T FALL APART. Flow: REQUEST (goal · inputs · risk) → THE AGENT HARNESS (MODEL at center; CONTRACT: scope/success/constraints; CONTEXT: maps/rules/evidence; STATE: artifacts/decisions/memory; TOOLS: sandbox/browser/shell; PERMISSIONS: policy/approval/isolation; EVIDENCE: tests/traces/recovery) → RESULT (verified · traceable). Tagline: MODEL REASONS · HARNESS CONTROLS · TOOLS ACT. Footer icons: CONTRACT · CONTEXT · TOOLS · POLICY · RECOVERY.

[Original is an image; text transcribed] HARNESS ENGINEERING: HOW TO BUILD AI AGENTS THAT DON'T FALL APART. Flow: REQUEST (goal · inputs · risk) → THE AGENT HARNESS (MODEL at center; CONTRACT: scope/success/constraints; CONTEXT: maps/rules/evidence; STATE: artifacts/decisions/memory; TOOLS: sandbox/browser/shell; PERMISSIONS: policy/approval/isolation; EVIDENCE: tests/traces/recovery) → RESULT (verified · traceable). Tagline: MODEL REASONS · HARNESS CONTROLS · TOOLS ACT. Footer icons: CONTRACT · CONTEXT · TOOLS · POLICY · RECOVERY.

【原文为图片,已转录】标题:HARNESS ENGINEERING: HOW TO BUILD AI AGENTS THAT DON'T FALL APART。流程:请求(目标·输入·风险)→ 智能体 harness(中心是模型;合同:范围/成功标准/约束;上下文:地图/规则/证据;状态:产物/决策/记忆;工具:沙箱/浏览器/shell;权限:策略/审批/隔离;证据:测试/痕迹/恢复)→ 结果(已验证·可追溯)。标语:模型负责推理 · harness 负责控制 · 工具负责行动。页脚图标:合同·上下文·工具·策略·恢复。

Most people respond to a failing agent by changing the prompt
Then they change the model
Then they add a larger context window

智能体一失败,大多数人先改提示词。
然后换模型。
再然后加大上下文窗口。

The agent still forgets decisions
It still uses the wrong tool
It still skips verification
It still gets stuck in the same loop

可它还是会忘掉决策,
还是会用错工具,
还是会跳过验证,
还是卡在同一个循环里。

The problem is not always the intelligence
The problem is the environment around it
That environment is the harness
And designing it is harness engineering

问题不一定出在「聪明程度」上,
而在它周围的环境上。
这个环境就是 harness,
设计它,就是 harness 工程(harness engineering)。

Dario Amodei, CEO of Anthropic, said it directly while explaining how Claude Code emerged

Anthropic 的 CEO Dario Amodei 在解释 Claude Code 如何诞生时,把话说得很直白:

“Of course, you need an interface, you need a harness to use them”

「当然,你需要一个界面,需要一个 harness,才能把它们用起来。」

— Dario Amodei (as cited by the author)—— Dario Amodei(据作者引述)

I publish practical breakdowns of AI agents, workflows, and production systems on Substack. Join the newsletter here: https://whrrari.substack.com/subscribe

我在 Substack 上写 AI 智能体、工作流与生产系统的实操拆解。订阅newsletter:https://whrrari.substack.com/subscribe

The model is only the reasoning engine模型只是推理引擎

A model can suggest the next action
It cannot create a reliable operating environment by itself

模型可以建议下一步做什么,
却无法自己造出一套可靠的运行环境。

The harness decides what the model can see, what it can touch, what survives between sessions, what counts as evidence, and when the run must stop

harness 决定:模型能看见什么、能碰什么、会话之间什么东西留下来、什么算证据、以及何时必须停。

Original (English)
MODEL
reasons and proposes actions

HARNESS
selects context
exposes tools
stores state
enforces permissions
checks results
records traces
recovers from failure
中文参考译文(可直接替换使用)
模型
推理并提出动作

HARNESS
选取上下文
暴露工具
存储状态
强制执行权限
检查结果
记录痕迹
从失败中恢复

The prompt is one component inside this system
The model is another
The product is what happens when every surrounding component works together

提示词是这个系统里的一个组件,
模型是另一个。
产品,是周围每一个组件一起工作时发生的事。

“Prompt engineering improves the instruction

Harness engineering improves the conditions under which the instruction is executed”

「提示词工程改进的是指令本身。

Harness 工程改进的是指令被执行时的条件。」

— Author—— 作者

The same model can become a completely different agent同一个模型可以变成完全不同的智能体

Put the same model inside a chat box and it answers questions
Put it inside a repository with terminal access, tests, browser tools, project memory, isolated worktrees, and a review loop and it can ship software

把同一个模型放进对话框,它回答问题;
把它放进一个有终端、测试、浏览器工具、项目记忆、隔离 worktree 和审查循环的代码库里,它就能交付软件。

The weights did not change
The harness did

权重没变,
变的是 harness。

OpenAI described the same shift while building an agent-first codebase with Codex
Their early progress was slow because the environment was underspecified, not because the model lacked raw capability
The response was not to tell the agent to try harder
It was to ask what capability was missing and make that capability both legible and enforceable

OpenAI 在用 Codex 搭建「智能体优先」代码库时,描述过同样的转变。
早期进展慢,是因为环境规格不够清楚,不是因为模型缺原始能力。
对策不是叫智能体再努力一点,
而是问:缺的是哪项能力,然后把这项能力做得既可读又强制可执行。

“The environment was underspecified”

「环境规格不够清楚。」

— OpenAI, Harness engineering: leveraging Codex in an agent-first world — https://openai.com/index/harness-engineering/—— OpenAI,《Harness engineering: leveraging Codex in an agent-first world》— https://openai.com/index/harness-engineering/

This is the central idea
When an agent fails repeatedly, stop editing adjectives in the prompt
Inspect the system around the model

这就是核心观点:
智能体反复失败时,别再改提示词里的形容词,
去检查模型周围的那套系统。

A production harness has seven jobs生产级 harness 有七项工作

[Original is an image; text transcribed] SEVEN JOBS OF THE AGENT HARNESS — TURN MODEL CAPABILITY INTO CONTROLLED EXECUTION. 01 CONTRACT DEFINE goal·limits·done → 02 CONTEXT SELECT maps·rules·facts → 03 TOOLS ACT sandbox·browser·shell → 04 STATE REMEMBER artifacts·decisions → 05 SENSORS VERIFY tests·logs·screenshots → 06 POLICY AUTHORIZE scope·approval·budget → 07 TRACES EXPLAIN events·cost·rollback. Footer: ONE MODEL CALL IS AN EVENT · THE HARNESS IS THE SYSTEM. LEGIBLE BEFORE ACTION → CONTROLLED DURING ACTION → AUDITABLE AFTER ACTION.

[Original is an image; text transcribed] SEVEN JOBS OF THE AGENT HARNESS — TURN MODEL CAPABILITY INTO CONTROLLED EXECUTION. 01 CONTRACT DEFINE goal·limits·done → 02 CONTEXT SELECT maps·rules·facts → 03 TOOLS ACT sandbox·browser·shell → 04 STATE REMEMBER artifacts·decisions → 05 SENSORS VERIFY tests·logs·screenshots → 06 POLICY AUTHORIZE scope·approval·budget → 07 TRACES EXPLAIN events·cost·rollback. Footer: ONE MODEL CALL IS AN EVENT · THE HARNESS IS THE SYSTEM. LEGIBLE BEFORE ACTION → CONTROLLED DURING ACTION → AUDITABLE AFTER ACTION.

【原文为图片,已转录】智能体 harness 的七项工作——把模型能力变成受控执行。01 合同 定义 目标·边界·完成条件 → 02 上下文 选取 地图·规则·事实 → 03 工具 行动 沙箱·浏览器·shell → 04 状态 记住 产物·决策 → 05 传感器 验证 测试·日志·截图 → 06 策略 授权 范围·审批·预算 → 07 痕迹 解释 事件·成本·回滚。页脚:一次模型调用是事件 · harness 才是系统。行动前可读 → 行动中可控 → 行动后可审计。

1. Turn the request into a contract1. 把请求变成合同

Before the agent acts, convert the request into a bounded object

智能体动手之前,先把请求收成一个有边界的对象。

Original (English)
{
  "goal": "ship the feature",
  "inputs": ["issue", "repository", "design"],
  "output": "reviewable pull request",
  "constraints": ["no schema changes", "preserve public API"],
  "done_when": ["tests pass", "visual check passes", "review passes"]
}
中文参考译文(可直接替换使用)
{
  "goal": "交付该功能",
  "inputs": ["issue", "代码库", "设计"],
  "output": "可审查的 pull request",
  "constraints": ["不做 schema 变更", "保持公共 API 不变"],
  "done_when": ["测试通过", "视觉检查通过", "审查通过"]
}

The contract protects the task from silent redefinition
Without it, the agent can complete a different job and still declare success

合同防止任务被悄悄改定义。
没有它,智能体可以干完另一份活,照样宣称成功。

2. Give the agent a map2. 给智能体一张地图

Agents need project knowledge
They do not need every document in every context window
Use a small root guide that tells the agent where to look

智能体需要项目知识,
但不需要每个上下文窗口都塞进每一份文档。
用一份很小的根指南,告诉它该去哪儿找。

Original (English)
AGENTS.md
  -> architecture map
  -> testing map
  -> product rules
  -> security rules
  -> task-specific guides
中文参考译文(可直接替换使用)
AGENTS.md
  -> 架构地图
  -> 测试地图
  -> 产品规则
  -> 安全规则
  -> 任务专用指南

A map preserves context
A giant manual consumes it
Keep the detailed knowledge close to the code, tool, or workflow it governs
Load it only when the current task needs it

地图保住上下文,
大部头手册消耗上下文。
把详细知识放在它管辖的代码、工具或工作流旁边,
只在当前任务需要时再加载。

3. Expose the right tools inside the right environment3. 在正确的环境里暴露正确的工具

Tool access is not a list of buttons
It is an interface between the model and the real world
Every tool needs a clear purpose, predictable output, explicit failure state, and a permission boundary

工具访问不是一排按钮,
而是模型与真实世界之间的接口。
每个工具都要有清晰目的、可预期输出、明确失败态,以及权限边界。

Original (English)
READ FILES       allowed by default
RUN TESTS        allowed inside sandbox
WRITE FILES      allowed inside workspace
ACCESS NETWORK   scoped by task
DEPLOY           requires approval
DELETE DATA      requires approval
中文参考译文(可直接替换使用)
读文件       默认允许
跑测试       仅沙箱内允许
写文件       仅工作区内允许
访问网络     按任务限定范围
部署         需要审批
删除数据     需要审批

Good tools reduce ambiguity before the model has a chance to reason badly
Bad tools force the model to guess what happened

好工具在模型还来不及胡乱推理之前,先把歧义压下去;
坏工具逼着模型去猜刚才发生了什么。

4. Externalize memory into durable state4. 把记忆外置成持久状态

The conversation is not the system of record
Store decisions, artifacts, failures, and open risks outside the context window

对话不是系统账本。
把决策、产物、失败和未了结的风险,存到上下文窗口之外。

Original (English)
{
  "task_id": "task_042",
  "current_step": "verify_ui",
  "artifacts": ["build.zip", "report.md", "screenshot.png"],
  "decisions": ["keep existing schema"],
  "failures": ["mobile overflow at 390px"],
  "pending": ["human approval"]
}
中文参考译文(可直接替换使用)
{
  "task_id": "task_042",
  "current_step": "verify_ui",
  "artifacts": ["build.zip", "report.md", "screenshot.png"],
  "decisions": ["保留现有 schema"],
  "failures": ["390px 宽度下移动端溢出"],
  "pending": ["等待人工审批"]
}

The next session should inherit the state of the work, not a lossy retelling of the conversation
This is how an agent survives context resets, crashes, and handoffs

下一会话应继承工作状态,而不是对话的有损复述。
智能体能熬过上下文重置、崩溃和交接,靠的就是这个。

5. Add sensors before adding autonomy5. 先加传感器,再加自主性

An agent cannot correct what it cannot observe
Tests, linters, screenshots, logs, metrics, and schema validators turn vague quality into evidence

看不见的东西,智能体修不了。
测试、linter、截图、日志、指标和 schema 校验器,把模糊的「质量」变成证据。

Original (English)
CODE       -> tests + type checks + lint
UI         -> render + screenshot + visual inspection
RESEARCH   -> source check + contradiction check
DATA       -> schema + range + freshness checks
中文参考译文(可直接替换使用)
代码       -> 测试 + 类型检查 + lint
UI         -> 渲染 + 截图 + 视觉检查
调研       -> 来源核对 + 矛盾检查
数据       -> schema + 取值范围 + 新鲜度检查

The model creates an artifact
The environment produces evidence about the artifact
The harness decides whether that evidence is enough to continue

模型产出产物,
环境产出关于该产物的证据,
harness 决定这些证据够不够继续往下走。

6. Enforce permissions outside the model6. 在模型之外强制执行权限

The model can recommend an action
The harness must authorize it

模型可以推荐一个动作,
授权必须由 harness 来做。

Original (English)
MODEL SUGGESTS -> POLICY CHECKS -> TOOL EXECUTES
中文参考译文(可直接替换使用)
模型提议 -> 策略检查 -> 工具执行

This separation matters most when the action is expensive, irreversible, or touches another person
Do not ask the same probabilistic system to invent the plan, approve the risk, and execute the side effect

当动作昂贵、不可逆,或会碰到别人时,这种分离最重要。
不要让同一个概率系统既编计划、又批风险、还去执行副作用。

7. Record traces and recover locally7. 记录痕迹,并在本地恢复

Every run should leave a readable trail

每一次运行都该留下可读的痕迹。

Original (English)
request
selected context
tool calls
state changes
verification results
retries
cost
final artifact
rollback point
中文参考译文(可直接替换使用)
请求
已选上下文
工具调用
状态变更
验证结果
重试
成本
最终产物
回滚点

Without traces, failure becomes a mystery
With traces, failure becomes input for the next harness improvement

没有痕迹,失败是谜;
有了痕迹,失败就成了下一次改进 harness 的输入。

Instructions should become infrastructure指令应该变成基础设施

Most teams keep important rules in prose
The agent reads them
Then eventually ignores one

多数团队把重要规则写在散文里。
智能体读过,
然后迟早会忽略其中一条。

The stronger pattern is to encode the important rule twice
First as guidance the agent can understand
Then as a mechanical check the agent cannot bypass

更强的做法是:重要规则写两遍——
先写成智能体能懂的指南,
再写成它绕不过去的机械检查。

Original (English)
GUIDE
"UI code may not query the database directly"

CHECK
lint fails when UI imports the repository layer
中文参考译文(可直接替换使用)
指南
「UI 代码不得直接查询数据库」

检查
当 UI 导入 repository 层时,lint 失败

The guide explains the reason
The check enforces the boundary
This turns a past failure into a permanent system improvement
The next agent does not need to remember the incident
The harness remembers for it

指南解释原因,
检查守住边界。
这样就把过去的失败,变成系统上的永久改进。
下一个智能体不必记得那次事故——
harness 替它记得。

The loop belongs to the harness循环属于 harness

Long-running work needs iteration
But "keep trying until it works" is not a control system
A useful loop has evidence, bounded retries, a budget, and an escalation path

长任务需要迭代,
但「一直试到通」不是控制系统。
有用的循环要有证据、有界重试、预算,以及升级路径。

Original (English)
for (let attempt = 1; attempt <= 3; attempt += 1) {
  const artifact = await build(state)
  const evidence = await verify(artifact)

  if (evidence.pass) return artifact

  state.failures.push(evidence.gap)
  state.repair = evidence.repair
}

return requestHumanReview(state)
中文参考译文(可直接替换使用)
for (let attempt = 1; attempt <= 3; attempt += 1) {
  const artifact = await build(state)
  const evidence = await verify(artifact)

  if (evidence.pass) return artifact

  state.failures.push(evidence.gap)
  state.repair = evidence.repair
}

return requestHumanReview(state)
// (逻辑同左:最多 3 次;通过则返回;否则记录缺口并请求人工审查)

The model should decide how to repair the local gap
The harness should decide whether another attempt is allowed

怎么修本地缺口,由模型决定;
还允不允许再试一次,由 harness 决定。

Anthropic reached a similar conclusion in its work on long-running agents
Structured artifacts preserve continuity across sessions, while a separate evaluator gives the builder concrete feedback instead of letting it approve its own work

Anthropic 在长时运行智能体的工作中,也得出相近结论:
结构化产物跨会话保住连续性;独立的评估器给构建者具体反馈,而不是让它自己给自己过关。

“Find the simplest solution possible, and only increase complexity when needed”

「先找尽可能简单的方案,只在需要时再增加复杂度。」

— Anthropic, Harness design for long-running application development — https://www.anthropic.com/engineering/harness-design-long-running-apps—— Anthropic,《Harness design for long-running application development》— https://www.anthropic.com/engineering/harness-design-long-running-apps

Failure should upgrade the system失败应该升级系统

[Original is an image; text transcribed] FAILURE BECOMES INFRASTRUCTURE — FIX THE CURRENT RUN · THEN FIX THE CLASS OF FAILURE. Flow: RUN (produce work) → OBSERVE (capture evidence) → CLASSIFY (name the gap) → REPAIR (patch locally) → VERIFY (test again) → ACCEPT (ship with receipt). Dashed loop VERIFY→CLASSIFY: FAIL · RETURN THE EXACT GAP · RETRY WITH A BOUND. From CLASSIFY down to PERMANENT HARNESS UPDATE: ADD A GUIDE · ADD A TEST · IMPROVE A TOOL · TIGHTEN A PERMISSION · STORE NEW STATE. Footer: THE PATCH FIXES ONE RUN · THE HARNESS CHANGE IMPROVES EVERY RUN AFTER IT.

[Original is an image; text transcribed] FAILURE BECOMES INFRASTRUCTURE — FIX THE CURRENT RUN · THEN FIX THE CLASS OF FAILURE. Flow: RUN (produce work) → OBSERVE (capture evidence) → CLASSIFY (name the gap) → REPAIR (patch locally) → VERIFY (test again) → ACCEPT (ship with receipt). Dashed loop VERIFY→CLASSIFY: FAIL · RETURN THE EXACT GAP · RETRY WITH A BOUND. From CLASSIFY down to PERMANENT HARNESS UPDATE: ADD A GUIDE · ADD A TEST · IMPROVE A TOOL · TIGHTEN A PERMISSION · STORE NEW STATE. Footer: THE PATCH FIXES ONE RUN · THE HARNESS CHANGE IMPROVES EVERY RUN AFTER IT.

【原文为图片,已转录】失败变成基础设施——先修本次运行,再修这一类失败。流程:运行(产出工作)→ 观察(抓证据)→ 归类(命名缺口)→ 修补(本地修复)→ 验证(再测)→ 接受(带收据交付)。虚线回路 验证→归类:失败·退回确切缺口·有界重试。从归类向下到「永久 harness 更新」:加指南·加测试·改进工具·收紧权限·存入新状态。页脚:补丁修好一次运行 · harness 改动改进之后每一次运行。

Most people repair the current output
Harness engineers repair the class of failure

多数人修的是当前这次输出,
harness 工程师修的是这一类失败。

Original (English)
MISSING CONTEXT   -> add a map or retrieval rule
WRONG TOOL        -> improve tool description or routing
BAD OUTPUT        -> add a validator or stronger contract
REPEATED LOOP     -> add a retry cap and escalation
UNSAFE ACTION     -> add a permission gate
LOST DECISION     -> store it in durable state
UNKNOWN FAILURE   -> add tracing and evidence capture
中文参考译文(可直接替换使用)
缺上下文     -> 加地图或检索规则
工具用错     -> 改进工具描述或路由
输出不对     -> 加校验器或更硬的合同
反复空转     -> 加重试上限与升级路径
不安全动作   -> 加权限闸门
决策丢失     -> 写入持久状态
未知失败     -> 加痕迹记录与证据捕获

The immediate patch fixes one run
The harness change improves every run after it
That is the compounding advantage

眼前的补丁修好一次运行,
harness 的改动改进之后每一次运行。
这就是复利优势。

“A good harness converts agent mistakes into infrastructure”

「好的 harness 把智能体的错误,变成基础设施。」

— Author—— 作者

Separate the brain, the hands, and the history分开大脑、双手和历史

A reliable agent is easier to reason about when three components are separate

把三个部件分开,可靠的智能体更好推理:

Original (English)
BRAIN
the model that reasons

HANDS
the sandbox and tools that act

HISTORY
the append-only record of what happened
中文参考译文(可直接替换使用)
大脑
负责推理的模型

双手
负责行动的沙箱与工具

历史
只追加、记录发生过什么的账本

If the sandbox dies, the history survives
If the model changes, the tools and policy remain inspectable
If a task resumes, a new session can reconstruct the state from artifacts and traces

沙箱挂了,历史还在;
模型换了,工具和策略仍可审查;
任务恢复时,新会话能从产物和痕迹重建状态。

Anthropic's Managed Agents architecture makes this separation explicit through the session, harness, and sandbox

Anthropic 的 Managed Agents 架构,通过 session、harness 与 sandbox,把这种分离写得很清楚。

The important part is not the vendor
It is the architecture
The reasoning engine should not also be the filesystem, permission system, memory database, and audit log

重要的不是厂商,
而是架构。
推理引擎不该同时兼任文件系统、权限系统、记忆数据库和审计日志。

Give every run a change receipt给每次运行一张变更收据

When the agent finishes, do not keep only the final output
Keep a compact receipt that explains how the output was produced

智能体做完时,别只留最终输出。
留一张紧凑的收据,说明输出是怎么做出来的。

Original (English)
{
  "context_sources": ["issue", "repo_map", "design_spec"],
  "policy_version": "v12",
  "model_route": "complex_coding",
  "tools_used": ["shell", "browser", "tests"],
  "tests": { "passed": 42, "failed": 0 },
  "human_corrections": 1,
  "retries": 2,
  "cost_usd": 3.84,
  "accepted_artifact": "pr_1842",
  "rollback_point": "commit_7f3a"
}
中文参考译文(可直接替换使用)
{
  "context_sources": ["issue", "repo_map", "design_spec"],
  "policy_version": "v12",
  "model_route": "complex_coding",
  "tools_used": ["shell", "browser", "tests"],
  "tests": { "passed": 42, "failed": 0 },
  "human_corrections": 1,
  "retries": 2,
  "cost_usd": 3.84,
  "accepted_artifact": "pr_1842",
  "rollback_point": "commit_7f3a"
}
(示例收据字段:上下文来源、策略版本、模型路由、所用工具、测试结果、人工纠正次数、重试、成本、接受的产物、回滚点)

This makes model upgrades comparable
It makes regressions attributable
It makes audits possible
And it prevents the final answer from hiding a broken process

这样模型升级才可比较,
回归才可归因,
审计才可能,
也防止最终答案把坏掉的过程藏起来。

Start with the smallest harness that closes the loop从能闭环的最小 harness 开始

Harness engineering does not mean building a platform before the first task
Start with the smallest system that can observe, verify, and recover

Harness 工程不是说,第一个任务之前先搭平台。
从能观察、能验证、能恢复的最小系统开始。

Original (English)
LEVEL 0
prompt + model

LEVEL 1
project guide + tools

LEVEL 2
structured state + tests + bounded loop

LEVEL 3
permissions + traces + recovery + human gates
中文参考译文(可直接替换使用)
第 0 级
提示词 + 模型

第 1 级
项目指南 + 工具

第 2 级
结构化状态 + 测试 + 有界循环

第 3 级
权限 + 痕迹 + 恢复 + 人工闸门

Move up only when the task earns the complexity
A short low-risk task may need one prompt and one review
A six-hour coding run that can edit files, access the network, and open a pull request needs a real harness
The harness should be smaller than the failure surface it controls

只在任务配得上复杂度时再升级。
短而低风险的任务,可能只要一条提示词加一次审查;
能改文件、能上网、能开 PR 的六小时编码运行,才需要真正的 harness。
harness 应当小于它要控制的失败面。

The harness engineering checklistHarness 工程检查清单

Before you trust an agent with real work, ask

把真实工作交给智能体之前,先问:

Original (English)
[ ] Is success defined before execution begins
[ ] Can the agent find the right project knowledge without loading everything
[ ] Does every tool have a clear contract and failure state
[ ] Is execution isolated from production systems
[ ] Are important decisions stored outside the conversation
[ ] Does every risky transition have evidence
[ ] Are irreversible actions protected by approval
[ ] Does every loop have a retry cap and budget
[ ] Can the run resume after interruption
[ ] Can you explain every tool call and state change
[ ] Does failure update a guide, test, tool, or policy
[ ] Can the final artifact be rolled back
中文参考译文(可直接替换使用)
[ ] 开始执行前,成功标准是否已定义
[ ] 智能体能否找到正确的项目知识,而不必把一切都塞进上下文
[ ] 每个工具是否有清晰的合同与失败态
[ ] 执行是否与生产系统隔离
[ ] 重要决策是否存在对话之外
[ ] 每个高风险跃迁是否都有证据
[ ] 不可逆动作是否有审批保护
[ ] 每个循环是否有重试上限与预算
[ ] 中断后运行能否恢复
[ ] 你能否解释每一次工具调用与状态变更
[ ] 失败是否会更新指南、测试、工具或策略
[ ] 最终产物能否回滚

If several answers are no, a stronger model will not make the system reliable
It will only make the failure more expensive

若多条答案是否,更强的模型也不会让系统可靠,
只会让失败更贵。

The real shift真正的转变

Prompt engineering tells the model what to do
Context engineering decides what the model sees
Harness engineering builds the world in which the model acts

提示词工程告诉模型做什么;
上下文工程决定模型看见什么;
Harness 工程建造模型行动于其中的世界。

Original (English)
PROMPT      -> instruction
CONTEXT     -> working view
HARNESS     -> operating system
LOOP        -> local improvement
GRAPH       -> coordination
中文参考译文(可直接替换使用)
提示词      -> 指令
上下文      -> 工作视图
HARNESS     -> 操作系统
循环        -> 局部改进
图/编排     -> 协调

The model may change next month
The tools, tests, state, policies, and traces can keep improving
That is why the durable advantage is moving out of the prompt and into the system around it

模型下个月可能就换了;
工具、测试、状态、策略和痕迹却可以持续改进。
所以持久优势正在从提示词里挪出来,进入它周围的系统。

The best builders will not only ask which model is smartest
They will ask which environment makes that intelligence reliable
That is harness engineering

最好的建设者不会只问哪个模型最聪明,
还会问:哪套环境能让这份智能变得可靠。
这就是 harness 工程。

If you read this far读到这里

-> Subscribe to my Substack: https://whrrari.substack.com/subscribe
-> Join my Telegram: https://t.me/+qqS3Qn-x1305ZmUy
-> Bookmark the article so you can use the checklist when you build your next agent
-> Follow @0xwhrrari for more practical breakdowns of agent systems

-> 订阅我的 Substack:https://whrrari.substack.com/subscribe
-> 加入我的 Telegram:https://t.me/+qqS3Qn-x1305ZmUy
-> 收藏本文,下次搭智能体时用检查清单
-> 关注 @0xwhrrari,看更多智能体系统的实操拆解

That is harness engineering.

这就是 harness 工程。