Skip to content

AGENTS.md: keep what no check catches, and make three of its rules checks - #913

Merged
aledbf merged 5 commits into
mainfrom
agent-text-audit
Dec 3, 2026
Merged

aledbf merged 5 commits into
mainfrom
agent-text-audit

Conversation

@aledbf

@aledbf aledbf commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

Why

AGENTS.md is the only text loaded into every agent session here (CLAUDE.md is a symlink to it). At 23.6 KB, much of it restated code or gates. This keeps only what no check catches and turns three of its rules into checks. A blinded ablation tested whether the rest earns its place.

What changes

  • New checks.
    • gates/go_rules_test.go checks the SPDX header and refuses panic, os.Exit and log.Fatal outside package main. It parses the code, so comments and test files don't trip it. I planted violations to confirm it fails on each.
    • machine.Spec.validate and machine.Start refuse a monitor or unix:/mon:unix: console path that is too long for a Unix socket (107 bytes is the most). Before this, Start bound the socket first and failed with a bare bind: invalid argument, and a too-long console path wasn't checked until QEMU ran.
  • AGENTS.md goes from 23,613 to 3,938 bytes.
    • Deleted because code or a gate already covers it: pins, patch headers, the log and record format, static host binaries, the base image's identity checks, the machine record's details, and versions.
    • Deleted because the ablation did not support it: Go style, comments and verifying. The log and record conventions shrink to one line.
    • Kept, in a shorter form, because neither task touched them: the goal, the invariants, patch and upstream policy, the experiment method, issue labels, and how to drive the machine by hand.
  • Three citations repointed. docs/cli.md, docs/measuring.md and gates/docs_test.go cited AGENTS.md for the record format. They now cite internal/docsrec.

Ablation

I fixed the scoring rubric, the hidden checks and the prune rule before any run, and recorded their hashes. All files still match those hashes.

Task A full B domain-only C minimal
T1 10, 9, 10 (median 10) 10, 8, 10 (median 10) 10, 8, 10 (median 10)
T2 10, 9, 10 (median 10) 10, 10, 10 (median 10) 9, 10, 9 (median 9)

The rule kept the larger text only for a median gain of 2 or more, so it picked C for the areas the tasks touched.

Under C, 6 of 10 T2 runs read the old AGENTS.md out of git history and were rerun. No A or B run did. C also cost 43% more per T2 run. C's T2 median therefore overstates it, and I added back one line pointing at docs/log and gates/docs_test.go, which goes against the rule. The owner made that call.

The tasks were easy: 15 of 18 runs scored 9 or more. A tie at the top shows the extra text didn't help on these tasks. It does not show the text is useless.

Verification

  • task lint passes.
  • go test ./machine ./gates passes. The new Start test fails without the fix.
  • Six tests in internal/release and internal/patched, and task mutate against main, could not run on my host: busybox tar lacks --mode, and they fail the same way on main. CI's verdict is the one to read.

🤖 Generated with Claude Code

aledbf and others added 5 commits December 3, 2026 19:43
A monitor's socket or a unix: console longer than 107 bytes was refused
only once QEMU ran, and the probes then read the guest as never
answering. Spec.validate now names the path and its length.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both were rules in AGENTS.md that the tree obeyed and nothing checked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ix: too

Start binds a monitor's socket before the Spec is validated, so the
refusal reached a caller of Start as bind's "invalid argument".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
23,613 to 3,938 bytes. Rules that restated code or a gate are gone
(pins, patch headers, log and record format, static host binaries, the
image's identity asserts, the machine record's mechanics), and three
became checks: the SPDX header and no panic or exit outside main
(gates/go_rules_test.go), and the socket path sun_path holds
(machine.Spec.validate, machine.Start).

The rest went through a blinded ablation: two tasks from this tree (the
socket refusal; recording #864's lz4 rejection), 3 isolated runs per
text, scored by hidden probes plus a Sonnet judge on blinded diffs.
Medians, A full / B domain-only / C minimal: socket task 10/10/10,
record task 10/10/9. The pre-registered rule (keep the larger text only
for a median gain of 2 or more) kept C for what the tasks touched:
Go style, comments, verifying, the log and record conventions. Sections
neither task touched stay in B's shorter form.

Under C, 6 of 10 record-task runs read the old AGENTS.md out of git
history and were rerun; no A or B run did.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without this line, 6 of 10 runs of the record task read the old
AGENTS.md out of git history to find it (#913).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aledbf
aledbf enabled auto-merge (rebase) December 3, 2026 22:59
@aledbf
aledbf merged commit 035963d into main Dec 3, 2026
18 of 20 checks passed
@aledbf
aledbf deleted the agent-text-audit branch December 3, 2026 23:26
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.

1 participant