@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
@@ -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() !== "";
@@ -102,11 +102,12 @@ the manager.
102
102
  `/lisa:implement <REF> managedBy=<manager-name>`; `lisa-implement` owns what `managedBy=` means.
103
103
  Never start a worker another way, and never reuse a worker for another item or a new attempt.
104
104
  - **Capacity** comes only from `capacity` (`can_spawn`, `free_slots`).
105
- - **Notification channel.** Read `notify` from `status` at the start of every cycle. `telegram`: the
105
+ - **Notification channel.** Read `notify` from `status` at the start of every cycle. Read
106
+ `notifyLevel` from the same result. `telegram`: the
106
107
  project's own bot, which `start` attached. `none` (`sessionManager.notify.provider` is `"none"`,
107
108
  or there is no `notify` block): there is no channel, and `start` launched you without one.
108
109
  Having no channel is a normal configuration, never a failure. Every step below that posts to
109
- Telegram applies only with `telegram`; "Questions and notifications" says what to do instead.
110
+ Telegram uses both fields as described in "Questions and notifications".
110
111
  - **Ledger.** `.lisa/session-manager/ledger.json` is the manager's memory across restarts; attempts
111
112
  live there, never in tracker comments. Read it with `ledger get`; change it only through the
112
113
  `ledger` subcommands.
@@ -170,9 +171,14 @@ the manager.
170
171
  - **Telegram configured** (`notify` is `telegram`):
171
172
  - Talk only to the paired, allowlisted chat. Every message starts with the ref in brackets, e.g.
172
173
  `[<TEAM>-123]`. Keep it phone-sized, with options on numbered lines.
173
- - Post starts, questions, finishes, failures and tracker changes you made. No routine cycle
174
- summaries.
175
- - When you post a question, keep the Telegram message id the reply tool returns; the ledger needs
174
+ - `notifyLevel: all` sends both **Ask** and **FYI** messages. `notifyLevel: asks-only` sends **Ask**
175
+ messages and records **FYI** messages in the transcript. Both modes keep the usual ledger and
176
+ tracker writes. Routine cycle summaries belong in the transcript.
177
+ - Reply to an operator's Telegram `status` command in the paired chat at either notification level.
178
+ - **Ask** covers questions, requests for operator action, duplicate-manager warnings and the
179
+ hold digest. **FYI** covers worker starts and outcomes, tracker changes, routine retries and
180
+ answer acknowledgements.
181
+ - When you post an **Ask** question, keep the Telegram message id the reply tool returns; the ledger needs
176
182
  it.
177
183
  - **End every question with how to answer:** `Answer with: <label> <your answer>`. The label is
178
184
  the key for a Jira or Linear item (`<TEAM>-123`), and for a GitHub item `#12`, or `repo#12` when
@@ -184,7 +190,7 @@ the manager.
184
190
  with the rest of the cycle, and end it with outcome `recovery-required` and the summary
185
191
  `Telegram not paired: run tmux attach -t <name> and pair with /telegram:access pair <code>.`
186
192
  (`<name>` is `sessionManager.name`). Skip the other notices. The `/loop` keeps running, and the
187
- next cycle sends whatever is still pending ("Unsent questions" below).
193
+ next cycle sends any pending **Ask** questions ("Unsent questions" below).
188
194
 
189
195
  ## Mark and move on
190
196
 
@@ -239,8 +245,8 @@ In this order, every time:
239
245
  It returns `marker` (the configured human-needed label, else the configured `blocked` role),
240
246
  `move` for an `exhausted` item, the `comment` to post, and `planningMiss`. It writes nothing. Exit 2 for text
241
247
  that looks like a credential: rewrite it without the secret and plan again. Exit 2 because no
