poteto posted a prompt on X that asks an agent to audit every piece of agent-facing text in a repository, turn what it can into tests and lints, and then prove by experiment which text is left worth keeping. I ran the prompt, then ran a 60-session controlled test to see what it would do to a real AGENTS.md. It’s a sound idea with one blind spot, and the blind spot deleted the only rule that mattered.
The prompt
This is the prompt as posted. You paste it into a coding agent that’s sitting in your repository.
Audit all unstructured agent-facing text in this repo (AGENTS.md, skills, cursor rules, architecture/spec markdown docs) and replace as much of it as possible with executable code, types, lints, and tests. Then prove empirically what text actually earns its context window.
1. Inventory: list every doc, rule, and skill file, its byte size, and classify each claim into:
- Restates code or types (delete)
- Mechanically enforceable (convert into a linter, compiler check, typed API, or test, then delete the prose)
- Irreducible judgment call (candidate to keep, only if concise)
2. Prune and enforce: move enforceable rules into CI/lints/tests first, delete the dead prose, and shrink root instructions to only what automated checks cannot catch.
3. Run a blinded ablation eval before keeping any remaining instructions/skills:
- Pick 1 to 2 representative real tasks from this repo with an objective rubric and stress tests.
- Pre-register a prune rule before running (for example: drop the larger text set unless its median beats the smaller set by at least 2 points).
- Run 3 fresh isolated replicates per condition on clean commits that differ ONLY in the text under test:
- A: full current instructions/skills
- B: domain-only instructions
- C: minimal root instructions only (0 skills/extra docs)
- Audit transcripts for leaks (verify which files were actually opened vs just sitting in the system prompt).
- Grade blinded diffs + built artifacts only (strip branch names, SHAs, and notes) using a separate judge model + automated probe tests.
4. Report the scorecard, which docs/skills were never opened, where extra text hurt or helped, and delete everything that fails the pre-registered prune rule. Turn any recurring failure modes into tests or lints, not new prose.

It has three moves. First it sorts every claim into three bins: restates the code, mechanically enforceable, or a judgment call. Second it moves the enforceable rules into tests and lints and deletes the prose. Third it runs an A/B/C ablation with a pre-registered rule for what gets deleted, so the agent can’t talk itself into keeping text it likes.
What the evidence says
The prompt rests on a result that’s now well known. ETH Zurich and LogicStar’s Evaluating AGENTS.md found that across several coding agents and models, LLM-generated context files made task success slightly worse than no repository context at all, and raised inference cost by more than 20%. Developer-written files fared better, with a small gain, but still cost more to run.
Vercel reached a different conclusion for a different question. In its agent evals, a compressed AGENTS.md index beat skills the agent had to choose to load. Both can be true: short, always-present text can help, while long text and optional extras mostly add cost.
Cutting rules has been a theme of the last fortnight’s coverage. Philipp Schmid deleted most of his agent rules for Gemini 4 Neon. Ratchet turns AGENTS.md rules into enforced hooks. PostHog’s Coherence does the same with checks inside Codex, Claude Code and Antigravity, and Anthropic’s advice on large codebases says the setup around the model matters as much as the model. poteto’s prompt is the do-it-yourself version of all of that.
Running it as posted
I installed opencode (version 1.19.6) on a 4-core, 15 GB RAM Ubuntu 24 box and ran the prompt verbatim on DeepSeek V4.1 Flash, against a small shipping-quote repo I built called Parcelmate. The repo has an AGENTS.md, an architecture doc and three skills, 6,630 bytes of agent text in all.
The agent finished with 96 bytes. It deleted the restatements, wrote a conventions test and added tests for the checkable rules. That part worked. Then its ablation came out at 19.625 for the full set, 19.750 for domain-only and 19.500 for minimal, and the pre-registered rule kept the minimal set.

