Glean 拾遗
Daily /2026-11-14 / The Harness Is the Machine: Seven Invariants for Agent Engineering

The Harness Is the Machine: Seven Invariants for Agent Engineering

Source x.com Glean’d 2026-11-14 06:00 Read 14 min
AI summary

The essay argues that agent failures come from the environment around the model, not from prompts. It lays out seven harness invariants: bound the contract before the first token, feed the context window only AST symbol slices, quarantine writes in ephemeral git worktrees, persist state to disk as receipt.md, gate merges on compiler and test exit codes rather than model claims, strip credentials and network egress, and emit a machine-readable audit receipt per run. It cites a before/after on a multi-file refactor (18% completion bare, 89% with a harness), plus a .claude/rules YAML example, a pre-verify.sh sensor hook, and a receipt template. Useful for engineers wiring coding agents into CI, though the headline numbers are unsourced, the model version names are fictional, and the post ends with promotion.

Original · 14 min
x.com ↗
§ 1

The Harness Is the Machine: The Claude Opus 5.5 Engineering Manifest

运行框架即机器:Claude Opus 5.5 工程宣言

§ 2

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 the intelligence of Claude Opus 5.5

The problem is the environment around it

That environment is the harness

And designing it is harness engineering

The model is only the engine

The harness is the machine

大多数人遇到 agent 失败,第一反应是改提示词。

接着换模型。

再接着加大上下文窗口。

但 agent 仍然会忘掉已经定下的决策。

仍然会调用错误的工具。

仍然跳过验证。

仍然卡在同一个循环里。

问题不在于 Claude Opus 5.5 够不够聪明。

问题出在它周围的环境。

这个环境就是 harness。

设计这个环境,就是 harness engineering。

模型只是发动机。

harness 才是整台机器。

§ 3

Run it in a standard chat window:

It produces plausible-looking code that ignores schema invariants

It attempts to modify 14 files at once, exhausts its token window midway, and leaves the workspace half-broken

It confidently asserts: "All tests passed successfully," without ever executing a test runner

Total task completion rate on complex multi-file refactoring: 18%

Now run the exact same Claude Sonnet 5.5 inside a disciplined engineering harness:

The input contract enforces path bounds and deterministic acceptance criteria before token 1 is generated

Actions execute in isolated git worktrees, physically segregated from the working branch

Static typecheckers, linters, and compiler hooks intercept syntax errors before files are written to disk

Adversarial review by Claude Opus 5.5 in a cold context inspects raw git diffs and test receipts before commit

Total task completion rate on the identical refactoring: 89%

The difference is zero parameters, zero fine-tuning, and zero prompt adjectives. The difference is substrate design

把它放进标准聊天窗口里跑:

它会生成看起来像模像样的代码,却无视 schema 不变量。

它会试图一次改动 14 个文件,中途耗尽 token 窗口,留下一个半坏的工作区。

它会自信地声称:“所有测试均已成功通过”,却从未真正运行过测试。

复杂多文件重构的任务完成率:18%。

现在,把同一个 Claude Sonnet 5.5 放进有纪律的工程 harness 里:

输入契约会在生成第 1 个 token 之前,强制路径边界和确定性验收标准。

所有操作都在隔离的 git worktree 中执行,与工作分支在物理上分开。

静态类型检查器、linter 和编译器钩子会在文件写入磁盘之前拦截语法错误。

由 Claude Opus 5.5 在冷上下文中做对抗性审查,在提交前检查原始 git diff 和测试回执。

同一项重构的任务完成率:89%。

差别不在参数、不在微调、也不在 prompt 里多几个形容词。差别在底层基座的设计。

§ 4

Every robust production harness executes seven non-negotiable architectural responsibilities:

每一个稳健的生产级 harness,都要承担七项不可妥协的架构职责:

§ 5

