trekoon 0.3.3 → 0.3.5
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 +93 -3
- package/README.md +152 -126
- package/docs/ai-agents.md +105 -104
- package/docs/commands.md +145 -167
- package/docs/machine-contracts.md +240 -68
- package/docs/quickstart.md +78 -148
- package/package.json +1 -1
- package/src/commands/help.ts +249 -253
- package/src/commands/quickstart.ts +73 -77
- package/src/commands/skills.ts +104 -19
- package/src/commands/sync.ts +188 -15
- package/src/domain/tracker-domain.ts +210 -37
- package/src/storage/events-retention.ts +72 -0
- package/src/storage/migrations.ts +28 -0
- package/src/sync/event-writes.ts +8 -6
- package/src/sync/service.ts +299 -64
- package/src/sync/types.ts +36 -0
package/docs/quickstart.md
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
# Quickstart
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
workflow.
|
|
3
|
+
Shortest path from zero to a working Trekoon workflow.
|
|
5
4
|
|
|
6
|
-
##
|
|
5
|
+
## How storage works
|
|
7
6
|
|
|
8
|
-
Trekoon
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
Trekoon keeps one SQLite database per repository at `.trekoon/trekoon.db`. In
|
|
8
|
+
worktree setups, all worktrees share the same database because storage resolves
|
|
9
|
+
from the repository root.
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
- `sharedStorageRoot` identifies the repository root that owns `.trekoon`.
|
|
14
|
-
- `databaseFile` points at the shared SQLite database.
|
|
15
|
-
- `.trekoon` stays gitignored because the DB is operational state, not source
|
|
16
|
-
code.
|
|
11
|
+
Key points:
|
|
17
12
|
|
|
18
|
-
|
|
13
|
+
- `.trekoon` is gitignored. It's operational state, not source code.
|
|
14
|
+
- Outside git repos, Trekoon falls back to the current working directory.
|
|
15
|
+
- `worktreeRoot` is your checkout. `sharedStorageRoot` is the repo root that
|
|
16
|
+
owns `.trekoon`.
|
|
19
17
|
|
|
20
18
|
## Initialize
|
|
21
19
|
|
|
@@ -24,93 +22,30 @@ trekoon init
|
|
|
24
22
|
trekoon --version
|
|
25
23
|
```
|
|
26
24
|
|
|
27
|
-
If an agent is driving the workflow
|
|
25
|
+
If an agent is driving the workflow:
|
|
28
26
|
|
|
29
27
|
```bash
|
|
30
28
|
trekoon --toon init
|
|
31
29
|
trekoon --toon sync status
|
|
32
30
|
```
|
|
33
31
|
|
|
34
|
-
|
|
32
|
+
Run `init` once per repository. It creates the shared storage root and installs
|
|
33
|
+
the board runtime under `.trekoon/board`. If `sync status` reports
|
|
34
|
+
`recoveryRequired` or a tracked/ignored mismatch, fix the setup before
|
|
35
|
+
continuing.
|
|
35
36
|
|
|
36
|
-
|
|
37
|
-
shared storage root and install the bundled board runtime under
|
|
38
|
-
`.trekoon/board`.
|
|
39
|
-
- Run `trekoon --toon sync status` before agent work to inspect diagnostics.
|
|
40
|
-
- If diagnostics report `recoveryRequired`, a tracked or ignored mismatch, or an
|
|
41
|
-
ambiguous recovery path, stop and repair setup before continuing.
|
|
42
|
-
|
|
43
|
-
## Open the local board
|
|
44
|
-
|
|
45
|
-
After `trekoon init`, you can browse and update the same repo-shared Trekoon
|
|
46
|
-
state in the browser:
|
|
37
|
+
## Open the board
|
|
47
38
|
|
|
48
39
|
```bash
|
|
49
40
|
trekoon board open
|
|
50
|
-
trekoon board update
|
|
51
41
|
```
|
|
52
42
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
opening the browser.
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
- `trekoon board open` ensures bundled board assets are installed, starts a
|
|
61
|
-
loopback-only server on `127.0.0.1`, opens the browser, and prints a fallback
|
|
62
|
-
URL you can paste manually if launch fails
|
|
63
|
-
- `trekoon board update` refreshes the runtime assets in `.trekoon/board`
|
|
64
|
-
without opening a browser or starting the server
|
|
65
|
-
|
|
66
|
-
Why the board uses a local server instead of a bare HTML file:
|
|
67
|
-
|
|
68
|
-
- the UI needs live reads and writes against Trekoon data, not a static export
|
|
69
|
-
- the server binds only to `127.0.0.1`
|
|
70
|
-
- each `board open` call generates a per-session token used by the browser/API
|
|
71
|
-
- bundled assets are copied from the CLI package into `.trekoon/board`, so the
|
|
72
|
-
board works without a separate frontend install or local build step
|
|
73
|
-
|
|
74
|
-
Current runtime expectations for operators:
|
|
75
|
-
|
|
76
|
-
- the served HTML, styles, and board app files come from the local
|
|
77
|
-
`.trekoon/board` runtime directory
|
|
78
|
-
- all assets are self-hosted: the board ships its own CSS, fonts (Inter,
|
|
79
|
-
Material Symbols), and vanilla JS with no framework or CDN dependencies
|
|
80
|
-
- the board works fully offline once the runtime assets are copied into
|
|
81
|
-
`.trekoon/board`
|
|
82
|
-
|
|
83
|
-
Current layout behavior:
|
|
84
|
-
|
|
85
|
-
- the topbar is a compact navbar with workspace identity, Epics and Board
|
|
86
|
-
navigation, debounced search, theme toggle, and workspace info
|
|
87
|
-
- the board toggles between an epics overview and a task workspace view; task
|
|
88
|
-
detail opens as a modal overlay
|
|
89
|
-
- responsive breakpoints adjust kanban column counts and component spacing so
|
|
90
|
-
the board remains navigable on narrower widths
|
|
91
|
-
- the page scrolls naturally as one document; modal overlays lock body scroll
|
|
92
|
-
while open
|
|
93
|
-
- task cards show truncated descriptions; clicking a card opens the task detail
|
|
94
|
-
modal with the full description and edit controls
|
|
95
|
-
- search filters client-side across titles, descriptions, statuses, and subtask
|
|
96
|
-
content with a 180ms debounce
|
|
97
|
-
|
|
98
|
-
Verification checklist for operators:
|
|
99
|
-
|
|
100
|
-
1. Open the board with `trekoon board open` and confirm the first view is the
|
|
101
|
-
epic overview with all epics listed and scrollable.
|
|
102
|
-
2. Click an epic card and confirm you enter the board workspace with the topbar
|
|
103
|
-
showing the active epic context.
|
|
104
|
-
3. Type in search and verify results filter as you type; confirm focus stays in
|
|
105
|
-
the search input while typing.
|
|
106
|
-
4. Click a task card and confirm the task detail modal opens with the full
|
|
107
|
-
description, edit form, and subtask list.
|
|
108
|
-
5. On desktop width, confirm the kanban board shows multiple columns.
|
|
109
|
-
6. Resize to a narrow viewport and confirm columns reflow cleanly without
|
|
110
|
-
horizontal overflow.
|
|
111
|
-
7. Close modals and confirm you return to the previous board context.
|
|
112
|
-
|
|
113
|
-
## Create an epic, task, and subtask
|
|
43
|
+
Starts a loopback-only server on `127.0.0.1`, opens the browser, and prints a
|
|
44
|
+
fallback URL. The board is a self-hosted single-page app with no CDN
|
|
45
|
+
dependencies, so it works offline once initialized. Use `trekoon board update`
|
|
46
|
+
if you just need to refresh the runtime assets without opening the browser.
|
|
47
|
+
|
|
48
|
+
## Create work
|
|
114
49
|
|
|
115
50
|
```bash
|
|
116
51
|
trekoon epic create --title "Agent backlog stabilization" --description "Track stabilization work" --status todo
|
|
@@ -118,7 +53,7 @@ trekoon task create --title "Implement sync status" --description "Add status re
|
|
|
118
53
|
trekoon subtask create --task <task-id> --title "Add cursor model" --status todo
|
|
119
54
|
```
|
|
120
55
|
|
|
121
|
-
|
|
56
|
+
Browse results:
|
|
122
57
|
|
|
123
58
|
```bash
|
|
124
59
|
trekoon task list
|
|
@@ -127,10 +62,9 @@ trekoon task list --limit 25
|
|
|
127
62
|
trekoon task list --all --view compact
|
|
128
63
|
```
|
|
129
64
|
|
|
130
|
-
##
|
|
65
|
+
## One-shot planning
|
|
131
66
|
|
|
132
|
-
If you already know the epic tree, create
|
|
133
|
-
dependencies in one call:
|
|
67
|
+
If you already know the full epic tree, create everything in one call:
|
|
134
68
|
|
|
135
69
|
```bash
|
|
136
70
|
trekoon epic create \
|
|
@@ -143,84 +77,57 @@ trekoon epic create \
|
|
|
143
77
|
--dep "@sub-a|@task-a"
|
|
144
78
|
```
|
|
145
79
|
|
|
146
|
-
|
|
80
|
+
This is better than sequential creates because later records can reference
|
|
81
|
+
earlier ones with `@temp-key`, and you get one atomic operation with mappings
|
|
82
|
+
and counts in the response.
|
|
147
83
|
|
|
148
|
-
|
|
149
|
-
- later records need to reference earlier records with `@temp-key`
|
|
150
|
-
- you want one atomic create step and one machine response with mappings and
|
|
151
|
-
counts
|
|
152
|
-
|
|
153
|
-
## Add dependencies
|
|
84
|
+
## Dependencies
|
|
154
85
|
|
|
155
86
|
```bash
|
|
156
87
|
trekoon dep add <task-id> <depends-on-id>
|
|
157
88
|
trekoon dep list <task-id>
|
|
158
89
|
```
|
|
159
90
|
|
|
160
|
-
##
|
|
91
|
+
## Batch commands
|
|
161
92
|
|
|
162
|
-
|
|
163
|
-
batch commands:
|
|
93
|
+
For larger updates, use batch commands instead of looping:
|
|
164
94
|
|
|
165
95
|
| Need | Command |
|
|
166
96
|
| --- | --- |
|
|
167
|
-
|
|
|
168
|
-
|
|
|
169
|
-
|
|
|
170
|
-
| Expand an existing epic
|
|
171
|
-
|
|
172
|
-
These commands validate the whole batch before applying changes, so a bad input
|
|
173
|
-
fails the whole operation instead of leaving partial state behind.
|
|
97
|
+
| Multiple tasks under one epic | `trekoon task create-many --epic <epic-id> --task ...` |
|
|
98
|
+
| Multiple subtasks under one task | `trekoon subtask create-many <task-id> --subtask ...` |
|
|
99
|
+
| Multiple dependency edges | `trekoon dep add-many --dep ...` |
|
|
100
|
+
| Expand an existing epic | `trekoon epic expand <epic-id> ...` |
|
|
174
101
|
|
|
175
|
-
|
|
102
|
+
These validate the whole batch before applying, so a bad input fails the entire
|
|
103
|
+
operation instead of leaving partial state.
|
|
176
104
|
|
|
177
|
-
|
|
178
|
-
positional-ID cascade form of `update --all`:
|
|
105
|
+
## Close or reopen a whole tree
|
|
179
106
|
|
|
180
107
|
```bash
|
|
181
108
|
trekoon epic update <epic-id> --all --status done
|
|
182
|
-
trekoon epic update <epic-id> --all --status todo
|
|
183
109
|
trekoon task update <task-id> --all --status done
|
|
184
|
-
trekoon task update <task-id> --all --status todo
|
|
185
|
-
trekoon subtask update <subtask-id> --all --status done
|
|
186
110
|
```
|
|
187
111
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
descendants atomically
|
|
192
|
-
- `task update <id> --all --status done|todo` updates the task and all
|
|
193
|
-
descendant subtasks atomically
|
|
194
|
-
- `subtask update <id> --all --status done|todo` is accepted for consistency,
|
|
195
|
-
but it only updates that one subtask
|
|
196
|
-
- Positional-ID cascade mode is status-only; do not combine it with `--append`,
|
|
197
|
-
`--description`, `--title`, or `--ids`
|
|
198
|
-
- If any epic/task descendant is blocked by an unresolved external dependency,
|
|
199
|
-
the whole cascade fails with no partial writes
|
|
112
|
+
Cascades atomically through all descendants. If any descendant has an unresolved
|
|
113
|
+
external dependency, the whole update fails with no partial writes. Works with
|
|
114
|
+
`--status done` and `--status todo` only.
|
|
200
115
|
|
|
201
|
-
## Check progress
|
|
202
|
-
|
|
203
|
-
After creating work, use `epic progress` to see status counts and the next ready
|
|
204
|
-
candidate:
|
|
116
|
+
## Check progress
|
|
205
117
|
|
|
206
118
|
```bash
|
|
207
119
|
trekoon epic progress <epic-id>
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
Use `suggest` for priority-ranked next-action recommendations:
|
|
211
|
-
|
|
212
|
-
```bash
|
|
213
120
|
trekoon suggest
|
|
214
121
|
trekoon suggest --epic <epic-id>
|
|
215
122
|
```
|
|
216
123
|
|
|
217
|
-
|
|
124
|
+
`epic progress` returns task status counts and the next ready candidate.
|
|
125
|
+
`suggest` gives priority-ranked next-action recommendations.
|
|
218
126
|
|
|
219
|
-
|
|
220
|
-
`in_progress`, `done`, and `blocked`. Direct jumps like `todo → done` are
|
|
221
|
-
rejected — use `task done` which auto-transitions through `in_progress`.
|
|
127
|
+
## Status machine
|
|
222
128
|
|
|
223
|
-
|
|
129
|
+
Trekoon enforces status transitions. The statuses are `todo`, `in_progress`,
|
|
130
|
+
`done`, and `blocked`.
|
|
224
131
|
|
|
225
132
|
| From | Allowed targets |
|
|
226
133
|
| --- | --- |
|
|
@@ -229,9 +136,10 @@ Valid transitions:
|
|
|
229
136
|
| `blocked` | `in_progress`, `todo` |
|
|
230
137
|
| `done` | `in_progress` |
|
|
231
138
|
|
|
232
|
-
|
|
139
|
+
Direct jumps like `todo` to `done` are rejected. Use `task done` instead, which
|
|
140
|
+
auto-transitions through `in_progress`.
|
|
233
141
|
|
|
234
|
-
Install the
|
|
142
|
+
## Install the AI skill
|
|
235
143
|
|
|
236
144
|
```bash
|
|
237
145
|
trekoon skills install # repo-local (default)
|
|
@@ -239,17 +147,39 @@ trekoon skills install -g # global (~/.agents/skills/trekoon)
|
|
|
239
147
|
trekoon skills install --link --editor claude # repo-local + editor symlink
|
|
240
148
|
```
|
|
241
149
|
|
|
242
|
-
After upgrading Trekoon, refresh
|
|
150
|
+
After upgrading Trekoon, refresh installed skills:
|
|
243
151
|
|
|
244
152
|
```bash
|
|
245
153
|
trekoon update # alias for: trekoon skills update
|
|
246
154
|
```
|
|
247
155
|
|
|
248
|
-
For
|
|
249
|
-
|
|
156
|
+
For agent integration details, see [AI agents and the Trekoon skill](ai-agents.md).
|
|
157
|
+
|
|
158
|
+
## Pre-merge sync
|
|
159
|
+
|
|
160
|
+
Before opening or merging a PR:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
trekoon --toon sync status
|
|
164
|
+
trekoon --toon sync pull --from main
|
|
165
|
+
trekoon --toon sync conflicts list
|
|
166
|
+
trekoon --toon sync conflicts show <id>
|
|
167
|
+
trekoon --toon sync resolve <id> --use theirs --dry-run
|
|
168
|
+
trekoon --toon sync resolve <id> --use ours|theirs
|
|
169
|
+
trekoon --toon sync resolve --all --use ours # batch: all pending at once
|
|
170
|
+
trekoon --toon sync status
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Always run `sync conflicts show` before resolving so you know what you're
|
|
174
|
+
overwriting. For uniform conflicts, `--all` resolves every pending conflict in
|
|
175
|
+
one command. Optional `--entity <id>` and `--field <name>` narrow the batch.
|
|
176
|
+
In human mode, `--use theirs` prompts for both single-conflict and batch
|
|
177
|
+
resolve. Single-conflict prompts include field/value details; batch prompts use
|
|
178
|
+
a count-only confirmation. All prompts time out after 30 seconds and default to
|
|
179
|
+
rejection. Toon mode skips prompts.
|
|
250
180
|
|
|
251
181
|
## What to read next
|
|
252
182
|
|
|
253
|
-
- [Command reference](commands.md)
|
|
254
|
-
- [AI agents and the Trekoon skill](ai-agents.md)
|
|
255
|
-
- [Machine contracts](machine-contracts.md)
|
|
183
|
+
- [Command reference](commands.md) for flags, defaults, and behavior
|
|
184
|
+
- [AI agents and the Trekoon skill](ai-agents.md) for agent integration
|
|
185
|
+
- [Machine contracts](machine-contracts.md) for structured output schemas
|