@detergent-software/conductor 3.6.0-dev.2 → 3.6.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 (47) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +9 -3
  3. package/build/brief.js +8 -5
  4. package/build/brief.js.map +1 -1
  5. package/build/cli.js +50 -23
  6. package/build/cli.js.map +1 -1
  7. package/build/help.js +20 -2
  8. package/build/help.js.map +1 -1
  9. package/build/inbox.js +2 -2
  10. package/build/inbox.js.map +1 -1
  11. package/build/manager.js +1 -1
  12. package/build/manager.js.map +1 -1
  13. package/build/note.js +25 -14
  14. package/build/note.js.map +1 -1
  15. package/build/notes.js +54 -52
  16. package/build/notes.js.map +1 -1
  17. package/build/profile-fields.js +1 -0
  18. package/build/profile-fields.js.map +1 -1
  19. package/build/profile.js +1 -0
  20. package/build/profile.js.map +1 -1
  21. package/build/protocol.js +11 -0
  22. package/build/protocol.js.map +1 -1
  23. package/build/rules.js +4 -3
  24. package/build/rules.js.map +1 -1
  25. package/build/scheduler.js +27 -16
  26. package/build/scheduler.js.map +1 -1
  27. package/build/server.js +13 -8
  28. package/build/server.js.map +1 -1
  29. package/build/shelve.js +61 -46
  30. package/build/shelve.js.map +1 -1
  31. package/build/store.js +2 -2
  32. package/build/tracker-writes.js +23 -9
  33. package/build/tracker-writes.js.map +1 -1
  34. package/build/watchers/boards-writes.js +5 -4
  35. package/build/watchers/boards-writes.js.map +1 -1
  36. package/build/watchers/issues-writes.js +25 -4
  37. package/build/watchers/issues-writes.js.map +1 -1
  38. package/build/watchers/linear-writes.js +16 -5
  39. package/build/watchers/linear-writes.js.map +1 -1
  40. package/package.json +3 -3
  41. package/plugin/.claude-plugin/plugin.json +1 -1
  42. package/plugin/skills/conductor-console/SKILL.md +2 -1
  43. package/plugin/skills/work-item/SKILL.md +5 -1
  44. package/plugin/skills/work-item/trackers/ado-boards.md +1 -1
  45. package/plugin/skills/work-item/trackers/github-issues.md +1 -1
  46. package/plugin/skills/work-item/trackers/linear.md +1 -1
  47. 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.6.0-dev.4](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/branchCompare?baseVersion=GTconductor-v3.6.0-dev.3&targetVersion=GTconductor-v3.6.0-dev.4) (2026-11-07)
6
+
7
+ ### Features
8
+
9
+ * **conductor:** close an item with conduct close (ATK-932) ([64c9f54](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/64c9f5405657cff3621eb7c09a41543dfc85b44c))
10
+
11
+ ### Refactoring
12
+
13
+ * **conductor:** one CLI flow for shelve and close (ATK-932) ([ab327ed](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/ab327ed3cc1bbbe4893c8eccc8dbf28de471ecac))
14
+
15
+ ### Documentation
16
+
17
+ * **conductor:** name conduct close in the protocol (ATK-932) ([6eff1b9](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/6eff1b96181f3dc477806d9cb17193fec2a3a2b7))
18
+
19
+ ## [3.6.0-dev.3](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/branchCompare?baseVersion=GTconductor-v3.6.0-dev.2&targetVersion=GTconductor-v3.6.0-dev.3) (2026-11-07)
20
+
21
+ ### Features
22
+
23
+ * **conductor:** close an item with a Closed note (ATK-931) ([cebcce5](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/cebcce5eb30c7adf7fb5965fdacce12ef602b6d3))
24
+
25
+ ### Bug Fixes
26
+
27
+ * **conductor:** keep a closed item's worktree and its canceled state (ATK-931) ([dcc277c](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/dcc277cc761f6014040a1513e29aef099ee3a3d4))
28
+
5
29
  ## [3.6.0-dev.2](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/branchCompare?baseVersion=GTconductor-v3.6.0-dev.1&targetVersion=GTconductor-v3.6.0-dev.2) (2026-11-05)
6
30
 
7
31
  ### Bug Fixes
