trekoon 0.3.3 → 0.3.4
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 +51 -2
- package/README.md +152 -126
- package/docs/ai-agents.md +105 -104
- package/docs/commands.md +137 -167
- package/docs/machine-contracts.md +67 -68
- package/docs/quickstart.md +73 -148
- package/package.json +1 -1
- package/src/commands/help.ts +239 -252
- package/src/commands/quickstart.ts +67 -77
- package/src/commands/skills.ts +104 -19
- package/src/commands/sync.ts +93 -5
- 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 +80 -52
- package/src/sync/types.ts +12 -0
package/src/commands/help.ts
CHANGED
|
@@ -10,37 +10,38 @@ const ROOT_HELP = [
|
|
|
10
10
|
" trekoon [global-options] <command> [command-options]",
|
|
11
11
|
"",
|
|
12
12
|
"Global options:",
|
|
13
|
-
" --json
|
|
14
|
-
" --toon
|
|
15
|
-
" --compat <mode>
|
|
16
|
-
" --help Show root or command
|
|
13
|
+
" --json Structured JSON output",
|
|
14
|
+
" --toon TOON-encoded output (preferred for agents)",
|
|
15
|
+
" --compat <mode> Machine compatibility mode",
|
|
16
|
+
" --help Show help for root or a command",
|
|
17
17
|
" --version Print CLI version",
|
|
18
18
|
"",
|
|
19
19
|
"Commands:",
|
|
20
|
-
" help Show root or command
|
|
21
|
-
" init
|
|
22
|
-
" quickstart
|
|
23
|
-
" wipe
|
|
24
|
-
" board
|
|
25
|
-
" epic
|
|
26
|
-
" task
|
|
27
|
-
" subtask
|
|
28
|
-
" dep
|
|
29
|
-
" events
|
|
30
|
-
" migrate
|
|
31
|
-
" session
|
|
32
|
-
"
|
|
33
|
-
"
|
|
20
|
+
" help Show help for root or a command",
|
|
21
|
+
" init Create or re-bootstrap .trekoon storage",
|
|
22
|
+
" quickstart Storage model, agent loop, and common patterns",
|
|
23
|
+
" wipe Delete repo-wide .trekoon state (requires --yes)",
|
|
24
|
+
" board Open or update the local board",
|
|
25
|
+
" epic Create, list, update, search, and track epics",
|
|
26
|
+
" task Create, list, update, search, and complete tasks",
|
|
27
|
+
" subtask Create, list, update, and search subtasks",
|
|
28
|
+
" dep Manage dependency edges between tasks and subtasks",
|
|
29
|
+
" events Prune old sync event log rows",
|
|
30
|
+
" migrate Check schema version or roll back migrations",
|
|
31
|
+
" session Agent orientation (diagnostics + sync + next task)",
|
|
32
|
+
" suggest Priority-ranked next-action suggestions",
|
|
33
|
+
" sync Pull events and resolve conflicts across branches",
|
|
34
|
+
" skills Install, link, or update the Trekoon skill",
|
|
34
35
|
" update Alias for skills update",
|
|
35
36
|
].join("\n");
|
|
36
37
|
|
|
37
38
|
const INIT_HELP = [
|
|
38
39
|
"Usage: trekoon init [--json|--toon]",
|
|
39
40
|
"",
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
41
|
+
"Creates or re-bootstraps the repo-scoped .trekoon directory and database.",
|
|
42
|
+
"In worktree setups, every worktree shares the same DB.",
|
|
43
|
+
"",
|
|
44
|
+
"Keep .trekoon gitignored. Committing the SQLite DB is not a recovery path.",
|
|
44
45
|
"",
|
|
45
46
|
"Examples:",
|
|
46
47
|
" trekoon init",
|
|
@@ -50,17 +51,19 @@ const INIT_HELP = [
|
|
|
50
51
|
const QUICKSTART_HELP = [
|
|
51
52
|
"Usage: trekoon quickstart [--json|--toon]",
|
|
52
53
|
"",
|
|
53
|
-
"
|
|
54
|
-
"
|
|
54
|
+
"Prints the storage model, agent execution loop, and common command patterns.",
|
|
55
|
+
"",
|
|
56
|
+
"Recommended startup flow:",
|
|
57
|
+
" 1. trekoon --toon session",
|
|
58
|
+
" 2. Stop if diagnostics report recoveryRequired or a tracked/ignored mismatch",
|
|
59
|
+
" 3. If behind: trekoon --toon sync pull --from main",
|
|
60
|
+
" 4. Claim work: trekoon --toon task update <task-id> --status in_progress",
|
|
61
|
+
" 5. Finish: trekoon --toon task done <task-id>",
|
|
55
62
|
"",
|
|
56
|
-
"
|
|
57
|
-
" 1
|
|
58
|
-
" 2
|
|
59
|
-
" 3
|
|
60
|
-
" 4) trekoon --toon task ready --limit 5",
|
|
61
|
-
" 5) trekoon --toon task next",
|
|
62
|
-
" 6) trekoon --toon dep reverse <task-or-subtask-id>",
|
|
63
|
-
" 7) trekoon --toon task update <task-id> --status in_progress",
|
|
63
|
+
"Manual bootstrap (if you need step-by-step):",
|
|
64
|
+
" 1. trekoon --toon init",
|
|
65
|
+
" 2. trekoon --toon sync status",
|
|
66
|
+
" 3. trekoon --toon task next",
|
|
64
67
|
"",
|
|
65
68
|
"Examples:",
|
|
66
69
|
" trekoon quickstart",
|
|
@@ -70,16 +73,14 @@ const QUICKSTART_HELP = [
|
|
|
70
73
|
const WIPE_HELP = [
|
|
71
74
|
"Usage: trekoon wipe --yes [--json|--toon]",
|
|
72
75
|
"",
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
" In git worktrees this erases the same .trekoon state for every linked worktree.",
|
|
76
|
+
"Deletes the shared .trekoon directory for the entire repository.",
|
|
77
|
+
"In worktree setups, this erases state for every linked worktree.",
|
|
76
78
|
"",
|
|
77
79
|
"Options:",
|
|
78
|
-
" --yes Required
|
|
80
|
+
" --yes Required. Confirms you want the destructive delete.",
|
|
79
81
|
"",
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
" Do not use wipe to fix gitignore mistakes or to replace bootstrap diagnostics.",
|
|
82
|
+
"This is a last-resort recovery tool. Don't use it to fix gitignore",
|
|
83
|
+
"issues or replace proper bootstrap diagnostics.",
|
|
83
84
|
"",
|
|
84
85
|
"Examples:",
|
|
85
86
|
" trekoon wipe --yes",
|
|
@@ -89,15 +90,12 @@ const BOARD_HELP = [
|
|
|
89
90
|
"Usage: trekoon board <open|update>",
|
|
90
91
|
"",
|
|
91
92
|
"Subcommands:",
|
|
92
|
-
" open",
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
" and launch metadata.",
|
|
96
|
-
" update",
|
|
97
|
-
" Refresh board runtime assets only. Does not start the server or open a browser.",
|
|
93
|
+
" open Install board assets, start a local server on 127.0.0.1,",
|
|
94
|
+
" and open the browser. Returns the board URL and a fallback URL.",
|
|
95
|
+
" update Refresh board runtime assets only. No server, no browser.",
|
|
98
96
|
"",
|
|
99
|
-
"Environment
|
|
100
|
-
" TREKOON_BOARD_ASSET_ROOT
|
|
97
|
+
"Environment:",
|
|
98
|
+
" TREKOON_BOARD_ASSET_ROOT Override the bundled asset source (tests/dev only).",
|
|
101
99
|
"",
|
|
102
100
|
"Examples:",
|
|
103
101
|
" trekoon board open",
|
|
@@ -105,172 +103,135 @@ const BOARD_HELP = [
|
|
|
105
103
|
].join("\n");
|
|
106
104
|
|
|
107
105
|
const EPIC_HELP = [
|
|
108
|
-
"Usage: trekoon epic <create|expand|list|show|search|replace|update|delete> [options]",
|
|
106
|
+
"Usage: trekoon epic <create|expand|list|show|search|replace|update|delete|progress> [options]",
|
|
109
107
|
"",
|
|
110
|
-
"Create
|
|
108
|
+
"Create:",
|
|
111
109
|
" trekoon epic create --title \"...\" --description \"...\" [--status <status>]",
|
|
112
110
|
" trekoon epic create --title \"...\" --description \"...\" [--task <spec>] [--subtask <spec>] [--dep <spec>]",
|
|
113
|
-
"
|
|
114
|
-
"
|
|
111
|
+
" When the full tree is known, the second form creates everything in one shot",
|
|
112
|
+
" and returns mappings/counts. Same compact spec grammar as epic expand.",
|
|
115
113
|
"",
|
|
116
|
-
"Expand
|
|
114
|
+
"Expand:",
|
|
117
115
|
" trekoon epic expand <epic-id> [--task <spec>] [--subtask <spec>] [--dep <spec>]",
|
|
118
116
|
" --task <temp-key>|<title>|<description>|<status>",
|
|
119
|
-
` --subtask <parent-ref>|<temp-key>|<title>|<description>|<status> (
|
|
120
|
-
` --dep <source-ref>|<depends-on-ref> (refs can be
|
|
121
|
-
" Escapes
|
|
122
|
-
"",
|
|
123
|
-
"List
|
|
124
|
-
" Defaults:",
|
|
125
|
-
"
|
|
126
|
-
"
|
|
127
|
-
"
|
|
128
|
-
"
|
|
129
|
-
"
|
|
130
|
-
"
|
|
131
|
-
"
|
|
132
|
-
"
|
|
133
|
-
"
|
|
134
|
-
"",
|
|
135
|
-
"
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
"
|
|
139
|
-
"
|
|
140
|
-
"
|
|
141
|
-
"
|
|
142
|
-
"
|
|
143
|
-
"",
|
|
144
|
-
"
|
|
145
|
-
"
|
|
146
|
-
"
|
|
147
|
-
"
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"
|
|
151
|
-
"
|
|
152
|
-
"
|
|
153
|
-
"",
|
|
154
|
-
"Update behavior:",
|
|
155
|
-
" Repo-wide bulk mode:",
|
|
156
|
-
" trekoon epic update --all --append <text> [--status <status>]",
|
|
157
|
-
" trekoon epic update --ids <csv> --append <text> [--status <status>]",
|
|
158
|
-
" - preserves existing per-row bulk behavior; not one atomic multi-row update",
|
|
159
|
-
" Descendant cascade mode:",
|
|
160
|
-
" trekoon epic update <epic-id> --all --status done|todo",
|
|
161
|
-
" - cascades atomically through descendant tasks and subtasks",
|
|
162
|
-
" - blocked descendants abort the whole update",
|
|
163
|
-
" - cascade mode supports only --status done|todo",
|
|
164
|
-
" - do not combine positional id + --all with --ids, --append, --description, or --title",
|
|
117
|
+
` --subtask <parent-ref>|<temp-key>|<title>|<description>|<status> (${"@"}<temp-key> for new parents)`,
|
|
118
|
+
` --dep <source-ref>|<depends-on-ref> (refs can be IDs or ${"@"}<temp-key>)`,
|
|
119
|
+
" Escapes in compact specs: \\| for |, \\\\ for \\, \\n, \\r, \\t",
|
|
120
|
+
"",
|
|
121
|
+
"List:",
|
|
122
|
+
" Defaults: open work only (in_progress, todo), limit 10.",
|
|
123
|
+
" --status <csv> | --limit <n> | --cursor <n> | --all | --view table|compact",
|
|
124
|
+
" Pagination: --cursor is offset-like. Machine output has meta.pagination.hasMore / nextCursor.",
|
|
125
|
+
" --all is mutually exclusive with --status, --limit, and --cursor.",
|
|
126
|
+
"",
|
|
127
|
+
"Show:",
|
|
128
|
+
" --view table (default) | compact | tree | detail",
|
|
129
|
+
" With --all in machine mode, defaults to detail view.",
|
|
130
|
+
"",
|
|
131
|
+
"Search/Replace:",
|
|
132
|
+
" trekoon epic search <epic-id> \"search text\" [--fields title|description|title,description] [--preview]",
|
|
133
|
+
" Searches epic + descendant task/subtask titles and descriptions.",
|
|
134
|
+
"",
|
|
135
|
+
" trekoon epic replace <epic-id> --search \"text\" --replace \"text\" [--apply]",
|
|
136
|
+
" Preview is default. Use --apply to write changes. --preview and --apply are mutually exclusive.",
|
|
137
|
+
"",
|
|
138
|
+
"Update (bulk mode, no positional ID):",
|
|
139
|
+
" trekoon epic update --all --append <text> [--status <status>]",
|
|
140
|
+
" trekoon epic update --ids <csv> --append <text> [--status <status>]",
|
|
141
|
+
" Per-row updates, not one atomic transaction.",
|
|
142
|
+
"",
|
|
143
|
+
"Update (cascade mode, with positional ID):",
|
|
144
|
+
" trekoon epic update <epic-id> --all --status done|todo",
|
|
145
|
+
" Cascades atomically through all descendant tasks and subtasks.",
|
|
146
|
+
" Blocked descendants abort the whole update. Only --status done|todo is supported.",
|
|
147
|
+
" Don't combine positional ID + --all with --ids, --append, --description, or --title.",
|
|
148
|
+
"",
|
|
149
|
+
"Progress:",
|
|
150
|
+
" trekoon epic progress <epic-id>",
|
|
151
|
+
" Returns done/in_progress/blocked/todo counts, readyCount, and nextCandidate.",
|
|
165
152
|
].join("\n");
|
|
166
153
|
|
|
167
154
|
const TASK_HELP = [
|
|
168
155
|
"Usage: trekoon task <create|create-many|list|show|ready|next|done|search|replace|update|delete> [options]",
|
|
169
156
|
"",
|
|
170
|
-
"Create-many
|
|
157
|
+
"Create-many:",
|
|
171
158
|
" trekoon task create-many --epic <epic-id> --task <spec> [--task <spec> ...]",
|
|
172
159
|
" --task <temp-key>|<title>|<description>|<status>",
|
|
173
|
-
"
|
|
174
|
-
"
|
|
175
|
-
"
|
|
176
|
-
"",
|
|
177
|
-
"
|
|
178
|
-
"
|
|
179
|
-
"
|
|
180
|
-
"
|
|
181
|
-
"
|
|
182
|
-
"
|
|
183
|
-
"
|
|
184
|
-
"
|
|
185
|
-
"
|
|
186
|
-
"
|
|
187
|
-
"
|
|
188
|
-
"",
|
|
189
|
-
"
|
|
190
|
-
"
|
|
191
|
-
"
|
|
192
|
-
"
|
|
193
|
-
"
|
|
194
|
-
"
|
|
195
|
-
"
|
|
196
|
-
"
|
|
197
|
-
"",
|
|
198
|
-
"
|
|
199
|
-
"
|
|
200
|
-
"
|
|
201
|
-
"
|
|
202
|
-
"
|
|
203
|
-
"
|
|
204
|
-
"
|
|
205
|
-
"
|
|
206
|
-
"",
|
|
207
|
-
"
|
|
208
|
-
"
|
|
209
|
-
"
|
|
210
|
-
"
|
|
211
|
-
"
|
|
212
|
-
"
|
|
213
|
-
"
|
|
214
|
-
" - Preview is default; use --apply to mutate",
|
|
215
|
-
" - --preview and --apply are mutually exclusive",
|
|
216
|
-
"",
|
|
217
|
-
"Update behavior:",
|
|
218
|
-
" Repo-wide bulk mode:",
|
|
219
|
-
" trekoon task update --all --append <text> [--status <status>]",
|
|
220
|
-
" trekoon task update --ids <csv> --append <text> [--status <status>]",
|
|
221
|
-
" - preserves existing per-row bulk behavior; not one atomic multi-row update",
|
|
222
|
-
" Descendant cascade mode:",
|
|
223
|
-
" trekoon task update <task-id> --all --status done|todo",
|
|
224
|
-
" - cascades atomically through descendant subtasks",
|
|
225
|
-
" - blocked descendants abort the whole update",
|
|
226
|
-
" - cascade mode supports only --status done|todo",
|
|
227
|
-
" - do not combine positional id + --all with --ids, --append, --description, or --title",
|
|
160
|
+
" Multiple --task flags are applied in order.",
|
|
161
|
+
" Escapes in compact specs: \\| for |, \\\\ for \\, \\n, \\r, \\t",
|
|
162
|
+
"",
|
|
163
|
+
"List:",
|
|
164
|
+
" Defaults: open work only (in_progress, todo), limit 10.",
|
|
165
|
+
" --epic <id> | --status <csv> | --limit <n> | --cursor <n> | --all | --view table|compact",
|
|
166
|
+
" Pagination: --cursor is offset-like. Machine output has meta.pagination.hasMore / nextCursor.",
|
|
167
|
+
" --all is mutually exclusive with --status, --limit, and --cursor.",
|
|
168
|
+
"",
|
|
169
|
+
"Show:",
|
|
170
|
+
" --view table (default) | compact | tree | detail",
|
|
171
|
+
" With --all in machine mode, defaults to detail view.",
|
|
172
|
+
"",
|
|
173
|
+
"Ready/Next:",
|
|
174
|
+
" ready Returns unblocked candidates sorted by status, blockers, createdAt, id.",
|
|
175
|
+
" Options: --limit <n>, --epic <id>",
|
|
176
|
+
" next Returns the top ready candidate. Option: --epic <id>",
|
|
177
|
+
"",
|
|
178
|
+
"Done:",
|
|
179
|
+
" trekoon task done <task-id>",
|
|
180
|
+
" Marks the task complete, auto-transitions through in_progress if needed,",
|
|
181
|
+
" reports unblocked downstream tasks, warns about open subtasks, and returns",
|
|
182
|
+
" the next ready candidate.",
|
|
183
|
+
"",
|
|
184
|
+
"Search/Replace:",
|
|
185
|
+
" trekoon task search <task-id> \"search text\" [--fields title|description|title,description] [--preview]",
|
|
186
|
+
" Searches task + descendant subtask titles and descriptions.",
|
|
187
|
+
"",
|
|
188
|
+
" trekoon task replace <task-id> --search \"text\" --replace \"text\" [--apply]",
|
|
189
|
+
" Preview is default. Use --apply to write changes. --preview and --apply are mutually exclusive.",
|
|
190
|
+
"",
|
|
191
|
+
"Update (bulk mode, no positional ID):",
|
|
192
|
+
" trekoon task update --all --append <text> [--status <status>]",
|
|
193
|
+
" trekoon task update --ids <csv> --append <text> [--status <status>]",
|
|
194
|
+
" Per-row updates, not one atomic transaction.",
|
|
195
|
+
"",
|
|
196
|
+
"Update (cascade mode, with positional ID):",
|
|
197
|
+
" trekoon task update <task-id> --all --status done|todo",
|
|
198
|
+
" Cascades atomically through descendant subtasks.",
|
|
199
|
+
" Blocked descendants abort the whole update. Only --status done|todo is supported.",
|
|
200
|
+
" Don't combine positional ID + --all with --ids, --append, --description, or --title.",
|
|
228
201
|
].join("\n");
|
|
229
202
|
|
|
230
203
|
const SUBTASK_HELP = [
|
|
231
204
|
"Usage: trekoon subtask <create|create-many|list|search|replace|update|delete> [options]",
|
|
232
205
|
"",
|
|
233
|
-
"Create-many
|
|
206
|
+
"Create-many:",
|
|
234
207
|
" trekoon subtask create-many [<task-id>] [--task <task-id>] --subtask <spec> [--subtask <spec> ...]",
|
|
235
208
|
" --subtask <temp-key>|<title>|<description>|<status>",
|
|
236
|
-
" Positional <task-id> and --task
|
|
237
|
-
"
|
|
238
|
-
"
|
|
239
|
-
"
|
|
240
|
-
"",
|
|
241
|
-
"
|
|
242
|
-
"
|
|
243
|
-
"
|
|
244
|
-
"
|
|
245
|
-
"
|
|
246
|
-
"
|
|
247
|
-
"
|
|
248
|
-
"
|
|
249
|
-
"
|
|
250
|
-
"
|
|
251
|
-
"
|
|
252
|
-
"",
|
|
253
|
-
"
|
|
254
|
-
"
|
|
255
|
-
"
|
|
256
|
-
"
|
|
257
|
-
"
|
|
258
|
-
"
|
|
259
|
-
"
|
|
260
|
-
"
|
|
261
|
-
"
|
|
262
|
-
"",
|
|
263
|
-
"Update behavior:",
|
|
264
|
-
" Repo-wide bulk mode:",
|
|
265
|
-
" trekoon subtask update --all --append <text> [--status <status>]",
|
|
266
|
-
" trekoon subtask update --ids <csv> --append <text> [--status <status>]",
|
|
267
|
-
" - preserves existing per-row bulk behavior; not one atomic multi-row update",
|
|
268
|
-
" Positional-id cascade syntax:",
|
|
269
|
-
" trekoon subtask update <subtask-id> --all --status done|todo",
|
|
270
|
-
" - accepted for contract consistency",
|
|
271
|
-
" - behaves like a normal single-subtask status update",
|
|
272
|
-
" - positional id + --all supports only --status done|todo",
|
|
273
|
-
" - do not combine positional id + --all with --ids, --append, --description, or --title",
|
|
209
|
+
" Positional <task-id> and --task can be combined only when equal.",
|
|
210
|
+
" Multiple --subtask flags are applied in order.",
|
|
211
|
+
" Escapes in compact specs: \\| for |, \\\\ for \\, \\n, \\r, \\t",
|
|
212
|
+
"",
|
|
213
|
+
"List:",
|
|
214
|
+
" Defaults: open work only (in_progress, todo), limit 10.",
|
|
215
|
+
" --task <id> | --status <csv> | --limit <n> | --cursor <n> | --all | --view table|compact",
|
|
216
|
+
" Pagination: --cursor is offset-like. Machine output has meta.pagination.hasMore / nextCursor.",
|
|
217
|
+
" --all is mutually exclusive with --status, --limit, and --cursor.",
|
|
218
|
+
"",
|
|
219
|
+
"Search/Replace:",
|
|
220
|
+
" trekoon subtask search <subtask-id> \"search text\" [--fields title|description|title,description] [--preview]",
|
|
221
|
+
" Searches subtask title and description only.",
|
|
222
|
+
"",
|
|
223
|
+
" trekoon subtask replace <subtask-id> --search \"text\" --replace \"text\" [--apply]",
|
|
224
|
+
" Preview is default. Use --apply to write changes. --preview and --apply are mutually exclusive.",
|
|
225
|
+
"",
|
|
226
|
+
"Update (bulk mode, no positional ID):",
|
|
227
|
+
" trekoon subtask update --all --append <text> [--status <status>]",
|
|
228
|
+
" trekoon subtask update --ids <csv> --append <text> [--status <status>]",
|
|
229
|
+
" Per-row updates, not one atomic transaction.",
|
|
230
|
+
"",
|
|
231
|
+
"Update (positional-ID cascade syntax):",
|
|
232
|
+
" trekoon subtask update <subtask-id> --all --status done|todo",
|
|
233
|
+
" Accepted for consistency, but just updates the one subtask (no descendants).",
|
|
234
|
+
" Don't combine positional ID + --all with --ids, --append, --description, or --title.",
|
|
274
235
|
].join("\n");
|
|
275
236
|
|
|
276
237
|
const DEP_HELP = [
|
|
@@ -278,13 +239,12 @@ const DEP_HELP = [
|
|
|
278
239
|
"",
|
|
279
240
|
"Subcommands:",
|
|
280
241
|
" add <source-id> <depends-on-id>",
|
|
281
|
-
" Create dependency edge: source depends on depends-on.",
|
|
242
|
+
" Create a dependency edge: source depends on depends-on.",
|
|
282
243
|
" add-many --dep <source-ref>|<depends-on-ref> [--dep <spec> ...]",
|
|
283
|
-
" Create
|
|
284
|
-
"
|
|
285
|
-
" refs are reserved for higher-level compact batch workflows.",
|
|
244
|
+
" Create multiple edges from compact specs in order.",
|
|
245
|
+
" Uses persisted IDs only; @<temp-key> refs are for batch workflows.",
|
|
286
246
|
" remove <source-id> <depends-on-id>",
|
|
287
|
-
" Remove one dependency edge
|
|
247
|
+
" Remove one dependency edge.",
|
|
288
248
|
" list <source-id>",
|
|
289
249
|
" Show direct dependencies for a node.",
|
|
290
250
|
" reverse <target-id>",
|
|
@@ -300,13 +260,12 @@ const DEP_HELP = [
|
|
|
300
260
|
const EVENTS_HELP = [
|
|
301
261
|
"Usage: trekoon events prune [--dry-run] [--archive] [--retention-days <n>]",
|
|
302
262
|
"",
|
|
303
|
-
"
|
|
304
|
-
" Manage retention for internal sync event log rows.",
|
|
263
|
+
"Cleans up old sync event log rows.",
|
|
305
264
|
"",
|
|
306
265
|
"Options:",
|
|
307
|
-
" --dry-run Preview
|
|
308
|
-
" --archive Copy pruned rows to event_archive before
|
|
309
|
-
" --retention-days <n> Keep last n days (positive integer, default 90).",
|
|
266
|
+
" --dry-run Preview counts only, don't delete anything.",
|
|
267
|
+
" --archive Copy pruned rows to event_archive before deleting.",
|
|
268
|
+
" --retention-days <n> Keep the last n days (positive integer, default 90).",
|
|
310
269
|
"",
|
|
311
270
|
"Examples:",
|
|
312
271
|
" trekoon events prune --dry-run",
|
|
@@ -318,10 +277,8 @@ const MIGRATE_HELP = [
|
|
|
318
277
|
"Usage: trekoon migrate <status|rollback> [--to-version <n>]",
|
|
319
278
|
"",
|
|
320
279
|
"Subcommands:",
|
|
321
|
-
" status",
|
|
322
|
-
"
|
|
323
|
-
" rollback [--to-version <n>]",
|
|
324
|
-
" Roll back migrations; default target is one version back.",
|
|
280
|
+
" status Show current schema version, latest version, and pending count.",
|
|
281
|
+
" rollback [--to-version <n>] Roll back migrations. Defaults to one version back.",
|
|
325
282
|
"",
|
|
326
283
|
"Examples:",
|
|
327
284
|
" trekoon migrate status",
|
|
@@ -334,22 +291,32 @@ const SYNC_HELP = [
|
|
|
334
291
|
"",
|
|
335
292
|
"Subcommands:",
|
|
336
293
|
" status [--from <branch>]",
|
|
337
|
-
"
|
|
294
|
+
" Ahead/behind counts and pending conflicts vs a source branch (default: main).",
|
|
338
295
|
" pull --from <branch>",
|
|
339
|
-
" Pull
|
|
296
|
+
" Pull upstream tracker events from a source branch.",
|
|
340
297
|
" conflicts list [--mode pending|all]",
|
|
341
|
-
" List sync conflicts (default
|
|
298
|
+
" List sync conflicts (default: pending only).",
|
|
342
299
|
" conflicts show <conflict-id>",
|
|
343
300
|
" Show full details for one conflict.",
|
|
344
|
-
" resolve <conflict-id> --use ours|theirs",
|
|
345
|
-
" Resolve a
|
|
301
|
+
" resolve <conflict-id> --use ours|theirs [--dry-run]",
|
|
302
|
+
" Resolve a conflict. --dry-run previews without writing.",
|
|
303
|
+
"",
|
|
304
|
+
"Ours vs theirs:",
|
|
305
|
+
" Conflicts are field-level (e.g., status, title, description on one entity).",
|
|
306
|
+
" --use ours Keep the current DB value. Nothing is written.",
|
|
307
|
+
" --use theirs Overwrite the DB field with the source-branch value.",
|
|
346
308
|
"",
|
|
347
|
-
"
|
|
309
|
+
" Example: epic abc123, field: status",
|
|
310
|
+
" ours (current DB): in_progress",
|
|
311
|
+
" theirs (source branch): done",
|
|
312
|
+
" --use ours -> stays in_progress",
|
|
313
|
+
" --use theirs -> becomes done",
|
|
314
|
+
"",
|
|
315
|
+
"Compatibility:",
|
|
348
316
|
" --compat legacy-sync-command-ids",
|
|
349
|
-
" Emits legacy sync command IDs (sync_status, sync_pull, ...)",
|
|
350
|
-
"
|
|
351
|
-
" Migration:
|
|
352
|
-
" Planned compatibility window closes after 2026-09-30.",
|
|
317
|
+
" Emits legacy sync command IDs (sync_status, sync_pull, ...) in machine",
|
|
318
|
+
" output. Includes deprecation metadata. Window closes after 2026-09-30.",
|
|
319
|
+
" Migration: drop --compat and use dotted IDs (sync.status).",
|
|
353
320
|
"",
|
|
354
321
|
"Examples:",
|
|
355
322
|
" trekoon sync status",
|
|
@@ -362,15 +329,17 @@ const SYNC_HELP = [
|
|
|
362
329
|
].join("\n");
|
|
363
330
|
|
|
364
331
|
const SESSION_HELP = [
|
|
365
|
-
"Usage: trekoon session [--json|--toon]",
|
|
332
|
+
"Usage: trekoon session [--epic <epic-id>] [--json|--toon]",
|
|
333
|
+
"",
|
|
334
|
+
"One-call agent orientation. Opens the DB once and returns:",
|
|
335
|
+
" - diagnostics: storageMode, recoveryRequired, recoveryStatus",
|
|
336
|
+
" - sync: ahead/behind counts and pendingConflicts vs main",
|
|
337
|
+
" - next: full task tree with subtasks for the top ready candidate (null if none)",
|
|
338
|
+
" - nextDeps: blocker list with statuses (empty if none)",
|
|
339
|
+
" - readiness: readyCount and blockedCount across all open tasks",
|
|
366
340
|
"",
|
|
367
|
-
"
|
|
368
|
-
"
|
|
369
|
-
" - diagnostics: storageMode, recoveryRequired, recoveryStatus",
|
|
370
|
-
" - sync: ahead/behind counts and pendingConflicts vs main",
|
|
371
|
-
" - next: full task tree with subtasks for the top ready candidate (null if none)",
|
|
372
|
-
" - nextDeps: blocker list with statuses for the next task (empty if none)",
|
|
373
|
-
" - readiness: readyCount and blockedCount across all open tasks",
|
|
341
|
+
"Options:",
|
|
342
|
+
" --epic <epic-id> Scope readiness to a specific epic.",
|
|
374
343
|
"",
|
|
375
344
|
"Output modes:",
|
|
376
345
|
" human Multi-section summary (default in TTY)",
|
|
@@ -380,42 +349,59 @@ const SESSION_HELP = [
|
|
|
380
349
|
"Examples:",
|
|
381
350
|
" trekoon session",
|
|
382
351
|
" trekoon --toon session",
|
|
352
|
+
" trekoon --toon session --epic <epic-id>",
|
|
383
353
|
" trekoon --json session",
|
|
384
354
|
].join("\n");
|
|
385
355
|
|
|
356
|
+
const SUGGEST_HELP = [
|
|
357
|
+
"Usage: trekoon suggest [--epic <epic-id>] [--json|--toon]",
|
|
358
|
+
"",
|
|
359
|
+
"Returns up to 3 priority-ranked next-action suggestions based on recovery",
|
|
360
|
+
"state, sync status, task readiness, and epic progress.",
|
|
361
|
+
"",
|
|
362
|
+
"Options:",
|
|
363
|
+
" --epic <epic-id> Scope suggestions to a specific epic.",
|
|
364
|
+
"",
|
|
365
|
+
"Categories:",
|
|
366
|
+
" recovery Storage needs repair",
|
|
367
|
+
" sync Behind main or pending conflicts",
|
|
368
|
+
" execution In-progress or ready tasks to pick up",
|
|
369
|
+
" planning All blocked, epic close, or empty tracker",
|
|
370
|
+
"",
|
|
371
|
+
"Each suggestion includes an action, a ready-to-run command, and a reason.",
|
|
372
|
+
"",
|
|
373
|
+
"Examples:",
|
|
374
|
+
" trekoon suggest",
|
|
375
|
+
" trekoon --toon suggest",
|
|
376
|
+
" trekoon --toon suggest --epic <epic-id>",
|
|
377
|
+
].join("\n");
|
|
378
|
+
|
|
386
379
|
const SKILLS_HELP = [
|
|
387
380
|
"Usage:",
|
|
388
381
|
" trekoon skills install [--link --editor opencode|claude|pi] [--to <path>] [--allow-outside-repo]",
|
|
389
382
|
" trekoon skills install -g|--global [--editor opencode|claude|pi]",
|
|
390
383
|
" trekoon skills update",
|
|
391
384
|
"",
|
|
392
|
-
"
|
|
393
|
-
"
|
|
394
|
-
"",
|
|
395
|
-
"
|
|
396
|
-
"
|
|
397
|
-
"
|
|
398
|
-
"
|
|
399
|
-
"
|
|
400
|
-
" -
|
|
401
|
-
"
|
|
402
|
-
"
|
|
403
|
-
"",
|
|
404
|
-
"
|
|
405
|
-
"
|
|
406
|
-
"
|
|
407
|
-
"
|
|
408
|
-
"
|
|
409
|
-
" -
|
|
410
|
-
"",
|
|
411
|
-
"
|
|
412
|
-
" - Probes and repairs both global and local anchor/editor symlinks.",
|
|
413
|
-
" - Reports per-entry status: ok, repointed, created, migrated, skipped.",
|
|
414
|
-
" - Skips entries that are not installed; creates local editor links when",
|
|
415
|
-
" the editor config dir exists.",
|
|
416
|
-
"",
|
|
417
|
-
"Alias:",
|
|
418
|
-
" trekoon update → trekoon skills update",
|
|
385
|
+
"Installs or refreshes the Trekoon skill so AI agents can plan and execute.",
|
|
386
|
+
"",
|
|
387
|
+
"Local install (default):",
|
|
388
|
+
" Creates a symlink at .agents/skills/trekoon pointing to the bundled source,",
|
|
389
|
+
" so the skill always matches the installed CLI version.",
|
|
390
|
+
" --link Also create an editor symlink named 'trekoon'.",
|
|
391
|
+
" --editor <name> Required with --link (opencode|claude|pi).",
|
|
392
|
+
" --to <path> Override the symlink root for --link only.",
|
|
393
|
+
" --allow-outside-repo Allow links outside the repo (requires --link).",
|
|
394
|
+
"",
|
|
395
|
+
"Global install (-g|--global):",
|
|
396
|
+
" Creates a global symlink at ~/.agents/skills/trekoon and per-editor symlinks",
|
|
397
|
+
" under each editor's global skills directory.",
|
|
398
|
+
" --editor <name> Install for a single editor only.",
|
|
399
|
+
"",
|
|
400
|
+
"Update:",
|
|
401
|
+
" Probes and repairs both global and local symlinks.",
|
|
402
|
+
" Reports per-entry status: ok, repointed, created, migrated, skipped.",
|
|
403
|
+
"",
|
|
404
|
+
"Alias: trekoon update -> trekoon skills update",
|
|
419
405
|
"",
|
|
420
406
|
"Examples:",
|
|
421
407
|
" trekoon skills install",
|
|
@@ -441,6 +427,7 @@ const COMMAND_HELP: Record<string, string> = {
|
|
|
441
427
|
events: EVENTS_HELP,
|
|
442
428
|
migrate: MIGRATE_HELP,
|
|
443
429
|
sync: SYNC_HELP,
|
|
430
|
+
suggest: SUGGEST_HELP,
|
|
444
431
|
skills: SKILLS_HELP,
|
|
445
432
|
update: "Usage: trekoon update [--json|--toon]\n\nAlias for: trekoon skills update\n\nProbes and repairs all installed global and local skill symlinks.",
|
|
446
433
|
help: "Usage: trekoon help [command] [--json|--toon]",
|