Proposal: offline benchmarks for repair rounds, late discovery, and token cost
Problem and value
The authoring-cost study on labs/first-draft-cost-20260918 shows where generation time goes: machine stages take seconds, while time before the first draft and repair rounds take most of each run (roughly 150–260 s per author process, 160k–290k input tokens per run). That study depends on real author runs and human review, so it is expensive to rerun, and a regression can land between studies without anyone noticing.
I'd like to propose a small set of offline, deterministic benchmarks that measure the parts of speed and cost Archify controls directly, without model calls, human review, or image/VLM scoring. They would complement authoring-cost and ordinary-model-floor, not replace them, and could run in CI.
Evidence on current dev (5dda5c3, macOS, Node 22.23.3, local Chrome)
finalize --quality showcaseon the five bundled examples takes 2.4–3.7 s each. That is well under 2% of an author run, which matches the study's conclusion that machine stages are not the bottleneck.- The files the fast path requires reading (SKILL.md, authoring-defaults, the mode's example, and the schemas for sequence/dataflow/lifecycle) total about 20–40 KB. That is far below the observed input-token volume, so most of the cost comes from repeated context and repair rounds.
- Defects of different classes surface one round at a time. Starting from
examples/web-app.architecture.json:- Two over-long labels on different components: one
validatecall reports both (layout/constraint×2). - One over-long label plus one component moved to
pos: [5000, 5000]:validatereports only the label. Thecomposition/desktop-readabilityfailure appears only after the label is fixed, which costs an extra author round. - That
layout/constraintdiagnostic has an emptyevidenceobject, an emptysupportedFixeslist, and asubjectwithout the component id. CONTRIBUTING asks for a precise subject, concrete evidence, and executable fixes.
- Two over-long labels on different components: one
This lines up with the P0 items in #175 ("return all violations in one receipt", "exact constraints", "structured issues").
Proposal
Add a benchmarks/repair-rounds/ suite with three measurements. It is benchmark code only and makes no product changes; any product fixes it motivates would go in separate PRs.
1. One-round repairability (the static-feedback-replay idea from ConvCodeBench, ICLR 2025)
- A checked-in corpus of seeded candidates, built from the bundled examples, each carrying K independent defects from different classes (schema, layout constraint, composition, route, viewport).
- A deterministic "oracle fixer" knows the seeded defects and repairs only those an emitted diagnostic points to.
- Metrics:
validaterounds needed to pass;- defects reported per round;
- share of defects never reported;
- share of diagnostics with a precise subject id, non-empty evidence, and non-empty
supportedFixes.
2. Late-discovery rate
- For each seeded defect, record the earliest gate that catches it:
validate,deliver, strictcheck, orbrowser-check. - Metric: the share of defects first seen at the browser stage, where each late discovery costs a full extra author round.
3. Context and feedback token cost (token accounting as in HAL, ICLR 2026, and TALE, ACL 2025 Findings)
- Tokens in the fast-path mandatory read set for each diagram type, counted with a pinned tokenizer and also reported as bytes.
- Tokens in
finalize/validatestdout for passing and failing candidates. - Intended as a regression guard: a change that grows the mandatory context or receipt size shows up as a number.
Common rules:
- Everything is deterministic and reproducible from tracked content.
- Results are reported per diagram type, against a recorded base commit.
- Nothing launches a model provider.
- Chrome is needed only for measurement 2; without Chrome, that measurement is reported as skipped, never as passed.
Non-goals
- No perceptual, human, VLM, or LLM-judge scoring. Visual quality stays with the existing review process.
- No changes to renderers, validators, schema, Skill text, or quality thresholds in the benchmark PR.
- No replacement for
authoring-costorordinary-model-floor, and no claim of end-to-end speedup from these numbers alone.
Questions for you
- Is this direction useful to you, and does it avoid overlapping with what you're planning on the labs branch?
- Would you prefer the suite on
devunderbenchmarks/, or on the labs branch first? - Any defect classes you want covered first? I'd start with the ones the #175 data showed as most expensive: viewport/readability overflow found after 9/9 validation, and label/geometry constraints.
If this looks right, I'm happy to implement it against dev.
Source: tt-a1i/archify