@codyswann/lisa 8.2.11 → 8.3.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.
Files changed (152) hide show
  1. package/all/copy-overwrite/scripts/lisa-work-item.mjs +50 -11
  2. package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +1 -1
  3. package/dist/cli/learnings-overflow-cmd.js +2 -2
  4. package/dist/cli/learnings-overflow-cmd.js.map +1 -1
  5. package/dist/configs/jest/expo.d.ts.map +1 -1
  6. package/dist/configs/jest/expo.js +6 -0
  7. package/dist/configs/jest/expo.js.map +1 -1
  8. package/dist/controls/commands/attest-workspace.d.ts +1 -7
  9. package/dist/controls/commands/attest-workspace.d.ts.map +1 -1
  10. package/dist/controls/commands/attest-workspace.js +29 -12
  11. package/dist/controls/commands/attest-workspace.js.map +1 -1
  12. package/dist/controls/proof-copy.d.ts.map +1 -1
  13. package/dist/controls/proof-copy.js +3 -0
  14. package/dist/controls/proof-copy.js.map +1 -1
  15. package/dist/controls/proof-scratch.d.ts +42 -0
  16. package/dist/controls/proof-scratch.d.ts.map +1 -0
  17. package/dist/controls/proof-scratch.js +172 -0
  18. package/dist/controls/proof-scratch.js.map +1 -0
  19. package/dist/core/learnings-document.d.ts +2 -3
  20. package/dist/core/learnings-document.d.ts.map +1 -1
  21. package/dist/core/learnings-document.js.map +1 -1
  22. package/dist/core/learnings-overflow.d.ts +4 -0
  23. package/dist/core/learnings-overflow.d.ts.map +1 -1
  24. package/dist/core/learnings-overflow.js +47 -24
  25. package/dist/core/learnings-overflow.js.map +1 -1
  26. package/dist/core/lisa-owned-hash-ledger.json +12 -0
  27. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  28. package/dist/core/nightly-e2e-guard-behavior-certificate.js.map +1 -1
  29. package/dist/core/upstream-evidence-manifest.json +63 -16
  30. package/expo/package-lisa/package.lisa.json +8 -2
  31. package/package.json +4 -4
  32. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  33. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  34. package/plugins/lisa/.codex-plugin/skills/lisa-linear-sync/SKILL.md +3 -3
  35. package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/validate-config.mjs +5 -0
  36. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/SKILL.md +47 -39
  37. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/references/runbook-template.md +5 -0
  38. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-status.mjs +2 -1
  39. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/config.mjs +4 -1
  40. package/plugins/lisa/hooks/inject-resolved-config.mjs +23 -1
  41. package/plugins/lisa/rules/reference/config-resolution.md +1 -0
  42. package/plugins/lisa/skills/lisa-linear-sync/SKILL.md +3 -3
  43. package/plugins/lisa/skills/lisa-secrets-access/scripts/validate-config.mjs +5 -0
  44. package/plugins/lisa/skills/lisa-session-manager/SKILL.md +47 -39
  45. package/plugins/lisa/skills/lisa-session-manager/references/runbook-template.md +5 -0
  46. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-status.mjs +2 -1
  47. package/plugins/lisa/skills/lisa-session-manager/scripts/config.mjs +4 -1
  48. package/plugins/lisa-agy/plugin.json +1 -1
  49. package/plugins/lisa-agy/skills/lisa-linear-sync/SKILL.md +3 -3
  50. package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/validate-config.mjs +5 -0
  51. package/plugins/lisa-agy/skills/lisa-session-manager/SKILL.md +47 -39
  52. package/plugins/lisa-agy/skills/lisa-session-manager/references/runbook-template.md +5 -0
  53. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-status.mjs +2 -1
  54. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/config.mjs +4 -1
  55. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  56. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  57. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  58. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  59. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  60. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  61. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  62. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  63. package/plugins/lisa-copilot/hooks/inject-resolved-config.mjs +23 -1
  64. package/plugins/lisa-copilot/rules/reference/config-resolution.md +1 -0
  65. package/plugins/lisa-copilot/skills/lisa-linear-sync/SKILL.md +3 -3
  66. package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/validate-config.mjs +5 -0
  67. package/plugins/lisa-copilot/skills/lisa-session-manager/SKILL.md +47 -39
  68. package/plugins/lisa-copilot/skills/lisa-session-manager/references/runbook-template.md +5 -0
  69. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-status.mjs +2 -1
  70. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/config.mjs +4 -1
  71. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  72. package/plugins/lisa-cursor/hooks/inject-resolved-config.mjs +23 -1
  73. package/plugins/lisa-cursor/rules/config-resolution-reference.mdc +1 -0
  74. package/plugins/lisa-cursor/skills/lisa-linear-sync/SKILL.md +3 -3
  75. package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/validate-config.mjs +5 -0
  76. package/plugins/lisa-cursor/skills/lisa-session-manager/SKILL.md +47 -39
  77. package/plugins/lisa-cursor/skills/lisa-session-manager/references/runbook-template.md +5 -0
  78. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-status.mjs +2 -1
  79. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/config.mjs +4 -1
  80. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  81. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  82. package/plugins/lisa-devin/hooks/inject-resolved-config.mjs +23 -1
  83. package/plugins/lisa-devin/rules/reference/config-resolution.md +1 -0
  84. package/plugins/lisa-devin/skills/lisa-linear-sync/SKILL.md +3 -3
  85. package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/validate-config.mjs +5 -0
  86. package/plugins/lisa-devin/skills/lisa-session-manager/SKILL.md +47 -39
  87. package/plugins/lisa-devin/skills/lisa-session-manager/references/runbook-template.md +5 -0
  88. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-status.mjs +2 -1
  89. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/config.mjs +4 -1
  90. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  91. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  92. package/plugins/lisa-expo-agy/plugin.json +1 -1
  93. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  94. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  95. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  96. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  97. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  98. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  99. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  100. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  101. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  102. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  103. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  104. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  105. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  106. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  107. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  108. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  109. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  110. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  111. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  112. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  113. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  114. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  115. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  116. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  117. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  118. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  119. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  120. package/plugins/lisa-rails-agy/plugin.json +1 -1
  121. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  122. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  123. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  124. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  125. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  126. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  127. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  128. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  129. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  130. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  131. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  132. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  133. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  134. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  135. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  136. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  137. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  138. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  139. package/plugins/src/base/hooks/inject-resolved-config.mjs +23 -1
  140. package/plugins/src/base/rules/reference/config-resolution.md +1 -0
  141. package/plugins/src/base/skills/lisa-linear-sync/SKILL.md +3 -3
  142. package/plugins/src/base/skills/lisa-secrets-access/scripts/validate-config.mjs +5 -0
  143. package/plugins/src/base/skills/lisa-session-manager/SKILL.md +47 -39
  144. package/plugins/src/base/skills/lisa-session-manager/references/runbook-template.md +5 -0
  145. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-status.mjs +2 -1
  146. package/plugins/src/base/skills/lisa-session-manager/scripts/config.mjs +4 -1
  147. package/rails/copy-overwrite/lefthook.yml +3 -0
  148. package/rails/copy-overwrite/scripts/lisa-rails-ast-grep.mjs +31 -0
  149. package/rails/copy-overwrite/scripts/lisa-rails-gates.mjs +5 -0
  150. package/scripts/two-channel-couplings.json +33 -5
  151. package/scripts/verify-packed-learnings-contract.mjs +27 -1
  152. package/typescript/copy-overwrite/.prettierignore +1 -0
