@adamancyzhang/claude-orchestrator 0.3.2 → 0.3.3

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.
package/README.md CHANGED
@@ -27,7 +27,7 @@ v0.3.1 delivers a **Leader-Worker CLI-native architecture**: no MCP server, no H
27
27
  ```
28
28
  ┌─────────────────────────────────────────────────┐
29
29
  │ ZooKeeper │
30
- │ /leader /instances /tasks /messages /context
30
+ │ /leader /instances /tasks /messages│
31
31
  └──────┬──────────────┬──────────────┬────────────┘
32
32
  │ │ │
33
33
  ┌────┴────┐ ┌────┴────┐ ┌────┴────┐
@@ -78,7 +78,7 @@ claude-orchestrator leader --name Tom
78
78
  # → TUI launches: team panel, task board, event log, footer
79
79
  ```
80
80
 
81
- The Leader TUI is read-only — it shows who's online, what tasks are pending/in-progress, and a scrolling event log. All actions are triggered by CLI commands or Worker registrations.
81
+ The Leader TUI shows who's online, what tasks are pending, and a scrolling event log. It also has a keyboard input line — typed text is sent as a message for processing. All other actions are triggered by CLI commands or Worker registrations.
82
82
 
83
83
  ### 5. Register a Worker
84
84
 
@@ -95,7 +95,7 @@ Now the Leader TUI shows Jerry online. You can push tasks, send messages, and ma
95
95
 
96
96
  ```bash
97
97
  claude-orchestrator push-task --title "Implement login endpoint" --priority 0
98
- claude-orchestrator send-message --to-name Jerry --content "Starting on the auth module?"
98
+ claude-orchestrator send-message --content "Starting on the auth module?"
99
99
  claude-orchestrator poll-task
100
100
  ```
101
101
 
@@ -107,23 +107,22 @@ claude-orchestrator poll-task
107
107
 
108
108
  | Component | What it does | ZK magic |
109
109
  |-----------|-------------|----------|
110
- | **Leader** | Read-only TUI, mechanical message/task router, recovers orphaned tasks. No AI calls. | `/leader` EPHEMERAL — only one Leader at a time |
110
+ | **Leader** | TUI with keyboard input, mechanical message/task router, recovers orphaned tasks. No AI calls. | `/leader` EPHEMERAL — only one Leader at a time |
111
111
  | **Worker** | Persistent ZK connection, auto-processes messages via `claude -p`, self-evaluates output | Ephemeral nodes → auto-cleanup on disconnect |
112
- | **Task Queue** | Push → Claim → In Progress → Complete (or Block/Fail/Retry) | Sequential nodes for FIFO, ephemeral claims for atomic locks |
113
- | **Message Router** | P2P messages, broadcast, help requests, templates | Persistent-sequential nodes, ZK watches for push |
114
- | **Context Store** | Shared key-value storage, watch for changes | Persistent nodes, cross-instance visibility |
112
+ | **Task Queue** | Push → Claim → Complete (or Block/Fail/Retry) | Sequential nodes for FIFO, ephemeral claims for atomic locks |
113
+ | **Message Router** | Point-to-point messaging via ZK watches | Persistent-sequential nodes, ZK watches for push |
115
114
 
116
115
  ### CLI-Native — No MCP Server
117
116
 
118
117
  v0.3.x removes the centralized MCP Server entirely. Leader and Workers each connect directly to ZooKeeper. The Leader is a pure router: it forwards requirements to Planner Workers, creates tasks from structured definitions, and mechanically executes EvalDecision JSON from Workers. AI intelligence (task decomposition, self-evaluation) runs exclusively on Workers via `claude -p`. This eliminates 3 layers of indirection (MCP protocol, SSE, HTTP) and makes every node self-contained.
119
118
 
120
- ### CLI Commands (15)
119
+ ### CLI Commands
121
120
 
122
121
  | Command | What it does |
123
122
  |---------|-------------|
124
- | `leader` | Start Leader node with read-only TUI |
123
+ | `leader` | Start Leader node with TUI (keyboard input for sending messages) |
125
124
  | `setup` | Initialize environment: templates, skills, config |
126
- | `register` | Join the swarm. With `--work-dir`: persistent message watcher |
125
+ | `register` | Join the swarm. Reads name/role from `.claude-orchestrator/config.json`, registers and listens in cwd |
127
126
  | `unregister` | Explicitly unregister an instance |
128
127
  | `push-task` | Create a task (optionally assign to someone) |
129
128
  | `claim-task` | Grab the next task — atomic, no two instances can claim the same one |
@@ -132,7 +131,7 @@ v0.3.x removes the centralized MCP Server entirely. Leader and Workers each conn
132
131
  | `task-block` | Mark a claimed task as blocked (with reason) |
133
132
  | `task-fail` | Mark a claimed task as failed (with reason) |
134
133
  | `task-retry` | Re-queue a failed task for retry (retry_count + 1, max 3) |
135
- | `send-message` | DM another instance by name |
134
+ | `send-message` | Send a message to the Leader instance |
136
135
  | `poll-message` | Check your inbox |
