Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

ADR 0079: The conversation as a spine, with task trees at its turns

Date: 2026-10-24. Status: proposed. The operator agreed on 2026-10-23 that a problem becomes a tree of tasks with dependencies between its branches and leaves, worked by the model through a tasks tool (then in ADR 0078, decisions 1 and 2, which move here). On 2026-10-24 they set out the spine: the conversation is the spine of the task tree, and a tree is rooted at any point in it. They also set the tool’s scope: the model can read, write, and search and filter the tree. Everything else, marked pending, is not agreed. On 2026-10-24 the operator chose that plans are Agent Skills the person configures (ADR 0080): a skill’s body is a brief, and using a skill roots a tree. On 2026-10-24 the operator also chose to build the tool first, recording and tracking only: ADR 0081, the plan tool, built for 0.32.0. ADR 0078 keeps what a plan may do and when it runs (the grant, triggers, channels, protection) and builds on this one. Amended on 2026-11-02: what 0.32.0 built of this record, and the next part, agreed by the operator (at the end).

Context

wisp records a conversation as a line. The store holds every entry once, in order, under a stable id: instructions, prompts, tool calls, tool output, replies, each referring to the audit events that recorded it (context-management.md, “The store and the composer”). ContextComposer composes each request from the line: facts, a running summary, recent turns, and earlier tool output as compact references ([output of entry 7 not repeated: …; to see it: memory "recall entry 7"]), condensed ahead of the window (ADR 0045). Facts are scoped thread, session, or permanent. A question the model parks reaches the thread’s next turn as a note (ADR 0062).

Within a turn the model’s tool calls are already a small tree: flat, unnamed, and unrecorded as one. That is where work beyond one request falls apart. The planning probe of 2026-10-23 (measurements.md, “Planning a task tree and its grant”) found the models’ plans failing mostly on what flowed between steps: arguments taken from the model’s text instead of an earlier step’s output. A small model’s window fills with the whole conversation when a step needs only its own instruction and its inputs.

Two things are needed: somewhere to put the structure of the work, so that it can be read, run step by step, and audited; and a way to give each step only the context it needs.

Decision

The spine

  1. The conversation is the spine. Its turns stay the primary sequence, saved and resumed as now (ADR 0066); the thread’s task fact is the spine’s goal.
  2. A task tree is rooted at a turn. Any turn may root a tree; its id is the store id of the prompt that started it, so a tree, its entries, and its audit events hang off a point the store already has. A turn that makes no plan is a tree of one leaf, its tool calls as today: this generalises the turn rather than adding a mode.
  3. The spine sees a tree only as a reference, as it sees earlier tool output: a later turn carries [tasks of entry 12: 4 done, 1 waiting on you; to see them: tasks "show 12"], built mechanically, and never the tree’s internals. Pending: the reference’s exact form.
  4. A trigger adds a point to the spine. A run started by a schedule or wisp watch is a turn not typed by the person, and roots its own tree; what happened while the person was away is the thread read in order.

The tree

  1. A task has a goal, the primitive it uses (a command or template, a tool, a question to the person, a notification), a status (pending, ready, running, waiting, done, failed, skipped), its dependencies, its brief (below), and its result. A failure stops what depends on it and nothing else.
  2. Dependencies cross trees. A task may depend on any task in the thread by id, not only on its parent or its own tree, so a later turn’s work builds on an earlier tree’s result instead of redoing it. A cycle is refused when it is added (pending).
  3. A task links to the record. It holds the store entries and output-store ids its run produced, the audit events carry its id as they carry their turn, and its result goes to its dependents as a reference to the output store, so the tree obeys the tool-output budget (ADR 0050).