@@ -104,11 +104,12 @@ the manager.
104
104
  `/lisa:implement <REF> managedBy=<manager-name>`; `lisa-implement` owns what `managedBy=` means.
105
105
  Never start a worker another way, and never reuse a worker for another item or a new attempt.
106
106
  - **Capacity** comes only from `capacity` (`can_spawn`, `free_slots`).
107
- - **Notification channel.** Read `notify` from `status` at the start of every cycle. `telegram`: the
107
+ - **Notification channel.** Read `notify` from `status` at the start of every cycle. Read
108
+ `notifyLevel` from the same result. `telegram`: the
108
109
  project's own bot, which `start` attached. `none` (`sessionManager.notify.provider` is `"none"`,
109
110
  or there is no `notify` block): there is no channel, and `start` launched you without one.
110
111
  Having no channel is a normal configuration, never a failure. Every step below that posts to
111
- Telegram applies only with `telegram`; "Questions and notifications" says what to do instead.
112
+ Telegram uses both fields as described in "Questions and notifications".
112
113
  - **Ledger.** `.lisa/session-manager/ledger.json` is the manager's memory across restarts; attempts
113
114
  live there, never in tracker comments. Read it with `ledger get`; change it only through the
114
115
  `ledger` subcommands.
@@ -172,9 +173,14 @@ the manager.
172
173
  - **Telegram configured** (`notify` is `telegram`):
173
174
  - Talk only to the paired, allowlisted chat. Every message starts with the ref in brackets, e.g.
174
175
  `[<TEAM>-123]`. Keep it phone-sized, with options on numbered lines.
175
- - Post starts, questions, finishes, failures and tracker changes you made. No routine cycle
176
- summaries.
177
- - When you post a question, keep the Telegram message id the reply tool returns; the ledger needs
176
+ - `notifyLevel: all` sends both **Ask** and **FYI** messages. `notifyLevel: asks-only` sends **Ask**
177
+ messages and records **FYI** messages in the transcript. Both modes keep the usual ledger and
178
+ tracker writes. Routine cycle summaries belong in the transcript.
179
+ - Reply to an operator's Telegram `status` command in the paired chat at either notification level.
180
+ - **Ask** covers questions, requests for operator action, duplicate-manager warnings and the
181
+ hold digest. **FYI** covers worker starts and outcomes, tracker changes, routine retries and
182
+ answer acknowledgements.
183
+ - When you post an **Ask** question, keep the Telegram message id the reply tool returns; the ledger needs
178
184
  it.
179
185
  - **End every question with how to answer:** `Answer with: <label> <your answer>`. The label is
180
186
  the key for a Jira or Linear item (`<TEAM>-123`), and for a GitHub item `#12`, or `repo#12` when
@@ -186,7 +192,7 @@ the manager.
186
192
  with the rest of the cycle, and end it with outcome `recovery-required` and the summary
187
193
  `Telegram not paired: run tmux attach -t <name> and pair with /telegram:access pair <code>.`
188
194
  (`<name>` is `sessionManager.name`). Skip the other notices. The `/loop` keeps running, and the
189
- next cycle sends whatever is still pending ("Unsent questions" below).
195
+ next cycle sends any pending **Ask** questions ("Unsent questions" below).
190
196
 
191
197
  ## Mark and move on
