hekouwangHarness Doctor
GitHub
INDEPENDENT ACCEPTANCE LAYER · OPEN SOURCE独立验收层 · 开源

A Harness should
not only run.
It should be provable.
Harness
不只会跑。
还要能被证明。

hekouwang Harness Doctor inspects the control plane around an Agent: rules, hooks, CI, contracts, recovery, hosts, and the evidence that connects them. hekouwang Harness Doctor 检查 Agent 外围的控制面:规则、Hook、CI、契约、恢复、宿主,以及把它们连起来的证据。

Works above any runtime · no model lock-in叠加在任何运行时之上 · 不绑定模型
harness-scorecard.jsonDEMO
$ python3 harness_score.py --profile content-agent
evidence scan complete证据扫描完成2026.08.17
86/100
CONDITIONALcross-host governance跨宿主治理confidence 71 · L4 maturity置信度 71 · L4 成熟度
734local checks本地检查177CI checks4hosts unknown宿主待烟测
verification entry验证入口12/12 positive / negative regression正反例回归8/8 ~human boundary人工边界2/4
FILE:LINE.harness/hooks/safety-gate.py:96
HARD CAPno artifact → no pass
OBJECT检查对象ANY HARNESS
EVIDENCE证据优先FILE · LINE · EXIT
OUTPUT输出JSON · CI · GIF
LICENSE许可MIT
01 / POSITION

Running is not
acceptance.
能跑起来,
不等于能验收。

The runtime executes. The acceptance layer asks whether its boundaries can be independently checked.运行时负责执行;验收层负责追问:它的边界能不能被独立检查、复现和交接。

BUILD / RUN构建 / 运行

An Agent RuntimeAgent Runtime

Composes models, tools, sessions, plugins and loops so an Agent can do work.组合模型、工具、会话、插件和循环,让 Agent 能把事情做起来。

agent.run(input) → result
CHECK / PROVE检查 / 证明

Harness DoctorHarness Doctor

Inspects any Harness repository and turns claims into evidence, gates and a rerunnable scorecard.检查任何 Harness 仓库,把“我们有”变成证据、门槛和可重跑的评分卡。

harness.audit(repo) → evidence
ContextOS calls its public product a runnable production audit: runtime controls, file:line evidence, and a launch fix queue. Harness Check deliberately occupies a different layer — cross-runtime acceptance, state/host parity, and evidence change over time.ContextOS 的公开产品是“可运行的生产审计”:运行时控制项、文件行号证据和发布修复队列。Harness Check 刻意站在另一层:跨运行时验收、跨状态/宿主一致性,以及证据随时间的变化。 ContextOS audit ↗
02 / FOUR AXES

A score is useful
only when its boundary is visible.
分数有用,
前提是边界也可见。

01

Any Harness任何 Harness

DeepSeek, Claude, Codex, Cursor, CodeBuddy, or your own runtime.DeepSeek、Claude、Codex、Cursor、CodeBuddy,或者你自己写的运行时。

NO MODEL LOCK-IN
02

Evidence first证据优先

Paths, lines, commands, exit codes, fixtures and run records outrank README keywords.路径、行号、命令、退出码、fixture 和运行记录优先于 README 关键词。

NO ARTIFACT · NO PASS
03

Three states三个状态

Working tree, staged and CI are reported separately. One cannot impersonate another.工作区、暂存区和 CI 分开报告。一次本地通过,不能冒充另外两个。

PARITY OVER CLAIMS
04

Host reality宿主现实

A config file proves mounting. A real smoke test proves triggering. Unknown stays unknown.配置文件只能证明挂载,真实烟测才证明触发。没有证据,就保持 unknown。

CONFIG ≠ TRIGGER
03 / LIVE SCORECARD

Open the score.
Follow the evidence.
打开分数,
顺着证据往下看。

This page is driven by a real JSON scan of the content-agent reference Harness. Click a dimension; the evidence ledger changes with it.这一块由真实扫描生成的 JSON 驱动。点击一个维度,下面的证据台账会跟着变化。