242
- marker is configured: record the question (step 2), carry on, and end the cycle
243
- `recovery-required` with the CLI's message as the summary.
248
+ marker is configured: record the question (step 2), send the CLI's recovery message as an
249
+ **Ask**, carry on, and end the cycle `recovery-required` with that message as the summary.
244
250
  2. **Ledger first.** `ledger set-question <ref> --kind <kind>` with the same text on STDIN (add
245
251
  `--sender <sender>` for a worker's question). The ledger comes before the tracker so a crash
246
252
  leaves a pending question the next cycle finishes, never a marker nobody will remove.
@@ -273,14 +279,15 @@ In this order, every time:
273
279
  `signal` is `wrongly-escalated`, also post `planningMiss.overruledMarker.comment` on the item
274
280
  once the subagent has started, so the overruled-escalation sweep does not capture the same
275
281
  ruling again.
276
- 7. **Continue the cycle.** With Telegram, also send the question there, ending with
282
+ 7. **Continue the cycle.** **Ask.** With Telegram, also send the question there, ending with
277
283
  `answerWith.channel`, and re-record it with `ledger set-question <ref> --telegram-message-id <id>`
278
284
  (same text, which keeps its `askedAt` and its mark). Without a channel there is nothing else to
279
285
  send. Then go on with the next item.
280
286
 
281
287
  If step 3 or 4 fails (the tracker is unreachable, or the read-back does not show the marker),
282
288
  leave the ledger as it is (`markedAt` stays null), carry on with the cycle and end it
283
- `recovery-required`; the next cycle's "Waiting on a human" step finishes the mark.
289
+ `recovery-required`. **Ask** for any operator action that the recovery requires. The next cycle's
290
+ "Waiting on a human" step finishes the mark.
284
291
 
285
292
  **Clearing**, once a human has answered (on the item, with `answer`, or on Telegram):
286
293
 
@@ -362,24 +369,25 @@ leave the ledger as it is (`markedAt` stays null), carry on with the cycle and e
362
369
  Telegram plugin (0.0.7) does not, so never guess one.
363
370
  - `answer`: follow "Clearing" in "Mark and move on" with `message` as the answer (`SendMessage`
364
371
  to a live worker, `resume <ref>` for one that was idle-stopped or is gone without finishing,
365
- the `repo:<name>` stamp for a repo-routing question), then acknowledge on Telegram.
372
+ the `repo:<name>` stamp for a repo-routing question), then acknowledge it as **FYI**.
366
373
  **Only when no worker will receive it** — `ledger get <ref>` shows the worker reported `DONE`
367
374
  or `FAILED`, the question is `exhausted`, or no worker was started for it (a `decision`, say;
368
375
  never a repo-route) — first queue it in the ledger with `channel-answer <ref>` (`body` on
369
376
  STDIN, source `channel`), so "Record the answer on the item" can post it. A live or resumable
370
377
  worker gets its answer exactly as before, without `channel-answer`. Exit 2 from
371
378
  `channel-answer` delivers nothing and has two causes, told apart by its stderr: one that says
372
- the answer looks like it holds a credential (reply on Telegram that it was refused and should
373
- be sent again without the secret), or one that says the ref has no pending question or no
374
- ledger item (reply that the question was already answered or nothing is pending for it).
379
+ the answer looks like it holds a credential (**Ask** the operator to send it again without
380
+ the secret), or one that says the ref has no pending question or no ledger item (as **FYI**,
381
+ reply that the question was already answered or nothing is pending for it).
375
382
  When the answer was recorded on the item, say so in the acknowledgement: it was posted on the
376
383
  item, where anyone who can read the item can see it.
377
- - `ambiguous`: ask which ref it is for, listing `candidates`, each with the label to start the
384
+ - `ambiguous`: **Ask** which ref it is for, listing `candidates`, each with the label to start the
378
385
  answer with (`Answer with: #12 <your answer>`).
379
- - `invalid-command`: a mistyped command (`cap 40`, `stop A B`). Deliver it to no worker. Reply on
380
- Telegram with `reason`, and say that an answer meant for a worker starts with its label.
386
+ - `invalid-command`: a mistyped command (`cap 40`, `stop A B`). Deliver it to no worker. **Ask**
387
+ the operator to correct it with `reason` and explain how to label an answer meant for a worker.
381
388
  - `command`:
382
- - `status`: summarize `status` (running, cap, pending questions, paused).
389
+ - `status`: reply directly in the paired Telegram chat with the running count, cap, pending
390
+ questions, and pause state. Send the reply at either notification level.
383
391
  - `pause` / `resume`: `ledger control --paused true|false`. Relaying and reconciling continue
384
392
  while paused; only dispatch stops.
385
393
  - `cap N`: `ledger control --max-workers N`. This may raise the limit above
@@ -389,8 +397,8 @@ leave the ledger as it is (`markedAt` stays null), carry on with the cycle and e
389
397
  `ledger finish <ref> --status FAILED` with reason "stopped by the operator". This is an explicit
390
398
  human instruction, which is why it may return a claimed item to Ready.
391
399
  - **`[<REF>] DONE: …` / `[<REF>] FAILED: …` from a worker:**
392
- `ledger finish <ref> --status DONE|FAILED --sender <sender>` (reason on STDIN) and post one line
393
- to Telegram. On `FAILED`, also move the item to the `blocked`
400
+ `ledger finish <ref> --status DONE|FAILED --sender <sender>` (reason on STDIN) and report one **FYI**
401
+ line. On `FAILED`, also move the item to the `blocked`
394
402
  role through `lisa-tracker-write` with a comment `[lisa-session-manager] Worker failed: <reason>`
395
403
  (assigning "me" in the same update when it is unassigned: "Taking an item"),
396
404
  and read both back with `lisa-tracker-read`. When the reason says a
@@ -411,7 +419,7 @@ session's own loops with `CronList`. When `manager.self` is true, this session *
411
419
  and its own `/loop` is the manager's loop: never report it as a second manager, and never recommend
412
420
  `CronDelete` or stopping it. When `manager.self` is true and `status` `manager.otherCyclers` is not
413
421
  empty, another session ran a cycle in this project within twice the interval, so two managers can
414
- hand out the same item: warn the operator (over Telegram too when `notify` is `telegram`), name each
422
+ hand out the same item: warn the operator as an **Ask**, name each
415
423
  entry's `by` and `at`, and recommend stopping **that** session's loop, never this one. A `pid:` entry
416
424
  names the process that ran that one cycle, so a single other session can leave several `pid:`
417
425
  entries; report them as one or more other sessions, never as an exact count. When
@@ -419,7 +427,7 @@ entries; report them as one or more other sessions, never as an exact count. Whe
419
427
  `manager.self` is `null`, recommend stopping nothing, whatever `manager.otherCyclers` says; report
420
428
  that self-identification failed. When `manager.running` is true, `manager.self` is false, and this
421
429
  session runs its own `/lisa:session-manager cycle` loop, two managers can hand out the same item:
422
- warn the operator and recommend stopping **this** session's loop, never the tmux manager. The tmux
430
+ warn the operator as an **Ask** and recommend stopping **this** session's loop, never the tmux manager. The tmux
423
431
  manager cannot see another session's loop, so it learns of one only from `manager.otherCyclers` and
424
432
  must not invent one from anything else. `manager.self` means running inside the manager's tmux
425
433
  session, so another Claude started in a second window of that same tmux session also reads true.
@@ -427,7 +435,7 @@ Never infer a second manager from the tmux session existing plus a loop being pr
427
435
 
428
436
  ### 1. Reconcile
429
437
 
430
- **Unsent questions** (only when `notify` is `telegram`). `ledger get` shows every pending question.
438
+ **Unsent questions** (only when `notify` is `telegram`). **Ask.** `ledger get` shows every pending question.
431
439
  One with `telegramMessageId: null` never reached Telegram: it was recorded while Telegram was
432
440
  unavailable or unpaired, or before Telegram was configured. (Re)send each