192
198
 
@@ -241,8 +247,8 @@ In this order, every time:
241
247
  It returns `marker` (the configured human-needed label, else the configured `blocked` role),
242
248
  `move` for an `exhausted` item, the `comment` to post, and `planningMiss`. It writes nothing. Exit 2 for text
243
249
  that looks like a credential: rewrite it without the secret and plan again. Exit 2 because no
244
- marker is configured: record the question (step 2), carry on, and end the cycle
245
- `recovery-required` with the CLI's message as the summary.
250
+ marker is configured: record the question (step 2), send the CLI's recovery message as an
251
+ **Ask**, carry on, and end the cycle `recovery-required` with that message as the summary.
246
252
  2. **Ledger first.** `ledger set-question <ref> --kind <kind>` with the same text on STDIN (add
247
253
  `--sender <sender>` for a worker's question). The ledger comes before the tracker so a crash
248
254
  leaves a pending question the next cycle finishes, never a marker nobody will remove.
@@ -275,14 +281,15 @@ In this order, every time:
275
281
  `signal` is `wrongly-escalated`, also post `planningMiss.overruledMarker.comment` on the item
276
282
  once the subagent has started, so the overruled-escalation sweep does not capture the same
277
283
  ruling again.
278
- 7. **Continue the cycle.** With Telegram, also send the question there, ending with
284
+ 7. **Continue the cycle.** **Ask.** With Telegram, also send the question there, ending with
279
285
  `answerWith.channel`, and re-record it with `ledger set-question <ref> --telegram-message-id <id>`
280
286
  (same text, which keeps its `askedAt` and its mark). Without a channel there is nothing else to
281
287
  send. Then go on with the next item.
282
288
 
283
289
  If step 3 or 4 fails (the tracker is unreachable, or the read-back does not show the marker),
284
290
  leave the ledger as it is (`markedAt` stays null), carry on with the cycle and end it
285
- `recovery-required`; the next cycle's "Waiting on a human" step finishes the mark.
291
+ `recovery-required`. **Ask** for any operator action that the recovery requires. The next cycle's
292
+ "Waiting on a human" step finishes the mark.
286
293
 
287
294
  **Clearing**, once a human has answered (on the item, with `answer`, or on Telegram):
288
295
 
@@ -364,24 +371,25 @@ leave the ledger as it is (`markedAt` stays null), carry on with the cycle and e
364
371
  Telegram plugin (0.0.7) does not, so never guess one.
365
372
  - `answer`: follow "Clearing" in "Mark and move on" with `message` as the answer (`SendMessage`
366
373
  to a live worker, `resume <ref>` for one that was idle-stopped or is gone without finishing,
367
- the `repo:<name>` stamp for a repo-routing question), then acknowledge on Telegram.
374
+ the `repo:<name>` stamp for a repo-routing question), then acknowledge it as **FYI**.
368
375
  **Only when no worker will receive it** — `ledger get <ref>` shows the worker reported `DONE`
369
376
  or `FAILED`, the question is `exhausted`, or no worker was started for it (a `decision`, say;
370
377
  never a repo-route) — first queue it in the ledger with `channel-answer <ref>` (`body` on
371
378
  STDIN, source `channel`), so "Record the answer on the item" can post it. A live or resumable
372
379
  worker gets its answer exactly as before, without `channel-answer`. Exit 2 from
373
380
  `channel-answer` delivers nothing and has two causes, told apart by its stderr: one that says
374
- the answer looks like it holds a credential (reply on Telegram that it was refused and should
375
- be sent again without the secret), or one that says the ref has no pending question or no
376
- ledger item (reply that the question was already answered or nothing is pending for it).
381
+ the answer looks like it holds a credential (**Ask** the operator to send it again without
382
+ the secret), or one that says the ref has no pending question or no ledger item (as **FYI**,
383
+ reply that the question was already answered or nothing is pending for it).
377
384
  When the answer was recorded on the item, say so in the acknowledgement: it was posted on the
378
385
  item, where anyone who can read the item can see it.
379
- - `ambiguous`: ask which ref it is for, listing `candidates`, each with the label to start the
386
+ - `ambiguous`: **Ask** which ref it is for, listing `candidates`, each with the label to start the
380
387
  answer with (`Answer with: #12 <your answer>`).
381
- - `invalid-command`: a mistyped command (`cap 40`, `stop A B`). Deliver it to no worker. Reply on
382
- Telegram with `reason`, and say that an answer meant for a worker starts with its label.
388
+ - `invalid-command`: a mistyped command (`cap 40`, `stop A B`). Deliver it to no worker. **Ask**
389
+ the operator to correct it with `reason` and explain how to label an answer meant for a worker.
383
390
  - `command`:
384
- - `status`: summarize `status` (running, cap, pending questions, paused).
391
+ - `status`: reply directly in the paired Telegram chat with the running count, cap, pending
392
+ questions, and pause state. Send the reply at either notification level.
385
393
  - `pause` / `resume`: `ledger control --paused true|false`. Relaying and reconciling continue
386
394
  while paused; only dispatch stops.
387
395
  - `cap N`: `ledger control --max-workers N`. This may raise the limit above
@@ -391,8 +399,8 @@ leave the ledger as it is (`markedAt` stays null), carry on with the cycle and e
391
399
  `ledger finish <ref> --status FAILED` with reason "stopped by the operator". This is an explicit
392
400
  human instruction, which is why it may return a claimed item to Ready.
