Über uns
Verifiable AI coding agent harness / 可验证的 AI 编码代理:evidence hash-chain · hollow-answer gate · manual verification checklist · single-loop kernel + bidirectional MCP · multi-model · Windows/CJK · listed in awesome-opensource-ai & Collabnix awesome-mcp-lists
EntwicklerwerkzeugeGemessener Sternzuwachs
- in 24h
- +1
- in 7 days
- Verlauf wird gesammelt
- in 15 days
- Verlauf wird gesammelt
- in 1 month
- Verlauf wird gesammelt
Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.
README.md
OriginalXenon
One loop. One ledger. One replayable truth.
The model proposes; it cannot turn an unverified effect into a delivery.
Xenon records every tool call as a typed receipt, binds every claim to a fact, and makes unverifiable work explicit debt or abstention.
v1.1 · single-loop kernel · every turn recorded · TypeScript UI + local dashboard · callable by other agents (MCP server)
4,200+ tests · Python 3.10–3.12 · Node.js 20+ (UI)
Safety · Quick start · Use from Claude Code · Architecture · Evidence · Benchmark · Docs · Roadmap 1.2 · Issues · 简体中文
[!TIP] The model proposes; the harness proves. Xenon does not use an LLM judge or seven isomorphic engines. It keeps one
LoopRuntime: the model emits capability actions, the catalog binds tools, the gateway returns receipts, the controller decides repair/debt, and the finalizer owns delivery commits.
What 1.0 means
1.0 is not a feature drop; it settles what entitles the harness to say "done":
- Every turn is on the ledger — including plain conversation.
/evidenceshows the same truth the harness acted on. - One execution and verification chain: the seven isomorphic engines are gone; a mode is just a phase profile of the same loop.
- Delivery has a physical boundary: only the
Finalizercommits; a failed preflight audit rolls that commit back. - Crash recovery is per call: a
tool_startedwithout a receipt becomes "outcome unknown" plus debt — side-effecting calls are never replayed automatically. - Credentials are encrypted at rest: Windows DPAPI (keyring optional); plaintext only as a labeled fallback.
- One UI: a TypeScript (Ink) front-end shipped inside the wheel; the built-in editor is an explicit opt-in, never a silent fallback.
- Bidirectional MCP: Xenon consumes other MCP servers and runs as one for Claude Code and friends.
What 1.1 adds
1.1 is the release where the evidence becomes something you look at instead of read.
The screenshot above is not a mockup. It is docs/evidence/component-matrix/capture_dashboard.py starting the shipped front-end (node frontend/dist/cli.js) under a real ConPTY, typing two turns, answering the approval card, and pointing headless Chrome at the live page:
| Turn | Input | What the panels show |
|---|---|---|
| 1 | 读 README.md 和 calc.py,告诉我 add 函数有什么 bug,先不要改任何文件。 |
4 read receipts, answer quoted from the files, evidence partial — it says it did not run pytest, and the chip agrees |
| 2 | 修复 calc.py 里的 add … 然后运行 python -m pytest tests -q 确认通过。 |
apply_patch + approval + test_run, evidence verified, Diff M calc.py, delivery commit ff28727 |
- Local dashboard —
xenon --dashboard(or/dashboard) serves the panels on127.0.0.1with a random port and a per-process token (401without it,XENON_DASHBOARD=0disables it). Four-panel grid at ≥1400px, tab layout below; terminal and browser drive the same kernel session and the same approval. - TypeScript + Ink front-end shipped prebuilt inside the wheel: runner animation, welcome card, status bar, approval / plan / question panels.
- Write-scope contract reaches verification — "先不要改任何文件" no longer opens
file_changeddebt for a file the user asked you not to touch; a relative "不要修改其他文件" keeps the named target writable. - A read of named files is a floor — "读 README.md 和 calc.py" can no longer be reclassified as chat and answered from memory; the turn runs as a read-only tool turn.
- Component matrix: nine real-task scenarios through the shipped entry point, 54/54 assertions, wall clock and billed tokens recorded in
docs/evidence/component-matrix.
Safety approach
Xenon separates proposing from deciding: the model may propose any action, a deterministic policy decides whether it runs, and a separate finalizer decides whether it becomes a permanent delivery. Two questions govern every action.
Preventing unauthorized actions
- The model proposes; the harness disposes.
Strategy.proposeemits capability actions, but onlyPolicy.check(deterministic veto / approval, no LLM in the loop) may pass them to theToolGateway— the sole entrance for side effects. - Structural safety rules are never negotiated. Writes outside the workspace, writes in read-only mode, and capability/effect mismatches are refused without asking — no grant overrides them.
git pushand destructive commands need a human decision. They are never silently allowed: each requires explicit approval, and is denied fail-closed when no approval channel exists (e.g. the MCP server).- Everything else beyond the default policy needs approval, and a grant is one-shot by default — revoked after a single call, scoped to that exact call, with no persistent "allow everything".
- The user's scope is a contract, not a hint. "Don't modify X" travels from the turn text to the write scope to the tool boundary: a scoped negation can't silently widen into a global ban, and a denied path can't be written by accident. See the write-scope contract in CLAUDE.md.
- Credentials are encrypted at rest (Windows DPAPI; keyring optional), and MCP servers run fail-closed: without an interactive approval channel, a call that needs approval fails with a reason instead of hanging.
Preventing irreversible actions
- Only the
Finalizercommits. A failed preflight audit rolls the commit back instead of returning a paragraph that claims success. - Side-effecting calls are never replayed. Crash recovery is per call: a
tool_startedwithout a receipt becomes "outcome unknown" plus debt, so a restart cannot silently repeat a destructive action. - Unverifiable work blocks delivery. Claims must bind to ledger receipts
(V0 exit code / no-op write / commit sha → V1 step closure → V2 global
obligation coverage); a semantic requirement that cannot be checked
deterministically is
abstained, never dressed up as a pass. - Debt and abstention are explicit. Gaps become debt that blocks delivery until a fact exists or the user explicitly accepts it; the hash chain proves the process was not tampered with.
These mechanisms are exercised end-to-end in
docs/evidence/component-matrix (nine
real-task scenarios, 54/54 assertions) and audited in
docs/reference/EXTERNAL_AUDIT.md.
How is this different from Claude Code
Capability-wise the two are close: a terminal agent, multi-turn, tool calls, MCP, plan mode, approvals. If you want a polished coding agent today, use Claude Code.
Xenon targets a different question — what entitles it to say "done":
- Delivery has a physical boundary. Only the
Finalizercommits; if the preflight audit fails, that commit is rolled back instead of returning a paragraph claiming success. - Claims must bind to facts. If the model says "created 3 files", those paths must appear in ledger receipts, or the gap becomes debt that blocks delivery.
- Unverifiable stays abstained. Semantic requirements that cannot be checked deterministically are reported as unverified, never dressed up as a pass.
- Every step replays. One append-only ledger means
/evidenceshows the same truth the harness acted on, not the model's self-report. - Hard rules are never negotiated. Writes outside the workspace, writes in read-only mode, and capability/effect mismatches are refused without asking;
git pushand destructive commands require an explicit human approval (denied fail-closed when nobody can answer); anything else beyond the current policy goes through a one-shot grant that is revoked after a single call.
One line: Claude Code makes you faster; Xenon tries to make "done" checkable.
And it can audit the other agents
The same split works on someone else's session. Point Xenon at a Claude Code, Codex or DeepSeek Harness log and it separates what the log claims from what the worktree shows:
$ xenon audit-external ~/.dsh/sessions/<ws>/<id>/session.v4.jsonl.zstd --workspace ~/repo
**❌ 声明与工作区冲突**
**日志声明:** 改动 3 个文件 · 命令 1 条;声明只是声明,不是证据。
**工作区实测:** 相对基线变动 2 个文件
## 与工作区冲突(1)
- `CHANGELOG.md` — 日志声称改过,工作区没有对应改动
A new agent is an adapter — one record reader plus a tool-semantics table — not a new pipeline; the contract is pinned by a test that runs every adapter. Where this is heading, and what it deliberately does not do, is in DIRECTION.
This is a research beta: mechanisms are in place and exercised on a limited set of real tasks (
docs/evidence/), but the kernel path has not been re-benchmarked. Do not run it in production.
Quick start
Requires Python 3.10–3.12 and Node.js 20+ (the interactive UI is a TypeScript front-end; the wheel ships it prebuilt).
pip install https://github.com/xianyu-sheng/Xenon/releases/download/v1.1.1/xenon_harness-1.1.1-py3-none-any.whl
xenon --version # 1.1.1
xenon # first run: the UI tells you to type /setup if no key is configured
Windows: add pip's Scripts directory to PATH, or use python -m xenon.
# from source
git clone --depth 1 https://github.com/xianyu-sheng/Xenon.git
cd Xenon && python -m venv .venv
.venv/Scripts/python -m pip install -e . # Windows
source .venv/bin/activate && pip install -e . # Linux / macOS
# build the interactive front-end (a checkout has no bundle; a wheel does)
cd frontend && npm ci && npm run build:release && cd ..
As an MCP server
Xenon exposes one way to run a task and four ways to answer "does that claim count?" for other agents:
xenon mcp-serve --workspace /path/to/repo --permission read-only
# register it in Claude Code (local config)
claude mcp add xenon -- xenon mcp-serve --workspace /path/to/repo --permission read-only
| Tool | What it does |
|---|---|
xenon_run_task |
runs one kernel turn in the workspace; returns the ledger pointer and evidence |
xenon_verify |
did these file changes actually happen? per claim matched / contradicted / out_of_scope, plus changes nobody claimed |
xenon_evidence |
reads a ledger: phase, evidence, claims ↔ receipts, calls actually made |
xenon_blocking_reason |
why this turn did not deliver, and what to do next (at most five decisive facts) |
xenon_audit |
audits another agent's transcript; separates contradictions from unverifiable claims |
Read-only and fail-closed by default: without an interactive approval channel, a call that needs approval fails with a reason instead of hanging. The full install / register / permission / troubleshooting manual is MCP_SERVER; the real Claude Code handshake is recorded in docs/evidence/mcp-claude-integration.
Kernel architecture
TaskSpec
→ LoopRuntime (single writer, explicit phase machine)
view = Projection(ledger[0..seq], catalog, spec)
action = Strategy.propose(view) # model proposal only
decision = Policy.check(view, action) # deterministic veto / approval
receipt = Gateway.execute(action) # only side-effect entrance
verdict = Controller.reconcile(...) # V0 / V1 / V2
event = Runtime.append(...) # only durable write
→ Finalizer (stage verified paths, create delivery commit)
Seven invariants
- I1 single writer: only
LoopRuntimeappends ledger events. - I2 single entrance: tool effects go through
ToolGateway; delivery commits belong toFinalizer. - I3 single source of truth: the ledger is the only truth; everything else is a read-only projection with
input_seq. - I4 semantic interface: the kernel sees capabilities / obligations / receipts; tool names live only in the catalog.
- I5 proposal/fact separation: model output is
claim-*/hyp-*; only the binder producesfact-*. - I6 single decision right:
VerificationControllerdecides repair / replan / abstain / abort. - I7 replayable: the same ledger prefix yields byte-identical projections, with zero network during replay.
Evidence and failure semantics
| Tier | Check | Authority |
|---|---|---|
| V0 | exit code, no-op write, target match, real test target, commit sha, worktree delta | controller |
| V1 | whether a step's expects were closed by a fact |
controller |
| V2 | global obligation coverage, negative facts, semantic gap | deterministic binder + user abstention |
- A tool failure is never guessed into a success by keywords;
- zero matches is
unresolved, multiple matches isambiguous— neither silently picks one; - semantic requirements that cannot be verified deterministically are
abstained, not passed; - debt blocks delivery until a fact exists or the user explicitly accepts it;
- the hash chain proves the process was not tampered with; it does not prove the conclusion.
Benchmark
| Item | Value |
|---|---|
| Protocol | fully blind: no official test patch during solving, no FAIL_TO_PASS names in the prompt |
| Loop | a single LoopRuntime; modes are its phase configuration |
| Model | deepseek-v4-flash, official API |
| Verdict | official swebench harness; FAIL_TO_PASS all pass, PASS_TO_PASS no regressions |
| Repetition | 3 independent runs, averaged; every run published |
| Recorded | 2026-10-16 (v0.9.4 stage) |
| Sample | This framework | Previous v0.8.5 |
|---|---|---|
| Frozen 30 (seed 20260729) | 62.2% | 63.3% |
| Zero-overlap held-out (seed 20261016) | 52.2% | 46.7% |
Scope: these numbers measure the 2026-10-16 framework, not the 1.0 single-loop kernel. The kernel has not been re-run under the same protocol; read them as the previous generation's level. The re-run is on the roadmap (see Issues), and the result will be published either way.
Documentation
- Direction (定位与不做清单) · Roadmap 1.2
- Operation guide (English quick start) · 完整手册
- Architecture · ADR 0001
- Harness · MCP server · External audit
- Component matrix (real tasks, per-scenario ledgers) · Dashboard design
- Extending
- Evaluation · Results
- Contributing — where a change belongs, the three seams, claimable tasks
- Changelog
Honest boundaries
- This is a research beta. Mechanisms are in place with real TTY and real-task evidence, but coverage is narrow; the kernel path has not been re-benchmarked, and there is no multi-user or long-horizon validation. Use mature tools in production.
- The hash chain proves process integrity, not conclusion truth.
- Abstention is a product behavior, not a hidden failure.
- Approval is not a sandbox; run external MCP servers in a controlled environment.
- SWE-bench numbers are limited by sample and budget; read them with EVAL_RESULTS.
License
MIT
Ähnliche Projekte entdecken
Wird geladen…