Repository navigation
Guide playground authors by the decision's goals rather than placement recipes - #4479
Merged
Merged
Conversation
…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
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
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
leaf-agent
approved these changes
Oct 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-previewbeside 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.mdopens 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.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 atpage-authoring.md's "Style the page", which main now carries.Evals (Claude Code, base vs this branch; every counted run opened the changed file)
playground-tunes-what-ships(new): shipped values in viewplayground-tunes-what-ships: cards lead the screenplayground-controls-stand-by-their-itemplayground-case-is-independentbrief-document-needs-no-outlineplayground-presets-are-whole-designs: judgmentThe 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.