trekoon 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,6 +10,25 @@ Trekoon is a local-first issue tracker for epics, tasks, and subtasks.
10
10
  This skill is the agent operating guide, not the full CLI reference. Use it to
11
11
  pick the right command with the fewest reads and mutations.
12
12
 
13
+ ## Companion skills
14
+
15
+ Trekoon is the data layer. Two companion skills handle the plan→execute workflow:
16
+
17
+ - **writing-plans** — creates implementation plans as Trekoon epics with
18
+ task/subtask DAGs, dependency edges, file scopes, and owner assignments.
19
+ Use when: the user asks to plan, design, or architect a feature.
20
+ - **executing-plans** — orchestrates plan execution by spawning sub-agents per
21
+ subsystem lane, tracking progress via Trekoon, and using `task done` /
22
+ `suggest` / `epic progress` for flow control.
23
+ Use when: the user asks to execute, implement, or complete an existing epic.
24
+
25
+ **Typical flow:**
26
+ 1. `writing-plans` creates the epic with tasks, subtasks, deps, owners.
27
+ 2. `executing-plans` runs `session --epic`, builds lane groups, dispatches
28
+ agents, uses `task done` responses to orchestrate waves.
29
+ 3. This skill (trekoon) is loaded by both — it provides the command reference
30
+ and status machine rules that both skills rely on.
31
+
13
32
  ## Non-negotiable defaults
14
33
 
15
34
  - Always include `--toon` on every Trekoon command.
@@ -23,9 +42,31 @@ pick the right command with the fewest reads and mutations.
23
42
  - Keep `.trekoon` gitignored; do not commit the SQLite DB as a recovery fix.
24
43
  - Never run `trekoon wipe --yes --toon` unless the user explicitly asks for it.
25
44
 
45
+ ## Status machine
46
+
47
+ Trekoon enforces a status transition graph. Only these transitions are valid:
48
+
49
+ | From | Allowed targets |
50
+ |---|---|
51
+ | `todo` | `in_progress`, `blocked` |
52
+ | `in_progress` | `done`, `blocked` |
53
+ | `blocked` | `in_progress`, `todo` |
54
+ | `done` | `in_progress` |
55
+
56
+ Invalid transitions (e.g. `todo → done`) return error code
57
+ `status_transition_invalid`. Always transition through `in_progress` to reach
58
+ `done`.
59
+
60
+ **Exception:** `task done` auto-transitions through `in_progress` when the task
61
+ is in `todo` or `blocked` status, so you can call `task done` from any
62
+ non-done status.
63
+
64
+ Recommended statuses for consistent workflows: `todo`, `in_progress`, `done`.
65
+ Use `blocked` with an appended reason when work is stuck.
66
+
26
67
  ## Default agent loop
27
68
 
28
- The primary loop is: **session → work → task done → repeat**.
69
+ The primary loop is: **session → claim → work → task done → repeat**.
29
70
 
30
71
  ### 1. Orient with a single call
31
72
 
@@ -33,55 +74,141 @@ The primary loop is: **session → work → task done → repeat**.
33
74
  trekoon --toon session
34
75
  ```
35
76
 
36
- `session` replaces the old five-call bootstrap sequence
37
- (init + sync status + task next + dep list + task show) with a single DB open.
38
- It returns diagnostics, sync status, the full next-task tree with subtasks, blocker
39
- list, and readiness counts in one envelope.
77
+ If you already know which epic you are working on, scope the session:
40
78
 
41
- Fail fast if the envelope reports `recoveryRequired`, a storage mismatch, or any
42
- bootstrap error. In linked worktrees, `sharedStorageRoot` may differ from
43
- `worktreeRoot`; that is expected because the repo shares one DB across checkouts.
79
+ ```bash
80
+ trekoon --toon session --epic <epic-id>
81
+ ```
44
82
 
45
- If the session envelope shows `behind > 0`, pull before claiming any task:
83
+ `session` returns diagnostics, sync status, the next ready task with subtrees,
84
+ blocker list, and readiness counts in one envelope. Use `--compact` to reduce
85
+ output size when you do not need contract metadata:
46
86
 
47
87
  ```bash
