From f16a2d2cdff2336f70d4e23b26e29f4d7268eb55 Mon Sep 17 00:00:00 2001 From: Diogo Esteves Date: Thu, 22 Oct 2026 14:23:15 +0100 Subject: [PATCH] docs(benchmark): remove the withdrawn earlier benchmark The benchmark the site and the docs report is bench/v2's 1,200 runs. The earlier, smaller one (bench/agents) is no longer rendered or quoted: - /benchmark drops its "The earlier benchmark" section, the component that drew it, and the bench.json that generate.mjs wrote for it. - bench/agents/README.md keeps only what the directory holds and why bench/v2 still uses it; its results tables are gone. - bench/v2/README.md replaces "What changes from v1" with one sentence, and drops the other v1 mentions the site renders. - A test checks that /benchmark shows no figure from it. --- bench/agents/README.md | 62 +-------- bench/v2/README.md | 21 +-- site/app/benchmark/page.tsx | 40 ------ site/components/benchmark.tsx | 227 --------------------------------- site/lib/data.ts | 34 ----- site/scripts/generate.mjs | 56 +------- site/test/benchmark.test.ts | 8 ++ site/test/first-screen.test.ts | 2 +- test/bench-v2-claims.test.ts | 2 +- test/readme.test.ts | 7 +- 10 files changed, 24 insertions(+), 435 deletions(-) delete mode 100644 site/components/benchmark.tsx diff --git a/bench/agents/README.md b/bench/agents/README.md index c2500662..ddc729a2 100644 --- a/bench/agents/README.md +++ b/bench/agents/README.md @@ -1,59 +1,9 @@ -# Agent benchmark +# Agent benchmark v1 -Does an agent write UI that fits the design system more often with onsystem than without it? This runs Claude Code on the same UI tasks twice, once as it ships and once with the [Claude Code plugin](https://onsystem.vercel.app/docs/plugin), and scores what it wrote with `onsystem check`. +An earlier, smaller benchmark, replaced by [bench/v2](../v2). -The runs below were made on 2026-10-08, before the rename, with `@dgesteves/design-system-mcp` 0.1 and its `design-system` plugin. +Its files stay here because bench/v2 builds on them: v2's task prompts end with the same instruction as [run.mjs](run.mjs), its chatbot tasks reuse [tasks.json](tasks.json), and its cost estimate ([config/usage-model.json](../v2/config/usage-model.json)) is measured from these runs. -A larger benchmark, across three providers, five repositories and five conditions, and scored with `tsc`, onsystem and a blind-labelled sample as well, is set up in [bench/v2](../v2). - -## Setup - -- **Project:** [vercel/ai-chatbot](https://github.com/vercel/ai-chatbot) at `c2f8235`, a real shadcn/ui app with 23 components and 52 tokens. Dependencies are not installed. -- **Tasks:** ten components a chat product needs ([tasks.json](tasks.json)), for example a usage banner with a dismiss button, a delete-all-chats confirmation dialog, a settings card with a green "Connected" label, and a message toolbar of icon buttons. Each prompt ends with the same instruction: use the project's existing UI components and design tokens, create only that file, and do not run commands. -- **Conditions:** - - `base`: `claude -p` with no plugin. - - `plugin`: the same, plus `--plugin-dir` with the plugin (MCP server, skill and hook) and the MCP tools allowed. - - Both use `--permission-mode acceptEdits` and a fresh copy of the project per run. -- **Models:** Claude Haiku 4.5 and Claude Opus 5, one run per task, condition and model, so 40 runs in all. -- **Scoring:** `onsystem check` on every file the run created or changed, against a baseline of the untouched project, so only findings the run introduced count. A task is clean when it has no errors. - -## Results - -| Model | Condition | Clean tasks | Errors | Cost | Avg. time | Avg. turns | -| ---------------- | --------- | ----------: | -----: | ----: | --------: | ---------: | -| Claude Haiku 4.5 | base | 6 / 10 | 13 | $1.31 | 46 s | 13.8 | -| Claude Haiku 4.5 | plugin | **10 / 10** | **0** | $1.17 | 42 s | 16.0 | -| Claude Opus 5 | base | 8 / 10 | 5 | $7.74 | 108 s | 15.8 | -| Claude Opus 5 | plugin | **10 / 10** | **0** | $8.31 | 141 s | 21.1 | - -No run produced a warning. - -What the base runs got wrong: - -| Task | Haiku 4.5 | Opus 5 | -| ---------------- | -------------------------------------------------------------------------------- | --------------------------------------------------------------------- | -| rate-limit-alert | 9 × `no-hardcoded-color` (Tailwind's red palette) | none | -| settings-card | 2 × `no-hardcoded-color` | 4 × `no-hardcoded-color` (`emerald` for "Connected") | -| profile-card | none | 1 × `no-hardcoded-color` (an `oklch()` literal for the avatar circle) | -| share-dialog | 1 × `prefer-design-system-component` (native `