One of the deleted lines was this one: the rural surcharge is never discounted. It’s an ops decision. Nothing in the code states it, and the agent classed it as not executable. The agent had also written the task prompts for its own ablation, and its first task spelled that rule out in the prompt, so every condition passed. The experiment couldn’t have caught the deletion.
The controlled test
One agent run on one repo is an anecdote, so I built the test properly. Parcelmate’s code is identical in every condition. Only the agent text changes, in four setups:
- A: everything:
AGENTS.md, the architecture doc and three skills. - B: the four domain bullets only.
- C: a one-line
AGENTS.mdthat says to runnpm test. - D: the same one line, plus a checker script that
npm testruns and that enforces the repo’s four code conventions.
Five models ran each setup three times, for 60 sessions: Kimi K3.1 Pro, DeepSeek V4.1 Flash, Claude Haiku 5.5, GPT-6.2 Sol and Gemini 4 Neon. Every session got this identical task:
Add promo codes to Parcelmate. Export a function quoteWithPromo({ weightKg, zone, promoCode }) from src/index.js. It returns the same quote shape as quoteRate. SAVE10 takes 10% off the shipping. FREESHIP waives the base charge, but any surcharge still applies. Any other promo code is an error. Add tests, and make sure npm test passes.
A script graded each result with ten checks: six behaviour probes (including the rural FREESHIP case, where the surcharge must survive), two convention checks and two test checks.
What happened
The setups scored almost the same on the total, which is the problem with a total. The medians were 10 for A and B, and 9 for C and D. Under the prompt’s own example rule, drop the larger set unless it beats the smaller by two points, A loses to C by one point and goes.
| Check (15 runs per setup) | A full | B domain | C minimal | D minimal + checker |
|---|---|---|---|---|
| 10% off, urban | 15 | 8 | 15 | 15 |
| 10% off, rural | 15 | 15 | 3 | 1 |
| Free shipping, rural | 15 | 8 | 15 | 15 |
| Other seven checks | 15 | 15 | 15 | 15 |

Conventions don’t need text
All four code conventions held in all 60 runs, including the 30 runs with only a one-line file: named exports only, kebab-case file names, a Result type instead of throwing, and a test file per module. The agents copied what the code showed them. The convention checker in setup D never fired once.

That part of poteto’s thesis holds up. Prose that restates the code, or restates what a lint would say, isn’t earning its place.
The one rule the code can’t show
The rural surcharge rule is the only requirement that lives nowhere in the code. With the text, A and B got it right in 30 of 30 runs. With a one-line file, 4 of 30 did. The checker in D didn’t help, because it checks conventions, and this isn’t one. It’s a business decision, and the prompt’s three bins have no clear place for it. “Irreducible judgment call” is the nearest fit, but the prompt says to keep those only if concise, and then tests the choice with a score that can’t see it.
A stale line beats the code
The test also turned up the opposite failure. Setup B’s AGENTS.md carried an out-of-date line saying GST is rounded down. The code rounds to the nearest cent. In 7 of 15 B runs the agent followed the line and wrote Math.floor, which broke the money probes. A was clean because its pricing skill pointed the agent to the existing rounding helper. Text that disagrees with the code does more than waste tokens, because agents follow it over the code.

Two smaller findings back the prompt’s instinct about skills. The release-process skill was never opened in 15 runs where it was available, while the pricing and testing skills loaded in all 15. The full set also cost more: the median session read about 12,500 tokens before doing anything in A against about 11,300 in the other setups, and about 189K input tokens in total against 138K to 152K.

How to use it
- Run the prompt. The inventory and the move into tests are the valuable parts.
- Before the ablation, list the rules that exist nowhere in the code, such as pricing decisions, ops constraints and legal limits. Write one probe task for each and keep it out of the agent’s own prompts.
- Pre-register the prune rule per probe, not per total. If any single probe drops when text is removed, the text stays.
- Read the surviving text for lines that contradict the code, and delete them.
What this test covers
This is a smoke test: one toy repo, one task and a script of probes. I didn’t use an LLM judge in my controlled runs, and I didn’t test larger repos or other harnesses’ skill systems. The findings are about what a one-line file can and can’t carry.
Disclosure: I’m an OpenAI, Firecrawl and Devin ambassador.




