@lumoai/cli 1.41.0 → 1.42.0

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.
@@ -0,0 +1,113 @@
1
+ # Task Dependencies (`lumo task deps …`)
2
+
3
+ Hard dependency edges between tasks — manual declarations plus auto-detected candidates a human confirms or dismisses. For core task CRUD, see [tasks.md](tasks.md).
4
+
5
+ ## `lumo task deps list <LUM-N>` — show all dependency edges
6
+
7
+ Prints the task's dependency edges grouped into three sections: **CONFIRMED**, **SUGGESTED (pending confirmation)**, and **DISMISSED**. Each row includes a short 8-character edge id in square brackets, the direction (`blocked by` / `blocks`), the other task's identifier and title, the other task's current status, the source (`MANUAL` or `DETECTED`), and inline evidence for detected edges.
8
+
9
+ ```bash
10
+ lumo task deps list LUM-42
11
+ ```
12
+
13
+ Example output:
14
+
15
+ ```
16
+ Dependencies for LUM-42 (3)
17
+
18
+ CONFIRMED
19
+ [a1b2c3d4] blocked by LUM-9 "Fix auth token expiry" IN_PROGRESS · MANUAL
20
+
21
+ SUGGESTED (pending confirmation)
22
+ [e5f6a7b8] blocks LUM-55 "Migrate DB schema" TODO · shared_files(4 shared files: src/db/schema.ts, src/db/migrate.ts, ...)
23
+ confirm: lumo task deps confirm LUM-42 e5f6a7b8 (add --reverse if direction is flipped; false positive: dismiss)
24
+ [c9d0e1f2] blocked by LUM-38 "Add OAuth scopes" IN_REVIEW · task_mention(description)
25
+ confirm: lumo task deps confirm LUM-42 c9d0e1f2 (add --reverse if direction is flipped; false positive: dismiss)
26
+
27
+ DISMISSED
28
+ [b3c4d5e6] blocks LUM-12 · dismissed
29
+ ```
30
+
31
+ CONFIRMED and SUGGESTED rows show the other task's identifier, title, current status, and source/evidence. DISMISSED rows render as `[shortId] <direction> <identifier> · dismissed` only. When there are no edges at all the output is `Dependencies for LUM-42: no dependency edges.`
32
+
33
+ **Evidence fields by detection signal:**
34
+
35
+ - `shared_files` — `shared_files(N shared files: path1, path2, …)` — number of shared write-touched files in the 14-day window, plus up to 5 sample paths.
36
+ - `task_mention` — `task_mention(description)` or `task_mention(comment)` — the surface where the mention appeared.
37
+
38
+ CONFIRMED rows also show `source`: `MANUAL` (user-declared via `deps add`) or `DETECTED` (auto-found then confirmed via `deps confirm`).
39
+
40
+ ## `lumo task deps add <LUM-N> --blocked-by <LUM-M>` — declare a manual hard dependency
41
+
42
+ Asserts that LUM-N is blocked by LUM-M. The edge is created as CONFIRMED + MANUAL — immediately in effect (no confirmation step). Both `<LUM-N>` and `--blocked-by` are required.
43
+
44
+ ```bash
45
+ lumo task deps add LUM-42 --blocked-by LUM-9
46
+ ```
47
+
48
+ **Service semantics (read before using):**
49
+
50
+ - **Self-edge** → 400 ("A task cannot depend on itself").
51
+ - **CONFIRMED edge in the same direction already exists** → 409 ("Dependency already exists").
52
+ - **CONFIRMED edge in the reverse direction already exists** → cycle guard fires, 409 ("Dependency would create a cycle").
53
+ - **Pair has a SUGGESTED or DISMISSED edge** in the same direction → `add` confirms it in place, preserving the original DETECTED source. No new row is created.
54
+ - **Cycle guard** — a DFS over all CONFIRMED BLOCKS edges in the workspace runs before writing; a would-be cycle → 409.
55
+
56
+ ## `lumo task deps confirm <LUM-N> <edge> [--reverse]` — confirm a detected candidate
57
+
58
+ Promotes a SUGGESTED edge to CONFIRMED. `<edge>` is a selector for the specific edge on LUM-N's edge list.
59
+
60
+ ```bash
61
+ lumo task deps confirm LUM-42 e5f6a7b8 # confirm as detected direction
62
+ lumo task deps confirm LUM-42 LUM-55 # selector by other task's identifier
63
+ lumo task deps confirm LUM-42 e5f6a7b8 --reverse # flip direction before confirming
64
+ ```
65
+
66
+ **Edge selector semantics** (shared by `confirm`, `dismiss`, `rm`):
67
+
68
+ - **Other task's identifier** (e.g., `LUM-55`) — case-insensitive exact match against the edge's other-task identifier. Resolves when there is exactly one edge to that task.
69
+ - **Edge-id prefix** — at least 6 characters of the short id (e.g., `e5f6a7`). Must match exactly one edge.
70
+ - Zero or more than one match → prints all candidate edges with short ids and exits 1. Retry with a more specific selector.
71
+
72
+ **`--reverse` semantics:** the detector's direction heuristic is best-effort. If the suggested direction is backwards, confirm with `--reverse` to flip before writing. The service checks the reversed pair has no existing edge (→ 409) and re-runs the cycle guard with the flipped direction.
73
+
74
+ ## `lumo task deps dismiss <LUM-N> <edge>` — dismiss a candidate (immune to re-detection)
75
+
76
+ Marks the edge DISMISSED. The row is kept in the database — this is the key difference from `rm`. Because the row exists (in either direction), the detection service will never re-suggest this pair.
77
+
78
+ ```bash
79
+ lumo task deps dismiss LUM-42 e5f6a7b8
80
+ # Dismissed: [e5f6a7b8] LUM-38 "Add OAuth scopes" (won't be suggested again)
81
+ ```
82
+
83
+ Use `dismiss` for false positives. Use `rm` only when you want the pair eligible for re-detection again.
84
+
85
+ ## `lumo task deps rm <LUM-N> <edge> --yes` — delete an edge
86
+
87
+ Hard-deletes the edge row. **Requires `--yes`** — the CLI refuses without it (no interactive prompt exists).
88
+
89
+ ```bash
90
+ lumo task deps rm LUM-42 a1b2c3d4 --yes
91
+ # Removed [a1b2c3d4] from LUM-42
92
+ ```
93
+
94
+ **`rm` vs `dismiss`:** deleting removes the immunity — the detection service may re-suggest this pair on the next shared-files sweep or task-mention event. Prefer `dismiss` for detection false positives; use `rm` to fully erase an incorrectly-declared MANUAL edge.
95
+
96
+ ## Detection red lines
97
+
98
+ - The detection service **never creates CONFIRMED edges automatically**. All auto-detected candidates are SUGGESTED; a human must `confirm` or `add` for an edge to become CONFIRMED.
99
+ - **Dismiss is pair-wise immunity**: once any edge exists between A and B (either direction, any status including DISMISSED), the detector won't create a new candidate for that pair.
100
+ - **`rm` lifts the immunity**: after deleting the only edge between A and B, the detector may re-suggest them.
101
+
102
+ ## Detection signals
103
+
104
+ - **`task_mention`**: fires when a task's description is updated or a comment is created. If the updated HTML @-mentions other tasks, the mentioning task is recorded as depending on the mentioned task (direction heuristic: mentioner blocked by mentioned). Triggers immediately on write events; no cron.
105
+ - **`shared_files`**: hourly cron sweep over write-tool hook events in the past 14 days. For every pair of open (non-DONE) tasks sharing **≥ 3 written files**, a SUGGESTED edge is created (direction heuristic: older task blocks newer). Parent–child pairs are skipped; edges are never created across workspaces.
106
+
107
+ ## When to suggest `task deps` commands
108
+
109
+ - **After `session attach` output shows a blocker warning or candidate-count hint** → `lumo task deps list <LUM-N>`, then `confirm` / `dismiss` each SUGGESTED candidate.
110
+ - **User says "X needs to wait for Y" / "LUM-42 is blocked by LUM-9"** → `lumo task deps add LUM-42 --blocked-by LUM-9`.
111
+ - **Agent sees a `## ⚠ Dependency alerts` block (form A — live blockers) at session-start** → evaluate whether to wait for the blocker to merge; clean stale/wrong edges with `deps rm` / `deps dismiss`.
112
+ - **Agent sees only a standalone hint `Detected N candidate dependencies awaiting confirmation…` (form B)** → no immediate blocker, but run `deps list` to review and confirm/dismiss. See [sessions.md](sessions.md) for the full alert format.
113
+ - **User reports a false positive** → `lumo task deps dismiss <LUM-N> <edge>`.
@@ -1,6 +1,6 @@
1
1
  # Task Management