Briefs: context consumed when a task starts

  1. A task carries a brief: a short instruction, and the facts and spine entries it needs, written when the plan is made. When the task runs, its request is composed from wisp’s system prompt, the thread’s instructions, the brief, the goal, and its dependencies’ results as references; not the whole spine. A task may read a spine entry by reference, never change one. A skill’s body is the brief of the tree it roots (ADR 0080, decision 6).
  2. A brief is consumed. When its task ends, the brief leaves the active context and later work sees only the task’s result; the brief stays in the store and in the audit log while it is kept (the log rotates). Pending: whether a brief’s facts are a fourth fact scope, task, held while the task is active.
  3. A brief is part of the plan the person approves (pending: with ADR 0078’s grant), fixed at approval and approved again if changed, and bounded in size as facts are (pending: its share of the window). Data from other tasks reaches a task only as references, never inside its brief, so one step’s output (a formula’s description, a commit message) cannot become another step’s instruction. A brief shapes what the model does, never what it may do.

The tasks tool

  1. The model reads, writes, and searches the tree through one tool, tasks (task is already the thread’s task fact). Its actions, pending in their names and arguments:

    KindActionDoes
    ReadshowOne task: goal, primitive, status, dependencies and dependents, brief, result as a reference, its entries
    ReadtreeA tree’s outline, one line a task, by its rooting turn; the thread’s trees when none is named
    ReadreadyThe tasks whose dependencies are done, in the order they can run
    WriteaddA task under a parent or a turn, with its goal, primitive, brief, and dependencies
    WritedependA dependency between two tasks anywhere in the thread; a cycle refused
    WriteupdateA task’s status and result (done with its output’s reference, failed with the reason, skipped)
    SearchfindTasks filtered by status, by tree, by text in goal or result, by what depends on or is depended on by a task, or by time

    Every result is bounded by the tool-output budget and paged, as read_file and memory are. Off by default, added by a setting or a named list, as memory and ask are (pending: the setting’s name).

  2. Who may change what. The model may add and update tasks while planning, and update status and results while running. Pending, from the review of 2026-10-24: narrowed so that only the task runner sets the status of steps, questions, and notices, the model only that of the judgement it is running, and the person cancels or retries; otherwise the model could mark a question done and skip the person’s answer. Once a plan is approved, a change to its structure or a brief is a change to the plan and is approved again (pending, with ADR 0078); the model cannot add a step its grant does not cover by adding a task.

  3. The person sees and searches the same tree: /tasks in chat and wisp-tui, wisp tasks from a terminal (pending), and the resources wisp://threads/{thread_id}/tasks and wisp://threads/{thread_id}/tasks/{task_id} for an MCP caller, thread-owned things under the thread’s path. Kept with the thread, threads/<id>/tasks.json (pending).

  4. Audited under new kinds (pending: task.add, task.depend, task.update, task.brief), and each task’s run as turn events carrying the task’s id.

  1. The spine does not wait for its tree (recommended): the person goes on talking while a tree runs, and its results and questions reach the next spine turn as a note, as a parked question’s answer does.
  2. Two levels only (recommended): the spine and its trees. A task does not open a conversation of its own, so approval and the audit stay readable.
  3. Each leaf runs as its own turn on the thread (recommended), so its entries and events group under the task’s id, rather than the whole tree in one turn.
  4. A scheduled task lives on its own thread (recommended), so each run adds a point to that thread’s spine and not to the person’s working conversation.

Consequences

  • A conversation of any length stays small at the spine, however much work branches off it; each step’s context is its brief and its inputs, which makes the on-device model’s 8k window and the 8B models workable for steps a larger model planned.
  • What a plan is, what it did, and why, become readable and searchable by the person, the model, and an MCP caller, each through its own face, from one record.
  • Running a tree in the background (decision 15) is wisp’s first work that outlives the turn that started it within one conversation; a parked question already showed the shape.
  • A stored brief is instructions waiting to run, so stored briefs, like stored grants, wait on the roadmap’s track on protecting wisp’s state from other agents.
  • The store, the composer, the audit, the thread store, and the wisp://threads resources all change; the turn remains the unit they are built around, which is why a tree is rooted at one.

Amendment of 2026-11-02: what is built, and the next part

The plan tool (ADR 0081, 0.32.0) built part of this record under another name. Read against it on 2026-11-02:

