Skip to content

Rewrite the loop and thread references in plain prose, and correct five stale claims - #2897

Merged
max-sixty merged 12 commits into
mainfrom
prose-readability-survey
Oct 14, 2026
Merged

max-sixty merged 12 commits into
mainfrom
prose-readability-survey

Conversation

@max-sixty

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

Copy link
Copy Markdown
Owner

A survey of Leaf's prose found one style hard to read throughout: a rule stated about a kind of thing ("a reader that never refuses") with the real case reduced to a paraphrase, Leaf-specific nouns used undefined, pronoun chains, negative predicates, and rule, mechanism and reason fused into one sentence. This is the first batch of rewrites, plus three passages the survey found wrong about the code.

Rewritten references (29% shorter than main, rewritten from what the reader does, with an independent review for accuracy and lost guidance): conversation-loop.md, event-batches.md, threads.md, harness-claude-code.md. Each commit message lists every cut. The coined "take in hand" becomes "start", after leaf task start, including in the reply-handling clause in registry.json, the progress-parent and todo-execution findings, and harness-codex-app-server.md; two snapshots that quote the clause are regenerated.

Corrections to claims that were wrong on main:

  • event-batches.md said a user-added option's words travel in detail instead of says; GestureWords.says gives them.
  • /developing-leaf said root AGENTS.md's "Stage" has readers tolerate old state-home records; Stage calls them disposable.
  • thread-list-view.js's header said focus and the open card never part; since Read every change where the user stands from onStanding #1967 a holdFocus restore chooses nothing, so they can (as keyboard/AGENTS.md says).
  • threads.md described a page check rule on anchored visual parts that Clarify navigation and keep decided pages editable #2020 removed.
  • conversation-loop.md described an ask as holding "the kind of answer it takes"; it holds prompt, answer and status.

Root AGENTS.md: "Where instructions live" no longer asks prose to describe a set by what its members share, which pushed writers toward rules about kinds of things. It keeps the rule's job from #2318: don't copy a list the code keeps; point to it.

Kernel: rebuilt. main's committed kernel already lagged its runtime sources (check:browser fails on main), and this branch's runtime header and registry edits change the kernel hash.

No behavior changes beyond the reworded finding and handling text and the rebuilt kernel.

This was written by Claude Code on behalf of max-sixty

max-sixty and others added 8 commits October 14, 2026 13:01
A survey of hard-to-read prose restated passages plainly and checked each
restatement against the code. Three were wrong:

- `event-batches.md` said a user-added option's words travel in the
  event's `detail` instead of `says`. `GestureWords.says` gives them,
  from the action that created the element.
- `/developing-leaf`, "Be a helpful linter", said root `AGENTS.md`'s
  "Stage" has readers tolerate records an older Leaf left in the state
  home. Stage calls them disposable; the sentence now says to delete
  code that recovers from them.
- `thread-list-view.js`'s header still said focus, selection and the
  open card never part. Since #1967 only a `move` or `step` onto a title
  (or a press's click) chooses its card, and a `holdFocus` restore
  chooses nothing, so a restore after the choice moved leaves focus on a
  closed title, as `keyboard/AGENTS.md` already says.

No behavior changes.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
"Where instructions live" asked prose to describe a set by what its
members share. Its purpose, from #2318, was to stop prose copying lists
the code keeps (they drifted). The general instruction to describe things
by shared properties pushed writers toward rules about kinds of things
with no real case named, the style a prose survey found hardest to read.
The rule now says only: don't copy the code's list, point to it.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ferences in plain prose

Rewrites the hard-to-read paragraphs of four shipped references every
page-writing agent reads, in the "case, then rule" register: one claim per
sentence, the command or field named first, no coined nouns. Plain
paragraphs are left as they were, and every heading keeps its text.

- conversation-loop.md: "When to write", "Status and handoff", "Long-running
  work" (both flagged paragraphs: how long a start lasts, and when a reply
  opens a to-do), "The On lists". "Take in hand" becomes "start", after the
  command that does it.
- event-batches.md: the `says`, `answer` and `handling` bullets, thread
  context, acknowledgement, and "After the batch".
- threads.md: titling, markup, the `ref` and reply options, "Preserve revised
  anchors", proactive replies, progress messages, edits, summaries.
- harness-claude-code.md: the "Wait loop" paragraph on Leaf's Stop hook, and
  "Subagents".

Cuts:
- conversation-loop.md: the sentence listing which widgets `leaf task open`
  accepts (`x-work` or an unsettled action); its refusal names the reason.
- conversation-loop.md: the per-list contents of each Done section and what
  each `m` press lands on and the `1`-`9` actions; UI the agent does not act on.
- conversation-loop.md: two restatements of the table (where the Working line
  shows) and of "a to-do stays open".
- event-batches.md: "an event without an `answer` owes none of its own" from
  the intro (the `answer` bullet says it); "Commands state the next step and
  any recovery needed".
- threads.md: "A delivery carries each thread's current title, null until
  named" (event-batches.md says it); "repeated words require unique stored
  context" (said above it); that the reply records the revision and anchor
  transition atomically, and that the log keeps the opening anchor.
- threads.md: the output and refusal format of a reply or `leaf thread` write
  (one JSON line per record, the stderr object with `error`, `findings`,
  `code`, `values`); the agent reads it in the output.
- harness-claude-code.md: "The banner reports overall page activity
  separately."

Corrections:
- threads.md: the paragraph on removing a declared visual part said a part is
  held while a live thread anchors on it and that `page check` names the
  moves that release it. That check (`continuity_errors`, `anchored_parts`)
  was removed in #2020; a revision may drop any part, and activation
  relocates or detaches threads (`validation/source_history.py`). The
  paragraph now says only to move or detach such a thread rather than
  resolve it, since a resolved thread keeps its old anchor and reopens
  pointing at a part the page no longer draws.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ish the "start" rename

A second pass over conversation-loop.md, event-batches.md, threads.md and
harness-claude-code.md: each section rewritten from the action its reader
takes, case first, about 30% shorter than main. Headings keep their text.

"Take in hand" becomes "start" where agents read it: the reply-answering
handling clause in `assets/registry.json` ("it starts the update"), the
`progress-parent` and `todo-execution` findings, and
harness-codex-app-server.md. The two regtest snapshots that quote the clause
are regenerated; only that wording changed in them.

Cuts, beyond those in the previous commit:
- conversation-loop.md: that Leaf marks Sent/Queued/Picked up even for an
  update that owes nothing; that the banner can only say "working on your
  updates" before a start; each Done section's contents; "information the user
  may comment on but need not decide creates no item"; "each product choice you
  surface" (folded into "every option you present"); that a paused project
  kept paused stays settled; the widget-specific state command; that answered
  and withdrawn asks stay in `asks`; where the Working line shows (the table
  says it).
- event-batches.md: the `says` bullet's detail (markup source, user-added
  options, enclosing elements, undo); "your harness contract says which you
  get"; `leaf page transcript` and the `reactions` field; that `summary_hint`
  owes nothing; the Working sentence (conversation-loop.md owns it); the
  restated "start each update" in "After the batch".
- threads.md: the flag inventory of `leaf response reply`; `--attempt`; the
  transcript's "passage not identified" label; the `detached_from` aside in the
  repeated-words paragraph; that a broken `/media/…` link is refused; what a
  capture's anchor names; that the runtime marks an unfollowable fragment link;
  "keep the discussion active while the outcome is not on the page"; that
  the reply command refuses a replaced log or another session's claim; that
  reactions, progress and failure receipts do not reopen a thread; the
  `elided.messages` and `summaries` notes; "a replacement quote can also move a
  thread whose old element the edit removed", whose meaning was unclear.
- harness-claude-code.md: the opening "input reaches you only between
  operations" (conversation-loop.md owns it); that a background session shows
  as Working while a task runs; that the watch restarts after a messaging
  wake; the subagent's shared process.

Corrections:
- conversation-loop.md said an ask "contains its prompt, typed answer and
  lifecycle; widget state owns its answer". An ask record holds `prompt`,
  `answer` once given, and `status` (`asks.py`); a widget ask's answer comes
  from the widget's state.
- threads.md: `leaf page check` lists each open thread whose anchor no longer
  resolves and where activation will move it (`relocated-anchor`), not each
  quote.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
- conversation-loop.md: read a thread or a widget with
  `leaf page state <page> <id>` (the command takes a message id or a widget
  id); restore "information they may comment on but need not decide is not an
  item"; "When input arrives:" with step 3 applying only when the input
  interrupted other work; each `m` press lands where the item is answered,
  and a widget ask's `1`-`9` actions answer it there; progress messages don't
  repeat the page URL.
- threads.md: rerunning an answer with the same `ref` adds nothing, while
  each `--ephemeral` progress line posts; markup ids must be used in no version
  of the page and no earlier message; progress never counts as unread, and
  asks, to-dos, markup, anchor moves and failure receipts each need a reply of
  their own.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
leaf-agent previously approved these changes Oct 14, 2026

@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 to-do example closes the work item before the glossary is authored or checked. That removes unfinished work from the agent's queue and shows it as done on the page. Keep the to-do open through the work and end it only after the result is ready.

leaf-agent
leaf-agent previously approved these changes Oct 14, 2026
# Conflicts:
#	skills/leaf/references/harness-claude-code.md
@leaf-agent

Copy link
Copy Markdown
Collaborator

The correction to the to-do example is present at 8d0ae4934, and the bot's approval and test check are green at that head. I attempted the pinned squash merge, but GitHub returned HTTP 405, “Pull Request has merge conflicts.” GitHub now reports the PR as dirty, so it remains open until the branch is reconciled with main.

leaf-agent
leaf-agent previously approved these changes Oct 14, 2026

@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 test check stops at pnpm run check:browser because the committed kernel outputs are stale. I ran the same check on current main (bf4bffc6a) and got the same list of stale files. The incremental change addresses the earlier to-do finding; this CI failure is inherited from main and does not withhold the code review verdict. #2901 tracks the kernel rebuild.

main's kernel already lagged its runtime sources (check:browser fails on
main too), and this branch's runtime header and registry edits change the
kernel hash, so the rebuild belongs in this change.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit fcaaabe into main Oct 14, 2026
3 checks passed
@max-sixty
max-sixty deleted the prose-readability-survey branch October 14, 2026 21:58
max-sixty added a commit that referenced this pull request Oct 14, 2026
…prose in plain prose (#2905)

The rest of the prose rewrite that #2897 started: Leaf's references,
maintainer guidance, module headers, CLI and finding text, registry
prose and the site's how-it-works and threads pages, rewritten in short
plain prose that names the real case before stating the rule, with
guidance that didn't help cut. Root `AGENTS.md` and
`skills/leaf/SKILL.md` are held back for the maintainer's own review.

Each area was rewritten by one agent and reviewed by a second for
accuracy, lost rules and readability; every review's findings are
applied. Commit messages list every cut.

| Area | Words |
| --- | --- |
| Widget and package references (`module-*.md`, `package-data.md`,
`package-themes.md`) | 22,139 → 15,036 (−32%) |
| Authoring references (`page-*.md`, `authoring-*.md`,
`serving-pages.md`, `live-samples.md`, `packages.md`, the Codex and Pi
harnesses) | 20,059 → 14,024 (−30%) |
| Area `AGENTS.md` files, `/developing-leaf` and its glossary | 27,626 →
21,263 (−23%) |
| Module headers (`codex.py`, `todos.py`, `hook_transport.py`,
`workflows.py`, `delivery.py`, `detached.py`, runtime
`semantic-state.js`, `projection/presentation.js` and others) and CLI
help and finding text | −10%; several headers grew where they now name
their real callers |
| Registry `$` declarations and delivered `handling`/`answering` clauses
| −26% |
| `docs/how-it-works.html`, `docs/threads.html` | rewritten sections −9%
|

**Evals.** The six cases whose rules the authoring-reference cuts
touched (`sidebar-page-ask-grants-its-evidence-room`,
`pin-takes-no-page-room`, `long-read-beside-a-panel-is-a-document`,
`page-arrangement-uses-layouts`, `approach-page-leaves-the-choice-open`,
`source-code-readable`) score the same on base and candidate on Claude
Code (7/8 each; the same case fails on both). The two cases that paste
the delivered clauses (`user-rewrite-answered`,
`user-rewrite-retitles-its-thread`) are re-pasted with the new wording
and pass 16/16 cold and mid-session on Claude Code and Codex.

**Corrections to claims that were wrong on main:**
- `handling.report.0` and `docs/event-log.html` said `page check`
refuses markup that contradicts a report without answering it; #2020
removed that gate.
- `packages.md` said `grows-with-content` never sees a part scroll
inside a workspace; `widget_quality.py` draws each example in a
workspace pane too.
- `module-authoring.md` listed `UPGRADE` among importable startup
events; `widget-api.js` doesn't export it. It also lost `### Retained
nodes` in #2869, which three files cite; restored.
- `navigateToDatum`/`indicate` take the referring widget first; a
changed widget `id` (not declaration) makes the controller report every
action unavailable; `x-exhibit` is declared only on `lf-sample`.
- `assets/AGENTS.md` placed `comment-placement.js` and
`floating-response.js` in the default package; they are in
`runtime/annotation-overlay/`.
- `task end`'s note and the `finished-in-view` finding now say what
`work.open_ids` checks (the element shows unfolded on the newest
revision).
- `reconnect.py`: the resume `SessionStart` hook publishes reconnect
notices too.

**Other changes:** the "Re-vendoring and layer epochs" heading is now
"Re-vendoring", with its citations updated. The kernel is rebuilt for
the reworded runtime comments and registry prose. One contract test now
matches the reworded `unoverruled` finding, five regtest snapshots and
the CLI help snapshot are re-recorded (wording only), and
`test_stop_guard.py` matches the reworded report clause.

No code behavior changes.

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

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Oct 15, 2026
…2926)

The last batch of the prose rewrite that #2897, #2905 and #2915 started:
the package instructions (`playground`, `playwright`, `monitoring`,
`file-editor`, `code-review`, `visual-review`) and 43 registry tag
descriptions and `x-instructions` strings, including `lf-chart`,
`lf-tabs`, `lf-diagram`, `table`, `aside.sidenote`, `aside.sidebar` and
the `svg.drawing`, `td.num` and `section.panel` classes. Each is
rewritten in short plain prose that names the real case, and guidance
that didn't help is cut. A second agent reviewed the draft for accuracy,
lost rules and readability, and every finding is applied in the second
commit.

| Area | Words |
| --- | --- |
| Package instruction files | 3,563 → 3,071 (−14%) |
| Rewritten registry strings | 2,761 → 2,576 (−7%) |

The cuts are smaller than in earlier batches because nine eval cases
grade rules in the playground instructions, so those rules stay.

**Corrections to claims that were wrong on main:**
- `table` pointed to "a KPI widget" for headline figures; Leaf has none.
It now names `dl` cells in a `layout-tiles` block.
- `table` said a bare `<th>` is set in small caps; `shadow.css` draws a
small, muted, bold label.
- `lf-text-document` said both tabs share one scrollable viewport; with
`preview`, each tab has its own `--lf-bound` box.
- `lf-text-document`'s `language` falls back to the preview's language,
and with neither set the source is uncolored.
- `.facts` floats right only as a direct child of a `<strong>`-titled
`lf-option` that is wide enough.
- `aside.sidebar` mentioned occupants that "declare themselves
apparatus"; no registry key declares that.
- `lf-chart` refuses to draw without an `ariaLabel`; the instruction now
says so.

**Evals** (Claude Code, base `0c62be82a` against the candidate):
- First pass, all nine `playground-*` cases, the two Playwright cases,
`diagram-parts-complete`, `queue-is-a-side-list` and
`numeric-grid-shows-shape`, 2 runs each: base 23/28, candidate 24/28.
- After the review fixes, 3 runs each: `playground-query-is-the-task`
3/3 on both arms; `capture-set-labels-each-axis` 3/3 on both arms.
- `playground-candidates-line-up` fails on both arms (base 1/5,
candidate 0/5), always on `cards-keep-their-height`: no run sets
`align-self: start`, so each card stretches to its row. That needs new
guidance with its own A/B, so this PR doesn't change it.

The `### Real-artifact A/B comparison` heading in the playground
instructions is removed; nothing cites it. No code changes.

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

---------

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