Skip to content

Simplify maintainer guidance and consolidate its references - #2178

Merged
max-sixty merged 15 commits into
mainfrom
agent-a7d03ea41654f534b
Oct 9, 2026
Merged

max-sixty merged 15 commits into
mainfrom
agent-a7d03ea41654f534b

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Simplify maintainer guidance by removing repeated explanations, tightening the glossary and ownership rules, and routing renamed heading references to their canonical homes. The rewrite retains current lifecycle, preview, distribution, validation and testing contracts, including the agent/principal distinction. Catalog guidance describes the existing pipeline; the separate example/catalog implementation is outside this change.

The final diff is documentation, comments and docstrings. Python executable ASTs are checked against main, and JavaScript edits only update comment citations. Validation includes five focused instruction/map/gate/fixture tests, changed-file pre-commit checks, heading-reference review and independent contract review. CI runs the complete PR landing gates.

This was written by Codex on behalf of max-sixty

max-sixty and others added 15 commits September 30, 2026 16:15
…r contracts

Phase 1 of the prose review of the guidance an agent reads before changing
Leaf. Stale claims are corrected against the code; rules written out in more
than one file keep one home; wall paragraphs are split; "stand/standing" keeps
one meaning.

Claims corrected (what the code does):
- skills/leaf/assets/AGENTS.md, "Render gates": `--render` covers both schemes
  at 1200x900 and 540x720 (version.py, RENDER_VIEWPORTS), plus a 360-1920px sweep
  for the sideways readings. It renders no print media; nothing under
  render_gate/ emulates print, only the suite does.
- The render-gate reading table omitted readings scheme.py, readings.py and
  version.py take: the pre-upgrade proof (start_with_pre_upgrade_proof,
  driver.js preUpgradeFindings), runtimeStarted, the wait_until_ready readiness
  wait, failSoftErrors, missingUpgrades, rootOverflow, undeclaredShadowRoots,
  missingThreads, invalidVisualProviders, unrevealedVisualProviders, and in the
  width sweep arrangedBoxes and heldPanes. Console warnings fail too
  (scheme.console_problem). arrangedBoxes is advice; it picks the widths the
  passing check screenshots (screens.py).
- validation.md said the sweep re-reads "the two sideways readings".
  arrangedBoxes and heldPanes are read only in the sweep, and shrunkLabels and
  the sweep only on the desktop page in the light scheme (version.py, `once`).
- assets/AGENTS.md, pins: a pin tries its seat first (the end of an inline
  target's run, or a block's corner), then the nearest clear room, and falls back
  to the target's top-right corner (pinSpot, seatRows, margin-layout.js homeAt).
  Only a pin whose fold.able() folds, and its toggle is seated only where the
  opened width fits to its left.
- validation.md, "Parsed source": a revision activated from a checked candidate
  adopts the candidate's SourceReading (`RevisionReading(adopted=...)`).
- page-storage.md, `service.json`: a plain stop during `page init`'s re-vendor
  writes an unmarked record, so the restart sees its mark gone and the page stays
  stopped (hosting.py, `cmd_stop`, `restarting_server`).
- session-lifetime.md: the claims path is `<state-home>/claims/<page>`
  (state_paths honours XDG_STATE_HOME), not a fixed ~/.local/state path.
- glossary.md, Rail: `data-rail="right"` pads the shell only above a phone's
  width (theme.css), and `data-rail="none"` withholds the rail. Pin: a pin sits
  by its target wherever pinSpot finds room, not always in its corner. Landing:
  the focus moves the Tab starting point and the blur hands the scroll keys back
  to the page (focus.js).

Per file:
- skills/leaf/scripts/leaf/validation.md: "Static validation" becomes a list of
  checks, a Carry-over subsection, Thread namespaces, and Page code. "Browser
  validation" holds the reading table (moved from assets/AGENTS.md, with the
  readings above added) in place of the prose enumeration. The page-versus-thread bound points
  at root AGENTS.md. Overlong patch lines rewrapped.
