claude-code-kanban 5.4.0 → 6.0.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,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-kanban",
3
- "version": "2.21.4",
3
+ "version": "2.22.0",
4
4
  "description": "claude-code-kanban dashboard integration: agent activity tracking, context and cost tracking, skills to drive the board from a session and to follow it",
5
5
  "experimental": {
6
6
  "monitors": "./monitors.json"
@@ -4,11 +4,5 @@
4
4
  "description": "Notifies this session when its tasks are moved on the kanban board or the user sends it review comments.",
5
5
  "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/postman.js\"",
6
6
  "when": "on-skill-invoke:claude-code-kanban:follow"
7
- },
8
- {
9
- "name": "kanban-dispatch-inbox",
10
- "description": "Notifies this session when a session it dispatched through cck reports or exits.",
11
- "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/postman.js\" --topic dispatch --keep-backlog",
12
- "when": "on-skill-invoke:claude-code-kanban:dispatch"
13
7
  }
14
8
  ]
@@ -29,10 +29,6 @@ const RETRY_MS = 15000;
29
29
  // Windows sometimes fails a loopback connect with ETIMEDOUT, or resets it once open, while the
30
30
  // board is up, so those errors get a few short waits before the normal one.
31
31
  const CONNECT_RETRY_MS = [250, 500, 1000, 2000];
32
- // `--topic dispatch` is the dispatch inbox: reports from sessions this one started.
33
- const TOPIC = process.argv.includes('--topic') ? process.argv[process.argv.indexOf('--topic') + 1] : null;
34
- // A dispatch report is a result, not an instruction, so a late attach still wants it.
35
- const KEEP_BACKLOG = process.argv.includes('--keep-backlog');
36
32
 
37
33
  if (!SESSION_ID) process.exit(0);
38
34
 
