trekoon 0.2.9 → 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.
- package/.agents/skills/trekoon/SKILL.md +162 -26
- package/README.md +18 -15
- package/docs/ai-agents.md +49 -4
- package/docs/commands.md +90 -16
- package/docs/machine-contracts.md +120 -0
- package/docs/plans/r1-unified-skill-rewrite.md +290 -0
- package/docs/plans/r10-suggest-command-skill-integration.md +152 -0
- package/docs/plans/r9-task-done-diff-skill-integration.md +113 -0
- package/docs/quickstart.md +41 -12
- package/package.json +23 -1
- package/src/board/assets/app.js +1 -0
- package/src/board/assets/components/EpicRow.js +21 -6
- package/src/board/assets/components/EpicsOverview.js +5 -1
- package/src/board/assets/components/Notice.js +19 -12
- package/src/board/assets/components/Workspace.js +16 -5
- package/src/board/assets/components/helpers.js +17 -0
- package/src/board/assets/runtime/clipboard.js +34 -0
- package/src/board/assets/runtime/delegation.js +33 -0
- package/src/board/assets/state/actions.js +68 -0
- package/src/board/assets/state/store.js +1 -0
- package/src/board/assets/styles/board.css +156 -36
- package/src/board/routes.ts +2 -0
- package/src/commands/epic.ts +74 -3
- package/src/commands/session.ts +7 -75
- package/src/commands/subtask.ts +7 -5
- package/src/commands/suggest.ts +283 -0
- package/src/commands/sync-helpers.ts +75 -0
- package/src/commands/task-readiness.ts +8 -20
- package/src/commands/task.ts +59 -3
- package/src/domain/mutation-service.ts +69 -42
- package/src/domain/tracker-domain.ts +151 -22
- package/src/domain/types.ts +12 -0
- package/src/index.ts +1 -1
- package/src/io/output.ts +4 -2
- package/src/runtime/cli-shell.ts +26 -3
- package/src/runtime/command-types.ts +1 -1
- package/src/storage/database.ts +43 -1
- package/src/storage/events-retention.ts +57 -8
- package/src/storage/migrations.ts +58 -3
- package/src/sync/service.ts +101 -24
- package/src/sync/types.ts +1 -0
|
@@ -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
|
-
|
|
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
|
-
|
|
42
|
-
|
|
43
|
-
|
|
79
|
+
```bash
|
|
80
|
+
trekoon --toon session --epic <epic-id>
|
|
81
|
+
```
|
|
44
82
|
|
|
45
|
-
|
|
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
|
|
88
|
+
trekoon --toon --compact session
|
|
49
89
|
```
|
|
50
90
|
|
|
51
|
-
|
|
52
|
-
|
|
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
|
-
|
|
145
|
+
Optionally assign ownership when multiple agents or people are working:
|
|
61
146
|
|
|
62
147
|
```bash
|
|
63
|
-
trekoon --toon task
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
81
|
-
|
|
82
|
-
|
|
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
|
-
|
|
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`
|
|
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"
|
|
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
|
@@ -28,7 +28,7 @@ Recommended (global install with Bun):
|
|
|
28
28
|
bun add -g trekoon
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
Alternative (npm global install):
|
|
31
|
+
Alternative (npm global install — Bun must still be installed as the runtime):
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
34
|
npm i -g trekoon
|
|
@@ -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
|
-
|
|
|
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
|
|
|
@@ -99,20 +102,19 @@ The browser flow is local-only by design:
|
|
|
99
102
|
Current runtime expectations:
|
|
100
103
|
|
|
101
104
|
- the local runtime is served from `.trekoon/board`
|
|
102
|
-
- the
|
|
103
|
-
|
|
104
|
-
-
|
|
105
|
-
|
|
106
|
-
network access is restored
|
|
105
|
+
- all assets are self-hosted: the board ships its own CSS, fonts (Inter,
|
|
106
|
+
Material Symbols), and vanilla JS with no framework or CDN dependencies
|
|
107
|
+
- the board works fully offline once `trekoon board open` copies the runtime
|
|
108
|
+
assets into `.trekoon/board`
|
|
107
109
|
|
|
108
110
|
Current board behavior to expect:
|
|
109
111
|
|
|
110
|
-
- the topbar is a compact single-row navbar showing the
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
-
|
|
114
|
-
|
|
115
|
-
|
|
112
|
+
- the topbar is a compact single-row navbar showing the Trekoon brand, Epics
|
|
113
|
+
and Board navigation, search, theme toggle, and a workspace info popover;
|
|
114
|
+
selecting an epic adds the active epic context to the topbar
|
|
115
|
+
- the board toggles between an epics overview and a task workspace view; task
|
|
116
|
+
detail opens as a modal overlay; responsive breakpoints adjust kanban column
|
|
117
|
+
counts and component spacing
|
|
116
118
|
- the page scrolls naturally as a single SPA surface; modal overlays (task
|
|
117
119
|
detail, subtask editor) lock body scroll while open
|
|
118
120
|
- overview cards are the primary entry point into an epic; clicking a card opens
|
|
@@ -132,8 +134,9 @@ agent to:
|
|
|
132
134
|
|
|
133
135
|
- use `--toon` by default
|
|
134
136
|
- prefer the smallest sufficient read
|
|
135
|
-
- use bulk planning commands when possible
|
|
136
|
-
-
|
|
137
|
+
- use transactional bulk planning commands when possible
|
|
138
|
+
- append progress and blocker notes instead of rewriting full descriptions
|
|
139
|
+
- preview scoped replace before `--apply`
|
|
137
140
|
- treat `.trekoon` as shared repo-scoped operational state
|
|
138
141
|
|
|
139
142
|
Read [AI agents and the Trekoon skill](docs/ai-agents.md) for installation,
|
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
|
|
@@ -79,16 +81,15 @@ Current shell/runtime notes:
|
|
|
79
81
|
|
|
80
82
|
- the runtime copied into `.trekoon/board` includes the HTML shell, local app
|
|
81
83
|
modules, and shared styles
|
|
82
|
-
-
|
|
83
|
-
|
|
84
|
-
-
|
|
85
|
-
|
|
86
|
-
network access is restored
|
|
84
|
+
- all assets are self-hosted: the board ships its own CSS, fonts (Inter,
|
|
85
|
+
Material Symbols), and vanilla JS with no framework or CDN dependencies
|
|
86
|
+
- the board works fully offline once the runtime assets are copied into
|
|
87
|
+
`.trekoon/board`
|
|
87
88
|
|
|
88
89
|
Board UI architecture:
|
|
89
90
|
|
|
90
|
-
- the board is a single-page application served from `.trekoon/board`
|
|
91
|
-
|
|
91
|
+
- the board is a single-page application served from `.trekoon/board` using a
|
|
92
|
+
zero-dependency vanilla JS component runtime with locally bundled CSS and fonts
|
|
92
93
|
- the backend is a Bun HTTP server exposing a REST API at `/api/*` with
|
|
93
94
|
token-based authentication; every mutation response includes an updated
|
|
94
95
|
snapshot so the client always has fresh state
|
|
@@ -100,10 +101,9 @@ Board layout behavior:
|
|
|
100
101
|
- the topbar is a compact flex-row navbar with workspace identity, Epics and
|
|
101
102
|
Board navigation pills, a debounced search input, theme toggle, and a
|
|
102
103
|
workspace info popover
|
|
103
|
-
-
|
|
104
|
-
|
|
105
|
-
-
|
|
106
|
-
or drawer-style views
|
|
104
|
+
- the board toggles between an epics overview and a task workspace view; task
|
|
105
|
+
detail opens as a modal overlay
|
|
106
|
+
- responsive breakpoints adjust kanban column counts and component spacing
|
|
107
107
|
- task cards show truncated descriptions; clicking anywhere on a card opens the
|
|
108
108
|
task detail modal
|
|
109
109
|
|
|
@@ -121,8 +121,8 @@ Board API endpoints (all require token authentication):
|
|
|
121
121
|
- `GET /api/snapshot` — full board state (epics, tasks, subtasks, dependencies,
|
|
122
122
|
counts)
|
|
123
123
|
- `PATCH /api/epics/{id}` — update epic title, description, or status
|
|
124
|
-
- `PATCH /api/tasks/{id}` — update task title, description, or
|
|
125
|
-
- `PATCH /api/subtasks/{id}` — update subtask title, description, or
|
|
124
|
+
- `PATCH /api/tasks/{id}` — update task title, description, status, or owner
|
|
125
|
+
- `PATCH /api/subtasks/{id}` — update subtask title, description, status, or owner
|
|
126
126
|
- `POST /api/subtasks` — create subtask (requires taskId, title)
|
|
127
127
|
- `DELETE /api/subtasks/{id}` — delete subtask
|
|
128
128
|
- `POST /api/dependencies` — add dependency edge (sourceId, dependsOnId)
|
|
@@ -151,7 +151,7 @@ trekoon board update
|
|
|
151
151
|
|
|
152
152
|
These defaults apply to `epic list`, `task list`, and `subtask list`:
|
|
153
153
|
|
|
154
|
-
- Default scope: open work only (`in_progress`, `
|
|
154
|
+
- Default scope: open work only (`in_progress`, `todo`)
|
|
155
155
|
- Default limit: `10`
|
|
156
156
|
- Status filter: `--status in_progress,todo`
|
|
157
157
|
- Custom limit: `--limit <n>`
|
|
@@ -219,6 +219,80 @@ trekoon task update <task-id> --all --status todo
|
|
|
219
219
|
trekoon subtask update <subtask-id> --all --status done
|
|
220
220
|
```
|
|
221
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
|
+
|
|
222
296
|
## Related docs
|
|
223
297
|
|
|
224
298
|
- [Quickstart](quickstart.md)
|