<!--
  Generated from docs/ — do not edit here; run `pnpm regen`.
  Canonical: https://cascivo.com/docs/design-eval.md
  registry v1.12.1 · generated 2026-12-03
-->

# `@cascivo/design` eval: does the loop help?

Second run, 2026-12-02. Six briefs, two arms, **three runs per cell** (36 pages), all built by the
same model (Claude Sonnet subagents) as static HTML on the same stylesheet (cascivo tokens, light
theme, `cv-*` classes). The first run (one page per cell, direction step off) is at the end.

- **Arm A:** a frontend-design style prompt ("distinctive, production-grade, clear aesthetic point
  of view"), no tools. If `design check` found errors, the findings were handed back, at most 3 times.
- **Arm B:** the [`cascivo-design`](https://github.com/cascivo/cascivo/blob/main/skills/cascivo-design/SKILL.md) skill as it is now: choose a
  direction from the built-in guide and record it with `design init` flags, `design plan`, build,
  `design check` loop (at most 3 rounds), one rubric critique.

Both arms are scored by the same `design check`, which now counts a page's own declared tokens
(`:root` custom properties, `DESIGN.md` front matter) as on-scale. Arm A has no `DESIGN.md`; its
`:root` properties count.

Harness and how to run it again: [`scripts/design/eval`](https://github.com/cascivo/cascivo/blob/main/scripts/design/eval/README.md). Raw
rows: [`results/2026-12-02-run2.json`](https://github.com/cascivo/cascivo/blob/main/scripts/design/eval/results/2026-12-02-run2.json).

## Scores

Cells are `mean ± sample sd (min-max)` over three runs; the last row pools all 18 pages of an arm.
`first try` is the page before any check. `rounds` is the mean number of fix rounds until zero
errors (a page that never got there counts as 4). Tokens are whole subagent sessions, fix rounds
included.

| Brief         | n     | A first try         | A final              | A rounds    | A tokens | A KB | B first try         | B final               | B rounds | B tokens | B KB |
| ------------- | ----- | ------------------- | -------------------- | ----------- | -------- | ---- | ------------------- | --------------------- | -------- | -------- | ---- |
| landing       | 3+3   | 78.3 ± 0.6 (78-79)  | 78.3 ± 0.6 (78-79)   | 0.00        | 76k      | 12.9 | 96.0 ± 4.4 (91-99)  | 100.0 ± 0.0 (100-100) | 0.00     | 86k      | 7.5  |
| pricing       | 3+3   | 60.0 ± 11.1 (48-70) | 91.3 ± 10.3 (80-100) | 1.33        | 184k     | 20.8 | 91.3 ± 9.3 (81-99)  | 100.0 ± 0.0 (100-100) | 0.33     | 90k      | 11.0 |
| dashboard     | 3+3   | 73.7 ± 9.0 (68-84)  | 95.3 ± 4.5 (91-100)  | 1.00        | 152k     | 16.2 | 89.0 ± 8.7 (84-99)  | 100.0 ± 0.0 (100-100) | 1.33     | 90k      | 11.6 |
| settings      | 3+3   | 86.3 ± 4.0 (84-91)  | 86.3 ± 4.0 (84-91)   | 0.00        | 76k      | 14.2 | 95.3 ± 3.1 (92-98)  | 100.0 ± 0.0 (100-100) | 0.00     | 86k      | 9.7  |
| list-detail   | 3+3   | 74.0 ± 4.6 (69-78)  | 94.3 ± 8.1 (85-100)  | 3.00 (1 >3) | 271k     | 17.1 | 95.7 ± 2.5 (93-98)  | 100.0 ± 0.0 (100-100) | 0.00     | 87k      | 11.0 |
| signup-wizard | 3+3   | 90.7 ± 2.9 (89-94)  | 94.0 ± 5.0 (89-99)   | 0.33        | 102k     | 16.6 | 97.3 ± 3.1 (94-100) | 100.0 ± 0.0 (100-100) | 0.33     | 85k      | 9.5  |
| **all**       | 18+18 | 77.2 ± 11.5 (48-94) | 89.9 ± 8.1 (78-100)  | 0.94 (1 >3) | 143k     | 16.3 | 94.1 ± 5.8 (81-100) | 100.0 ± 0.0 (100-100) | 0.33     | 87k      | 10.1 |

- **Final score:** B 100.0 ± 0.0, A 89.9 ± 8.1. Every B page ended at 100; A ranged from 78 to 100.
- **First try:** B 94.1 ± 5.8, A 77.2 ± 11.5. The gap is larger than either spread.
- **Errors on the first try:** A in 10 of 18 pages, B in 4 of 18. One A page (list-detail, run 2)
  still had an error after 3 rounds. The first run called this metric a tie; with three runs it is not.
- **Tokens:** B 87k ± 3k, A 143k ± 76k. A is cheaper when its first page is clean (76k) and far
  dearer when it needs fix rounds (list-detail: 271k). B's cost is nearly constant.
- **Page size:** B 10.1 KB, A 16.3 KB. B's pages grew from 8.3 KB in the first run: the direction
  adds CSS.
- **A's fix rounds also raise its score**, because the findings handed back include warnings. Where
  A had no errors (landing, settings) nobody told it anything and it stayed at 78 and 86.

## Looks: a blind pairwise judgment

For each brief and run, the final A page and the final B page were captured with `design see`
(full page, scaled down) and shown unlabelled, left and right assigned by a hash of the cell
name. A separate Sonnet subagent per brief judged its three pairs on five criteria of
**distinctiveness** (point of view, type, colour, signature element, composition; rubric in
[`prompts/judge.md`](https://github.com/cascivo/cascivo/blob/main/scripts/design/eval/prompts/judge.md)). The pair goes to the side with more
criteria. The judge saw no code, no scores and no key.

| Brief         | A wins | B wins | Ties |
| ------------- | ------ | ------ | ---- |
| landing       | 3      | 0      | 0    |
| pricing       | 2      | 1      | 0    |
| dashboard     | 2      | 1      | 0    |
| settings      | 1      | 2      | 0    |
| list-detail   | 1      | 2      | 0    |
| signup-wizard | 2      | 1      | 0    |
| **all**       | 11     | 7      | 0    |

**A wins on looks, 11 to 7, no ties.** B does not match the baseline on distinctiveness.

Per criterion (18 pairs each):

| Criterion     | A   | B   | Tie |
| ------------- | --- | --- | --- |
| Point of view | 11  | 7   | 0   |
| Type          | 9   | 8   | 1   |
| Colour        | 4   | 13  | 1   |
| Signature     | 11  | 3   | 4   |
| Composition   | 14  | 0   | 4   |

- **What the direction step fixed:** colour and type. In the first run B was "a correct, plain,
  black-on-white page". Now B takes colour 13 to 4 and is level on type.
- **What it did not fix:** composition (0 of 18) and the signature element (3 of 18). The judge's
  words for B, again and again: "stock stacked layout", "stock centred card". The plan fixes the
  slot order, and B follows it literally. A breaks the template (split heroes, offset cards,
  annotated charts).
- **B's pages look like each other.** 13 of 18 B pages chose a rust accent on cream with a serif
  display face: the worked example in the skill's direction guide. A direction copied from an
  example is not a direction. A's 18 pages vary far more.
- **Where B wins** (settings, list-detail): app screens where A stayed with default sans and blue.

## Limits

- Three runs per cell, one model, one day. The sd is over three values: read it as a rough spread.
- **B is graded by the tool it used.** B optimised for `design check` and was then scored by it. The
  score measures mobile, a11y, contrast, token and hierarchy soundness, not design quality. That
  is why the look judgment is reported beside it, and why they disagree.
- **The judge is a model, not a person**, and one judge saw all three pairs of a brief, so the three
  verdicts of a brief are not independent. No human rating.
- **Possible position bias:** the left page won 12 of 18. A was on the left in 11 pairs and won 8 of
  those; on the right in 7 and won 3. A's lead may be smaller than 11 to 7; with 18 pairs the
  result does not separate from a coin (two-sided sign test p is about 0.48).
- The screenshots are scaled-down full pages. Small type and fine detail are hard to see.
- Static pages only. No React app, no real data, no interaction.
- B did its own critique (a subagent cannot start a subagent in this harness); the skill asks for
  a separate one. B's first-try snapshot is saved by the builder; the harness cannot prove the order.

## What to take from it

- Use the loop for soundness. It ends at 100 every time, at a steady cost, and it has fewer
  first-try errors than a design prompt alone.
- The direction step is worth having: it closed the colour and type gap and cost about 4k tokens.
- It does not make B the more distinctive page. Next to try, unmeasured: take the worked example
  out of the guide (or rotate several), let the direction change the plan's layout and not only its
  tokens, and have the critique ask "what would a visitor remember?".
- `design check` cannot see any of this. A score of 100 says the page is sound, not that it is good.

## Small check after the composition change (3 briefs, 1 run)

Same day, after three changes to arm B: the worked example is gone from the direction guide
(principles and seven contrasting one-line directions instead), `plan` output says its slots fix
content order and not layout, and the direction step asks for one composition move, recorded in
`DESIGN.md` with `init --composition`. Three briefs (landing, pricing, dashboard), one page per
arm, same model, same judge prompt. Raw rows:
[`results/2026-12-02-run3.json`](https://github.com/cascivo/cascivo/blob/main/scripts/design/eval/results/2026-12-02-run3.json).

**Not the comparison that was planned.** The arm A pages of the run above were not kept, so arm A
was built again with the unchanged prompt. Both arms are new pages; only arm B's instructions changed.

| Brief     | A first try | A final | A rounds | A tokens | B first try | B final | B rounds | B tokens |
| --------- | ----------- | ------- | -------- | -------- | ----------- | ------- | -------- | -------- |
| landing   | 81          | 81      | 0        | 76k      | 99          | 100     | 0        | 90k      |
| pricing   | 73          | 96      | 1        | 158k     | 96          | 100     | 0        | 91k      |
| dashboard | 76          | 99      | 1        | 151k     | 98          | 100     | 0        | 98k      |
| **mean**  | 76.7        | 92.0    | 0.67     | 128k     | 97.7        | 100.0   | 0        | 93k      |

Arm A's pricing page was clean after round 1, got a new error in round 2 and was clean again
after round 3 (scores 73, 94, 88, 96). The harness looks at the page after every round asked for.

Blind looks, one pair per brief:

| Brief     | Winner   | Point of view | Type     | Colour   | Signature       | Composition |
| --------- | -------- | ------------- | -------- | -------- | --------------- | ----------- |
| landing   | A        | A             | A        | A        | A               | A           |
| pricing   | B        | B             | B        | B        | tie             | B           |
| dashboard | B        | B             | B        | B        | B               | B           |
| **all**   | A 1, B 2 | A 1, B 2      | A 1, B 2 | A 1, B 2 | A 1, B 1, tie 1 | A 1, B 2    |

- **Composition moved.** B took it in 2 of 3 pairs; in the run above it took 0 of 18. The judge
  named the move each time: "an oversized green Team price and an uneven plan layout", "an oversized
  hero revenue figure beside smaller tiles". B's three recorded moves: asymmetry 5:2 (landing), scale
  contrast (pricing, dashboard).
- **Where B still lost:** the landing page. The judge called it "a restrained teal page with small
  headings ... and an even list layout": the move was written in `DESIGN.md` and built too weakly
  to be seen in a scaled-down screenshot.
- **The copied look is weaker, not gone.** No page used the old example's values, and the subjects
  show (a tide-table rule, a packing-slip edge). But all three B pages chose a serif or slab display
  face on tinted paper, and two of three chose an orange-red accent (hue 35). The pricing page took
  "ledger", a word the guide still uses as a reference. Fewer defaults, still a house style.
- **Three pairs prove nothing.** Two wins of three is what a coin gives half the time. One model, one
  judge, one day, and the judge saw both arms rebuilt. This says the change did not make B worse and
  points the right way; it needs the full 6 x 3 run to be a result.

## First run (one page per cell, direction step off)

Kept for comparison. Scored by the older `check`, which counted a custom palette against the page.

| Brief         | A first try | A rounds | A final | A tokens | A KB | B first try | B rounds | B final  | B tokens | B KB |
| ------------- | ----------- | -------- | ------- | -------- | ---- | ----------- | -------- | -------- | -------- | ---- |
| landing       | 81 (0e)     | 0        | 81 (0e) | 78k      | 15.2 | 85 (1e)     | 1        | 100 (0e) | 80k      | 6.2  |
| pricing       | 68 (1e)     | 1        | 89 (0e) | 159k     | 17.7 | 98 (0e)     | 0        | 100 (0e) | 85k      | 9.7  |
| dashboard     | 72 (0e)     | 0        | 72 (0e) | 79k      | 17.7 | 100 (0e)    | 0        | 100 (0e) | 84k      | 8.5  |
| settings      | 78 (0e)     | 0        | 78 (0e) | 77k      | 14.3 | 100 (0e)    | 0        | 99 (0e)  | 83k      | 7.0  |
| list-detail   | 96 (0e)     | 0        | 96 (0e) | 80k      | 20.3 | 98 (0e)     | 0        | 100 (0e) | 81k      | 9.2  |
| signup-wizard | 92 (0e)     | 0        | 92 (0e) | 82k      | 24.3 | 100 (0e)    | 0        | 100 (0e) | 83k      | 9.1  |
| **mean**      | 81.2        | 0.17     | 84.7    | 93k      | 18.3 | 96.8        | 0.17     | 99.8     | 83k      | 8.3  |

No look judgment was made in that run; one landing pair was looked at by hand and A was the
more distinctive page.
