Skip to content

feat(bench): feature-building benchmark for Proof's context cost - #300

Draft
tonyketcham wants to merge 3 commits into
claude/agent-memory-context-potency-6sniud-p3-resultsfrom
claude/agent-memory-context-potency-6sniud-p4-build
Draft

tonyketcham wants to merge 3 commits into
claude/agent-memory-context-potency-6sniud-p3-resultsfrom
claude/agent-memory-context-potency-6sniud-p4-build

Conversation

@tonyketcham

@tonyketcham tonyketcham commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #299.

What

benchmarks/proof-build measures whether having Proof in context helps or hurts an agent that plans or builds a feature from a product-sense request: one that describes behaviour in a user's words and names no file, symbol or record.

Bed. A deterministic generator builds Tessera, a zero-dependency TypeScript design-editor core:

  • Code: 79 source files and 132 node:test tests, with 84 commits by five authors.
  • Proof: a 7-Effort graph with 149 live records, 37 commits with Proof: trailers, and 31 code citations.
  • Rules: 6 are recorded only in Proof, and 4 are also visible in code.
  • History: five drifts that the code moved past without updating Proof, and two proper supersessions.
  • Variants: none (the same code with no Proof folder and no trailers) and x10 (1,531 records).

Tasks. 18 build tasks (6 proof-only, 5 code-visible, 4 stale, 3 control) and 8 plan tasks with rubrics, phrased as product requests.

Arms. Each arm sees identical code and an identical request. Only Proof access differs:

Arm Proof access
none no Proof at all
skill Proof installed; the agent decides whether to use it
brief every Effort's brief pasted in
find told to run proof find first
findcode find, plus --path and --refs
dump every live record pasted in
dump10x the same, on the 10x graph

Grading.

  • grade.mjs applies each session's diff to a clean tree and runs hidden acceptance, constraint and regression tests with no network.
  • judge.mjs scores plans after blinding them, so the judge can't tell which arm wrote a plan.
  • compare.mjs pairs each arm with none, using sign tests with Holm correction.

Results: Haiku, full run

There were 446 sessions plus a 30-session pilot. No session timed out or hit an API error. 23 sessions left their folder harmlessly (scratch files, cd /tmp), and none read the hidden tests.

Builds, all-green of 54:

Arm Result Tokens processed vs none
none 47 1.0×
skill 41 1.3×
find 40 1.1×
findcode 41 1.3×
brief 37 1.5×
dump 36 2.0×
  • One stale Decision caused most of the loss. It says shortcuts are registered in a file that a refactor turned into the frozen plugin table. Every task that adds a shortcut then broke plugin API v1 in the Proof arms; on B-S3, none went 3 of 3 and every Proof arm 0 of 3.
  • The stale-anchor note from feat(proof): follow git renames in --path and flag stale code anchors #298 didn't stop it. findcode sessions saw the note and still followed the Decision.
  • Proof-only build tasks showed no gain (none passed 17 of 18): the code's own patterns taught the recorded rules.
  • Plans: pasted Proof lifted proof-only plans (dump 1.00 against 0.90) and dragged down stale ones (0.76 against 1.00), so overall they're equal.
  • Statistics: none of this is significant on the pre-registered tests; the best Holm-corrected p is 0.31. Pooled, dump has p = 0.059, but the harm sits in a few tasks that share one record.

The full tables are in the README. Per-session rows and the compare output are in results/, and a measurement Finding records the result.

Other changes in this PR

  • The hidden tests and the reference and naive patches are now committed in hidden/, since the runs are done.
  • grade.mjs flags sessions that read the committed copies.
  • gate.mjs refuses an --out that would rebuild tasks/ in place.
  • A checker fix stops the false "left its folder" flags the pilot found.

Checks

  • Offline gate: 127 static checks and 54 graded patches, with 0 failures, both from the committed hidden/ and from the copy outside the repo.
  • Beds: they rebuild byte for byte.
  • The none clone: it has no trace of Proof.

Next

  1. A read that marks a Decision itself as suspect when the code it rests on has moved.
  2. Proof-only tasks whose rules the code doesn't hint at.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DVVnhYL1Bz7mCfEKDoyLMW

benchmarks/proof-build asks whether Proof in context helps or hurts an
agent that plans or builds a feature from a product-sense request.

- A deterministic generator builds Tessera, a zero-dependency TypeScript
  design-editor core (79 source files, 132 tests), with 84 commits by
  five authors and a 7-Effort Proof graph: rules recorded only in Proof,
  rules also visible in code, five drifts the code moved past without
  Proof, two proper supersessions, and a 10x filler variant. A none
  variant has the same code with no Proof folder and no trailers.
- 18 build tasks (6 proof-only, 5 code-visible, 4 stale, 3 control) and
  8 plan tasks with rubrics, phrased as product requests that name no
  file, symbol or record.
- Arms: none, skill, brief, find, findcode, dump and dump10x, identical
  apart from Proof access.
- grade.mjs applies each session's diff to a clean tree and runs hidden
  acceptance, constraint and regression tests with no network;
  judge.mjs scores blinded plans; compare.mjs pairs arms against none
  with sign tests and Holm correction.

Hidden tests and reference and naive patches stay outside the repository
until the runs are done. The offline gate passes: each base fails
acceptance, each reference passes, and each naive patch fails what its
category predicts (54 patches, 0 failures).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DVVnhYL1Bz7mCfEKDoyLMW
The pilot excluded three of 30 sessions as leaving their folder, and all
three were false: a grep pattern holding `'../src/...'`, a relative path
inside a heredoc, and a miscounted `../` chain that pointed at a path
that does not exist. A relative path outside the clone in a shell command
now counts only when it names one of the clone's parent folders, another
session's clone, or something that exists under a protected root.
Absolute paths, `cd` out of the clone and file-tool paths are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DVVnhYL1Bz7mCfEKDoyLMW
Haiku built 18 features 3 times and planned 8 twice in each arm (446
sessions). Builds all-green: none 47 of 54, skill 41, find 40,
findcode 41, brief 37, dump 36; processed tokens 1.3x to 2.0x of none.
One stale accepted Decision about where shortcuts are registered caused
most of the loss: Proof arms broke the frozen plugin table on every task
that adds a shortcut, and findcode sessions followed the Decision past
its stale-anchor note. Proof-only builds showed no gain (none 17 of 18).
Plans: pasted Proof lifted proof-only plans and dragged stale ones,
equal overall. Nothing reaches significance on the pre-registered tests.

The README gains a results section; results/ holds per-session rows and
the compare output; a measurement Finding records the result. With the
runs done, the hidden tests and patches are committed in hidden/;
grade.mjs now flags reads of the committed copies, and gate.mjs refuses
an --out that would rebuild tasks/ in place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DVVnhYL1Bz7mCfEKDoyLMW
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants