trekoon 0.3.2 → 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 +55 -6
- package/README.md +156 -122
- package/docs/ai-agents.md +105 -104
- package/docs/commands.md +137 -167
- package/docs/machine-contracts.md +67 -68
- package/docs/quickstart.md +87 -143
- package/package.json +2 -2
- package/src/board/assets/state/utils.js +1 -1
- package/src/commands/arg-parser.ts +10 -0
- package/src/commands/help.ts +243 -239
- package/src/commands/quickstart.ts +67 -77
- package/src/commands/skills.ts +517 -168
- package/src/commands/sync.ts +93 -5
- package/src/domain/tracker-domain.ts +210 -37
- package/src/runtime/cli-shell.ts +5 -0
- 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,36 +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",
|
|
35
|
+
" update Alias for skills update",
|
|
34
36
|
].join("\n");
|
|
35
37
|
|
|
36
38
|
const INIT_HELP = [
|
|
37
39
|
"Usage: trekoon init [--json|--toon]",
|
|
38
40
|
"",
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
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.",
|
|
43
45
|
"",
|
|
44
46
|
"Examples:",
|
|
45
47
|
" trekoon init",
|
|
@@ -49,17 +51,19 @@ const INIT_HELP = [
|
|
|
49
51
|
const QUICKSTART_HELP = [
|
|
50
52
|
"Usage: trekoon quickstart [--json|--toon]",
|
|
51
53
|
"",
|
|
52
|
-
"
|
|
53
|
-
"
|
|
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>",
|
|
54
62
|
"",
|
|
55
|
-
"
|
|
56
|
-
" 1
|
|
57
|
-
" 2
|
|
58
|
-
" 3
|
|
59
|
-
" 4) trekoon --toon task ready --limit 5",
|
|
60
|
-
" 5) trekoon --toon task next",
|
|
61
|
-
" 6) trekoon --toon dep reverse <task-or-subtask-id>",
|
|
62
|
-
" 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",
|
|
63
67
|
"",
|
|
64
68
|
"Examples:",
|
|
65
69
|
" trekoon quickstart",
|
|
@@ -69,16 +73,14 @@ const QUICKSTART_HELP = [
|
|
|
69
73
|
const WIPE_HELP = [
|
|
70
74
|
"Usage: trekoon wipe --yes [--json|--toon]",
|
|
71
75
|
"",
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
" 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.",
|
|
75
78
|
"",
|
|
76
79
|
"Options:",
|
|
77
|
-
" --yes Required
|
|
80
|
+
" --yes Required. Confirms you want the destructive delete.",
|
|
78
81
|
"",
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
" 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.",
|
|
82
84
|
"",
|
|
83
85
|
"Examples:",
|
|
84
86
|
" trekoon wipe --yes",
|
|
@@ -88,15 +90,12 @@ const BOARD_HELP = [
|
|
|
88
90
|
"Usage: trekoon board <open|update>",
|
|
89
91
|
"",
|
|
90
92
|
"Subcommands:",
|
|
91
|
-
" open",
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
" and launch metadata.",
|
|
95
|
-
" update",
|
|
96
|
-
" 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.",
|
|
97
96
|
"",
|
|
98
|
-
"Environment
|
|
99
|
-
" TREKOON_BOARD_ASSET_ROOT
|
|
97
|
+
"Environment:",
|
|
98
|
+
" TREKOON_BOARD_ASSET_ROOT Override the bundled asset source (tests/dev only).",
|
|
100
99
|
"",
|
|
101
100
|
"Examples:",
|
|
102
101
|
" trekoon board open",
|
|
@@ -104,172 +103,135 @@ const BOARD_HELP = [
|
|
|
104
103
|
].join("\n");
|
|
105
104
|
|
|
106
105
|
const EPIC_HELP = [
|
|
107
|
-
"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]",
|
|
108
107
|
"",
|
|
109
|
-
"Create
|
|
108
|
+
"Create:",
|
|
110
109
|
" trekoon epic create --title \"...\" --description \"...\" [--status <status>]",
|
|
111
110
|
" trekoon epic create --title \"...\" --description \"...\" [--task <spec>] [--subtask <spec>] [--dep <spec>]",
|
|
112
|
-
"
|
|
113
|
-
"
|
|
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.",
|
|
114
113
|
"",
|
|
115
|
-
"Expand
|
|
114
|
+
"Expand:",
|
|
116
115
|
" trekoon epic expand <epic-id> [--task <spec>] [--subtask <spec>] [--dep <spec>]",
|
|
117
116
|
" --task <temp-key>|<title>|<description>|<status>",
|
|
118
|
-
` --subtask <parent-ref>|<temp-key>|<title>|<description>|<status> (
|
|
119
|
-
` --dep <source-ref>|<depends-on-ref> (refs can be
|
|
120
|
-
" Escapes
|
|
121
|
-
"",
|
|
122
|
-
"List
|
|
123
|
-
" Defaults:",
|
|
124
|
-
"
|
|
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
|
-
"Update behavior:",
|
|
154
|
-
" Repo-wide bulk mode:",
|
|
155
|
-
" trekoon epic update --all --append <text> [--status <status>]",
|
|
156
|
-
" trekoon epic update --ids <csv> --append <text> [--status <status>]",
|
|
157
|
-
" - preserves existing per-row bulk behavior; not one atomic multi-row update",
|
|
158
|
-
" Descendant cascade mode:",
|
|
159
|
-
" trekoon epic update <epic-id> --all --status done|todo",
|
|
160
|
-
" - cascades atomically through descendant tasks and subtasks",
|
|
161
|
-
" - blocked descendants abort the whole update",
|
|
162
|
-
" - cascade mode supports only --status done|todo",
|
|
163
|
-
" - 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.",
|
|
164
152
|
].join("\n");
|
|
165
153
|
|
|
166
154
|
const TASK_HELP = [
|
|
167
155
|
"Usage: trekoon task <create|create-many|list|show|ready|next|done|search|replace|update|delete> [options]",
|
|
168
156
|
"",
|
|
169
|
-
"Create-many
|
|
157
|
+
"Create-many:",
|
|
170
158
|
" trekoon task create-many --epic <epic-id> --task <spec> [--task <spec> ...]",
|
|
171
159
|
" --task <temp-key>|<title>|<description>|<status>",
|
|
172
|
-
"
|
|
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
|
-
" - Preview is default; use --apply to mutate",
|
|
214
|
-
" - --preview and --apply are mutually exclusive",
|
|
215
|
-
"",
|
|
216
|
-
"Update behavior:",
|
|
217
|
-
" Repo-wide bulk mode:",
|
|
218
|
-
" trekoon task update --all --append <text> [--status <status>]",
|
|
219
|
-
" trekoon task update --ids <csv> --append <text> [--status <status>]",
|
|
220
|
-
" - preserves existing per-row bulk behavior; not one atomic multi-row update",
|
|
221
|
-
" Descendant cascade mode:",
|
|
222
|
-
" trekoon task update <task-id> --all --status done|todo",
|
|
223
|
-
" - cascades atomically through descendant subtasks",
|
|
224
|
-
" - blocked descendants abort the whole update",
|
|
225
|
-
" - cascade mode supports only --status done|todo",
|
|
226
|
-
" - 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.",
|
|
227
201
|
].join("\n");
|
|
228
202
|
|
|
229
203
|
const SUBTASK_HELP = [
|
|
230
204
|
"Usage: trekoon subtask <create|create-many|list|search|replace|update|delete> [options]",
|
|
231
205
|
"",
|
|
232
|
-
"Create-many
|
|
206
|
+
"Create-many:",
|
|
233
207
|
" trekoon subtask create-many [<task-id>] [--task <task-id>] --subtask <spec> [--subtask <spec> ...]",
|
|
234
208
|
" --subtask <temp-key>|<title>|<description>|<status>",
|
|
235
|
-
" Positional <task-id> and --task
|
|
236
|
-
"
|
|
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
|
-
"Update behavior:",
|
|
263
|
-
" Repo-wide bulk mode:",
|
|
264
|
-
" trekoon subtask update --all --append <text> [--status <status>]",
|
|
265
|
-
" trekoon subtask update --ids <csv> --append <text> [--status <status>]",
|
|
266
|
-
" - preserves existing per-row bulk behavior; not one atomic multi-row update",
|
|
267
|
-
" Positional-id cascade syntax:",
|
|
268
|
-
" trekoon subtask update <subtask-id> --all --status done|todo",
|
|
269
|
-
" - accepted for contract consistency",
|
|
270
|
-
" - behaves like a normal single-subtask status update",
|
|
271
|
-
" - positional id + --all supports only --status done|todo",
|
|
272
|
-
" - 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.",
|
|
273
235
|
].join("\n");
|
|
274
236
|
|
|
275
237
|
const DEP_HELP = [
|
|
@@ -277,13 +239,12 @@ const DEP_HELP = [
|
|
|
277
239
|
"",
|
|
278
240
|
"Subcommands:",
|
|
279
241
|
" add <source-id> <depends-on-id>",
|
|
280
|
-
" Create dependency edge: source depends on depends-on.",
|
|
242
|
+
" Create a dependency edge: source depends on depends-on.",
|
|
281
243
|
" add-many --dep <source-ref>|<depends-on-ref> [--dep <spec> ...]",
|
|
282
|
-
" Create
|
|
283
|
-
"
|
|
284
|
-
" 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.",
|
|
285
246
|
" remove <source-id> <depends-on-id>",
|
|
286
|
-
" Remove one dependency edge
|
|
247
|
+
" Remove one dependency edge.",
|
|
287
248
|
" list <source-id>",
|
|
288
249
|
" Show direct dependencies for a node.",
|
|
289
250
|
" reverse <target-id>",
|
|
@@ -299,13 +260,12 @@ const DEP_HELP = [
|
|
|
299
260
|
const EVENTS_HELP = [
|
|
300
261
|
"Usage: trekoon events prune [--dry-run] [--archive] [--retention-days <n>]",
|
|
301
262
|
"",
|
|
302
|
-
"
|
|
303
|
-
" Manage retention for internal sync event log rows.",
|
|
263
|
+
"Cleans up old sync event log rows.",
|
|
304
264
|
"",
|
|
305
265
|
"Options:",
|
|
306
|
-
" --dry-run Preview
|
|
307
|
-
" --archive Copy pruned rows to event_archive before
|
|
308
|
-
" --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).",
|
|
309
269
|
"",
|
|
310
270
|
"Examples:",
|
|
311
271
|
" trekoon events prune --dry-run",
|
|
@@ -317,10 +277,8 @@ const MIGRATE_HELP = [
|
|
|
317
277
|
"Usage: trekoon migrate <status|rollback> [--to-version <n>]",
|
|
318
278
|
"",
|
|
319
279
|
"Subcommands:",
|
|
320
|
-
" status",
|
|
321
|
-
"
|
|
322
|
-
" rollback [--to-version <n>]",
|
|
323
|
-
" 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.",
|
|
324
282
|
"",
|
|
325
283
|
"Examples:",
|
|
326
284
|
" trekoon migrate status",
|
|
@@ -333,22 +291,32 @@ const SYNC_HELP = [
|
|
|
333
291
|
"",
|
|
334
292
|
"Subcommands:",
|
|
335
293
|
" status [--from <branch>]",
|
|
336
|
-
"
|
|
294
|
+
" Ahead/behind counts and pending conflicts vs a source branch (default: main).",
|
|
337
295
|
" pull --from <branch>",
|
|
338
|
-
" Pull
|
|
296
|
+
" Pull upstream tracker events from a source branch.",
|
|
339
297
|
" conflicts list [--mode pending|all]",
|
|
340
|
-
" List sync conflicts (default
|
|
298
|
+
" List sync conflicts (default: pending only).",
|
|
341
299
|
" conflicts show <conflict-id>",
|
|
342
300
|
" Show full details for one conflict.",
|
|
343
|
-
" resolve <conflict-id> --use ours|theirs",
|
|
344
|
-
" 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.",
|
|
345
308
|
"",
|
|
346
|
-
"
|
|
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:",
|
|
347
316
|
" --compat legacy-sync-command-ids",
|
|
348
|
-
" Emits legacy sync command IDs (sync_status, sync_pull, ...)",
|
|
349
|
-
"
|
|
350
|
-
" Migration:
|
|
351
|
-
" 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).",
|
|
352
320
|
"",
|
|
353
321
|
"Examples:",
|
|
354
322
|
" trekoon sync status",
|
|
@@ -361,15 +329,17 @@ const SYNC_HELP = [
|
|
|
361
329
|
].join("\n");
|
|
362
330
|
|
|
363
331
|
const SESSION_HELP = [
|
|
364
|
-
"Usage: trekoon session [--json|--toon]",
|
|
332
|
+
"Usage: trekoon session [--epic <epic-id>] [--json|--toon]",
|
|
365
333
|
"",
|
|
366
|
-
"
|
|
367
|
-
"
|
|
368
|
-
"
|
|
369
|
-
"
|
|
370
|
-
"
|
|
371
|
-
"
|
|
372
|
-
"
|
|
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",
|
|
340
|
+
"",
|
|
341
|
+
"Options:",
|
|
342
|
+
" --epic <epic-id> Scope readiness to a specific epic.",
|
|
373
343
|
"",
|
|
374
344
|
"Output modes:",
|
|
375
345
|
" human Multi-section summary (default in TTY)",
|
|
@@ -379,37 +349,69 @@ const SESSION_HELP = [
|
|
|
379
349
|
"Examples:",
|
|
380
350
|
" trekoon session",
|
|
381
351
|
" trekoon --toon session",
|
|
352
|
+
" trekoon --toon session --epic <epic-id>",
|
|
382
353
|
" trekoon --json session",
|
|
383
354
|
].join("\n");
|
|
384
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
|
+
|
|
385
379
|
const SKILLS_HELP = [
|
|
386
380
|
"Usage:",
|
|
387
381
|
" trekoon skills install [--link --editor opencode|claude|pi] [--to <path>] [--allow-outside-repo]",
|
|
382
|
+
" trekoon skills install -g|--global [--editor opencode|claude|pi]",
|
|
388
383
|
" trekoon skills update",
|
|
389
384
|
"",
|
|
390
|
-
"
|
|
391
|
-
"
|
|
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.",
|
|
392
399
|
"",
|
|
393
|
-
"
|
|
394
|
-
"
|
|
395
|
-
"
|
|
396
|
-
" - Use --link to also create an editor symlink named 'trekoon'.",
|
|
397
|
-
" - --editor is required when --link is used (opencode|claude|pi).",
|
|
398
|
-
" - --to overrides the symlink root for --link only.",
|
|
399
|
-
" - Without --allow-outside-repo, link targets must resolve inside repo.",
|
|
400
|
-
" - --allow-outside-repo requires --link and disables that boundary check.",
|
|
400
|
+
"Update:",
|
|
401
|
+
" Probes and repairs both global and local symlinks.",
|
|
402
|
+
" Reports per-entry status: ok, repointed, created, migrated, skipped.",
|
|
401
403
|
"",
|
|
402
|
-
"
|
|
403
|
-
" - Refreshes canonical SKILL file in the install path above.",
|
|
404
|
-
" - Auto-creates or refreshes editor symlinks when editor config dir exists.",
|
|
405
|
-
" - Skips editors with no config dir or conflicting paths.",
|
|
404
|
+
"Alias: trekoon update -> trekoon skills update",
|
|
406
405
|
"",
|
|
407
406
|
"Examples:",
|
|
408
407
|
" trekoon skills install",
|
|
408
|
+
" trekoon skills install -g",
|
|
409
|
+
" trekoon skills install --global --editor claude",
|
|
409
410
|
" trekoon skills install --link --editor opencode",
|
|
410
411
|
" trekoon skills install --link --editor claude --to .claude/skills",
|
|
411
412
|
" trekoon skills install --link --editor pi --to ../shared/skills --allow-outside-repo",
|
|
412
413
|
" trekoon skills update",
|
|
414
|
+
" trekoon update",
|
|
413
415
|
].join("\n");
|
|
414
416
|
|
|
415
417
|
const COMMAND_HELP: Record<string, string> = {
|
|
@@ -425,7 +427,9 @@ const COMMAND_HELP: Record<string, string> = {
|
|
|
425
427
|
events: EVENTS_HELP,
|
|
426
428
|
migrate: MIGRATE_HELP,
|
|
427
429
|
sync: SYNC_HELP,
|
|
430
|
+
suggest: SUGGEST_HELP,
|
|
428
431
|
skills: SKILLS_HELP,
|
|
432
|
+
update: "Usage: trekoon update [--json|--toon]\n\nAlias for: trekoon skills update\n\nProbes and repairs all installed global and local skill symlinks.",
|
|
429
433
|
help: "Usage: trekoon help [command] [--json|--toon]",
|
|
430
434
|
};
|
|
431
435
|
|