48
- trekoon --toon sync pull --from main
88
+ trekoon --toon --compact session
49
89
  ```
50
90
 
51
- This syncs tracker events (not git commits) from the source branch so task
52
- states, dependencies, and subtrees are up to date before you start work.
91
+ **After session returns, follow this decision tree in order:**
92
+
93
+ 1. **`recoveryRequired` is true?** → Stop. Run `trekoon --toon init` and
94
+ re-check.
95
+ 2. **`behind > 0`?** → Sync first: `trekoon --toon sync pull --from main`.
96
+ This pulls tracker events (not git commits) so task states are current.
97
+ 3. **`pendingConflicts > 0`?** → Resolve before claiming work:
98
+ `trekoon --toon sync conflicts list`.
99
+ 4. **Session returned a next task?** → Proceed to step 2 (claim work).
100
+ 5. **No next task and unsure what to do?** → Run `trekoon --toon suggest` for
101
+ priority-ranked recommendations (see step 1b below).
102
+
103
+ ### 1b. Get suggestions when stuck
104
+
105
+ When the session has no clear next task, or you are unsure what action to take:
106
+
107
+ ```bash
108
+ trekoon --toon suggest
109
+ trekoon --toon suggest --epic <epic-id>
110
+ ```
111
+
112
+ `suggest` inspects recovery state, sync status, readiness, and epic progress,
113
+ then returns up to 3 suggestions ranked by priority. Each suggestion includes a
114
+ category (`recovery`, `sync`, `execution`, `planning`), a reason, and a
115
+ ready-to-run command you can execute directly.
116
+
117
+ Suggest respects the status machine — it will never recommend an invalid
118
+ transition. Use it:
119
+ - At session start when `readyCount` is 0 and you need guidance.
120
+ - Mid-loop when all tasks are blocked and you need to decide what to unblock.
121
+ - Before closing an epic to confirm the right next step.
122
+
123
+ ### 1c. Check epic progress
124
+
125
+ When you need a quick dashboard before or during work on an epic:
126
+
127
+ ```bash
128
+ trekoon --toon epic progress <epic-id>
129
+ ```
130
+
131
+ Returns done/in_progress/blocked/todo counts, ready task count, and the next
132
+ candidate. Use this:
133
+ - Before starting a work session to gauge how much remains.
134
+ - After completing several tasks to report progress to the user.
135
+ - To decide whether an epic is ready to be marked done.
53
136
 
54
137
  ### 2. Claim work explicitly
55
138
 
139
+ Once you know which task to work on, claim it:
140
+
56
141
  ```bash
57
142
  trekoon --toon task update <task-id> --status in_progress
58
143
  ```
59
144
 
60
- ### 3. Finish or report a block
145
+ Optionally assign ownership when multiple agents or people are working:
61
146
 
62
147
  ```bash
63
- trekoon --toon task done <task-id>
148
+ trekoon --toon task update <task-id> --status in_progress --owner <name>
149
+ ```
150
+
151
+ Owner is for tracking who is responsible. Set it on tasks or subtasks:
152
+
153
+ ```bash
154
+ trekoon --toon task update <task-id> --owner alice
155
+ trekoon --toon subtask update <subtask-id> --owner bob
156
+ ```
157
+
158
+ ### 3. Work on the task
159
+
160
+ While working, append progress notes:
161
+
162
+ ```bash
163
+ trekoon --toon task update <task-id> --append "Started implementation"
64
164
  trekoon --toon task update <task-id> --append "Blocked by <reason>" --status blocked