433
441
  to Telegram now and re-record it with `ledger set-question <ref> --telegram-message-id <id>` (same
@@ -478,7 +486,7 @@ shows them.
478
486
  answers with the `answerCommand` from `status`. A reply that looks like it holds a credential is
479
487
  never queued: it is skipped and listed in `refused`, so a later reply is still read.
480
488
  Whenever `refused` is present (with `queued: true`, or `queued: false` and
481
- `reason: "credential-refused"`), tell the operator in plain words, from `refusedExplanation`:
489
+ `reason: "credential-refused"`), send an **Ask** in plain words, from `refusedExplanation`:
482
490
  the secret is now on the item, so they should delete that comment, rotate the secret, and reply
483
491
  again without it. `refused` comes back every cycle until the comment is deleted, so say it once
484
492
  per refused comment `id` (note the ids you reported in the transcript). On `queued: true`, also
@@ -493,10 +501,10 @@ shows them.
493
501
  | Classification | Action |
494
502
  |---|---|
495
503
  | `working`, `waiting`, `finished` | Nothing. |
496
- | `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. |
504
+ | `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. |
497
505
  | `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). |
498
- | `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. |
499
- | `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. |
506
+ | `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. |
507
+ | `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. |
500
508
  | `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. |
501
509
 
502
510
  Why a worker started with `--dangerously-skip-permissions` reaches a permission prompt at all is
@@ -569,7 +577,7 @@ just as long. Sweep both every cycle, after `classify` and before Dispatch:
569
577
  already posted, which only re-lanes the item); a partial
570
578
  lift is also in `holds.keep` with the reasons still left for a person. Then remove
571
579
  the human-needed label and move it to the `ready` role as its `actions` say.
572
- - `holds.keep`: when `holds.digest.changed` is true, send `holds.digest.text` to the operator
580
+ - `holds.keep`: when `holds.digest.changed` is true, send `holds.digest.text` as an **Ask**
573
581
  once (Telegram when configured, else the cycle summary; nothing when the text is empty), then
574
582
  record it with `ledger control --hold-digest <fingerprint>` (`none` when `fingerprint` is
575
583
  null). An unchanged list is never re-sent.
@@ -690,8 +698,8 @@ item held back only by them is claimable in this same cycle:
690
698
  separately, e.g. `stale links: cleared 12 stale blocker links on 7 items; 3 now ready to start;
691
699
  2 planned removals not done (retried next cycle); 4 items left for the next cycle; 29 real
692
700
  blockers remain on 18 items.` Put that in the cycle's transcript line and in the recorded run
693
- summary. Send Telegram nothing for this sweep unless `report.inaccessible` is non-empty and its
694
- list changed since the last cycle: then one line naming the blockers that could not be opened.
701
+ summary. When `report.inaccessible` is non-empty and its list changed since the last cycle,
702
+ report one **FYI** line naming the blockers that could not be opened.
695
703
 
696
704
  A failure anywhere in this sweep is one transcript line and never makes the cycle
697
705
  `recovery-required`. It holds dispatch for one item only: an item owed a restore (a blocker link
@@ -713,12 +721,12 @@ queue below). For each:
713
721
  - `release`: dissolve the edges and move the item to the `ready` role in one `lisa-tracker-write`
714
722
  update, with a comment `[lisa-session-manager] Released: <reason>`, setting the assignee to
715
723
  "me" in that same update when the item is unassigned ("Taking an item"); read it back with
716
- `lisa-tracker-read` and confirm the role (and the assignee) changed before you claim it did. Notify Telegram.
724
+ `lisa-tracker-read` and confirm the role (and the assignee) changed before you claim it did. Report the release as **FYI**.
717
725
  - `decide` (access-only; a blocker was closed NOT PLANNED): relay nothing to the operator. Make
718
726
  the call from the item's and blocker's evidence: re-scope the item to build without the
719
727
  dependency (dissolve the edge and move it to the `ready` role), drop an edge that no longer applies, or
720
728
  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