EVIDENCE CONSOLE证据控制台loading…
MATURITY READOUT成熟度读数
/100
CONDITIONAL
confidence置信度
!Hard caps are active硬门槛始终有效Missing security, CI, regression or completion evidence can cap the decision.缺安全、CI、反例或完成证据时,分数会自动封顶。
12 DIMENSIONS12 个维度click to inspect点击查看证据
loading scorecard…
HOST MATRIX宿主矩阵configured ≠ triggered配置存在 ≠ 已触发

Demo note: the score is a decision aid, not a runtime quality guarantee. The sample is a real scan with local paths reduced to repository-relative evidence.演示说明:分数是决策辅助,不是运行时质量保证。示例来自真实扫描,路径已收敛为仓库相对证据。

04 / FROM ZERO TO PROVABLE

Build the control plane.
Then learn to prove it.
先学会搭控制面,
再学会拿证据验收。

A beginner-friendly route based on the 36-page Harness tutorial, extended with the acceptance layer that most introductions leave implicit.基于 36 页 Harness 入门教程整理,并补上多数入门文章没有展开的独立验收层。

01
FOUNDATION · 基础

Model is not the whole Agent模型不是完整的 Agent

Start with Agent = Model + Harness. Separate what the model can generate from what the control plane can constrain.先理解 Agent = Model + Harness:把模型能生成什么,和控制面能约束什么分开。

02
GUIDES · 引导

Write rules, Skills and contracts写规则、Skill 和契约

CLAUDE.md explains the path; Skills package repeatable work; a Task Contract defines “done”.CLAUDE.md 说明正确路径,Skill 封装重复流程,Task Contract 定义“完成”到底是什么。

03
SENSORS · 约束

Put red lines outside the model把红线放到模型外

Hooks, Safety Gates and independent Evaluators catch dangerous or false-complete paths before they become delivery claims.Hook、安全门和独立 Evaluator 在危险动作或虚假完成变成交付结论前拦住它们。

04
RECOVERY · 恢复

Turn failures into the next guardrail把失败变成下一条护栏

Failure ledgers, Context Reset and Sprint Contracts make long work resumable instead of dependent on one chat window.失败台账、Context Reset 和 Sprint Contract 让长任务可以恢复,而不是依赖一段聊天记忆。

05
ACCEPTANCE · 验收

Prove the state, host and boundary证明状态、宿主和边界

Run working-tree, staged and CI separately; keep configured hosts unknown until a real smoke test leaves evidence.分别运行工作区、暂存区和 CI;真实烟测留下证据前,已配置宿主仍保持 unknown。

LIVE RUNGhostty.gifHKW / HARNESS DOCTOR
hekouwang Harness Doctor 在 Ghostty 终端中运行检查的动态录屏
A real run, not a mock dashboard.真实运行过程,不是伪造的仪表盘。The GIF shows the human-facing entry point; the JSON scorecard carries the complete dimensions, evidence and exit codes.GIF 展示面向人的运行入口;完整维度、证据和退出码仍由 JSON Scorecard 承载。
01dynamic progress动态进度02colored verdict颜色结论03rerunnable evidence可重跑证据
Read the complete learning guide →阅读完整学习指南 →
05 / EVIDENCE LOOP

From “we have it”
to “show me.”
从“我们有”,
走到“拿证据来。”

Every important claim passes through the same small loop. The output is explainable to an engineer, a reviewer and a CI job.每一个重要结论都走同一条小闭环。工程师、审阅者和 CI 都能读懂同一份结果。