65
165
  ```
66
166
 
67
- `task done` replaces the old three-call transition sequence
68
- (mark done + get next + load deps + show task) with a single call that marks the
69
- task done and returns the next ready candidate with its full tree and blockers.
167
+ ### 4. Finish or report a block
70
168
 
71
- Append a completion note before calling `task done` when useful:
169
+ When done, append a completion note then mark done:
72
170
 
73
171
  ```bash
74
172
  trekoon --toon task update <task-id> --append "Completed implementation and checks"
75
173
  trekoon --toon task done <task-id>
76
174
  ```
77
175
 
78
- ### 4. Repeat
176
+ `task done` works from any non-done status (`todo`, `in_progress`, `blocked`).
177
+ It auto-transitions through `in_progress` when needed. The response includes:
79
178
 
80
- Run `session` again at the start of each new session. After `task done`, the
81
- returned next-task envelope is sufficient to continue; a fresh `session` call is
82
- not required mid-loop unless you need updated diagnostics or sync status.
179
+ - **Next candidate**: the next ready task with its full tree and blockers.
180
+ - **Unblocked tasks**: downstream tasks that became ready after this completion.
181
+ Use this to decide what to claim next or to launch parallel work.
182
+ - **Open subtask warning**: if subtasks remain incomplete (completion still
183
+ proceeds, but the warning is surfaced so you can decide whether to go back).
83
184
 
84
- Recommended statuses for consistent workflows: `todo`, `in_progress`, `done`.
185
+ If blocked instead of done:
186
+
187
+ ```bash
188
+ trekoon --toon task update <task-id> --append "Blocked by <reason>" --status blocked
189
+ ```
190
+
191
+ ### 5. Repeat
192
+
193
+ After `task done`, the returned next-task envelope is sufficient to continue
194
+ the loop from step 2. A fresh `session` call is not required mid-loop unless
195
+ you need updated diagnostics, sync status, or want to switch epics.
196
+
197
+ Run `session` again at the start of each new conversation session.
198
+
199
+ **When to use each command during the loop:**
200
+
201
+ | Situation | Command |
202
+ |---|---|
203
+ | Start of session | `session` or `session --epic <id>` |
204
+ | Unsure what to do next | `suggest` or `suggest --epic <id>` |
205
+ | Quick progress check | `epic progress <epic-id>` |
206
+ | Claim a task | `task update <id> --status in_progress` |
207
+ | Assign ownership | `task update <id> --owner <name>` |
208
+ | Log progress | `task update <id> --append "..."` |
209
+ | Mark done | `task done <id>` |
210
+ | Report blocker | `task update <id> --append "..." --status blocked` |
211
+ | Reduce output noise | Add `--compact` to any command |
85
212
 
86
213
  ## Read policy: use the smallest sufficient read
87
214
 
@@ -90,6 +217,9 @@ Use the narrowest command that answers the question.
90
217
  | Need | Preferred command |
91
218
  |---|---|
92
219
  | Session startup (diagnostics + sync + next task) | `trekoon --toon session` |
220
+ | Session scoped to one epic | `trekoon --toon session --epic <epic-id>` |
221
+ | Next-action suggestions | `trekoon --toon suggest` |
222
+ | Epic progress dashboard | `trekoon --toon epic progress <epic-id>` |
93
223
  | Next task only | `trekoon --toon task next` |
94
224
  | A few ready options | `trekoon --toon task ready --limit 5` |
95
225
  | Direct blockers for one task | `trekoon --toon dep list <task-id>` |
@@ -99,8 +229,8 @@ Use the narrowest command that answers the question.
99
229
  | Repeated text in one scope | `trekoon --toon epic|task|subtask search ...` |
100
230
 
101
231
  Avoid broad scans such as `task list --all` or `epic show --all` when
102
- `task next`, `task ready`, `dep list`, `dep reverse`, or `search` can answer the
103
- question more cheaply.
232
+ `task next`, `task ready`, `dep list`, `dep reverse`, `suggest`, or `search`
233
+ can answer the question more cheaply.
104
234
 
105
235
  ## Creation policy: prefer bulk planning workflows
106
236
 
@@ -203,12 +333,18 @@ trekoon --toon dep add-many \
203
333
  Use descriptions as the durable work log. For progress updates, append instead
204
334
  of rewriting full descriptions.
205
335
 
336
+ Status transitions must follow the status machine (see above). Use `in_progress`
337
+ as the intermediate step to reach `done`. Direct `todo → done` is invalid via
338
+ `task update`; use `task done` instead, which auto-transitions.
339
+
206
340
  ### Preferred patterns
207
341
 
208
342
  ```bash
