Adhiraj Singh ← All notes

I Benchmarked My Agent Governance Layer and It Lost

Weave is a control layer for AI coding agents. The agents write the code. Weave decides what they're allowed to touch and checks their work against criteria written before any code exists. It holds risky changes until a person approves them, and it keeps a record of every step. I spent weeks on it: worktrees per agent, a bubblewrap sandbox, an egress allowlist, 50 policy-pack items, 91 style guides with their own checks.

Then I asked the obvious question: is the website it produces actually better than what you get by giving the same brief to a strong model and leaving it alone?

I built a benchmark to answer that, ran it, and published the result. The plain agent won.

Rules I set before I saw any numbers

The easy way to fool yourself is to grade your own system with your own checks. Weave already has plenty of checks, and of course Weave's builds pass them. That's what the repair loop is for. So the benchmark was forbidden from using any of them. The decision log puts it in one line: "Benchmarks: free open-source scorers only." That means Lighthouse, axe, gitleaks and pnpm audit, and no model judges anything.

Both arms got the same brief, the same style guide, the same 3D model asset, the same model (Opus 5.5), the same tool list and the same isolation from my own Claude Code setup. The plain arm is one claude -p call:

const prompt = [
  "Build this website as a static site in the current directory, with index.html at the root.",
  text,
  assets.length ? `These asset files are already in assets/: ${assets.join(", ")}. Use them where the brief places them.` : "",
  guide ? `Follow this design guide:\n${guide}` : "",
].join("\n\n");

The Weave arm runs the full engine and approves every gate automatically. The number of gates it opened goes into the result too, so the auto-approval is recorded rather than hidden.

The part that almost made the result dishonest the other way

Everything runs on a Claude Pro subscription, and one session window holds about two builds. So builds were going to hit usage limits partway through. At first, a run that died at the limit counted as a loss for whichever arm it happened to land on. That's noise disguised as data.

The fix was to ping the subscription before every build, and again after any failure, to check whether the failure was really the plan running out:

const result = await arm.build(text, dir);
if (!result.ok) {
  // A build that died because the plan's limit hit mid-way is not a loss for its arm.
  try {
    await preflight();
  } catch (e) {
    stopped = `stopped: ${e instanceof Error ? e.message : String(e)}`;
    console.log(stopped);
    return { ok: false, siteDir: dir, meta: { ...result.meta, skipped: stopped } };
  }
}

Runs that produced a site are saved as they finish, so the next invocation picks up where the last one stopped. A benchmark bigger than one plan window finishes across several. I only found this defect because a real run hit the limit. A second defect showed up in the same phase: the Weave arm's checkout collided with restored files in the working copy. Now each result is scored from its own worktree.

The numbers

Three pairs on the robotics landing brief. All six builds produced a site.

MetricPlainWeaveHead-to-head
Lighthouse performance32 ± 5.320 ± 2.6plain 3–0
Lighthouse best-practices10096plain 3–0
Lighthouse agentic-browsing10082 ± 7.5plain 3–0
Lighthouse accessibility99.3 ± 1.2100Weave 1–0, 2 ties
axe violations0.3 ± 0.60.3 ± 0.61–1, 1 tie
Secrets, vulnerable deps, SEOlevellevelties

Three pairs is a small sample. It shows a direction, not a distribution. But the direction is consistent: wherever the scores differ, the plain agent comes out ahead.

Why Weave lost points

I took one of the Weave builds apart to see where the points went. Some of it was my fault in the most boring way possible:

Then there's the part that's uncomfortable in a different way. The two arms weren't served the same way. The Weave build ships its own vercel.json with a Content-Security-Policy, and Weave's server honours it. The plain build has no security headers at all. Served without those headers, the Weave build I checked scores 100 on best-practices and agentic-browsing. None of these scorers gives any credit for a CSP, HSTS or framing protection.

The network setup differed too. The plain agent had open network access and vendored three.js itself. Weave's agents work behind an allowlist that refuses the npm registry.

I could have written up those differences as excuses. I put them in the notes as conditions instead. The scores stay as measured, and the notes explain what was different between the arms. "Nothing here changes a number" is the first thing bench/notes.md says.

What the scorers can't see

Lighthouse grades a finished page. Weave was never mainly about the finished page. It's about everything the page doesn't show:

The real runs did exercise those things. A real agent tried to reach the npm registry. The egress proxy refused it, the request was held at a risky-op gate, and the decision layer rated it risky at 0.62. Another agent reported "done" without placing the 3D model it had been told to place. The placement check failed it, the reason went back into the same session, and the second attempt passed.

None of that appears in a Lighthouse score. A benchmark that would measure it, with planted secrets, a tempting dependency or a brief with a trap in it, doesn't exist yet. It's listed as an open question in the decision log.

What I took from it

The honest summary is the one in the notes: on page-quality scorers, a strong model working alone is as good or better on a simple brief. Weave's case is control and evidence, and this benchmark doesn't measure either one.

That changed how I describe the project. Weave doesn't make better websites. It makes runs you can audit: they have limits on what agents can reach, they stop for a person at the points that matter, and they leave a record you can check afterwards. Maybe a future benchmark shows that this also produces better sites under adversarial conditions. Until one does, I'm not claiming it.

I could have shipped the project with the benchmark harness and the line "has not been run yet" in the README, and nobody would have asked. Running it cost a share of my plan's usage and gave me a table I'd rather not have. It also found two bugs in my own scaffold, showed me that the scorers I'd picked can't see the thing I built, and replaced a vague quality claim with a claim about control that I can actually defend.