393
401
  - **`[<REF>] DONE: …` / `[<REF>] FAILED: …` from a worker:**
394
- `ledger finish <ref> --status DONE|FAILED --sender <sender>` (reason on STDIN) and post one line
395
- to Telegram. On `FAILED`, also move the item to the `blocked`
402
+ `ledger finish <ref> --status DONE|FAILED --sender <sender>` (reason on STDIN) and report one **FYI**
403
+ line. On `FAILED`, also move the item to the `blocked`
396
404
  role through `lisa-tracker-write` with a comment `[lisa-session-manager] Worker failed: <reason>`
397
405
  (assigning "me" in the same update when it is unassigned: "Taking an item"),
398
406
  and read both back with `lisa-tracker-read`. When the reason says a
@@ -413,7 +421,7 @@ session's own loops with `CronList`. When `manager.self` is true, this session *
413
421
  and its own `/loop` is the manager's loop: never report it as a second manager, and never recommend
414
422
  `CronDelete` or stopping it. When `manager.self` is true and `status` `manager.otherCyclers` is not
415
423
  empty, another session ran a cycle in this project within twice the interval, so two managers can
416
- hand out the same item: warn the operator (over Telegram too when `notify` is `telegram`), name each
424
+ hand out the same item: warn the operator as an **Ask**, name each
417
425
  entry's `by` and `at`, and recommend stopping **that** session's loop, never this one. A `pid:` entry
418
426
  names the process that ran that one cycle, so a single other session can leave several `pid:`
419
427
  entries; report them as one or more other sessions, never as an exact count. When
@@ -421,7 +429,7 @@ entries; report them as one or more other sessions, never as an exact count. Whe
421
429
  `manager.self` is `null`, recommend stopping nothing, whatever `manager.otherCyclers` says; report
422
430
  that self-identification failed. When `manager.running` is true, `manager.self` is false, and this
423
431
  session runs its own `/lisa:session-manager cycle` loop, two managers can hand out the same item:
424
- warn the operator and recommend stopping **this** session's loop, never the tmux manager. The tmux
432
+ warn the operator as an **Ask** and recommend stopping **this** session's loop, never the tmux manager. The tmux
425
433
  manager cannot see another session's loop, so it learns of one only from `manager.otherCyclers` and
426
434
  must not invent one from anything else. `manager.self` means running inside the manager's tmux
427
435
  session, so another Claude started in a second window of that same tmux session also reads true.
@@ -429,7 +437,7 @@ Never infer a second manager from the tmux session existing plus a loop being pr
429
437
 
430
438
  ### 1. Reconcile
431
439
 
432
- **Unsent questions** (only when `notify` is `telegram`). `ledger get` shows every pending question.
440
+ **Unsent questions** (only when `notify` is `telegram`). **Ask.** `ledger get` shows every pending question.
433
441
  One with `telegramMessageId: null` never reached Telegram: it was recorded while Telegram was
434
442
  unavailable or unpaired, or before Telegram was configured. (Re)send each
435
443
  to Telegram now and re-record it with `ledger set-question <ref> --telegram-message-id <id>` (same
@@ -480,7 +488,7 @@ shows them.
480
488
  answers with the `answerCommand` from `status`. A reply that looks like it holds a credential is
481
489
  never queued: it is skipped and listed in `refused`, so a later reply is still read.
482
490
  Whenever `refused` is present (with `queued: true`, or `queued: false` and
483
- `reason: "credential-refused"`), tell the operator in plain words, from `refusedExplanation`:
491
+ `reason: "credential-refused"`), send an **Ask** in plain words, from `refusedExplanation`:
484
492
  the secret is now on the item, so they should delete that comment, rotate the secret, and reply
485
493
  again without it. `refused` comes back every cycle until the comment is deleted, so say it once
486
494
  per refused comment `id` (note the ids you reported in the transcript). On `queued: true`, also
@@ -495,10 +503,10 @@ shows them.
495
503
  | Classification | Action |
496
504
  |---|---|
497
505
  | `working`, `waiting`, `finished` | Nothing. |
