spur-board 0.70.0 → 0.71.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { Q as ERRORS, c as tokenRequestStatusSchema, et as errorContextSchema, g as renderJsonError, o as tokenRequestResultSchema, rt as successEnvelopeSchema, tt as errorEnvelopeSchema } from "./chunk-BBfFVeh3.mjs";
1
+ import { Q as ERRORS, c as tokenRequestStatusSchema, et as errorContextSchema, g as renderJsonError, o as tokenRequestResultSchema, rt as successEnvelopeSchema, tt as errorEnvelopeSchema } from "./chunk-BPwdLTBv.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { z } from "zod";
4
4
  import { request } from "node:http";
@@ -1824,6 +1824,9 @@ const EVENT_KINDS = [
1824
1824
  "task_shadow_moved",
1825
1825
  "task_corrected",
1826
1826
  "dispatcher_mode_changed",
1827
+ "turn_opened",
1828
+ "turn_taken",
1829
+ "turn_closed",
1827
1830
  "block_opened",
1828
1831
  "block_escalated",
1829
1832
  "block_unblocked",
@@ -1995,6 +1998,21 @@ const eventPayloadSchemas = {
1995
1998
  from: z.enum(DISPATCHER_MODES),
1996
1999
  to: z.enum(DISPATCHER_MODES)
1997
2000
  }),