DecisionState
1, the conversation is the spineBuilt: trees hang off turns and are saved and resumed with the thread
2, a tree rooted at a turnBuilt, as ADR 0081 decision 5 changed it: trees t1, tasks t1.2, the prompt’s store id recorded beside. A turn that plans nothing is not a tree of one leaf
3, the spine sees a referenceBuilt: a now-block line a tree, to see it: plan tree t1 (ADR 0081 decision 9)
4, a trigger adds a pointNot built; waits on ADR 0078’s triggers
5, a task’s fieldsGoal, status, dependencies, and a note built; primitive, brief, result as a reference, and waiting not
6, dependencies cross treesBuilt, cycles refused
7, a task links to the recordNot built
8 to 10, briefsNot built; they matter once a task runs as a turn of its own
11, the toolBuilt as plan, every action, off by default; find has no search by time
12, who may change whatThe model changes everything; the runner’s rule waits for a runner (ADR 0081 decision 2); the person reads only
13, the person sees itBuilt: /plan, wisp threads plan, wisp://threads/{thread_id}/plan; kept in record.store, not tasks.json
14, auditedBuilt: plan.add, plan.depend, plan.update; turn events carry no task id
15 to 18, runningNot built: no runner

Agreed by the operator on 2026-11-02:

  1. The rest of this record extends plan; there is no second tasks tool. Where this record says tasks, read plan.

  2. The next part is used interactively before anything runs on its own (the order agreed on 2026-11-01: this part built and used with the person present and the usual approvals; then ADR 0078’s grants held only for one conversation; stored and scheduled grants only after the protection track). It has four pieces:

    • A, links to the record (decision 7): the tool calls and audit events made while a task is running carry its id, and plan show lists what it ran and its output as references.
    • B, the person changes the plan: done, skip, reopen, and add from chat, wisp-tui, and a terminal, audited as the person’s changes, where today the person only reads it.
    • C, waiting tied to ask: a task waits on a question put to the person, and settles when it is answered.
    • D, the planning nudge: a variant in the plan probe first, for a turn asked to plan that adds no task (ADR 0081’s consequence on granite4.2:8b), and a reminder only if the probe shows it helps.

    The details of each were agreed with its build, below (decisions 21 to 25).

Agreed by the operator on 2026-11-02, for A:

  1. A call is linked to the task it did the work of. A call made while one task alone is running is that task’s at once, and its tool.call event names it (task). A call made while none or several are running is held, and goes to the next task the model settles (done, failed, skipped) in the same turn, which its plan.update records (calls); a new turn lets go of what the last one held. Models often go from pending to done without running (ADR 0081’s probes), so linking only while a task runs would leave most work unlinked. The task keeps its calls (the last 32, the rest counted): each call’s audit id, which already joins its tool.call, tool.result, and output in the output store, its tool, and what it was asked, short; plan show, /plan t1.2, wisp threads plan, and the resource list them, and the tool’s own show says where a call’s whole output is kept. A plan saved before this resumes with no calls. The operator chose the task keeping its calls over finding them in the audit log, which rotates.

Agreed by the operator on 2026-11-02, for B:

  1. The plan is changed from outside the model’s turns by the person and by an MCP caller. The person with /plan done|skip|reopen TASK [NOTE] and /plan add GOAL [under TASK|TREE] [after TASK,…] in chat and wisp-tui, and wisp threads plan ID … from a terminal, which needs a terminal, as wisp threads delete does, and which the default policy refuses to wisp’s model. An MCP caller with the tool change_plan, taking the same words, on a thread open on its server, in the thread’s turn queue so the thread is never saved mid-turn: the operator asked for it on seeing that MCP threads have no /plan. A change is not a turn: it is audited when made (plan.update or plan.add, with by person or caller), kept with the plan, and the next turn’s requests carry it in the now block, naming who made it (The plan was changed since your last turn: then [plan: the person: t1.2 skipped]), as the plan’s own lines are carried; the spine stays the person’s prompts and the model’s turns. Changes keep the model’s limits and checks, except that the person may mark a task done while one it depends on is not, knowing it done some other way; the caller, an agent, may not. A task added without under goes at the top of the newest tree, and into an empty plan roots a tree at the last prompt.
  2. A terminal’s change to a thread another process holds is queued for it. The operator first chose to refuse one, naming the holder, so that it was made where the thread is open; a review the same day found that a thread used through the MCP server is held for as long as the server runs and has no /plan there, so the person could not correct an agent’s plan mid-session. So the change is filed in ~/.wisp/pending/plan/<thread>/ (a directory of this user’s, mode 0700, as the approvals channel’s, since whoever writes there makes the person’s change), audited as plan.queued, and the holder, chat before a message or the MCP server inside respond’s turn queue, makes it as the person’s as the thread’s next turn begins, in the order filed. A change that no longer applies then is told to the model as refused and audited, since the person is not there to see it fail. A thread no process holds is changed at once, under its lock.

