trekoon 0.4.1 → 0.4.3

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.
Files changed (58) hide show
  1. package/.agents/skills/trekoon/SKILL.md +97 -765
  2. package/.agents/skills/trekoon/reference/execution-with-team.md +91 -141
  3. package/.agents/skills/trekoon/reference/execution.md +188 -159
  4. package/.agents/skills/trekoon/reference/harness-primitives.md +77 -0
  5. package/.agents/skills/trekoon/reference/planning.md +213 -213
  6. package/.agents/skills/trekoon/reference/status-machine.md +21 -0
  7. package/.agents/skills/trekoon/reference/sync.md +82 -0
  8. package/README.md +29 -8
  9. package/docs/ai-agents.md +65 -6
  10. package/docs/commands.md +149 -5
  11. package/docs/machine-contracts.md +123 -0
  12. package/docs/quickstart.md +55 -3
  13. package/package.json +1 -1
  14. package/src/board/assets/app.js +47 -13
  15. package/src/board/assets/components/Component.js +20 -8
  16. package/src/board/assets/components/Workspace.js +9 -3
  17. package/src/board/assets/components/helpers.js +4 -0
  18. package/src/board/assets/runtime/delegation.js +8 -0
  19. package/src/board/assets/runtime/focus-trap.js +48 -0
  20. package/src/board/assets/state/actions.js +45 -4
  21. package/src/board/assets/state/api.js +304 -17
  22. package/src/board/assets/state/store.js +82 -11
  23. package/src/board/assets/state/url.js +10 -0
  24. package/src/board/assets/state/utils.js +2 -1
  25. package/src/board/event-bus.ts +81 -0
  26. package/src/board/routes.ts +430 -40
  27. package/src/board/server.ts +86 -10
  28. package/src/board/snapshot.ts +6 -0
  29. package/src/board/wal-watcher.ts +313 -0
  30. package/src/commands/board.ts +52 -17
  31. package/src/commands/epic.ts +7 -9
  32. package/src/commands/error-utils.ts +54 -1
  33. package/src/commands/help.ts +75 -10
  34. package/src/commands/migrate.ts +153 -24
  35. package/src/commands/quickstart.ts +7 -0
  36. package/src/commands/skills.ts +17 -5
  37. package/src/commands/subtask.ts +71 -10
  38. package/src/commands/suggest.ts +6 -13
  39. package/src/commands/task.ts +137 -88
  40. package/src/domain/batch-validation.ts +329 -0
  41. package/src/domain/cascade-planner.ts +412 -0
  42. package/src/domain/dependency-rules.ts +15 -0
  43. package/src/domain/mutation-service.ts +842 -187
  44. package/src/domain/search.ts +113 -0
  45. package/src/domain/tracker-domain.ts +167 -693
  46. package/src/domain/types.ts +56 -2
  47. package/src/export/render-markdown.ts +1 -2
  48. package/src/index.ts +37 -0
  49. package/src/runtime/cli-shell.ts +44 -0
  50. package/src/runtime/daemon.ts +700 -0
  51. package/src/storage/backup.ts +166 -0
  52. package/src/storage/database.ts +268 -4
  53. package/src/storage/migrations.ts +441 -22
  54. package/src/storage/path.ts +8 -0
  55. package/src/storage/schema.ts +5 -1
  56. package/src/sync/event-writes.ts +38 -11
  57. package/src/sync/git-context.ts +226 -8
  58. package/src/sync/service.ts +679 -156
@@ -1,227 +1,256 @@
1
1
  # Execution Reference
2
2
 
3
- **You are an orchestrator.** Execute work from Trekoon, not markdown plan files.
4
- Spawn and coordinate sub-agents based on the task dependency graph and subsystem
5
- grouping so independent lanes run in parallel and dependent lanes run
6
- sequentially.
3
+ You are an orchestrator. Execute work from Trekoon, not markdown plan files.
4
+ Execution is complete only when the epic is marked `done`, all remaining work is
5
+ blocked with recorded reasons, or real user input is required.
7
6
 
8
- **Execute mode contract:** execution is complete only when the epic is marked
9
- `done`, all remaining work is blocked with recorded reasons, or user input is
10
- required to continue.
7
+ When executing an epic, use subagents by default for any meaningful work that
8
+ can run independently. Keep small or tightly coupled tasks in the parent agent.
9
+ Use your context for orchestration, dependency decisions, user communication,
10
+ and final synthesis.
11
11
 
