Skip to content

Guide playground authors by the decision's goals rather than placement recipes - #4479

Merged
max-sixty merged 6 commits into
mainfrom
agent-ab6e38d5d08c79c76
Oct 31, 2026
Merged

max-sixty merged 6 commits into
mainfrom
agent-ab6e38d5d08c79c76

Conversation

@max-sixty

@max-sixty max-sixty commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

The playground's author guide now tells authors what the user is doing and what makes a tuning surface good, instead of where to put each control. On a shadow-scale task, authors given the new guidance build a tuning instrument where main's authors build a form of multiplier sliders.

A fresh agent following Leaf's instructions on that task produced a correct settings form: every setting a percentage of today's token, so the shadow layers being decided never appeared. Its report quoted the rules that drove that. "Write each item's controls inside lf-playground-preview beside that item" moved 6 of its 8 controls into the preview, and the copied-DOM rule steered it off hover-to-raise.

What changed

  • packages/playground/instructions/author.md opens with a new section, "What the user is doing": they settle something they will live with by changing it and watching. Four considerations follow: the thing being decided takes the space; controls show the values the build receives; a parameter with a shape (a curve, a layer stack) gets a drawn instrument, kept as a contributor slice; outcomes update beside the setting that produces them.
  • Three rules became considerations with their reasons:
    • control placement: within sight of what it changes, with an inspector when many settings would crowd the subject;
    • when to wire an interaction: where trying it tells the user more than seeing its states;
    • the copied-DOM rule: the real component stays required when its own behavior is compared.
  • The shared-state rules all stay, now with their reason. "One Pointer Events controller with pointer capture" is dropped: it came with the feature, not with a failure (e43bae13a).
  • skills/leaf/references/page-layout.md: Leaf's control classes give a native control its face, and a control drawn for the task is the page's own design, pointing at page-authoring.md's "Style the page", which main now carries.
  • Kept as contracts: rail versus preview placement and the submitted values (the registry states both), one selection surface, configuration kept apart from the inspection case, presets as whole designs, candidates aligned in rows, stable keys and ids. Each is backed by an eval or the registry.

Evals (Claude Code, base vs this branch; every counted run opened the changed file)

Case Runs per arm Base Branch
playground-tunes-what-ships (new): shipped values in view 4 1/4 4/4
playground-tunes-what-ships: cards lead the screen 4 0/4 2/4
playground-controls-stand-by-their-item 2 2/2 2/2
playground-case-is-independent 2 2/2 2/2
brief-document-needs-no-outline 2 2/2 2/2
playground-presets-are-whole-designs: judgment 4 3/4 2/4

The presets failures on both arms come from presets that don't set the format control, in a passage this branch doesn't touch. That case's rail check failed 8/8 on both arms because its rubric contradicted the guide; the rubric is fixed here, but no run has been graded with it yet. The remaining "cards lead" failures are card layouts clipped at 1120–1280px on both arms.

This overlaps #4478 in author.md, around the paragraph on the instruction's output. Whichever lands second merges the other.

max-sixty and others added 4 commits October 26, 2026 23:43
…d to it

The playground's author guide prescribed where each control goes, when an
interaction may be wired, and how shared state is stored, mostly without
saying what each rule protects. A fresh agent building a shadow-scale
playground followed "write each item's controls inside lf-playground-preview"
and moved 6 of its 8 controls into the preview, squeezing the cards it was
tuning, and dropped a hover-to-raise idea because the copied-DOM rule read
as a ban on any wired interaction.

The guide now opens with what a playground is for: the user settles
something they will live with by changing it and watching. It names what
follows from that, which a plain HTML author would not know to weigh: the
subject leads the space, controls speak in the values the build receives
rather than abstractions such as a percentage of today's value, a parameter
with a shape can get a drawn instrument through a contributor slice, and
consequences update beside the setting that produces them.

Left to the author now, with the considerations to weigh:

- Where a per-item control stands. The rail/preview placement contract is
  unchanged, and a setting or two per item still stands beside its item
  (playground-controls-stand-by-their-item), but many settings per item
  may go to an inspector that shows the selected item's settings.
