Skip to content

Add the arrangement eval harness and record its first run's follow-ups - #1172

Merged
max-sixty merged 15 commits into
mainfrom
arrangement-comparison
Sep 25, 2026
Merged

max-sixty merged 15 commits into
mainfrom
arrangement-comparison

Conversation

@max-sixty

@max-sixty max-sixty commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

Adds the arrangement eval harness under notes/arrangement-eval/, and records its first run's follow-ups under #19 in notes/workspace-followups.md.

The eval asks whether Leaf's arrangement vocabulary (lf-grid, lf-workspace/lf-pane, data-width, and the layout idioms) makes an agent's pages better than laying them out in its own CSS. Fresh claude -p authors write a document, a dashboard and a queue in two arms built from one ref, then revise each page for a standing 900px preference. A blind judge compares screenshots at three widths, once with each arm as page A.

  • harness.py: a single uv script with a click CLI (arms, run, score, shoot, review [--flip], summarize). Its docstring holds the design: the layout on disk, how each child is isolated, and how the review is blinded.
  • A run's phase counts only when every trace through it finished without error and loaded no memory (Run.usable). Scoring, review scheduling and the pair tally all apply that test. Phase 1's page directory is saved whole when phase 1 ends, so the phase-1 render never picks up the revision's assets.
  • plain_arm.py builds the plain arm from a payload. It now works on main's guide as rewritten by Drop the three page forms; stack lf-grid templates at their own width #1171, and arms HEAD builds and passes its smoke page.
  • README.md describes the harness only. A "State of the harness" section says the harness is early and lists what the first run left undone, and a session that runs it improves it in the same change.
  • The first run's results are left out of the tree. Their full write-up is the README at 5e7fc3acf. Give the walk somewhere to travel before reading the fold #19 carries the headline: on Drop the three page forms; stack lf-grid templates at their own width #1171's layout the plain pages won 11 pairs, the leaf pages 4, and 3 split; the vocabulary cut page CSS about fourfold but not turns. Give the walk somewhere to travel before reading the fold #19 also lists the defects each run exposed, one line each.
  • The layout TODO on testing recipes with agents now points at the harness.

🤖 Generated with Claude Code

max-sixty and others added 13 commits September 24, 2026 22:54
Fresh agents write the same three subjects (a review, a rollout dashboard, a queue
beside its detail) once with Leaf's arrangement vocabulary and once with page CSS
and the theme's published sizes, then revise each for a standing 900px preference.
The scorer reads each trace and page, re-runs version check --render, and a blind
reviewer compares screenshots at three widths.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A child launched from inside this checkout loaded the repository's shared auto-memory,
and in the first full run children saved the test's standing preference there as a
fact about the user. Children now run from a scratch cwd with auto-memory disabled,
the reviewer does the same, and the scorer flags any trace whose init carries memory
paths.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…t eval

The reviewer runs a second time with every pair's sides swapped, so its picks can be
checked against position. summarize.py tabulates a batch's scores and reviews. The
plain arm's guide also states that Leaf's chrome never moves the page, as the
arrangement guide does.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…test it