2001
+ /** `addressee` is the turn's executor; an empty `reason` is kept rather than refused. */
2002
+ turn_opened: z.looseObject({
2003
+ turn: S,
2004
+ column: z.enum(COLUMN_IDS),
2005
+ addressee: role,
2006
+ reason: z.string()
2007
+ }),
2008
+ turn_taken: z.looseObject({
2009
+ turn: S,
2010
+ taker: actorIdSchema
2011
+ }),
2012
+ turn_closed: z.looseObject({
2013
+ turn: S,
2014
+ outcome: z.enum(TURN_OUTCOMES)
2015
+ }),
1998
2016
  block_opened: z.looseObject({
1999
2017
  block: S,
2000
2018
  type: z.enum(BLOCK_TYPES),
@@ -1,5 +1,5 @@
1
- import { d as buildCatalogSnapshot, dt as configSchema, p as OPERATIONS, pt as plainHttpAllowed } from "./chunk-BBfFVeh3.mjs";
2
- import { o as CliError, t as fetchCatalogVersion } from "./chunk-BxDheuT8.mjs";
1
+ import { d as buildCatalogSnapshot, dt as configSchema, p as OPERATIONS, pt as plainHttpAllowed } from "./chunk-BPwdLTBv.mjs";
2
+ import { o as CliError, t as fetchCatalogVersion } from "./chunk-B1u_eWSX.mjs";
3
3
  import { randomUUID } from "node:crypto";
4
4
  import { closeSync, constants, fstatSync, lstatSync, mkdirSync, openSync, readFileSync, realpathSync, renameSync, statSync, unlinkSync, writeFileSync } from "node:fs";
5
5
  import { homedir } from "node:os";
package/dist/cli.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { Q as ERRORS, _t as SLACK_BOT_SCOPES, a as requestHashOf, dt as configSchema, f as roleCanUseOperation, mt as requiredSecretKeys, p as OPERATIONS, q as actorIdSchema, r as remoteDoctorReportSchema, rt as successEnvelopeSchema, u as SYSTEMD_SERVICE_SETTINGS } from "./chunk-BBfFVeh3.mjs";
1
+ import { Q as ERRORS, _t as SLACK_BOT_SCOPES, a as requestHashOf, dt as configSchema, f as roleCanUseOperation, mt as requiredSecretKeys, p as OPERATIONS, q as actorIdSchema, r as remoteDoctorReportSchema, rt as successEnvelopeSchema, u as SYSTEMD_SERVICE_SETTINGS } from "./chunk-BPwdLTBv.mjs";
2
2
  import { t as apiBaseUrl } from "./chunk-DAMwWWmT.mjs";
3
- import { a as requestTokenEnrollment, c as renderCliError, i as requestSkillReload, l as escapeTerminalControls, n as fetchTokenStatus, o as CliError, r as requestOperation, s as errorExitCode } from "./chunk-BxDheuT8.mjs";
4
- import { a as memoryVerdictCache, c as loadClientConfig, d as resolveDaemonAddress, f as tokenInFolder, i as fileVerdictCache, l as loadEnrollmentConfig, n as cliPackageVersion, o as configFile, s as dataDirectory, t as checkCatalog, u as readConfiguredPort } from "./chunk-CmoLxaIV.mjs";
3
+ import { a as requestTokenEnrollment, c as renderCliError, i as requestSkillReload, l as escapeTerminalControls, n as fetchTokenStatus, o as CliError, r as requestOperation, s as errorExitCode } from "./chunk-B1u_eWSX.mjs";
4
+ import { a as memoryVerdictCache, c as loadClientConfig, d as resolveDaemonAddress, f as tokenInFolder, i as fileVerdictCache, l as loadEnrollmentConfig, n as cliPackageVersion, o as configFile, s as dataDirectory, t as checkCatalog, u as readConfiguredPort } from "./chunk-DlDngVbH.mjs";
5
5
  import { createHash, randomBytes, randomUUID } from "node:crypto";
6
6
  import { accessSync, chmodSync, closeSync, constants, cpSync, existsSync, ftruncateSync, lstatSync, mkdirSync, openSync, readFileSync, readdirSync, readlinkSync, realpathSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync, writeSync } from "node:fs";
7
7
  import { homedir, hostname, userInfo } from "node:os";
package/dist/client.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { a as requestTokenEnrollment, i as requestSkillReload, n as fetchTokenStatus, r as requestOperation, t as fetchCatalogVersion } from "./chunk-BxDheuT8.mjs";
1
+ import { a as requestTokenEnrollment, i as requestSkillReload, n as fetchTokenStatus, r as requestOperation, t as fetchCatalogVersion } from "./chunk-B1u_eWSX.mjs";
2
2
  export { fetchCatalogVersion, fetchTokenStatus, requestOperation, requestSkillReload, requestTokenEnrollment };
package/dist/daemon.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as err, A as prSourceId, B as prFactsSchema, C as userIdSchema, D as AdapterError, E as eventPayloadSchemas, F as REVIEW_STATES, G as JIRA_PROJECT_KEY, H as ringMarker, I as SESSION_HEALTH_STATES, J as encodeActorId, K as REF_NUMBER, L as SESSION_STATUSES, M as sourceCursorSchema, N as trackerSourceId, O as batchSchema, P as PR_STATES, Q as ERRORS, R as isExternalAuthor, S as messageRefSchema, T as GATE_REASONS, U as sessionFactsSchema, V as prRefSchema, W as ticketFactsSchema, X as parseActorId, Y as errorCodeOf, Z as parseRef$1, _t as SLACK_BOT_SCOPES, a as requestHashOf, at as DEFAULT_LINK, b as inboundEventSchema, c as tokenRequestStatusSchema, ct as RESERVED_PROJECT, d as buildCatalogSnapshot, dt as configSchema, f as roleCanUseOperation, ft as defaultAddressee, gt as DISPATCHER_MODES, h as renderHttpProblem, ht as COLUMN_IDS, i as TOKEN_REQUEST_LIMITS, j as sessionTransitionSchema, k as entityRefSchema, l as BOARD_TICK_MS, lt as boardWideSpurProject, m as turnHandedSchema, mt as requiredSecretKeys, n as doctorReportSchema, nt as ok, o as tokenRequestResultSchema, p as OPERATIONS, pt as plainHttpAllowed, q as actorIdSchema, rt as successEnvelopeSchema, s as tokenRequestSchema, st as DEFAULT_SLACK_COMMAND, t as assertNever, ut as configBindings, v as SPACE_IDS, vt as TASK_HOLDS, w as EVENT_KINDS, x as interactionRefSchema, y as conversationRefSchema, z as parseRingMarker } from "./chunk-BBfFVeh3.mjs";
1
+ import { $ as err, A as prSourceId, B as prFactsSchema, C as userIdSchema, D as AdapterError, E as eventPayloadSchemas, F as REVIEW_STATES, G as JIRA_PROJECT_KEY, H as ringMarker, I as SESSION_HEALTH_STATES, J as encodeActorId, K as REF_NUMBER, L as SESSION_STATUSES, M as sourceCursorSchema, N as trackerSourceId, O as batchSchema, P as PR_STATES, Q as ERRORS, R as isExternalAuthor, S as messageRefSchema, T as GATE_REASONS, U as sessionFactsSchema, V as prRefSchema, W as ticketFactsSchema, X as parseActorId, Y as errorCodeOf, Z as parseRef$1, _t as SLACK_BOT_SCOPES, a as requestHashOf, at as DEFAULT_LINK, b as inboundEventSchema, c as tokenRequestStatusSchema, ct as RESERVED_PROJECT, d as buildCatalogSnapshot, dt as configSchema, f as roleCanUseOperation, ft as defaultAddressee, gt as DISPATCHER_MODES, h as renderHttpProblem, ht as COLUMN_IDS, i as TOKEN_REQUEST_LIMITS, j as sessionTransitionSchema, k as entityRefSchema, l as BOARD_TICK_MS, lt as boardWideSpurProject, m as turnHandedSchema, mt as requiredSecretKeys, n as doctorReportSchema, nt as ok, o as tokenRequestResultSchema, p as OPERATIONS, pt as plainHttpAllowed, q as actorIdSchema, rt as successEnvelopeSchema, s as tokenRequestSchema, st as DEFAULT_SLACK_COMMAND, t as assertNever, ut as configBindings, v as SPACE_IDS, vt as TASK_HOLDS, w as EVENT_KINDS, x as interactionRefSchema, y as conversationRefSchema, z as parseRingMarker } from "./chunk-BPwdLTBv.mjs";
2
2
  import { t as apiBaseUrl } from "./chunk-DAMwWWmT.mjs";
3
3
  import { createRequire } from "node:module";
4
4
  import { createHash, randomUUID } from "node:crypto";
@@ -11317,6 +11317,7 @@ function listenApiServer(app, port) {
11317
11317
  //#region ../core/src/app/turns.ts
11318
11318
  const handedSchema = z.array(turnHandedSchema);
11319
11319
  const turnItemKey = (turnId) => `turn:${String(turnId)}`;
11320
+ const turnRef = (turnId) => `T${String(turnId)}`;
11320
11321
  /**
11321
11322
  * Who executes a column's turn: its orchestrator project, the operator, or for a column with
11322
11323
  * no orchestrator the live worker, else the operator.
@@ -11369,6 +11370,12 @@ async function openTurn(trx, input) {
11369
11370
  created_at: at.toISOString(),
11370
11371
  head_sha: snapshot?.head_sha.toLowerCase() ?? null
11371
11372
  }).returningAll().executeTakeFirstOrThrow();
11373
+ await emit(trx, "turn_opened", task.project, task.id, turn.created_at, {
11374
+ turn: turnRef(turn.id),
11375
+ column: turn.column,
11376
+ addressee: turn.role,
11377
+ reason: turn.reason
11378
+ });
11372
11379
  if (role === "operator") await raiseItem(trx, {
11373
11380
  itemKey: turnItemKey(turn.id),
11374
11381
  kind: "turn",
@@ -11412,6 +11419,10 @@ async function takeTurn(trx, input) {
11412
11419
  acked_at: at.toISOString()
11413
11420
  }).where("id", "=", turnId).execute();
11414
11421
  await trx.updateTable("notification").set({ acked_at: at.toISOString() }).where("turn_id", "=", turnId).where("kind", "=", "turn_reminder").where("acked_at", "is", null).where("exhausted_at", "is", null).execute();
11422
+ await emit(trx, "turn_taken", (await trx.selectFrom("task").select("project").where("id", "=", turn.task_id).executeTakeFirstOrThrow()).project, turn.task_id, at.toISOString(), {
11423
+ turn: turnRef(turnId),
11424
+ taker: actor
11425
+ }, actor);
11415
11426
  return true;
11416
11427
  }
11417
11428
  /**
@@ -11424,7 +11435,13 @@ async function closeTurns(trx, input) {
11424
11435
  closed_at: at.toISOString(),
11425
11436
  closed_reason: reason
11426
11437
  }).where("task_id", "=", taskId).where("closed_at", "is", null).returning("id").execute();
11438
+ if (closed.length === 0) return;
11439
+ const task = await trx.selectFrom("task").select("project").where("id", "=", taskId).executeTakeFirstOrThrow();
11427
11440
  for (const { id } of closed) {
11441
+ await emit(trx, "turn_closed", task.project, taskId, at.toISOString(), {
11442
+ turn: turnRef(id),
11443
+ outcome: reason
11444
+ });
11428
11445
  await closeTurnNotification(trx, id, at);
11429
11446
  const item = await trx.selectFrom("operator_item").select("id").where("item_key", "=", turnItemKey(id)).where("cleared_at", "is", null).executeTakeFirst();
11430
11447
  if (item !== void 0) await clearItem(trx, item.id, at);
@@ -16254,6 +16271,29 @@ async function taskTurns(trx, task, detail) {
16254
16271
  turns
16255
16272
  };
16256
16273
  }
16274
+ /** The summary of a turn open, take or close: the turn, its executor, taker or outcome. */
16275
+ function turnSummary(kind, payloadText) {
16276
+ try {
16277
+ if (kind === "turn_opened") {
16278
+ const payload = eventPayloadSchemas[kind].safeParse(JSON.parse(payloadText));
16279
+ if (!payload.success) return null;
16280
+ const { turn, column, addressee } = payload.data;
16281
+ const reason = payload.data.reason.replace(/\s+/g, " ").trim();
16282
+ return `Turn ${turn} opened in ${column} for ${addressee}${reason === "" ? "" : `: ${reason}`}`;
16283
+ }
16284
+ if (kind === "turn_taken") {
16285
+ const payload = eventPayloadSchemas[kind].safeParse(JSON.parse(payloadText));
16286
+ return payload.success ? `Turn ${payload.data.turn} taken by ${payload.data.taker}` : null;
16287
+ }
16288
+ if (kind === "turn_closed") {
16289
+ const payload = eventPayloadSchemas[kind].safeParse(JSON.parse(payloadText));
16290
+ return payload.success ? `Turn ${payload.data.turn} closed: ${payload.data.outcome}` : null;
16291
+ }
16292
+ return null;
16293
+ } catch {
16294
+ return null;
16295
+ }
16296
+ }
16257
16297
  //#endregion
16258
16298
  //#region ../core/src/app/task-sessions.ts
16259
16299
  /** Current facts of the effective session links that task.get exposes. */
@@ -16342,6 +16382,9 @@ const EVENT_SUMMARIES = {
16342
16382
  task_shadow_moved: "Shadow move",
16343
16383
  task_corrected: "Column corrected by the operator",
16344
16384
  dispatcher_mode_changed: "Dispatcher mode changed",
16385
+ turn_opened: "Turn opened",
16386
+ turn_taken: "Turn taken",
16387
+ turn_closed: "Turn closed",
16345
16388
  block_opened: "Block opened",
16346
16389
  block_escalated: "Block escalated",
16347
16390
  block_unblocked: "Block unblocked",
@@ -16548,7 +16591,7 @@ function createTaskQueries(deps) {
16548
16591
  at: row.at,
16549
16592
  kind,
16550
16593
  actor: eventActor(row),
16551
- summary: linkOrEscalationSummary(kind, row.payload) ?? shadowSummary(kind, row.payload) ?? submitSummary(kind, row.payload) ?? EVENT_SUMMARIES[kind]
16594
+ summary: linkOrEscalationSummary(kind, row.payload) ?? shadowSummary(kind, row.payload) ?? submitSummary(kind, row.payload) ?? turnSummary(kind, row.payload) ?? EVENT_SUMMARIES[kind]
16552
16595
  }];
16553
16596
  });