§ 6
+---------------+-----------------------------+-------------------------------+------------------------------+
| PHASE         | HARNESS INVARIANT           | INFRASTRUCTURE IMPLEMENTATION | FAILURE MODE WITHOUT HARNESS |
+---------------+-----------------------------+-------------------------------+------------------------------+
| 01 / CONTRACT | Bounded scope before tok 1  | Contract spec, turn ceiling   | Unbounded repo wandering     |
| 02 / CONTEXT  | Surgical AST slice          | Symbol resolver, path rules   | Context overflow & drift     |
| 03 / TOOLS    | Isolated write operations   | Git worktrees, sandboxes      | Dirty writes & broken tree   |
| 04 / STATE    | Durable disk-backed memory  | receipt.md checkpoints        | Catastrophic state loss      |
| 05 / SENSORS  | Zero trust in model claims  | Compiler stdout (pyright)     | Hallucinated test passes     |
| 06 / POLICY   | Blast radius boundaries     | Stripped network & secrets    | Token leaks & bad deletes    |
| 07 / TRACES   | Forensic audit trace        | diff manifest, dollar audit   | Unauditable chat noise       |
+---------------+-----------------------------+-------------------------------+------------------------------+
+---------------+-----------------------------+-------------------------------+------------------------------+
| PHASE         | HARNESS INVARIANT           | INFRASTRUCTURE IMPLEMENTATION | FAILURE MODE WITHOUT HARNESS |
+---------------+-----------------------------+-------------------------------+------------------------------+
| 01 / CONTRACT | Bounded scope before tok 1  | Contract spec, turn ceiling   | Unbounded repo wandering     |
| 02 / CONTEXT  | Surgical AST slice          | Symbol resolver, path rules   | Context overflow & drift     |
| 03 / TOOLS    | Isolated write operations   | Git worktrees, sandboxes      | Dirty writes & broken tree   |
| 04 / STATE    | Durable disk-backed memory  | receipt.md checkpoints        | Catastrophic state loss      |
| 05 / SENSORS  | Zero trust in model claims  | Compiler stdout (pyright)     | Hallucinated test passes     |
| 06 / POLICY   | Blast radius boundaries     | Stripped network & secrets    | Token leaks & bad deletes    |
| 07 / TRACES   | Forensic audit trace        | diff manifest, dollar audit   | Unauditable chat noise       |
+---------------+-----------------------------+-------------------------------+------------------------------+
§ 7
  1. DEFINE (Contract)

Core Purpose: Bound the scope before generating token 1

Architectural Invariant: The contract enforces explicit target file lists, deterministic exit conditions, and an iteration ceiling

Harness Implementation: The harness rejects unconstrained requests. If an agent attempts to write outside designated paths, the tool sandbox denies filesystem access

Failure Mode Without Harness: The model wanders into neighboring packages, consumes 80,000 tokens on recursive file search, and edits unrelated utilities

  1. DEFINE(契约)

核心目的:在生成第 1 个 token 之前先划定范围。

架构不变量:契约强制给出明确的目标文件列表、确定性的退出条件,以及迭代次数上限。

Harness 实现:harness 拒绝没有边界的请求。如果 agent 试图写到指定路径之外,工具沙箱会直接拒绝文件系统访问。

没有 harness 时的失败模式:模型会游荡到相邻包里,在递归搜索文件上消耗 80,000 个 token,并顺手改掉无关的工具函数。

§ 8
  1. SELECT (Context)

Core Purpose: Provide a high-fidelity topological map rather than a raw dump

Architectural Invariant: The context window receives only AST symbol signatures, import hierarchies, and localized path policies

Harness Implementation: Dynamic scoping via .claude/rules. System instructions are capped at 150 lines

Failure Mode Without Harness: A 3,000-line source file is dumped into the prompt. By step 15, the model forgets initial invariants and generates broken interfaces

  1. SELECT(上下文)

核心目的:提供高保真的拓扑地图,而不是把原始内容一股脑倒进去。

架构不变量:上下文窗口只接收 AST 符号签名、导入层级和局部路径策略。

Harness 实现:通过 .claude/rules 做动态作用域控制。系统指令上限为 150 行。

没有 harness 时的失败模式:一个 3,000 行的源文件被整段塞进 prompt。到第 15 步,模型已经忘掉最初的不变量,生成出坏掉的接口。

§ 9
  1. ACT (Tools)

Core Purpose: Quarantine all destructive actions

Architectural Invariant: The model never writes directly to the primary checkout or main branch

Harness Implementation: Every task executes inside an ephemeral git worktree:

git worktree add -b patch/task-482 .worktrees/patch-482 HEAD

Commands run under an explicit whitelist of approved system binaries

Failure Mode Without Harness: The model clobbers user work, introduces merge conflicts, or alters host configurations

  1. ACT(工具)

核心目的:隔离所有破坏性操作。

架构不变量:模型永远不能直接写入主检出目录或 main 分支。

Harness 实现:每个任务都在临时的 git worktree 中执行:

git worktree add -b patch/task-482 .worktrees/patch-482 HEAD

命令只在明确白名单内的系统二进制下运行。

没有 harness 时的失败模式:模型覆盖用户的工作,引入合并冲突,或者改掉宿主机配置。

§ 10
  1. REMEMBER (State)

Core Purpose: Externalize cognitive state to durable storage

Architectural Invariant: Progress is materialized directly on disk

Harness Implementation: Every verified checkpoint writes an immutable receipt.md. If a connection drops, the subsequent run resumes seamlessly from disk state

Failure Mode Without Harness: A broken socket drops 40 minutes of agent reasoning, requiring a full restart

  1. REMEMBER(状态)

核心目的:把认知状态外化到持久存储里。

架构不变量:进度直接落在磁盘上。

Harness 实现:每个已验证的检查点都会写入一个不可变的 receipt.md。如果连接中断,下一次运行可以从磁盘状态无缝续上。

没有 harness 时的失败模式:一个断掉的 socket 会丢掉 40 分钟的 agent 推理,只能从头再来。

§ 11
  1. VERIFY (Sensors)

Core Purpose: Evaluate verifiable evidence, not conversational prose

Architectural Invariant: No diff is merged without automated sensor validation returning exit code 0

Harness Implementation: The sensor pipeline automatically executes: AST syntax parsing

Strict typechecking (pyright or tsc --noEmit)

Bounded unit test execution

Failure Mode Without Harness: The model encounters a syntax error internally but assures the user that "everything is working smoothly."

  1. VERIFY(传感器)

核心目的:依据可验证的证据做判断,而不是听对话里的漂亮话。

架构不变量:没有自动化传感器验证并返回退出码 0,任何 diff 都不得合入。

Harness 实现:传感器流水线会自动执行: AST 语法解析

严格类型检查(pyright 或 tsc --noEmit)

有边界的单元测试执行

没有 harness 时的失败模式:模型内部已经遇到语法错误,却还向用户保证“一切运行顺畅”。

§ 12
  1. AUTHORIZE (Policy)

Core Purpose: Enforce blast-radius control outside token generation

Architectural Invariant: High-risk actions require cryptographic tokens or human confirmation

Harness Implementation: Production credentials and raw API secrets are stripped from execution containers. Socket egress is locked at the OS kernel level

Failure Mode Without Harness: The model invokes curl to unauthorized external endpoints or logs secret credentials

  1. AUTHORIZE(策略)

核心目的:在 token 生成之外强制控制爆炸半径。

架构不变量:高风险操作必须持有加密令牌或得到人工确认。

Harness 实现:生产凭据和原始 API 密钥会从执行容器中剥离。socket 出站流量在内核层被锁死。

没有 harness 时的失败模式:模型用 curl 请求未授权的外部端点,或者把密钥写进日志。

§ 13
  1. EXPLAIN (Traces)

Core Purpose: Guarantee forensic auditability for every automated change

Architectural Invariant: Every commit carries a machine-readable audit receipt

Harness Implementation: Comprehensive recording of token budgets, dollar costs, starting commit SHAs, and raw sensor outputs

Failure Mode Without Harness: Cryptic commits with vague messages like "fix bug" that break CI unnoticed weeks later


Axiom: One model call is just an event. The harness is the system

  1. EXPLAIN(追踪)

核心目的:让每一次自动变更都可供取证审计。

架构不变量:每个 commit 都携带机器可读的审计回执。

Harness 实现:完整记录 token 预算、美元成本、起始 commit SHA 和原始传感器输出。

没有 harness 时的失败模式:提交信息含糊,比如“修个 bug”,几周后悄悄弄坏 CI 也没人发现。


公理:一次模型调用只是一个事件。harness 才是系统。

§ 14

The most pervasive anti-pattern in AI engineering is writing behavioral rules in natural language prompts:

"Please do not touch files outside src/components"

"Remember to format code with Prettier"

"Ensure you do not delete type definitions"

This is cargo-cult engineering. A probabilistic model under token pressure will eventually ignore soft instructions

AI 工程里最普遍的反面模式,就是把行为规则写进自然语言 prompt:

“请不要碰 src/components 之外的文件”

“记得用 Prettier 格式化代码”

“确保不要删除类型定义”

这是 cargo-cult 工程。一个处于 token 压力下的概率模型,迟早会无视这些软性指令。

§ 15

In a mature harness, instructions are compiled into deterministic infrastructure