209
343
  trekoon --toon task update <task-id> --append "Started implementation" --status in_progress
210
- trekoon --toon task update <task-id> --append "Completed implementation and checks" --status done
344
+ trekoon --toon task update <task-id> --append "Completed implementation and checks"
345
+ trekoon --toon task done <task-id>
211
346
  trekoon --toon task update <task-id> --append "Blocked by <reason>" --status blocked
347
+ trekoon --toon task update <task-id> --owner alice
212
348
  ```
213
349
 
214
350
  ### Bulk update rules
package/README.md CHANGED
@@ -51,7 +51,9 @@ These are the commands most people need to recognize quickly:
51
51
  | Install/open/update the local board | `trekoon board open`, `trekoon board update` |
52
52
  | Learn the CLI | `trekoon help [command]`, `trekoon quickstart` |
53
53
  | Plan work | `trekoon epic ...`, `trekoon task ...`, `trekoon subtask ...`, `trekoon dep ...` |
54
- | Start an execution session | `trekoon session` |
54
+ | Track epic progress | `trekoon epic progress <id>` |
55
+ | Start an execution session | `trekoon session`, `trekoon session --epic <id>` |
56
+ | Get next-action suggestions | `trekoon suggest`, `trekoon suggest --epic <id>` |
55
57
  | Keep worktrees in sync | `trekoon sync ...` |
56
58
  | Install or refresh the AI skill | `trekoon skills install`, `trekoon skills update` |
57
59
  | Maintenance | `trekoon events prune ...`, `trekoon migrate ...`, `trekoon wipe --yes` |
@@ -60,6 +62,7 @@ Machine output modes:
60
62
 
61
63
  - `--toon` for true TOON-encoded payloads
62
64
  - `--json` for JSON output
65
+ - `--compact` to strip metadata from TOON envelopes
63
66
  - `--compat <mode>` for explicit compatibility behavior
64
67
  - `--help` and `--version` at the root or command level
65
68
 
package/docs/ai-agents.md CHANGED
@@ -70,10 +70,18 @@ In practice, the flow is usually:
70
70
 
71
71
  The main loop is: **session → work → task done → repeat**.
72
72
 
73
- Start with a single orientation call:
73
+ Start with a single orientation call, optionally scoped to an epic:
74
74
 
75
75
  ```bash
76
76
  trekoon --toon session
77
+ trekoon --toon session --epic <epic-id>
78
+ ```
79
+
80
+ Or use `suggest` for priority-ranked next-action recommendations:
81
+
82
+ ```bash
83
+ trekoon --toon suggest
84
+ trekoon --toon suggest --epic <epic-id>
77
85
  ```
78
86
 
79
87
  If the session output shows you are behind, pull tracker events before claiming
@@ -83,16 +91,50 @@ work:
83
91
  trekoon --toon sync pull --from main
84
92
  ```
85
93
 
86
- Claim work, then finish or report a block:
94
+ Claim work, assign ownership, then finish or report a block:
87
95
 
88
96
  ```bash
89
- trekoon --toon task update <task-id> --status in_progress
97
+ trekoon --toon task update <task-id> --status in_progress --owner "agent-1"
90
98
  trekoon --toon task done <task-id>
91
99
  trekoon --toon task update <task-id> --append "Blocked by <reason>" --status blocked
92
100
  ```
93
101
 