package/README.md CHANGED
@@ -34,6 +34,8 @@ conduct done <id> --answer <text> answer a scope, blocked, human, operator or fa
34
34
  conduct triage <item> --queue answer a triage item: take its triage label off (--hold: label it human too)
35
35
  conduct shelve <item> --reason <why>
36
36
  stop an item's work for good: back to not-started, labelled human, its worker retired
37
+ conduct close <item> --reason <why>
38
+ close an item that won't be done: canceled, unassigned, its worker retired
37
39
  conduct notify [--json] the notification profile, quiet hours, each channel's state
38
40
  conduct notify profile [<name>] [--until <when>]
39
41
  switch where pushes go (see Notifications)
@@ -173,7 +175,7 @@ A tmux tab runs where no desktop is, so `conduct attach` and `conduct console` p
173
175
 
174
176
  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.
175
177
 
176
- **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`:
178
+ **State follows the notes** (providers design note, section 5). A `Started`, `PR opened`, `Landed`, `Shelved` or `Closed` note (not a Handoff) also moves the item, to the state its phase maps to in the profile's `tracker.transitions`:
177
179
 
178
180
  | Phase | Linear default | ADO Boards default (Scrum) | GitHub Issues default |
179
181
  |---|---|---|---|
@@ -181,11 +183,14 @@ A worker writes each phase note (`## <work skill> · <Phase>[ · <kind>: <one li
181
183
  | `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 |
182
184
  | `landed` | Done | Done | closed as completed, the phase label taken off |
183
185
  | `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 |
186
+ | `closed` | the team's canceled-type state (Canceled), unassigned | Removed, unassigned | closed as not planned, the phase labels and assignees taken off |
184
187
 
