@detergent-software/conductor 3.1.0-dev.3 → 3.1.0-dev.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +15 -9
  3. package/build/brief.js +28 -10
  4. package/build/brief.js.map +1 -1
  5. package/build/cli.js +37 -0
  6. package/build/cli.js.map +1 -1
  7. package/build/daemon.js +4 -0
  8. package/build/daemon.js.map +1 -1
  9. package/build/help.js +16 -0
  10. package/build/help.js.map +1 -1
  11. package/build/inbox.js +4 -2
  12. package/build/inbox.js.map +1 -1
  13. package/build/manager.js +5 -2
  14. package/build/manager.js.map +1 -1
  15. package/build/note.js +3 -11
  16. package/build/note.js.map +1 -1
  17. package/build/notes.js +83 -9
  18. package/build/notes.js.map +1 -1
  19. package/build/profile-fields.js +1 -0
  20. package/build/profile-fields.js.map +1 -1
  21. package/build/profile.js +6 -1
  22. package/build/profile.js.map +1 -1
  23. package/build/protocol.js +2 -0
  24. package/build/protocol.js.map +1 -1
  25. package/build/rules.js +11 -1
  26. package/build/rules.js.map +1 -1
  27. package/build/scheduler.js +30 -16
  28. package/build/scheduler.js.map +1 -1
  29. package/build/server.js +25 -1
  30. package/build/server.js.map +1 -1
  31. package/build/shelve.js +76 -0
  32. package/build/shelve.js.map +1 -0
  33. package/build/store.js +4 -2
  34. package/build/store.js.map +1 -1
  35. package/build/tracker-writes.js +13 -11
  36. package/build/tracker-writes.js.map +1 -1
  37. package/build/watchers/boards-writes.js +8 -3
  38. package/build/watchers/boards-writes.js.map +1 -1
  39. package/build/watchers/issues-writes.js +25 -4
  40. package/build/watchers/issues-writes.js.map +1 -1
  41. package/build/watchers/linear-writes.js +18 -5
  42. package/build/watchers/linear-writes.js.map +1 -1
  43. package/package.json +1 -1
  44. package/plugin/skills/conductor-console/SKILL.md +2 -1
  45. package/plugin/skills/work-item/SKILL.md +4 -1
  46. package/plugin/skills/work-item/trackers/ado-boards.md +1 -1
  47. package/plugin/skills/work-item/trackers/github-issues.md +1 -1
  48. package/plugin/skills/work-item/trackers/linear.md +1 -1
  49. package/protocol/PROTOCOL.md +2 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
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.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)
6
+
7
+ ### Features
8
+
9
+ * **conductor:** shelve an item whose work stops for good (ATK-669) ([16173a3](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/16173a399a45ba901b7b1f5e831fc91413c9696e))
10
+
11
+ ### Bug Fixes
12
+
13
+ * **conductor:** keep a shelve in force and leave nothing open (ATK-669) ([f8ee754](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/f8ee7545a3472f4267e8de5cd2388a4871bf9513))
14
+
15
+ ### Documentation
16
+
17
+ * **conductor:** describe shelving in the skill, README and tests (ATK-669) ([3a9c446](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/3a9c4462bfb8a9ab6e04cd678ac8299d1d8ea6b4))
18
+
5
19
  ## [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
20
 
7
21
  ### Features
package/README.md CHANGED
@@ -31,6 +31,8 @@ conduct approve <item> [--text <text>]
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
33
  conduct triage <item> --queue answer a triage item: take its triage label off (--hold: label it human too)
34
+ conduct shelve <item> --reason <why>
35
+ stop an item's work for good: back to not-started, labelled human, its worker retired
34
36
  conduct notify [--json] the notification profile, quiet hours, each channel's state
35
37
  conduct notify profile [<name>] [--until <when>]
36
38
  switch where pushes go (see Notifications)
@@ -164,15 +166,18 @@ A tmux tab runs where no desktop is, so `conduct attach` and `conduct console` p
164
166
 
165
167
  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
168
 
167
- **State follows the notes** (providers design note, section 5). A `Started`, `PR opened` or `Landed` note (not a Handoff) also moves the item, to the state its phase maps to in the profile's `tracker.transitions`:
169
+ **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
170
 
169
171
  | Phase | Linear default | ADO Boards default (Scrum) | GitHub Issues default |
170
172
  |---|---|---|---|
171
173
  | `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
174
  | `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
175
  | `landed` | Done | Done | closed as completed, the phase label taken off |
176
+ | `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
177
 
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.
178
+ 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.
179
+
180
+ **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
181
 
177
182
  **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
183
 
@@ -400,10 +405,10 @@ Rules say what the conductor does when something happens (design note, section 9
400
405
  ]
401
406
  ```
402
407
 
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`.
408
+ - **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).
409
+ - **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
410
  - **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).
411
+ - **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
412
  - **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
413
  - **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
414
 
@@ -411,7 +416,7 @@ Rules say what the conductor does when something happens (design note, section 9
411
416
 
412
417
  **How actions are carried out.** Every action is a `rule.fired` event that names its rule, then `rule.done` or `rule.failed`.
413
418
 
414
- - **The scheduler** does `launch` on `queue.pick` and `retire` on `item.closed` (see Scheduler).
419
+ - **The scheduler** does `launch` on `queue.pick` and `retire` on `item.closed` and `item.shelved` (see Scheduler).
415
420
  - **The session manager** asks the rules before each `park` and `resume`. A resume for a review comment is also a `pr.comment`.
416
421
  - **Event rules** run on the daemon's events.
417
422
  - **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 +433,7 @@ What each action does:
428
433
  - `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