#45 renamed --sheet-max to --wide-page-max, which left the plain guide's width hook
pointing at an undefined property. The guide now names whichever the theme defines,
and make_arms.sh renders a page using the hook before any run starts.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…tial pass

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The reviewer read screenshots by paths that named the arm; it now reads neutral copies
from a scratch directory it alone can open, a judgment that skips a screenshot is
discarded, and the layout-only verdict, which matched the overall one in 70 of 72
judgments, is gone. summarize.py reports pair outcomes: a pair counts for an arm only
when both review passes pick it. Each run gets its own TMPDIR, the payloads are
read-only, the plain arm drops the removed elements' widget modules, phone captures run
to sixteen screens, and the check counter no longer counts --help.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The first review read screenshots by paths naming the arm. The blind re-review counts a
pair for an arm only when both passes pick it: main 1 pair to 14 for the plain arm, #45
4 to 11, with the preference met in every #45 judgment. The results now carry phase-two
cost, correct the claims the data contradicted, and state the isolation limits.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
harness.py replaces make_arms.sh, run.sh, batch.sh, score.py, shoot.py,
review.py and summarize.py with subcommands (arms, run, score, shoot,
review, summarize) over one Run/Batch model, one isolated `claude -p`
launcher shared by authors and the reviewer, one stream-json reader and
one PREFERENCE constant. Each run records the arms it used, so later
stages stop parsing the payload path out of the prompt. plain_arm.py is
now a module exposing build(). Score, summarize, review and shoot
reproduce the old scripts' output on both recorded batches.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The README now describes the harness only, with a section on its state:
early, and improved by each session that runs it. The first run's
results leave it (git history keeps them at 5e7fc3a); their follow-ups
are recorded under #19 in notes/workspace-followups.md.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
#1171 rewrote "Composing a page" and added "The rail and the margin",
so the plain arm's anchors no longer matched and `arms` stopped on main.
The plain arm now replaces both sections, and drops the --sheet-max
fallback for refs before the rename, whose anchors fail anyway. The
backlog's #19 names #1171 rather than the session's Ask numbers, and the
layout TODO points at the harness.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The phase-one page is reconstructed from the final page directory. author() saves only index.html after phase one; Run.page(1) later copies page/ after phase two and swaps that HTML back in. If the revision changes a linked page/*.css or page/*.js file, data source, or other page asset, the phase-one render and screenshot use the revised bytes. That makes the before/after comparison describe a page the first author never produced. Capture the complete page directory when phase one ends and score and serve that snapshot.

The blind tally admits runs that the score table rejects. review() schedules a pair whenever screenshots exist, without checking either author's trace; summarize() then counts those verdicts even if a run's is_error is true or it loaded memory. A child can write a page and then fail, so this changes the reported winner while its cost and turns disappear from the adjacent table. Apply one run-validity decision to both scoring and pair selection, and require a completed result rather than treating a missing is_error as success.

The phase-1 page was rebuilt from the final directory with phase 1's
index.html swapped in, so a revision to page/*.css, page/*.js or data
leaked into the phase-1 render. author() now copies the whole directory
when phase 1 ends.

review scheduled any pair with screenshots, while summarize dropped
errored and memory-loading runs only from the score tables, and a trace
with no result counted as success. Run.usable is now the one test: every
trace through the phase reached a result with is_error false and loaded
no memory. score records it, and review and summarize both apply it.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new validity rule still does not govern the pair tally. review skips invalid runs but leaves saved verdicts in reviews/ and reviews-flip/; summarize filters score rows, then tallies every saved verdict. I reproduced a batch with two usable: false score rows and old verdicts: the score table had no rows while the tally reported a leaf win. Filter tally keys to pairs with usable rows for both arms so a rerun cannot resurrect discarded results.

Comment thread notes/arrangement-eval/harness.py Resolved
review skips a run that stopped counting, but a verdict it saved earlier
stayed on disk and summarize tallied it. The tally now takes a pair only
when both arms' rows are usable, as the score tables do.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit e333a86 into main Sep 25, 2026
5 checks passed
@max-sixty
max-sixty deleted the arrangement-comparison branch September 25, 2026 17:45
max-sixty added a commit that referenced this pull request Sep 25, 2026
…im edges through bare wrappers (#1178)

Three layout defects the blind arrangement comparison (#1172) found on
Leaf pages, after #1171 made the page one kind.

**A grid takes the column's width in a column page.** `lf-grid` no
longer declares `x-space: "wide"`, so in a column page it lines up with
the prose, as a paragraph does; `data-width="wide"` or `"available"`
asks for more, as on a figure. On a wide page nothing changes. Tiles and
figures running past the prose's right edge was the defect the judge
named most on Leaf documents (7 of 12 judgments). At 720px a counted
grid of plain cells fits three 224px tracks, so `columns="4"` of
sections lays out three and one; a row of `lf-metric` tiles keeps four
on the metric row's 9rem floor; `1fr 2fr` (stacks below 43.5rem = 696px)
stays side by side. The registry entry and `page-authoring.md`
"Composing a page" say so; the feature gallery's three charts take
`data-width="wide"`.

**A stacked workspace scrolls instead of splitting the window.** A root
workspace holds the window from 720px, but its template grid stacks at
its own width (`1fr 2.4fr` below ~786px). Between the two, the stacked
panes shared the window height: at 820px the queue showed two tickets
and the detail pane was cut off at its first fields. A stacked `lf-grid`
now passes no held height on (`--lf-passes-hold: 0`), so its panes take
their natural height and the page scrolls, as the workspace entry
already promised.

**A frame trims the edge margin through bare wrappers.** A frame trimmed
its first and last child's margin, but a bare wrapper there (a section
with no inset) passed its own first child's margin to the frame's edge,
so a detail pane that wrapped each ticket in a section opened on a 48px
empty band. The trim now follows the edge down through registered,
non-inherited `--lf-edge-start` / `--lf-edge-end`. This replaces #1173's
`lf-ask`-specific rule with the general one. Across the corpus 59
elements lose an edge margin, among them an Ask's options at the foot of
a page (14px) and a first heading inside a wrapper at a frame's top.

`notes/workspace-followups.md` drops the three findings from #19's
follow-ups; the rail findings stay. The catalog stills are refreshed.

Tests: `uv run pytest tests` and `npm run test:runtime` pass; pre-commit
clean. Tests that measured a grid wider than the column now declare the
width; the stacked-workspace and edge-trim cases have their own tests,
and #1173's Ask tests pass on the general rule.

> _This was written by Claude Code on behalf of max-sixty_

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Sep 26, 2026
…record the arrangement eval's follow-ups (#1195)

Follow-ups from the arrangement eval (#1172), picked on the review page.

- **Log order.** Every Leaf author in the eval put the request's
newest-first log in an `lf-grid` tile, bounded it with
`data-bound="end"`, and reversed it to match, because the Bounds
paragraph offered `end` for a log and said it keeps the log on its
newest line. The judge cited the reversal in 8 of 12 dashboard
judgments. The paragraph in `page-authoring.md` now has the author
choose the order for the reader and bound that order (`end` for a list
growing downward, `start` for newest first), and `lf-chronology`'s entry
says it shows entries as written.
- **Preferences.** `AGENTS.md` listed preferences "stated once and
honoured on every page" among what Leaf gives the user, but nothing in
Leaf holds one. The promise goes, and `SKILL.md` tells the author to
save a standing preference in the host's memory.
- **Widths.** `TODO.md` gains an item beside the mobile ones. The render
check already renders at 1200px and 540px and sweeps sideways overflow
from 360px to 1200px, but nothing measures the eval's other width
failures, labels drawn below legibility and an Ask below its pane's
first screen; #19 adds those at 1200px first, and the TODO takes them
across widths after.
- **Backlog.** #19 in `notes/workspace-followups.md` records why the
authors reversed the log and drops the items this and the sibling PRs
settle.

> _This was written by Claude Code on behalf of max-sixty_

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants