@codyswann/lisa 7.0.4 → 7.1.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.
- package/all/copy-overwrite/scripts/lib/work-item-estimate-calibration.mjs +131 -0
- package/all/copy-overwrite/scripts/lib/work-item-estimate-check.mjs +15 -5
- package/all/copy-overwrite/scripts/lisa-estimate.mjs +29 -3
- package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.js +18 -0
- package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +38 -17
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/dist/utils/usage-accounting.d.ts.map +1 -1
- package/dist/utils/usage-accounting.js +3 -1
- package/dist/utils/usage-accounting.js.map +1 -1
- package/package.json +4 -4
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-github-validate-issue/SKILL.md +2 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-jira-validate-ticket/SKILL.md +2 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-linear-validate-issue/SKILL.md +2 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/SKILL.md +45 -15
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-usage.mjs +10 -3
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-workers.mjs +52 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/orphan-sweep.mjs +2 -20
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/session-manager.mjs +5 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/take-check.mjs +110 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-track/SKILL.md +11 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-tracker-claim/SKILL.md +1 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-usage-accounting/references/estimate.md +25 -2
- package/plugins/lisa/rules/reference/work-item-definition-of-ready.md +7 -2
- package/plugins/lisa/skills/lisa-github-validate-issue/SKILL.md +2 -0
- package/plugins/lisa/skills/lisa-jira-validate-ticket/SKILL.md +2 -0
- package/plugins/lisa/skills/lisa-linear-validate-issue/SKILL.md +2 -0
- package/plugins/lisa/skills/lisa-session-manager/SKILL.md +45 -15
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-usage.mjs +10 -3
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-workers.mjs +52 -1
- package/plugins/lisa/skills/lisa-session-manager/scripts/orphan-sweep.mjs +2 -20
- package/plugins/lisa/skills/lisa-session-manager/scripts/session-manager.mjs +5 -1
- package/plugins/lisa/skills/lisa-session-manager/scripts/take-check.mjs +110 -0
- package/plugins/lisa/skills/lisa-track/SKILL.md +11 -1
- package/plugins/lisa/skills/lisa-tracker-claim/SKILL.md +1 -0
- package/plugins/lisa/skills/lisa-usage-accounting/references/estimate.md +25 -2
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/skills/lisa-github-validate-issue/SKILL.md +2 -0
- package/plugins/lisa-agy/skills/lisa-jira-validate-ticket/SKILL.md +2 -0
- package/plugins/lisa-agy/skills/lisa-linear-validate-issue/SKILL.md +2 -0
- package/plugins/lisa-agy/skills/lisa-session-manager/SKILL.md +45 -15
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-usage.mjs +10 -3
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-workers.mjs +52 -1
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/orphan-sweep.mjs +2 -20
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/session-manager.mjs +5 -1
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/take-check.mjs +110 -0
- package/plugins/lisa-agy/skills/lisa-track/SKILL.md +11 -1
- package/plugins/lisa-agy/skills/lisa-tracker-claim/SKILL.md +1 -0
- package/plugins/lisa-agy/skills/lisa-usage-accounting/references/estimate.md +25 -2
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/rules/reference/work-item-definition-of-ready.md +7 -2
- package/plugins/lisa-copilot/skills/lisa-github-validate-issue/SKILL.md +2 -0
- package/plugins/lisa-copilot/skills/lisa-jira-validate-ticket/SKILL.md +2 -0
- package/plugins/lisa-copilot/skills/lisa-linear-validate-issue/SKILL.md +2 -0
- package/plugins/lisa-copilot/skills/lisa-session-manager/SKILL.md +45 -15
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-usage.mjs +10 -3
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-workers.mjs +52 -1
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/orphan-sweep.mjs +2 -20
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/session-manager.mjs +5 -1
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/take-check.mjs +110 -0
- package/plugins/lisa-copilot/skills/lisa-track/SKILL.md +11 -1
- package/plugins/lisa-copilot/skills/lisa-tracker-claim/SKILL.md +1 -0
- package/plugins/lisa-copilot/skills/lisa-usage-accounting/references/estimate.md +25 -2
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/rules/work-item-definition-of-ready-reference.mdc +7 -2
- package/plugins/lisa-cursor/skills/lisa-github-validate-issue/SKILL.md +2 -0
- package/plugins/lisa-cursor/skills/lisa-jira-validate-ticket/SKILL.md +2 -0
- package/plugins/lisa-cursor/skills/lisa-linear-validate-issue/SKILL.md +2 -0
- package/plugins/lisa-cursor/skills/lisa-session-manager/SKILL.md +45 -15
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-usage.mjs +10 -3
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-workers.mjs +52 -1
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/orphan-sweep.mjs +2 -20
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/session-manager.mjs +5 -1
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/take-check.mjs +110 -0
- package/plugins/lisa-cursor/skills/lisa-track/SKILL.md +11 -1
- package/plugins/lisa-cursor/skills/lisa-tracker-claim/SKILL.md +1 -0
- package/plugins/lisa-cursor/skills/lisa-usage-accounting/references/estimate.md +25 -2
- package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/rules/reference/work-item-definition-of-ready.md +7 -2
- package/plugins/lisa-devin/skills/lisa-github-validate-issue/SKILL.md +2 -0
- package/plugins/lisa-devin/skills/lisa-jira-validate-ticket/SKILL.md +2 -0
- package/plugins/lisa-devin/skills/lisa-linear-validate-issue/SKILL.md +2 -0
- package/plugins/lisa-devin/skills/lisa-session-manager/SKILL.md +45 -15
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-usage.mjs +10 -3
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-workers.mjs +52 -1
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/orphan-sweep.mjs +2 -20
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/session-manager.mjs +5 -1
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/take-check.mjs +110 -0
- package/plugins/lisa-devin/skills/lisa-track/SKILL.md +11 -1
- package/plugins/lisa-devin/skills/lisa-tracker-claim/SKILL.md +1 -0
- package/plugins/lisa-devin/skills/lisa-usage-accounting/references/estimate.md +25 -2
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/src/base/rules/reference/work-item-definition-of-ready.md +7 -2
- package/plugins/src/base/skills/lisa-github-validate-issue/SKILL.md +2 -0
- package/plugins/src/base/skills/lisa-jira-validate-ticket/SKILL.md +2 -0
- package/plugins/src/base/skills/lisa-linear-validate-issue/SKILL.md +2 -0
- package/plugins/src/base/skills/lisa-session-manager/SKILL.md +45 -15
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-usage.mjs +10 -3
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-workers.mjs +52 -1
- package/plugins/src/base/skills/lisa-session-manager/scripts/orphan-sweep.mjs +2 -20
- package/plugins/src/base/skills/lisa-session-manager/scripts/session-manager.mjs +5 -1
- package/plugins/src/base/skills/lisa-session-manager/scripts/take-check.mjs +110 -0
- package/plugins/src/base/skills/lisa-track/SKILL.md +11 -1
- package/plugins/src/base/skills/lisa-tracker-claim/SKILL.md +1 -0
- package/plugins/src/base/skills/lisa-usage-accounting/references/estimate.md +25 -2
- package/scripts/two-channel-couplings.json +1 -1
- package/typescript/copy-overwrite/.prettierignore +1 -0
|
@@ -190,8 +190,13 @@ The estimate is **not** a write-time or ready-time requirement. Deterministic
|
|
|
190
190
|
sources (Sentry, New Relic, monitors) file items they cannot estimate, and a
|
|
191
191
|
missing estimate never forces a human question, because the claiming agent
|
|
192
192
|
writes one. So S21 at ready time refuses only an estimate that is present and
|
|
193
|
-
wrong.
|
|
194
|
-
|
|
193
|
+
wrong. At claim time `lisa-track` reruns it with `--phase claim`, where a
|
|
194
|
+
missing estimate fails: the claiming agent estimates the item, calibrated
|
|
195
|
+
against comparable finished items, and writes it before any work. If
|
|
196
|
+
estimating itself fails, the work still goes ahead: the item stays claimed, the
|
|
197
|
+
result records `estimate_outcome: failed` with the reason, and a plain-English
|
|
198
|
+
comment on the item says why (`lisa-track` step 4). It is `N/A` when the
|
|
199
|
+
project turns the requirement off. Nobody is ever asked for an estimate.
|
|
195
200
|
|
|
196
201
|
## Relationship to the lifecycle
|
|
197
202
|
|
|
@@ -408,6 +408,8 @@ Enforces the token-estimate part of the vendor-neutral `work-item-definition-of-
|
|
|
408
408
|
|
|
409
409
|
**What it checks.** An item with **no** `## Lisa Estimate` section PASSes: an estimate is not required at creation or at ready, because deterministic sources (Sentry, New Relic, monitors) cannot produce one, and the claiming agent writes it before any work begins. A section that **is** present FAILs when its `<!-- lisa:estimate ... -->` token is missing or unparseable, the token range is inverted, the recommended model is not in `workItem.estimate.models`, or the dollar range disagrees with the price table the token names. There is never more than one section.
|
|
410
410
|
|
|
411
|
+
At claim time `lisa-track` reruns the same check with `--phase claim`, where a missing estimate fails and the claiming agent writes one before any work; this validator runs the ready-time form.
|
|
412
|
+
|
|
411
413
|
Remediation: re-render the section with `node scripts/lisa-estimate.mjs render --tokens-low <n> --tokens-high <n> --model <allowed value> --body-file <file>` and write the result back. Never ask a person for the estimate.
|
|
412
414
|
|
|
413
415
|
`product_relevant: false` — the estimate is produced by agents, not by whoever wrote the item.
|
|
@@ -410,6 +410,8 @@ Enforces the token-estimate part of the vendor-neutral `work-item-definition-of-
|
|
|
410
410
|
|
|
411
411
|
**What it checks.** An item with **no** `## Lisa Estimate` section PASSes: an estimate is not required at creation or at ready, because deterministic sources (Sentry, New Relic, monitors) cannot produce one, and the claiming agent writes it before any work begins. A section that **is** present FAILs when its `<!-- lisa:estimate ... -->` token is missing or unparseable, the token range is inverted, the recommended model is not in `workItem.estimate.models`, or the dollar range disagrees with the price table the token names. There is never more than one section.
|
|
412
412
|
|
|
413
|
+
At claim time `lisa-track` reruns the same check with `--phase claim`, where a missing estimate fails and the claiming agent writes one before any work; this validator runs the ready-time form.
|
|
414
|
+
|
|
413
415
|
Remediation: re-render the section with `node scripts/lisa-estimate.mjs render --tokens-low <n> --tokens-high <n> --model <allowed value> --body-file <file>` and write the result back. Never ask a person for the estimate.
|
|
414
416
|
|
|
415
417
|
`product_relevant: false` — the estimate is produced by agents, not by whoever wrote the item.
|
|
@@ -395,6 +395,8 @@ Enforces the token-estimate part of the vendor-neutral `work-item-definition-of-
|
|
|
395
395
|
|
|
396
396
|
**What it checks.** An item with **no** `## Lisa Estimate` section PASSes: an estimate is not required at creation or at ready, because deterministic sources (Sentry, New Relic, monitors) cannot produce one, and the claiming agent writes it before any work begins. A section that **is** present FAILs when its `<!-- lisa:estimate ... -->` token is missing or unparseable, the token range is inverted, the recommended model is not in `workItem.estimate.models`, or the dollar range disagrees with the price table the token names. There is never more than one section.
|
|
397
397
|
|
|
398
|
+
At claim time `lisa-track` reruns the same check with `--phase claim`, where a missing estimate fails and the claiming agent writes one before any work; this validator runs the ready-time form.
|
|
399
|
+
|
|
398
400
|
Remediation: re-render the section with `node scripts/lisa-estimate.mjs render --tokens-low <n> --tokens-high <n> --model <allowed value> --body-file <file>` and write the result back. Never ask a person for the estimate.
|
|
399
401
|
|
|
400
402
|
`product_relevant: false` — the estimate is produced by agents, not by whoever wrote the item.
|
|
@@ -81,6 +81,23 @@ the manager.
|
|
|
81
81
|
entry, exactly as before. A plain all-digit entry is a login here but a numeric id to
|
|
82
82
|
`item-answer`, so `validate` warns about it; write `login:<v>` or `id:<v>` instead. The `queue`
|
|
83
83
|
output echoes the entries as `operators`.
|
|
84
|
+
- **Taking an item: assign it to "me".** This is the one statement of the rule; every step below
|
|
85
|
+
that takes, files or moves an item follows it.
|
|
86
|
+
1. Every item the manager takes is assigned to "me" when it has no assignee: dispatching or
|
|
87
|
+
claiming it, releasing it (Blocked to Ready), re-dispatching or retrying it, or driving it
|
|
88
|
+
as the manager. Never replace an existing assignee: an item assigned to someone other than
|
|
89
|
+
"me" or an operator is never taken, and an operator's assignment is never overwritten.
|
|
90
|
+
2. Every item the manager files (a promotion ticket, a split child, a follow-up, the retirement
|
|
91
|
+
proposal) is created assigned to "me", unless an operator or another person was named as its
|
|
92
|
+
owner.
|
|
93
|
+
3. A state move the manager makes on an unassigned item sets the assignee to "me" in the same
|
|
94
|
+
`lisa-tracker-write` update, and the read-back confirms both.
|
|
95
|
+
4. Before `spawn`, re-read the item with `lisa-tracker-read` and pass its live assignees as
|
|
96
|
+
`--assignees '<json>'`: `[]` when unassigned, GitHub `[{"login":…,"id":…}]` with the REST
|
|
97
|
+
numeric `.assignees[].id`, Jira accountIds, Linear user ids. `spawn` refuses an unassigned
|
|
98
|
+
item, or one held by anyone but "me" or an operator, with exit 5 and launches nothing. An
|
|
99
|
+
unassigned item at that point is a failed claim: assign it to "me", read it back, and spawn
|
|
100
|
+
again; never dispatch it unassigned. `foreign` means someone else holds it: leave it.
|
|
84
101
|
- **Workers** start only through `spawn`. The worker prompt is exactly
|
|
85
102
|
`/lisa:implement <REF> managedBy=<manager-name>`; `lisa-implement` owns what `managedBy=` means.
|
|
86
103
|
Never start a worker another way, and never reuse a worker for another item or a new attempt.
|
|
@@ -229,7 +246,8 @@ In this order, every time:
|
|
|
229
246
|
leaves a pending question the next cycle finishes, never a marker nobody will remove.
|
|
230
247
|
3. **Tracker.** One `lisa-tracker-write` update: apply `marker` (add the label, or, when
|
|
231
248
|
`marker.type` is `role`, move the item to the `blocked` role), for `exhausted` also move the
|
|
232
|
-
item to the `blocked` role (`move`), and post `comment` as a comment.
|
|
249
|
+
item to the `blocked` role (`move`), and post `comment` as a comment. When that update moves
|
|
250
|
+
an unassigned item, it also assigns it to "me" ("Taking an item"). Use only the names
|
|
233
251
|
`mark-plan` returned; never hard-code one.
|
|
234
252
|
4. **Read back** with `lisa-tracker-read`: the marker (and the move) landed and the comment is
|
|
235
253
|
there. Never claim a mark you did not read back.
|
|
@@ -373,7 +391,8 @@ leave the ledger as it is (`markedAt` stays null), carry on with the cycle and e
|
|
|
373
391
|
- **`[<REF>] DONE: …` / `[<REF>] FAILED: …` from a worker:**
|
|
374
392
|
`ledger finish <ref> --status DONE|FAILED --sender <sender>` (reason on STDIN) and post one line
|
|
375
393
|
to Telegram. On `FAILED`, also move the item to the `blocked`
|
|
376
|
-
role through `lisa-tracker-write` with a comment `[lisa-session-manager] Worker failed: <reason
|
|
394
|
+
role through `lisa-tracker-write` with a comment `[lisa-session-manager] Worker failed: <reason>`
|
|
395
|
+
(assigning "me" in the same update when it is unassigned: "Taking an item"),
|
|
377
396
|
and read both back with `lisa-tracker-read`. When the reason says a
|
|
378
397
|
design or product decision is needed, mark it instead ("Mark and move on", `--kind decision`).
|
|
379
398
|
|
|
@@ -475,9 +494,9 @@ shows them.
|
|
|
475
494
|
|---|---|
|
|
476
495
|
| `working`, `waiting`, `finished` | Nothing. |
|
|
477
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. |
|
|
478
|
-
| `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 `spawn` a **fresh** attempt when capacity allows (the CLI counts attempts). |
|
|
497
|
+
| `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). |
|
|
479
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. |
|
|
480
|
-
| `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 `spawn` a **fresh** attempt when capacity allows (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. |
|
|
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. |
|
|
481
500
|
| `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. |
|
|
482
501
|
|
|
483
502
|
Why a worker started with `--dangerously-skip-permissions` reaches a permission prompt at all is
|
|
@@ -535,11 +554,13 @@ just as long. Sweep both every cycle, after `classify` and before Dispatch:
|
|
|
535
554
|
or is in the `review` role; leave it where it is. A later cycle that still sees a recent refusal puts the item
|
|
536
555
|
in `return`, or in `parked` when a person holds it or it is in the `review` role, and retries
|
|
537
556
|
finishing once the refusal is more than 24 hours old.
|
|
538
|
-
- `return`: move it to the `ready` role with the entry's `comment
|
|
557
|
+
- `return`: move it to the `ready` role with the entry's `comment` (assigning "me" in the same
|
|
558
|
+
update when it is unassigned: "Taking an item", rule 3). A merged item whose
|
|
539
559
|
completion was refused, and an item whose pull request was closed without merging, land here
|
|
540
560
|
with a comment that names that pull request, so the next agent builds on the earlier work.
|
|
541
|
-
- `redispatch`: an open pull request and no worker. Claim it (`reused`)
|
|
542
|
-
|
|
561
|
+
- `redispatch`: an open pull request and no worker. Claim it (`reused`), assigning it to "me"
|
|
562
|
+
when it is unassigned ("Taking an item"), and `spawn` it exactly as Dispatch steps 2.3 and
|
|
563
|
+
2.4, ahead of new items, while `capacity` says `can_spawn`. A
|
|
543
564
|
spawn that reaches `stall.maxAttempts` follows the `exhausted` row above.
|
|
544
565
|
- `parked`: post the entry's `comment` only when `reasonOnItem` is false. An item in the
|
|
545
566
|
`review` role with an open pull request is parked, never re-dispatched: it is waiting on
|
|
@@ -565,12 +586,13 @@ queue below). For each:
|
|
|
565
586
|
rule); never treat "blocker closed" as "unblocked".
|
|
566
587
|
2. Pipe `{labels,body,comments,edges}` as JSON to `blocked-plan --ref <ref>`. Act on `action`:
|
|
567
588
|
- `release`: dissolve the edges and move the item to the `ready` role in one `lisa-tracker-write`
|
|
568
|
-
update, with a comment `[lisa-session-manager] Released: <reason
|
|
569
|
-
|
|
589
|
+
update, with a comment `[lisa-session-manager] Released: <reason>`, setting the assignee to
|
|
590
|
+
"me" in that same update when the item is unassigned ("Taking an item"); read it back with
|
|
591
|
+
`lisa-tracker-read` and confirm the role (and the assignee) changed before you claim it did. Notify Telegram.
|
|
570
592
|
- `decide` (access-only; a blocker was closed NOT PLANNED): relay nothing to the operator. Make
|
|
571
593
|
the call from the item's and blocker's evidence: re-scope the item to build without the
|
|
572
594
|
dependency (dissolve the edge and move it to the `ready` role), drop an edge that no longer applies, or
|
|
573
|
-
close the item. Post `[lisa-session-manager] Decision: <which> — <why>` in the same
|
|
595
|
+
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
|
|
574
596
|
`lisa-tracker-write` update, and read it back before you claim it landed. Notify Telegram.
|
|
575
597
|
- `keep` with a manager question pending: "Waiting on a human" above handles it.
|
|
576
598
|
- `keep`, `escalate`, `skip-human-gate`: leave it. Gate self-blocks and clarification blocks
|
|
@@ -665,13 +687,17 @@ Skip while `capacity` reports `paused`. Otherwise:
|
|
|
665
687
|
entries, which on GitHub is the assignee's numeric id from the REST issue's
|
|
666
688
|
`.assignees[].id` (not the `id` of a GraphQL-backed `--json assignees` read, which is a node
|
|
667
689
|
id), on Jira the accountId and on Linear the user id; plain entries as "me" is compared; the
|
|
668
|
-
claim assigns only an unassigned item, so an operator's item keeps the operator)
|
|
669
|
-
|
|
690
|
+
claim assigns only an unassigned item, so an operator's item keeps the operator), or on
|
|
691
|
+
`claimed` or `reused` with no assignee, which goes on to the re-read below and its
|
|
692
|
+
assignment repair; anything else (an unsuccessful claim, or an assignee who is neither
|
|
693
|
+
"me" nor an operator) means skip. Then
|
|
670
694
|
re-read the item with `lisa-tracker-read`: if the re-read shows an assignee that is neither
|
|
671
695
|
"me" nor an operator, or shows the state did not change to the `claimed` role, skip it
|
|
672
|
-
(someone else holds it, or the claim did not land).
|
|
696
|
+
(someone else holds it, or the claim did not land). If it shows no assignee at all, the
|
|
697
|
+
claim failed to assign: assign it to "me" ("Taking an item") and re-read before going on.
|
|
673
698
|
Never spawn on the claim's word alone.
|
|
674
|
-
4. **Spawn.** `spawn <ref> [--repo <key>]
|
|
699
|
+
4. **Spawn.** `spawn <ref> --assignees '<json>' [--repo <key>]`, with the assignees the step 3
|
|
700
|
+
re-read showed ("Taking an item", rule 4).
|
|
675
701
|
- exit 0: post `[<REF>] started in <repo> (<name>)` to Telegram.
|
|
676
702
|
- exit 3 (no capacity): move the item back to the `ready` role and stop dispatching.
|
|
677
703
|
- exit 4 (a live worker holds it): if the ledger has no item for it, record it with
|
|
@@ -692,6 +718,9 @@ Skip while `capacity` reports `paused`. Otherwise:
|
|
|
692
718
|
message as the summary.
|
|
693
719
|
- `already-recorded` (the operator was told when it was recorded): post nothing and
|
|
694
720
|
continue with the next item.
|
|
721
|
+
- exit 5 (not taken; nothing launched): `reason` `unassigned` means assign the item to "me"
|
|
722
|
+
through `lisa-tracker-write`, read it back, and spawn again with the new assignees;
|
|
723
|
+
`foreign` means someone else holds it, so leave it where it is and continue.
|
|
695
724
|
- any other exit: move the item back to the `ready` role, notify Telegram, continue.
|
|
696
725
|
3. **Backlog tier, lowest priority.** Only when `backlogPickup` is on, every `ordered` item has been
|
|
697
726
|
taken or skipped, and `capacity` still says `can_spawn`. Ready work always wins: never promote a
|
|
@@ -767,7 +796,8 @@ tracker-derived), it holds when BOTH: a date-filtered tracker search finds no it
|
|
|
767
796
|
`claimed` role in the trailing 14 days, AND this cycle found zero Ready candidates. Then record
|
|
768
797
|
`policy-obsolete` and file **one** proposal through `lisa-tracker-write`, deduped on the marker
|
|
769
798
|
`[lisa-session-manager-retirement]` (search open and closed items for it first; never match on the
|
|
770
|
-
title), proposing `/lisa:tear-down-automations session-manager` or a longer `interval
|
|
799
|
+
title), proposing `/lisa:tear-down-automations session-manager` or a longer `interval`, assigned to "me"
|
|
800
|
+
("Taking an item", rule 2). Keep running.
|
|
771
801
|
|
|
772
802
|
Record with the summary (one plain line, the contract's exemplar voice) on STDIN:
|
|
773
803
|
|
|
@@ -14,7 +14,8 @@ prints a bare path); errors go to stderr. Untrusted text (answers, questions,
|
|
|
14
14
|
reasons, Telegram messages, summaries) is read from STDIN, never from argv.
|
|
15
15
|
|
|
16
16
|
Exit codes: 0 ok; 1 a command failed (claude, tmux or gh error); 2 bad repo,
|
|
17
|
-
bad config or bad usage; 3 no capacity; 4 a live worker already holds the ref
|
|
17
|
+
bad config or bad usage; 3 no capacity; 4 a live worker already holds the ref;
|
|
18
|
+
5 spawn refused an item that was not taken (unassigned or someone else's).
|
|
18
19
|
|
|
19
20
|
Workers and capacity
|
|
20
21
|
capacity [--max-workers <n>]
|
|
@@ -24,10 +25,16 @@ Workers and capacity
|
|
|
24
25
|
(capacity and spawn also take --meminfo <file>, a TEST-ONLY flag that
|
|
25
26
|
reads memory from a Linux meminfo file instead of this host. Skills
|
|
26
27
|
never pass it.)
|
|
27
|
-
spawn <ref> [--repo <key>] [--max-workers <n>]
|
|
28
|
+
spawn <ref> --assignees <json> [--repo <key>] [--max-workers <n>]
|
|
29
|
+
--assignees is required: the JSON array of the item's live assignees
|
|
30
|
+
as read back from the tracker, [] when unassigned (GitHub [{login,id}]
|
|
31
|
+
with the REST numeric id; Jira accountIds; Linear user ids).
|
|
28
32
|
Checks, in order: repo dir resolves and has .lisa.config.json (exit 2);
|
|
29
33
|
capacity (exit 3, stdout = capacity report); no live wk- worker for the
|
|
30
|
-
ref (exit 4, stdout = {ref,worker,sessionId});
|
|
34
|
+
ref (exit 4, stdout = {ref,worker,sessionId}); --assignees present (exit
|
|
35
|
+
2) and the item taken: at least one assignee, every one "me" (ledger
|
|
36
|
+
control.me) or a sessionManager.operatorIds entry (exit 5, stdout =
|
|
37
|
+
{ref,reason:"unassigned"|"foreign",me,foreign}); no recorded setup gap
|
|
31
38
|
for the repo (exit 2, nothing launched or recorded: fix the repo, then
|
|
32
39
|
ledger clear-setup-gap <repo>); no pending question in
|
|
33
40
|
the ledger for the ref (exit 2: clear it first). Then runs, with cwd = repo
|