Repository navigation
Have agents rewrite a Leaf page around its current state - #906
Conversation
After work landed, agents amended the sentences that mentioned it: a "Merged as PR N" paragraph at the end of a section, a status word swapped, a "merged" chip on a finished option that stayed in the live Ask. The title, headings, and lists stayed as the first handoff wrote them, so the reader had to work out the current state. 21 of 31 multi-revision pages on one machine never shrank in any revision. The guidance asked for this. `authoring-revisions.md` said to "update the relevant section with the current decision or finding and show what is complete", and sessions with that text in context did exactly that. `SKILL.md` now states the goal once, under "Keep the reader current": the page the reader returns to is the one the agent would write today, with open work standing in the column and finished work collapsed after it, and an update rereads the whole page instead of adding a status note where the subject is already mentioned. The page-contract paragraph that said the same thing moved into it. `authoring-revisions.md` owns the mechanics. A whole-file rewrite is an ordinary revision because ids carry threads and reader state across it. Finished items leave a list of work for a collapsed `Complete` section, which replaces `Past work`; a widget that tracks completion itself keeps its members. An Ask the reader answered and the agent acted on moves there with the words it was picked under, and what remains goes in a new Ask. A change in the facts, like a correction, is written straight instead of proposed as a suggestion, and change markers point at additions. `page-authoring.md` now says an open Ask never collapses, and `conversation-threads.md` sends a decision to the page rather than to one section of it. `version check` refused a revision that dropped a reader-picked option with one sentence covering three reasons and no way out, which cost the recorded session four round trips and left the finished option in its Ask. `protected_ids` now returns every reason each id is held, with a worker's report separate from the reader's state, and `source_history` words one refusal per reason naming the route that reason leaves open, so an id held twice is refused for both at once. The tests read which routes a refusal named from the gate's own table, and cover the doubly held id, the suggestion whose withdrawal keeps the page's own words, the report, and the answered Ask moved into a collapsed section. Co-Authored-By: Claude Fable 5.1 <[email protected]>
leaf-agent
left a comment
There was a problem hiding this comment.
The new eval row's last expectation asks for the opposite of what this diff's own reference says, so an agent that followed the PR would score as wrong against the row.
authoring-revisions.md holds that "A draft never sits inside a suggestion", and lf-draft's registry description names the other route: "To take the pen back — a fact of yours to fix in a sentence they rewrote — write the new text and mark the element restated". The diff also narrows lf-suggestion to "wording the reader could reasonably prefer as it stands", which a fact the landed work moved is not. And the fixture column names no draft for the expectation to attach to.
The inline suggestion adds the draft to the fixture and expects restated. If the clause was meant instead to guard prose the reader has only seen, rather than words they own, it needs its own wording — the new paragraph puts a landed change outside the suggestion route in both cases.
That is the only point; the rest reads clean.
The row's fixture named neither the rail nor the words its criteria judged, and its last criterion said a reader-owned draft gets an `lf-suggestion`, which `authoring-revisions.md` rules out: a draft never sits inside a suggestion, and a fact of the agent's to fix in one is written into the body with `restated`. What the run had actually measured was prose the reader had seen, offered a shorter wording. The fixture now carries the rail, that prose, and a draft holding a moved fact, and the criteria name the route each takes. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Agents left Leaf pages mostly history. In the floating-panel session,
every time a worker's PR merged the agent patched one sentence where the
item stood ("Landed in #N"), ended the element's to-do, and moved
nothing: answered asks and finished rounds stayed in the column, and the
next round's decision went only to chat. About half of the recent pages
on this machine with two or more answered asks show the same shape. The
guidance already asked for finished work collapsed after open work (#906
targeted this failure), but it sits in `SKILL.md` and
`authoring-revisions.md`, read once, hours before the decision.
`leaf task end <page> <todo> done` now prints a note on stderr, after
the record, when the to-do stood on a page element that still stands
among the open work (outside a closed `<details>`, a later tab, or a
hidden element) and nothing on it or inside it, a thread anchored there
included, remains on either On list. The note tells the agent to move
it, cut to its outcome, to the finished work, unless it is the page's
current content. `task end` now activates the saved source first, as
`task open` and `task start` do. The code is `work.open_ids`,
`todos.finished_in_view`, and `cli.task_end`.
`SKILL.md`'s **Current** principle and "Keep the user current" now state
the goal as focus: what is open and on the user leads the column,
finished work is collapsed, and an update rewrites the page rather than
noting the change where its subject is mentioned. The old "finds each
outcome in place" read as license for in-place notes.
`authoring-revisions.md` adds a tab as a home for finished work, and
`conversation-loop.md` ties a worker's result to moving what it
finished.
Replays of the session at the turn where the round finished:
| Arm | Restructured |
| --- | --- |
| Baseline | 0/2 |
| `SKILL.md` wording only | 0/2 |
| Wording plus a handoff clause | 0/2 |
| `task end` note (prototype, then this code) | 5/5 runs that saw the
note |
One further run piped `2>&1` into `jq`, which hid a note printed before
the record; the record now prints first. The `review-plan-stays-open`
eval, which guards against collapsing what a reader must review, passes
2/2 on both base and candidate.
The note only fires for work tracked as to-dos on page elements, which
orchestrator sessions use; pages whose agents never open element to-dos
rely on the wording alone.
> _This was written by Claude Code on behalf of max-sixty_
---------
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
…e whole page up to date (#4609) Agents leave answered decisions open on Leaf pages. Across the 85 pages on one machine with answered `lf-options` groups, a third of them (126 of 393) were still open on their page's final revision, at the same rate before and after October 14 (33% and 32%). 125 of those 126 had `chosen` written in. A pick's delivery told the agent to "do it, write the answer into the markup, and stamp a version", and agents did exactly that. The step that turns the question into a record (`settled`, with what came of it) lived only in `authoring-revisions.md`, and whether a session read that file made no difference (64% of decisions retired with it, 63% without). - **The pick's delivery** (`browser/runtime/kernel-registry.json`): once the work is done, the question becomes a record of the decision, such as a choice group marked `settled` with what came of it beside it. - **SKILL.md, "Keep the user current"**: states the goal again instead of only pointing at the reference. When work lands or a decision is acted on, the agent rereads and brings the whole page up to date: acted-on decisions become settled records, finished work shrinks to its outcome, superseded material goes. #906 put this in SKILL.md for the same failure, and #2989 cut it to the pointer. New eval `decision-record-after-its-work` replays session e39862cf's page at the minute its PR merged, with the pick's real delivery. A variant replays a pick that keeps today's behavior, so it needs no work. On Claude Code: | Metric | Before | After | | --- | --- | --- | | The decision whose PR just merged is settled | 0/4 | 4/4 | | A no-work pick is settled in the same revision | 0/4 | 4/4 | | Decisions applied hours earlier are settled (SKILL.md change) | 0/4 | 6/6 | The still-open question and the pick whose work hadn't finished stayed untouched in every arm. Codex passes every metric with either SKILL.md, 3/3 per arm on both prompts (the prompts carry the new delivery wording), so the gain is on Claude Code. `answer-settles-what-it-carried`, `record-reply-before-its-stamp` and `important-page-reviewed-at-checkpoints` pass on both arms. > _This was written by Claude Code on behalf of max-sixty_
After work landed, agents amended the sentences that mentioned it: a "Merged as PR N" paragraph at the end of a section, a status word swapped, a "merged" chip on a finished option that stayed in the live Ask. The title, headings, and lists stayed as the first handoff wrote them, so the reader had to work out the current state. 21 of 31 multi-revision pages on one machine never shrank in any revision.
The guidance asked for this.
authoring-revisions.mdsaid to "update the relevant section with the current decision or finding and show what is complete", and sessions with that text in context did exactly that.SKILL.mdnow states the goal once, under "Keep the reader current": the page the reader returns to is the one the agent would write today, with open work standing in the column and finished work collapsed after it, and an update rereads the whole page instead of adding a status note where the subject is already mentioned. The page-contract paragraph that said the same thing moved into it.authoring-revisions.mdowns the mechanics. A whole-file rewrite is an ordinary revision because ids carry threads and reader state across it. Finished items leave a list of work for a collapsedCompletesection, which replacesPast work; a widget that tracks completion itself keeps its members. An Ask the reader answered and the agent acted on moves there with the words it was picked under, and what remains goes in a new Ask. A change in the facts, like a correction, is written straight instead of proposed as a suggestion, and change markers point at additions.page-authoring.mdnow says an open Ask never collapses, andconversation-threads.mdsends a decision to the page rather than to one section of it.version checkrefused a revision that dropped a reader-picked option with one sentence covering three reasons and no way out, which cost the recorded session four round trips and left the finished option in its Ask.protected_idsnow returns every reason each id is held, with a worker's report separate from the reader's state, andsource_historywords one refusal per reason naming the route that reason leaves open, so an id held twice is refused for both at once. The tests read which routes a refusal named from the gate's own table, and cover the doubly held id, the suggestion whose withdrawal keeps the page's own words, the report, and the answered Ask moved into a collapsed section.🤖 Generated with Claude Code