- skills/leaf/assets/AGENTS.md: "Render gates" points at validation.md for the
  readings. "Authoritative projection" keeps its own facts (wire names,
  through_seq, /api/view, restated persistence, no refusal receipts) and points
  at root AGENTS.md for the browser/Python split and the widget bounds. "Space
  and scrolling" splits the pin paragraph in two. Mannered phrases rewritten
  ("rides", "wears", "survives by what it is", "where it stands now").
- skills/leaf/scripts/leaf/events.md: defines when an action or report
  *stands* (an action until an undo or a note's `restated` withdraws it, a report
  until a note `settles` it), distinct from the glossary's keyboard Standing and
  the `standing` server lifetime. Position moves get their own subsection, and the
  sentence on how `page check` holds an absorbed move is split. Rewrites the
  one-user read-state sentence, the note-closing sentence, and "It also records".
- skills/leaf/scripts/leaf/session-lifetime.md: the live-reply table cell moves
  its lifetime rule under the table; the status.json pickup sentence returns to
  the pickup paragraph; the "exception" paragraph is restated as the rule it
  follows (a condition belongs to whoever holds its recovery gesture); Carriers
  gets subsections, with the adapter's second lease in the detached-process
  bullet and "never calls turn/start" beside the unobserved queue.
- skills/leaf/scripts/leaf/page-storage.md: the interactions.jsonl bullet keeps
  what a reader of the file needs, and runtime/interaction-log.js's header takes
  the tab's retry and backlog policy. `<state-home>/deliveries/` moves into the
  Files list beside `<state-home>/claims/`.
- skills/leaf/scripts/leaf/layer-registry.md: drops the sentence about pages
  vendored before the runtime identity existed (Stage owes old state nothing) and
  the admission paragraph events.md owns; fixes "Served across the two".
- skills/leaf/assets/runtime/keyboard/AGENTS.md: the `touch` declaration sentence
  split; a scope "applies" (dispatch.js `standing`: the user is in it and the page
  has it) rather than "stands".
- skills/leaf/assets/runtime/interaction-log.js: the header states the tab's
  retry (transit loss and 5xx retry, 4xx drops) and backlog policy.
- .claude/skills/developing-leaf/references/glossary.md: spatial "stands" becomes
  sits/lies/covers; Standing target keeps its definition in the table with its
  behaviours below it; the Standing entry names the event-log sense.
- tests/AGENTS.md: the `told` sentence moves after the readiness list it
  interrupted; "State races are arrangements, not probabilities" becomes "Order a
  race with a route" (running-tend's reference updated); the grace-period
  sentence rewritten; patch lines rewrapped.
- Root AGENTS.md (below "Repository map"): the Asks-reading sentence rewritten;
  the scoped-instructions list names the keyboard and packages AGENTS.md.
- examples/AGENTS.md, dev/AGENTS.md, developing-leaf SKILL.md: one sentence each.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
session-lifetime.md (5148 -> 3101 words) is the map an agent needs before
changing claims, carriers, the hooks, or the activity fold. The rewrite keeps
the facts table (where each piece of session state lives, who writes it, and
when it stops being believed), which page-storage.md defers to; activity as the
one fold every reader takes; how `claimant_turn` reads the turn; the page kinds,
`counts.overdue`, and unheld; workflow conditions and who owns their recovery;
the three nested obligation sets (counts, `leaf status idle`, the Stop hook) and
that a turn's own work claim answers for now; the hook's per-event contract and
fail-open rule; the three carrier shapes and the nudge's once-per-ending rule;
the Codex freeze boundary, its two transports and two connections;
delivery-record receipts and archiving; the embedded host's one turn id; and
the Lifetime rules other files cite. "Carriers" and "Lifetime" keep their
headings for their citers.

It cuts restatements of module docstrings that already own a rule, and points
at them instead: workflow stage, answer, and settlement (`workflows.py`), the
reply binding's lifetime (`activity.reply_binding_stands`), which input a
thread claim names (`work.work_subject`), the served workflow order
(`served_workflows`), the Claude Code socket's measured delivery behavior
(`message_claude_code_session`), the detached handshake (`detached`), and the
page-touch lifetime (`service._touched_recently`). It also cuts the App Server
reply-commit walkthrough (host-codex-app-server.md, "Replies", and `TurnFold`
own it), reminder wording in the hook context, and the website's startup-retry
narrative, keeping its one invariant: abandoning an unaccepted record leaves
the envelope.