721
- `lisa-tracker-write` update, and read it back before you claim it landed. Notify Telegram.
729
+ `lisa-tracker-write` update, and read it back before you claim it landed. Report the decision as **FYI**.
722
730
  - `keep` with a manager question pending: "Waiting on a human" above handles it.
723
731
  - `keep`, `escalate`, `skip-human-gate`: leave it. Gate self-blocks and clarification blocks
724
732
  belong to `lisa-repair-intake` and humans.
@@ -823,7 +831,7 @@ Skip while `capacity` reports `paused`. Otherwise:
823
831
  Never spawn on the claim's word alone.
824
832
  4. **Spawn.** `spawn <ref> --assignees '<json>' [--repo <key>]`, with the assignees the step 3
825
833
  re-read showed ("Taking an item", rule 4).
826
- - exit 0: post `[<REF>] started in <repo> (<name>)` to Telegram.
834
+ - exit 0: record `[<REF>] started in <repo> (<name>)` as **FYI**.
827
835
  - exit 3 (no capacity): move the item back to the `ready` role and stop dispatching.
828
836
  - exit 4 (a live worker holds it): if the ledger has no item for it, record it with
829
837
  `ledger record-spawn <ref> --worker <worker> --session-id <id> --repo <key>`; continue.
@@ -838,15 +846,15 @@ Skip while `capacity` reports `paused`. Otherwise:
838
846
  refuses the repo (exit 2, nothing launched) until the operator fixes it and runs
839
847
  `ledger clear-setup-gap <repo>` (`.` on a single-repo project). The exit-2 stdout's
840
848
  `setupGapStatus` says what to tell the operator:
841
- - `recorded` (this spawn found the gap) or `not-recorded` (the ledger write failed): post
842
- the CLI's one-line message to Telegram and end the cycle `recovery-required` with that
849
+ - `recorded` (this spawn found the gap) or `not-recorded` (the ledger write failed): send
850
+ the CLI's one-line message as an **Ask** and end the cycle `recovery-required` with that
843
851
  message as the summary.
844
852
  - `already-recorded` (the operator was told when it was recorded): post nothing and
845
853
  continue with the next item.
846
854
  - exit 5 (not taken; nothing launched): `reason` `unassigned` means assign the item to "me"
847
855
  through `lisa-tracker-write`, read it back, and spawn again with the new assignees;
848
856
  `foreign` means someone else holds it, so leave it where it is and continue.
849
- - any other exit: move the item back to the `ready` role, notify Telegram, continue.
857
+ - any other exit: move the item back to the `ready` role, report the return as **FYI**, and continue.
850
858
  3. **Backlog tier, lowest priority.** Only when `backlogPickup` is on, every `ordered` item has been
851
859
  taken or skipped, and `capacity` still says `can_spawn`. Ready work always wins: never promote a
852
860
  backlog item while a dispatchable Ready item remains. For the next `backlogOrdered` item with no
@@ -874,9 +882,9 @@ Skip while `capacity` reports `paused`. Otherwise:
874
882
  is exactly the one the update intended: the unchanged existing assignee, or "me" for an
875
883
  item that was unassigned. Then `ledger validation-cleared <ref>`.
876
884
  5. Continue with steps 2.3 and 2.4 (claim in the child repo, re-read, spawn, handle the exit)
877
- exactly as for a Ready item, with one change: on exit 0, post
878
- `[<REF>] promoted from backlog and started in <repo> (<name>)` in place of the plain start
879
- notice. Every other exit keeps its step 2.4 handling.
885
+ exactly as for a Ready item, with one change: on exit 0, use
886
+ `[<REF>] promoted from backlog and started in <repo> (<name>)` as the **FYI** start message.
887
+ Every other exit keeps its step 2.4 handling.
880
888
  A promotion written and read back counts as a state change for the run outcome; a spawn that
881
889
  then fails follows step 2.4's exits (the item stays in Ready with the assignee step 4 left on it).
882
890
 
@@ -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,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "8.2.11",
3
+ "version": "8.3.0",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "8.2.11",
3
+ "version": "8.3.0",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -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() !== "";