185
- 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 move whose answer never arrived or didn't read (Linear's `unreachable` or `unclear`, rather than a refusal) is `retryable` on the answer and the event. On a worker's Landed, the daemon then tries the move once more on its next 5-minute sweep, and the answer says so (`retry: "sweep"`), so the worker waits on `item <KEY> done` rather than handing off (ATK-869). The sweep finds it by the worker's newest Landed move event, so a restart keeps it, and records the second try with `retried: true`. One that moves the item closes it, so `retire-closed` retires the worker. One that fails too resolves the worker's open waits on its item (`item:<tracker>:<KEY>:…`, no other) with `item <KEY> still open: the conductor's retry of the Landed move failed (…): hand it off`, and records how many in `woken`. When it found none open (the sweep came before the worker's wait), a later pass resolves the first such wait the worker opens the same way, once (`tracker.retry-woken`). A later move of the worker's, such as a follow-up PR opened, stands over the Landed, which then isn't retried. A Started or PR opened isn't retried. 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. It also records the note in the store for the project registered there, as the daemon would, so the daemon reads it when it next starts: a Landed counts for ready to release and frees its Area (ATK-723). No rule or inbox item follows such a note, and with no store yet nothing is recorded. When the store shows the item shelved, it refuses the note before posting it, as the daemon does, unless it is a Started, a Handoff or a Shelved (ATK-724). A Shelved note reads the item's brief here first, and is refused as the daemon refuses it: for a done or canceled item, a PR open, merged or unread, or a brief that doesn't read (ATK-727).
188
+ A phase mapped to `null` moves nothing (`started` still assigns, `shelved` still unassigns and labels, `closed` still unassigns). A `Started` or `Shelved` never reopens a closed item, and a `Closed` never cancels a done one (`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 move whose answer never arrived or didn't read (Linear's `unreachable` or `unclear`, rather than a refusal) is `retryable` on the answer and the event. On a worker's Landed, the daemon then tries the move once more on its next 5-minute sweep, and the answer says so (`retry: "sweep"`), so the worker waits on `item <KEY> done` rather than handing off (ATK-869). The sweep finds it by the worker's newest Landed move event, so a restart keeps it, and records the second try with `retried: true`. One that moves the item closes it, so `retire-closed` retires the worker. One that fails too resolves the worker's open waits on its item (`item:<tracker>:<KEY>:…`, no other) with `item <KEY> still open: the conductor's retry of the Landed move failed (…): hand it off`, and records how many in `woken`. When it found none open (the sweep came before the worker's wait), a later pass resolves the first such wait the worker opens the same way, once (`tracker.retry-woken`). A later move of the worker's, such as a follow-up PR opened, stands over the Landed, which then isn't retried. A Started or PR opened isn't retried. 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. It also records the note in the store for the project registered there, as the daemon would, so the daemon reads it when it next starts: a Landed counts for ready to release and frees its Area (ATK-723). No rule or inbox item follows such a note, and with no store yet nothing is recorded. When the store shows the item shelved or closed, it refuses the note before posting it, as the daemon does, unless it is a Started, a Handoff, a Shelved or a Closed (ATK-724). A Shelved or Closed note reads the item's brief here first, and is refused as the daemon refuses it: for a done or canceled item, a PR open, merged or unread, or a brief that doesn't read (ATK-727).
186
189
 
187
190
  **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.
188
191
 
192
+ **Closing** (ATK-931). A `Closed` note says the item won't be done: the operator said close, cancel or won't do, and the note carries the reason and their words. It moves the item to the tracker's canceled state as above, unassigned, with no label: the scheduler never launches a canceled item. With no state in `tracker.transitions.closed`, Linear takes the team's canceled-type state (the one named Canceled first). `conduct note` holds it to everything a `Shelved` note is held to: refused for a done or canceled item and while the item's PR is open, merged or doesn't read; not held back by a revise; the item's other notes after it refused (Handoffs aside) until a `Started`; and the brief and plan records start after it. The scheduler retires its worker on the note, as for a shelve, with its worktree and branch kept and no inbox item: by `item.closed` (`retire-closed`) once the read shows the item canceled, or by `item.shelved` (`retire-shelved`) while it doesn't, so a Canceled move that didn't take doesn't strand the worker. `conduct close <item> --reason "…"` posts the same note for the operator (ATK-932): through the daemon, on the item's worker when one is in flight, or with no daemon from the item's project checkout as its account, as `conduct note` posts one. It refuses what the note refuses, posting nothing.
193
+
189
194
  **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.
190
195
 
191
196
  The work skill is the profile's `skills.work`. A note headed with one of `skills.aliases` counts the same, there and wherever the daemon reads notes (approvals, `conduct wait item … note`, the review-thread checks of `conduct wait pr … comment`). So when a project renames its work skill, the old name goes in `aliases` and items in flight keep their phases.
@@ -470,7 +475,7 @@ The scheduler is the work loop's tick, in the daemon (design note, section 8). E
470
475
  - **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.
471
476
  - **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.
472
477
  - **Holds:** quiet hours and `conduct pause` turn picks into waits that say why.
473
- 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; a `held` one, whose worktree something still holds after its processes were stopped, raises that inbox item on the first try, naming the holder where the OS can tell and the commands that stop it, and is tried again on the same schedule, so a lock that passes retires it and resolves the item, ATK-865), `item.shelved` → `retire` with the worktree and branch kept (default `retire-shelved`, retried and raised the same way), `queue.drained` → an inbox item once a day, `queue.ready-to-release` → a `release` inbox item when a tracker project has no open item and an item of its conductor project has a Landed note since the scheduler's last `release` item for the project, or since it was added when it has none; the project stays ready while that item is open (ATK-710: a project just added with an empty queue has nothing to release, and a dismissed `release` item comes back only after another item lands), `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.
478
+ 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; a `held` one, whose worktree something still holds after its processes were stopped, raises that inbox item on the first try, naming the holder where the OS can tell and the commands that stop it, and is tried again on the same schedule, so a lock that passes retires it and resolves the item, ATK-865), `item.shelved` → `retire` with the worktree and branch kept (default `retire-shelved`, retried and raised the same way), for a worker whose item has a `Shelved` or `Closed` note since its launch (a closed item's retire keeps them too when the item has a `Closed` note), `queue.drained` → an inbox item once a day, `queue.ready-to-release` → a `release` inbox item when a tracker project has no open item and an item of its conductor project has a Landed note since the scheduler's last `release` item for the project, or since it was added when it has none; the project stays ready while that item is open (ATK-710: a project just added with an empty queue has nothing to release, and a dismissed `release` item comes back only after another item lands), `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.
474
479
 
475
480
  `scheduler.mode` decides how far it goes:
476
481
  - **`on`** (the default): it acts.
@@ -801,6 +806,7 @@ Everything lives in `~/.conductor` (`CONDUCTOR_HOME` overrides it):
801
806
  - `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.
802
807
  - `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`.
803
808
  - `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.
809
+ - `POST /items/:id/close` with `{ "reason": "<why>" }`: `conduct close` (see Notes), the same as `shelve` with a `Closed` note; 200 with `{ "closed": { item, project, state, url, worker } }`. 409 and 502 as for `shelve`.
804
810
  - `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.
805
811
  - `GET /inbox`: the open inbox items, oldest first.
806
812
  - `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`, `human` or `operator` item, or a `failed` one with an item wait attached: 409 otherwise, with nothing posted).