137
136
  | `delete-message` | Delete a message from your inbox |
138
137
  | `config` | Show current configuration |
@@ -180,7 +179,7 @@ claude-orchestrator task-block --task-id task-0000000000 --reason "Waiting for A
180
179
 
181
180
  **Tom sees the block in the TUI and sends the key:**
182
181
  ```bash
183
- claude-orchestrator send-message --to-name Jerry --content "API key is in 1Password: auth/third-party/google-oauth"
182
+ claude-orchestrator send-message --content "API key is in 1Password: auth/third-party/google-oauth"
184
183
  ```
185
184
 
186
185
  **Jerry finishes:**
@@ -219,8 +218,6 @@ claude-orchestrator task-retry --task-id task-0000000001
219
218
  │ │ └── msg-0000000000 [PERSISTENT_SEQUENTIAL]
220
219
  │ └── f6e5d4c3.../
221
220
  │ └── msg-0000000000 [PERSISTENT_SEQUENTIAL]
222
- └── context/
223
- └── jwt_strategy [PERSISTENT]
224
221
  ```
225
222
 
226
223
  **Key insight:** Ephemeral nodes mean crashed instances auto-unregister. Ephemeral claim nodes mean abandoned tasks auto-release. The Leader monitors `/instances` and recovers orphaned tasks when a Worker disconnects (max 3 retries, then archived as failed).
@@ -230,7 +227,7 @@ claude-orchestrator task-retry --task-id task-0000000001
230
227
  ## Task State Machine (v0.3.0)
231
228
 
232
229
  ```
233
- pending → claimed → in_progress → completed
230
+ pending → claimed → completed
234
231
  → blocked → pending (retry)
235
232
  → failed → pending (retry, max 3)
236
233
  claimed → pending (Worker disconnect, Leader recovers orphan)
@@ -240,7 +237,6 @@ claimed → pending (Worker disconnect, Leader recovers orphan)
240
237
  |-------|---------|---------|
241
238
  | `pending` | Waiting for claim | `push_task` |
242
239
  | `claimed` | Claimed, not started | `claim_task` |
243
- | `in_progress` | Working | `heartbeat(current_task=...)` |
244
240
  | `completed` | Done | `complete_task` |
245
241
  | `blocked` | Blocked, waiting unblock | `task-block` |
246
242
  | `failed` | Failed, can retry | `task-fail` |
@@ -253,7 +249,7 @@ claimed → pending (Worker disconnect, Leader recovers orphan)
253
249
 
254
250
  - Node.js 18+
255
251
  - Docker (for ZooKeeper)
256
- - Claude Code CLI (for `register --work-dir` message processing)
252
+ - Claude Code CLI (for Worker message processing)
257
253
 
258
254
  ### From Source
259
255
 
@@ -287,7 +283,7 @@ npm test
287
283
 
288
284
  ## Skills for Claude Code
289
285
 
290
- The repo includes Claude Code skills that enforce a standardized **responsibility chain**: Plan → Build → Verify → Review → Accept. Each link has a dedicated skill, grounded on the `task-traceability` foundation layer. The `setup` command installs all skills into `.claude/skills/`.
286
+ The repo includes Claude Code skills that enforce a standardized **responsibility chain**: Plan → Build → Verify → Review → Accept. Each link has a dedicated skill, grounded on the `task-traceability` foundation layer. The `setup` command installs the 6 responsibility-chain skills into `.claude/skills/`.
291
287
 
292
288
  | Skill | Role | What it does |
293
289
  |-------|------|-------------|
@@ -297,8 +293,6 @@ The repo includes Claude Code skills that enforce a standardized **responsibilit
297
293
  | `task-review` | Reviewer | Review full chain (Plan→Build→Verify) for design consistency |
298
294
  | `task-acceptance` | Accepter | Validate final deliverable against business criteria, sign Go/No-Go |
299
295
  | `task-traceability` | Foundation | Trace → Execute → Map → Evidence → Record — all roles |
300
- | `claude-orchestrator` | Infrastructure | Full CLI reference — all 15 commands with examples |
301
- | `claude-code-developer` | Infrastructure | Hooks, settings, MCP, CLI reference for extending Claude Code |
302
296
 
303
297
  ---
304
298
 
@@ -336,7 +330,7 @@ Zero external database. All state lives in ZooKeeper.
336
330
  |--------|-------|---------|
337
331
  | ZK hosts | `-z, --zookeeper` flag or `ZK_HOSTS` env | `127.0.0.1:2181` |
338
332
  | Instance ID | `-i, --instance-id` flag or `.claude-orchestrator/config.json` (project) / `~/.claude-orchestrator/config.json` (global) | auto-saved after `register` |
339
- | Claude command | `--command` flag or `config.json` → `command` | `claude --dangerously-skip-permissions -v` |
333
+ | Claude command | `--command` flag or `config.json` → `commands.claude-cli` | `claude --dangerously-skip-permissions --permission-mode dontAsk` |
340
334
  | Cache directory | `--cache-dir` flag or `config.json` → `cache_dir` | `~/.claude-orchestrator/sessions` |
