OPERATOR

Check and Measure

Check written code

pnpm exec oprt check src

check reads every .tsx and .jsx file under the paths you give and reports where the code breaks the contract. It reads the source with a parser that ships inside oprt (Babel's, in TypeScript and JSX mode), so it needs no browser, no TypeScript in your project and nothing to install. Tests and stories are skipped.

src/screen.tsx:14:17  error  INVALID_PROP_VALUE  Button variant="success" is not an option. Use one of: primary, secondary, tertiary, danger, ghost. "success" is a Badge variant.
1 error, 0 warnings in 1 file. Status: evaluated_with_findings.

check needs nothing from the project. Your project can have no TypeScript, TypeScript 7 or any other version, and check works the same: it never loads your typescript package. .tsx files are read as TypeScript with JSX, .jsx files as JavaScript with JSX. oprt doctor says whether code checking is ready and which parser it reads with (@babel/parser, with its version); the result of every check names the parser too.

How much it read

A check that finds nothing is only a pass if it read everything. Every result says how much it read, in evaluation_status:

StatusMeaning
evaluated_cleanEvery file was read in full and nothing was found. The only status that is clean.
evaluated_with_findingsEvery file was read in full, and something was found.
partially_evaluatedSome of the code could not be read: a file with limits (below), or some files that did not parse. Findings may exist.
not_evaluatedFiles were found and none of them parsed. Nothing was checked against the contract.
no_files_evaluatedNo .tsx or .jsx file was read: a Markdown file, an empty folder, a test file. skipped_inputs says why.

A file that does not parse is never called clean. The parser's syntax errors are reported as SYNTAX_ERROR findings, each with the parser's message and reason code (JSX element 'Button' has no corresponding closing tag. (UnclosedJsxElement)), and the contract is not checked in that file, because what can be recovered from broken code is a guess.

Where a syntax error is reported:

  • A JSX element left open is named at its opening tag when the file ends inside it, or when a closing tag arrives for an element further out: the message says which element has no closing tag, not where the parser gave up. Some mistakes of this kind (a missing closing tag inside an expression in curly braces) are still reported where the parser noticed them.
  • Any other error is reported where the parser noticed it. After an error it cannot recover from, the parser stops, so a file with several independent syntax errors may list only the first; errors it can recover from are all listed (at most ten per file, with a count of the rest).
  • The parser also rejects what the language itself forbids and a compiler leaves to its type check, such as declaring the same name twice, a duplicate parameter or a with statement. A module with one of those does not load, so it is reported as a SYNTAX_ERROR too.

What the check cannot read is a limit, recorded with its place and never guessed at:

LimitMeaning
UNRESOLVED_SPREADProps are spread into an OPERATOR component (<Button {...options}>). Option values and required props that arrive through the spread were not checked.
UNRESOLVED_VALUEAn option is set from an expression, such as variant={pick()}. Its value is not in the source, so it was not compared with the allowed options.

The props written beside a spread are still checked, and a choice (tone ? "danger" : x) is read on the side that is a literal. Limits do not fail the run, but they are the places to look at by hand. The result also lists what the check covers (scope: syntax, the contract and the house rules) and what it leaves to other tools (types and rendering): run the project's own type check and build as well.

--json returns all of it: evaluation_status, coverage (files found, evaluated, partial and not evaluated), findings, limitations, skipped_inputs, scope and the parser that was used, inside the common envelope. The MCP check_code tool returns the same object as its structured result.

Findings

CodeSeverityMeaning
SYNTAX_ERRORerrorThe file does not parse. It was not checked against the contract.
INVALID_PROP_VALUEerrorAn option was given a value it does not take.
UNKNOWN_EXPORTerrorAn import names something @oprt/react does not export.
DOT_NOTATIONerrorCard.Header was written; parts are components of their own (CardHeader).
INVALID_NESTINGerrorA component is inside one it must never be inside.
INVALID_CHILDerrorA parent was given a child it does not take directly.
MISSING_REQUIRED_PROPerrorA required prop, or required children, is missing.
UNKNOWN_PROPwarningA prop that is neither the component's nor a native attribute.
NATIVE_CONTROLwarningA native button, input, select, textarea, table, dialog, progress or hr where the system has a component.
RAW_COLORwarningA color written out by hand in a class or a style.
ARBITRARY_SIZEwarningA pixel size written out by hand in a class or a style (p-[13px], gap: 12).
ROUNDED_CORNERwarningA rounded corner in a class or a style; the radius is 0 everywhere.

Codes are only ever added to. A code's meaning does not change.

A rule is in the check only if it can be right from one file's source. Where the source does not say (a spread, a computed option value) the check records a limit; a part whose parent is rendered in another file, or a component reached through your own wrapper, is outside what one file shows and is not followed. The house-rule warnings read class names, and the colors, pixel sizes and radii written out in a style object: a number is a size in pixels, as React reads it, except for a line height, which it reads as a multiple. A style value held in a variable or computed is not read. An anchor is never flagged, since it is how a Button becomes a link.

Exit codes

CodeWhen
0No errors in what was read. Warnings pass unless --strict is given. Limits are shown and do not fail the run.
1An error was found, a file did not parse, or no file was read at all (nothing was checked, which is not a pass). Also: the bundled parser cannot be loaded, which means a damaged install.
2A usage mistake, or a path that does not exist.

The dev-time errors remain: they catch a bad option value while the app runs. check covers more, and reaches an agent that never sees a browser console.

Measure an agent

Whether an agent builds correctly with OPERATOR is a thing to measure. The repository holds a set of screens to ask for (tests/agents/tasks.json: eighteen briefs, from a status dashboard and an incident form to a table of 5,000 work orders and a dense shift handover) and a harness that scores what comes back.

pnpm build
node scripts/agent-eval.mjs prepare --out /tmp/eval/with --repeat 3
node scripts/agent-eval.mjs prepare --out /tmp/eval/bare --repeat 3 --bare
# point an agent at each folder: it reads TASK.md and writes result.tsx
node scripts/agent-eval.mjs score --dir /tmp/eval/with
node scripts/agent-eval.mjs score --dir /tmp/eval/bare
node scripts/agent-eval.mjs report --ledger ledger.json

prepare lays out a project folder per brief. The published packages are installed as copies in a store beside the folders, so an agent can read them the way it would in a real project and nothing links back into this repository. Both conditions install what the installation page installs. The folder holds the brief and, unless --bare is passed, the AGENTS.md block and the oprt command. That is the whole difference between the two conditions: without the setup there is no installer and no @oprt/manifest, so nothing an agent can read holds the guidance or the house rules. --repeat <n> lays out each round in a folder of its own, and --sample <n> takes the first n briefs.

score judges each result twice and reports:

  • contract errors, by code, from check;
  • compiler errors, from TypeScript against the published types. This judge is not ours, so it does not share the contract's mistakes;
  • escape hatches: native controls written where the system has a component;
  • components used, and which of the purpose-built components the brief calls for were chosen or missed;
  • pass: no contract error, no compiler error, no escape hatch, and at least one OPERATOR component on screen. Code that never touches the system has no contract errors either, which is why that last condition is there.

report reads a ledger of runs (each one's folder, condition and round, and the tokens, tool calls and time the agent used) and gives every figure per condition: in all, round by round, and as the range over the rounds. It counts house-rule warnings too.

A brief says what the screen must do and never which component to use. Choosing is the test.

Scores say whether the code follows the contract and compiles. They do not say whether the screen is a good one: that still takes a person, or a browser.

The run of 11 November 2026

Eighteen briefs: October's twelve, and six on what the installed package alone does not make easy (what goes inside a toolbar, a form in a dialog, option values that collide, the house rules, a screen a recipe already provides, a dense screen). Two Claude models wrote every screen in three rounds, with the setup and without it: 216 screens. The figures, and the rule for when the setup counts as making a difference, were written down before any agent ran: every round with the setup has to beat every round without it.

MeasureWith the setupWithout itA difference?
Screens that pass108 of 108106 of 108No
Made-up parts00No
Right component chosen314 of 318306 of 318No
Screens that break a house rule06Yes
Tokens per screen92,79698,547Yes, 6% fewer
Tool calls per screen8.110.0Yes, 19% fewer
Seconds per screen4148No
  • Agents build correct screens with the system, with the setup or without it. 214 of 216 pass. The two that fail were both without the setup: a confirmation placed in a card's footer, and native radio buttons.
  • The setup keeps the house rules. No screen with it broke one. Without it, six did, two in every round, all where the system has no part for the thing drawn: a map placeholder with rounded corners and sizes in pixels, and native radio buttons.
  • It makes the work cheaper. 6% fewer tokens and 19% fewer tool calls per screen, in every round, mostly for one of the two models.
  • By the rule, it did not change choosing. The largest gap was the screen a recipe already provides: with the setup, agents looked at the recipe and chose its detail panel in 5 runs of 6; without it, in none.

Found after the run, so not one of its figures: when the run was scored, check read a size written in pixels only in a class name. Without the setup, 25 screens wrote pixel sizes by hand in inline styles, which it did not see. No screen with the setup did. check now reports those too, as ARBITRARY_SIZE.

Compared with 10 November. The two runs are not directly comparable. In November the condition without the setup still installed @oprt/manifest, which holds the guidance, and each brief ran once. The two misses that November's guidance fix was about did not come back: settings pages chose FormSection, and incident forms the Toggle, in 12 of 12 runs each.

Three rounds per brief and model, two models from one maker, twelve agents at a time, and no judgment of how the screens look. The added briefs were written by someone who knows the guidance, and some of their words echo it. The screens, the scoring, the prompt and the limits are in docs/verification/2026-11-11-agent-measurement in the repository; November's run is in docs/verification/2026-11-10-agent-measurement, and October's in docs/verification/2026-10-13-agent-measurement.