package/build/brief.js CHANGED
@@ -3,6 +3,7 @@ import { ConductorError } from "./errors.js";
3
3
  import { noteHeading, prVerdict } from "./lib/providers/index.js";
4
4
  import { firstPr, ITEM, projectFor } from "./notes.js";
5
5
  import { notePrefixes } from "./profile.js";
6
+ import { stopPhase } from "./protocol.js";
6
7
  import { ACTIVE_STATUSES } from "./store.js";
7
8
  import { linkedPr } from "./tracker-writes.js";
8
9
  import { linearApi, LinearRequestError } from "./watchers/linear-api.js";
@@ -88,7 +89,8 @@ export function briefOf(item, project, read, prefixes, at, pr = null, approvers
88
89
  const heading = noteHeading(c.body, prefixes);
89
90
  return heading ? [{ at: c.createdAt, ...heading }] : [];
90
91
  });
91
- // A Shelved note ends a run of the work (ATK-669): its Plans and answers stay behind it.
92
+ // A Shelved or Closed note ends a run of the work (ATK-669, ATK-931): its Plans and answers stay
93
+ // behind it.
92
94
  const shelvedAt = shelvedSince(notes);
93
95
  const current = shelvedAt === null ? sorted : sorted.filter((c) => Date.parse(c.createdAt) > shelvedAt);
94
96
  const found = approvalAfterPlan(current, who, prefixes);
