Expand description
#657: the plan a session keeps — the steps, their order, and which one is being done.
On a job with eight steps there was no list. The steps existed as sentences in the transcript,
and compaction’s job was to guess which of them still mattered: THREAD_WORDS harvested lines
containing “todo” or “still need” into Open Threads, and the order was rebuilt from the last
few messages each turn. What was lost is exactly what a plan is for — the order, and the one
step currently being done.
A plan is not /tasks (a background run is a process) and not /goal (one standing objective,
judged per turn, what is being achieved rather than in what order). A session can hold all
three: the goal is the release, the plan is the eight issues before it, a task is a run.
This module is the words and the arithmetic; the rows are session.rs (two tables, foreign-keyed
to the session so deleting a session deletes its plan) and the tool is tools_plan.rs. Nothing
here knows what a terminal or a browser is, so the rules a surface would otherwise each have to
re-invent — one in_progress, order is priority, what a merge means — are testable here.
Structs§
- Counts
- The four numbers a result carries.
- Item
- One step.
- Plan
- A whole plan: the steps in priority order, and the revision the store is at.
Enums§
- Status
- Where one step stands.
Functions§
- merge
- Patch an existing list by id: what the model names is replaced in place, what is new is appended, and what it does not mention stays.
- one_
in_ progress - Keep at most one step
in_progress, the first in list order, and demote the rest topending. - validate
- What is wrong with a list the model wrote, if anything.