Skip to content

Say when a finished to-do leaves its section among the open work - #2855

Merged
max-sixty merged 4 commits into
mainfrom
diagnose-stale-leaf-pages
Oct 14, 2026
Merged

max-sixty merged 4 commits into
mainfrom
diagnose-stale-leaf-pages

Conversation

@max-sixty

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

Copy link
Copy Markdown
Owner

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

max-sixty and others added 2 commits October 14, 2026 08:39
A long orchestrator session kept a Leaf page through two days of merged
work, and the page ended mostly history: each time a worker's PR landed,
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; the next round's decision went to chat. About
half of the recent pages with two or more answered asks show the same
shape. The guidance already asked for finished work collapsed after the
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 says on stderr, after the record,
when the to-do was the last open one on a page element and that element
still stands among the open work, outside any closed `<details>`, later
tab, or hidden element. 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, so it reads the page as saved.

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.

Replays of the session at the turn where the round finished: baseline 0/2
restructured the page; the SKILL.md wording alone 0/2, and with a handoff
clause 0/2; with the `task end` note, 5/5 runs that saw it led with the
open ask and collapsed the finished round (one more run piped stderr into
jq, which hid the note; the record now prints first). The
review-plan-stays-open guardrail passes 2/2 on both arms.

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

@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 completion note can direct an agent to move a section that still contains open work.

Comment thread skills/leaf/scripts/leaf/todos.py Resolved
leaf-agent's review on #2855: a to-do on a section's child, still open,
didn't stop the note telling the agent to move and cut the section. The
note now reads the On lists (served_state.queues) and stays quiet while
any item on either list stands on the element or anything inside it, an
open ask included.

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

@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.

An open thread anchored inside the section can still trigger the instruction to move that section to finished work.

Comment thread skills/leaf/scripts/leaf/todos.py Resolved
leaf-agent's review on #2855: a thread on either On list is queued by its
thread id, so a user comment anchored inside the section didn't hold the
note. A thread item now counts where its thread is anchored.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit b1b4b1e into main Oct 14, 2026
3 checks passed
@max-sixty
max-sixty deleted the diagnose-stale-leaf-pages branch October 14, 2026 16:37
max-sixty added a commit that referenced this pull request Oct 14, 2026
`leaf task end … done` advises moving a finished element out of the open
work (#2855). Its words were an inline string in `cli.task_end`; they
are now the `finished-in-view` advice finding, so they sit in
`findings._TEXT` with every other check's words and carry a code and the
element as values. The command still prints them on stderr, after the
record.

The test now records the advice as a regtest snapshot, as
`tests/AGENTS.md` asks of agent-facing text, rather than matching a
fragment of it.

> _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 14, 2026
`developing-leaf` priced a narrow check by how often it fires on pages
that already work. It now names the two rates a check or a command's
note about what the agent should do next has to clear, precision (the
share of firings that were needed, so it doesn't spam the agent) and
recall (the share of the failure's occurrences it reaches, so fixing the
cases its predicate sees doesn't leave the wider failure looking
handled), and asks for an attempt to measure both on real pages and
sessions rather than on the failure that prompted it, with a stated
estimate where the data isn't there.

The case that prompted it: `task end`'s note (#2855) restructured 5 of 5
replays of the session it came from, yet fires only on to-dos opened on
a page element, which 7 of 211 pages on this machine had.

> _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