No behavior changes. Three headings ("Page activity", "Workflows and
obligations", "Declared and observed work") replace the untitled run of
paragraphs after the table.

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

skills/leaf/assets/AGENTS.md (3655 -> 2875 words). Kept every cross-module
contract: nothing Leaf draws moves content, rail vs. pin, the auxiliary
surfaces, scroller rules, Stability, first-box and generated-control rules,
gesture results, visual grammar, Motion, module boundaries, the ownership
map, the rendering/write/rest rules, cascade layers and the :has() rules,
the one-writer table, the startup order, the open vocabulary, and the
gates. Cut:
- the pin seating order and the fold toggle's behavior, which
  margin-placement.js's header and seatRows/pinSpot comments own;
- the "Authoritative projection" section, folded into the one-writer table
  (through_seq, /api/view, $awaits.answered, no refusal receipts);
  restated/answered persistence is events.md's;
- restatements: the $-key list (root "Keep the layer open"), the render
  gate's viewports (validation.md), the "no second cache" rule (root),
  afterScript's and renderingSettled's mechanics (rendering.js), the
  pointed-place lifecycle (pointed-place.js), the per-test names of the
  at-rest/closed/resized checks (tests/test_render_gate.py);
- the confirmation-dimming sentence, the same rule as aria-busy's delayed
  paint; two vague scroller clauses (narrow screens' 2-D evidence, root
  workspace duplication); the scroll-judder justification;
- the startup list compressed from 11 to 8 steps with the same order.
The Stability lead paragraph is unchanged because open #1473 edits it.
Added keeps.js and page-sheets.js to the ownership map, and named what
moves the column (asides declaring --lf-resident).

skills/leaf/assets/runtime/keyboard/AGENTS.md (1260 -> 1222 words). The
file was already contract-dense, so the cuts are targeted: the parent-file
sentence that said nothing actionable, the duplicate margin-card bullet
(merged), and the soft-keyboard search sentence; the touch-route bullets,
previously two on one line, are now a list; the ordering tables are named.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Each file is rewritten fresh for an agent about to change its area, keeping
every contract code or another file relies on and cutting what has a home
elsewhere.

events.md (3425 -> 2397 words). Kept: what each kind means and who writes it
through which door, "stands", anchors and drawings, the undo contract
(cited by schema.py), authorship and voice, admission and every `meaning`
field (cited by event_contracts.py and validation.md), position moves, the
follow feed's consumer contract (linked from docs/event-log.html), thread
turns, failure receipts, frozen widget Asks and their precedence, and the
message rules. Cut: the table's field lists, whose home is `$events.kinds`
in the registry (it also named a `response` field no record has); the
read-state rule list, which repeats read_state.py's header; drawing and
title limits the schema states; the feed's wake mechanism; and media
serving mechanics. Corrected: an untitled thread shows the panel's own
label, not "three animated dots" (thread-card.js shows "Generating title"
only while the thread waits on work). Anchor text, previously split across
the top and a closing section, is one section; media's no-collection rule
moved to page-storage.md's `media/` entry.

layer-registry.md (837 -> 614 words). Kept: where composition and its grains
live, the candidate-layer retention rule, each `$layer` field's guarantee
(the `runtime` entry is cited by validation.md), startup supervision, and
the `$decisions`/`$marks` stamps. Cut: re-vendor restart behavior that
serving-pages.md owns, the lock's operation list that page-storage.md owns,
the conventional page path, and producer details the banner and
`payload_provenance` own.

page-storage.md (1496 -> 1063 words). Kept: the "Files" inventory, entry for
entry (parsed by test_interact_layer.py against PAGE_OWNED_FILES/DIRS), each
file's writer, owner module, and non-obvious rule; the state-home stores;
revision delivery; and page state's fields and narrowed reading. Cut: the
agent-facing reading advice that authoring-revisions.md, "Read before
editing", owns; construction.py's field-level output; example file names;
and claims no code relies on (presence cache keys, how the Worker reads a
media reference).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
skills/leaf/scripts/leaf/validation.md (2526 -> ~1800 words) now opens with
the map of where each input is validated (append door, check_source,
check_markup, the incoming layer at page init, the browser gate) and keeps
every contract whose only home is this file: the static refusals, carry-over
of protected ids and visual parts, thread namespaces, the delivery headers,
the scheme and viewport matrix, the readings table, the passage contract
between browser and file, and the one-reading rule for parsed source.

It cuts what a module header already owns: the browser executable order and
driver diagnostics (render_gate/browser.py), the screens' contents
(render_gate/screens.py), the page-code run (render_gate/page_code.py), the
replayOverrides mechanics (render-checks/replay.js), the runtime-identity
refusal (render_gate/preview.py), and the x-verbatim pairing details
(passages.py). It drops the paragraph on which launches the suite's
render-check tests use, which #1488 is changing anyway. Corrections against
the code: `resolves` names a thread, not a comment; the vocabulary-gap
reading names what it refuses; the table gains `unreservedHeights` (advice)
and `apparatusAmongAuthored` (suite only).

tests/AGENTS.md (3083 -> ~2850 words) keeps every rule and every cited
heading, since most sections carry a rule whose only home is here. It
splits the corpus matrices and the collector's write and shift watches into
lists, folds `told` into the edge-helper list rather than describing it
twice, drops the readiness stage list, which `wait_until_ready` and the
runtime's `pageReadiness` own, and states the write watch's "changes
nothing" as write_watch.js defines it.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
… what other homes carry

SKILL.md (2376 -> 1976 words) keeps every procedure an agent changing Leaf runs:
the checkout launcher, where contracts live, the taste rule, the playground route,
the visible-change proof and handoff, previews and the --user claim, the website and
Codex checks, the baseline worktree commands, guidance-eval mechanics, the catalog
refresh, and landing. It cuts the "Leave old state out of the handoff" section, which
restated root AGENTS.md "Stage" ("The handoff says nothing about them either"); the
stills incident that motivated catalogue states; probe, stills, preview, verify-site
and verify-codex-task mechanics their own --help and module headers state; and the
taste rule's example list, down to one. It corrects `idle` "closing the page in the
browser": idle ends the agent's side of the page and its watch, and is not a server
stop (page-checkpoints.md).

glossary.md (3501 -> 2857 words) keeps every term code, tests or UI use, each x-*
key, each CSS property and attribute a term is keyed on, the ownership split between
core, package, page and session, the Standing target paragraph that runtime code and
tests cite, the binding/shortcut/route distinction, and the coined-term rationale.
Table cells shrink to the identity criterion plus the module that owns the mechanism:
the rail's data-rail rules, pin conditions and folded-pin gestures (margin-layout.js,
margin-placement.js, margin-model.js), full-height pane scrolling (layouts.css),
sticky-header stacking (geometry.js), the fragment-link trip (anchor-travel.js),
landing's focus-then-blur (focus.js) and the banner's gesture seat
(banner-toolbar.js) are now stated only there. It drops the unused "body grammar"
label and the "Page inventory" row (now the sentence introducing Page Map), adds a
Details shelf row the coined-terms list relied on, and corrects auxiliary surfaces
from three postures (beside, over, covering) to the two the code has: a surface
stands `beside` the page, leaving it live, or covers it (auxiliary-surfaces.js).

