ForgingGround-Bench
A benchmark for evaluating agents that build full-stack web-app clones — with layered, verifiable scoring.
An agent is given reference materials (screenshots, assets, a specification document) and must construct a runnable full-stack application (FastAPI + Postgres/SQLite + React/Next.js). We do not score only the final artifact — we verify along the task decomposition tree, and we measure the integration gap (components that each work in isolation but fail when composed).
This repository ships the environment specifications, the judging framework, a fully worked reference example (gmail), and the verification engine. It is a spec + framework dataset, not the runnable app clones themselves.
1. What each environment must contain (construction requirements)
Every environment (environments/<env>/) follows one canonical structure:
<env>/
├── document.md # HUMAN-READABLE: what to build — scope, screens, chains, data model
├── contract.json # MACHINE-READABLE: api / screens / chains / ui_flows / entities / asserts
├── asserts.json # THE JUDGING ATOMS: every checkable claim = {id, level, statement}
├── seed/seed.json # synthetic seed data (privacy-safe; loaded to a known state before eval)
├── tests/README.md # layered test skeleton (api / chains / ui_flows / visual)
├── references.md # pointer to reference screenshots + real front-end assets
├── verifier.py # layered scorer (leaf / mid / root + integration_gap)
└── meta.json # provenance (where api/chains/asserts/refs came from)
The layered judging model
Scoring runs on the task-decomposition tree, not a single final grade:
| Layer | What it checks | Signal |
|---|---|---|
Leaf (api) |
each API endpoint is independently correct | leaf_pass |
Mid (chains) |
business flows end-to-end (compose→send→appears-in-sent) | mid_pass |
Root (ui_flows) |
full user journeys reachable + visual fidelity ≥ 0.65 | root_pass, visual |
| integration_gap | fraction of chains that fail while every leaf passed | the headline metric |
All judgments are grounded in ground truth (real HTTP responses / real rendered state / DB tables), never the agent's self-report. Each checkable proposition is an assert; the score vector aggregates asserts per layer.
contract.json — the formal spec
api— endpoints (leaf layer). Where an environment has a reference implementation, these mirror its real reverse-engineered routes 1:1.screens— routes + components, grounded in reference screenshots.chains— business-flow families (mid layer), each with the asserts it must satisfy.ui_flows— realistic multi-step journeys (root layer).entities— the data model (SQLAlchemy-style tables).asserts_vocab— the vocabulary of state-diff checks (eval_*).
asserts.json — a judging atom
{
"id": "L.send_email.appears_in_sent",
"level": "leaf",
"statement": "After sending, the message appears in the Sent view"
}
An environment is graded by: restore known state → agent acts → read final state → run each assert → aggregate reward. The reference example proves this end-to-end.
2. Worked example — contracts/gmail/
gmail is the fully materialized gold reference. It contains everything an environment
needs plus a runnable reference backend and a real verifier:
contract.v2.json— 60+ real endpoints, 8 chain families, screens, asserts, grounded in a real gmail implementation and its grader tasks.document.md— the natural-language build spec.asserts.json— 19 asserts across leaf/mid/root/visual.ref_app/gmail_backend.py— a synthetic reference backend (FastAPI) implementing the contract with privacy-safe seed data. Running the verifier against it scores 1.0 on leaf and mid layers (it is the gold baseline).verifier.py— the layered scorer.
Proven discrimination: on a real gmail instance, a no-op agent scores ≈ 0.04 (baseline), and an agent that correctly performs a task scores 1.0 — the benchmark measures capability, not narration.
3. Verification engine — contracts/verify_engine.py
The reusable scorer. Given a running app and an environment's tasks it:
restore initial state → agent acts → GET /api/state → run each task grader → reward
then aggregates into a score vector {leaf_pass, mid_pass, root_pass, integration_gap}.
This has been run end-to-end against live app instances; see contracts/VERIFY_STATUS.md
for which environments are rigorously scorable and current baseline scores.
4. Coverage & status
environments/— 77 environment content packages (union of implemented environments and crawled reference environments).environments/STATUS.mdindexes all of them.contracts/derived/— 58 machine-derived contracts.contracts/STATUS.md,contracts/VERIFY_STATUS.md— completeness and verification-readiness matrices.
Environments carry honest provenance: scaler-impl (derived from a real implementation
- its grader tasks),
scaler-impl+crawled-refs(also has real reference screenshots), orcrawled-screens+domain-template(synthesized from screenshots + a domain template — marked as needing expert calibration).
5. How to author a new environment
- Extract the target's real API routes →
contract.api(leaf layer). - Curate reference screenshots →
screens+ components. - Write
document.md(scope / screens / chains / data model). - Write
contract.json+asserts.json(register every checkable point as an assert). - Write
seed/(synthetic, privacy-safe) and aseedloader. - Write
tests/(api → chains → ui_flows → visual). - Provide a reference implementation; run
verifier.py— the gold should score 1.0, otherwise the verifier has a bug.
License / disclaimer
CC-BY-NC-4.0 — research / non-commercial evaluation only. Reference materials describe the interfaces of real applications for research grounding and agent evaluation; trademarks and content belong to their respective owners; no affiliation or endorsement is implied. Synthesized environments are marked and require expert calibration before use.
- Downloads last month
- 16