@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.
Files changed (51) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +22 -13
  3. package/build/brief.js +28 -10
  4. package/build/brief.js.map +1 -1
  5. package/build/cli.js +62 -3
  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 +30 -4
  10. package/build/help.js.map +1 -1
  11. package/build/inbox.js +26 -6
  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 +28 -3
  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/hooks/model.ts +41 -19
  45. package/plugin/hooks/register.tsx +50 -13
  46. package/plugin/skills/conductor-console/SKILL.md +5 -3
  47. package/plugin/skills/work-item/SKILL.md +4 -1
  48. package/plugin/skills/work-item/trackers/ado-boards.md +1 -1
  49. package/plugin/skills/work-item/trackers/github-issues.md +1 -1
  50. package/plugin/skills/work-item/trackers/linear.md +1 -1
  51. package/protocol/PROTOCOL.md +2 -1
@@ -1 +1 @@
1
- {"version":3,"file":"linear-writes.js","sourceRoot":"","sources":["../../src/watchers/linear-writes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAEL,aAAa,EACb,WAAW,EACX,OAAO,EAEP,aAAa,GACd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAyB,MAAM,iBAAiB,CAAC;AAEnE,gGAAgG;AAChG,yFAAyF;AACzF,+FAA+F;AAC/F,oDAAoD;AAEpD,MAAM,MAAM,GAAG,+CAA+C,CAAC;AAE/D,MAAM,eAAe,GAAG;;iEAEyC,MAAM;EACrE,CAAC;AACH,MAAM,MAAM,GAAG;;EAEb,CAAC;AACH,MAAM,WAAW,GAAG,iGAAiG,CAAC;AACtH,MAAM,MAAM,GAAG;;EAEb,CAAC;AACH,4CAA4C;AAC5C,SAAS,gBAAgB,CAAC,KAAc;IACtC,OAAO,qCAAqC,KAAK,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE;oCAC1C,MAAM;IACtC,KAAK,CAAC,CAAC,CAAC,gHAAgH,CAAC,CAAC,CAAC,EAAE;;EAE/H,CAAC;AACH,CAAC;AACD,MAAM,MAAM,GAAG;;EAEb,CAAC;AACH,MAAM,QAAQ,GAAG,uDAAuD,CAAC;AACzE,MAAM,MAAM,GAAG;;EAEb,CAAC;AAEH,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,E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AE,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC;YAC3F,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC;YAChC,IAAI,CAAC,WAAW,CAAC,OAAO,IAAI,CAAC,MAAM,KAAK,IAAI,IAAI,KAAK,EAAE,KAAK,CAAC,IAAI,KAAK,MAAM,CAAC,IAAI,CAAC;gBAChF,MAAM,IAAI,cAAc,CAAC,sBAAsB,IAAI,OAAO,MAAM,EAAE,IAAI,IAAI,WAAW,EAAE,CAAC,CAAC;YAC3F,IAAI,MAAM,IAAI,KAAK,EAAE,QAAQ,EAAE,EAAE,KAAK,MAAM,CAAC,EAAE;gBAAE,MAAM,IAAI,cAAc,CAAC,wBAAwB,IAAI,EAAE,CAAC,CAAC;YAC1G,IAAI,QAAQ,IAAI,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,QAAQ,KAAK,IAAI,CAAC;gBACzD,MAAM,IAAI,cAAc,CAAC,0BAA0B,IAAI,EAAE,CAAC,CAAC;YAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,IAAI,IAAI,EAAE,CAAC;QACxF,CAAC;KACF,CAAC;AACJ,CAAC;AAED,SAAS,aAAa,CAAC,OAAgB;IACrC,IAAI,OAAO,CAAC,OAAO,CAAC,IAAI,KAAK,QAAQ;QAAE,MAAM,IAAI,cAAc,CAAC,WAAW,OAAO,CAAC,IAAI,yBAAyB,CAAC,CAAC;IAClH,OAAO,OAAO,CAAC,OAAO,CAAC;AACzB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@detergent-software/conductor",
3
- "version": "3.1.0-dev.3",
3
+ "version": "3.1.0-dev.5",
4
4
  "description": "Conductor: the local daemon that runs conducted projects' work loops (conduct serve) and its conduct CLI.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -303,26 +303,21 @@ export function errorOf(answer: ApiAnswer): string {
303
303
  return `the conductor answered ${answer.status}`;
304
304
  }
305
305
 
306
+ // The open scope, blocked or human Handoff of `ref` that /answer posts on (ATK-682), as findPlan
307
+ // finds a plan: an item key, or an inbox id as #12 (any kind; the daemon refuses the rest).
308
+ export function findHandoff(inbox: readonly ConductorInboxItem[], ref: string): Found<ConductorInboxItem> {
309
+ return findOpen(inbox, ref, ANSWERED_KINDS, { none: 'no Handoff of', several: 'several Handoffs of' });
310
+ }
311
+
306
312
  // The open plan of `ref` (as `conduct approve` finds it): an item key, or an inbox id as #12.
307
313
  export function findPlan(inbox: readonly ConductorInboxItem[], ref: string): Found<ConductorInboxItem> {
308
- const byId = /^#(\d+)$/.exec(ref.trim());
309
- if (byId) {
310
- const item = inbox.find((i) => i.id === Number(byId[1]));
311
- return item ? { found: item } : { error: `no open inbox item ${ref}` };
312
- }
313
- if (/^\d+$/.test(ref.trim())) {
314
- const n = ref.trim();
315
- // The waiting plans whose key ends in the number, else a placeholder: the project's key isn't known here.
316
- const keys = inbox.flatMap((i) => (i.kind === 'plan' && i.item?.endsWith(`-${n}`) ? [i.item] : []));
317
- const item = keys.length > 0 ? keys.join(' or ') : `<KEY>-${n}`;
318
- return { error: `"${ref}" is ambiguous: name the item, such as ${item}, or the inbox id as #${n}` };
319
- }
320
- const plans = inbox.filter((i) => i.kind === 'plan' && i.item?.toUpperCase() === ref.trim().toUpperCase());
321
- if (plans.length === 1 && plans[0]) return { found: plans[0] };
322
- if (plans.length === 0) return { error: `no plan of ${ref} waits in the inbox` };
323
- return { error: `several plans of ${ref} wait: name one as ${plans.map((p) => `#${p.id}`).join(' or ')}` };
314
+ return findOpen(inbox, ref, PLAN_KINDS, { none: 'no plan of', several: 'several plans of' });
324
315
  }
325
316
 
317
+ // The inbox kinds /answer offers on: those whose worker waits on an answer on the item (ATK-681).
318
+ export const ANSWERED_KINDS: readonly string[] = ['scope', 'blocked', 'human'];
319
+ const PLAN_KINDS: readonly string[] = ['plan'];
320
+
326
321
  // A worker in flight by name or item; a name match wins, as `conduct attach` finds it.
327
322
  export function findWorker(workers: readonly ConductorWorker[], ref: string): Found<ConductorWorker> {
328
323
  const byName = workers.filter((w) => w.name === ref);
@@ -541,6 +536,30 @@ export function tokens(n: number): string {
541
536
  return `${(n / 1_000_000).toFixed(1)}M`;
542
537
  }
543
538
 
539
+ function findOpen(
540
+ inbox: readonly ConductorInboxItem[],
541
+ ref: string,
542
+ kinds: readonly string[],
543
+ say: { none: string; several: string },
544
+ ): Found<ConductorInboxItem> {
545
+ const byId = /^#(\d+)$/.exec(ref.trim());
546
+ if (byId) {
547
+ const item = inbox.find((i) => i.id === Number(byId[1]));
548
+ return item ? { found: item } : { error: `no open inbox item ${ref}` };
549
+ }
550
+ if (/^\d+$/.test(ref.trim())) {
551
+ const n = ref.trim();
552
+ // The waiting items whose key ends in the number, else a placeholder: the project's key isn't known here.
553
+ const keys = inbox.flatMap((i) => (kinds.includes(i.kind) && i.item?.endsWith(`-${n}`) ? [i.item] : []));
554
+ const item = keys.length > 0 ? keys.join(' or ') : `<KEY>-${n}`;
555
+ return { error: `"${ref}" is ambiguous: name the item, such as ${item}, or the inbox id as #${n}` };
556
+ }
557
+ const found = inbox.filter((i) => kinds.includes(i.kind) && i.item?.toUpperCase() === ref.trim().toUpperCase());
558
+ if (found.length === 1 && found[0]) return { found: found[0] };
559
+ if (found.length === 0) return { error: `${say.none} ${ref} waits in the inbox` };
560
+ return { error: `${say.several} ${ref} wait: name one as ${found.map((p) => `#${p.id}`).join(' or ')}` };
561
+ }
562
+
544
563
  // `text` in exactly `cells` cells: padded, or cut with an ellipsis.
545
564
  function fit(text: string, cells: number): string {
546
565
  if (text.length <= cells) return text.padEnd(cells);
@@ -551,10 +570,12 @@ function fit(text: string, cells: number): string {
551
570
  export const MAYBE_POSTED = 'the comment may be on the item already: look before answering again';
552
571
 
553
572
  // POST /inbox/:id/resolve's answer as the line to show, as `conduct approve|revise|done` says it.
554
- export function answerText(action: 'approve' | 'done' | 'revise', id: number, answer: ApiAnswer): string {
573
+ // `answer` is done with an answer posted on a Handoff's item (ATK-682).
574
+ export function answerText(action: 'answer' | 'approve' | 'done' | 'revise', id: number, answer: ApiAnswer): string {
555
575
  if (answer.status !== 200) {
556
576
  const unknown = answer.status === 502 && isRecord(answer.body) && answer.body.posted === 'unknown';
557
- return `not ${action === 'done' ? 'done' : `${action}d`}: ${errorOf(answer)}${unknown ? `; ${MAYBE_POSTED}` : ''}`;
577
+ const not = action === 'done' ? 'done' : action === 'answer' ? 'answered' : `${action}d`;
578
+ return `not ${not}: ${errorOf(answer)}${unknown ? `; ${MAYBE_POSTED}` : ''}`;
558
579
  }
559
580
  const body = isRecord(answer.body) ? answer.body : {};
560
581
  const key = isRecord(body.item) && typeof body.item.item === 'string' ? body.item.item : `#${id}`;
@@ -562,7 +583,8 @@ export function answerText(action: 'approve' | 'done' | 'revise', id: number, an
562
583
  const comment = isRecord(body.comment) ? body.comment : {};
563
584
  const where =
564
585
  typeof comment.url === 'string' ? comment.url : typeof comment.id === 'string' ? comment.id : 'comment posted';
565
- return `${action === 'approve' ? 'approved' : 'asked for a revision of'} ${key}: ${where}`;
586
+ const did = { answer: 'answered', approve: 'approved', revise: 'asked for a revision of' }[action];
587
+ return `${did} ${key}: ${where}`;
566
588
  }
567
589
 
568
590
  // The item a /revise names when no plan of it waits in the inbox, which `conduct revise` then revises
@@ -6,6 +6,7 @@ import type { ConductorSnapshot } from '../types';
6
6
 
7
7
  import {
8
8
  age,
9
+ ANSWERED_KINDS,
9
10
  answerText,
10
11
  type ApiAnswer,
11
12
  approvedPlanItem,
@@ -15,6 +16,7 @@ import {
15
16
  CONSOLE_SKILL,
16
17
  daemonOf,
17
18
  endpointOf,
19
+ findHandoff,
18
20
  findPlan,
19
21
  findWorker,
20
22
  fleetColumns,
@@ -105,18 +107,25 @@ let isWindows = false;
105
107
  type Endpoint = { port: number; token: string };
106
108
 
107
109
  // The operator's answer to an inbox item, as `conduct approve|revise|done` posts it; the line to show.
108
- // Approve and revise run `conduct` (ANSWER_RUN_MS), by inbox id. Without the CLI, the API, which
109
- // $.http.fetch cuts off after 30 s, possibly after the comment was posted. Done doesn't ask Linear.
110
+ // Approve, revise and done with an answer (ATK-682) run `conduct` (ANSWER_RUN_MS), by inbox id.
111
+ // Without the CLI, the API, which $.http.fetch cuts off after 30 s, possibly after the comment was
112
+ // posted. A plain done doesn't ask Linear.
110
113
  async function answer(
111
114
  $: EngineInterface,
112
115
  id: number,
113
- body: { action: 'approve' | 'done' } | { action: 'revise'; text: string },
116
+ body: { action: 'approve' | 'done' } | { action: 'done'; answer: string } | { action: 'revise'; text: string },
114
117
  ): Promise<string> {
118
+ const action = 'answer' in body ? 'answer' : body.action;
115
119
  try {
116
120
  const cli = await cliPath($);
117
- if (body.action !== 'done' && (await $.fs.exists(cli))) {
118
- const failed = `not ${body.action}d`;
119
- const argv = body.action === 'revise' ? ['revise', `#${id}`, body.text] : ['approve', `#${id}`];
121
+ if (action !== 'done' && (await $.fs.exists(cli))) {
122
+ const failed = action === 'answer' ? 'not answered' : `not ${action}d`;
123
+ const argv =
124
+ 'answer' in body
125
+ ? ['done', `#${id}`, '--answer', body.answer]
126
+ : body.action === 'revise'
127
+ ? ['revise', `#${id}`, body.text]
128
+ : ['approve', `#${id}`];
120
129
  let run;
121
130
  try {
122
131
  run = await $.process.run(['node', cli, ...argv], { ...(await cliInit($)), timeoutMs: ANSWER_RUN_MS });
@@ -124,21 +133,20 @@ async function answer(
124
133
  return `${failed}: ${error instanceof Error ? error.message : String(error)}`;
125
134
  }
126
135
  refreshSoon($);
127
- return runText(run, {
128
- failed,
129
- ok: `${body.action === 'approve' ? 'approved' : 'asked for a revision of'} #${id}`,
130
- });
136
+ const did = { answer: 'answered', approve: 'approved', revise: 'asked for a revision of' }[action];
137
+ return runText(run, { failed, ok: `${did} #${id}` });
131
138
  }
132
139
  const at = await endpoint($);
133
140
  let result: ApiAnswer;
134
141
  try {
135
142
  result = await callApi($, 'POST', `/inbox/${id}/resolve`, body, at);
136
143
  } catch (error) {
137
- if (body.action === 'done') throw error;
138
- return `not ${body.action}d: ${error instanceof Error ? error.message : String(error)}; ${MAYBE_POSTED}`;
144
+ if (action === 'done') throw error;
145
+ const not = action === 'answer' ? 'answered' : `${action}d`;
146
+ return `not ${not}: ${error instanceof Error ? error.message : String(error)}; ${MAYBE_POSTED}`;
139
147
  }
140
148
  refreshSoon($);
141
- return answerText(body.action, id, result);
149
+ return answerText(action, id, result);
142
150
  } catch (error) {
143
151
  return error instanceof Error ? error.message : String(error);
144
152
  }
@@ -511,6 +519,11 @@ async function registerCommands($: EngineInterface): Promise<void> {
511
519
  description: 'Ask for a revised plan (posts revise: … as you)',
512
520
  name: 'revise',
513
521
  });
522
+ await $.command.register({
523
+ argumentHint: '<item | #id> <your answer>',
524
+ description: 'Answer a scope, blocked or human Handoff (posts it on the item as you)',
525
+ name: 'answer',
526
+ });
514
527
  await $.command.register({
515
528
  argumentHint: '<item | worker>',
516
529
  description: 'Wake a parked worker and open it in a tab',
@@ -741,6 +754,22 @@ export const register: Register = (on) => {
741
754
  return { text: approved === null ? plan.error : await reviseApproved($, approved, text) };
742
755
  });
743
756
 
757
+ on('command.run', { command: 'answer' }, async ($, e) => {
758
+ // The item, then the answer as typed, as /revise takes it.
759
+ const typed = /^(\S+)\s+([\s\S]*\S)\s*$/.exec(e.args.trim());
760
+ const ref = typed?.[1] ?? '';
761
+ const text = typed?.[2] ?? '';
762
+ // A lone help flag would be `conduct done --answer --help`: the help, with nothing posted.
763
+ if (ref === '' || text === '' || /^(-h|--help)$/.test(text))
764
+ return { text: 'usage: /answer <item | #id> <your answer>' };
765
+ const snap = await refresh($);
766
+ if (snap.error !== null) return { text: snap.error };
767
+ const handoff = findHandoff(snap.inbox, ref);
768
+ return {
769
+ text: handoff.found ? await answer($, handoff.found.id, { action: 'done', answer: text }) : handoff.error,
770
+ };
771
+ });
772
+
744
773
  on('command.run', { command: 'attach' }, async ($, e) => {
745
774
  const ref = e.args.trim();
746
775
  if (ref === '') return { text: 'usage: /attach <item | worker>' };
@@ -918,6 +947,14 @@ export const register: Register = (on) => {
918
947
  onPress={() => $.prompt.fill({ text: `/revise ${item.item ?? ''} ` })}
919
948
  />
920
949
  )}
950
+ {ANSWERED_KINDS.includes(item.kind) && item.item !== null && (
951
+ <Button
952
+ key={`answer-${item.id}`}
953
+ label='answer'
954
+ onPress={() => $.prompt.fill({ text: `/answer #${item.id} ` })}
955
+ variant='primary'
956
+ />
957
+ )}
921
958
  {item.kind === 'triage' && item.item !== null && (
922
959
  <Button
923
960
  key={`queue-${item.id}`}
@@ -5,7 +5,7 @@ description: Be the conductor console - the one always-open Claude session besid
5
5
 
6
6
  # conductor-console
7
7
 
8
- You are **the console**, the one Claude session that stays open beside **the daemon** (`conduct serve`, package `@detergent-software/conductor`). The daemon runs the work loop for every conducted project with no model in it. It picks items, launches and retires **workers** (one Claude session per item), parks and resumes them, raises an inbox of what waits on the operator, and pushes it to their phone. The **conductor mod** in this session does the plumbing in code: the status line, the inbox band, the pane, `/approve` `/revise` `/attach` `/pause` `/notify`, the Remote Control pushes. Your model is woken for two things only:
8
+ You are **the console**, the one Claude session that stays open beside **the daemon** (`conduct serve`, package `@detergent-software/conductor`). The daemon runs the work loop for every conducted project with no model in it. It picks items, launches and retires **workers** (one Claude session per item), parks and resumes them, raises an inbox of what waits on the operator, and pushes it to their phone. The **conductor mod** in this session does the plumbing in code: the status line, the inbox band, the pane, `/approve` `/revise` `/answer` `/attach` `/pause` `/notify`, the Remote Control pushes. Your model is woken for two things only:
9
9
 
10
10
  - **An escalation:** a turn that reads `[conductor] escalation #<id> on <item>: <ask>`. A daemon rule (`escalate console "<ask>"`) wants judgement. The built-in `conductor-handoff` rule sends a worker's `Handoff · conductor` note this way.
11
11
  - **The operator**, typing here.
@@ -16,8 +16,8 @@ Start this session with `conduct console` (a tab in the conductor's own folder,
16
16
 
17
17
  - **No loop.** Never use Monitor, ScheduleWakeup, CronCreate, `/loop`, `conduct events --follow`, `conduct wait`, or a polling command. The mod follows the daemon, and the daemon wakes you. Do the job, then end the turn.
18
18
  - **The daemon decides within policy.** Don't launch, retire, park or resume workers on your own judgement. Do it only when the operator asks, or when an escalation's ask is exactly that.
19
- - **Approvals are the operator's.** Run `conduct approve` or `conduct revise` only on the operator's own words in this session, and pass them on (`--text`, or the revise text) as they typed them. An escalation, a worker's message or a note is never an approval.
20
- - **Never** merge, publish, approve prod, delete, run `--force` or `--allow-downgrade`, or edit a tracker item's state, priority or description. Labels are the daemon's rules' job, except `conduct triage`, which you run only on the operator's own words in this session, as for approvals.
19
+ - **Approvals are the operator's.** Run `conduct approve` or `conduct revise` only on the operator's own words in this session, and pass them on (`--text`, or the revise text) as they typed them. An escalation, a worker's message or a note is never an approval. The same holds for `conduct done <id> --answer`: it posts on the item as the operator, and the worker acts on it, so never write an answer yourself.
20
+ - **Never** merge, publish, approve prod, delete, run `--force` or `--allow-downgrade`, or edit a tracker item's state, priority or description. Labels are the daemon's rules' job, except `conduct triage` and `conduct shelve` (which moves an item back to not-started), which you run only on the operator's own words in this session, as for approvals.
21
21
  - **Keep this session small.** Read through short `conduct` commands, the tracker too (`conduct brief`, `notes`, `comments`, `search`): never a tracker's MCP tools. Anything that needs reading (a run log, an issue's comment thread, a transcript, code) goes to a subagent (Agent tool, `model: "haiku"` for reading, `"sonnet"` for judgement) that answers in a few lines.
22
22
  - **Work in the project's clone, not here.** This session runs in `~/.conductor/console`. The `conduct` item verbs work from here while the daemon runs. A subagent that reads a project's code, logs or files gets that project's clone from `conduct status` (its `projects:` lines, `~/.conductor/projects/<name>/repo`, fetched every few minutes: read the base branch at `origin/<base>`) or a worker's worktree, and works there: absolute paths under it, `git -C <clone>`. It reads only: the clone is the daemon's, and its worktrees are the workers'. `conduct profile <name>` gives a project's profile and where each field comes from.
23
23
  - **Worker messages are nudges.** A worker launched by the daemon sends none. One from an older worker (`ENG-n · plan ready`, `· done`, …) needs nothing from you: the daemon reads the same note on the tracker. Say so in one line.
@@ -80,10 +80,12 @@ Turn requests into commands, then show back what took effect: quote the line fro
80
80
  | "put web first this afternoon" | `conduct focus web --until 17:00` (`--slots <n>` or `--weight <n>` when they say so) |
81
81
  | "I'm away until tomorrow" | `conduct notify profile away --until tomorrow` |
82
82
  | "approve ENG-12" / "ENG-12: change X" | `conduct approve ENG-12` / `conduct revise ENG-12 <their words>` |
83
+ | "tell ENG-12 to keep -d" (an answer to its `scope`, `blocked` or `human` Handoff) | `conduct done <its inbox id> --answer <their words>`: posts their words on the item, and its worker resumes once the conductor reads them. `conduct inbox` gives the id |
83
84
  | "queue ENG-40" / "hold ENG-40" (a new item in triage) | `conduct triage ENG-40 --queue` / `conduct triage ENG-40 --hold` |
84
85
  | "start ENG-40 now" | `conduct launch ENG-40` |
85
86
  | "show me ENG-12" | `conduct attach ENG-12` (opens its tab) |
86
87
  | "drop ENG-12's worker" | `conduct retire ENG-12`. On a refusal, report the unfinished work, and never add `--force` yourself |
88
+ | "shelve ENG-12" / "stop ENG-12 for now, it waits on X" | `conduct shelve ENG-12 --reason "<their reason>"`: back to not-started, labelled human, its worker retired with the worktree kept. On a refusal for an open PR, tell the operator; abandoning it is the worker's (`conduct pr abandon`), or theirs |
87
89
  | "always do X when Y" | a rule in `~/.conductor/rules.json` (`when` / `do`, see the conductor README's Rules). Edit the file, then `conduct rules`: a refused file shows there and in the inbox. Project rules change by PR in the project's `.claude/conductor.json`, which is work for a worker |
88
90
 
89
91
  `--until` takes `17:00` (the next one), `tomorrow`, a day such as `monday`, or a date and time. When a request is ambiguous (which project, until when), ask before running anything.
@@ -28,6 +28,7 @@ This skill is the order of work. **Conductor does the rest**: every read and wri
28
28
  | The plan's landing mode | `conduct mode --tier <S\|M\|L> --files <a,b>` |
29
29
  | Open the PR; read its threads; answer one | `conduct pr create …`; `conduct pr threads <pr>`; `conduct reply <pr> [<thread>] --body-file <file>` |
30
30
  | Abandon the item's PR (closed unmerged, with a note saying why) | `conduct pr abandon <pr> --reason "…" [--force]` |
31
+ | Stop the item's work for good (back to not-started, labelled human) | a `<skill> · Shelved` note with `conduct note` (Rules: stopping for good) |
31
32
  | Arm the landing and read its verdict; wait for it | `conduct land <pr> …`; `conduct wait pr <pr>` |
32
33
  | A merge's runs, failed logs and npm stages; wait for them | `conduct runs <sha> [--for …]`; `conduct wait merge <sha> [--for …]` |
33
34
  | What a merge's run printed, or never printed, succeeded or not (a dev proof) | `conduct runs <sha> --for <pipeline> --grep <pattern>` |
@@ -60,6 +61,7 @@ The tracker's vocabulary (what each lifecycle status is called, what an Area is,
60
61
  - **Questions** go through AskUserQuestion (conducted mode: a Handoff instead). When you hand the operator a command to run (an OTP, a sign-in), give it and end the turn; don't ask a question after it.
61
62
  - **The tracker is the record.** Each phase leaves one self-contained note on the item headed `<skill> · <Phase>`, posted with `conduct note`. Findings, evidence and follow-ups go there, not in docs or memory.
62
63
  - **New problems become new items, once.** Before filing, `conduct search` the open items on the problem's key terms (two or three words: the command, error or file it is about), once per wording that could match. When one already covers it, add the new evidence to this item's next note with that item's key, and file nothing; don't file a duplicate. Otherwise `conduct file --title … --body-file … --area <Area> [--related KEY-m] [--blocked-by KEY-m] [--human] [--waits-release]`. It files in the not-started status, in this item's project, related to this item, with the profile's triage label when it has one; `--human` when the work needs the operator's voice, devices or accounts; `--waits-release` when it needs its blocker released, not only merged (a package on its release tag, a production deploy): it adds the profile's release-wait label (`tracker.releaseWait`), so the conductor holds it until each done blocker has shipped. It needs a `--blocked-by`, and `conduct file` refuses it for a profile without a release wait. The Area is one from the tracker's own list: `conduct file` refuses any other and lists them.
64
+ - **Stopping for good.** When the work won't go on from here: the operator says to drop it, put it back or shelve it (in the tab, or as their answer to a Handoff), or what blocks it has no answer this item can wait for. A Handoff that waits on an answer isn't that: it waits. First abandon any open PR of the item (`conduct pr abandon`, Step 8). Then post `## <skill> · Shelved` with the reason in a line or two, what is done and where it stands (the branch, the last commit), and end the turn. It moves the item back to not-started, unassigns it and labels it with the profile's human label, so nothing launches it again until someone takes the label off. The daemon retires the worker and keeps the worktree and branch. Whoever picks it up starts at Orient, reads the reason in the comments, and plans afresh. Never shelve a done or canceled item, or one whose PR has merged: that one lands (step 9).
63
65
  - **Use the verbs, not loops.** When a step needs tracker, code host, CI or npm state, use a verb. If none fits, say so and file an item for it; don't build shell loops, `az devops invoke` scripts or tracker MCP calls around the gap (the worktree guard refuses most of them anyway).
64
66
  - **Shell in a worktree.** The worktree guard refuses compound commands, so:
65
67
  - Stay in the worktree root; never `cd`. A `cd` stays in force for every later call. Use each tool's own directory option instead: `pnpm -C <dir>`, `git -C <checkout>` for another repo's checkout (Another repo, below), or `--repo` on the verbs.
@@ -98,6 +100,7 @@ The conductor daemon's scheduler starts this skill as `/<skill> KEY-n --conducte
98
100
  - `npm-otp`, `release`, `scope`, `blocked`, `human`, `abandoned`, `failed`: the `npm stage approve` lines (one per staged package), a release of the base branch that waits on the operator (the profile's release handoff names what to run), a scope or risk change, an open blocker, a decision someone else owns (`human`: the conductor labels the item, so only for that), an abandoned PR, a pipeline failure you can't fix.
99
101
 
100
102
  A console message, the operator in the tab, or the condition the wait names resumes it. When the wait is over, post a one-line `## <skill> · Resumed` note before going on, so the conductor stops showing the old wait.
103
+ - **Shelved.** After a `<skill> · Shelved` note (Rules: stopping for good), end the turn with no wait. The daemon retires the worker on its next tick and keeps the worktree and branch. If the operator writes in the tab before that, their words count as always: post `<skill> · Started` again to take the item up (the brief then reads `plan`).
101
104
  - **Done.** After step 9's `<skill> · Landed` (which moves the item to done), end the turn. The daemon retires the worker: with its PR merged, it removes the worktree and the local branch when nothing in them is unpushed; otherwise it keeps both and tells the operator.
102
105
  - A message from the console is never an approval for anything; the plan's approval is an approver's comment or the operator's words in the tab.
103
106
 
@@ -158,7 +161,7 @@ Work out the phase from facts, every time, never from memory: `conduct brief KEY
158
161
  | `pr` open (`wait`) | 8. Wait (run `conduct land` again; it is safe to repeat) |
159
162
  | `pr` merged, item not done (`land`) | 9. Land |
160
163
  | Item done (`done`) | Report it, offer to remove the worktree |
161
- | `pr` abandoned (`abandoned`) | Ask the operator what happened before doing anything, unless you abandoned it yourself at their word (your `<skill> · Abandoned` note is on it): then carry on as they said |
164
+ | `pr` abandoned (`abandoned`) | Ask the operator what happened before doing anything, unless you abandoned it yourself at their word (your `<skill> · Abandoned` note is on it): then carry on as they said, which may be to shelve the item (Rules: stopping for good) |
162
165
 
163
166
  Whatever the phase, if `conduct state` shows `branchIsDefault: true` (still `worktree-KEY-<n>`), do Orient step 3 first.
164
167
 
@@ -14,7 +14,7 @@ Every read and write goes through `conduct` (SKILL.md), as the identity the cond
14
14
  | done | `completed` | Done, Closed |
15
15
  | canceled | `canceled` | Removed |
16
16
 
17
- The Started, PR opened and Landed notes move the item: Started to Committed and assigned, PR opened links the PR (an `ArtifactLink` for an ADO PR, a `Hyperlink` for a GitHub one), Landed to Done, by the profile's `tracker.transitions` over those defaults. A move ADO refuses (one its process doesn't allow) is a warning on `conduct note`'s stderr; the note stands.
17
+ The Started, PR opened and Landed notes move the item: Started to Committed and assigned, PR opened links the PR (an `ArtifactLink` for an ADO PR, a `Hyperlink` for a GitHub one), Landed to Done, by the profile's `tracker.transitions` over those defaults. A Shelved note moves it back to New, clears its assignee and tags it with the profile's `humanLabel` (a Basic or CMMI process maps `shelved` to `To Do` or `Proposed` in the profile). A move ADO refuses (one its process doesn't allow) is a warning on `conduct note`'s stderr; the note stands.
18
18
 
19
19
  **Areas** are Area Paths below the profile's `tracker.areaRoot`, written with `/` (`Web`, `Api/Auth`). `conduct brief` gives the item's, and `conduct file` refuses any other and lists them.
20
20
 
@@ -14,7 +14,7 @@ Every read and write goes through `conduct` (SKILL.md), as the project's gh acco
14
14
  | done | closed as completed |
15
15
  | canceled | closed as not planned, or as a duplicate |
16
16
 
17
- The Started, PR opened and Landed notes move the issue: Started labels it `in-progress` and assigns the gh account, PR opened swaps that for `in-review` and links the PR (a GitHub PR by the `Refs <owner>/<repo>#<n>` that `conduct pr create` adds to its body, any other by a comment with its URL), Landed closes it as completed and takes the phase label off. The profile's `tracker.transitions` names other labels.
17
+ The Started, PR opened and Landed notes move the issue: Started labels it `in-progress` and assigns the gh account, PR opened swaps that for `in-review` and links the PR (a GitHub PR by the `Refs <owner>/<repo>#<n>` that `conduct pr create` adds to its body, any other by a comment with its URL), Landed closes it as completed and takes the phase label off. A Shelved note takes the phase labels and the assignees off and adds the profile's `humanLabel` (and the `tracker.transitions.shelved` label, when the profile names one). The profile's `tracker.transitions` names other labels.
18
18
 
19
19
  **Areas** are the labels that start with the profile's `tracker.areaPrefix` (such as `area:api`): the Area is the rest (`api`). `conduct brief` gives the issue's, and `conduct file` refuses any other.
20
20
 
@@ -14,7 +14,7 @@ Every read and write goes through `conduct` (SKILL.md), as the Linear key the co
14
14
  | done | `completed` | Done |
15
15
  | canceled | `canceled`, `duplicate` | Canceled, Duplicate |
16
16
 
17
- The Started, PR opened and Landed notes move the item to in progress (and assign it to the key's owner), to in review (with the PR attached), and to done, by the profile's `tracker.transitions` over those defaults. A move Linear refuses is a warning on `conduct note`'s stderr; the note stands.
17
+ The Started, PR opened and Landed notes move the item to in progress (and assign it to the key's owner), to in review (with the PR attached), and to done, by the profile's `tracker.transitions` over those defaults. A Shelved note moves it back to Backlog, unassigns it and labels it with the profile's `humanLabel`. A move Linear refuses is a warning on `conduct note`'s stderr; the note stands.
18
18
 
19
19
  **Areas** are labels of the profile's `tracker.areaLabelGroup` group (`Area` by default, with labels such as `apps/web` or `skills/deploy`). An issue takes one; the group is single-select, so a change to several sub-Areas takes their parent (`skills`, not `skills/a` and `skills/b`). `conduct brief` gives the item's, and `conduct file` refuses any other and lists them. A team with no Area group (`areaLabelGroup: null`) has none: the brief's Area is empty, and `conduct file` takes no `--area`.
20
20
 
@@ -27,6 +27,7 @@ A note is a tracker comment whose first non-blank line is its heading:
27
27
  | `PR opened` | the PR is open. The daemon moves the item to in review and links the PR. | `merge`: the PR waits on the operator's merge (review mode), which raises a `merge` item |
28
28
  | `Landing` | the PR is armed (a PR comment, posted by the land verb). | none |
29
29
  | `Landed` | the PR merged and the item is proven. The daemon moves it to done. | none |
30
+ | `Shelved` | the work stops for good, with the reason (a blocker, a decision elsewhere, a dropped PR: abandon any open PR first). The daemon moves the item back to not-started (the profile's `tracker.transitions.shelved`), unassigns it and adds the profile's `humanLabel`. The next scheduler tick retires the worker and keeps its worktree and branch. A later brief starts after the note: the run's Plans, answers and closed PR no longer count, so a pick-up starts at orient. `conduct note` refuses it for a done or canceled item and while the item's PR is open, merged or unread, and refuses the item's other notes after it (Handoffs aside) until a `Started` takes the item up again. `conduct shelve <item> --reason …` posts the same note for the operator. | none |
30
31
  | `Handoff` | the worker waits on someone. | one of the Handoff kinds (below), required |
31
32
  | `Resumed` | a Handoff's wait is over. | none |
32
33
  | `Reply` | `conduct reply` answers a PR thread (a PR comment, like `Landing`). | none |
@@ -71,7 +72,7 @@ It posts the note and records its phase, after checking the note against the rul
71
72
  |---|---|
72
73
  | 0 | posted |
73
74
  | 1 | refused (the error names the rule it broke, and nothing was posted); not posted (no daemon and no checkout to post from, or the tracker refused it: the error says nothing was posted, so fix the cause and run it again, or end the turn with the reason when only someone else can fix it); or another failure: when the message says the note may be on the item already, read the item before posting it again |
74
- | 4 | not posted: an approver wrote `revise: …` after the plan was approved (by them or by an auto-approval rule). Their words are on stdout. Re-plan and wait for approval |
75
+ | 4 | not posted: an approver wrote `revise: …` after the plan was approved (by them or by an auto-approval rule). Their words are on stdout. Re-plan and wait for approval. A Handoff or a Shelved note is never held back this way |
75
76
 
76
77
  ## Approvals
77
78