# Agent diagram/edit benchmark

Before any live model run, obtain the maintainer's explicit approval of the model
version, provider account and spending limit. An installed CLI, signed-in account
or existing key is not authorization. Record that approval with the private run
manifest, verify the actual configured model, and do not substitute another model
or rerun a failed checkpoint without checking the approved scope. Per-turn token
and timeout limits are not a total spending cap; if the runner cannot enforce the
approved budget, resolve that before invoking the model. Artifact-only review and
local regression tests do not require a new model run.


Comparison status: **all five cases recorded; independent human scoring pending**.
The [native comparison](native-comparison.md) records all 60 native checkpoints and their limitations. Independent human repair scoring
remains pending.
No overall winner or comparative quality score has been established. The earlier
Graffalo-only pilot remains in [client verification](client-verification.md).

Use the cases below: five diagrams, each followed by the same five sequential edits.
Run the same actual model/version, reasoning settings and token/time budget on
both products. Start each diagram in a clean document, give each agent the same
source facts, randomize which tool runs first, and expose equivalent supported
automation surfaces. Record the tool integrations and versions because an MCP
integration versus browser-only automation measures integration as well as model
quality. Do not quietly repair one output before the next edit.

For every create/edit checkpoint retain the raw model/tool transcript, exported
JSON/XML and a screenshot. Score edit correctness, layout survival and metadata
preservation from the artifacts using the scoring definitions below. A person
records the actual number of corrective actions and time needed. Use reviewers
who did not generate the diagrams, where practical. Report failures and excluded
runs; do not replace a failed run with a successful retry without recording both.

Use the repository scorecard in `benchmarks/agent-editing/results.csv` and fill it from the actual run.
Adding the original protocol did not invoke a model. Neither the pilot nor
mechanical artifact checks fill the human scorecard.
Completing the comparison still needs explicit treatment of
the preview-surface difference, and a human reviewer for repair counts.


## Cases

### architecture

Create: Create a directed system architecture with Browser -> API -> Database, API -> Cache, API -> Worker, and Worker -> Queue. Place API, Worker and Cache in a Services group. Arrange left to right.

1. Add a Metrics node and connect API and Worker to it, without moving unrelated nodes.
2. Move Cache out of Services, leaving API and Worker grouped.
3. Nest Services inside a Platform group.
4. Rename Database to Postgres and add a field named engine with value PostgreSQL.
5. Delete Worker and its incident connections; preserve every other node and relationship.

### database

Create: Create an ER-style diagram: Users(id UUID PRIMARY KEY, email TEXT UNIQUE NOT NULL), Documents(id UUID PRIMARY KEY, owner_id UUID FK Users.id, title TEXT), and Pages(document_id UUID FK Documents.id, page_id UUID, content JSON). Label one-to-many relationships and preserve all column types and constraints.

1. Add created_at TIMESTAMP DEFAULT now() to Documents without dropping its other columns.
2. Add Subscriptions(id UUID PRIMARY KEY, user_id UUID FK Users.id, status TEXT) and connect its foreign key.
3. Group Documents and Pages as Content.
4. Move Pages out of Content without moving Documents.
5. Rearrange left to right with readable labels and no overlapping table bodies.

### tree

Create: Create a directed organization tree: Engineering -> Platform, Product, Quality; Platform -> API, Infrastructure; Product -> Web, Mobile. Arrange top to bottom.

1. Move Infrastructure under Platform Operations, a new node under Platform.
2. Add Security under Engineering.
3. Group Web and Mobile as Clients.
4. Nest Clients inside Product Teams without changing edges.
5. Remove Quality; preserve the remaining parent-child relationships.

### cycle

Create: Create a workflow Intake -> Design -> Build -> Review -> Release, with Review -> Build labeled changes required and Release -> Intake labeled feedback. Group Design and Build as Delivery. Use a left-to-right layout.

1. Insert Test between Build and Review while preserving the review feedback edge.
2. Add an unlabeled edge from Intake to Review.
3. Move Build out of Delivery; keep Design in it.
4. Set Release fill to teal without changing any other node style.
5. Auto-layout left to right; keep both cycles and every edge label.

### typed-nodes

Create: Create a typed workflow: Loader has MODEL and CLIP outputs; Text Encode takes CLIP and outputs CONDITIONING; Sampler takes MODEL and CONDITIONING and outputs LATENT; Decoder takes LATENT and outputs IMAGE; Save Image takes IMAGE. Sampler has seed=42 and steps=20. Preserve socket names, types and parameter values.

1. Change Sampler steps to 30 without dropping seed or socket metadata.
2. Add another Text Encode node for negative conditioning.
3. Add a separate negative CONDITIONING input to Sampler and connect the new encoder.
4. Group the two encoder nodes as Prompts and nest that inside Generation.
5. Rename Save Image to Export, preserving all wires and metadata.

## Scoring

- **edit_correct**: 0 or 1: every requested semantic change and preservation condition holds
- **layout_survives**: 0 or 1: unrelated geometry is preserved unless layout was requested; no new overlaps or clipped labels
- **human_repairs**: count actual human corrective actions; do not estimate
- **metadata_preserved**: 0 or 1: required columns, types, constraints, values and socket references survive import/edit/export

Published from benchmark protocol version 1. Retain raw evidence and failed attempts; this page is a protocol, not a performance claim.