498
- | `requestion` | With Telegram: re-send the pending question once, then re-record it with `ledger set-question` (same text, new message id); that restarts the re-ping clock. With no channel: nothing to re-send; leave it pending. |
506
+ | `requestion` | **Ask.** With Telegram, re-send the pending question once, then re-record it with `ledger set-question` (same text, new message id); that restarts the re-ping clock. With no channel, leave it pending. |
499
507
  | `stalled`, `dead` | Read the item. If it left the `claimed` role, a human moved it: do not retry or move it; `ledger finish <ref> --status FAILED` with reason "left the claimed role outside the manager". Otherwise check for a merged PR first (`gh pr list --state merged --search <ref>` in the item's repo dir). If merged, leave the state change to Lisa's lifecycle and `ledger finish <ref> --status DONE` with reason "PR merged". Otherwise `claude stop <worker>` if it is still listed, then re-read the item (after the stop, so a reassignment in the meantime is seen) and `spawn` a **fresh** attempt when capacity allows, with that re-read's `--assignees` ("Taking an item"; the CLI counts attempts). |
500
- | `setup-gap` | The worker's first prompt never ran: `setupGap.kind` is `unknown-command` (Lisa's plugin is not visible in that repo, so `/lisa:implement` is unknown there) or `prompt-blocked` (a `UserPromptSubmit` hook rejected the prompt; `setupGap.detail` is what the hook said). Retrying cannot fix it. `claude stop <worker>` if it is still listed, `ledger finish <ref> --status FAILED --setup-gap` with reason "setup gap: <kind>: <detail>" (the spawn is not counted as an attempt). Then read the item: If it left the `claimed` role, a human moved it: respect that and do not move it back to the `ready` role. Otherwise move the item back to the `ready` role. Either way post one plain-language line naming the repo and the fix to Telegram, do not respawn it, do not dispatch to that repo again until the operator fixes it, and end the cycle `recovery-required` with that line as the summary. `classify` has already recorded the repo's setup gap, so later cycles' `queue` leaves that repo out and `spawn` refuses it until the operator fixes the repo and runs `ledger clear-setup-gap <repo>` (`.` on a single-repo project); include that command in the line. |
501
- | `blocked-on-prompt` | The live worker is stuck on a prompt nobody attached can answer: its agent row reports `waitingFor` (e.g. "permission prompt") other than waiting on its own subagent. It will never proceed on its own, however its logs change. `claude stop <worker>` if it is still listed, then re-read the item and `spawn` a **fresh** attempt when capacity allows, with its `--assignees` ("Taking an item"; the CLI counts attempts; at `stall.maxAttempts` it classifies `exhausted` instead). Send the operator one plain-English line naming the item, the `waitingFor` text, and that the worker was stopped and a fresh attempt starts when capacity allows (Telegram when configured, else the cycle summary). This is once per occurrence: the fresh worker is not blocked, so the same occurrence never repeats. Not a `setup-gap`: the first prompt ran, so the attempt counts and the item stays claimed. |
508
+ | `setup-gap` | The worker's first prompt never ran: `setupGap.kind` is `unknown-command` (Lisa's plugin is not visible in that repo, so `/lisa:implement` is unknown there) or `prompt-blocked` (a `UserPromptSubmit` hook rejected the prompt; `setupGap.detail` is what the hook said). Retrying cannot fix it. `claude stop <worker>` if it is still listed, `ledger finish <ref> --status FAILED --setup-gap` with reason "setup gap: <kind>: <detail>" (the spawn is not counted as an attempt). Then read the item: If it left the `claimed` role, a human moved it: respect that and do not move it back to the `ready` role. Otherwise move the item back to the `ready` role. Either way send one **Ask** naming the repo and what the operator needs to fix, do not respawn it, do not dispatch to that repo again until the operator fixes it, and end the cycle `recovery-required` with that line as the summary. `classify` has already recorded the repo's setup gap, so later cycles' `queue` leaves that repo out and `spawn` refuses it until the operator fixes the repo and runs `ledger clear-setup-gap <repo>` (`.` on a single-repo project); include that command in the line. |
509
+ | `blocked-on-prompt` | The live worker is stuck on a prompt nobody attached can answer: its agent row reports `waitingFor` (e.g. "permission prompt") other than waiting on its own subagent. It will never proceed on its own, however its logs change. `claude stop <worker>` if it is still listed, then re-read the item and `spawn` a **fresh** attempt when capacity allows, with its `--assignees` ("Taking an item"; the CLI counts attempts; at `stall.maxAttempts` it classifies `exhausted` instead). Record one **FYI** line naming the item, the `waitingFor` text, and when a fresh attempt can start. This is once per occurrence: the fresh worker is not blocked, so the same occurrence never repeats. Not a `setup-gap`: the first prompt ran, so the attempt counts and the item stays claimed. |
502
510
  | `exhausted` | Attempts reached `stall.maxAttempts`. Stop the worker if listed, `ledger finish <ref> --status FAILED`, then follow "Mark and move on" with `--kind exhausted` and, as the reason, how many attempts failed and how each ended: it moves the item to the `blocked` role and marks it for a human. |
503
511
 
504
512
  Why a worker started with `--dangerously-skip-permissions` reaches a permission prompt at all is
@@ -571,7 +579,7 @@ just as long. Sweep both every cycle, after `classify` and before Dispatch:
571
579
  already posted, which only re-lanes the item); a partial
572
580
  lift is also in `holds.keep` with the reasons still left for a person. Then remove
573
581
  the human-needed label and move it to the `ready` role as its `actions` say.
574
- - `holds.keep`: when `holds.digest.changed` is true, send `holds.digest.text` to the operator
582
+ - `holds.keep`: when `holds.digest.changed` is true, send `holds.digest.text` as an **Ask**
575
583
  once (Telegram when configured, else the cycle summary; nothing when the text is empty), then
576
584
  record it with `ledger control --hold-digest <fingerprint>` (`none` when `fingerprint` is
577
585
  null). An unchanged list is never re-sent.
@@ -692,8 +700,8 @@ item held back only by them is claimable in this same cycle:
692
700
  separately, e.g. `stale links: cleared 12 stale blocker links on 7 items; 3 now ready to start;
693
701
  2 planned removals not done (retried next cycle); 4 items left for the next cycle; 29 real
694
702
  blockers remain on 18 items.` Put that in the cycle's transcript line and in the recorded run
695
- summary. Send Telegram nothing for this sweep unless `report.inaccessible` is non-empty and its
696
- list changed since the last cycle: then one line naming the blockers that could not be opened.
703
+ summary. When `report.inaccessible` is non-empty and its list changed since the last cycle,
704
+ report one **FYI** line naming the blockers that could not be opened.
697
705
 
698
706
  A failure anywhere in this sweep is one transcript line and never makes the cycle
