Add todo mode and replace the plan with TODO.md

This commit is contained in:
Ian Gulliver
2026-10-15 07:23:17 -07:00
parent 60a1d221f4
commit 1f44bc6d91
25 changed files with 1259 additions and 637 deletions
+62
View File
@@ -145,6 +145,43 @@ paths:
"400": { $ref: "#/components/responses/Error" }
"404": { $ref: "#/components/responses/Error" }
/api/projects/{projectId}/todo:
parameters:
- { name: projectId, in: path, required: true, schema: { type: string } }
get:
operationId: getTodo
description: The items of TODO.md at the root of the project's default branch, in file order.
responses:
"200":
description: The items; exists is false when the default branch has no TODO.md.
content:
application/json:
schema: { $ref: "#/components/schemas/Todo" }
"404": { $ref: "#/components/responses/Error" }
/api/projects/{projectId}/todo/tasks:
parameters:
- { name: projectId, in: path, required: true, schema: { type: string } }
post:
operationId: startTodoItem
description: >
Creates a task for a TODO.md item, recording the item as its todo_item, and starts its agent with the item as
the first message. Refused while another active task has the same item.
requestBody:
required: true
content:
application/json:
schema: { $ref: "#/components/schemas/TodoStart" }
responses:
"201":
description: The new task.
content:
application/json:
schema: { $ref: "#/components/schemas/Task" }
"400": { $ref: "#/components/responses/Error" }
"404": { $ref: "#/components/responses/Error" }
"409": { $ref: "#/components/responses/Error" }
/api/tasks/{taskId}:
parameters:
- { name: taskId, in: path, required: true, schema: { type: string } }
@@ -643,6 +680,31 @@ components:
created_at: { type: string, format: date-time }
closed_at: { type: string, format: date-time, description: When the task was merged or discarded. }
merge_commit: { type: string, description: "merged: the squash commit on the default branch; empty when there was nothing to merge." }
todo_item: { type: string, description: "The title of the TODO.md item the task was started from; absent for other tasks." }
Todo:
type: object
required: [exists, items]
properties:
exists: { type: boolean, description: Whether the default branch has a TODO.md at its root. }
items:
type: array
items: { $ref: "#/components/schemas/TodoItem" }
TodoItem:
type: object
required: [title, body, section]
properties:
title: { type: string, description: "The item's first line, without its list marker: the item's identity." }
body: { type: string, description: The item's further lines, as Markdown with the item's indentation removed. }
section: { type: string, description: The text of the nearest heading above the item; empty when there is none. }
TodoStart:
type: object
required: [title]
properties:
title: { type: string, description: The title of the item to start. }
model: { type: string }
Unmerged:
type: object