- Which interactions to wire. A behavior comparison still mounts the real
  component; an interaction that only brings a candidate into the state
  being judged may be wired on a copy.
- How much of the submitted values to show while tuning: the exact values
  the build receives belong where the user tunes, not only behind the
  instruction popover.

The shared-state paragraph keeps every rule (stable keys, one decision per
item, display-independent order, ids and endpoints, model coordinates once,
a keyboard route, layoutChanged) and now says why: the submitted
configuration is what the agent builds from. The "one Pointer Events
controller with pointer capture" recipe, written ahead of any failure in
e43bae1, is dropped. The critique-a-document routing moves to the
opening. The sentence describing how Leaf itself moves the rail on narrow
layouts is cut, since no author acts on it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… author

page-authoring.md said twice, in "Composing a page" and "Read the
registry", to use Leaf's default styling and reserve page CSS for
task-specific arrangement. Read alone, both pull an author's own
instrument toward Leaf's generic look as well as keeping generic polish
off ordinary content.

The two passages are now one, in "Composing a page". It keeps the measured
behavior (brief-document-needs-no-outline: generic polish is clearer
content and hierarchy, not new cards or theme overrides) and says why: the
theme already finishes ordinary content in both colour schemes. It adds
what a page's own part needs, which is design for the judgment it serves
built from the theme's colour tokens and spacing steps, so it follows both
schemes. The Copy-control :has() contract and the diagnostics pointer move
with it.

page-layout.md's control-face paragraph now says what Leaf's classes are
for, a native control's face, and that a control drawn for the task is the
page's own design, so the playground-case-is-independent behavior (no
browser-default faces) holds without steering an instrument into a button.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…check

playground-tunes-what-ships replays the shadow-scale request that showed
Leaf's playground guide producing a settings form: relative multipliers
whose resulting layers the user never saw, and cards squeezed by controls.
It grades two things a user would notice: whether the values the build
receives are readable while tuning, and whether the cards being decided
lead the screen. On Claude Code, 4 runs per arm, the guide's new "What
the user is doing" section moved values-in-view from 1/4 to 4/4 and
subject-leads from 0/4 to 2/4.

playground-presets-are-whole-designs' rail check failed every run on both
arms, because the guide puts the selectable-candidates choice control in
the preview and the rubric failed any control there. The rubric now
exempts that control and still fails a marking control placed beside one
line or inside one candidate. Checked against the eight failing reasons
from 2026-10-27, each of which named only that control; not re-graded.
leaf-agent
leaf-agent previously approved these changes Oct 27, 2026
The rewrite added it beside main's card rule, but the maintainer wants Leaf
out of the way of a page's own design, and the leaf-out-of-the-way branch
adds guidance for restyling a page through the theme's tokens. The card
rule main had stays.
leaf-agent
leaf-agent previously approved these changes Oct 27, 2026
max-sixty added a commit that referenced this pull request Oct 27, 2026
…y candidate (#4482)

Records two leads from comparing Maggie Appleton's planning demos with
Leaf's playgrounds, without changing Leaf.

- `notes/comparisons.md` gains a section on GitHub Next's Chopin and her
talk [Planning with Agents](https://maggieappleton.com/planning-agents):
the closest product framing to Leaf's we've found, a shared plan
document with decisions recorded in place, and four hand-designed demos
that each give one decision its own instrument. It also records what our
same-task experiment showed: Leaf's standard path builds a settings
form, and Leaf's frame got in the way of a copied instrument, which
#4478 and #4479 address.
- `notes/dependency-candidates.md` is a new list of libraries worth
considering, starting with DialKit. A prototype measured its cost: 26 KB
gzipped, redundant DOM writes that a fork fixes, and regressions when it
draws Leaf's existing controls. It is recorded as a lead for its easing,
spring and XY-pad editors. Leaf doesn't take the dependency in this
change.
# Conflicts:
#	skills/leaf/references/page-authoring.md
@max-sixty
max-sixty merged commit 945fce2 into main Oct 31, 2026
4 checks passed
@max-sixty
max-sixty deleted the agent-ab6e38d5d08c79c76 branch October 31, 2026 21:45
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