Step 1: Path-Scoped Rules (.claude/rules)

Instead of bloated system prompts, rules attach exclusively to target paths:

# .claude/rules
contracts:
  - path: "src/auth/**"
    rules:
      - "Never expose raw tokens in error logs"
      - "All session mutations must acquire Redis lock"
    sensors:
      - "npm run test:auth"
      - "npm run typecheck"

在成熟的 harness 里,指令会被编译成确定性的基础设施。

第 1 步:路径作用域规则(.claude/rules)

不再写臃肿的系统 prompt,而是让规则只绑定到目标路径:

# .claude/rules
contracts:
  - path: "src/auth/**"
    rules:
      - "Never expose raw tokens in error logs"
      - "All session mutations must acquire Redis lock"
    sensors:
      - "npm run test:auth"
      - "npm run typecheck"
§ 16

Step 2: Deterministic Pre-Commit Compiler Hook (.claude/hooks/pre-verify.sh)

Never ask the model to run tests voluntarily. The harness intercepts tool writes automatically:

#!/usr/bin/env bash
set -euo pipefail

echo "=== SENSOR SUITE EXECUTION ==="

# 1. Static AST type verification
pyright src/auth/session.py || {
  echo "SENSOR FAILED: Type invariants violated. Patch rejected."
  git restore .
  exit 1
}

# 2. Hermetic unit suite with strict timeout
pytest tests/auth/ -q --timeout=10 || {
  echo "SENSOR FAILED: Regression detected in auth suite."
  git restore .
  exit 2
}

echo "=== SENSORS PASSED: PROCEEDING TO AUDIT ==="

Rule: Rules belong in compilers, linters, and OS permissions, not in English prose

第 2 步:确定性的提交前编译器钩子(.claude/hooks/pre-verify.sh)

永远不要指望模型会主动跑测试。harness 会自动拦截工具的写操作:

#!/usr/bin/env bash
set -euo pipefail

echo "=== SENSOR SUITE EXECUTION ==="

# 1. Static AST type verification
pyright src/auth/session.py || {
  echo "SENSOR FAILED: Type invariants violated. Patch rejected."
  git restore .
  exit 1
}

# 2. Hermetic unit suite with strict timeout
pytest tests/auth/ -q --timeout=10 || {
  echo "SENSOR FAILED: Regression detected in auth suite."
  git restore .
  exit 2
}

echo "=== SENSORS PASSED: PROCEEDING TO AUDIT ==="

规则:规则应该放进编译器、linter 和操作系统权限里,而不是写在英文散文里。

§ 17

Never let a single agent serve as architect, builder, auditor, and archivist simultaneously

Doing so guarantees cognitive contamination: the model falls in love with its own flawed diffs

A frontier architecture separates responsibilities across three distinct planes:

永远不要让同一个 agent 同时扮演架构师、构建者、审计员和档案管理员。

这样做必然导致认知污染:模型会爱上自己那堆有缺陷的 diff。

前沿架构会把职责拆到三个彼此分离的平面:

§ 18
┌────────────────────────────────────────────────────────┐
│               THE COGNITIVE ARCHITECTURE               │
├─────────────────────────┬──────────────────────────────┤
│ 1. THE HANDS (Worker)   │ Claude Sonnet 5.5            │
│                         │ Isolated git worktree        │
│                         │ Hard turn limit: 3 attempts  │
├─────────────────────────┼──────────────────────────────┤
│ 2. THE BRAIN (Auditor)  │ Claude Opus 5.5              │
│                         │ Clean cold context           │
│                         │ Inspects raw git diffs       │
├─────────────────────────┼──────────────────────────────┤
│ 3. THE HISTORY (State)  │ Durable disk receipts        │
│                         │ receipt.md checkpoints       │
│                         │ Zero-loss session resume     │
└─────────────────────────┴──────────────────────────────┘
┌────────────────────────────────────────────────────────┐
│               THE COGNITIVE ARCHITECTURE               │
├─────────────────────────┬──────────────────────────────┤
│ 1. THE HANDS (Worker)   │ Claude Sonnet 5.5            │
│                         │ Isolated git worktree        │
│                         │ Hard turn limit: 3 attempts  │
├─────────────────────────┼──────────────────────────────┤
│ 2. THE BRAIN (Auditor)  │ Claude Opus 5.5              │
│                         │ Clean cold context           │
│                         │ Inspects raw git diffs       │
├─────────────────────────┼──────────────────────────────┤
│ 3. THE HISTORY (State)  │ Durable disk receipts        │
│                         │ receipt.md checkpoints       │
│                         │ Zero-loss session resume     │
└─────────────────────────┴──────────────────────────────┘
§ 19
  1. The Hands (Worker Plane): Claude Sonnet 5.5

