Repository navigation
Make drawing the default way a Leaf page shows structure - #1152
Merged
Merged
Conversation
A decision page about Leaf's layouts came out as paragraphs, tables and Asks with no picture, though its subject was page widths, grids and regions. Every diagram-rich page from the past two days got its drawings only because the user asked for them. The guidance mapped a few subject kinds to diagrams inside "Reading cost", let an agent classify its page as "a decision" and write prose, and called inline SVG a last resort. - SKILL.md's page contract now says a view with a shape shows it in a picture, and points at the new section. - page-authoring.md gains "Draw the subject": decide what each view draws before its words, the kinds of point that have a shape, and that a decision about one draws it too. The existing image/diagram/table rules move there from "Reading cost". The pre-handover reading also checks for a shape described in words. - authoring-evidence.md replaces "inline SVG only for a bespoke drawing" with how to draw one: schematic wireframes, compared states in one frame, one class set on theme tokens so both schemes hold. - authoring-asks.md: an Ask between arrangements nothing can run yet draws each option inside it. An A/B with each arm's guidance pasted in: on the layout decision the old text drew 0 and 1 figures, the new 3-5 across five runs; a data-flow explanation went from 1 to 2-3. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Sep 25, 2026
max-sixty
added a commit
that referenced
this pull request
Sep 25, 2026
A page that drew its own inline SVG had to invent a class set for it, and the only good example (the rail-pins plan) carried ~40 lines of page-local CSS so its drawings would follow the light and dark palettes. #1152 told agents to draw far more, so that CSS would be re-invented on every page. The theme now has an `svg.drawing` idiom holding the generic half of that set: `.frame`/`.frame-head`, `.line` (`.soft`), `.box` (`.hot`), `.highlight`, `.ghost`, `.guide`, `.dim`, `.arrow` with `.tip`, `.mark`/`.glyph`, the `ok`/`warn`/`danger` tone fills, and `.strong`/`.small`/`.mono` text. Every paint is a theme token. Subject-specific marks (rails, pins, suggestion tints) stay page-local on the same tokens. - `theme.css`, `registry.json`: the rules and the `$idioms` entry with its markup example. A `TODO` beside the rules records the open question of whether the set is too specific, and what would settle it: if later pages leave most of it unused, or keep adding local classes beside it, trim it to the text defaults. - `authoring-evidence.md`: drawings use the idiom instead of a hand-rolled class set. - `feature-gallery.html` (and the regenerated corpus): a before/after specimen that uses every class, checked by eye in both palettes. The idiom-in-corpus floor, gallery tests, render gate and gallery Axe pass locally. > _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
Oct 13, 2026
…hoosing it gives (#2777) A next-steps page for the floating panel (session e8a66e47) put three asks to the user as tag, title and sentence cards: which of eight work items to take, where key hints go, and whether a working status shimmers or the leaf breathes. Nothing in them showed the panel, the hints or the motion. The user asked for images, diagrams or sketches, and for the fix to sit above "always include images", since images don't always fit. The guidance already asked for pictures, in a list of subjects that "have a shape" that four earlier fixes (#1152, #1477, #1866, #2643) each extended by a case. An agent that classes its subject outside the list writes words: here a list of work items and a motion policy. Replaying the session on main's guidance drew the arrangement asks every time but left the motion ask in words in 3 of 7 runs, and accept-or-reject asks in words throughout. In this session the skill body in context also routed asks to `authoring-questions.md`, renamed since, so the agent never read the asks reference. The gate goes, replaced by the goal it approximated: - `SKILL.md`: the Visual principle becomes Concrete. The page puts the thing itself in front of the user wherever they judge it, in the form it takes: an interface as it looks, a behavior running, a proposal sketched, a numeric relationship as a chart, wording as the text itself. Whatever the user would have to picture from the agent's words, it shows; each option shows what choosing it gives. Words carry the claim, the reason and the cost. - `page-authoring.md`: "Draw the subject" becomes "Show the subject", organized by the form each kind of thing takes rather than by which subjects qualify, with wording and code shown as text. A work item that fixes a visible fault shows the fault. - `authoring-asks.md`: each option shows what choosing it gives the user, a piece of work to take on included: today beside the change, in the form the work takes (a capture of a visible fault, the code or data before and after), and a wording choice shows each wording. - `lf-option`: the description and instructions say the same, with a behavior difference shown working rather than captured. The `lf-ask` example, the one text-only option example agents copied, now draws each policy's document list. Replays of the source session (the transcript cut before the request, each arm's SKILL.md in place of the recorded body, the repository at each commit; the sandbox blocked serving and screenshots in both arms): main showed what was at stake inside 13 of 27 asks, this change inside 24 of 34; the motion ask was shown in 4 of 7 runs on main and 8 of 8 here. Neither arm showed the faults in a list of fixes it decided itself. Cold probes: the arrangement case drew every option on both arms (5 of 5 here), the wording guardrail kept every option words on both (5 of 5 here), and `visual-change-uses-captures` and `proposals-show-what-they-change` passed 2 of 2 here (main failed the wording guardrail once). A cold motion probe showed the motion on both arms 3 of 3, so the difference appears only in a long session's context and no new case is added. > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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.
A decision page about Leaf's layouts came out as paragraphs, tables and Asks with no picture, though its subject was page widths, grids and regions. Every diagram-rich page from the past two days (
layout-model-decisions,rail-pins, a dispatched "excellent leaf, with diagrams") got its drawings because the user asked for them; pages built without that request had none.The session record shows the guidance was loaded and lost on framing. It mapped a few subject kinds to diagrams inside "Reading cost", so an agent that classed its page as "a decision" (which "Composing a page" calls a document read in order) wrote prose. Mermaid can't place a page layout, and the only other route, inline SVG, was called a last resort. The review step checked that diagrams add information, never that one was missing.
Changes:
SKILL.md, page contract: a view whose point has a shape shows it in a picture, with words for what the picture can't say.page-authoring.md, new "Draw the subject": decide what each view draws before its words; which points have a shape (layouts, structures and flows, state changes, before/after, alternatives that differ in arrangement); a page deciding about one of these draws it too; a table whose rows name places, sizes or connections is a drawing written out. The existing image, diagram and table rules move here from "Reading cost", and the pre-handover reading checks for a shape described in words.authoring-evidence.md: replaces "inline SVG only for a bespoke drawing" with how to draw one, taken fromrail-pins: schematic wireframes, compared states in one figure at one scale, one class set on theme tokens so both colour schemes hold (an SVG loaded withleaf page mediacan't read them),role="img"with a<title>.authoring-asks.md: an Ask between arrangements nothing can run yet draws each option inside it.Eval, with each arm's guidance pasted into the prompt and the model writing the whole page: on the #32 layout decision the old text drew 0 and 1 figures, the new 3–6 across five runs; a data-flow explanation went from 1 to 2–3. On a near-miss that should stay text (choosing an error message), the new text adds one small evidence figure per run. A sentence bounding that made no measurable difference and was cut.
🤖 Generated with Claude Code