Harness / v1.0.0

Eight ways
to disagree.

The skill is a procedure. The harness is the part that can say no. It renders the page in headless Chrome, measures the frame, audits the scene graph, drives the loop, inspects the shell and returns one verdict.

0 npm dependenciesNode 22+ · Python · Chrome8 gates · 1 command

01The loop

See. Measure.
Change one thing.

The harness exists because an agent that cannot see its own output cannot art-direct. The renderer gives it eyes; the metrics give it a direction; the gates stop it from lying to itself.

01 / RENDER

Deterministic frame.

Headless Chrome, a fixed camera, a fixed seed and a fixed viewport. A small CDP client with no npm dependency. The page sets __READY after a few frames.

render.mjs

02 / MEASURE

Multi-scale numbers.

Exposure, clipping, palette, edge density, colourfulness, band energy at fine/mid/coarse scales and spatial p10 over an 8×5 grid. Global means hide flat regions.

image-stats.py · score.py

03 / DIAGNOSE

Three ranked fixes.

The lowest ratio is mapped to a specific change. One row, one change. The model does not have to decide what “looks worse” means.

diagnose.py

04 / VERIFY

Gates, not opinions.

Shaders, census, collision, lights, playtest, product, mobile and look. The look gate is last because a beautiful frame does not rescue a missing game.

verify.mjs
the loop / one round
render the fixed cameras
score each; keep the worst
diagnose the worst; take the top item
change only that item
re-render; keep it only if the worst camera improved
run every gate; revert on any regression

stop at the budget or two rounds without a gain

02The instruments

Small tools.
One verdict.

Each tool does one job and prints something a model can act on. The acceptance command composes them; you can also run any of them alone.

ToolWhat it doesOutput
render.mjsserve the page, launch headless Chrome, wait for __READY, screenshot, collect console errors and page statsPNG + JSON
image-stats.pyexposure, clipping, midtones, palette, edge density, multi-scale band energy, spatial tilesJSON
score.pyratio a frame against a profile; add binary tone checksENERGY + tone
calibrate.pymedian a profile from 2–3 target framesrefs/profile.json
diagnose.pyrank the three lowest metrics and map each to a fixranked list
objectbox.pymeasure a crop: block detail, specular peaks, contact proxyper-box rows
census.mjsenumerate every rendered instance; check segments, maps, identityPASS / failures
collide.mjscollider parity, penetration, bounds, bare edges, walk-throughPASS / lists
lightaudit.mjsevery light has a fixture within 0.4 mPASS / distances
playtest.mjsdrive selftest or a declarative plan: win, loss, cause, restartPASS / report
product.mjsshell, settings, save, touch, content breadth, HUD, audio, budgets, camerasPASS / findings
mobile.mjs390×844 layout, overflow, title reachability, touchPASS / findings
verify.mjsrun all eight, print one verdict, exit non-zero on failurePASS/FAIL
qa.mjsfixed-camera table from __PRODUCT.camerastable + JSON
structcheck.mjsduplicate top-level symbols and repeated blocksreport

03Measured

Black Ice,
eight green.

The stock harness on the shipped build, with no project profile: 8/8 in about 66 seconds. The look gate ran in fallback mode and said so.

shadersNo compile/link errorPASS
census167 meshes, 0 failuresPASS
collide102 colliders, 0 penetrations, 0 walk-throughPASS
lights12 lights, all anchoredPASS
playtest3/3 progress, named cause, restartPASS
productShell, content, save, touch, budgetsPASS
mobile390×844, touch, no overflowPASS
lookTone + emptiness fallbackPASS
terminal / black ice
$ node harness/verify.mjs \
    --dir ../black-ice --page index.html

  shaders   PASS
  census    PASS
  collide   PASS
  lights    PASS
  playtest  PASS
  product   PASS
  mobile    PASS
  look      PASS

look mode: FALLBACK
VERDICT: PASS (8/8)

real 65.76s

Measured 2026-11-14. The project's own gate reports 163 draw calls, 127k triangles and 12 lights on the title frame; the numbers move during play.

04Design rules

A gate that cannot fail
is not a gate.

The harness is intentionally small, and intentionally harsh. These are the rules that keep it honest.

01

No project facts in the gate.

No coordinates, mesh names, counters or item ids. Those live in the page's __TEST plan or selftest. A gate with a hard-coded coordinate only works on the run that produced it.

portability

02

The gate wins over the model.

If the gate disagrees with the model's opinion, the gate wins. If the gate is wrong, fix it with a counter-example, never bypass it. A bypass is a future silent regression.

rule governance

03

Failures are ordered by class.

Behaviour before craft before visual before polish. A collision bug invalidates a beautiful frame; a missing settings screen invalidates a high look score. The order is the priority.

failure class

04

The look gate is a compass.

It measures similarity to one reference, not finished-ness. A stylized game can score low by construction. Report the worst camera, the tone checks and the mode; never let the score outrank the product gate.

calibration

05What it does not do

No engine.
No taste.
No promises.

The harness is a measuring instrument, not a creator. It will not make a bad subject good, choose an art direction, or replace the human eye at the end.

NOT AN ENGINE

It drives your page.

There is no scene format, no renderer and no asset pipeline. The page is the deliverable; the harness only inspects it. Engine builds can be adapted through the same contract.

NOT A TASTE MODEL

The eye veto still exists.

A noise layer can raise a metric and look like television static. If a change raises the number and looks worse, the number is wrong. A human or a visual check can veto a frame.

NOT A GUARANTEE

Green means the floor held.

The gates check what they can see. They do not prove the game is fun, the writing is good, or the art direction is worth the effort. They prove the floor did not collapse.