BERTHIER — ENVIRONMENT ENGINEERING FOR CODING AGENTS
Agents are only as good as the repo they work in.
Codebases were built for humans to read; today their heaviest users are AI agents. Berthier runs controlled experiments on tasks mined from your repo’s own history, and proves which changes to your codebase make agents measurably faster, cheaper, and more successful.
SEE THE FULL EXPERIMENT ↓
§ 01 — THE PROBLEM
The model isn’t the problem.
When an agent fails in your repository, the model takes the blame. It shouldn’t take all of it. The same model, given the same task, may merge cleanly in one repo and burn its entire context wandering another. The difference isn’t intelligence. It’s the environment: misleading names, absent tests, documentation written for humans.
Teams feel this. So they write CLAUDE.md files, restructure modules, add READMEs — on instinct. Nobody measures whether any of it worked. Every “agent-readiness best practice” in circulation today is folklore.
You can’t improve what you’ve never measured.
§ 02 — THE EXPERIMENT
One task, before and after.
A real task, mined from a pilot repository’s history: ISSUE #482 — FIX INVOICE ROUNDING. The same model ran it ten times against the repo as it stands, and ten times after Berthier’s proven changes were applied. Band width is the agent’s remaining context budget.
Fig. 1 — An agent’s path through the repository; band width shows remaining context budget. Identical task, mined from this repository’s own history. 10 runs per condition, medians. Representative pilot data — your report is drawn from your own repo.
§ 03 — THE METHOD
Tested on your real history.
No benchmarks, no synthetic tasks. Here is how we prove which changes are real.
We extract completed tasks from your git history: real bugs, real fixes, known-good outcomes to grade against.
Agents re-run each task across controlled variants of your repo. Same model, same prompt — only the codebase changes: with and without the doc, the rename, the CLAUDE.md, the test.
Agents run n times per variant. Cost, tokens, wall-clock, and merge success are logged. Only statistically significant wins ship. Everything else is discarded — in writing.
Every claim carries an n, an interval, and a diff.
§ 04 — EVIDENCE
What survives the test.
Fig. 3 — Selected results from pilot repositories. Medians across paired trials. We publish what fails, too.
We ship evidence, not opinions.
§ 05 — WHY NOW
Everyone is using AI agents. Nobody is measuring the codebases they work in.
Agent spend is compounding quarter over quarter; success rates, in our trials, are not. The models keep improving; the repos they work in do not — and in our pilot repositories, the gap between the best and worst environment for the same task has been larger than the gap between model generations.
Environment quality compounds. Every proven change pays out on every future task — agent or human. The team that measures its environment first runs cheaper on everything it ships afterward.
§ 06 — THE NAMESAKE
Why Berthier.
Louis-Alexandre Berthier was Napoleon’s chief of staff — the man who turned intent into precise, executable orders across maps, roads, and couriers. In 1815, Napoleon fought Waterloo without him. Same commander. An army of veterans. The orders arrived garbled, or not at all.
Capability was never the bottleneck. The system that moves intent was.
YOUR AGENTS HAVE A COMMANDER. GIVE THEM A STAFF.
Put your repo to the test.
A two-week pilot. We mine your history, run the experiments, and hand you the full before-and-after report for your own repository — the ranked list of changes worth shipping, with the numbers attached.