Skip to content

Commit 3b66524

Browse files
committed
Document task plans and records and record them in status
Refs #280 Coven-Harness: Claude Code / claude-opus-5-5
1 parent 5355b72 commit 3b66524

2 files changed

Lines changed: 64 additions & 0 deletions

File tree

‎docs/status.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,11 @@ itself, shows 0.1.0 in About and kept its unsent drafts.
749749
as the CLI reported it. Tool output keeps its last 256 KB with a visible note. A patch is labelled
750750
as this turn's. Codex memory citations show as citations, and a "Sources:" list the model wrote
751751
is labelled as links in the reply. [Evidence](conversation-evidence.md).
752+
- **Plans and task records (CF-7 #280, first part).** A plan reported by Codex or Claude's
753+
TodoWrite shows each step in the CLI's own status: "Reported done", never "verified". Under
754+
each finished turn, Save to Notes writes the turn's request, plan, changed files, commands and
755+
loose ends into the project's notes; saving again updates the note unless you edited it.
756+
[Task plans and records](task-context.md).
752757
- **Old transcripts** read unchanged, with no invented provenance.
753758
- **Still open:** the Markdown parser (#283), CF-6's request half (after CF-3), live-provider
754759
acceptance and human VoiceOver checks.

‎docs/task-context.md‎

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Task plans and records
2+
3+
A coding request's plan, as the CLI reported it, and a record of the turn you can save to the
4+
project's notes. This is the first part of [#280](https://github.com/TypeSafeAI/modex/issues/280)
5+
(CF-7 of tracker [#273](https://github.com/TypeSafeAI/modex/issues/273)). It builds on the
6+
[conversation-event contract](conversation-events.md) and [conversation evidence](conversation-evidence.md).
7+
8+
Everything here is drawn from transcript items, and says no more than they do. A step the CLI
9+
marked completed is "reported done": what the CLI said, not a check Modex ran.
10+
11+
## Plans
12+
13+
| CLI | Native plan | Step statuses |
14+
| --- | --- | --- |
15+
| codex-cli 0.163.0 | `turn/plan/updated`: `plan: [{ step, status }]` and an optional `explanation` | `pending`, `inProgress`, `completed` |
16+
| Claude Code 2.1.302 | the `TodoWrite` tool: `todos: [{ content, status, activeForm }]` | `pending`, `in_progress`, `completed` |
17+
18+
Both become a `plan.update` observation with `from` set to `codex-plan` or `claude-todo`. The
19+
statuses map to `pending`, `in-progress` and `completed`; a status Modex does not know becomes
20+
`unknown`. Each update replaces the whole plan, and the transcript keeps one `plan` item per turn,
21+
counting its revisions. Codex gives steps no ids, so a step is its position in the latest revision.
22+
Codex's experimental plan-mode `plan` items and `item/plan/delta` are not read.
23+
24+
The plan card lists each step with its status: Not started, In progress, Reported done or Status
25+
unknown. It also shows where the plan came from and its revision. A plan never folds away under the
26+
turn header. When the turn ends, the card keeps the last statuses the CLI reported, and the plan's
27+
outcome is the turn's.
28+
29+
## The task record
30+
31+
`taskRecord` (`shared/task-context.ts`) summarises one turn: the request, the latest plan, the files
32+
its patch tools changed, the commands it ran with outcome and exit code, the final answer, and what
33+
is not settled. Not settled means commands that did not succeed and plan steps not reported done.
34+
`taskMarkdown` renders the record as portable Markdown that ends with a backlink to the thread.
35+
36+
It leaves out reasoning, command output, and any path outside the project. Files inside the project
37+
are listed relative to the thread's working directory; files outside it are counted, not named.
38+
39+
## Save to Notes
40+
41+
Under each finished turn, **Save to Notes** (`task:save-note`, `ThreadRunner.saveTaskNote`) writes the
42+
record as a note in the thread's project notes, through the notes store with a human actor. Nothing
43+
saves on its own, and an agent cannot use this.
44+
45+
- **Saving again** updates the same note. The thread remembers each turn's note and the revision it
46+
saved, in the main-owned `taskNotes` field.
47+
- **An edited note is kept.** If the note was edited since, the edit stays and this version becomes a
48+
new note marked "saved again".
49+
- **A missing note is replaced.** If the note was deleted or trashed, a new one is written.
50+
- **Saving never reruns** anything, and never reads beyond the transcript.
51+
52+
## Not done yet
53+
54+
- Clarification through question cards waits for the human-request lifecycle
55+
([#276](https://github.com/TypeSafeAI/modex/issues/276)).
56+
- Verified steps, and marking earlier verification stale. Verification needs a check's observed
57+
result tied to the code revision the step changed.
58+
- An on-demand context map of relevant files and tests beyond those the turn changed.
59+
- Reopening a saved note as a read-only task view.

0 commit comments

Comments
 (0)