699
707
  `recovery-required`. It holds dispatch for one item only: an item owed a restore (a blocker link
@@ -715,12 +723,12 @@ queue below). For each:
715
723
  - `release`: dissolve the edges and move the item to the `ready` role in one `lisa-tracker-write`
716
724
  update, with a comment `[lisa-session-manager] Released: <reason>`, setting the assignee to
717
725
  "me" in that same update when the item is unassigned ("Taking an item"); read it back with
718
- `lisa-tracker-read` and confirm the role (and the assignee) changed before you claim it did. Notify Telegram.
726
+ `lisa-tracker-read` and confirm the role (and the assignee) changed before you claim it did. Report the release as **FYI**.
719
727
  - `decide` (access-only; a blocker was closed NOT PLANNED): relay nothing to the operator. Make
720
728
  the call from the item's and blocker's evidence: re-scope the item to build without the
721
729
  dependency (dissolve the edge and move it to the `ready` role), drop an edge that no longer applies, or
722
730
  close the item; a move of an unassigned item also assigns it to "me" ("Taking an item"). Post `[lisa-session-manager] Decision: <which> — <why>` in the same
723
- `lisa-tracker-write` update, and read it back before you claim it landed. Notify Telegram.
731
+ `lisa-tracker-write` update, and read it back before you claim it landed. Report the decision as **FYI**.
724
732
  - `keep` with a manager question pending: "Waiting on a human" above handles it.
725
733
  - `keep`, `escalate`, `skip-human-gate`: leave it. Gate self-blocks and clarification blocks
726
734
  belong to `lisa-repair-intake` and humans.
@@ -825,7 +833,7 @@ Skip while `capacity` reports `paused`. Otherwise:
825
833
  Never spawn on the claim's word alone.
826
834
  4. **Spawn.** `spawn <ref> --assignees '<json>' [--repo <key>]`, with the assignees the step 3
827
835
  re-read showed ("Taking an item", rule 4).
828
- - exit 0: post `[<REF>] started in <repo> (<name>)` to Telegram.
836
+ - exit 0: record `[<REF>] started in <repo> (<name>)` as **FYI**.
829
837
  - exit 3 (no capacity): move the item back to the `ready` role and stop dispatching.
830
838
  - exit 4 (a live worker holds it): if the ledger has no item for it, record it with
831
839
  `ledger record-spawn <ref> --worker <worker> --session-id <id> --repo <key>`; continue.
@@ -840,15 +848,15 @@ Skip while `capacity` reports `paused`. Otherwise:
840
848
  refuses the repo (exit 2, nothing launched) until the operator fixes it and runs
841
849
  `ledger clear-setup-gap <repo>` (`.` on a single-repo project). The exit-2 stdout's
842
850
  `setupGapStatus` says what to tell the operator:
843
- - `recorded` (this spawn found the gap) or `not-recorded` (the ledger write failed): post
844
- the CLI's one-line message to Telegram and end the cycle `recovery-required` with that
851
+ - `recorded` (this spawn found the gap) or `not-recorded` (the ledger write failed): send
852
+ the CLI's one-line message as an **Ask** and end the cycle `recovery-required` with that
845
853
  message as the summary.
846
854
  - `already-recorded` (the operator was told when it was recorded): post nothing and
847
855
  continue with the next item.
848
856
  - exit 5 (not taken; nothing launched): `reason` `unassigned` means assign the item to "me"
849
857
  through `lisa-tracker-write`, read it back, and spawn again with the new assignees;
850
858
  `foreign` means someone else holds it, so leave it where it is and continue.
851
- - any other exit: move the item back to the `ready` role, notify Telegram, continue.
859
+ - any other exit: move the item back to the `ready` role, report the return as **FYI**, and continue.
852
860
  3. **Backlog tier, lowest priority.** Only when `backlogPickup` is on, every `ordered` item has been
853
861
  taken or skipped, and `capacity` still says `can_spawn`. Ready work always wins: never promote a
854
862
  backlog item while a dispatchable Ready item remains. For the next `backlogOrdered` item with no
@@ -876,9 +884,9 @@ Skip while `capacity` reports `paused`. Otherwise:
876
884
  is exactly the one the update intended: the unchanged existing assignee, or "me" for an
877
885
  item that was unassigned. Then `ledger validation-cleared <ref>`.
878
886
  5. Continue with steps 2.3 and 2.4 (claim in the child repo, re-read, spawn, handle the exit)
879
- exactly as for a Ready item, with one change: on exit 0, post
880
- `[<REF>] promoted from backlog and started in <repo> (<name>)` in place of the plain start
881
- notice. Every other exit keeps its step 2.4 handling.
887
+ exactly as for a Ready item, with one change: on exit 0, use
888
+ `[<REF>] promoted from backlog and started in <repo> (<name>)` as the **FYI** start message.
889
+ Every other exit keeps its step 2.4 handling.
882
890
  A promotion written and read back counts as a state change for the run outcome; a spawn that
883
891
  then fails follows step 2.4's exits (the item stays in Ready with the assignee step 4 left on it).
884
892
 
@@ -19,6 +19,11 @@ The configured tracker's lanes (the `ready`, `claimed` and `blocked` roles from
19
19
  read through the tracker access layer; the manager's ledger in `.lisa/session-manager/`; the live
20
20
  session list from `claude agents`; and, when `sessionManager.notify.provider` is `telegram`, the
