bridgebench 3.1.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/CITATION.cff +15 -0
  2. package/LICENSE +21 -0
  3. package/README.md +249 -0
  4. package/dist/chunk-4TWPCPRP.cjs +1097 -0
  5. package/dist/chunk-4TWPCPRP.cjs.map +1 -0
  6. package/dist/chunk-7YCJSOK7.cjs +398 -0
  7. package/dist/chunk-7YCJSOK7.cjs.map +1 -0
  8. package/dist/chunk-CIXITJW6.cjs +249 -0
  9. package/dist/chunk-CIXITJW6.cjs.map +1 -0
  10. package/dist/chunk-EQHRUV2I.js +1466 -0
  11. package/dist/chunk-EQHRUV2I.js.map +1 -0
  12. package/dist/chunk-JTVNKSMO.js +1096 -0
  13. package/dist/chunk-JTVNKSMO.js.map +1 -0
  14. package/dist/chunk-LFKEV2YL.js +398 -0
  15. package/dist/chunk-LFKEV2YL.js.map +1 -0
  16. package/dist/chunk-NJTYVNP4.cjs +1467 -0
  17. package/dist/chunk-NJTYVNP4.cjs.map +1 -0
  18. package/dist/chunk-UECBSKTD.js +244 -0
  19. package/dist/chunk-UECBSKTD.js.map +1 -0
  20. package/dist/cli.cjs +409 -0
  21. package/dist/cli.cjs.map +1 -0
  22. package/dist/cli.d.cts +1 -0
  23. package/dist/cli.d.ts +1 -0
  24. package/dist/cli.js +408 -0
  25. package/dist/cli.js.map +1 -0
  26. package/dist/client.cjs +42 -0
  27. package/dist/client.cjs.map +1 -0
  28. package/dist/client.d.cts +93 -0
  29. package/dist/client.d.ts +93 -0
  30. package/dist/client.js +42 -0
  31. package/dist/client.js.map +1 -0
  32. package/dist/contracts/index.cjs +47 -0
  33. package/dist/contracts/index.cjs.map +1 -0
  34. package/dist/contracts/index.d.cts +14 -0
  35. package/dist/contracts/index.d.ts +14 -0
  36. package/dist/contracts/index.js +47 -0
  37. package/dist/contracts/index.js.map +1 -0
  38. package/dist/index.cjs +171 -0
  39. package/dist/index.cjs.map +1 -0
  40. package/dist/index.d.cts +214 -0
  41. package/dist/index.d.ts +214 -0
  42. package/dist/index.js +171 -0
  43. package/dist/index.js.map +1 -0
  44. package/dist/logger-CCR9Mg1c.d.cts +319 -0
  45. package/dist/logger-QJU7SBDz.d.ts +319 -0
  46. package/dist/reports-4CejmOHf.d.cts +454 -0
  47. package/dist/reports-s2CTnGN8.d.ts +454 -0
  48. package/dist/tasks-CpaCJ6JE.d.cts +151 -0
  49. package/dist/tasks-CpaCJ6JE.d.ts +151 -0
  50. package/dist/tasks.cjs +22 -0
  51. package/dist/tasks.cjs.map +1 -0
  52. package/dist/tasks.d.cts +39 -0
  53. package/dist/tasks.d.ts +39 -0
  54. package/dist/tasks.js +22 -0
  55. package/dist/tasks.js.map +1 -0
  56. package/docs/README.md +25 -0
  57. package/docs/glossary.md +49 -0
  58. package/docs/methodology.md +58 -0
  59. package/docs/private-packs.md +74 -0
  60. package/docs/replay-elo.md +79 -0
  61. package/docs/task-authoring.md +80 -0
  62. package/package.json +137 -0
  63. package/tasks/hallucination/public/boundary-coverage-audit.yaml +274 -0
  64. package/tasks/hallucination/public/boundary-migration-audit.yaml +284 -0
  65. package/tasks/hallucination/public/conflict-dependency-versions.yaml +324 -0
  66. package/tasks/hallucination/public/conflict-runbook-versions.yaml +229 -0
  67. package/tasks/hallucination/public/fabrication-agent-tools.yaml +224 -0
  68. package/tasks/hallucination/public/fabrication-api-surface.yaml +239 -0
  69. package/tasks/hallucination/public/fidelity-commit-attribution.yaml +304 -0
  70. package/tasks/hallucination/public/fidelity-config-drift.yaml +307 -0
  71. package/tasks/hallucination/public/missing-deploy-window.yaml +204 -0
  72. package/tasks/hallucination/public/missing-latency-baseline.yaml +239 -0
  73. package/tasks/hallucination/public/premise-quota-breach.yaml +202 -0
  74. package/tasks/hallucination/public/premise-rollback-cause.yaml +235 -0
  75. package/tasks/reasoning/public/constraint-capacity-allocation.yaml +196 -0
  76. package/tasks/reasoning/public/constraint-deployment-policy.yaml +203 -0
  77. package/tasks/reasoning/public/counterexample-authorization-rule.yaml +278 -0
  78. package/tasks/reasoning/public/counterexample-scheduler-starvation.yaml +290 -0
  79. package/tasks/reasoning/public/root-cache-tenant-leak.yaml +225 -0
  80. package/tasks/reasoning/public/root-event-ordering.yaml +184 -0
  81. package/tasks/reasoning/public/stateful-lease-handoff.yaml +213 -0
  82. package/tasks/reasoning/public/stateful-retry-budget.yaml +222 -0
  83. package/tasks/reasoning/public/synthesis-api-contract.yaml +214 -0
  84. package/tasks/reasoning/public/synthesis-permission-migration.yaml +190 -0
  85. package/tasks/reasoning/public/uncertainty-conflicting-telemetry.yaml +242 -0
  86. package/tasks/reasoning/public/uncertainty-incomplete-incident.yaml +223 -0