2
2
 
3
- ## Task Management
3
+ Core task CRUD — create, update, list, recommend-next, show, comment. For dependency edges between tasks, see [task-deps.md](task-deps.md).
4
4
 
5
5
  ### `lumo task create <title> [flags]` — create a new task
6
6
 
@@ -230,135 +230,4 @@ The CLI does not support @-mention chip syntax. If the user wants to ping someon
230
230
 
231
231
  ---
232
232
 
233
- ## Task Dependencies (`lumo task deps …`)
234
-
235
- ### `lumo task deps list <LUM-N>` — show all dependency edges
236
-
237
- Prints the task's dependency edges grouped into three sections: **CONFIRMED**, **SUGGESTED (pending confirmation)**, and **DISMISSED**. Each row includes a short 8-character edge id in square brackets, the direction (`blocked by` / `blocks`), the other task's identifier and title, the other task's current status, the source (`MANUAL` or `DETECTED`), and inline evidence for detected edges.
238
-
239
- ```bash
240
- lumo task deps list LUM-42
241
- ```
242
-
243
- Example output:
244
-
245
- ```
246
- Dependencies for LUM-42 (3)
247
-
248
- CONFIRMED
249
- [a1b2c3d4] blocked by LUM-9 "Fix auth token expiry" IN_PROGRESS · MANUAL
250
-
251
- SUGGESTED (pending confirmation)
252
- [e5f6a7b8] blocks LUM-55 "Migrate DB schema" TODO · shared_files(4 shared files: src/db/schema.ts, src/db/migrate.ts, ...)
253
- confirm: lumo task deps confirm LUM-42 e5f6a7b8 (add --reverse if direction is flipped; false positive: dismiss)
254
- [c9d0e1f2] blocked by LUM-38 "Add OAuth scopes" IN_REVIEW · task_mention(description)
255
- confirm: lumo task deps confirm LUM-42 c9d0e1f2 (add --reverse if direction is flipped; false positive: dismiss)
256
-
257
- DISMISSED
258
- [b3c4d5e6] blocks LUM-12 · dismissed
259
- ```
260
-
261
- CONFIRMED and SUGGESTED rows show the other task's identifier, title, current status, and source/evidence. DISMISSED rows render as `[shortId] <direction> <identifier> · dismissed` only — no title, status, or source.
262
-
263
- When there are no edges at all the output is:
264
-
265
- ```
266
- Dependencies for LUM-42: no dependency edges.
267
- ```
268
-
269
- **Evidence fields by detection signal:**
270
-
271
- - `shared_files` — `shared_files(N shared files: path1, path2, …)` — number of shared write-touched files in the 14-day window, plus up to 5 sample paths.
272
- - `task_mention` — `task_mention(description)` or `task_mention(comment)` — the surface where the mention appeared.
273
-
274
- CONFIRMED rows also show `source`: `MANUAL` (user-declared via `deps add`) or `DETECTED` (auto-found then confirmed via `deps confirm`).
275
-
276
- ### `lumo task deps add <LUM-N> --blocked-by <LUM-M>` — declare a manual hard dependency
277
-
278
- Asserts that LUM-N is blocked by LUM-M. The edge is created as CONFIRMED + MANUAL, meaning it is immediately in effect (no confirmation step required).
279
-
280
- ```bash
281
- lumo task deps add LUM-42 --blocked-by LUM-9
282
- ```
283
-
284
- Both `<LUM-N>` and `--blocked-by` are required. The command errors on usage if either is missing.
285
-
286
- **Service semantics (read before using):**
287
-
288
- - **Self-edge** → 400 ("A task cannot depend on itself").
289
- - **CONFIRMED edge in the same direction already exists** → 409 ("Dependency already exists").
290
- - **CONFIRMED edge in the reverse direction already exists** → the cycle guard fires and returns 409 ("Dependency would create a cycle").
291
- - **Pair has a SUGGESTED or DISMISSED edge** in the same direction → `add` confirms it in place, preserving the original DETECTED source (so the edge transitions to CONFIRMED while keeping its auto-detected provenance). No new row is created.
292
- - **Cycle guard** — the service runs a DFS over all CONFIRMED BLOCKS edges in the workspace before writing. If adding the edge would create a cycle → 409 ("Dependency would create a cycle").
293
-
294
- ### `lumo task deps confirm <LUM-N> <edge> [--reverse]` — confirm a detected candidate
295
-
296
- Promotes a SUGGESTED edge to CONFIRMED. `<edge>` is a selector for the specific edge on LUM-N's edge list.
297
-
298
- ```bash
299
- lumo task deps confirm LUM-42 e5f6a7b8 # confirm as detected direction
300
- lumo task deps confirm LUM-42 LUM-55 # selector by other task's identifier
301
- lumo task deps confirm LUM-42 e5f6a7b8 --reverse # flip direction before confirming
302
- ```
303
-
304
- **Edge selector semantics** (shared by `confirm`, `dismiss`, `rm`):
305
-
306
- - **Other task's identifier** (e.g., `LUM-55`) — case-insensitive exact match against the edge's other-task identifier. Resolves unambiguously when there is exactly one edge to that task.
307
- - **Edge-id prefix** — at least 6 characters of the short id (e.g., `e5f6a7`). Must match exactly one edge.
308
- - If zero or more than one edge matches → prints all candidate edges with short ids and exits 1. Retry with a more specific selector.
309
-
310
- **`--reverse` semantics:**
311
-
312
- - The detector's direction heuristic is best-effort. If the suggested direction is backwards (e.g., the detector says "LUM-42 blocks LUM-55" but actually LUM-55 blocks LUM-42), confirm with `--reverse` to flip before writing.
313
- - The service checks that the reversed pair does not already have an edge (→ 409), and re-runs the cycle guard with the flipped direction.
314
-
315
- ### `lumo task deps dismiss <LUM-N> <edge>` — dismiss a candidate (immune to re-detection)
316
-
317
- Marks the edge DISMISSED. The row is kept in the database — this is the key difference from `rm`. Because the row exists (in either direction), the detection service will never re-suggest this pair.
318
-
319
- ```bash
320
- lumo task deps dismiss LUM-42 e5f6a7b8
321
- lumo task deps dismiss LUM-42 LUM-38
322
- ```
323
-
324
- Output: `Dismissed: [e5f6a7b8] LUM-38 "Add OAuth scopes" (won't be suggested again)`
325
-
326
- Use `dismiss` for false positives. Use `rm` only when you want the pair to be eligible for re-detection in the future (the detection service can re-suggest pairs with no existing row).
327
-
328
- ### `lumo task deps rm <LUM-N> <edge> --yes` — delete an edge
329
-
330
- Hard-deletes the edge row. **Requires `--yes`** — the CLI refuses without it (no interactive prompt exists).
331
-
332
- ```bash
333
- lumo task deps rm LUM-42 a1b2c3d4 --yes
334
- ```
335
-
336
- Output: `Removed [a1b2c3d4] from LUM-42`
337
-
338
- **`rm` vs `dismiss`:** deleting removes the immunity — the detection service may re-suggest this pair the next time a shared-files sweep or task-mention event fires. Prefer `dismiss` for detection false positives; use `rm` to remove an incorrectly-declared MANUAL edge that you want fully erased.
339
-
340
- ---
341
-
342
- ### Detection red lines
343
-
344
- - The detection service **never creates CONFIRMED edges automatically**. All auto-detected candidates are SUGGESTED; a human must `confirm` or `add` for an edge to become CONFIRMED.
345
- - **Dismiss is pair-wise immunity**: once any edge exists between task A and task B (in either direction, regardless of status including DISMISSED), the detection service will not create a new candidate for that pair.
346
- - **`rm` lifts the immunity**: after deleting the only edge between A and B, the detector may re-suggest them on the next event or sweep.
347
-
348
- ---
349
-
350
- ### Detection signals
351
-
352
- **Signal 1 — `task_mention`**: fires when a task's description is updated or a comment is created. If the updated HTML contains @-mentions of other tasks, the mentioning task is recorded as depending on the mentioned task (direction heuristic: mentioner blocked by mentioned). Triggers immediately on write events; no cron needed.
353
-
354
- **Signal 2 — `shared_files`**: hourly cron sweep. Looks at write-tool hook events (file edits, creates, etc.) in the past 14 days. For every pair of open (non-DONE) tasks that share **≥ 3 written files**, a SUGGESTED edge is created. Direction heuristic: older task blocks newer task. Parent–child task pairs are skipped (they share files by design). Edges are not created across different workspaces.
355
-
356
- ---
357
-
358
- ### When to suggest `task deps` commands
359
-
360
- - **After `session attach` output shows a blocker warning or candidate-count hint** → run `lumo task deps list <LUM-N>` to review the full edge list, then `confirm` or `dismiss` each SUGGESTED candidate.
361
- - **User says "X needs to wait for Y" or "LUM-42 is blocked by LUM-9"** → run `lumo task deps add LUM-42 --blocked-by LUM-9`.
362
- - **Agent sees a `## ⚠ Dependency alerts` block (form A — live blockers) at session-start** → evaluate whether to wait for the blocker to merge before starting work; if the edge is stale or wrong, clean it with `deps rm` or `deps dismiss`.
363
- - **Agent sees only a standalone hint line `Detected N candidate dependencies awaiting confirmation…` (form B — no live blockers)** → no immediate blocker, but run `lumo task deps list <LUM-N>` to review and confirm/dismiss SUGGESTED candidates. See [sessions.md](sessions.md) for the full alert format.
364
- - **User reports a false positive dependency suggestion** → `lumo task deps dismiss <LUM-N> <edge>` to permanently suppress it for this pair.
233
+ **Task dependencies** (`lumo task deps add/list/confirm/dismiss/rm`) now live in [task-deps.md](task-deps.md).