Repository navigation
AGENTS.md: keep what no check catches, and make three of its rules checks - #913
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
AGENTS.mdis the only text loaded into every agent session here (CLAUDE.mdis 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
gates/go_rules_test.gochecks the SPDX header and refusespanic,os.Exitandlog.Fataloutsidepackage 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.validateandmachine.Startrefuse a monitor orunix:/mon:unix:console path that is too long for a Unix socket (107 bytes is the most). Before this,Startbound the socket first and failed with a barebind: invalid argument, and a too-long console path wasn't checked until QEMU ran.AGENTS.mdgoes from 23,613 to 3,938 bytes.docs/cli.md,docs/measuring.mdandgates/docs_test.gocitedAGENTS.mdfor the record format. They now citeinternal/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.
a4f87e9^.AGENTS.md. The candidates ran on Opus.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.mdout 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 atdocs/logandgates/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 lintpasses.go test ./machine ./gatespasses. The newStarttest fails without the fix.internal/releaseandinternal/patched, andtask mutateagainstmain, could not run on my host: busyboxtarlacks--mode, and they fail the same way onmain. CI's verdict is the one to read.🤖 Generated with Claude Code