sample-explainers.md (287 -> 234 words) keeps the example and its three rules
(the template holds only the demonstrated page and its feed, the walkthrough prose
sits above, and the sample is driven with only what the prose says before handoff),
cutting restated reasons.

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

Each file was rewritten for its reader, an agent about to change that area, rather
than reworded in place. Behavior is unchanged; only guidance moved.

AGENTS.md (from "Repository map" on): kept every cross-runtime contract (markup
starts state and the log changes it, `restated` and `undo`, the action key,
optimistic drawing and the Asks the whole log settles, the one application
publication and presentation proof, mechanical browser state handed across a
replaced node, activity and workflows, the page directory, validate-once and
passage rules, the open layer), the install contract, and the landing gates.
Folded the separate list of scoped AGENTS.md files into the repository map, so
each directory names its instructions once. Cut a second description of what
`leaf-dev` does and of `docs/`, the note that `.config/wt.toml` names each
command, and reworded the "phase profile" paragraph so it says what to compare.

skills/leaf/scripts/AGENTS.md: kept the facade rule for `cli.py`, one owner per
concern with direct imports, the full module map the suite checks, and the
protocol references. Shortened each owner's line to the concern, since every
module's header owns its contract, and named `render-checks/` beside
`render_checks`.

build/AGENTS.md: kept what is built, the reproducibility rule, the commands, and
the `lit-html` pin with the condition and test for lifting it. Cut the sentence
justifying the pin by what the skipped releases carry.

