Skip to content

Record the agent's plan as one outline that arranges to-dos and asks - #3106

Merged
max-sixty merged 4 commits into
mainfrom
todo-tree-ontology
Oct 17, 2026
Merged

max-sixty merged 4 commits into
mainfrom
todo-tree-ontology

Conversation

@max-sixty

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

Copy link
Copy Markdown
Owner

The user chose a plan outline as the shape for to-dos that form a tree, on a Leaf page that laid out four options (a goal's steps, steps with sub-steps). This adds the record and its reading; nothing draws it yet.

leaf task plan PAGE reads a JSON outline and writes a plan event. Each step has a depth and is either plain (title, plus a state of open, working, done or dropped) or names an item, a to-do id or an ask id, and shows that item's title, owner and state. The newest plan stands, and [] clears it. plans.plan_reading serves it as a tree, with each step's running start, when a working step began, and done of total among its children. It appears as plan in the browser state and in page state.

The outline arranges to-dos and asks without owning them. A rewrite that leaves out an open to-do ends nothing, and no to-do or ask rule reads the plan, so reshaping the breakdown can't drop owed work. The user rejected giving to-dos a parent because it needed rules wherever a to-do ends. Admission refuses an outline that skips a level, nests deeper than 8, or names an item the page doesn't hold. A step naming an ask that a later version removed reads as dropped.

Drawing the plan on the On view and telling agents to write one are a single change, held in TODO.md's new "Draw the agent's plan" entry: a plan nobody draws shows the user nothing. That entry replaces "Model how work breaks into pieces".

notes/what-needs-you/page.html is retired. Its design landed, its contracts live in the asks, todos and queues headers, and this change answers its open question. Its research notes stay.

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

max-sixty and others added 2 commits October 16, 2026 21:36
The user chose a plan outline on 2026-10-16 as the shape for to-dos that
form a tree: a plan's steps under a goal, steps with sub-steps.

`leaf task plan PAGE` writes a `plan` event whose `steps` are an outline
in order. Each step has a `depth` and is either plain (`title`, `state`:
open, working, done or dropped) or names an `item`, a to-do or ask id,
whose title, owner and state it shows. The newest plan stands; `[]`
clears it. `plans.plan_reading` serves it as a tree, with each step's
running start, when a working step began, and `done` of `total` among
its children, as `plan` in the browser state and in `page state`.

The plan arranges to-dos and asks without owning them: a rewrite that
leaves out an open to-do ends nothing, and no to-do or ask rule reads
the plan. Admission refuses an outline that skips a level or names an
item the page doesn't hold.

Nothing draws the plan yet and the shipped instructions don't ask for
one; TODO.md's "Draw the agent's plan" holds both, as one change.

notes/what-needs-you/page.html is retired: its design landed, its
contracts live in the asks, todos and queues headers, and its open
question is answered here. Its research notes stay. The TODO entry
"Model how work breaks into pieces" is replaced by the drawing entry.

No existing behavior changes.

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.

_count recursively visits every level, but the plan schema and plan_error admit an outline whose depth increases one step at a time without a limit. A 1,000-level outline passes those checks, then plan_reading raises RecursionError; subsequent page state and browser state reads fail for that page until another plan replaces it. Please make the counting walk handle every admitted outline, or refuse a depth the reader cannot handle at admission.

Comment thread skills/leaf/scripts/leaf/plans.py Resolved
A plan nested without limit raised RecursionError when read, breaking page
state and browser state for its page; the schema now refuses depth above 8.
A step naming a prose ask the agent ended done elsewhere raised KeyError;
it now reads done, as the On lists already read it.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
leaf-agent previously approved these changes Oct 17, 2026
Nothing outside the module reads it, which the unused-exports test holds.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit 6ae2ad0 into main Oct 17, 2026
3 checks passed
@max-sixty
max-sixty deleted the todo-tree-ontology branch October 17, 2026 05:22
max-sixty added a commit that referenced this pull request Oct 20, 2026
Leaf has recorded an agent's plan since #3106 (`leaf task plan`, served
as `plan`), but nothing drew it and no instruction asked an agent to
write one. This change does both, since a plan nobody draws shows the
user nothing and a drawing no agent fills stays empty.

**The Plan tab.** While the agent has a plan, the floating panel's On
view shows a third tab, Plan, beside On me and On <agent>. It draws each
goal with how many of its steps are done, and every step in order with
its state marked in place. The current step shows what the agent is
doing and how long it has run, and a step waiting on the user carries an
**On me** button that turns to the user's list (`floating-panel.js`,
`floating-panel.css`). On me and On <agent> are unchanged and still list
planned to-dos, because the plan arranges items without owning them. The
user chose the separate tab over having the plan head On <agent>.

**Place on On me.** An On me item the plan names now carries a muted
line above its question, such as "Ship the reconnect fix · step 3 of 5".
Like the goal's own count, it leaves out dropped steps. It also stays
once the item is answered, so the answer moves nothing on the card. The
user chose this as well.

**The instruction.** In `conversation-loop.md`, "When to write" now asks
an agent to write its plan with `leaf task plan` when its work runs to
several steps, some of which may wait on the user. It also gives the
outline's shape: the goal at depth 0, each step one level deeper than
the step it belongs to. The new case `plan-shows-multi-step-work` scores
this. On Claude Code the merge base passed 0 of 2: it opened separate
to-dos. This change passed 2 of 2, and 2 of 2 again after the final
rewording. `work-names-its-item` passed 2 of 2 on both arms. Earlier
runs of an instruction that gave no step shape invented fields such as
`waits_on`, which is why the shape is named.

The plan's step states come from the server's reading
(`plans.plan_reading`) and are not predicted in the browser. The user
acts on a planned item in On me or on the page, not in the Plan tab, so
the reading arrives before they can turn to the plan.

A browser test covers the tab, its steps, the On me button and the place
line. `plans.py`'s header now says where the plan is drawn, and TODO.md
drops the item.

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