21
21
  project's own Telegram chat. Telegram is optional: with no channel, questions wait in the ledger.
22
+ Read `notifyLevel` from `status` each cycle. `all` sends questions and routine notices to a paired
23
+ chat. `asks-only` sends questions, requests for operator action, duplicate-manager warnings and the
24
+ hold digest. Routine worker starts, outcomes, tracker changes and acknowledgements go to the
25
+ transcript in that mode. Reply in the paired chat when the operator sends a `status` command
26
+ at either notification level.
22
27
 
23
28
  ## Candidate selection
24
29
 
@@ -9,7 +9,7 @@
9
9
  import path from "node:path";
10
10
 
11
11
  import { listAgents, requireConfig, run } from "./cli-runtime.mjs";
12
- import { notifyProvider } from "./config.mjs";
12
+ import { DEFAULT_NOTIFY_LEVEL, notifyProvider } from "./config.mjs";
13
13
  import { callerSessionName, otherCyclers } from "./cyclers.mjs";
14
14
  import { buildHasSession } from "./launch.mjs";
15
15
  import { listPendingQuestions } from "./ledger-questions.mjs";
@@ -88,6 +88,7 @@ export async function status(ctx) {
88
88
  otherCyclers: otherCyclers(ledger, config, ctx.now()),
89
89
  },
90
90
  notify: notifyProvider(config),
91
+ notifyLevel: config.notify.level ?? DEFAULT_NOTIFY_LEVEL,
91
92
  control: ledger.control,