16554
16597
  return {
package/dist/mcp.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { Q as ERRORS, _ as renderMcpError, p as OPERATIONS } from "./chunk-BBfFVeh3.mjs";
2
- import { o as CliError, r as requestOperation } from "./chunk-BxDheuT8.mjs";
3
- import { a as memoryVerdictCache, c as loadClientConfig, r as compareCatalogs, t as checkCatalog } from "./chunk-CmoLxaIV.mjs";
1
+ import { Q as ERRORS, _ as renderMcpError, p as OPERATIONS } from "./chunk-BPwdLTBv.mjs";
2
+ import { o as CliError, r as requestOperation } from "./chunk-B1u_eWSX.mjs";
3
+ import { a as memoryVerdictCache, c as loadClientConfig, r as compareCatalogs, t as checkCatalog } from "./chunk-DlDngVbH.mjs";
4
4
  import { randomUUID } from "node:crypto";
5
5
  import { readFileSync } from "node:fs";
6
6
  import { z } from "zod";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spur-board",
3
- "version": "0.70.0",
3
+ "version": "0.71.0",
4
4
  "license": "MIT",
5
5
  "engines": {
6
6
  "node": "^24.12.0 || ^26.0.0"
@@ -0,0 +1,19 @@
1
+ # Blocks and escalation
2
+
3
+ ## Blocks and escalation
4
+
5
+ A question (`needs_input`): column orchestrator, else curator, else
6
+ operator. Routing avoids asking yourself; curators ask the operator.
7
+
8
+ A `code` block goes to the worker; `dependency` or `external` block stays with
9
+ its author's role. Escalation: column orchestrator to curator to
10
+ operator; other blocks escalate straight to the operator. Keyed
11
+ `board escalate <block>` if its addressee cannot resolve it.
12
+
13
+ Taskless: all roles, operator only:
14
+ `board project ask <project> <text> --to operator --key <key>`.
15
+ Project `needs_input` blocks get Slack threads except operator-agent asks;
16
+ operator: `board inbox`, keyed `board answer`. Answers reach a current curator session; other roles use the asking session.
17
+
18
+ `projects[].columns[].orchestrator`, `projects[].spurProjects[].role`,
19
+ `operator.slack`.
@@ -0,0 +1,66 @@
1
+ # Columns and executors
2
+
3
+ ## Columns and executors
4
+
5
+ `todo`, `ready-for-dev`, `dev`, `review`, `product-review`,
6
+ `external-review`, `qa`, `ready-to-merge`, `done`.
7
+ `projects[].columns[].enabled`: disabled/omitted columns skip gates;
8
+ To Do, Dev, Done stay enabled.
9
+
10
+ Each column has one executor: `projects[].columns[].orchestrator`:
11
+ `none` (live worker, else operator), `operator`, or project with role
12
+ `orchestrator` or `curator`. The worker owns the code and branch; others inspect/return, never push.
13
+
14
+ `projects[].spurProjects[].role` accepts `worker`, `operator`, `curator` and
15
+ `orchestrator`.
16
+
17
+ Top-level `spurProjects[].columns` fills `none` columns board-wide;
18
+ `role: operator` there serves operatorless projects, one session acting in
19
+ each. A project-level binding wins.
20
+
21
+ ## Gates and placement
22
+
23
+ Facts (head, checks, reviews, comments, ticket, sessions) feed gates; two actions: move the task and open an executor turn (at most one
24
+ per evaluation). Turns follow unmet entry gates, actionable post-submit failures,
25
+ rerouting or Done wrap-up. Holds and existing turns can yield neither action.
26
+
27
+ Moves, turns and course checks need `projects[].dispatcher.mode: on`;
28
+ default is `shadow`: no doorbells or blocks.
29
+
30
+ Gates are cumulative: each column checks its enabled gate and those to its left. At a turn boundary, failed gates return to the leftmost failing
31
+ column. Taken turns hold until submit, return or a new head. Pending CI, unknown
32
+ mergeability and incomplete comment history are waits. Downstream handoff waits
33
+ for settled prerequisites; Dev can receive a repair turn.
34
+
35
+ Dev needs an open non-draft PR, passing checks, no conflict, handled
36
+ feedback, comment history and current-head submit. Feedback excludes
37
+ bots, approvals and `projects[].operatorGithubLogin` (agents' account), so worker
38
+ thread replies never count; others' posts do.
39
+ The repo owner's and the human operator's own accounts count too, unless one is
40
+ that login: a PR comment is a change request; talk to agents in Slack
41
+ (`@shortName`) or the Board. A review-thread reply is a new review. An approval
42
+ hides its inline comments; thread resolution and the head a comment was left on
43
+ change nothing for feedback. Bots (GitHub Apps) neither return a task, approve it nor block
44
+ an approval; their threads still count. Handled means handed by ID to a Dev turn, not answered; in shadow
45
+ mode, a later submit in Dev or an executor `none` column handles it.
46
+ An edit after the hand makes it unhandled again, returning a task right of Dev.
47
+ A status comment whose last line is a hidden `board-reviewer-progress` or
48
+ `board-reviewer-unavailable` marker is not external feedback. No required checks: non-skipped count. `projects[].reposWithoutCi` waives absent checks
49
+ for listed repos; never failed/skipped required ones.
50
+
51
+ Review and Product Review need current-head internal review marks, separate from
52
+ External Review's external approval. QA: current-head submit; Ready to Merge awaits merge. Executor `none` may reuse same-head submits of other worker columns. Fixed gate rules have no configuration switch
53
+ except enabled columns, no-CI and resolved threads.
54
+
55
+ `projects[].columns[].requireResolvedThreads` (default: `ready-to-merge` only)
56
+ gates that column and those right of it: an unresolved review thread, outdated
57
+ or by anyone, returns the task to Dev, whose turn lists each thread link. The
58
+ worker fixes or answers, then resolves each; reviewers never do. A
59
+ Dev submit on the same head moves right, keeping marks and approval. An
60
+ approval's inline notes are threads; it still passes External Review.
61
+
62
+ Review/Product Review mark lasts across visits on the current head. A visit
63
+ submission belongs to one column visit; moving left clears it and those to the right. New heads invalidate internal Review and Product Review marks.
64
+
65
+ PR closed without merge with no open PR, or closed
66
+ ticket with live work and no merged PR. `board status` lists them as operator block threads.
@@ -0,0 +1,6 @@
1
+ # Done follows the ticket
2
+
3
+ ## Done follows the ticket
4
+
5
+ One linked PR merging does not by itself finish the task. Done: `projects[].tracker.doneStatuses` for Jira; for GitHub, the Issue must be
6
+ closed. If still open, link another PR.
@@ -0,0 +1,26 @@
1
+ # Slack now
2
+
3
+ ## Slack now
4
+
5
+ `slack.channels.feed`: curator answers and operator items,
6
+ except delivery/health/ended-worker items and blocks.
7
+ `slack.channels.orchestrators`: block threads addressed to the operator by
8
+ others. Answer in the existing block thread.
9
+
10
+ ## Slack addressing
11
+
12
+ With a `projects[].spurProjects[].shortName`, `spurProjects[].shortName` or
13
+ board-wide operator, a new operator message in
14
+ `slack.channels.orchestrators` starts a conversation. A leading registered
15
+ `@shortName` selects that Spur project and is stripped. With absent or unknown
16
+ leading name, complete text, retaining any
17
+ unknown prefix, goes to `slack.defaultAddressee`, else board-wide operator, else
18
+ first project with an operator; else Board replies once with the valid prefixes.
19
+ Middle mentions or Slack `<@U…>` address nobody; unknown names cause no lookup
20
+ error. The operator checks short-name collisions with workspace names.
21
+ A task key after the prefix attaches it.
22
+
23
+ Read `board inbox`; reply via `board answer`. Each operator thread message rings again; `close` or ✅ in the
24
+ thread closes it. Replies use `projects[].spurProjects[].displayName` and `icon`, top-level ones too,
25
+ else project name and role icon (`board` for operator). No session:
26
+ `board status` lists it as waiting.
@@ -0,0 +1,67 @@
1
+ # Turns and delivery
2
+
3
+ ## Turns and delivery
4
+
5
+ A turn `T<number>`: keyed `board inbox ack <entries>`.
6
+ Only the acknowledging session may submit or return: keyed
7
+ `board submit <turn> <sha>` accepts the head; keyed
8
+ `board return <turn> <reason>` sends findings to Dev. In
9
+ shadow mode, use keyed `board submit <task> <sha>`.
10
+ Unseen heads answer `pending`: that submit is final; do not resubmit or raise a
11
+ block. Confirm timeout: `projects[].dispatcher.submitConfirmMs`.
12
+
13
+ A new head closes taken turns outside Dev; taken Dev turns survive pushes.
14
+ Right of Dev, red CI, a draft, a conflict, an external comment or an unresolved
15
+ thread where required returns the task to Dev at once, unless a turn is taken; then after its submit or return.
16
+ The Dev turn hands the comments, beside a return's `code` block.
17
+ Each handed entry has its `url`, `editedAt` once edited, and a review's inline
18
+ `comments` with `url` and `threadId`. Turns of a Dev visit opened by a return
19
+ show `returned`: who, from, the turn, the `code` block and the verbatim reason.
20
+
21
+ Closed turns receive no further Board sends; Obsolete queued rings are dropped;
22
+ a message already accepted by Spur cannot be retracted. Check `board inbox` and
23
+ act only on a current turn; reread after `turn_closed`.
24
+ Task history (`board task history <task>`) shows journal events `turn_opened`,
25
+ `turn_taken` and `turn_closed`: executor, taker, outcome.
26
+
27
+ Open-turn executors in `needs_input`, `error`, `rate_limited` or `stopped` raise
28
+ one question after `health.turnStallAfterMs` (default 600000): curator unless self, else
29
+ operator. Time starts at the later turn/state start; taking never resets it.
30
+ One frozen explanation/dismissal per turn/session/state episode. Recovery,
31
+ replacement, removal, archive or turn closure withdraws it. Blind Spur opens none,
32
+ holds existing; gaps restart timing for new questions.
33
+
34
+ ## Doorbells
35
+
36
+ A turn opened for you by your own confirmed submit or return is first rung only after `doorbells.firstRetryMs`; a turn opened for you any other way rings at once.
37
+
38
+ A doorbell expects action: read `board inbox` for the turn, addressed
39
+ block, answer or follow-up. Ordinary task comments do not ring; nor does a block
40
+ tracked by its author role ring itself.
41
+
42
+ Repeat up to three delivered rings;
43
+ acknowledgement stops them. Removal notices and quiet-turn reminders ring once.
44
+ Busy recipients defer delivery; pending delivery or earlier rings in the Spur
45
+ queue defer repeats. Queues can exhaust their waiting window.
46
+
47
+ Most notices await recipients; taskless worker, orchestrator and operator-agent
48
+ answers end without a live asking session. Curator and course-check orchestrator
49
+ questions fall back to operator. Operator conversations await their project.
50
+ Exhaustion alerts the operator, except removals and quiet-turn reminders;
51
+ curator questions move to operator.
52
+
53
+ ## Course checks and cycle limits
54
+
55
+ `projects[].columns[].courseCheck` defaults to 3 returns to Dev;
56
+ `courseCheck: 0` disables it. `projects[].columns[].cycleLimit` defaults to 10 and
57
+ takes priority. Executor returns and external comments (a changes-requested
58
+ review is one) count, as do thread returns; CI failures, conflicts and drafts alone do not count, nor
59
+ reopened tickets or mode switches.
60
+
61
+ If returns keep hitting the same mechanism, fix the bug class once; cover its variants with one table test. Put remaining edges with no user-visible effect under Risk in the PR description. Still fix P0/P1 and user-visible findings in this PR.
62
+ `projects[].columns[].courseCheckTo`: `operator`, curator or column orchestrator.
63
+ Default: curator (`projects[].spurProjects[].role`), else operator. An answer
64
+ resets the course count and reaches the worker as a task comment. Only the
65
+ operator can resolve the separate cycle limit and reset its count. With no live
66
+ session it falls back to the operator; a live conductor that does not
67
+ answer keeps the question.
@@ -1,178 +1,9 @@
1
1
  # How the Board works
2
2
 
3
- ## Columns and executors
3
+ Choose the topic for the decision or action in front of you:
4
4
 
5
- `todo`, `ready-for-dev`, `dev`, `review`, `product-review`,
6
- `external-review`, `qa`, `ready-to-merge`, `done`.
7
- `projects[].columns[].enabled`: disabled/omitted columns skip gates;
8
- To Do, Dev, Done stay enabled.
9
-
10
- Each column has one executor: `projects[].columns[].orchestrator`:
11
- `none` (live worker, else operator), `operator`, or project with role
12
- `orchestrator` or `curator`. The worker owns the code and branch; others inspect/return, never push.
13
-
14
- `projects[].spurProjects[].role` accepts `worker`, `operator`, `curator` and
15
- `orchestrator`.
16
-
17
- Top-level `spurProjects[].columns` fills `none` columns board-wide;
18
- `role: operator` there serves operatorless projects, one session acting in
19
- each. A project-level binding wins.
20
-
21
- ## Gates and placement
22
-
23
- Facts (head, checks, reviews, comments, ticket, sessions) feed gates; two actions: move the task and open an executor turn (at most one
24
- per evaluation). Turns follow unmet entry gates, actionable post-submit failures,
25
- rerouting or Done wrap-up. Holds and existing turns can yield neither action.
26
-
27
- Moves, turns and course checks need `projects[].dispatcher.mode: on`;
28
- default is `shadow`: no doorbells or blocks.
29
-
30
- Gates are cumulative: each column checks its enabled gate and those to its left. At a turn boundary, failed gates return to the leftmost failing
31
- column. Taken turns hold until submit, return or a new head. Pending CI, unknown
32
- mergeability and incomplete comment history are waits. Downstream handoff waits
33
- for settled prerequisites; Dev can receive a repair turn.
34
-
35
- Dev needs an open non-draft PR, passing checks, no conflict, handled
36
- feedback, comment history and current-head submit. Feedback excludes
37
- bots, approvals and `projects[].operatorGithubLogin` (agents' account), so worker
38
- thread replies never count; others' posts do.
39
- The repo owner's and the human operator's own accounts count too, unless one is
40
- that login: a PR comment is a change request; talk to agents in Slack
41
- (`@shortName`) or the Board. A review-thread reply is a new review. An approval
42
- hides its inline comments; thread resolution and the head a comment was left on
43
- change nothing for feedback. Bots (GitHub Apps) neither return a task, approve it nor block
44
- an approval; their threads still count. Handled means handed by ID to a Dev turn, not answered; in shadow
45
- mode, a later submit in Dev or an executor `none` column handles it.
46
- An edit after the hand makes it unhandled again, returning a task right of Dev.
47
- A status comment whose last line is a hidden `board-reviewer-progress` or
48
- `board-reviewer-unavailable` marker is not external feedback. No required checks: non-skipped count. `projects[].reposWithoutCi` waives absent checks
49
- for listed repos; never failed/skipped required ones.
50
-
51
- Review and Product Review need current-head internal review marks, separate from
52
- External Review's external approval. QA: current-head submit; Ready to Merge awaits merge. Executor `none` may reuse same-head submits of other worker columns. Fixed gate rules have no configuration switch
53
- except enabled columns, no-CI and resolved threads.
54
-
55
- `projects[].columns[].requireResolvedThreads` (default: `ready-to-merge` only)
56
- gates that column and those right of it: an unresolved review thread, outdated
57
- or by anyone, returns the task to Dev, whose turn lists each thread link. The
58
- worker fixes or answers, then resolves each; reviewers never do. A
59
- Dev submit on the same head moves right, keeping marks and approval. An
60
- approval's inline notes are threads; it still passes External Review.
61
-
62
- Review/Product Review mark lasts across visits on the current head. A visit
63
- submission belongs to one column visit; moving left clears it and those to the right. New heads invalidate internal Review and Product Review marks.
64
-
65
- PR closed without merge with no open PR, or closed
66
- ticket with live work and no merged PR. `board status` lists them as operator block threads.
67
-
68
- ## Turns and delivery
69
-
70
- A turn `T<number>`: keyed `board inbox ack <entries>`.
71
- Only the acknowledging session may submit or return: keyed
72
- `board submit <turn> <sha>` accepts the head; keyed
73
- `board return <turn> <reason>` sends findings to Dev. In
74
- shadow mode, use keyed `board submit <task> <sha>`.
75
- Unseen heads answer `pending`: that submit is final; do not resubmit or raise a
76
- block. Confirm timeout: `projects[].dispatcher.submitConfirmMs`.
77
-
78
- A new head closes taken turns outside Dev; taken Dev turns survive pushes.
79
- Right of Dev, red CI, a draft, a conflict, an external comment or an unresolved
80
- thread where required returns the task to Dev at once, unless a turn is taken; then after its submit or return.
81
- The Dev turn hands the comments, beside a return's `code` block.
82
- Each handed entry has its `url`, `editedAt` once edited, and a review's inline
83
- `comments` with `url` and `threadId`. Turns of a Dev visit opened by a return
84
- show `returned`: who, from, the turn, the `code` block and the verbatim reason.
85
-
86
- Closed turns receive no further Board sends; Obsolete queued rings are dropped;
87
- a message already accepted by Spur cannot be retracted. Check `board inbox` and
88
- act only on a current turn; reread after `turn_closed`.
89
-
90
- Open-turn executors in `needs_input`, `error`, `rate_limited` or `stopped` raise
91
- one question after `health.turnStallAfterMs` (default 600000): curator unless self, else
92
- operator. Time starts at the later turn/state start; taking never resets it.
93
- One frozen explanation/dismissal per turn/session/state episode. Recovery,
94
- replacement, removal, archive or turn closure withdraws it. Blind Spur opens none,
95
- holds existing; gaps restart timing for new questions.
96
-
97
- ## Doorbells
98
-
99
- A turn opened for you by your own confirmed submit or return is first rung only after `doorbells.firstRetryMs`; a turn opened for you any other way rings at once.
100
-
101
- A doorbell expects action: read `board inbox` for the turn, addressed
102
- block, answer or follow-up. Ordinary task comments do not ring; nor does a block
103
- tracked by its author role ring itself.
104
-
105
- Repeat up to three delivered rings;
106
- acknowledgement stops them. Removal notices and quiet-turn reminders ring once.
107
- Busy recipients defer delivery; pending delivery or earlier rings in the Spur
108
- queue defer repeats. Queues can exhaust their waiting window.
109
-
110
- Most notices await recipients; taskless worker, orchestrator and operator-agent
111
- answers end without a live asking session. Curator and course-check orchestrator
112
- questions fall back to operator. Operator conversations await their project.
113
- Exhaustion alerts the operator, except removals and quiet-turn reminders;
114
- curator questions move to operator.
115
-
116
- ## Course checks and cycle limits
117
-
118
- `projects[].columns[].courseCheck` defaults to 3 returns to Dev;
119
- `courseCheck: 0` disables it. `projects[].columns[].cycleLimit` defaults to 10 and
120
- takes priority. Executor returns and external comments (a changes-requested
121
- review is one) count, as do thread returns; CI failures, conflicts and drafts alone do not count, nor
122
- reopened tickets or mode switches.
123
-
124
- If returns keep hitting the same mechanism, fix the bug class once; cover its variants with one table test. Put remaining edges with no user-visible effect under Risk in the PR description. Still fix P0/P1 and user-visible findings in this PR.
125
- `projects[].columns[].courseCheckTo`: `operator`, curator or column orchestrator.
126
- Default: curator (`projects[].spurProjects[].role`), else operator. An answer
127
- resets the course count and reaches the worker as a task comment. Only the
128
- operator can resolve the separate cycle limit and reset its count. With no live
129
- session it falls back to the operator; a live conductor that does not
130
- answer keeps the question.
131
-
132
- ## Blocks and escalation
133
-
134
- A question (`needs_input`): column orchestrator, else curator, else
135
- operator. Routing avoids asking yourself; curators ask the operator.
136
-
137
- A `code` block goes to the worker; `dependency` or `external` block stays with
138
- its author's role. Escalation: column orchestrator to curator to
139
- operator; other blocks escalate straight to the operator. Keyed
140
- `board escalate <block>` if its addressee cannot resolve it.
141
-
142
- Taskless: all roles, operator only:
143
- `board project ask <project> <text> --to operator --key <key>`.
144
- Project `needs_input` blocks get Slack threads except operator-agent asks;
145
- operator: `board inbox`, keyed `board answer`. Answers reach a current curator session; other roles use the asking session.
146
-
147
- `projects[].columns[].orchestrator`, `projects[].spurProjects[].role`,
148
- `operator.slack`.
149
-
150
- ## Slack now
151
-
152
- `slack.channels.feed`: curator answers and operator items,
153
- except delivery/health/ended-worker items and blocks.
154
- `slack.channels.orchestrators`: block threads addressed to the operator by
155
- others. Answer in the existing block thread.
156
-
157
- ## Slack addressing
158
-
159
- With a `projects[].spurProjects[].shortName`, `spurProjects[].shortName` or
160
- board-wide operator, a new operator message in
161
- `slack.channels.orchestrators` starts a conversation. A leading registered
162
- `@shortName` selects that Spur project and is stripped. With absent or unknown
163
- leading name, complete text, retaining any
164
- unknown prefix, goes to `slack.defaultAddressee`, else board-wide operator, else
165
- first project with an operator; else Board replies once with the valid prefixes.
166
- Middle mentions or Slack `<@U…>` address nobody; unknown names cause no lookup
167
- error. The operator checks short-name collisions with workspace names.
168
- A task key after the prefix attaches it.
169
-
170
- Read `board inbox`; reply via `board answer`. Each operator thread message rings again; `close` or ✅ in the
171
- thread closes it. Replies use `projects[].spurProjects[].displayName` and `icon`, top-level ones too,
172
- else project name and role icon (`board` for operator). No session:
173
- `board status` lists it as waiting.
174
-
175
- ## Done follows the ticket
176
-
177
- One linked PR merging does not by itself finish the task. Done: `projects[].tracker.doneStatuses` for Jira; for GitHub, the Issue must be
178
- closed. If still open, link another PR.
5
+ - [Columns and gates](how-board-works-columns.md): find the executor, placement rules and gate requirements.
6
+ - [Turns and delivery](how-board-works-turns.md): acknowledge work, submit or return, handle doorbells and repeated returns.
7
+ - [Blocks and escalation](how-board-works-blocks.md): route a question or escalate a block.
8
+ - [Slack conversations](how-board-works-slack.md): choose a channel, address an agent and answer in a thread.
9
+ - [Done follows the ticket](how-board-works-done.md): check when a task is finished.