94
102
  Use `task done` when the task is actually finished. It marks the task complete
95
- and returns the next ready candidate with blockers inline.
103
+ and returns the next ready candidate with blockers inline. `task done`
104
+ auto-transitions through `in_progress` when the current status is `todo` or
105
+ `blocked`. The response also reports newly unblocked downstream tasks and warns
106
+ about incomplete subtasks.
107
+
108
+ Use `--compact` to strip contract metadata from envelopes when you do not need
109
+ it:
110
+
111
+ ```bash
112
+ trekoon --toon --compact task done <task-id>
113
+ ```
114
+
115
+ ## Status machine rules
116
+
117
+ Trekoon enforces valid status transitions. Do not attempt direct jumps like
118
+ `todo → done` — they will fail with `status_transition_invalid`. Use `task done`
119
+ for completing tasks (it handles the intermediate step automatically).
120
+
121
+ Valid transitions:
122
+
123
+ | From | Allowed targets |
124
+ | --- | --- |
125
+ | `todo` | `in_progress`, `blocked` |
126
+ | `in_progress` | `done`, `blocked` |
127
+ | `blocked` | `in_progress`, `todo` |
128
+ | `done` | `in_progress` |
129
+
130
+ ## Track epic progress
131
+
132
+ Use `epic progress` to get a summary of task status counts and the next ready
133
+ candidate for an epic:
134
+
135
+ ```bash
136
+ trekoon --toon epic progress <epic-id>
137
+ ```
96
138
 
97
139
  ## Use descendant cascade mode when closing a whole tree
98
140
 
@@ -151,6 +193,9 @@ Use the narrowest command that answers the question:
151
193
  | Need | Preferred command |
152
194
  | --- | --- |
153
195
  | Session startup | `trekoon --toon session` |
196
+ | Session scoped to epic | `trekoon --toon session --epic <epic-id>` |
197
+ | Next-action suggestions | `trekoon --toon suggest` |
198
+ | Epic progress summary | `trekoon --toon epic progress <epic-id>` |
154
199
  | Next task only | `trekoon --toon task next` |
155
200
  | A few ready options | `trekoon --toon task ready --limit 5` |
156
201
  | One task with subtasks | `trekoon --toon task show <task-id> --all` |
package/docs/commands.md CHANGED
@@ -9,8 +9,9 @@ surface, defaults, and flag rules.
9
9
  - `trekoon board <open|update>`
10
10
  - `trekoon help [command]`
11
11
  - `trekoon quickstart`
12
- - `trekoon epic <create|expand|list|show|search|replace|update|delete>`
13
- - `trekoon session`
12
+ - `trekoon epic <create|expand|list|show|search|replace|update|delete|progress>`
13
+ - `trekoon session [--epic <epic-id>]`
14
+ - `trekoon suggest [--epic <epic-id>]`
14
15
  - `trekoon task <create|create-many|list|show|ready|next|done|search|replace|update|delete>`
15
16
  - `trekoon subtask <create|create-many|list|search|replace|update|delete>`
16
17
  - `trekoon dep <add|add-many|remove|list|reverse>`
@@ -25,6 +26,7 @@ surface, defaults, and flag rules.
25
26
 
26
27
  - `--json` for structured JSON output
27
28
  - `--toon` for true TOON-encoded output
29
+ - `--compact` strips contract metadata from TOON/JSON envelopes
28
30
  - `--compat <mode>` for explicit machine compatibility behavior
29
31
  - `--help` for root and command help
30
32
  - `--version` for CLI version
@@ -119,8 +121,8 @@ Board API endpoints (all require token authentication):
119
121
  - `GET /api/snapshot` — full board state (epics, tasks, subtasks, dependencies,
120
122
  counts)
121
123
  - `PATCH /api/epics/{id}` — update epic title, description, or status
