Skip to content

Keep protocol references to what other code relies on - #3727

Merged
max-sixty merged 8 commits into
mainfrom
verbosity-pass-status
Oct 23, 2026
Merged

max-sixty merged 8 commits into
mainfrom
verbosity-pass-status

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

A diagnosis of 28 commits that grew Leaf's maintainer guidance found that about 40% of the added words change nothing for a reader. Most came from feature and fix PRs copying their mechanism into the protocol references, one clause per race closed. This PR states where that text belongs and adds the check at review, which is where the replay showed a rule can reach the edit.

  • Root AGENTS.md, in the sentences the maintainer chose: "Stage" says a change that keeps every guarantee changes no contract prose, and "Where instructions live" says a shared contract goes in its boundary's protocol reference, which says what each side relies on rather than how one side provides it.
  • src/AGENTS.md, "Protocol references": what a reference holds (shared records and events, who writes them, when a reader stops believing them, the orderings a change must keep) and where a module's mechanism goes instead (its header).
  • running-tend, review threshold: a maintainer-guidance sentence that narrates how the diff's code works, or which failure it fixed, joins the prose defects a review flags. Moving that text to the module header or the commit message is the fix.

An A/B replay of #3591 (8 pairs) tested rules placed at session start. The src/AGENTS.md rule never entered any run's context, and a /developing-leaf landing rule loaded 70–100 turns before the edit and changed nothing, so that rule was dropped. The review gate is untested.

The same pass fixed four eval cases that were stale against current main, plus a harness crash:

  • widget-list-keeps-focus now accepts performUpdate() on a LeafElement, which module-authoring.md names for drawing at once.
  • pin-takes-no-page-room requires a route a phone user has: the menu, not the o key.
  • browser-geometry/code-copy-reserves-room matches a verdict that has leading markup.
  • leaf-dev eval gave each provider label a nested work directory, so claude-code/base/instructions:… landed inside claude-code/base and raised FileExistsError. Each label now gets one flat directory, and the smoke test covers a case with instructions next to one without.

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

max-sixty and others added 8 commits October 22, 2026 13:14
Since 2026-09-30 the maintainer guidance grew from about 33k to 48k words,
most of it in the five protocol references. A sample of 28 commits found
that about 40% of the added words change nothing a reader does, and nearly
all of those came from feature and fix PRs mirroring how their code now
works into a reference, often one clause per race fixed. The rules in the
author's path said where a fact goes, never whether a sentence belongs.

- src/AGENTS.md, "Protocol references": a reference states what code on
  the other side of a boundary may rely on; how one module provides it goes
  in its header, and the failure that taught it in the commit.
- /developing-leaf, "Land a change": the reader test now covers every
  guidance file, the references included, not only area AGENTS.md files.
- running-tend's review threshold: a sentence narrating how the diff's code
  works, in maintainer guidance, is a prose defect the reviewer flags.

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

The cut's eval runs showed each of these failing for a reason the cut
didn't cause:

- widget-list-keeps-focus forbade performUpdate(), which module-authoring.md
  names for drawing at once on a LeafElement and the bundled widgets call;
  it now accepts either route that draws before the handler returns.
- surface-page-takes-the-window required a workspace or page tabs, while the
  playground instructions have prescribed a page of parts since #3198; it now
  accepts a page of parts whose first part is the workspace.
- browser-geometry's verdict regex missed a bold **REVISE**.
- pin-takes-no-page-room accepted the `o` key alone for a user writing from a
  phone; it now requires the menu route a phone has. A cut that dropped that
  route went from 4/4 to 0/4 on replies while the old rubric passed both.

Main's guidance passes the three Leaf cases 6/6 (Claude Code, 2 each).

`leaf-dev eval` crashed with FileExistsError when a run mixed a case that
injects instructions with one that doesn't, since the first provider's work
directory (claude-code/base/instructions:...) created the second's
(claude-code/base) as its parent. Work directories are now flat; the smoke
test selects that order.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A paired replay of #3591 (8 pairs, plus a 4-pair guardrail) found that the
widened "Land a change" check was in context in every rules-arm run and
changed nothing those runs wrote: it loads at session start, 70 to 100
turns before the reference edit. The protocol-reference rule in
src/AGENTS.md never reached the agent either, since agents read code
through git diff, sed and rg, and a nested AGENTS.md loads only when the
Read tool opens a file under it. The guardrail held in both arms.

That rule stays as the standard the tend reviewer enforces: the review
gate is the one place that sees every reference diff. The skill's
paragraph returns to main's text, saving its cost in every session.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts:
#	evals/surface-page-takes-the-window/case.yaml
The user's direction in the root AGENTS.md told every change to update its
contract prose with the code, which contract-sync PRs read as describing
each mechanism change in a protocol reference. "Stage" now says a change
that keeps every guarantee changes no contract prose, and "Where
instructions live" says a shared contract's reference states what each
side relies on, not how one side provides it. Added at the user's pick on
the guidance-cut review page.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The commit-message rule and the keeps-every-guarantee rule are stated in the root AGENTS.md; the review threshold lists its prose defects without counting them.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit 975c74f into main Oct 23, 2026
3 checks passed
@max-sixty
max-sixty deleted the verbosity-pass-status branch October 23, 2026 09:23
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