@@ -131,8 +133,8 @@ export function briefOf(item, project, read, prefixes, at, pr = null, approvers
131
133
  // The work skill's phase for an item: done or canceled by its status; then by its PR (open, merged,
132
134
  // abandoned, or one that couldn't be read, which still waits); not started; then by its newest
133
135
  // Plan: a `revise:` newer than its approval sends it back to plan, an approval (a `Plan approved`
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
+ // note or the operator's `approve`) to implement, and no answer yet waits. The newest Shelved or
137
+ // Closed note is a cut-off (ATK-669, ATK-931): a closed PR with no PR opened note after it, and every Plan and answer
136
138
  // before it, belong to the run it ended, so a pick-up starts at orient and plans afresh.
137
139
  export function briefPhase(status, notes, answers, pr) {
138
140
  if (status.type === 'completed')
@@ -255,9 +257,10 @@ export function notedPr(comments, prefixes) {
255
257
  .at(-1);
256
258
  return firstPr(opened?.body ?? '');
257
259
  }
258
- // When the newest Shelved note was written (ms), or null without one.
260
+ // When the newest Shelved or Closed note was written (ms), or null without one: either ends a run
261
+ // of the work (ATK-669, ATK-931).
259
262
  export function shelvedSince(notes) {
260
- const shelved = notes.findLast((n) => n.phase === 'Shelved');
263
+ const shelved = notes.findLast((n) => stopPhase(n.phase) !== null);
261
264
  return shelved ? Date.parse(shelved.at) : null;
262
265
  }
263
266
  const STATE = 'state { name type }';
@@ -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,cAA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,EAAE;aAClB,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
package/build/cli.js CHANGED
@@ -27,7 +27,7 @@ import { npmStage } from "./lib/providers/index.js";
27
27
  import { processAlive, readPid } from "./lock.js";
28
28
  import { rotatingLog } from "./log.js";
29
29
  import { fleetWorkerSchema, storedFleet, workerByRef, workerLine } from "./manager.js";
30
- import { noteCommand } from "./note.js";
30
+ import { closeHere, noteCommand } from "./note.js";
31
31
  import { isQuiet, notifyLines, notifyStatusSchema, parseUntil, testResultSchema } from "./notify.js";
32
32
  import { sharedNpmReads } from "./npm-reads.js";
33
33
  import { overrideViewSchema, PAUSE } from "./overrides.js";
@@ -37,6 +37,7 @@ import { refreshConductorPlugin } from "./plugin.js";
37
37
  import { profileLines, projectProfile } from "./profile-layers.js";
38
38
  import { projectCheckCommand, projectCheckReport } from "./project-check-cli.js";
39
39
  import { noProject } from "./project-check.js";
40
+ import { STOP_VERBS } from "./protocol.js";
40
41
  import { pushoverCredential, pushoverSender } from "./pushover.js";
41
42
  import { cloneProject, registerProject } from "./registry.js";
42
43
  import { rulesLines, rulesService, rulesTestResultSchema, rulesViewSchema, testLines, } from "./rules-service.js";
@@ -44,7 +45,7 @@ import { resolveUntil } from "./rules.js";
44
45
  import { outputOf, run } from "./run.js";
45
46
  import { queueLines, queueViewSchema } from "./scheduler.js";
46
47
  import { awaitStart, serveDetached } from "./serve.js";
47
- import { shelvedLines, shelvedSchema } from "./shelve.js";
48
+ import { closedLines, shelvedLines, shelvedSchema } from "./shelve.js";
48
49
  import { localDay } from "./spend.js";
49
50
  import { answerStopRequest, dropStaleStopRequest, pendingStopRequest, STOP_POLL_MS, stopSupervisor, } from "./stop-request.js";
50
51
  import { inboxItemSchema, openStore, projectSchema, waitSchema, workerSchema, } from "./store.js";
@@ -71,8 +72,8 @@ const ANSWER_TIMEOUT_MS = 60_000;
71
72
  // A revise of an approved plan adds up to three brief reads (the tracker and the PR, each within
72
73
  // 20 s) 2 s apart after the comment, so a slow tracker doesn't cut off an answer whose comment landed.
73
74
  const REVISE_TIMEOUT_MS = 3 * 60_000;
74
- // A shelve reads the brief fresh (the tracker and the PR), then posts the note and its state move,
75
- // human label and PR checks, each within 20 s.
75
+ // A shelve or close reads the brief fresh (the tracker and the PR), then posts the note and its
76
+ // state move, human label and PR checks, each within 20 s.
76
77
  const SHELVE_TIMEOUT_MS = 3 * 60_000;
77
78
  const projectsBody = z.object({ projects: z.array(projectSchema) });
78
79
  const addBody = z.object({ created: z.boolean(), project: projectSchema });
@@ -234,6 +235,15 @@ async function awaitDaemon(paths, failure) {
234
235
  function brokerIo() {
235
236
  return { cwd: process.cwd(), err: (line) => process.stderr.write(`${line}\n`), out };
236
237
  }
238
+ // `conduct close <item> --reason "…"` (ATK-932): the daemon posts a Closed note on the item, which
239
+ // moves it to the tracker's canceled state, unassigned, and the next tick retires its worker with its
240
+ // worktree kept. It refuses a closed item and an open or merged PR, posting nothing. With no
241
+ // conductor, the note is posted from the item's project checkout, as `conduct note` posts one.
242
+ async function close(paths, item, reason) {
243
+ await stopItem(paths, item, reason, 'Closed', async () => {
244
+ process.exitCode = await closeHere(paths, item, reason, verbIo());
245
+ });
246
+ }
237
247
  // `conduct console`: the console (design note, section 11), the Claude session the conductor mod
238
248
  // serves, started with CONDUCTOR_CONSOLE=1 in <CONDUCTOR_HOME>/console with the conductor plugin,
239
249
  // which brings the console skill. It belongs to no project, so it opens with none registered, and it
@@ -643,6 +653,12 @@ async function main(argv) {
643
653
  throw usageError('checkout');
644
654
  process.exitCode = await checkoutCommand(paths, sub, arg, fourth, { ...item, ...(values.base === undefined ? {} : { base: values.base }) }, verbIo());
645
655
  return;
656
+ case 'close':
657
+ if (sub === undefined || arg !== undefined)
658
+ throw usageError('close');
659
+ if (values.reason === undefined || values.reason.trim() === '')
660
+ throw usageError('close', 'conduct close says why: --reason "<why>"');
661
+ return close(paths, sub, values.reason);
646
662
  case 'comments': {
647
663
  if (sub === undefined || arg !== undefined)
648
664
  throw usageError('comments');
@@ -1320,28 +1336,11 @@ async function serve(paths) {
1320
1336
  // back to not-started, unassigned and labelled human, and the next tick retires its worker with its
1321
1337
  // worktree kept (ATK-669). It refuses a closed item and an open or merged PR, posting nothing.
1322
1338
  async function shelve(paths, item, reason) {
1323
- let answer;
1324
- try {
1325
- answer = await callApi(paths, {
1326
- body: { reason },
1327
- method: 'POST',
1328
- path: `/items/${encodeURIComponent(item)}/shelve`,
1329
- timeoutMs: SHELVE_TIMEOUT_MS,
1330
- });
1331
- }
1332
- catch (error) {
1333
- if (!(error instanceof NotRunningError))
1334
- throw error;
1339
+ await stopItem(paths, item, reason, 'Shelved', () => {
1335
1340
  throw new ConductorError('the conductor is not running: conduct shelve needs it', [
1336
1341
  `without it, post the Shelved note from ${item}'s checkout: conduct note ${item} <file>, headed "## <skill> · Shelved"`,
1337
1342
  ]);
1338
- }
1339
- if (answer.status === 404)
1340
- throw olderDaemon('no conduct shelve');
1341
- const body = z.object({ shelved: shelvedSchema }).parse(await expectOk(Promise.resolve(answer)));
1342
- const { errors, lines } = shelvedLines(body.shelved);
1343
- lines.forEach(out);
1344
- errors.forEach((e) => process.stderr.write(`${e}\n`));
1343
+ });
1345
1344
  }
1346
1345
  // POST /shutdown, then wait for the daemon to go. True when one stopped, false when none answered.
1347
1346
  async function shutdownDaemon(paths) {
@@ -1477,6 +1476,34 @@ async function stopDaemon(paths) {
1477
1476
  }
1478
1477
  }
1479
1478
  }
1479
+ // `conduct shelve` or `conduct close` through the daemon (POST /items/:id/<verb>), printing what it
1480
+ // did; `notRunning` runs when no conductor answers. Any other failure may come after the note was
1481
+ // posted, so it says to look first.
1482
+ async function stopItem(paths, item, reason, phase, notRunning) {
1483
+ const verb = STOP_VERBS[phase];
1484
+ let answer;
1485
+ try {
1486
+ answer = await callApi(paths, {
1487
+ body: { reason },
1488
+ method: 'POST',
1489
+ path: `/items/${encodeURIComponent(item)}/${verb}`,
1490
+ timeoutMs: SHELVE_TIMEOUT_MS,
1491
+ });
1492
+ }
1493
+ catch (error) {
1494
+ if (error instanceof NotRunningError)
1495
+ return notRunning();
1496
+ throw new ConductorError(`the conductor didn't answer; ${item} may have the ${phase} note already, so look before running conduct ${verb} again`, [error instanceof Error ? error.message : String(error)]);
1497
+ }
1498
+ if (answer.status === 404)
1499
+ throw olderDaemon(`no conduct ${verb}`);
1500
+ const ok = await expectOk(Promise.resolve(answer));
1501
+ const { errors, lines } = phase === 'Closed'
1502
+ ? closedLines(z.object({ closed: shelvedSchema }).parse(ok).closed)
1503
+ : shelvedLines(z.object({ shelved: shelvedSchema }).parse(ok).shelved);
1504
+ lines.forEach(out);
1505
+ errors.forEach((e) => process.stderr.write(`${e}\n`));
1506
+ }
1480
1507
  // `conduct supervise`: keeps `conduct serve` running (supervise.ts, ATK-417). The logon startup runs
1481
1508
  // it; `conduct start` runs it with --fail-fast. The config is read again for each push, so one fixed
1482
1509
  // while the daemon is down counts, and one that doesn't load (a reason it may be down) leaves the