12
- **Clarify ambiguity upfront.** If the plan has unclear requirements or meaningful
13
- tradeoffs, ask the user before starting.
12
+ If the plan has unclear requirements or meaningful tradeoffs, ask before
13
+ starting. Do not stop at status reporting when ready work exists.
14
14
 
15
- ## Choose execution shape first
15
+ ## Choose Shape
16
16
 
17
- Use the lightest shape that still preserves momentum:
17
+ - Direct work: one ready task, tiny change, narrow scope, or tightly coupled
18
+ work. Use the direct work loop below.
19
+ - Orchestrated work: multiple ready tasks across separable lanes. Build the
20
+ graph, group by lane, delegate meaningful independent lanes, and coordinate
21
+ completion from the parent session.
18
22
 
19
- - **Single-agent execution**: one ready task, narrow scope, or strongly coupled
20
- work. Use the `session claim work task done → repeat` loop from
21
- `SKILL.md`.
22
- - **Orchestrated execution**: multiple ready tasks across separable lanes. This
23
- file focuses on that path.
23
+ If a higher-priority harness policy blocks subagent use without explicit user
24
+ wording, tell the user immediately after the lane graph is known:
24
25
 
25
- Do not stop at status reporting when ready work exists.
26
-
27
- ## Build the execution graph
28
-
29
- Construct a runnable graph from Trekoon entities using the deterministic
30
- scheduler loop:
31
-
32
- 1. **Get the ready set for batching decisions:**
33
- ```bash
34
- trekoon --toon task ready --epic <epic-id> --limit 50
35
- ```
36
- 2. **Use reverse lookup when deciding what completed work unblocks:**
37
- ```bash
38
- trekoon --toon dep reverse <task-or-subtask-id>
39
- ```
40
- 3. **Load full context only when execution details are needed:**
41
- ```bash
42
- trekoon --toon epic show <epic-id> --all
43
- ```
44
-
45
- Prefer scheduler primitives (`task next`, `task ready`, `dep reverse`) over
46
- broad scans (`task list --all`, `epic show --all`).
47
-
48
- ## Group tasks into lanes
26
+ ```text
27
+ I found <n> independent Trekoon lanes. This harness requires explicit
28
+ permission before I can spawn subagents. Should I delegate those lanes and keep
29
+ coordinating from the parent session?
30
+ ```
49
31
 
50
- Batch ready tasks by subsystem/domain to minimize repeated context loading:
32
+ ## Build The Graph
51
33
 
