@detergent-software/conductor 3.1.0-dev.3 → 3.1.0-dev.5
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/CHANGELOG.md +24 -0
- package/README.md +22 -13
- package/build/brief.js +28 -10
- package/build/brief.js.map +1 -1
- package/build/cli.js +62 -3
- package/build/cli.js.map +1 -1
- package/build/daemon.js +4 -0
- package/build/daemon.js.map +1 -1
- package/build/help.js +30 -4
- package/build/help.js.map +1 -1
- package/build/inbox.js +26 -6
- package/build/inbox.js.map +1 -1
- package/build/manager.js +5 -2
- package/build/manager.js.map +1 -1
- package/build/note.js +3 -11
- package/build/note.js.map +1 -1
- package/build/notes.js +83 -9
- package/build/notes.js.map +1 -1
- package/build/profile-fields.js +1 -0
- package/build/profile-fields.js.map +1 -1
- package/build/profile.js +6 -1
- package/build/profile.js.map +1 -1
- package/build/protocol.js +2 -0
- package/build/protocol.js.map +1 -1
- package/build/rules.js +11 -1
- package/build/rules.js.map +1 -1
- package/build/scheduler.js +30 -16
- package/build/scheduler.js.map +1 -1
- package/build/server.js +28 -3
- package/build/server.js.map +1 -1
- package/build/shelve.js +76 -0
- package/build/shelve.js.map +1 -0
- package/build/store.js +4 -2
- package/build/store.js.map +1 -1
- package/build/tracker-writes.js +13 -11
- package/build/tracker-writes.js.map +1 -1
- package/build/watchers/boards-writes.js +8 -3
- package/build/watchers/boards-writes.js.map +1 -1
- package/build/watchers/issues-writes.js +25 -4
- package/build/watchers/issues-writes.js.map +1 -1
- package/build/watchers/linear-writes.js +18 -5
- package/build/watchers/linear-writes.js.map +1 -1
- package/package.json +1 -1
- package/plugin/hooks/model.ts +41 -19
- package/plugin/hooks/register.tsx +50 -13
- package/plugin/skills/conductor-console/SKILL.md +5 -3
- package/plugin/skills/work-item/SKILL.md +4 -1
- package/plugin/skills/work-item/trackers/ado-boards.md +1 -1
- package/plugin/skills/work-item/trackers/github-issues.md +1 -1
- package/plugin/skills/work-item/trackers/linear.md +1 -1
- package/protocol/PROTOCOL.md +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
Releases are tagged `conductor-v<version>` and staged on npm by `atk-conductor-release` (`pipelines/release-conductor.yml`), which writes each section below. `scripts/check-changelog.mjs` fails when a tag has no section here.
|
|
4
4
|
|
|
5
|
+
## [3.1.0-dev.5](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/branchCompare?baseVersion=GTconductor-v3.1.0-dev.4&targetVersion=GTconductor-v3.1.0-dev.5) (2026-10-21)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **conductor:** answer a Handoff from the inbox (ATK-682) ([7200ce6](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/7200ce6d6ed5c423a6d3a86e979694e1b6c2f5ad))
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **conductor:** keep an inbox answer to one at a time (ATK-682) ([6bfcccc](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/6bfcccc219828737b84f5aef997550169352ce8c))
|
|
14
|
+
|
|
15
|
+
## [3.1.0-dev.4](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/branchCompare?baseVersion=GTconductor-v3.1.0-dev.3&targetVersion=GTconductor-v3.1.0-dev.4) (2026-10-21)
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **conductor:** shelve an item whose work stops for good (ATK-669) ([16173a3](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/16173a399a45ba901b7b1f5e831fc91413c9696e))
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* **conductor:** keep a shelve in force and leave nothing open (ATK-669) ([f8ee754](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/f8ee7545a3472f4267e8de5cd2388a4871bf9513))
|
|
24
|
+
|
|
25
|
+
### Documentation
|
|
26
|
+
|
|
27
|
+
* **conductor:** describe shelving in the skill, README and tests (ATK-669) ([3a9c446](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/3a9c4462bfb8a9ab6e04cd678ac8299d1d8ea6b4))
|
|
28
|
+
|
|
5
29
|
## [3.1.0-dev.3](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/branchCompare?baseVersion=GTconductor-v3.1.0-dev.2&targetVersion=GTconductor-v3.1.0-dev.3) (2026-10-21)
|
|
6
30
|
|
|
7
31
|
### Features
|
package/README.md
CHANGED
|
@@ -30,7 +30,10 @@ conduct approve <item> [--text <text>]
|
|
|
30
30
|
approve a plan: post "approve" on the item as you, wake its worker
|
|
31
31
|
conduct revise <item> <text> ask for another plan, waiting or approved: post "revise: <text>", wake its worker
|
|
32
32
|
conduct done <id> mark an inbox item done (a physical action, or one you handled)
|
|
33
|
+
conduct done <id> --answer <text> answer a scope, blocked or human Handoff: posts <text> on its item, then marks it done
|
|
33
34
|
conduct triage <item> --queue answer a triage item: take its triage label off (--hold: label it human too)
|
|
35
|
+
conduct shelve <item> --reason <why>
|
|
36
|
+
stop an item's work for good: back to not-started, labelled human, its worker retired
|
|
34
37
|
conduct notify [--json] the notification profile, quiet hours, each channel's state
|
|
35
38
|
conduct notify profile [<name>] [--until <when>]
|
|
36
39
|
switch where pushes go (see Notifications)
|
|
@@ -164,15 +167,18 @@ A tmux tab runs where no desktop is, so `conduct attach` and `conduct console` p
|
|
|
164
167
|
|
|
165
168
|
A worker writes each phase note (`## <work skill> · <Phase>[ · <kind>: <one line>]`, such as `## work-item · PR opened`) with `conduct note <item> <file>`. The daemon posts the file as a comment on the item in the tracker, then records the phase at once: on the worker (`phase` in `GET /fleet` and `conduct status`), on the item, and as a `note.posted` event. A PR opened note also records the worker's PR (`pr`, such as `ado:Contoso.Web#1850` or `github:<owner>/<repo>#458`) from its first PR link, replacing an earlier one; until then, the worker's first `pr:` wait records it. `conduct status` and the console's fleet pane show it. The worker is `--worker <worker>`, else the one whose worktree is the current checkout, else the project's live worker on that item. The project is the worker's, else the one whose tracker key (the Linear team, or the Boards or GitHub Issues `key`) is the item's key prefix.
|
|
166
169
|
|
|
167
|
-
**State follows the notes** (providers design note, section 5). A `Started`, `PR opened` or `
|
|
170
|
+
**State follows the notes** (providers design note, section 5). A `Started`, `PR opened`, `Landed` or `Shelved` note (not a Handoff) also moves the item, to the state its phase maps to in the profile's `tracker.transitions`:
|
|
168
171
|
|
|
169
172
|
| Phase | Linear default | ADO Boards default (Scrum) | GitHub Issues default |
|
|
170
173
|
|---|---|---|---|
|
|
171
174
|
| `started` | In Progress, assigned to the key's owner | Committed, assigned to the `az` identity | the label `in-progress`, assigned to the gh account |
|
|
172
175
|
| `pr-opened` | In Review, the PR attached | no change, the PR linked (an `ArtifactLink` for an ADO PR, a `Hyperlink` for a GitHub one) | the label `in-review` in place of `in-progress`; a GitHub PR is linked by the `Refs <owner>/<repo>#<n>` its body carries, any other by a comment with its URL |
|
|
173
176
|
| `landed` | Done | Done | closed as completed, the phase label taken off |
|
|
177
|
+
| `shelved` | Backlog, unassigned, labelled `humanLabel` | New, unassigned, tagged `humanLabel` | the phase labels and assignees taken off, labelled `humanLabel`; `null` adds no label of its own, a string adds that one too |
|
|
174
178
|
|
|
175
|
-
A phase mapped to `null` moves nothing (`started` still assigns). A `Started` never reopens a closed item (`kept`); a `PR opened` on one does, for a follow-up PR. The PR linked is the worker's, else the note's first PR link. A write the tracker refuses is a warning on the note's answer and stderr, and a `tracker.transition-failed` event; the note stands, and the verb still exits 0. A write that took is `tracker.transitioned`. With no daemon, `conduct note` posts from the item's project checkout as its account, and moves the item the same way; nothing is recorded then.
|
|
179
|
+
A phase mapped to `null` moves nothing (`started` still assigns, `shelved` still unassigns and labels). A `Started` or `Shelved` never reopens a closed item (`kept`); a `PR opened` on one does, for a follow-up PR. The PR linked is the worker's, else the note's first PR link. A write the tracker refuses is a warning on the note's answer and stderr, and a `tracker.transition-failed` event; the note stands, and the verb still exits 0. A write that took is `tracker.transitioned`. With no daemon, `conduct note` posts from the item's project checkout as its account, and moves the item the same way; nothing is recorded then.
|
|
180
|
+
|
|
181
|
+
**Shelving** (ATK-669). A `Shelved` note says the work stops for good, with the reason: a blocker, a decision someone else owns, a PR dropped with `conduct pr abandon`. It is the one move back: the human label goes on first (a label that doesn't take leaves the item where it is), then the item goes to not-started as above, unassigned, so the scheduler doesn't launch it again. With no state in `tracker.transitions.shelved`, Linear takes the team's own not-started state by its type. A revise never holds it back. `conduct note` refuses it, posting nothing, for a done or canceled item and while the item's PR is open, merged or doesn't read, and after it refuses the item's other notes (Handoffs aside) until a `Started` takes the item up again, so a worker still running can't undo an operator's shelve. The scheduler's next tick fires `item.shelved` for a worker whose newest lifecycle note since its launch is `Shelved` (a `Started` after it, from the operator in its tab, means it isn't), and the default rule `retire-shelved` retires it with its worktree and branch kept, whatever its PR, which frees its Area. That kept worktree raises no inbox item. The brief and the conductor's plan records start after the newest `Shelved` note: a closed PR with no `PR opened` note after it, and every Plan, approval and revise before it, belong to the run it ended. Taking the human label off puts the item back in the queue, and its next worker starts at orient and writes a new plan, which an auto-approve rule can still approve. `conduct shelve <item> --reason "…"` posts the same note for the operator (on the item's worker when one is in flight) through the daemon; it refuses a Done or Canceled item, an open PR (abandon it first) and a merged one (`conduct land`), posting nothing.
|
|
176
182
|
|
|
177
183
|
**Worker protocol 2.** The notes, their phases and kinds, the waits and the wake text are the package's spec, [`protocol/PROTOCOL.md`](protocol/PROTOCOL.md), held as data in `src/protocol.ts`. `conduct note` checks each note against it before anything is posted, on the daemon and with no daemon alike. It refuses one with an unknown phase, a Handoff without a kind and its line, a kind its phase doesn't carry (`jason` is `operator` since protocol 2), or a Plan without its `**Size tier**` and `**Landing:**` lines, and the error names the rule. The readers (watchers, briefs, history) still read older notes and people's comments.
|
|
178
184
|
|
|
@@ -304,7 +310,7 @@ An item resolves itself when its condition is seen, and records what resolved it
|
|
|
304
310
|
| `plan` | a `Plan` note (`conduct note`), or an `approval` wait; not a Plan an `auto-approve now` rule approves (unless its comment fails). An answer by someone who isn't an approver adds `(ignored approve from <name>: not an approver)` to its text | the approval wait resolving (an approver's `approve` or `revise:` comment), a `Plan approved` note, a newer Plan, or `conduct approve` / `revise` |
|
|
305
311
|
| `merge` | a `Handoff · merge: <PR>` note; a `pr … merged` wait attaches to it. Held while its PR's checks are red, and held at once (no push) when the note names a PR whose checks are red: raised again as it was when a checks wait on the PR resolves passed | its PR wait resolving as merged, abandoned or closed, a `Landed` note, or the PR's checks failing (`pr.checks-failed`, resolved as `held: …`). A PR wait without the note raises nothing, because auto landing needs nobody |
|
|
306
312
|
| `npm-otp` | a `Handoff · npm-otp` note (the `npm stage approve …` on its heading is the command), or an `npm` wait: the `npm-stage` release kind's gate | the version on its tag, or a `Resumed` or `Landed` note |
|
|
307
|
-
| `operator`, `release`, `human`, `scope`, `blocked`, `abandoned`, `failed` | a Handoff note of that kind. For `scope`, `blocked` and `human`, an `item … comment` or `item … unlabelled` wait attaches to it, and a comment by someone who isn't an approver adds `(ignored comment from <name>: not an approver)` to its text | any later note on the item (such as `Resumed`), `conduct done`, or for `scope`, `blocked` and `human` the wait attached to it resolving (the first one the worker registered, such as an approver's comment) |
|
|
313
|
+
| `operator`, `release`, `human`, `scope`, `blocked`, `abandoned`, `failed` | a Handoff note of that kind. For `scope`, `blocked` and `human`, an `item … comment` or `item … unlabelled` wait attaches to it, and a comment by someone who isn't an approver adds `(ignored comment from <name>: not an approver)` to its text | any later note on the item (such as `Resumed`), `conduct done`, or for `scope`, `blocked` and `human` `conduct done --answer` (the console's `/answer`) or the wait attached to it resolving (the first one the worker registered, such as an approver's comment) |
|
|
308
314
|
| `permission`, `stall` | `worker.stalled` (no idle `stall` while the worker's Handoff item that a later note answers is open; see Workers) | `worker.stall-cleared`, a park or resume, a new wait or Handoff (stall only), or a daemon restart (it is raised again if it persists) |
|
|
309
315
|
| `stall` (park failing) | `worker.park-failed`, with `conduct attach` and `conduct retire` | a park, the session stopping unexpectedly (which raises `failed`), its retirement, or a daemon restart (the park is tried again, and fails again if it still does). A new wait doesn't resolve it. A retire stops the session the same way, so when the pid outlives `claude stop`, end that process: the next sweep finds the session gone |
|
|
310
316
|
| `failed` | a failed launch, or a session that stopped unexpectedly | a new launch, the worker running again (a retry's revive included), or its retirement |
|
|
@@ -332,6 +338,8 @@ For an item raised from a note:
|
|
|
332
338
|
|
|
333
339
|
If the tracker refuses the comment, nothing is resolved. Only a plan takes approve or revise; `conduct done <id>` resolves any item.
|
|
334
340
|
|
|
341
|
+
`conduct done 15 --answer <text>` (the console's `/answer`) answers a `scope`, `blocked` or `human` Handoff from the inbox (ATK-682). Every word after `--answer` is the text, quoted or not. The daemon posts the text on the item as it is, with the same key as `conduct approve`, so the comment carries the operator's name, and then resolves the inbox item as `done (conduct done --answer, comment <id>)`. It doesn't resolve the worker's wait itself. The worker's `item … comment` wait counts the key owner's comment, so the watcher resumes the worker on its next pass, as for an answer typed on the tracker: one resume path, with the answer kept on the item. Any other kind of item, or one with no item key, refuses an answer before anything is posted, and a comment the tracker refuses resolves nothing (502 with `posted`). An answer on a `human` item leaves the `human` label on: the worker wakes on the comment.
|
|
342
|
+
|
|
335
343
|
An approved plan has no inbox item, so `conduct revise ENG-312 "<text>"` (and the console's `/revise`) with no plan of the item in the inbox revises the item's approved plan instead (ATK-664). The daemon posts `revise: <text>` the same way and then does at once what its 5-minute revise sweep would: it records the revise once for the Plan, and resolves every open wait of the item's parked worker with `plan ENG-312 revised: re-plan …`, so the worker resumes and re-plans. Once the PR has merged it wakes nobody: the revise is a follow-up PR, which the worker learns of at its next note. A running worker's next note is held back (exit 4), as for any revise of an approved plan. An item whose newest Plan isn't approved, or that has none the daemon saw, is refused before anything is posted. The daemon records only the revise the item's brief shows, which it reads up to three times, 2 s apart, since a tracker's read can lag its write. That way the worker's next note, which reads the brief too, is held back by the same revise. When the brief doesn't show the revise yet, can't be read, or the record fails, nothing is recorded, `conduct revise` says why, and the sweep records it on its next pass.
|
|
336
344
|
|
|
337
345
|
## Notifications
|
|
@@ -400,10 +408,10 @@ Rules say what the conductor does when something happens (design note, section 9
|
|
|
400
408
|
]
|
|
401
409
|
```
|
|
402
410
|
|
|
403
|
-
- **Sources, in order:** the item's project's `rules`, its machine profile's (`~/.conductor/projects/<project>.json`, named `project.<project>.machine:<id>`) before its repo's (`.claude/conductor.json`, changed by PR, named `project.<project>:<id>`; see Projects), then `~/.conductor/rules.json`, then the built-in defaults: the conductor's own behavior written as rules (`launch`, `retire-closed`, `park-on-wait`, `resume-on-wait`, `compact-on-park`, `runaway`, `daily-cap`, `ready-to-release`, `queue-drained`, `triage`, which raises a new item that waits on the profile's triage label in the inbox, `conductor-handoff`, which escalates a worker's `Handoff · conductor` note to the console, and `hold-pre-start-handoff`, which adds the human label when a worker hands off as `human`, `operator`, `blocked` or `scope` before its `Started` note, so the scheduler never launches work no worker can do again; remove the label if the item should be picked later), and `release-pre-start-hold`, which takes that label off again when the worker clears the hold itself (its `Resumed`, or its `Started` after the hold), and leaves a human label the hold didn't add (ATK-575). A rule with an `id` replaces the rule with the same id further down, so a file holds only the differences, and a machine-profile rule replaces the repo's rule of its id (`"do": "none"` switches it off).
|
|
404
|
-
- **when:** `and`, `or`, `not` and parentheses over comparisons (`==`, `!=`, `<`, `<=`, `>`, `>=`, `in [a, b]`, `<label> in item.labels`, `Started in item.phases`) and events. An event rule fires when one of its events happens: `note`, `plan`, `wait.resolved`, `run.failed` (a failed launch, a session that stopped unexpectedly, or a PR's red checks: `pr.checks-failed`), `worker.idle`, `worker.exited`, `worker.permission`, `worker.waiting`, `worker.parked` (a park; the session manager also asks it of each parked worker on a sweep, for `compact`), `inbox.raised`, `pr.comment`, `item.unblocked`, `item.closed`, `provider.login-failed` (a project's login lost, once per spell; see Accounts), `queue.pick`, `queue.drained`, `queue.ready-to-release`, `queue.triage`. A rule without one is a state rule, checked on each scheduler tick against each wait, inbox item, worker or project, or once for the machine, by the fields it reads. Fields: `project`, `item.id/area/labels/tier/priority`, `item.phases` (the phases of every note the item has had, the one being posted too), `item.labelled-by` (the ids of the rules whose label add still stands on the item: a label they added, not one it had already, that no rule removed since), `plan.tier/landing`, `note.phase/kind`, `wait.kind/age`, `inbox.kind/age`, `worker.retries/phase`, `worker.context` (the session's context in tokens, see Workers), `spend.worker/item/project/today` (input, output and cache-write tokens, without cache reads: the worker's and the item's in all, the project's and the machine's today), `time`, `day`, `notify.profile`. Values carry units: `15m`, `2h`, `500k`, `2M`, `22:00`, `saturday`.
|
|
411
|
+
- **Sources, in order:** the item's project's `rules`, its machine profile's (`~/.conductor/projects/<project>.json`, named `project.<project>.machine:<id>`) before its repo's (`.claude/conductor.json`, changed by PR, named `project.<project>:<id>`; see Projects), then `~/.conductor/rules.json`, then the built-in defaults: the conductor's own behavior written as rules (`launch`, `retire-closed`, `retire-shelved`, `park-on-wait`, `resume-on-wait`, `compact-on-park`, `runaway`, `daily-cap`, `ready-to-release`, `queue-drained`, `triage`, which raises a new item that waits on the profile's triage label in the inbox, `conductor-handoff`, which escalates a worker's `Handoff · conductor` note to the console, and `hold-pre-start-handoff`, which adds the human label when a worker hands off as `human`, `operator`, `blocked` or `scope` before its `Started` note, so the scheduler never launches work no worker can do again; remove the label if the item should be picked later), and `release-pre-start-hold`, which takes that label off again when the worker clears the hold itself (its `Resumed`, or its `Started` after the hold), and leaves a human label the hold didn't add (ATK-575). A rule with an `id` replaces the rule with the same id further down, so a file holds only the differences, and a machine-profile rule replaces the repo's rule of its id (`"do": "none"` switches it off).
|
|
412
|
+
- **when:** `and`, `or`, `not` and parentheses over comparisons (`==`, `!=`, `<`, `<=`, `>`, `>=`, `in [a, b]`, `<label> in item.labels`, `Started in item.phases`) and events. An event rule fires when one of its events happens: `note`, `plan`, `wait.resolved`, `run.failed` (a failed launch, a session that stopped unexpectedly, or a PR's red checks: `pr.checks-failed`), `worker.idle`, `worker.exited`, `worker.permission`, `worker.waiting`, `worker.parked` (a park; the session manager also asks it of each parked worker on a sweep, for `compact`), `inbox.raised`, `pr.comment`, `item.unblocked`, `item.closed`, `item.shelved` (a worker's item shelved since its launch, see Notes), `provider.login-failed` (a project's login lost, once per spell; see Accounts), `queue.pick`, `queue.drained`, `queue.ready-to-release`, `queue.triage`. A rule without one is a state rule, checked on each scheduler tick against each wait, inbox item, worker or project, or once for the machine, by the fields it reads. Fields: `project`, `item.id/area/labels/tier/priority`, `item.phases` (the phases of every note the item has had, the one being posted too), `item.labelled-by` (the ids of the rules whose label add still stands on the item: a label they added, not one it had already, that no rule removed since), `plan.tier/landing`, `note.phase/kind`, `wait.kind/age`, `inbox.kind/age`, `worker.retries/phase`, `worker.context` (the session's context in tokens, see Workers), `spend.worker/item/project/today` (input, output and cache-write tokens, without cache reads: the worker's and the item's in all, the project's and the machine's today), `time`, `day`, `notify.profile`. Values carry units: `15m`, `2h`, `500k`, `2M`, `22:00`, `saturday`.
|
|
405
413
|
- **do:** `launch`, `retire`, `park`, `resume worker`, `retry`, `pause launches [in <project>] [until <when> | for <duration>]`, `pause all launches …`, `unpause launches`, `focus [<project>] weight|slots <n> until <when>`, `auto-approve now`, `auto-approve after <duration>`, `inbox <kind> ["<text>"]`, `remind operator`, `notify <channel> ["<text>"]`, `notify profile <name> [until <when>]`, `label add|remove human|triage|shipped-open`, `flag shipped-open`, `escalate console "<ask>"`, `none`. One string, or a list.
|
|
406
|
-
- **Guardrails:** rules act inside Area locks, slots, quiet hours and config.json's limits. A rule that would go past one is refused when it loads: `focus … slots` over `scheduler.slots`, an override with no end or one over 14 days, `retire` on anything but `item.closed`, `launch` outside `queue.pick` / `item.unblocked`, `park` outside `worker.waiting`, `resume` outside `wait.resolved` / `pr.comment`, `compact` outside `worker.parked`, `retry` outside `run.failed`. `merge`, `push`, `publish`, `approve`, `delete` and `run` aren't in the vocabulary: rules never merge, push, publish, approve prod, delete or run commands, and the daemon writes to a code host only when the owning worker asks (see Writes).
|
|
414
|
+
- **Guardrails:** rules act inside Area locks, slots, quiet hours and config.json's limits. A rule that would go past one is refused when it loads: `focus … slots` over `scheduler.slots`, an override with no end or one over 14 days, `retire` on anything but `item.closed` / `item.shelved`, `launch` outside `queue.pick` / `item.unblocked`, `park` outside `worker.waiting`, `resume` outside `wait.resolved` / `pr.comment`, `compact` outside `worker.parked`, `retry` outside `run.failed`. `merge`, `push`, `publish`, `approve`, `delete` and `run` aren't in the vocabulary: rules never merge, push, publish, approve prod, delete or run commands, and the daemon writes to a code host only when the owning worker asks (see Writes).
|
|
407
415
|
- **Reload:** saving `rules.json` or a project's machine profile reloads its rules, and so does a fetch of its clone that brings another `.claude/conductor.json` on the base branch. A profile changed either way, or while the daemon was down, is taken whole: the daemon stores it and logs `project.updated` with the fields that `changed`, and the scheduler, watchers and the rest use it from then on. A project keeps the name its folder gives it: the repo's `name` is only what `project add` takes when no `--name` is given, and a machine profile that names another project is refused. To rename one, `conduct project remove <old name>`, then `conduct project add <url> --name <new name>` (in that order: with both registered, both would read the same queue and could launch the same item). The remove drops the old registration and its queue read, resolves its open inbox items (the refusal's among them) and logs `project.removed`, on which the daemon drops its rules and its watch of the file. It is refused while the project has workers in flight, and works without the daemon. A file the conductor refuses leaves its last good rules (for a profile, the whole last good profile) in force, logs `rules.rejected` and raises a `failed` inbox item until it loads again (`rules.loaded`), including after a restart. `conduct project add` refuses a profile whose rules don't load, with or without the daemon.
|
|
408
416
|
- **Checking:** `conduct rules` lists the rules in force (`project.web:#2`, `machine:runaway`, `default:launch`) and what replaces what. `conduct rules test <file>` dry-runs a sample, such as `{ "event": "pr.comment", "project": "web", "fields": { "wait.kind": "merge", "wait.age": "3h" } }` (leave out `event` for a state rule), and shows what fires, each action's guardrail, and why every other rule of the trigger didn't. Both read the files directly when the daemon isn't running.
|
|
409
417
|
|
|
@@ -411,7 +419,7 @@ Rules say what the conductor does when something happens (design note, section 9
|
|
|
411
419
|
|
|
412
420
|
**How actions are carried out.** Every action is a `rule.fired` event that names its rule, then `rule.done` or `rule.failed`.
|
|
413
421
|
|
|
414
|
-
- **The scheduler** does `launch` on `queue.pick` and `retire` on `item.closed` (see Scheduler).
|
|
422
|
+
- **The scheduler** does `launch` on `queue.pick` and `retire` on `item.closed` and `item.shelved` (see Scheduler).
|
|
415
423
|
- **The session manager** asks the rules before each `park` and `resume`. A resume for a review comment is also a `pr.comment`.
|
|
416
424
|
- **Event rules** run on the daemon's events.
|
|
417
425
|
- **State rules** are checked each minute against every wait, inbox item, worker, project and the machine. Each fires once while it holds and again after it stops holding; a restart remembers which hold. A `pause launches` with no end, from a state rule, lifts when the rule stops holding (`rule.released`), and only the pause that rule set.
|
|
@@ -428,7 +436,7 @@ What each action does:
|
|
|
428
436
|
- `auto-approve now` approves the plan as its note arrives: no inbox item, no push. `conduct note` asks the rules before it records the Plan and puts the rule on `note.posted` (`autoApprove`), so the inbox raises nothing. The conductor then posts `approve: auto-approved by the conductor: rule "<id>", at once` as the key's owner and records `plan.auto-approved`, and the worker's approval wait resolves as soon as it is added (or as the comment lands). If the comment can't be posted (`plan.auto-approve-failed`), the plan's inbox item is raised and it waits on you. You can still write `revise: …` on the item: the worker's next `conduct note` reads the item, finds it after the approval, records `plan.revised`, posts nothing and exits 4 with your words, and the worker re-plans (see Notes). A Handoff note and a new Plan still go through, and an `approve` after the revise takes it back. Once you have revised a plan of an item, its later plans wait on you whatever the rules say, `auto-approve after` included. The same holds after a plan you approved yourself. A worker that posts no note meanwhile (parked, or only Handoffs) still has the revise counted: every 5 minutes the daemon reads the items whose newest Plan is approved and records `plan.revised` for one with a `revise:` after its approval. When that pass records one and the item's PR hasn't merged, it also resolves the open waits of the item's worker with `plan <item> revised …: re-plan`. The daemon then resumes a parked worker with it at once, so the worker re-plans instead of sleeping until its PR settles (ATK-462). After the merge it wakes nobody: the revise becomes a follow-up PR, which the worker learns of at its next note. The PR's auto-complete stays armed meanwhile: the brake on the PR itself is a PR comment. If the daemon stopped between recording the Plan and posting the approval, the approval wait raises nothing, and the next rules tick approves it once the note is 2 minutes old.
|
|
429
437
|
- No default rule auto-approves. A Plan note's `**Size tier: S**` (or the older `**Size: S**`) gives `plan.tier` (and `item.tier` later), and its `**Landing:** auto|review` gives `plan.landing`: work-item lands its review paths (infra, pipelines, auth) and review tiers in `review`, so `plan.landing == auto` keeps them out of an auto-approve rule. A Plan that names neither fails the comparison and waits for you.
|
|
430
438
|
- `launch` on `item.unblocked` brings the scheduler's next tick forward.
|
|
431
|
-
- `launch` and `retry` start sessions, so they wait for `scheduler.mode` `on`, as the scheduler's own launches do. In `off` they are logged, not done. Every other action acts in any mode, except those the scheduler's own tick fires (`item.closed`, `queue.*`), which `off` only logs on a queue read on demand.
|
|
439
|
+
- `launch` and `retry` start sessions, so they wait for `scheduler.mode` `on`, as the scheduler's own launches do. In `off` they are logged, not done. Every other action acts in any mode, except those the scheduler's own tick fires (`item.closed`, `item.shelved`, `queue.*`), which `off` only logs on a queue read on demand.
|
|
432
440
|
|
|
433
441
|
The defaults `runaway` and `daily-cap` are the budget: a runaway inbox item past `inbox.runawayTokens` for one worker, and no new launches past `scheduler.dailyTokens` today until midnight. Both count tokens without cache reads, as every `spend.*` field does and as `conduct status` shows them. On that measure a worker's median to 2026-10-14 was 442k and its most 1.68M, and a busy day ran 16M to 26M (ATK-464).
|
|
434
442
|
|
|
@@ -449,7 +457,7 @@ The scheduler is the work loop's tick, in the daemon (design note, section 8). E
|
|
|
449
457
|
- **Release waits:** a profile's `tracker.releaseWait: { "label": "waits-release", "shipped": "release · Shipped" }` marks work that needs a dependency released, not only merged (a CLI change on npm `latest`, a prod deploy). It works on every tracker: the label is a Linear label, a Boards tag or a GitHub Issues label (matched without regard to case on the last two), and the blockers are Linear's blocking relations, Boards Predecessors or GitHub's issue dependencies. An item with that label waits, once its open blockers have closed, until every Done blocker has a comment whose first line starts with the `shipped` text, under any heading or bold (`waits for ENG-311 to ship`), and starts on the first tick after. On Boards that is a discussion comment, markdown or the web UI's HTML. A comment that only quotes the text doesn't count. A blocker still open in another team, or in a Boards state the profile doesn't map, waits the same way; a canceled one (Removed on Boards, closed as not planned or a duplicate on GitHub) holds nothing. A Boards Predecessor in another ADO project, or a GitHub blocker in another repo, has its comments read there. A blocker whose comments can't be read (a 403, a 404, a provider error) holds and is asked again next read, while the rest of the read goes on; so does a Boards Predecessor ADO doesn't return at all (deleted, or in a project the account can't read). A blocker that shipped with no such note holds until you add the note or remove the label. With the label and no blocker at all it waits until you act (`labelled waits-release with no blocker to wait on`), for something outside the tracker such as a Claude Code release. Such an item doesn't keep its tracker project from `queue.ready-to-release`, since the release is what it waits for. On Linear the read asks about the Done blockers in one more request, only when a labelled item has one. On Boards and GitHub Issues it reads the comments of a Done blocker that has any, and again only once its comment count or revision moves (its comment count or update time on GitHub), as a new comment does; on GitHub a labelled issue also reads its blocker list every read, since GitHub's summary counts only open blockers. Without the setting, a Done blocker never holds anything.
|
|
450
458
|
- **Slots:** `scheduler.slots` (4) across projects and the profile's `slots` per project, or `conduct focus --slots`, never more than the global ones. Slots count running workers only: a parked worker keeps its Area and frees its slot.
|
|
451
459
|
- **Holds:** quiet hours and `conduct pause` turn picks into waits that say why.
|
|
452
|
-
3. **Act.** It runs the rules on what it found: `queue.pick` → `launch` (default `launch`), `item.closed` → `retire` (default `retire-closed`; a refused retire raises an inbox item once, except one refused while the worker's turn runs or its session starts, which is tried again each tick and raised only after 15 minutes; a partial retire is tried again after 15 minutes, and after 3 in a row it raises one inbox item that names the failed steps and any worktree left on disk, which the conductor never deletes, and is tried once a day), `queue.drained` and `queue.ready-to-release` → an inbox item once a day, `queue.triage` → a `triage` inbox item per item (default `triage`), resolved once the label goes. Each action is a `rule.fired` event, then `rule.done` or `rule.failed`. A launch that failed isn't tried again while its inbox item is open.
|
|
460
|
+
3. **Act.** It runs the rules on what it found: `queue.pick` → `launch` (default `launch`), `item.closed` → `retire` (default `retire-closed`; a refused retire raises an inbox item once, except one refused while the worker's turn runs or its session starts, which is tried again each tick and raised only after 15 minutes; a partial retire is tried again after 15 minutes, and after 3 in a row it raises one inbox item that names the failed steps and any worktree left on disk, which the conductor never deletes, and is tried once a day), `item.shelved` → `retire` with the worktree and branch kept (default `retire-shelved`, retried and raised the same way), `queue.drained` and `queue.ready-to-release` → an inbox item once a day, `queue.triage` → a `triage` inbox item per item (default `triage`), resolved once the label goes. Each action is a `rule.fired` event, then `rule.done` or `rule.failed`. A launch that failed isn't tried again while its inbox item is open.
|
|
453
461
|
|
|
454
462
|
`scheduler.mode` decides how far it goes:
|
|
455
463
|
- **`on`** (the default): it acts.
|
|
@@ -667,7 +675,7 @@ A project whose items are a GitHub repo's issues sets `tracker.kind` to `github-
|
|
|
667
675
|
"queueLabel": "conduct", // the default: the open issues carrying it are the queue
|
|
668
676
|
"areaPrefix": "area:", // the default: area:docs is the Area docs
|
|
669
677
|
"priority": 3, // the queue's priority against other projects' (1 urgent … 4 low)
|
|
670
|
-
"transitions": { "started": "in-progress", "pr-opened": "in-review" } // the defaults
|
|
678
|
+
"transitions": { "started": "in-progress", "pr-opened": "in-review", "shelved": null } // the defaults
|
|
671
679
|
// "owner", "repo": the GitHub code host's by default; required beside an Azure DevOps one
|
|
672
680
|
}
|
|
673
681
|
```
|
|
@@ -767,9 +775,10 @@ Everything lives in `~/.conductor` (`CONDUCTOR_HOME` overrides it):
|
|
|
767
775
|
- `POST /items/:id/notes` with `{ "body": "## work-item · …", "worker"?: 1 }`: post a phase note (see Notes); 201 with the note and the worker. 409 when it won't post it; 502 when the tracker didn't take it, with `posted: "no"` or `"unknown"`.
|
|
768
776
|
- `GET /items/:id/brief` (`?fresh=true`): the item's brief (see Briefs), as `{ "brief": … }`. 404 when the tracker has no such item, 409 when no project tracks it, 502 when the tracker couldn't be read.
|
|
769
777
|
- `POST /items/:id/revise` with `{ "text" }`: `conduct revise` on an approved plan (see Inbox); 200 with `{ "revise": { comment, item, project, revised, woken, landed, worker, pending } }`. 409 when the item has no approved Plan (nothing posted); 502 when the tracker didn't take the comment, with `posted`.
|
|
778
|
+
- `POST /items/:id/shelve` with `{ "reason": "<why>" }`: `conduct shelve` (see Notes); 200 with `{ "shelved": { item, project, state, url, worker } }`, `state` as a note's. 409 when it refuses the item (no project tracks it, Done or Canceled, a PR open, merged or unread: nothing posted); 502 with `posted` when the tracker didn't take the note.
|
|
770
779
|
- `POST /items/:id/triage` with `{ "action": "queue" | "hold" }`: `conduct triage` (see Scheduler); 200 with `{ "triaged": { action, edits, item, project } }`, each edit's `result` `added`, `removed` or `already`. 409 when no project tracks the item or its profile has no `triageLabel` (nothing written), or when the tracker refused an edit (such as a label it doesn't have); 503 for a lost login; 502 when the tracker failed. A refused or failed edit leaves any edit before it in place: a `--hold` stopped at its second edit leaves the item labelled human, so still never launched, and its error says so; running it again finishes it.
|
|
771
780
|
- `GET /inbox`: the open inbox items, oldest first.
|
|
772
|
-
- `POST /inbox/:id/resolve`: the operator's answer (see Inbox). The body is `{ "action": "approve", "text"? }`, `{ "action": "revise", "text" }
|
|
781
|
+
- `POST /inbox/:id/resolve`: the operator's answer (see Inbox). The body is `{ "action": "approve", "text"? }`, `{ "action": "revise", "text" }`, or `{ "action": "done", "answer"? }` (with `answer`, only on a `scope`, `blocked` or `human` item: 409 otherwise, with nothing posted).
|
|
773
782
|
- 200 with the item, the comment and the waits it resolved.
|
|
774
783
|
- 404 when there is no such item.
|
|
775
784
|
- 409 when the item is resolved already or isn't a plan.
|
|
@@ -931,8 +940,8 @@ The mod is the plugin's hooks module, code that costs no tokens, which does the
|
|
|
931
940
|
- **Every session** sends its plugin report on start, and nothing else: no status line, and no other calls to the daemon.
|
|
932
941
|
- **The console**, the session started with `CONDUCTOR_CONSOLE=1` (`conduct console` starts it; see Console), reads `GET /fleet`, `GET /inbox` and `GET /notify` every 30 s and gets:
|
|
933
942
|
- **the band** above the prompt while the inbox has items: one hotkey per item (a plan approves after a second press, `y`, since a digit typed into an empty prompt presses a band button; an npm OTP copies its `npm stage approve` line; the rest open the pane), and `o` for the pane;
|
|
934
|
-
- **the pane** (`/conductor`, `o`, or opened at the start, docked as a sidebar on a fullscreen terminal of 144 columns or more): the notification profile (a picker; buttons on mobile) and Remote Control's state, the inbox with each item's actions (approve, revise, copy a command, open a link, done; on a Windows terminal, open is a button that opens a web link in the default browser once, since a ctrl+click on a link in a pane opened it twice, ATK-494), the workers by project (each project's rule has [pause] and [focus]), and today's spend. The header counts the workers running and parked and the inbox in words. Each worker is one line in columns that line up across projects, cut to the pane's width so it never wraps: a glyph, the item, its phase, its PR, what it waits on in words (`PR #557 to merge (skills-registry)`, `npm 8.9.0-dev.1 on dev (cli)`, `login (ado)`) or else its activity, and the age. As the pane narrows, the age goes first, then the wait, then the PR and the phase (ATK-521). The glyphs are one cell wide: `●` in a turn, `◌` up between turns, `!` stuck on a prompt, `○` parked, `×` failed or gone, `·` starting. A row expands to attach and why, its tokens today, its whole PR ref and its raw wait keys;
|
|
935
|
-
- **commands answered in code**, never by the model: `/conductor`, `/inbox`, `/approve <item | #id>`, `/revise <item | #id> <text>`, `/attach <item | worker>`, `/notify [<profile> [--until <when>]]`, `/pause [<project>] [--until <when>]`, `/unpause [<project>]`, `/focus-project <project> [--until <when>]` (puts its items first, until midnight without `--until`; not `/focus`, which is Claude Code's own);
|
|
943
|
+
- **the pane** (`/conductor`, `o`, or opened at the start, docked as a sidebar on a fullscreen terminal of 144 columns or more): the notification profile (a picker; buttons on mobile) and Remote Control's state, the inbox with each item's actions (approve, revise, answer on a `scope`, `blocked` or `human` Handoff, which fills `/answer #<id> ` in the prompt, copy a command, open a link, done; on a Windows terminal, open is a button that opens a web link in the default browser once, since a ctrl+click on a link in a pane opened it twice, ATK-494), the workers by project (each project's rule has [pause] and [focus]), and today's spend. The header counts the workers running and parked and the inbox in words. Each worker is one line in columns that line up across projects, cut to the pane's width so it never wraps: a glyph, the item, its phase, its PR, what it waits on in words (`PR #557 to merge (skills-registry)`, `npm 8.9.0-dev.1 on dev (cli)`, `login (ado)`) or else its activity, and the age. As the pane narrows, the age goes first, then the wait, then the PR and the phase (ATK-521). The glyphs are one cell wide: `●` in a turn, `◌` up between turns, `!` stuck on a prompt, `○` parked, `×` failed or gone, `·` starting. A row expands to attach and why, its tokens today, its whole PR ref and its raw wait keys;
|
|
944
|
+
- **commands answered in code**, never by the model: `/conductor`, `/inbox`, `/approve <item | #id>`, `/revise <item | #id> <text>`, `/answer <item | #id> <text>` (`conduct done #<id> --answer <text>`, the text as typed), `/attach <item | worker>`, `/notify [<profile> [--until <when>]]`, `/pause [<project>] [--until <when>]`, `/unpause [<project>]`, `/focus-project <project> [--until <when>]` (puts its items first, until midnight without `--until`; not `/focus`, which is Claude Code's own);
|
|
936
945
|
- **a check that `/conductor:conductor-console` ran**: a console started without it (by hand, as `claude --plugin-dir … -n conductor`) shows `console without its skill: run /conductor:conductor-console` in the band, and each prompt, the operator's or an escalation's, carries a line telling the model to load the skill before it answers. Running the skill (`/conductor:conductor-console`, or the model's Skill tool) clears both, until a `/clear` or a resume starts a conversation without it;
|
|
937
946
|
- **a warm prompt cache while it idles** (ATK-386). The console's cache lasts an hour after its last use, and a wake after that writes the whole context again. So 55 minutes after the console's last turn, the mod sends one ping (`$.model.fork`, the console's own last request plus a one-word ask, no tools, no turn in the transcript). The API serves the ping from the cache for a tenth of a write's price, and the hour starts over. It pings again every 55 minutes until a turn comes, and each turn starts the timer over. At an idle point it runs `/clear` instead when the context is 150k or more, or after 12 pings in a row (the 13th idle point, about 12 hours after the last turn), and the band says `fresh console (cleared while idle: …)` until the next prompt loads the skill. A ping that read less than half the context from the cache (the cache was gone anyway, as under a 5-minute TTL) stops the pings until the next turn. Each ping and clear goes to `POST /console/cache`, which logs a `console.cache` event with the context size and what the ping cost. A fork isn't in the transcript, so that event is the only place its cost shows;
|
|
938
947
|
- **the stream**: it runs `node <the cli.js that conductor.json names> events --follow --console` (`--console` tells the daemon a console is open), redraws on each event, toasts each new inbox item, and acts on three events:
|
package/build/brief.js
CHANGED
|
@@ -88,14 +88,17 @@ export function briefOf(item, project, read, prefixes, at, pr = null, approvers
|
|
|
88
88
|
const heading = noteHeading(c.body, prefixes);
|
|
89
89
|
return heading ? [{ at: c.createdAt, ...heading }] : [];
|
|
90
90
|
});
|
|
91
|
-
|
|
91
|
+
// A Shelved note ends a run of the work (ATK-669): its Plans and answers stay behind it.
|
|
92
|
+
const shelvedAt = shelvedSince(notes);
|
|
93
|
+
const current = shelvedAt === null ? sorted : sorted.filter((c) => Date.parse(c.createdAt) > shelvedAt);
|
|
94
|
+
const found = approvalAfterPlan(current, who, prefixes);
|
|
92
95
|
// Notes carry the same author as the answer, so only a comment that isn't a note can be it.
|
|
93
96
|
const said = found &&
|
|
94
|
-
|
|
97
|
+
current.find((c) => c.createdAt === found.at && isApprover(c, who) && noteHeading(c.body, prefixes) === null);
|
|
95
98
|
// The approvers' answers after an approve: the first `revise:` since the newest `approve`,
|
|
96
99
|
// which takes a revise back.
|
|
97
100
|
const answers = found?.kind === 'approve'
|
|
98
|
-
?
|
|
101
|
+
? current.filter((c) => Date.parse(c.createdAt) > Date.parse(found.at) &&
|
|
99
102
|
isApprover(c, who) &&
|
|
100
103
|
noteHeading(c.body, prefixes) === null &&
|
|
101
104
|
/^(approved?\b|revise\s*:)/i.test(c.body.trim()))
|
|
@@ -118,7 +121,7 @@ export function briefOf(item, project, read, prefixes, at, pr = null, approvers
|
|
|
118
121
|
item,
|
|
119
122
|
notes,
|
|
120
123
|
phase: briefPhase(fields.status, notes, { approval, revise }, pr),
|
|
121
|
-
plan: notes.findLast((n) => n.phase === 'Plan')?.at ?? null,
|
|
124
|
+
plan: notes.findLast((n) => n.phase === 'Plan' && (shelvedAt === null || Date.parse(n.at) > shelvedAt))?.at ?? null,
|
|
122
125
|
pr,
|
|
123
126
|
project,
|
|
124
127
|
readAt: at.toISOString(),
|
|
@@ -128,25 +131,35 @@ export function briefOf(item, project, read, prefixes, at, pr = null, approvers
|
|
|
128
131
|
// The work skill's phase for an item: done or canceled by its status; then by its PR (open, merged,
|
|
129
132
|
// abandoned, or one that couldn't be read, which still waits); not started; then by its newest
|
|
130
133
|
// Plan: a `revise:` newer than its approval sends it back to plan, an approval (a `Plan approved`
|
|
131
|
-
// note or the operator's `approve`) to implement, and no answer yet waits.
|
|
134
|
+
// note or the operator's `approve`) to implement, and no answer yet waits. The newest Shelved note
|
|
135
|
+
// is a cut-off (ATK-669): a closed PR with no PR opened note after it, and every Plan and answer
|
|
136
|
+
// before it, belong to the run it ended, so a pick-up starts at orient and plans afresh.
|
|
132
137
|
export function briefPhase(status, notes, answers, pr) {
|
|
133
138
|
if (status.type === 'completed')
|
|
134
139
|
return 'done';
|
|
135
140
|
if (status.type === 'canceled')
|
|
136
141
|
return 'canceled';
|
|
142
|
+
const shelvedAt = shelvedSince(notes);
|
|
143
|
+
const since = (at) => shelvedAt === null || Date.parse(at) > shelvedAt;
|
|
144
|
+
const run = notes.filter((n) => since(n.at));
|
|
145
|
+
// A shelve leaves no PR open (notes.ts), so one of its run that reads closed, or doesn't read, is left behind.
|
|
146
|
+
const left = (pr?.state === 'closed' || pr?.error !== undefined) &&
|
|
147
|
+
shelvedAt !== null &&
|
|
148
|
+
!run.some((n) => n.phase === 'PR opened');
|
|
137
149
|
if (pr?.state === 'merged')
|
|
138
150
|
return 'land';
|
|
139
|
-
if (pr?.state === 'closed')
|
|
151
|
+
if (pr?.state === 'closed' && !left)
|
|
140
152
|
return 'abandoned';
|
|
141
|
-
if (pr !== null)
|
|
153
|
+
if (pr !== null && !left)
|
|
142
154
|
return 'wait';
|
|
143
155
|
if (status.type === 'backlog' || status.type === 'unstarted' || status.type === 'triage')
|
|
144
156
|
return 'orient';
|
|
145
|
-
const plan =
|
|
157
|
+
const plan = run.findLast((n) => n.phase === 'Plan');
|
|
146
158
|
if (!plan)
|
|
147
159
|
return 'plan';
|
|
148
|
-
const
|
|
149
|
-
const
|
|
160
|
+
const approval = answers.approval && since(answers.approval.at) ? answers.approval : null;
|
|
161
|
+
const revise = answers.revise && since(answers.revise.at) ? answers.revise : null;
|
|
162
|
+
const noted = run.findLast((n) => n.phase === 'Plan approved' && Date.parse(n.at) > Date.parse(plan.at));
|
|
150
163
|
const approvedAt = Math.max(noted ? Date.parse(noted.at) : -Infinity, approval?.kind === 'approve' ? Date.parse(approval.at) : -Infinity);
|
|
151
164
|
const revisedAt = Math.max(revise ? Date.parse(revise.at) : -Infinity, approval?.kind === 'revise' ? Date.parse(approval.at) : -Infinity);
|
|
152
165
|
if (revisedAt > approvedAt)
|
|
@@ -242,6 +255,11 @@ export function notedPr(comments, prefixes) {
|
|
|
242
255
|
.at(-1);
|
|
243
256
|
return firstPr(opened?.body ?? '');
|
|
244
257
|
}
|
|
258
|
+
// When the newest Shelved note was written (ms), or null without one.
|
|
259
|
+
export function shelvedSince(notes) {
|
|
260
|
+
const shelved = notes.findLast((n) => n.phase === 'Shelved');
|
|
261
|
+
return shelved ? Date.parse(shelved.at) : null;
|
|
262
|
+
}
|
|
245
263
|
const STATE = 'state { name type }';
|
|
246
264
|
const LINKED = `identifier title ${STATE}`;
|
|
247
265
|
const COMMENTS = 'comments(first: 100, after: $after) { pageInfo { hasNextPage endCursor } nodes { body createdAt user { id email name } } }';
|
package/build/brief.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brief.js","sourceRoot":"","sources":["../src/brief.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAiB,SAAS,EAAkB,MAAM,0BAA0B,CAAC;AACjG,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,YAAY,EAAgB,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAc,MAAM,YAAY,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAA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GAAG,EAAE,KAAK,CAAC,GAAG;gBACd,MAAM,EAAE,MAAM,CAAC,EAAE;aAClB,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/build/cli.js
CHANGED
|
@@ -43,6 +43,7 @@ import { resolveUntil } from "./rules.js";
|
|
|
43
43
|
import { outputOf, run } from "./run.js";
|
|
44
44
|
import { queueLines, queueViewSchema } from "./scheduler.js";
|
|
45
45
|
import { awaitStart, serveDetached, ServeStartError } from "./serve.js";
|
|
46
|
+
import { shelvedLines, shelvedSchema } from "./shelve.js";
|
|
46
47
|
import { localDay } from "./spend.js";
|
|
47
48
|
import { answerStopRequest, dropStaleStopRequest, pendingStopRequest, STOP_POLL_MS, stopSupervisor, } from "./stop-request.js";
|
|
48
49
|
import { inboxItemSchema, openStore, projectSchema, waitSchema, workerSchema, } from "./store.js";
|
|
@@ -64,11 +65,14 @@ const LAUNCH_WAIT_MS = 15 * 60_000;
|
|
|
64
65
|
// attach waits out the settle time (up to 5 min), resumes (120 s) and opens the tab (60 s).
|
|
65
66
|
const RETIRE_TIMEOUT_MS = 12 * 60_000;
|
|
66
67
|
const ATTACH_TIMEOUT_MS = 9 * 60_000;
|
|
67
|
-
// Approve and
|
|
68
|
+
// Approve, revise and an answer ask Linear twice (the issue, then the comment), each within 20 s.
|
|
68
69
|
const ANSWER_TIMEOUT_MS = 60_000;
|
|
69
70
|
// A revise of an approved plan adds up to three brief reads (the tracker and the PR, each within
|
|
70
71
|
// 20 s) 2 s apart after the comment, so a slow tracker doesn't cut off an answer whose comment landed.
|
|
71
72
|
const REVISE_TIMEOUT_MS = 3 * 60_000;
|
|
73
|
+
// A shelve reads the brief fresh (the tracker and the PR), then posts the note and its state move,
|
|
74
|
+
// human label and PR checks, each within 20 s.
|
|
75
|
+
const SHELVE_TIMEOUT_MS = 3 * 60_000;
|
|
72
76
|
const projectsBody = z.object({ projects: z.array(projectSchema) });
|
|
73
77
|
const addBody = z.object({ created: z.boolean(), project: projectSchema });
|
|
74
78
|
const removeBody = z.object({ project: projectSchema, resolved: z.array(inboxItemSchema) });
|
|
@@ -150,6 +154,7 @@ async function addProject(paths, source, name, next = true) {
|
|
|
150
154
|
}
|
|
151
155
|
// `conduct approve|revise|done`: the operator's answer to an inbox item, by id, or for approve and revise
|
|
152
156
|
// by the item whose plan waits. A revise of an item with no plan waiting revises its approved plan.
|
|
157
|
+
// Done with an answer posts it on a Handoff's item first (ATK-682).
|
|
153
158
|
async function answer(paths, ref, request) {
|
|
154
159
|
const target = request.action === 'done' ? inboxId(ref) : await planItem(paths, ref);
|
|
155
160
|
if (target === null) {
|
|
@@ -177,8 +182,18 @@ async function answer(paths, ref, request) {
|
|
|
177
182
|
}
|
|
178
183
|
const result = answerBody.parse(body);
|
|
179
184
|
const { item } = result;
|
|
180
|
-
|
|
181
|
-
|
|
185
|
+
const what = `#${item.id} (${item.kind}${item.item ? ` ${item.item}` : ''})`;
|
|
186
|
+
if (request.action === 'done' && request.answer === undefined)
|
|
187
|
+
return out(`done: ${what}`);
|
|
188
|
+
if (request.action === 'done') {
|
|
189
|
+
out(`answered ${what}: ${result.comment?.url ?? result.comment?.id ?? 'comment posted'}`);
|
|
190
|
+
// Only a comment wait resumes on it; a human Handoff's label wait holds once the label is off.
|
|
191
|
+
return out(item.condition?.endsWith(':comment')
|
|
192
|
+
? `its worker waits on ${item.condition}: the conductor resumes it once it reads the comment`
|
|
193
|
+
: item.condition === null
|
|
194
|
+
? 'no worker waits on an answer here: the worker reads the comment when it next looks'
|
|
195
|
+
: `its worker waits on ${item.condition}, not on a comment: it reads yours when that holds`);
|
|
196
|
+
}
|
|
182
197
|
out(`${request.action === 'approve' ? 'approved' : 'asked for a revision of'} ${item.item ?? `#${item.id}`}: ${result.comment?.url ?? result.comment?.id ?? 'comment posted'}`);
|
|
183
198
|
out(result.waits.length > 0
|
|
184
199
|
? `its worker's approval wait resolved; the conductor resumes it`
|
|
@@ -470,6 +485,17 @@ async function main(argv) {
|
|
|
470
485
|
throw usageError('revise');
|
|
471
486
|
return answer(conductorPaths(), ref, { action: 'revise', text });
|
|
472
487
|
}
|
|
488
|
+
// The same for an answer to a Handoff (ATK-682): every word after `done <id> --answer` is the text.
|
|
489
|
+
if (argv[0] === 'done' && argv.includes('--answer')) {
|
|
490
|
+
const at = argv.indexOf('--answer');
|
|
491
|
+
const [ref, , ...words] = argv.slice(1);
|
|
492
|
+
if (at === 2 && words.length === 1 && isHelpFlag(words[0]))
|
|
493
|
+
return help('done');
|
|
494
|
+
const text = words.join(' ').trim();
|
|
495
|
+
if (at !== 2 || ref === undefined || ref.startsWith('-') || !text)
|
|
496
|
+
throw usageError('done');
|
|
497
|
+
return answer(conductorPaths(), ref, { action: 'done', answer: text });
|
|
498
|
+
}
|
|
473
499
|
// The same for a finding: free text after the id, with --ask as a word of its own anywhere.
|
|
474
500
|
if (argv[0] === 'escalations' && argv[1] === 'done') {
|
|
475
501
|
if (isHelpFlag(argv[2]) || (argv.length === 4 && isHelpFlag(argv[3])))
|
|
@@ -845,6 +871,12 @@ async function main(argv) {
|
|
|
845
871
|
return;
|
|
846
872
|
case 'serve':
|
|
847
873
|
return serve(paths);
|
|
874
|
+
case 'shelve':
|
|
875
|
+
if (sub === undefined || arg !== undefined)
|
|
876
|
+
throw usageError('shelve');
|
|
877
|
+
if (values.reason === undefined || values.reason.trim() === '')
|
|
878
|
+
throw usageError('shelve', 'conduct shelve says why: --reason "<why>"');
|
|
879
|
+
return shelve(paths, sub, values.reason);
|
|
848
880
|
case 'start':
|
|
849
881
|
return start(paths);
|
|
850
882
|
case 'state':
|
|
@@ -1238,6 +1270,33 @@ async function serve(paths) {
|
|
|
1238
1270
|
logCrashes(daemon.log);
|
|
1239
1271
|
await daemon.closed;
|
|
1240
1272
|
}
|
|
1273
|
+
// `conduct shelve <item> --reason "…"`: the daemon posts a Shelved note on the item, which moves it
|
|
1274
|
+
// back to not-started, unassigned and labelled human, and the next tick retires its worker with its
|
|
1275
|
+
// worktree kept (ATK-669). It refuses a closed item and an open or merged PR, posting nothing.
|
|
1276
|
+
async function shelve(paths, item, reason) {
|
|
1277
|
+
let answer;
|
|
1278
|
+
try {
|
|
1279
|
+
answer = await callApi(paths, {
|
|
1280
|
+
body: { reason },
|
|
1281
|
+
method: 'POST',
|
|
1282
|
+
path: `/items/${encodeURIComponent(item)}/shelve`,
|
|
1283
|
+
timeoutMs: SHELVE_TIMEOUT_MS,
|
|
1284
|
+
});
|
|
1285
|
+
}
|
|
1286
|
+
catch (error) {
|
|
1287
|
+
if (!(error instanceof NotRunningError))
|
|
1288
|
+
throw error;
|
|
1289
|
+
throw new ConductorError('the conductor is not running: conduct shelve needs it', [
|
|
1290
|
+
`without it, post the Shelved note from ${item}'s checkout: conduct note ${item} <file>, headed "## <skill> · Shelved"`,
|
|
1291
|
+
]);
|
|
1292
|
+
}
|
|
1293
|
+
if (answer.status === 404)
|
|
1294
|
+
throw olderDaemon('no conduct shelve');
|
|
1295
|
+
const body = z.object({ shelved: shelvedSchema }).parse(await expectOk(Promise.resolve(answer)));
|
|
1296
|
+
const { errors, lines } = shelvedLines(body.shelved);
|
|
1297
|
+
lines.forEach(out);
|
|
1298
|
+
errors.forEach((e) => process.stderr.write(`${e}\n`));
|
|
1299
|
+
}
|
|
1241
1300
|
// POST /shutdown, then wait for the daemon to go. True when one stopped, false when none answered.
|
|
1242
1301
|
async function shutdownDaemon(paths) {
|
|
1243
1302
|
const pid = readPid(paths.pid);
|