122
- - `PATCH /api/tasks/{id}` — update task title, description, or status
123
- - `PATCH /api/subtasks/{id}` — update subtask title, description, or status
124
+ - `PATCH /api/tasks/{id}` — update task title, description, status, or owner
125
+ - `PATCH /api/subtasks/{id}` — update subtask title, description, status, or owner
124
126
  - `POST /api/subtasks` — create subtask (requires taskId, title)
125
127
  - `DELETE /api/subtasks/{id}` — delete subtask
126
128
  - `POST /api/dependencies` — add dependency edge (sourceId, dependsOnId)
@@ -149,7 +151,7 @@ trekoon board update
149
151
 
150
152
  These defaults apply to `epic list`, `task list`, and `subtask list`:
151
153
 
152
- - Default scope: open work only (`in_progress`, `in-progress`, `todo`)
154
+ - Default scope: open work only (`in_progress`, `todo`)
153
155
  - Default limit: `10`
154
156
  - Status filter: `--status in_progress,todo`
155
157
  - Custom limit: `--limit <n>`
@@ -217,6 +219,80 @@ trekoon task update <task-id> --all --status todo
217
219
  trekoon subtask update <subtask-id> --all --status done
218
220
  ```
219
221
 
222
+ ## Status machine
223
+
224
+ Trekoon enforces a status machine for all entities. The canonical statuses are
225
+ `todo`, `in_progress`, `done`, and `blocked`. The hyphenated `in-progress`
226
+ variant is no longer accepted.
227
+
228
+ **Upgrading from 0.3.0:** Existing entities with `in-progress` or other custom
229
+ statuses are handled gracefully — transitions from non-canonical statuses to any
230
+ valid status are allowed, so you can update them to `in_progress` without error.
231
+
232
+ Valid transitions:
233
+
234
+ | From | Allowed targets |
235
+ | --- | --- |
236
+ | `todo` | `in_progress`, `blocked` |
237
+ | `in_progress` | `done`, `blocked` |
238
+ | `blocked` | `in_progress`, `todo` |
239
+ | `done` | `in_progress` |
240
+
241
+ Invalid transitions return a `status_transition_invalid` error with the current
242
+ status, target status, and allowed transitions.
243
+
244
+ ## Owner field
245
+
246
+ Tasks and subtasks have an optional `owner` field. Set or clear it with the
247
+ `--owner` flag on update commands:
248
+
249
+ ```bash
250
+ trekoon task update <task-id> --owner "agent-1"
251
+ trekoon subtask update <subtask-id> --owner "agent-2"
252
+ ```
253
+
254
+ The board API also accepts `owner` on `PATCH /api/tasks/{id}` and
255
+ `PATCH /api/subtasks/{id}`.
256
+
257
+ ## Task done behavior
258
+
259
+ `trekoon task done <task-id>` marks a task complete and returns the next ready
260
+ candidate. Additional behavior:
261
+
262
+ - Auto-transitions through `in_progress` when the current status is `todo` or
263
+ `blocked`, emitting two sync events for the intermediate step.
264
+ - Reports newly unblocked downstream tasks in the response (`data.unblocked`).
265
+ - Warns when subtasks remain incomplete (`data.warning`,
266
+ `data.openSubtaskCount`, `data.openSubtaskIds`).
267
+
268
+ ## Epic progress
269
+
270
+ ```bash
271
+ trekoon epic progress <epic-id>
272
+ ```
273
+
274
+ Returns status counts (`total`, `doneCount`, `inProgressCount`, `blockedCount`,
275
+ `todoCount`), `readyCount`, and `nextCandidate` for the given epic.
276
+
277
+ ## Session scoping
278
+
279
+ ```bash
280
+ trekoon session --epic <epic-id>
281
+ ```
282
+
283
+ Scopes session readiness to a specific epic instead of the full tracker.
284
+
285
+ ## Suggest command
286
+
287
+ ```bash
288
+ trekoon suggest [--epic <epic-id>]
289
+ ```
290
+
291
+ Returns up to 3 priority-ranked next-action suggestions based on recovery state,
292
+ sync status, task readiness, and epic progress. Categories: `recovery`, `sync`,
293
+ `execution`, `planning`. Each suggestion includes an `action`, `command`, and
294
+ `reason`.
295
+
220
296
  ## Related docs
221
297
 
222
298
  - [Quickstart](quickstart.md)
@@ -246,6 +246,126 @@ Behavior:
246
246
  - machine output includes `metadata.compatibility` with migration guidance and
247
247
  removal timing
248
248
 
249
+ ## Compact envelope mode
250
+
251
+ ```bash
252
+ trekoon --toon --compact task list
253
+ ```
254
+
255
+ When `--compact` is passed, the `metadata` key is omitted from the TOON/JSON
256
+ envelope. The `ok`, `command`, `data`, `error`, and `meta` keys are unaffected.
257
+
258
+ ## Status transition error contract
259
+
260
+ Invalid status transitions return:
261
+
262
+ ```text
263
+ ok: false
264
+ error:
265
+ code: status_transition_invalid
266
+ message: "cannot transition <kind> <id> from '<from>' to '<to>'"
267
+ details:
268
+ entity: epic|task|subtask
269
+ id: <entity-id>
270
+ fromStatus: <current-status>
271
+ toStatus: <attempted-status>
272
+ allowedTransitions[]: <valid targets from current status>
273
+ ```
274
+
275
+ ## Epic progress contract
276
+
277
+ ```bash
278
+ trekoon --toon epic progress <epic-id>
279
+ ```
280
+
281
+ Payload fields:
282
+
283
+ ```text
284
+ ok: true
285
+ command: epic.progress
286
+ data:
287
+ epicId: <epic-id>
288
+ title: <epic-title>
289
+ total
290
+ doneCount
291
+ inProgressCount
292
+ blockedCount
293
+ todoCount
294
+ readyCount
295
+ nextCandidate: { id, title } | null
296
+ ```
297
+
298
+ ## Task done enhanced contract
299
+
300
+ ```bash
301
+ trekoon --toon task done <task-id>
302
+ ```
303
+
304
+ Payload fields:
305
+
306
+ ```text
307
+ ok: true
308
+ command: task.done
309
+ data:
310
+ completed: { ...task record... }
311
+ openSubtaskCount
312
+ openSubtaskIds[]
313
+ warning: "Warning: N subtask(s) still open." | null
314
+ unblocked[]:
315
+ id
316
+ kind: task
317
+ title
318
+ status
319
+ wasBlockedBy[]
320
+ next: { ...task tree... } | null
321
+ nextDeps[]
322
+ readiness:
323
+ readyCount
324
+ blockedCount
325
+ ```
326
+
327
+ ## Suggest command contract
328
+
329
+ ```bash
330
+ trekoon --toon suggest [--epic <epic-id>]
331
+ ```
332
+
333
+ Payload fields:
334
+
335
+ ```text
336
+ ok: true
337
+ command: suggest
338
+ data:
339
+ suggestions[]:
340
+ priority
341
+ action
342
+ command
343
+ reason
344
+ category: recovery|sync|execution|planning
345
+ context:
346
+ totalEpics
347
+ activeEpic: <epic-id> | null
348
+ readyTasks
349
+ blockedTasks
350
+ inProgressTasks
351
+ syncBehind
352
+ pendingConflicts
353
+ ```
354
+
355
+ ## Owner field in update payloads
356
+
357
+ Task and subtask update payloads now include `owner` in their event data:
358
+
359
+ ```text
360
+ data:
361
+ task | subtask:
362
+ ...existing fields...
363
+ owner: <string> | null
364
+ ```
365
+
366
+ The board API accepts `owner` on `PATCH /api/tasks/{id}` and
367
+ `PATCH /api/subtasks/{id}`.
368
+
249
369
  ## Related docs
250
370
 
251
371
  - [Quickstart](quickstart.md)