52
- ```
53
- Without: Task 1 (auth/login) -> Agent 1 [explores auth/]
54
- Task 2 (auth/logout) -> Agent 2 [explores auth/ again]
34
+ Use scheduler reads before broad tree reads:
55
35
 
56
- With: Tasks 1-2 (auth/*) -> Agent 1 [explores once, executes both]
36
+ ```bash
37
+ trekoon --toon task ready --epic <epic-id> --limit 50
38
+ trekoon --toon dep reverse <task-or-subtask-id>
39
+ trekoon --toon epic show <epic-id> --all
57
40
  ```
58
41
 
59
- | Signal | Group together |
60
- |--------|----------------|
61
- | Same directory prefix | `src/auth/*` tasks |
62
- | Same domain/feature | Auth tasks, billing tasks |
63
- | Same `--owner` value | Tasks assigned to same lane |
64
- | Same Trekoon intent | Similar task title/description scope |
42
+ Group ready tasks by lane:
65
43
 
66
- **Limits:** 3-4 tasks max per group. Split if larger.
44
+ - Same directory prefix.
45
+ - Same subsystem/domain.
46
+ - Same owner.
47
+ - Same implementation context.
67
48
 
68
- **Parallel:** Groups touch different subsystems.
69
- **Sequential:** Groups have dependency edges between them.
49
+ Keep each lane to about 3-4 tasks. Split larger lanes. Parallel lanes touch
50
+ different subsystems and have no dependency edge. Sequential lanes have hard
51
+ dependencies.
70
52
 
71
- ## Mark epic in-progress
72
-
73
- Before dispatching any work, transition the epic so it reflects actual state:
53
+ Mark the epic in progress once, before dispatching:
74
54
 
75
55
  ```bash
76
56
  trekoon --toon epic update <epic-id> --status in_progress
77
57
  ```
78
58
 
79
- This must happen once, immediately after building the execution graph. If
80
- execution is interrupted, the epic is at least `in_progress` rather than `todo`.
59
+ ## Delegate Lanes
81
60
 
82
- ## Dispatch sub-agents
61
+ For each meaningful independent lane, spawn a subagent when the harness exposes
62
+ subagents. Keep local todo/task tools as a live progress display only; Trekoon
63
+ remains the durable source of truth.
83
64
 
84
- For each parallel lane group, spawn a sub-agent with a prompt like:
65
+ Prompt shape:
85
66
 
86
- ```
87
- Execute these Trekoon tasks IN ORDER unless task description says parallel
88
- subtasks:
67
+ ```text
68
+ Spawn or act as a write-capable subagent for this Trekoon execution lane.
69
+
70
+ Epic: <epic-id>
71
+ Lane owner: <lane-name>
72
+ Execute these Trekoon tasks IN ORDER unless task descriptions say parallel
73
+ subtasks are safe:
89
74
  - Task <id>: <title>
90
75
  - Task <id>: <title>
91
76
 
92
- Before starting each task:
93
- - set status to in_progress and assign owner:
94
- trekoon --toon task update <id> --status in_progress --owner <lane-name>
95
- - append a short start note:
96
- trekoon --toon task update <id> --append "Starting implementation"
77
+ Scope:
78
+ - Target files: <paths from task descriptions>
79
+ - Read first: <paths/patterns to inspect before editing>
80
+ - Do not touch: <paths owned by other lanes>
97
81
 
98
- While executing:
99
- - complete required subtasks, update subtask statuses
100
- - append meaningful progress notes (do not rewrite the task description)
101
- - respect the status machine: todo -> in_progress -> done (never skip)
82
+ Before each task:
83
+ - trekoon --toon task claim <id> --owner <lane-name>
84
+ - trekoon --toon task update <id> --append "Starting implementation"
85
+
86
+ While working:
87
+ - Complete required subtasks and update subtask statuses.
88
+ - Append meaningful progress notes; do not rewrite task descriptions.
89
+ - Respect status flow: todo -> in_progress -> done. Use task done for completion.
90
+ - Assume other agents may edit unrelated files. Do not revert unrelated changes.
102
91
 
103
92
  On completion:
104
- - append final verification evidence
105
- - mark done: trekoon --toon task done <id>
106
- (task done auto-transitions from todo/blocked through in_progress)
107
- - read the response: it includes unblocked downstream tasks and open
108
- subtask warnings — report these back
93
+ - Append verification evidence.
94
+ - trekoon --toon task done <id>
95
+ - Read and report unblocked tasks, open subtask warnings, and next candidate.
96
+ - For non-trivial code changes, report review result or review gap.
109
97
 
110
98
  If blocked:
111
- - append blocker reason, dependency id, and exact failing command/output
112
- - set status: trekoon --toon task update <id> --status blocked
99
+ - Append blocker reason, dependency id, and exact failing command/output.
100
+ - trekoon --toon task update <id> --append "Blocked by <reason>" --status blocked
113
101
 
114
- Use --compact to reduce output noise:
115
- trekoon --toon --compact task show <id>
102
+ Use --compact in noisy Trekoon reads. Do not create branches, commits, pushes,
103
+ or PRs unless the user explicitly asked and harness policy allows it.
116
104
 
117
- Only create branches, commits, or PRs if the user explicitly requested them and
118
- the current harness policy allows it. Always report files changed, verification
119
- results, and blockers.
105
+ Final report: tasks completed, files changed, checks, review result/gap,
106
+ task done response, blockers.
120
107
  ```
121
108
 
122
- ## Use task done response for orchestration
123
-
124
- When a sub-agent calls `task done`, the response includes:
109
+ ## Use `task done` Responses
125
110
 
126
- - **`unblocked`**: array of downstream tasks that became ready. Use this to
127
- decide what to launch next without re-querying the full readiness graph.
128
- - **`openSubtaskIds`/`warning`**: if subtasks remain open, decide whether to
129
- go back or proceed.
130
- - **`next`**: the next ready candidate with full tree and blockers.
111
+ `task done` returns:
131
112
 
132
- **Orchestration flow after each task done:**
113
+ - `unblocked`: downstream tasks that became ready.
114
+ - `warning`/`openSubtaskIds`: incomplete subtasks to consciously handle.
115
+ - `next`: next ready candidate.
133
116
 
134
- 1. Read `unblocked` from the response.
135
- 2. If unblocked tasks exist, group them by subsystem and dispatch new agents.
136
- 3. If no unblocked tasks, check `next` for the top candidate.
137
- 4. If neither exists, run `suggest --epic <id>` for guidance.
117
+ After every completion:
138
118
 
139
- ## Auto-recovery
119
+ 1. Dispatch newly unblocked meaningful independent work to subagents when safe.
120
+ 2. If no unblocked tasks, inspect `next`.
121
+ 3. If neither exists, run `trekoon --toon suggest --epic <epic-id>`.
140
122
 
141
- 1. Agent attempts to fix failures (has context).
142
- 2. If can't fix, report failure with error output.
143
- 3. Dispatch fix agent with context.
144
- 4. Same error twice -> stop and ask user.
123
+ ## Direct Work Loop
145
124
 
146
- If a status update fails with `status_transition_invalid`, check current status
147
- and transition through the valid intermediate step.
125
+ Use this loop for small, tightly coupled work, or after meaningful independent
126
+ lanes are already delegated.
148
127
 
149
- If a status update fails with `dependency_blocked`, refresh with
150
- `task ready`/`task next` and continue with a ready candidate.
128
+ 1. Orient:
129
+ ```bash
130
+ trekoon --toon session
131
+ trekoon --toon session --epic <epic-id>
132
+ ```
133
+ 2. If diagnostics show `recoveryRequired`, stop and run `trekoon --toon init`.
134
+ 3. If behind or conflicts exist, resolve sync before claiming work. Load
135
+ `reference/sync.md` for conflict handling.
136
+ 4. Claim:
137
+ ```bash
138
+ trekoon --toon task claim <task-id> --owner <name>
139
+ ```
140
+ 5. Work and append notes:
141
+ ```bash
142
+ trekoon --toon task update <task-id> --append "Started implementation"
143
+ ```
144
+ 6. Update important subtasks explicitly:
145
+ ```bash
146
+ trekoon --toon subtask claim <subtask-id> --owner <name>
147
+ trekoon --toon subtask update <subtask-id> --append "Verified with fixture set" --status done
148
+ ```
149
+ 7. Finish or block:
150
+ ```bash
151
+ trekoon --toon task update <task-id> --append "Completed implementation and checks"
152
+ trekoon --toon task done <task-id>
153
+ trekoon --toon task update <task-id> --append "Blocked by <reason>" --status blocked
154
+ ```
155
+ 8. Repeat from the returned `unblocked`/`next` data. A fresh `session` is not
156
+ needed mid-loop unless you need updated diagnostics or switch epics.
151
157
 
152
- ## Verify before closing
158
+ If `task done` warns about open subtasks, decide whether the task is genuinely
159
+ complete before moving on.
153
160
 
154
- All checks must pass before marking the epic complete:
161
+ ## Recovery
155
162
 
156
- ### Code review
163
+ `status_transition_invalid`:
157
164
 
158
- Run your code-review command/flow. Fix issues before proceeding. Poor DX/UX is
159
- a bug.
165
+ 1. `trekoon --toon --compact task show <id>`
166
+ 2. Append the attempted transition and current status.
167
+ 3. Load `reference/status-machine.md`.
168
+ 4. Apply the valid intermediate transition, then retry.
169
+ 5. Continue only after the target task reaches the intended status or is marked
170
+ `blocked` with reason.
160
171
 
161
- ### Automated tests
172
+ `dependency_blocked`:
162
173
 
163
- Run the full test suite. All tests must pass.
174
+ 1. `trekoon --toon --compact task show <id>`
175
+ 2. Append the unmet dependency.
176
+ 3. `trekoon --toon task ready --epic <epic-id>`
177
+ 4. Continue with a ready candidate. Do not retry the blocked task until its
178
+ dependency is complete.
164
179
 
165
- ### Manual verification
180
+ ## Verify Before Closing
166
181
 
167
- Automated tests aren't sufficient. Actually exercise the changes:
182
+ All applicable checks must pass before marking the epic done.
168
183
 
169
- - **API changes:** Curl endpoints with realistic payloads when the environment
170
- allows it.
171
- - **External integrations:** Test against real services when credentials and
172
- safe access are available; otherwise record the gap.
173
- - **CLI changes:** Run actual commands, verify output.
174
- - **Parser changes:** Feed real data, not just fixtures.
184
+ ### Review
175
185
 
176
- ### DX quality
186
+ For non-trivial implementation, run a separate review pass before closing the
187
+ task or epic. Prefer a specialized review agent/skill when available. Review
188
+ the actual diff for correctness, regressions, missing tests, security,
189
+ reliability, performance, and integration risks. Tiny docs/mechanical changes
190
+ may skip separate review, but record that decision.
177
191
 
178
- During manual testing, watch for friction: confusing errors, noisy output,
179
- inconsistent behavior, rough edges. Fix inline or document for follow-up.
192
+ ### Tests and Manual Checks
180
193
 
181
- ### Record evidence
194
+ - Run the relevant automated tests for touched scope.
195
+ - Run broader tests when shared behavior, cross-module contracts, or user flows
196
+ changed.
197
+ - Exercise CLI/API/parser/integration changes with realistic inputs when
198
+ possible.
199
+ - Record gaps when credentials or external services are unavailable.
200
+ - Fix confusing errors, noisy output, inconsistent behavior, or rough DX.
182
201
 
183
- Append verification results to Trekoon as progress notes:
202
+ Append evidence:
184
203
 
185
204
  ```bash
186
- trekoon --toon task update <task-id> --append "All 358 tests pass, lint clean"
205
+ trekoon --toon task update <task-id> --append "Verified: <commands/results>"
206
+ trekoon --toon task update <task-id> --append "Review: <result or accepted gap>"
187
207
  ```
188
208
 
189
- ### Final progress check
209
+ ## Close The Epic
190
210
 
191
- Before closing the epic, confirm completion state:
211
+ Before closing:
192
212
 
193
213
  ```bash
194
214
  trekoon --toon epic progress <epic-id>
215
+ trekoon --toon suggest --epic <epic-id>
195
216
  ```
196
217
 
197
- Verify: `doneCount` equals `total`, `todoCount`/`blockedCount`/`inProgressCount`
198
- are all 0.
199
-
200
- ## Cleanup
201
-
202
- After verification is complete:
218
+ Verify all tasks are `done`, or all remaining work is `blocked` with recorded
219
+ reasons. Then mark the epic done:
203
220
 
204
- 1. **Verify all tasks are done:**
205
- ```bash
206
- trekoon --toon epic progress <epic-id>
207
- ```
208
- All tasks must be `done` or clearly `blocked` with reason.
209
-
210
- 2. **Mark epic done** (already `in_progress` from the start step):
211
- ```bash
212
- trekoon --toon epic update <epic-id> --status done
213
- ```
214
-
215
- 3. **Run suggest to confirm nothing remains:**
216
- ```bash
217
- trekoon --toon suggest --epic <epic-id>
218
- ```
219
- Should return no actionable suggestions if the epic is cleanly closed.
220
-
221
- 4. **Return final execution summary:** completed tasks, remaining blockers,
222
- dependency state.
223
-
224
- ## Architectural fit
221
+ ```bash
222
+ trekoon --toon epic update <epic-id> --status done
223
+ ```
225
224
 
226
- Changes should integrate cleanly with existing patterns. If a change fights the
227
- architecture, refactor first rather than bolt on. The goal is zero tech debt.
225
+ Return final summary: tasks completed, files changed, verification, review,
226
+ remaining blockers, and dependency state.
227
+
228
+ ## Update And Read Policies
229
+
230
+ Use descriptions as the durable work log. Append progress instead of rewriting
231
+ descriptions unless the plan itself is wrong.
232
+
233
+ Preferred commands:
234
+
235
+ | Need | Command |
236
+ |---|---|
237
+ | Session diagnostics + next task | `trekoon --toon session` |
238
+ | Scoped session | `trekoon --toon session --epic <epic-id>` |
239
+ | Suggestions | `trekoon --toon suggest --epic <epic-id>` |
240
+ | Progress dashboard | `trekoon --toon epic progress <epic-id>` |
241
+ | Next task only | `trekoon --toon task next` |
242
+ | Ready set | `trekoon --toon task ready --epic <epic-id> --limit 50` |
243
+ | Direct blockers | `trekoon --toon dep list <task-id>` |
244
+ | What an item unblocks | `trekoon --toon dep reverse <task-or-subtask-id>` |
245
+ | One task | `trekoon --toon task show <task-id> --all` |
246
+ | One epic tree | `trekoon --toon epic show <epic-id> --all` |
247
+ | Reduce output | Add `--compact` |
248
+
249
+ Bulk updates:
250
+
251
+ - Use `--ids <csv>` or `--all`; prefer `--ids`.
252
+ - Bulk mode supports only `--append` and/or `--status`.
253
+ - Do not pass a positional ID in bulk mode.
254
+ - `--append` and `--description` are mutually exclusive.
255
+ - Use `--all` only for clear maintenance sweeps or when the user explicitly
256
+ wants broad updates.
@@ -0,0 +1,77 @@
1
+ # Harness Primitives
2
+
3
+ Use these intent-level primitives across Codex, Claude Code, OpenCode, Pi, and
4
+ similar harnesses. Trekoon is durable state; harness-local todo/task tools are
5
+ only live session display.
6
+
7
+ | Need | Instruction |
8
+ |---|---|
9
+ | Orient | Read Trekoon session/progress/suggest for ready work and blockers. |
10
+ | Display progress | Use local todo/task tools for the current execution shape and lane status. |
11
+ | Ask | Use the harness question tool when available; otherwise ask one concise plain-text question. |
12
+ | Delegate | When executing an epic, use subagents by default for meaningful work that can run independently. |
13
+ | Explore | Use read-only/explorer subagents for noisy codebase lookup, logs, or research. |
14
+ | Execute | Use write-capable worker/general subagents for bounded implementation lanes. |
15
+ | Test | Run the required automated or manual checks for touched scope. |
16
+ | Review | Use a review agent/skill for non-trivial code changes when available. |
17
+ | Record | Append progress, blockers, tests, review, and completion evidence to Trekoon. |
18
+
19
+ ## Delegation Default
20
+
21
+ When executing an epic, use subagents by default for any meaningful work that
22
+ can run independently. Keep small or tightly coupled tasks in the parent agent.
23
+ Use the parent session to coordinate the epic, make dependency decisions, keep
24
+ the user oriented, and synthesize results.
25
+
26
+ Treat "execute this epic", "work through this Trekoon plan", "use agents",
27
+ "spawn subagents", "delegate independent lanes", "execute with subagents",
28
+ "parallelize this", and "team execute" as requests to orchestrate work to
29
+ completion. If safe independent lanes exist and the harness supports subagents,
30
+ delegate those lanes by default.
31
+
32
+ If a higher-priority harness policy blocks subagents without explicit user
33
+ wording, tell the user immediately:
34
+
35
+ ```text
36
+ I found <n> independent Trekoon lanes. This harness requires explicit
37
+ permission before I can spawn subagents. Should I delegate those lanes and keep
38
+ coordinating from the parent session?
39
+ ```
40
+
41
+ ## Runtime Notes
42
+
43
+ - Codex: use subagents by default when exposed. If Codex policy requires
44
+ explicit user wording, ask immediately before broad execution. Do not silently
45
+ do broad work in the parent. When available, use `spawn_agent`, `send_input`,
46
+ `wait_agent`, `resume_agent`, and `close_agent`.
47
+ - Claude Code: use normal subagents for bounded side work. Use Agent Teams only
48
+ when the user explicitly asks for team execution and the environment supports
49
+ it.
50
+ - OpenCode: use `@explore` for read-only discovery and `@general` or native
51
+ Task for write-capable lane work. Use `question` when available.
52
+ - Pi/other harnesses: use the same intent and native task/subagent/question
53
+ tools when available.
54
+
55
+ ## Local Task Tools
56
+
57
+ Use local todo/task tools to show only current-session coordination:
58
+
59
+ 1. Execution shape and lane list.
60
+ 2. Lane status: pending, in progress, blocked, review, done.
61
+ 3. Short enough to stay readable.
62
+
63
+ If local state and Trekoon disagree, Trekoon wins.
64
+
65
+ ## Review
66
+
67
+ For non-trivial implementation, run a separate review pass before closing the
68
+ task or epic. Prefer a specialized review agent/skill. Review the actual diff
69
+ for correctness, regressions, missing tests, security, reliability, performance,
70
+ and integration risk.
71
+
72
+ Tiny docs/mechanical changes may skip separate review. Still run relevant
73
+ checks and record the review gap or decision:
74
+
75
+ ```bash
76
+ trekoon --toon task update <task-id> --append "Review: <summary or accepted gap>"
77
+ ```