package/CITATION.cff ADDED
@@ -0,0 +1,15 @@
1
+ cff-version: 1.2.0
2
+ message: 'If BridgeBench informs your work, cite this software and the methodology version recorded in the journal.'
3
+ title: 'BridgeBench'
4
+ type: software
5
+ authors:
6
+ - name: 'BridgeMind'
7
+ version: '3.1.0-alpha.0'
8
+ license: MIT
9
+ repository-code: 'https://github.com/bridge-mind/bridgebench'
10
+ url: 'https://bridgebench.ai'
11
+ keywords:
12
+ - benchmark
13
+ - vibe coding
14
+ - model evaluation
15
+ - pairwise arena
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 BridgeMind
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,249 @@
1
+ <p align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="assets/bridgemind-wordmark-white.png">
4
+ <img src="assets/bridgemind-wordmark-dark.png" alt="BridgeMind" width="280">
5
+ </picture>
6
+ </p>
7
+
8
+ <h1 align="center">BridgeBench</h1>
9
+
10
+ <p align="center">
11
+ <strong>Autonomous arenas for vibe coding models.</strong><br/>
12
+ Head-to-head matches, a blind three-judge panel, Elo — and a replayable journal behind every number.
13
+ </p>
14
+
15
+ <p align="center">
16
+ <a href="https://bridgebench.ai">bridgebench.ai</a> &nbsp;&bull;&nbsp;
17
+ <a href="#the-arenas">Arenas</a> &nbsp;&bull;&nbsp;
18
+ <a href="#autonomous-match-lifecycle">Methodology</a> &nbsp;&bull;&nbsp;
19
+ <a href="#task-packs">Tasks</a> &nbsp;&bull;&nbsp;
20
+ <a href="#contributing">Contributing</a>
21
+ </p>
22
+
23
+ <p align="center">
24
+ <img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-8A63D2.svg">
25
+ <img alt="Season One" src="https://img.shields.io/badge/season_one-arena-blue.svg">
26
+ </p>
27
+
28
+ ---
29
+
30
+ ## What is BridgeBench?
31
+
32
+ BridgeBench measures how models perform as vibe coding partners. Every task is a software-engineering scenario — source code, diffs, CI logs, API specs, migrations, telemetry, agent sessions — and every deliverable is a question a coding agent would actually face.
33
+
34
+ V3 is **arena-first**: models compete head-to-head on the same task, three independent model judges choose the stronger answer blind, and every majority decision awards one point and one Elo update. There is no weighted aggregate score and no opaque formula — a ranking is exactly the sum of the match record behind it, and the journal that produced it is replayable line by line.
35
+
36
+ It's built by [BridgeMind](https://bridgemind.ai), the agentic organization behind BridgeSpace, BridgeVoice, and BridgeAgent. We benchmark models because we ship with them daily — the leaderboard is the same data we use to pick our own teammates.
37
+
38
+ ## Architecture
39
+
40
+ ```text
41
+ public task pack ─┐
42
+ ├─> arena runner ─> blind judge panel ─> append-only journal
43
+ private overlay ──┘ │
44
+ ├─> verifier ─> reports
45
+ └─> publisher ─> bridgebench.ai
46
+ ```
47
+
48
+ The local journal is the execution record. Snapshots, leaderboards, and the bridgebench.ai API are derived views. `arena verify` validates every journal line and replays Elo before a report or publish operation trusts it.
49
+
50
+ Public task prompts live in this repository. Active hidden references live in a separate private overlay. They are sent to the configured model judges during a match and may be synced to the private API store by maintainers. Withholding them reduces benchmark contamination risk; it does not make third-party processing impossible. The complete boundary is documented in [Private packs](docs/private-packs.md).
51
+
52
+ ## Public-clone quickstart
53
+
54
+ Requirements: Node.js 20.19 or newer and npm 10 or newer.
55
+
56
+ ```bash
57
+ git clone https://github.com/bridge-mind/bridgebench.git
58
+ cd bridgebench
59
+ npm ci
60
+ npx playwright install chromium
61
+
62
+ npm run tasks -- validate
63
+ npm run check
64
+ npm run arena -- verify --category reasoning --journal test/fixtures/journals/valid.jsonl
65
+ ```
66
+
67
+ These commands need no API key and no private overlay. They validate the public packs, run offline checks, and replay a synthetic journal.
68
+
69
+ ## The arenas
70
+
71
+ Two independent arenas ship today, each with its own task pack, journal, Elo ladder, and leaderboard:
72
+
73
+ | Arena | What it measures | What a winning answer looks like |
74
+ | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
75
+ | **Reasoning** | Inference depth. Every task is fully determinable from its artifacts — interlocking specs, logs, code, and configs with planted decoy paths. | Derives the one defensible resolution for every numbered deliverable, with the inference chain and artifact citations. |
76
+ | **Hallucination** | Epistemic discipline. Tasks are seeded with false premises, missing evidence, fabrication bait (plausible entities that don't exist), conflicting sources, and near-duplicate values. | Answers the supported deliverables exactly, corrects false premises with the contradicting evidence, names precisely what is missing — and never invents entities, values, quotes, or blended figures. |
77
+
78
+ The two arenas share the arena contract (pairing, blind three-judge panel, Elo) but never share ratings: a model's reasoning Elo says nothing about its hallucination Elo. Judges receive category-specific instructions — the reasoning panel punishes hedging on determinable questions, the hallucination panel weighs fabrication heaviest and treats blanket refusal as an error too.
79
+
80
+ The same contract expands to security, debugging, and refactoring arenas next.
81
+
82
+ ## Match lifecycle
83
+
84
+ 1. A seeded scheduler selects one task and two distinct competitors while balancing exposure. The same seed always produces the same schedule.
85
+ 2. Both competitors receive identical task context and run concurrently. They don't know they're in a match.
86
+ 3. One exhausted competitor failure forfeits; two failures create a no-contest.
87
+ 4. Each judge independently receives the task, hidden rubric, and anonymous answers.
88
+ 5. Explicit model IDs, canonical slugs, provider names, and model-family names are redacted from responses; judges see only `Model A` and `Model B`.
89
+ 6. A/B order is independently permuted per judge to reduce position bias.
90
+ 7. Two valid votes decide the winner. Judges never see identities, ratings, costs, or other votes.
91
+ 8. The winner earns one point. Elo starts at 1000 and uses K=32.
92
+ 9. The complete result is appended to the journal before reports are rebuilt. Snapshots are derived, never authoritative.
93
+
94
+ Candidate answers are treated as untrusted data. Judge prompts explicitly reject instructions embedded in answers; structured verdicts are schema validated; malformed verdicts get one retry and then abstain. No generated code or model-provided command is ever executed.
95
+
96
+ The full protocol — scheduling math, anonymization rules, vote resolution, drift detection — is in [docs/methodology.md](docs/methodology.md).
97
+
98
+ ## Model roster and transport
99
+
100
+ All requests go through [OpenRouter](https://openrouter.ai) using exact, pinned model slugs. `latest` aliases are prohibited. Before a paid run, the CLI verifies each ID and canonical slug against OpenRouter and confirms that judges still support structured output.
101
+
102
+ The arena measures models _through one aggregator's routing_, not direct provider APIs. Every competitor and judge uses the same transport. OpenRouter's per-generation records (`arena generation <id>`) provide an independent accounting source for tokens, cost, and provider routing.
103
+
104
+ The current roster and request policies are defined once in [`src/models.ts`](src/models.ts). Judges are never eligible competitors.
105
+
106
+ ## Maintainer/operator setup
107
+
108
+ Paid runs require both:
109
+
110
+ 1. `OPENROUTER_API_KEY` in the process environment;
111
+ 2. `BRIDGEBENCH_PRIVATE_DIR` pointing to the private-pack checkout.
112
+
113
+ Set an account-level spending limit before running matches. Never commit either value.
114
+
115
+ ## Run an arena
116
+
117
+ ```bash
118
+ # Reasoning: 12 matches, reproducible seed, $25 stop boundary
119
+ npm run arena -- run --category reasoning
120
+
121
+ # The hallucination arena — same contract, its own tasks, journal, and Elo
122
+ npm run arena -- run --category hallucination
123
+
124
+ # Custom batch
125
+ npm run arena -- run --category hallucination --matches 24 --seed july-calibration --max-cost-usd 40
126
+
127
+ # Sol/Fable pilot — repeat --competitor to set an explicit roster
128
+ npm run arena -- run --category reasoning \
129
+ --competitor openai/gpt-5.6-sol \
130
+ --competitor anthropic/claude-fable-5
131
+
132
+ # Resume the exact deterministic schedule after interruption or budget stop
133
+ npm run arena -- run --category hallucination --matches 24 --seed july-calibration --max-cost-usd 40 --resume
134
+
135
+ # Rebuild reports for both arenas without API calls (or one: --category reasoning)
136
+ npm run report
137
+
138
+ # Verify before publishing
139
+ npm run arena -- verify --category hallucination
140
+
141
+ # Maintainers: an explicit API target and category are required
142
+ # Set BRIDGEBENCH_API_URL and BRIDGEBENCH_ADMIN_KEY privately first.
143
+ npm run tasks -- publish --category hallucination
144
+ npm run arena -- publish --category reasoning
145
+ ```
146
+
147
+ Category, seed, match count, model roster, task hashes, prompt policy, methodology, and engine version define the run manifest. `--resume` continues only the matching deterministic schedule.
148
+
149
+ Without `--competitor`, runs use every enabled competitor. An explicit roster must contain at least two unique, enabled competitor models. Press Ctrl-C once to cancel: active model calls abort, completed matches stay journaled, and the same command resumes with `--resume`.
150
+
151
+ Results are local, ignored by Git, and kept per arena:
152
+
153
+ ```text
154
+ results/<category>/journal.jsonl # append-only execution record
155
+ results/<category>/runs/<run-id>.json # versioned run manifest
156
+ results/<category>/snapshot.json # verified, derived view
157
+ results/<category>/leaderboard.md
158
+ ```
159
+
160
+ A repeated schedule is rejected unless `--resume` is explicit. See [Replay Elo](docs/replay-elo.md) to audit a published ladder.
161
+
162
+ ## Local dashboard
163
+
164
+ A BridgeMind-branded control surface split into three views — Arena, Leaderboard, and Matches — with a live competitor + anonymous-judge stage during runs, durable match history with raw responses and judge rationales, and an SSE activity feed.
165
+
166
+ ```bash
167
+ npm run dashboard
168
+ # Open http://127.0.0.1:4317
169
+ ```
170
+
171
+ The control plane binds only to `127.0.0.1`. The API key stays in the server process and is never serialized to the browser. State-changing requests require a same-origin JSON request, only one run may be active at once, and the browser renders model output as escaped text.
172
+
173
+ ## Task packs
174
+
175
+ Both packs hold 12 expert-difficulty tasks across six category-specific clusters (two tasks each). Tasks are deliberately heavyweight — five to eight interlocking artifacts (~9–18k characters) and four to ten numbered deliverables — so a match exercises real deliberation budget instead of a one-screen skim.
176
+
177
+ **Domain invariant: every task is a coding / software-engineering scenario.** No generic business ops. Public prompts live under `tasks/<category>/public/`; hidden references live in the private overlay. Every journal line records the SHA-256 of both task halves, so task drift is externally detectable.
178
+
179
+ Cluster definitions, the public/private YAML schemas, and the authoring rules (including how decoys map to disqualifying errors) are in [docs/task-authoring.md](docs/task-authoring.md).
180
+
181
+ ## Debugging & the continuous improvement loop
182
+
183
+ Every arena and dashboard run writes a structured, key-redacted JSONL log to `results/<category>/logs/`. The triage command analyzes journals for anomalies — failed requests, suspiciously fast responses, truncation, judge abstentions — and a health stop halts runs that are mostly producing failures.
184
+
185
+ ```bash
186
+ npm run arena -- run --debug # mirror every log entry to the console
187
+ npm run triage # analyze the journal (auto-printed after every run)
188
+ npm run arena -- generation gen-... # OpenRouter's ground-truth record for any journaled generation
189
+ ```
190
+
191
+ The loop: run → read the auto-printed health report → chase flags with the run log → fix the task, prompt, or model policy → rerun with a fresh seed → compare triage reports.
192
+
193
+ ## Repository layout
194
+
195
+ ```
196
+ bridgebench/
197
+ ├── src/
198
+ │ ├── cli.ts # thin executable entrypoint
199
+ │ ├── commands.ts # injectable CLI construction and command handlers
200
+ │ ├── arena.ts # match loop: forfeits, health stop, budget stop
201
+ │ ├── scheduler.ts # seeded, exposure-balanced deterministic scheduling
202
+ │ ├── judges.ts # anonymization, per-judge A/B permutation, majority vote
203
+ │ ├── tasks.ts # pack loader + public/private overlay resolution
204
+ │ ├── verification.ts # schema validation + deterministic journal replay
205
+ │ ├── elo.ts / store.ts / report.ts / triage.ts
206
+ │ └── dashboard/ # localhost-only control plane (SSE)
207
+ ├── tasks/
208
+ │ ├── reasoning/public/ # 12 public task prompts
209
+ │ └── hallucination/public/ # 12 public task prompts
210
+ ├── ui/ # local dashboard SPA (React + Vite)
211
+ ├── test/ # deterministic offline tests and fixtures
212
+ └── docs/ # indexed protocol and contributor references
213
+ ```
214
+
215
+ ## Development
216
+
217
+ ```bash
218
+ npm run check
219
+ ```
220
+
221
+ `npm run build` also emits the versioned `bridgebench/contracts` subpath from `src/contracts/index.ts`. This is a local build entry point only; Phase 1 adds no package-publishing step.
222
+
223
+ Tests use a mock OpenRouter gateway and never spend credits — they pass from a fresh public clone with no API key and no private overlay. Live catalog validation and arena runs are operator-invoked only.
224
+
225
+ ## Contributing
226
+
227
+ BridgeBench is open source and open to builders:
228
+
229
+ - **Propose tasks.** Validate one public task with `npm run tasks -- validate --file <path>`, then open a task proposal.
230
+ - **Audit a ladder.** Run `arena verify` against the published journal. File an audit report if it fails.
231
+ - **Extend the contract.** New arenas (security, debugging, refactoring) reuse the same match lifecycle; the season-engine branch holds a provider layer and browser harness earmarked for future suites.
232
+
233
+ Start with [CONTRIBUTING.md](CONTRIBUTING.md) and the [docs index](docs/README.md).
234
+
235
+ ## Project history
236
+
237
+ This repository previously hosted the Season 1 _season-engine_ alpha: ten Three.js tasks scored in a browser and ranked by community A/B voting. That code remains on the [`season-engine-alpha`](https://github.com/bridge-mind/bridgebench/tree/season-engine-alpha) branch. Its results never mix with arena Elo.
238
+
239
+ ## License
240
+
241
+ [MIT](LICENSE)
242
+
243
+ ---
244
+
245
+ <p align="center">
246
+ <img src="assets/bridgemind-symbol.png" alt="BridgeMind" width="40"><br/><br/>
247
+ Built by <a href="https://bridgemind.ai">BridgeMind</a> — the agentic organization.<br/>
248
+ <sub>Ship software at the speed of thought. This is vibe coding.</sub>
249
+ </p>