Agreed by the operator on 2026-11-02, for C:

  1. wisp sets waiting, and the question’s end clears it. When the model calls ask, wisp marks the task the question is taken to be about waiting and keeps the question’s id on it: the one task running, or, with none running, the first ready, the task the reminder names. Built first for a sole running task alone, as calls follow (decision 21); a review the same day noted that small models often go from pending to done without running, so the task would seldom wait, and the operator answered that a task is made to wait when one is running or ready, and none when none is. With several running there is no way to tell, and none waits. The model may not set waiting itself: the probes found the models poor at bookkeeping, and a status wisp sets from the record is never wrong. When the question ends, answered, declined, past a deadline, or withdrawn, the task is running again with a note of how (the answer masked as everywhere else), and the model decides whether it is done; nothing is settled for it. A task moved on from meanwhile keeps its status. In chat a question is answered within the turn, so this matters most for a question parked under wisp mcp, where the task shows waiting until the person answers. Audited as plan.update with by wisp and question.

Agreed by the operator on 2026-11-02, for D:

  1. A nudge to plan, measured before it ships. The plan probe gains a variant, planning: the shipped reminder, and, from the turn’s second result of another tool while the plan has no open task and the turn has rooted no tree, a line ending the result, [plan: this work has several steps and the plan has none for it; add them with plan add, then mark each as you go]. Mechanical, so wisp never reads the prompt for the word “plan”; from the second call, so a request of one call never sees it. A one-step control problem joins the probe under every variant, counting whether a model plans what needs no plan. It is built behind PlanBook(nudgesPlanning:), off wherever wisp opens a book, as the probe’s next variant is; whether it ships, the operator decides on the results. Measured on 2026-11-02 (measurements.md, “A nudge to plan”): no change on granite4.2:8b, which still did the reading problem without a task in every conversation, nudged or not; nothing to do on Bonsai 2 9B, which always planned; none on gemma4:12b; and no model planned the control. Not adopted: it stays a probe variant, off. granite4.2:8b seems not to link “make a plan” with the tool, which its description may address instead, measured as a variant of its own.

  2. The tool’s description, measured before it changes. The plan probe gains a variant, described: the shipped reminder, with the plan tool’s description worded so that the person’s asking for a plan is a reason to use the tool, and the tasks are added before any of the work:

    The conversation's plan: tasks with dependencies, kept across turns. When the person asks for a plan, or the work has several steps, add the tasks with this tool before doing any of them; then mark each running, done, failed, or skipped as you go, with a note of what you found. It records; it runs nothing.
    

    PlanTool(description:) takes it; wisp passes the shipped description everywhere. Whether it replaces the shipped one, the operator decides on the results. Measured on 2026-11-02 (measurements.md, “The plan tool’s description”): no change; granite4.2:8b still did the reading problem without a task in both conversations, Bonsai 2 9B matched the shipped variant, and gemma4:12b finished everything under every variant. Not adopted: it stays a probe variant, and the shipped description is unchanged.

Still proposed, unchanged: decisions 4, 8 to 10, 12’s runner rule, and 15 to 18, the bridge to running, which begins with a task the person asks to run as a turn of its own (decision 17), composed from its brief (decision 8).