Optimized for velocity, tool calling, and high-frequency code edits. It works exclusively inside an isolated git worktree:

git worktree add -b patch/session-fix .worktrees/patch-482 HEAD

Claude Sonnet 5.5 operates under a hard turn limit (maximum 3 self-correction iterations)

It has zero permission to merge into main and cannot inspect root secrets

  1. 手(执行平面):Claude Sonnet 5.5

针对速度、工具调用和高频代码编辑做优化。它只在隔离的 git worktree 里工作:

git worktree add -b patch/session-fix .worktrees/patch-482 HEAD

Claude Sonnet 5.5 受硬性轮次上限约束(最多 3 次自我修正迭代)。

它没有任何权限合入 main,也不能查看 root 密钥。

§ 20
  1. The Brain (Auditor Plane): Claude Opus 5.5

Operates in a completely cold, unpolluted context window

It has no access to the worker's chat history or rationalizations

It receives only three raw artifacts:

The original bounded contract

The raw git diff generated in the worktree

The sensor stdout logs

Claude Opus 5.5 evaluates the diff adversarially

It specifically searches for hallucinated edge cases, silent signature breaks, and unhandled exceptions.

If any invariant is violated, it rejects the patch with a surgical failure classification

  1. 脑(审计平面):Claude Opus 5.5

在完全冷启动、未被污染的上下文窗口里运行。

它看不到执行者的聊天历史,也看不到那些自我辩解。

它只接收三样原始产物:

最初那份有边界的契约

worktree 里生成的原始 git diff

传感器 stdout 日志

Claude Opus 5.5 会以对抗姿态评估这份 diff。

它会专门查找幻觉出来的边界情况、悄无声息的签名破坏,以及未处理的异常。

只要有任何不变量被违反,它就会以精准的失败分类拒绝这个补丁。

§ 21
  1. The History (Substrate Plane): Durable Disk State

Neither model is trusted to remember context across hours

All state is serialized to disk as structured markdown receipts (receipt.md)

If the process crashes or token limits trigger a reset, the next session resumes seamlessly from disk state

  1. 历史(基座平面):持久磁盘状态

不要指望任何一个模型能跨小时记住上下文。

所有状态都会序列化到磁盘,写成结构化的 markdown 回执(receipt.md)。

如果进程崩溃,或者 token 上限触发重置,下一次会话会从磁盘状态无缝续上。

§ 22

When an agent fails, junior engineers prompt-engineer a patch for that specific run

Senior harness engineers fix the entire failure class

当 agent 失败时,初级工程师会针对这一次运行去 prompt 里打补丁。

资深的 harness 工程师则修复整个失败类别。

§ 23

§ 24

Every failure must execute a closed-loop immunization cycle:

RUN: The agent produces code in a sandboxed branch

OBSERVE: Sensors capture compilation errors, assertion failures, or linter warnings

CLASSIFY: The harness categorizes the root cause (context gap, tool deficiency, or permission boundary)

REPAIR: The agent patches the local branch under strict step bounds (max 3 attempts)

VERIFY: Sensors re-run. If tests fail twice on the same error, execution halts immediately to prevent token burn

ACCEPT: If tests pass, the patch is accepted with a forensic change receipt

Most importantly, the harness updates its own permanent substrate:

Missing domain knowledge becomes a project-scoped guide

An uncaught edge case becomes a regression test fixture

A clumsy shell operation becomes a purpose-built CLI tool


Principle: The patch fixes one run

The harness change improves every run after it

每一次失败都必须走一遍闭环免疫流程:

RUN:agent 在沙箱分支里生成代码。

OBSERVE:传感器捕获编译错误、断言失败或 linter 警告。

CLASSIFY:harness 归类根因(上下文缺口、工具能力不足,还是权限边界问题)。

REPAIR:agent 在严格的步数边界内修补本地分支(最多 3 次尝试)。

VERIFY:传感器重新运行。如果同一个错误连续失败两次,立即中止执行,避免继续烧 token。

ACCEPT:如果测试通过,就接受补丁,并留下可供取证的变更回执。

最重要的是,harness 会更新自己的永久基座:

缺失的领域知识,变成项目范围内的指南。

漏掉的边界情况,变成回归测试用例。

笨拙的 shell 操作,变成专门构建的 CLI 工具。


原则:补丁只修好一次运行。

harness 的改动,会让之后的每一次运行都更好。

§ 25

Autonomous agents must never leave unrecorded commits

Every finished run must generate an immutable receipt.md at the repository root:

# AGENT EXECUTION RECEIPT // RUN-48291
- Model: Claude Sonnet 5.5 (Worker) / Claude Opus 5.5 (Auditor)
- Target: auth/session_manager.py
- Input Hash: e9a1f0c2
- Status: PASSED (exit code 0)

## Verified Invariants:
1. Redis lock timeout bounded to 500ms (checked via unit test)
2. Zero new dependencies introduced in requirements.txt
3. Pyright strict type check: 0 errors

## Forensic Trace:
- Files modified: 2 (+48 lines, -12 lines)
- Total tokens: 34,210 ($0.11)
- Sensor runtime: 3.4s
- Worktree SHA: d83b7e1

If an engineer cannot read a receipt in 15 seconds and verify why a change was made, the agent run is rejected by CI

自主 agent 绝不能留下没有记录的 commit。

每一次完成的运行,都必须在仓库根目录生成一个不可变的 receipt.md:

# AGENT EXECUTION RECEIPT // RUN-48291
- Model: Claude Sonnet 5.5 (Worker) / Claude Opus 5.5 (Auditor)
- Target: auth/session_manager.py
- Input Hash: e9a1f0c2
- Status: PASSED (exit code 0)

## Verified Invariants:
1. Redis lock timeout bounded to 500ms (checked via unit test)
2. Zero new dependencies introduced in requirements.txt
3. Pyright strict type check: 0 errors

## Forensic Trace:
- Files modified: 2 (+48 lines, -12 lines)
- Total tokens: 34,210 ($0.11)
- Sensor runtime: 3.4s
- Worktree SHA: d83b7e1

如果工程师不能在 15 秒内读懂一份回执、确认这次改动为什么发生,那么这次 agent 运行就会被 CI 拒绝。

§ 26

Before allowing any frontier agent (Claude Sonnet 5.5 or GPT-6 Astra) to run unattended overnight, verify this 8-point checklist:

Task Contract: Is the input spec bounded to fewer than 5 files with explicit acceptance criteria?

Isolation: Is execution locked to an isolated git worktree with no write access to main?

Sensor Gating: Are linters, typecheckers, and test suites wired to block changes on exit code != 0?

Loop Breaker: Is there a hard ceiling (e.g., max 3 identical sensor failures) to halt runaway loops?

Context Budget: Is context loading restricted to under 150 lines of instructions plus path-relevant AST symbols?

Adversarial Audit: Does an independent auditor model inspect raw git diffs before PR creation?

Blast Radius: Are credentials, network egress, and database writes completely stripped from tools?

Durable State: Is session progress written to disk so crashes resume without loss?

Stop prompting. Start building harnesses

-> Join my Telegram

→ Follow @damkina7 for deep architectural teardowns of frontier AI systems

-> Bookmark this article so you have the pre-flight checklist ready before your next autonomous run

在允许任何前沿 agent(Claude Sonnet 5.5 或 GPT-6 Astra)整夜无人值守运行之前,请先核对这份 8 点清单:

任务契约:输入规格是否被限制在 5 个文件以内,并给出明确的验收标准?

隔离:执行是否被锁在独立的 git worktree 中,且对 main 没有写权限?

传感器门禁:linter、类型检查器和测试套件是否已接入,并在退出码 != 0 时阻止变更?

循环熔断:是否有硬性上限(例如同一种传感器失败最多 3 次)来中止失控循环?

上下文预算:上下文加载是否限制在 150 行指令以内,再加上与路径相关的 AST 符号?

对抗审计:是否有独立的审计模型在创建 PR 之前检查原始 git diff?

爆炸半径:凭据、网络出站和数据库写入是否已从工具中彻底剥离?

持久状态:会话进度是否写入磁盘,以便崩溃后无损续跑?

停止写提示词。开始构建 harness。

-> 加入我的 Telegram

→ 关注 @damkina7,获取前沿 AI 系统的深度架构拆解

-> 收藏这篇文章,这样下一次自主运行前,你手边就有这份起飞前检查清单

Open source ↗