Repository navigation
Fix drifted instruction prose, and add the placement rules that keep it from regrowing - #2318
Merged
Merged
Conversation
…out any
`leaf page instructions` prints `{}` when no package declares author text,
as packages.md's contract says, and exits 0. The documented
`| jq -er '.author'` then exits 1, so the first command in page-authoring.md's
"Read the registry" failed on every default-package page. The references now
use `jq -r '.author // empty'`, and the sentence above the lookup again says
the shared instructions are read when the packages carry any, the qualifier
#2264 dropped.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…tracts Both harness references told the agent to read a delivery pointer "before working or replying, since follow its confirmation instruction after the complete reading", a sentence #2248 garbled. It now says what harness-codex.md already says: read every part, then follow the confirmation instruction, and points at event-batches.md "Delivery and acknowledgement", which owns the rule. Two overlong lines beside it are reflowed. No instruction changes meaning. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The reference's Fields column had drifted from the schema admission enforces: the `error` row named none of its fields though the registry requires `text`, `comment` listed a `response` field the registry no longer declares, and the opening sentence's list of fields every event carries left out `attention`. The `report` row now names its fields instead of "as `action`", and the opening paragraph names `attention` and points to where `agent` and `session` are described. A new test in test_interact_contract.py reads the table and holds it to the registry, as tests/AGENTS.md prescribes for a table: one row per declared kind, every named field declared, and every required field named unless the opening paragraph describes it for every kind. The hand-written column stays, since it carries meaning the schema does not (subject variants, outcomes, CLI-only and server-stamped fields). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
TODO.md's bundling item predated the compiled kernel installs and the website now load (#1963, #2143); it now covers only what is open, loading that kernel in development previews and the browser tests. The leaf.page dispatch durability gap, recorded only as two dated TODOs in worker/src/index.ts, is a TODO.md item with its trigger, and the code points at it. The root map's hooks/ entry describes the directory by role, so watch.ts and the loop guard the registrations run are covered. build/AGENTS.md names builder inputs by rule (an entry named after a `BUILDS` key) rather than listing two of the five, so a new builder needs no edit there. The map's editable part is below "Repository map". Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The Render gates section listed 18 readings beside validation.md's "Browser validation", which already names render_gate/readings.py as the list. The table was six probes short and mixed top-level probes with sub-readings of the render-check scripts, and a paragraph after it restated the section's opening rule nearly word for word (left over from #2178). Both go; readings.py and its docstrings remain the one inventory. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
margin-placement.js's header said the stylesheet places a row by anchor positioning in theme.css. It is annotation-theme.css, from the `--lf-margin-x`/`--lf-margin-y` coordinates margin-layout.js writes; only a row's carrier is anchor-positioned. readable_claim's docstring restated root AGENTS.md's Stage rule at length and now points at it, keeping the unknown-harness rule and its single-decision-point contract. dev/AGENTS.md, stills.py and assets/AGENTS.md drop what the thread snapshots and the Questions panel replaced, keeping the reasons that still hold. The rest of the history narration the survey found stays until each module is next edited. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…and-off assets/AGENTS.md repeated what single modules already state. The pin placement and folding rules are margin-placement.js's (`rowPosture`, `pinSpot`, `seatRows`) and now get one sentence and a pointer. Stability keeps the browser-wide rule and its owners and drops the per-surface reply-box mechanics held-news.js and thread-list.js state. The cascade tier order points at packages.md "Styles and composition" and `CASCADE_LAYERS`, keeping the rules only this file states. The fact table's comment-placement, pointed-place and margin-layout rows shrink to an owner and a line, with the default package's paths. #1230 cut this file from 642 to about 300 lines on the same principle, and feature commits grew it back to 548 in two weeks. /developing-leaf's "Land a change" now asks, of each addition to an area AGENTS.md, whether one module owns it, so the cut holds. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ject Hand-written inventories drifted because nothing checked them (the build/ builder inputs, the hooks/ map entry, events.md's Fields column, the render-reading table). Root AGENTS.md's "Where instructions live" now asks prose to describe a set by what its members share, and, where a list must stay, to hold it to the machine's copy with the test tests/AGENTS.md already prescribes; events.md's check is the first. Test modules grew by position after their splits (test_interact_session.py grew 8.7x after its last). tests/AGENTS.md now puts a new test in the module whose docstring names its subject, or a new module for that subject. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Four references and an eval comment cited the check-and-stamp policy as the main skill's "Operate", step 3, which a reordering would silently retarget. Step 3 now leads with the label "Quick pages and records", and the citations use it. The policy's wording, which record-reply-before-its-stamp scored in #1884, is unchanged, and the Core principles list stays as #1866 designed it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
events.md's opening points to "Authorship and voice", where `attention`, `agent` and `session` are described, and says a session's voice appears only on events posted from a harness session. Its authorship section notes that the server stamps a browser-posted `error` `author=page`, as event_contracts.py does. assets/AGENTS.md credits pin folding to `canFold` in margin-model.js, and reply-box movement to thread-card.js's `newsMoves` and chrome.css beside held-news.js. Overlong lines from the earlier commits are rewrapped. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
reviewed
Oct 11, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
The new events table test does not yet enforce its one-row-per-kind guarantee. A duplicate row can overwrite the first entry, leaving the final comparison green.
# Conflicts: # skills/leaf/assets/AGENTS.md # skills/leaf/references/harness-claude-code.md # skills/leaf/references/harness-pi.md # skills/leaf/scripts/leaf/events.md
The test keyed rows by kind, so a second row for one kind replaced the first and the kind-set comparison still passed. It now compares the listed kinds, duplicates included, with `$events.kinds`. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 11, 2026
max-sixty
enabled auto-merge (squash)
October 11, 2026 21:02
max-sixty
added a commit
that referenced
this pull request
Oct 14, 2026
"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]>
max-sixty
added a commit
that referenced
this pull request
Oct 14, 2026
…ve stale claims (#2897) 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 #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 #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_ --------- 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.
Fixes a batch of instruction and prose defects from the code-quality survey, and adds the placement rules that keep the cuts from regrowing.
Shipped instructions
page-authoring.mdandpackages.mdread author instructions withjq -r '.author // empty'.leaf page instructionsprints{}when no package declares author text and exits 0, but the documentedjq -er '.author'exited 1, so the first lookup in "Read the registry" failed on every default-package page. The sentence above it again says the shared instructions are read when the packages carry any.harness-claude-code.mdandharness-pi.mdrewrap their "Serve the page" paragraphs. Main has since repaired the garbled pointer sentence beside them in its own words, which this branch keeps.SKILL.md's Operate step 3 is labelled "Quick pages and records", and the four references and the eval comment that cited "step 3" cite the name. The policy's wording is unchanged.Prose held to the machine
events.md's kind table matches$events.kinds. Theerrorrow namestext, thecommentrow drops aresponsefield the registry no longer declares, thereportrow names its fields, and the opening paragraph namesattentionand points to whereagentandsessionare described. "Authorship and voice" notes that a browser-postederroris stampedauthor=page.test_the_events_reference_names_the_fields_each_kind_declareschecks three things: exactly one row per declared kind, every named field declared, and every required field named. The fields the opening paragraph covers for every kind are exempt.build/AGENTS.mdnames builder inputs by rule (an entry named after avendor.pyBUILDSkey). The root map'shooks/entry describes the directory by role, which coverswatch.tsand the loop guard.AGENTS.md, "Where instructions live", asks prose to describe a set by what its members share. Where the prose must list the members, a test holds the list to the machine's copy.assets/AGENTS.md back to cross-module rules (553 → 508 lines)
render_gate/readings.pyis the list.margin-placement.jsandmargin-model.js'scanFold;thread/held-news.js,thread-card.js'snewsMovesandchrome.css; andpackages.mdwithCASCADE_LAYERS. Three fact-table rows shrink to an owner and a line./developing-leaf, "Land a change", now asks of each addition to an areaAGENTS.mdwhether one module owns it.tests/AGENTS.mdputs a new test in the module whose docstring names its subject. Cut Leaf's agent instructions to direction, invariants, and ownership #1230's cut regrew from about 300 to 548 lines in two weeks without such a check.Headers and TODOs
margin-placement.js's header names the right mechanism: annotation-theme.css reads--lf-margin-x/y, and only the carrier is anchor-positioned.readable_claimpoints at Stage instead of restating it. The history clauses indev/AGENTS.md,stills.pyandassets/AGENTS.mdare now present-tense reasons.TODO.md's bundling item covers only what is open: loading the compiled kernel in previews and tests. The leaf.page dispatch durability gap is a TODO.md item with a trigger, andworker/src/index.tspoints at it.No eval run. The shipped-instruction edits fix a broken command, a garbled sentence and citation labels, so each can be read only one way. The new placement rules are maintainer guidance, which
evals/doesn't score.