341
335
 
342
336
  ---
@@ -352,7 +346,7 @@ Zero external database. All state lives in ZooKeeper.
352
346
  │ ├── leader/ # Leader node (v0.3.1)
353
347
  │ │ ├── index.ts # startup / shutdown orchestration
354
348
  │ │ ├── tui.ts # ANSI-based read-only TUI
355
- │ │ ├── event-bus.ts # typed EventEmitter (13 events)
349
+ │ │ ├── event-bus.ts # typed EventEmitter (14 events)
356
350
  │ │ ├── state.ts # centralized LeaderState
357
351
  │ │ ├── monitor.ts # WorkerMonitor — join/leave detection
358
352
  │ │ ├── orchestrator.ts # TaskOrchestrator — lifecycle tracking
@@ -375,13 +369,11 @@ Zero external database. All state lives in ZooKeeper.
375
369
  │ │ └── worker-accept.md # Accepter template (task-traceability + task-acceptance)
376
370
  │ ├── zk/
377
371
  │ │ ├── client.ts # ZooKeeper connection management
378
- │ │ ├── paths.ts # ZK path constants
379
- │ │ └── watcher.ts # ZK watch manager
372
+ │ │ └── paths.ts # ZK path constants
380
373
  │ ├── modules/
381
374
  │ │ ├── registry.ts # Instance registry
382
375
  │ │ ├── task-queue.ts # Task queue (6-state: push/claim/block/fail/retry)
383
376
  │ │ ├── message-router.ts # Message routing + template rendering + long-poll
384
- │ │ └── context-store.ts # Shared key-value store
385
377
  │ ├── models/
386
378
  │ │ └── schemas.ts # Zod schemas and inferred types
387
379
  │ └── utils/
@@ -396,15 +388,13 @@ Zero external database. All state lives in ZooKeeper.
396
388
  │ ├── start-worker.sh # Worker launcher
397
389
  │ ├── stop-all.sh # Tear down
398
390
  │ └── publish.sh # npm publish pipeline
399
- ├── skills/ # Claude Code skills (8 skills, responsibility chain)
391
+ ├── skills/ # Claude Code skills (6 responsibility-chain + 2 infrastructure)
400
392
  │ ├── task-planning/ # Planner skill
401
393
  │ ├── task-execution/ # Builder skill
402
394
  │ ├── task-verification/ # Verifier skill
403
395
  │ ├── task-review/ # Reviewer skill
404
396
  │ ├── task-acceptance/ # Accepter skill
405
- ├── task-traceability/ # Foundation layer skill
406
- │ ├── claude-orchestrator/ # CLI reference skill
407
- │ └── claude-code-developer/ # Claude Code extension skill
397
+ └── task-traceability/ # Foundation layer skill
408
398
  ├── docs/
409
399
  │ ├── v0.1.0/ # Archived Python v0.1.0 docs
410
400
  │ ├── v0.2.0/ # Archived MCP-based v0.2.x docs
@@ -180,7 +180,7 @@ export const ChainTaskDefSchema = z.object({
180
180
  title: z.string(),
181
181
  description: z.string(),
182
182
  criteria: z.string(),
183
- priority: z.number().int().min(0).max(3),
183
+ priority: z.number().int().min(0).max(2),
184
184
  });
185
185
  export const ChainDefSchema = z.object({
186
186
  chain_id: z.string(),
@@ -38,7 +38,7 @@ Leader (协调层)
38
38
  Multi-agent orchestration CLI backed by ZooKeeper。所有角色都使用它来完成基础设施操作:注册实例、认领任务、发送消息、读写共享上下文。
39
39
 
40
40
  - **入口**: `claude-orchestrator <command>`
41
- - **关键命令**: `register`, `claim-task`, `complete-task`, `push-task`, `send-message`, `set-context`, `get-context`
41
+ - **关键命令**: `register`, `claim-task`, `complete-task`, `push-task`, `send-message`
42
42
  - **适用角色**: 所有角色
43
43
 
44
44
  ### task-planning
@@ -17,7 +17,7 @@ You are {{name}}, a task decomposition specialist. Your role is {{preset_role}}.
17
17
  1. Analyze the requirement. Identify how many independent delivery chains are needed (usually one, but complex requirements may need multiple).
18
18
  2. For each chain, define five link tasks. Plan is optional — omit it (set to null) when the requirement is already clear enough to start building directly. Build, Verify, Review, and Accept are mandatory.
19
19
  3. For each task, specify clear completion criteria — what "done" means for that specific link.
20
- 4. Assign a priority to each task: 0 (urgent), 1 (high), 2 (normal), 3 (low).
20
+ 4. Assign a priority to each task: 0 (urgent), 1 (high), 2 (normal).
21
21
 
22
22
  ## Output Format
23
23
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adamancyzhang/claude-orchestrator",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "Multi-agent orchestration CLI backed by ZooKeeper — register, assign tasks, communicate, share context",
5
5
  "repository": "github:adamancyzhang/claude-orchestrator-server",
6
6
  "license": "MIT",