92
93
  workers: Object.entries(ledger.items).map(([ref, item]) => ({
93
94
  ref,
@@ -58,6 +58,9 @@ export const SESSION_MANAGER_DEFAULTS = Object.freeze({
58
58
  /** The `notify` choices `buildDefaultBlock` (and `init-config --notify`) take. */
59
59
  export const NOTIFY_CHOICES = Object.freeze(["none", "telegram"]);
60
60
 
61
+ /** Notification level used when a project declares none. */
62
+ export const DEFAULT_NOTIFY_LEVEL = "all";
63
+
61
64
  /**
62
65
  * The notification provider a resolved (or raw) block runs with.
63
66
  * @param {{ notify?: { provider?: unknown } } | null | undefined} config
@@ -76,7 +79,7 @@ export function notifyProvider(config) {
76
79
  * cpuFraction: number, maxLoadPerCore: number }} CapacityBlock
77
80
  * @typedef {{ noOutputMinutes: number, maxAttempts: number,
78
81
  * requestionHours: number, orphanHours: number }} StallBlock
79
- * @typedef {{ provider: string, stateDir?: string }} NotifyBlock
82
+ * @typedef {{ provider: string, level?: "all" | "asks-only", stateDir?: string }} NotifyBlock
80
83
  * @typedef {{
81
84
  * name: string,
82
85
  * interval: string,
@@ -918,6 +918,26 @@ function renderDefaults(config) {
918
918
  return lines;
919
919
  }
920
920
 
921
+ /**
922
+ * Project only the allowlisted notification level from the manager block.
923
+ * The manager's identities and Telegram settings stay outside startup context.
924
+ * @param {unknown} manager The resolved `sessionManager` block.
925
+ * @returns {string|null} A line for configured managers.
926
+ */
927
+ function renderNotificationLevel(manager) {
928
+ if (!isObject(manager)) return null;
929
+ const notify = manager.notify;
930
+ const field = "sessionManager.notify.level";
931
+ if (notify !== undefined && !isObject(notify)) {
932
+ return `${field}: INVALID — sessionManager.notify must be an object.`;
933
+ }
934
+ const level = notify?.level;
935
+ if (level === undefined) return `${field}: all [Lisa built-in default]`;
936
+ return level === "all" || level === "asks-only"
937
+ ? `${field}: ${level}`
938
+ : `${field}: INVALID — use "all" or "asks-only".`;
939
+ }
940
+
921
941
  /**
922
942
  * Render the whole value body, honouring {@link CONTEXT_BUDGET}.
923
943
  * @param {object} config Resolved config.
@@ -934,6 +954,8 @@ function renderBody(config) {
934
954
  // so it is the line that must survive.
935
955
  /** @type {string[]} */
936
956
  const lines = renderDefaults(config);
957
+ const notification = renderNotificationLevel(config.sessionManager);
958
+ if (notification !== null) lines.push(notification);
937
959
  const gapLines = lines.length;
938
960
  // The gates block is the one this module promises never elides, so the lines
939
961
  // it produced are named here rather than inferred from their shape later.
@@ -943,7 +965,7 @@ function renderBody(config) {
943
965
  // needs reading in full.
944
966
  /** @type {Set<string>} */
945
967
  const unelidable = new Set();
946
- const seen = new Set();
968
+ const seen = new Set(notification === null ? [] : ["sessionManager"]);
947
969
  for (const key of SUBTREE_ORDER) {
948
970
  if (!(key in config)) continue;
949
971
  seen.add(key);
@@ -750,6 +750,7 @@ operator chooses Telegram (`init-config --notify telegram`).
750
750
  | `sessionManager.stall.requestionHours` | no | `4` | How long an unanswered worker question waits before the manager asks again (zero or positive). |
751
751
  | `sessionManager.stall.orphanHours` | no | `2` | An item in the `claimed` (or `review`) role with no live worker and no tracker update for this long is presumed abandoned, and the orphan sweep finishes, returns or re-dispatches it. Anything updated more recently is left alone, which protects someone running `/lisa:implement` by hand (zero or positive). |
752
752
  | `sessionManager.notify.provider` | no | `none` | `none` (no notification channel) or `telegram`. Absent, like an absent `notify` block, means `none`. Any other value fails validation. |
753
+ | `sessionManager.notify.level` | no | `all` | `all` sends both action requests and routine notices with Telegram. `asks-only` sends human-needed questions, requests for operator action, duplicate-manager warnings and the hold digest. Routine notices go to the transcript. `status` reports `notifyLevel`, and the session-start config shows the resolved level. |
753
754
  | `sessionManager.notify.stateDir` | **yes** with `telegram`; must be absent otherwise | — | This project's own Telegram state dir. A `stateDir` without the `telegram` provider fails validation, because no bot would use it. Never the shared default `~/.claude/channels/telegram`, because one bot per state dir is how projects stay isolated. Setup writes `~/.claude/channels/telegram-<project>`. |
754
755
  | `sessionManager.trustedAuthorIds` | no | — | Optional list of **stable tracker user ids**, as strings: the GitHub numeric user id (`gh api users/<login> --jq .id`), the Jira `accountId`, or the Linear user id. Not logins or display names: matching compares ids, so a plain login silently matches no one and excludes every item. An entry may name its kind: `id:<v>` is an id, `login:<v>` a GitHub login (matched by the queue and on-item answers; the hold-release check compares ids only and ignores it). A login GitHub frees (after a rename or a deleted account) can be re-registered by someone else, so prefer `id:` for trust. `integration:<service>` trusts items an integration files with no person behind them (Linear's `botActor`, by `subType` such as `sentry`, else its bot `id`, never its self-chosen display name; never an item a person or an outside user filed; it trusts who filed the item, not text an outsider can get into it, such as a quoted error message); GitHub Apps and Jira automation file as an account, so trust them by `id:`. An unknown prefix or an empty value fails validation. When set, the manager takes only items authored by these people or integrations. It is also who may release a human hold, unless `trustedReleaseIds` is set — so removing it removes every hold releaser too. |
755
756
  | `sessionManager.trustedReleaseIds` | no | `trustedAuthorIds` | Optional, non-empty list of the **people** who may release a human hold (`blocked-plan`, the orphan sweep) and answer a question on the item. Same entry grammar as `trustedAuthorIds` minus `integration:`, which is refused: an integration is not a person. Unset, it falls back to `trustedAuthorIds`, so existing projects are unaffected; with neither set, no hold is released. |
@@ -18,7 +18,7 @@ Callers (planning skills, lifecycle skills) invoke this skill at:
18
18
 
19
19
  | Milestone | What to post | Suggested role |
20
20
  |-----------|--------------|----------------|
21
- | Plan created | Plan contents (sections + ordered tasks) as a comment | `ready` |
21
+ | Plan created | Plan contents (sections + ordered tasks) as a comment | `claimed` |
22
22
  | Implementation in progress | Branch URL + first commit | `claimed` |
23
23
  | PR ready for review | PR URL + summary, the implementation handoff comment | `review` — **optional; omitted by most projects, in which case there is no transition to suggest** |
24
24
  | PR merged | Merge SHA + deploy environment (if known) | env-keyed `done`, **then run Phase 4b — mandatory when the merge target is a non-terminal env branch** |
@@ -71,7 +71,7 @@ Sections:
71
71
 
72
72
  Tasks: 7 ordered items.
73
73
 
74
- Next: implementation begins. Suggested state: **Ready**.
74
+ Next: implementation begins. Suggested state: **<state resolved from linear.workflow.claimed>**.
75
75
  ```
76
76
 
77
77
  ## Phase 3 — Post Comment
@@ -101,7 +101,7 @@ Resolve the suggestion by role, and **say nothing when the role is unset**:
101
101
 
102
102
  | Milestone | Role to resolve | When the role is unset |
103
103
  |---|---|---|
104
- | `plan-created` | `ready` | required — report a setup defect |
104
+ | `plan-created` | `claimed` | required — report a setup defect |
105
105
  | `implementation-in-progress` | `claimed` | required — report a setup defect |
106
106
  | `pr-ready` | `review` | **optional — suggest no transition; the Issue stays in `claimed`** |
107
107
  | `pr-merged` | `done` for the PR's target env (via `deploy.branches`) | required — report a setup defect |
@@ -694,6 +694,8 @@ const STALL_RULES = {
694
694
 
695
695
  /** Notification providers `sessionManager.notify.provider` accepts. */
696
696
  const NOTIFY_PROVIDERS = ["none", "telegram"];
697
+ /** Notification levels `sessionManager.notify.level` accepts. */
698
+ const NOTIFY_LEVELS = ["all", "asks-only"];
697
699
 
698
700
  /**
699
701
  * Validate `sessionManager.notify`.
@@ -719,6 +721,9 @@ function validateNotify(notify) {
719
721
  `supported. Use "none" (no notification channel) or "telegram".`,
720
722
  ];
721
723
  }
724
+ if (notify?.level !== undefined && !NOTIFY_LEVELS.includes(notify.level)) {
725
+ return ['sessionManager.notify.level must be "all" or "asks-only".'];
726
+ }
722
727
  const hasStateDir = notify?.stateDir !== undefined;
723
728
  const stateDirOk =
724
729
  typeof notify?.stateDir === "string" && notify.stateDir.trim() !== "";