434
  - 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
435
  - `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.
436
+ - `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
437
 
433
438
  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
439
 
@@ -449,7 +454,7 @@ The scheduler is the work loop's tick, in the daemon (design note, section 8). E
449
454
  - **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
455
  - **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
456
  - **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.
457
+ 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
458
 
454
459
  `scheduler.mode` decides how far it goes:
455
460
  - **`on`** (the default): it acts.
@@ -667,7 +672,7 @@ A project whose items are a GitHub repo's issues sets `tracker.kind` to `github-
667
672
  "queueLabel": "conduct", // the default: the open issues carrying it are the queue
668
673
  "areaPrefix": "area:", // the default: area:docs is the Area docs
669
674
  "priority": 3, // the queue's priority against other projects' (1 urgent … 4 low)
670
- "transitions": { "started": "in-progress", "pr-opened": "in-review" } // the defaults
675
+ "transitions": { "started": "in-progress", "pr-opened": "in-review", "shelved": null } // the defaults
671
676
  // "owner", "repo": the GitHub code host's by default; required beside an Azure DevOps one
672
677
  }
673
678
  ```
@@ -767,6 +772,7 @@ Everything lives in `~/.conductor` (`CONDUCTOR_HOME` overrides it):
767
772
  - `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
773
  - `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
774
  - `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`.
775
+ - `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
776
  - `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
777
  - `GET /inbox`: the open inbox items, oldest first.
772
778
  - `POST /inbox/:id/resolve`: the operator's answer (see Inbox). The body is `{ "action": "approve", "text"? }`, `{ "action": "revise", "text" }` or `{ "action": "done" }`.
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
- const found = approvalAfterPlan(sorted, who, prefixes);
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
- sorted.find((c) => c.createdAt === found.at && isApprover(c, who) && noteHeading(c.body, prefixes) === null);
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
- ? sorted.filter((c) => Date.parse(c.createdAt) > Date.parse(found.at) &&
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 = notes.findLast((n) => n.phase === 'Plan');
157
+ const plan = run.findLast((n) => n.phase === 'Plan');
146
158
  if (!plan)
147
159
  return 'plan';
148
- const { approval, revise } = answers;
149
- const noted = notes.findLast((n) => n.phase === 'Plan approved' && Date.parse(n.at) > Date.parse(plan.at));
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 } } }';
@@ -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,0BAA0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E,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE;gBAC1D,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,cAAc,EAAE,KAAK,CAAC,OAAO,EAAE,IAAI,IAAI,IAAI;gBAC3C,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";
@@ -69,6 +70,9 @@ 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) });
@@ -845,6 +849,12 @@ async function main(argv) {
845
849
  return;
846
850
  case 'serve':
847
851
  return serve(paths);
852
+ case 'shelve':
853
+ if (sub === undefined || arg !== undefined)
854
+ throw usageError('shelve');
855
+ if (values.reason === undefined || values.reason.trim() === '')
856
+ throw usageError('shelve', 'conduct shelve says why: --reason "<why>"');
857
+ return shelve(paths, sub, values.reason);
848
858
  case 'start':
849
859
  return start(paths);
850
860
  case 'state':
@@ -1238,6 +1248,33 @@ async function serve(paths) {
1238
1248
  logCrashes(daemon.log);
1239
1249
  await daemon.closed;
1240
1250
  }
1251
+ // `conduct shelve <item> --reason "…"`: the daemon posts a Shelved note on the item, which moves it
1252
+ // back to not-started, unassigned and labelled human, and the next tick retires its worker with its
1253
+ // worktree kept (ATK-669). It refuses a closed item and an open or merged PR, posting nothing.
1254
+ async function shelve(paths, item, reason) {
1255
+ let answer;
1256
+ try {
1257
+ answer = await callApi(paths, {
1258
+ body: { reason },
1259
+ method: 'POST',
1260
+ path: `/items/${encodeURIComponent(item)}/shelve`,
1261
+ timeoutMs: SHELVE_TIMEOUT_MS,
1262
+ });
1263
+ }
1264
+ catch (error) {
1265
+ if (!(error instanceof NotRunningError))
1266
+ throw error;
1267
+ throw new ConductorError('the conductor is not running: conduct shelve needs it', [
1268
+ `without it, post the Shelved note from ${item}'s checkout: conduct note ${item} <file>, headed "## <skill> · Shelved"`,
1269
+ ]);
1270
+ }
1271
+ if (answer.status === 404)
1272
+ throw olderDaemon('no conduct shelve');
1273
+ const body = z.object({ shelved: shelvedSchema }).parse(await expectOk(Promise.resolve(answer)));
1274
+ const { errors, lines } = shelvedLines(body.shelved);
1275
+ lines.forEach(out);
1276
+ errors.forEach((e) => process.stderr.write(`${e}\n`));
1277
+ }
1241
1278
  // POST /shutdown, then wait for the daemon to go. True when one stopped, false when none answered.
1242
1279
  async function shutdownDaemon(paths) {
1243
1280
  const pid = readPid(paths.pid);