01
Scan the repository扫描仓库Find the source of truth, adapters, fixtures and contracts.找到真源、适配层、fixture 和契约。
02
Execute the mode执行模式Run working-tree, staged or CI and keep the real exit code.运行工作区、暂存区或 CI,并保留真实退出码。
03
Bind evidence绑定证据Attach path, line, command, fixture and run record to the verdict.把路径、行号、命令、fixture 和运行记录绑定到结论。
04
Apply the hard gate应用硬门槛A verbose README cannot compensate for a missing safety or completion gate.README 再长,也不能抵消缺失的安全门或完成证据。
05
Separate unknowns单列未知Host smoke tests and human acceptance stay visible as their own boundary.宿主烟测和人工验收作为独立边界保留,不被自动化吞掉。
06
Export the loop导出闭环JSON becomes a web view, GIF, CI artifact and baseline diff.JSON 可以直接变成网页、GIF、CI Artifact 和 baseline 对比。
acceptance.logREAD ONLY
$ python3 harness_score.py ./my-harness \
    --mode working-tree --mode ci \
    --format json --output scorecard.json

[scan] source of truth     found
[run ] working-tree        exit 0
[run ] ci                   exit 0
[host] Claude Code smoke    unknown
[gate] evidence contract    partial

 decision: CONDITIONAL
{evidenceSignalsfiles · lines · exit codes · fixtures}
06 / DOMAIN PROFILE

Generic enough to travel.
Specific enough to matter.
通用到可以迁移,
具体到真的有用。

Keep the 12-dimension core stable. Add vertical governance as a profile instead of hard-coding one team's rules into the universal score.通用 12 维保持稳定;把垂直治理做成 Profile,而不是把某个团队的规则硬编码进通用分。

CA
PROFILE

content-agent内容 Agent

35/35

A vertical layer for content workflows: publication state, provenance, channel contracts, artifact boundaries, visual acceptance and external side effects.内容工作流的垂直层:已发布状态、来源、渠道合同、生成物边界、视觉验收和外部副作用。

loading profile…
!35/35 policy score · confidence 35策略分 35/35 · 置信度 35A policy declaration is not the same as a runtime proof.写进策略不等于已经有运行证据。
A

The general layer stays honest通用层保持诚实

It can tell you that a visual review field exists. It cannot pretend that a human has looked at the image.它可以告诉你视觉验收字段存在,但不能假装人已经看过了图片。

B

The profile carries the workflow truthProfile 承载工作流真相

A content team can add “already published?” or “channel contract?” without changing the universal score engine.内容团队可以加入“是否已发布”“是否有渠道合同”,而不用改动通用评分引擎。

C

The result remains portable结果仍然可移植

The same JSON can drive a different team's web page, a release artifact or a before/after GIF.同一份 JSON 可以驱动另一个团队的网页、发布 Artifact 或修复前后 GIF。

07 / START HERE

Bring your own Harness.
Leave with evidence.
带上你的 Harness,
带走一份证据。

The checker is a standard-library CLI and an Agent Skill. It does not replace your repository's verification source; it makes that source independently legible.检查器是标准库 CLI 加 Agent Skill。它不替代仓库自己的验证真源,而是让这份真源可以被独立读懂。

Open the repository →打开仓库 →
CLISKILLCI
$python3 harness_score.py /path/to/harness \ --mode working-tree --mode ci \ --format json --output scorecard.json
01No dependencies零依赖0212 dimensions12 维评分03JSON firstJSON 优先
THE MINIMUM CONTRACT最小接入契约 .harness/scripts/verify.sh --working-tree --staged --ci Find the truth source first. If it is missing, the result is not guessed.先找真源。真源不存在时,结果不会被猜出来。
08 / BOUNDARY

What it is.
What it is not.
它是什么,
它不是什么。

+

An independent acceptance layer独立验收层

It can inspect a Harness built on a different model or runtime.可以检查基于不同模型、不同运行时构建的 Harness。

+

A score with hard gates带硬门槛的评分

The number is constrained by evidence quality, not test-count theater.分数受证据质量约束,不是测试数量的表演。

Not a model benchmark不是模型跑分

It does not rank models or claim that a score predicts intelligence.不排名模型,也不声称分数能预测智能程度。

Not a runtime guarantee不是运行时保证

A configured host remains unknown until a real smoke test leaves evidence.宿主配置存在,直到真实烟测留下证据前,仍然是 unknown。