dev/AGENTS.md: kept the package's place in the workspace, the import ban from
`skills/`, the `.tmp/` output rule, where tooling goes, and the shared mechanism
modules a new tool should reuse. Replaced the per-command catalog with a pointer
to `leaf-dev --help`, which already says what each command does, costs, and
writes, and kept only the commands whose effects reach outside `.tmp/` (committed
files, leaf-assets pushes, deploys, model and Codex spend).

examples/AGENTS.md: kept catalog criteria, unique titles, own prose with the
twelve-word refusal (the old text said "more than twelve"; the test refuses a run
of twelve), the feature gallery's role, regression fixtures, the corpus floors
and `layer.json`, the log-only exemptions, companions, anchor capture, live-half
widgets, and media. Cut the restated site-build refusal of a missing title, the
`$captures` format details `example_data.py` owns, and the line that developer
pages follow the companion conventions, which the section already implies.

skills/leaf/packages/AGENTS.md: reworded one phrase.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
- developing-leaf: `leaf-dev probe` is documented by its `--help`, not dev/AGENTS.md.
- registry.json `$events`: `page init` never checked the log against the per-kind
  `record` schemas; `candidate_vocabulary_gaps` refuses only a layer dropping a kind,
  verb or reaction token the log uses, and admission is the record schema's only
  reader (`event_contracts.event_record_error`, called only at append).
- render_gate/version.py: no reading advises on a margin pin over text.
- guidance_eval.py: the skill explains `--allow-tools` only.
- scripts/AGENTS.md: event shapes live in `$events.kinds`; events.md holds meanings.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…md files

Corrections, each checked against the code:
- registry.json $events and validation.md: `page init` refuses a layer that
  drops any vocabulary the log still uses (visual parts, held-comment targets,
  thread-markup contracts, admitted folds), not only kinds, verbs and tokens.
- events.md: an agent reply also asks when it carries a widget with a local
  `x-awaits` Ask; "stands" is distinguished from the glossary's Standing,
  dispatch.js's `standing`, and the server lifetime; spoken message; the
  thread-card pointer resolves from the file.
- session-lifetime.md: `message_claude_code_session` records nothing; a
  host giving up on a move is spelled out; carrier shapes are plain words
  rather than bold labels that read as envelope `carrier` values; the
  website's two callers of `abandon_codex_delivery` are named; the
  `starting_claim` conditional is split.
- validation.md: the readings table, which restated each probe's own name
  and header comment, becomes a pointer plus what the code spreads across
  files: the non-probe readings, the light-only set by name, the sweep,
  advice, and suite-only readings.
- examples/AGENTS.md: the site build refuses a page missing a title or
  description (dev/leaf_dev/site.py).
- assets/AGENTS.md: restores "whose result the page can draw", the
  two-dimensional-evidence and root-workspace rules, and that aria-busy dims
  the existing control after the shared delay.
- dev/AGENTS.md no longer claims every command's help states its cost;
  verify-codex-task's help now does.

Cuts: scripts/AGENTS.md keeps every module name the instruction test
requires but drops descriptions each module header already gives;
tests/AGENTS.md, keyboard/AGENTS.md, examples/AGENTS.md and the root's
sections below Repository map drop restatement of module docstrings and
other homes. Thesis headings become topic names (tests/AGENTS.md's sixteen
sections; keyboard's "Escape"), with every citer in code, skills and notes
updated.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit 32c56cf into main Oct 9, 2026
8 of 10 checks passed
@max-sixty
max-sixty deleted the agent-a7d03ea41654f534b branch October 9, 2026 23:09
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