@@ -53,12 +49,11 @@ function serverUrl() {
53
49
  // Once per process, not once per poll: the grant means "follow the board from here on", so
54
50
  // the first attach throws away whatever queued up before it. A later reconnect must not
55
51
  // discard again -- by then the queue holds events the user is owed.
56
- let firstAttach = !KEEP_BACKLOG;
52
+ let firstAttach = true;
57
53
 
58
54
  async function poll(base) {
59
55
  const first = firstAttach ? '&first=1' : '';
60
- const topic = TOPIC ? `&topic=${encodeURIComponent(TOPIC)}` : '';
61
- const url = `${base}/api/sessions/${encodeURIComponent(SESSION_ID)}/events?wait=${WAIT_SEC}${first}${topic}`;
56
+ const url = `${base}/api/sessions/${encodeURIComponent(SESSION_ID)}/events?wait=${WAIT_SEC}${first}`;
62
57
  const res = await fetch(url, { signal: AbortSignal.timeout((WAIT_SEC + 15) * 1000) });
63
58
  if (!res.ok) throw new Error(`HTTP ${res.status}`);
64
59
  firstAttach = false;
@@ -1,23 +1,29 @@
1
1
  ---
2
2
  name: dispatch
3
- description: Dispatch a task to another Claude Code session through the kanban board (cck), fire-and-forget or with a report back. Use when the user asks to dispatch, delegate, or start a session for a task, or to collect or check on a dispatched session's result.
4
- argument-hint: '<task> [--no-report] [--group <name>] [--model haiku|sonnet|opus|fable] [--worktree [name]]'
3
+ description: Dispatch tasks to new Claude Code sessions in the kanban board's terminal. Use when the user asks to dispatch or delegate a task to another session.
4
+ argument-hint: '<task> [--handoff] [--group <name>] [--model haiku|sonnet|opus|fable] [--worktree [name]] [-- <claude args>]'
5
5
  ---
6
6
 
7
7
  # Kanban dispatch
8
8
 
9
- This file only points at the guide. The guide ships with the `claude-code-kanban` binary, so it always matches the commands that binary accepts.
10
-
11
- Invoking this skill also arms this session's dispatch inbox: when a session you dispatched with `--report` reports or exits, a line arrives here:
12
-
13
- ```
14
- [kanban board] Dispatch <dispatch-id> (session <uuid>) <reported success|reported failure|ended without a report>. Summary: <text>
15
- ```
16
-
17
- Load the guide before running any dispatch command:
9
+ The guide ships with the `claude-code-kanban` binary, so it always matches the commands that binary accepts. Load it before running any dispatch command:
18
10
 
19
11
  ```bash
20
12
  claude-code-kanban skills get dispatch
21
13
  ```
22
14
 
23
15
  Fall back to `npx claude-code-kanban` when the bare binary is not on PATH. If `skills get` is unknown, the installed cck is too old: tell the user to update it, and do not guess commands.
16
+
17
+ ## Reply
18
+
19
+ End every spec with the reply line, because you usually need the result to continue:
20
+
21
+ ```text
22
+ When you are done, or cannot finish, send the result to <your peer name> with the SendMessage tool, then stop.
23
+ ```
24
+
25
+ `--handoff` is a skill argument that drops the reply line: the session owns the task, and the user follows it on the board. Keep it out of the `dispatch start` command.
26
+
27
+ ## Orchestration patterns
28
+
29
+ Use request-reply, handoff or orchestrator-workers directly. When another shape fits better (a separate reviewer, steps that feed each other, a sub-orchestrator, a decision for the user), propose it in one line, the pattern and why, and dispatch only after the user agrees, unless the user named it. Details: [references/orchestration-patterns.md](references/orchestration-patterns.md).
@@ -0,0 +1,50 @@
1
+ # Orchestration patterns
2
+
3
+ Each pattern is only `dispatch start` plus `SendMessage`; the specs decide who talks to whom. A **worker** is a session you dispatch.
4
+
5
+ ## Select
6
+
7
+ Use one of these directly:
8
+
9
+ | Pattern | When |
10
+ |---|---|
11
+ | Request-reply | The default |
12
+ | Handoff | The user passed `--handoff` or asked for no reply |
13
+ | Orchestrator-workers | The task splits into parts that do not depend on each other |
14
+
15
+ Propose these first, unless the user named one. Each adds steps, rounds or sessions the user did not ask for.
16
+
17
+ | Pattern | Fits when |
18
+ |---|---|
19
+ | Prompt chaining | A step needs the previous step's output |
20
+ | Evaluator-optimizer | There is a clear acceptance bar and a second look improves the result |
21
+ | Hierarchical | A part is itself large enough to split |
22
+ | Human-in-the-loop | The spec leaves a choice the user should make |
23
+
24
+ ## Request-reply
25
+
26
+ One worker, one reply. The reply can go to any peer. When another session owns the work and should act on the result, name it in the reply line, and ask for a one-line note to you as well, so you know the worker finished.
27
+
28
+ ## Handoff
29
+
30
+ One worker, no reply line. The worker owns the task, and you save the turn a reply costs.
31
+
32
+ ## Orchestrator-workers
33
+
34
+ One worker per independent part, all started before you wait on any. They run at the same time, and each holds only its own part in context. Give each a unique `--name` and one shared `--group`, then combine the replies.
35
+
36
+ ## Prompt chaining
37
+
38
+ Workers in sequence; each spec carries the previous reply. You check each output before you start the next step, and stop the chain when a check fails.
39
+
40
+ ## Evaluator-optimizer
41
+
42
+ A generator and an evaluator that message each other until the evaluator accepts. A separate evaluator judges the work with fresh eyes. Give each the other's name, and cap the rounds in both specs: `stop after 3 rounds and send what you have`.
43
+
44
+ ## Hierarchical
45
+
46
+ A worker that dispatches its own workers and replies once they all have. Your context then holds one reply per part instead of one per leaf. Its spec says to wait for its workers and to give them its own peer name.
47
+
48
+ ## Human-in-the-loop
49
+
50
+ Add to the worker's spec: `When you need a decision, ask <your peer name> with the SendMessage tool and keep working on what does not depend on the answer.` Ask the user when the decision is theirs, and reply with `SendMessage`. You can steer a running worker the same way at any time.