# Human review → revision loop

The system is: **LLM designs rings → human inspects on the web (2D + 3D) → comments
→ LLM revises → re-judge → repeat.** Every change is committed to GitHub.

## Surfaces

| URL | What |
|---|---|
| `/viewer/review.html` | Review UI: reference vs build, per-axis fails, judge diffs, **Inspect in 3D** (embedded PBR viewer on the STEP's GLB sidecar), comment box, Approve |
| `/viewer/eval.html` | Judge dashboard (score history per round) |
| `/viewer/index.html?model=…` | Standalone 3D viewer |

Server: `.cad-venv/bin/python harness/serve.py` (port 8770).

## Comment protocol (`artifacts/review/comments.json`)

- The UI POSTs `/api/comment` → `{id, design, text, kind: revision|approval, status: open}`.
- The improvement loop (cron, ~20 min) on each pass:
  1. Reads `comments.json`; for every `status: open` + `kind: revision` comment,
     edits `designs/<design>.py` specs (via ringcli) to apply it.
  2. Rebuilds + re-judges (`BENCH_FILE=eval/rounds/<round>.json harness/author.py <n>`).
  3. POSTs `/api/resolve {id, note}` (or edits the file directly) with a one-line
     summary of what changed.
  4. Commits + pushes. `kind: approval` freezes a design — don't change it unless
     a later revision comment asks to.
- Also each pass: one system improvement (parts kit, eval, UI — anything), evaluated.

## Files

- `ringcli/parts.py` — validated parts kit (band, faceted gems, claws, bezel,
  halo, pavé, side stones). Designs are ~20-line assemblies.
- `harness/newround.py` — random benchmark generator (web-searched references).
- `harness/author.py` — build + snapshot + 3-vote judge + dashboard + commit.
