@adamancyzhang/claude-orchestrator 0.3.3 → 0.4.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.
Files changed (77) hide show
  1. package/README.md +197 -269
  2. package/dist/cli/commands.d.ts +0 -10
  3. package/dist/cli/commands.js +1 -184
  4. package/dist/cli/commands.js.map +1 -1
  5. package/dist/config.d.ts +22 -0
  6. package/dist/config.js +23 -0
  7. package/dist/config.js.map +1 -1
  8. package/dist/executor/template.js +21 -3
  9. package/dist/executor/template.js.map +1 -1
  10. package/dist/index.js +9 -34
  11. package/dist/index.js.map +1 -1
  12. package/dist/leader/chain-router.d.ts +5 -1
  13. package/dist/leader/chain-router.js +90 -2
  14. package/dist/leader/chain-router.js.map +1 -1
  15. package/dist/leader/event-bus.d.ts +1 -1
  16. package/dist/leader/event-bus.js +1 -1
  17. package/dist/leader/event-bus.js.map +1 -1
  18. package/dist/leader/index.d.ts +7 -0
  19. package/dist/leader/index.js +5 -2
  20. package/dist/leader/index.js.map +1 -1
  21. package/dist/leader/merge-validator.d.ts +24 -0
  22. package/dist/leader/merge-validator.js +112 -0
  23. package/dist/leader/merge-validator.js.map +1 -0
  24. package/dist/leader/state.d.ts +17 -0
  25. package/dist/leader/state.js +48 -2
  26. package/dist/leader/state.js.map +1 -1
  27. package/dist/leader/tui.d.ts +2 -0
  28. package/dist/leader/tui.js +140 -16
  29. package/dist/leader/tui.js.map +1 -1
  30. package/dist/leader/watcher.js +12 -0
  31. package/dist/leader/watcher.js.map +1 -1
  32. package/dist/models/schemas.d.ts +15 -0
  33. package/dist/models/schemas.js +5 -0
  34. package/dist/models/schemas.js.map +1 -1
  35. package/dist/orchestrator/run.d.ts +6 -0
  36. package/dist/orchestrator/run.js +181 -0
  37. package/dist/orchestrator/run.js.map +1 -0
  38. package/dist/skills/claude-orchestrator/SKILL.md +75 -217
  39. package/dist/templates/agents/worker-accept.md +48 -0
  40. package/dist/templates/agents/worker-build.md +38 -0
  41. package/dist/templates/agents/worker-decompose.md +40 -0
  42. package/dist/templates/agents/worker-evaluate.md +49 -0
  43. package/dist/templates/agents/worker-plan.md +36 -0
  44. package/dist/templates/agents/worker-review.md +42 -0
  45. package/dist/templates/agents/worker-verify.md +44 -0
  46. package/dist/templates/claude-memory/personal-claude-accepter.md +17 -0
  47. package/dist/templates/claude-memory/personal-claude-builder.md +24 -0
  48. package/dist/templates/claude-memory/personal-claude-planner.md +22 -0
  49. package/dist/templates/claude-memory/personal-claude-reviewer.md +25 -0
  50. package/dist/templates/claude-memory/personal-claude-verifier.md +24 -0
  51. package/dist/templates/claude-memory/team-claude.md +61 -0
  52. package/dist/utils/logger.d.ts +1 -0
  53. package/dist/utils/logger.js +3 -0
  54. package/dist/utils/logger.js.map +1 -1
  55. package/dist/worker/child-runner.d.ts +12 -0
  56. package/dist/worker/child-runner.js +99 -0
  57. package/dist/worker/child-runner.js.map +1 -0
  58. package/dist/worker/child.d.ts +2 -0
  59. package/dist/worker/child.js +8 -0
  60. package/dist/worker/child.js.map +1 -0
  61. package/dist/worker/commit-checker.d.ts +20 -0
  62. package/dist/worker/commit-checker.js +87 -0
  63. package/dist/worker/commit-checker.js.map +1 -0
  64. package/dist/worker/watcher.d.ts +5 -1
  65. package/dist/worker/watcher.js +41 -4
  66. package/dist/worker/watcher.js.map +1 -1
  67. package/dist/worker/worktree-initializer.d.ts +10 -0
  68. package/dist/worker/worktree-initializer.js +235 -0
  69. package/dist/worker/worktree-initializer.js.map +1 -0
  70. package/package.json +2 -2
  71. package/dist/templates/worker-accept.md +0 -46
  72. package/dist/templates/worker-build.md +0 -45
  73. package/dist/templates/worker-decompose.md +0 -67
  74. package/dist/templates/worker-evaluate.md +0 -41
  75. package/dist/templates/worker-plan.md +0 -43
  76. package/dist/templates/worker-review.md +0 -46
  77. package/dist/templates/worker-verify.md +0 -47
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run.js","sourceRoot":"","sources":["../../src/orchestrator/run.ts"],"names":[],"m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AAO,CAAC,OAAO,EAAE,EAAE;QACnC,MAAM,OAAO,GAAG,GAAG,EAAE;YACnB,YAAY,GAAG,IAAI,CAAC;YACpB,KAAK,MAAM,KAAK,IAAI,QAAQ,EAAE,CAAC;gBAC7B,IAAI,CAAC;oBAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;gBAAC,CAAC;gBAAC,MAAM,CAAC,CAAC,kBAAkB,CAAC,CAAC;YAC7D,CAAC;YACD,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC;QAEF,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAChC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QACjC,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE;YACtB,KAAK,MAAM,KAAK,IAAI,QAAQ,EAAE,CAAC;gBAC7B,IAAI,CAAC;oBAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;gBAAC,CAAC;gBAAC,MAAM,CAAC,CAAC,kBAAkB,CAAC,CAAC;YAC7D,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1,244 +1,102 @@
1
1
  ---
2
2
  name: claude-orchestrator
3
- description: Multi-agent orchestration CLI backed by ZooKeeper for service discovery. Register instances, distribute tasks, send messages, and share context across Claude Code instances. Use when the user wants to register, join a team, claim tasks, send messages, check status, or any orchestrator operation.
3
+ description: Multi-agent orchestration system reference for Workers. Covers the v0.4 unified run command, worktree isolation, directory memory (CLAUDE.md), responsibility chain (Plan→Build→Verify→Review→Accept), output standards, and common pitfalls. Use this skill whenever a Worker executes any link in the responsibility chain read it at session start and whenever you are unsure about process, output paths, or role boundaries.
4
4
  ---
5
5
 
6
- # Claude Orchestrator
6
+ # Claude Orchestrator — Worker Reference
7
7
 
8
- A CLI that provides multi-agent orchestration directly on top of ZooKeeper. Every Claude Code instance becomes a discoverable agent register, claim tasks, communicate, and share context without a middleman server.
8
+ You are a Worker in a multi-agent orchestration system. Your work is coordinated through ZooKeeper. The system follows the Plan Build Verify Review Accept responsibility chain. This reference helps you stay on track.
9
9
 
10
- ## Architecture
10
+ ## Quick Orientation
11
11
 
12
- ```
13
- Claude Code ──CLI──> ZooKeeper
14
- (instance A) (service discovery, task queue, messages, context)
12
+ When you start working, locate these files:
15
13
 
16
- Claude Code ──CLI──> ZooKeeper
17
- (instance B)
18
- ```
14
+ | File | Purpose | Read When |
15
+ |------|---------|-----------|
16
+ | `CLAUDE.md` (worktree root) | Team rules, directory structure, chain overview | Every session start |
17
+ | `.claude-orchestrator/docs/{your_name}/CLAUDE.md` | Your role-specific rules and output standards | Every session start |
18
+ | `.claude-orchestrator/docs/{your_name}/YYYY-MM-DD/CLAUDE.md` | Today's session memory | Every session start (create if missing) |
19
+ | `.claude/skills/task-traceability/SKILL.md` | Foundation: Trace → Execute → Map → Evidence → Record | Every task |
20
+ | `.claude/skills/{your_link_skill}/SKILL.md` | Your link-specific process | When starting your link |
19
21
 
20
- Every CLI command talks directly to ZooKeeper. Instance discovery is via ephemeral znodes. Tasks use sequential znodes for FIFO ordering. Messages use watch-based push.
22
+ ## Directory Memory Rules (Non-Negotiable)
21
23
 
22
- ## Setup
24
+ 1. **All your output goes under** `.claude-orchestrator/docs/{your_name}/YYYY-MM-DD/` (use today's date)
25
+ 2. **Every daily directory must have a `CLAUDE.md`** — update it after each completed sub-task
26
+ 3. **Read upstream artifacts from their docs directories** before starting your link
27
+ 4. **Write your artifact to the docs directory** so the next Worker can find it
23
28
 
24
- ```bash
25
- npm install -g @adamancyzhang/claude-orchestrator
26
- docker-compose up -d # start ZooKeeper
27
- ```
29
+ ### Artifact Names by Link
28
30
 
29
- Initialize environment:
31
+ | Your Link | Your Output File | Who Reads It |
32
+ |-----------|-----------------|--------------|
33
+ | plan | `blueprint.md` | Builder, Verifier, Reviewer, Accepter |
34
+ | build | `traceability-map.md` + `evidence/` | Verifier, Reviewer, Accepter |
35
+ | verify | `verification-map.md` + `evidence/` | Reviewer, Accepter |
36
+ | review | `review-judgment.md` | Accepter |
37
+ | accept | `acceptance-report.md` | (chain closes) |
30
38
 
31
- ```bash
32
- # Leader (team coordinator):
33
- claude-orchestrator setup --leader --name Tom
39
+ ## Responsibility Chain Rules
34
40
 
35
- # Worker (the doers):
36
- claude-orchestrator setup --name Jerry --role builder
37
- ```
41
+ ### Every Link Must
38
42
 
39
- This creates:
40
- - `.claude-orchestrator/agents/`message templates (7 templates for leader + 5 worker links)
41
- - `.claude/skills/`8 Claude Code skills (responsibility chain + infrastructure)
42
- - `.claude-orchestrator/config.json`project config (name, role)
43
- - `~/.claude-orchestrator/config.json`global config (ZK hosts, CLI command, cache dir)
43
+ 1. **Trace** — Read upstream artifacts before starting. If missing → BLOCKED, report to Leader.
44
+ 2. **Execute**Follow the standard process in your skill file.
45
+ 3. **Map**Link every output to a specific upstream requirement.
46
+ 4. **Evidence** Provide verifiable proof (not claims) for every output.
47
+ 5. **Record** Write to BOTH `{{result_path}}` (for Leader) AND `.claude-orchestrator/docs/{your_name}/YYYY-MM-DD/{artifact}.md` (for downstream).
44
48
 
45
- Verify:
49
+ ### Role Boundaries
46
50
 
47
- ```bash
48
- claude-orchestrator config
49
- # Shows current configuration
50
- ```
51
+ | Role | You DO | You DO NOT |
52
+ |------|--------|------------|
53
+ | **Planner** | Define blueprints with verifiable criteria | Implement code (Builder's job) |
54
+ | **Builder** | Implement per blueprint, produce evidence | Make architectural decisions (Planner's job) |
55
+ | **Verifier** | Check Builder output against Plan | Judge architecture (Reviewer's job) |
56
+ | **Reviewer** | Judge full chain quality | Re-verify or re-implement |
57
+ | **Accepter** | Validate against business criteria | Re-verify, re-review, or conditional-pass |
51
58
 
52
- ## Global Options
59
+ ### Self-Evaluation
53
60
 
54
- | Option | Env var | Default | Description |
55
- |--------|---------|---------|-------------|
56
- | `--zookeeper`, `-z` | `ZK_HOSTS` | `127.0.0.1:2181` | ZooKeeper connection string |
57
- | `--instance-id`, `-i` | | auto (from config) | Override stored instance ID |
61
+ After completing your link, self-evaluate:
62
+ - Criteria fully met AND artifacts in place → `activate_next`
63
+ - Anything missing `feedback` with specifics
64
+ - Accept link passes `close_chain`
58
65
 
59
- ## Commands
66
+ ## Common Pitfalls (Avoid These)
60
67
 
61
- ### Leader
68
+ 1. **Writing output to the wrong directory** — Always use `.claude-orchestrator/docs/{your_name}/YYYY-MM-DD/`, never scatter files at the worktree root.
69
+ 2. **Skipping upstream artifact read** — For build/verify/review/accept, you MUST find and read the previous Worker's output from their docs directory. If you skip this, the responsibility chain is broken.
70
+ 3. **Vague completion criteria** — "Works correctly" is not verifiable. Use specific commands and expected outputs (e.g., "curl -X POST /api/login returns 201 with a valid JWT in the response body").
71
+ 4. **"Code level already implemented"** — This phrase is banned. Every claim needs evidence: actual command output, test results, file contents.
72
+ 5. **Conditional pass (Accept link)** — There is no conditional GO. Zero issues for GO. If any criterion fails → NO-GO.
73
+ 6. **Not updating daily CLAUDE.md** — If your session is interrupted, your progress is lost. Update `CLAUDE.md` after each sub-task.
74
+ 7. **Overstepping your role** — Verifiers should not re-architect. Reviewers should not re-implement. Trust upstream, verify independently, stay in your lane.
75
+ 8. **Forgetting the dual-write** — You must write output to BOTH `{{result_path}}` AND `.claude-orchestrator/docs/{your_name}/YYYY-MM-DD/`. The first is for the Leader's evaluation, the second is for the next Worker to read.
62
76
 
63
- ```bash
64
- claude-orchestrator leader --name Tom
65
- # Launches read-only TUI: team panel, task board, event log
66
- ```
77
+ ## Startup Checklist (Every Session)
67
78
 
68
- Only one Leader at a time (ZK ephemeral node). The TUI shows who's online, what tasks are in each state, and a scrolling event log.
79
+ - [ ] Read `CLAUDE.md` at worktree root
80
+ - [ ] Read `.claude-orchestrator/docs/{your_name}/CLAUDE.md`
81
+ - [ ] Read or create `.claude-orchestrator/docs/{your_name}/YYYY-MM-DD/CLAUDE.md`
82
+ - [ ] Identify your current link and read the corresponding skill
83
+ - [ ] For build/verify/review/accept: find upstream artifact paths in `docs/`
69
84
 
70
- ### Registration
85
+ ## Shutdown Checklist (Every Session)
71
86
 
72
- **Setup** one-time initialization:
87
+ - [ ] Confirm today's artifact is in `.claude-orchestrator/docs/{your_name}/YYYY-MM-DD/`
88
+ - [ ] Confirm evidence files are saved
89
+ - [ ] Update daily CLAUDE.md with completion status and artifact paths
90
+ - [ ] If build link: confirm code is committed with your name signature
91
+ - [ ] Record any blockers or unfinished items for the next session
73
92
 
74
- ```bash
75
- claude-orchestrator setup --leader --name Tom # Leader
76
- claude-orchestrator setup --name Jerry --role builder # Worker
77
- claude-orchestrator setup --name Lucy --role verifier \
78
- --cache-dir ~/shared/sessions --command "claude -p" # Custom CLI
79
- ```
93
+ ## Skills Reference
80
94
 
81
- Setup options:
82
-
83
- | Option | Default | Description |
84
- |--------|---------|-------------|
85
- | `--leader` | false | Initialize as Leader environment |
86
- | `--name <name>` | | Instance display name |
87
- | `--role <role>` | builder | Role: planner, builder, verifier, reviewer, accepter |
88
- | `--cache-dir <path>` | `~/.claude-orchestrator/sessions` | Shared cache directory |
89
- | `--command <cmd>` | `claude --dangerously-skip-permissions --permission-mode dontAsk` | Claude CLI command |
90
- | `--global` | false | Write only global config, skip project files |
91
-
92
- **Register** — join the swarm:
93
-
94
- ```bash
95
- # Connect and listen for messages (reads name/role from .claude-orchestrator/config.json):
96
- claude-orchestrator register
97
- # Worker Watcher starts, listens for messages, processes via claude -p
98
- # Press Ctrl+C to stop and unregister
99
- ```
100
-
101
- Registration creates an ephemeral ZK node. The instance auto-deregisters on disconnect (Ctrl+C or timeout). The Worker Watcher listens for messages on `/messages/{instance_id}` and processes them using the template that matches the message's `link` field.
102
-
103
- **Unregister:**
104
-
105
- ```bash
106
- claude-orchestrator unregister
107
- ```
108
-
109
- ### Tasks
110
-
111
- **Push a task** to the queue:
112
-
113
- ```bash
114
- claude-orchestrator push-task --title "Implement login endpoint" --priority 0
115
- claude-orchestrator push-task --title "Verify auth module" --link verify --priority 1
116
- claude-orchestrator push-task --title "Review PR #42" --link review --assignee <instance-id>
117
- claude-orchestrator push-task --title "Part 2" --chain-id chain-001 --depends-on task-0000000001
118
- ```
119
-
120
- Push options:
121
-
122
- | Option | Default | Description |
123
- |--------|---------|-------------|
124
- | `--title <text>` | required | Task title |
125
- | `--description <text>` | "" | Task description |
126
- | `--priority <n>` | 1 | 0=HIGH, 1=MEDIUM, 2=LOW |
127
- | `--assignee <id>` | — | Target instance ID |
128
- | `--link <link>` | — | Responsibility chain link: plan, build, verify, review, accept |
129
- | `--chain-id <id>` | — | Group related tasks under one chain |
130
- | `--depends-on <ids>` | — | Comma-separated task IDs this task depends on |
131
- | `--blocked-by <ids>` | — | Comma-separated task IDs blocking this task |
132
-
133
- **Claim a task** — FIFO, higher priority first, assigned-to-you tasks jump the queue:
134
-
135
- ```bash
136
- claude-orchestrator claim-task
137
- # → { "id": "task-0000000001", "title": "Implement login endpoint", "status": "claimed", ... }
138
- # → { "status": "no_tasks", "message": "No pending tasks available." }
139
- ```
140
-
141
- **Complete a task:**
142
-
143
- ```bash
144
- claude-orchestrator complete-task --task-id task-0000000001 --result "PR #42 — login endpoint with tests"
145
- ```
146
-
147
- **Poll tasks:**
148
-
149
- ```bash
150
- claude-orchestrator poll-task
151
- claude-orchestrator poll-task --status pending
152
- claude-orchestrator poll-task --status claimed
153
- claude-orchestrator poll-task --status completed
154
- claude-orchestrator poll-task --status blocked
155
- claude-orchestrator poll-task --status failed
156
- ```
157
-
158
- **Task lifecycle commands:**
159
-
160
- ```bash
161
- claude-orchestrator task-block --task-id task-0000000001 --reason "Waiting for API key"
162
- claude-orchestrator task-fail --task-id task-0000000001 --reason "Test environment unavailable"
163
- claude-orchestrator task-retry --task-id task-0000000001
164
- # → Re-queued with retry_count + 1 (max 3 retries)
165
- ```
166
-
167
- Task state machine:
168
-
169
- ```
170
- pending → claimed → in_progress → completed
171
- → blocked → pending (retry)
172
- → failed → pending (retry, max 3)
173
- claimed → pending (Worker disconnect, Leader recovers orphan)
174
- ```
175
-
176
- ### Messages
177
-
178
- **Send a direct message:**
179
-
180
- ```bash
181
- claude-orchestrator send-message --to-name Jerry --content "Can you review my PR?"
182
- ```
183
-
184
- **Broadcast to all:**
185
-
186
- ```bash
187
- claude-orchestrator send-message --broadcast --content "CI is down, don't push"
188
- ```
189
-
190
- **Request help** (broadcasts to all with help flag):
191
-
192
- ```bash
193
- claude-orchestrator send-message --request-help --broadcast --content "How do I test the auth flow?"
194
- ```
195
-
196
- **Poll messages:**
197
-
198
- ```bash
199
- claude-orchestrator poll-message
200
- # [{ "id": "msg-...", "type": "direct", "from_name": "Tom", "content": "...", "read": true }]
201
- ```
202
-
203
- **Delete a message:**
204
-
205
- ```bash
206
- claude-orchestrator delete-message --message-id msg-0000000000
207
- ```
208
-
209
- ### Config
210
-
211
- ```bash
212
- claude-orchestrator config
213
- # Shows global and project configuration
214
- ```
215
-
216
- ## Roles
217
-
218
- | Role | Value | Typical behavior |
219
- |------|-------|-----------------|
220
- | Leader | `leader` | Runs TUI, monitors team, recovers orphaned tasks |
221
- | Planner | `planner` | Uses `task-planning` + `task-traceability` skills |
222
- | Builder | `builder` | Uses `task-execution` + `task-traceability` skills |
223
- | Verifier | `verifier` | Uses `task-verification` + `task-traceability` skills |
224
- | Reviewer | `reviewer` | Uses `task-review` + `task-traceability` skills |
225
- | Accepter | `accepter` | Uses `task-acceptance` + `task-traceability` skills |
226
-
227
- ## Workflow
228
-
229
- A typical agent session:
230
-
231
- ```bash
232
- # 1. Initialize (first time only)
233
- claude-orchestrator setup --name Jerry --role builder
234
-
235
- # 2. Join the team — Worker Watcher auto-processes incoming messages via claude -p
236
- claude-orchestrator register
237
- # Press Ctrl+C to stop and unregister
238
- ```
239
-
240
- ## Error recovery
241
-
242
- - **ZooKeeper not connected**: check `docker-compose ps`, retry. ZK client auto-reconnects.
243
- - **"No instance_id found"**: run `setup` first, or check `.claude-orchestrator/config.json`
244
- - **Registration expired**: ephemeral nodes cleaned up on disconnect. Re-register to restore identity.
95
+ | Skill File | When to Read |
96
+ |------------|-------------|
97
+ | `.claude/skills/task-traceability/SKILL.md` | Every link foundation |
98
+ | `.claude/skills/task-planning/SKILL.md` | Plan link only |
99
+ | `.claude/skills/task-execution/SKILL.md` | Build link only |
100
+ | `.claude/skills/task-verification/SKILL.md` | Verify link only |
101
+ | `.claude/skills/task-review/SKILL.md` | Review link only |
102
+ | `.claude/skills/task-acceptance/SKILL.md` | Accept link only |
@@ -0,0 +1,48 @@
1
+ Your link in the responsibility chain is **Accept** — the final gate. Validate the complete deliverable against business acceptance criteria. Make the Go/No-Go decision. No conditional pass.
2
+
3
+ ## Step 0: Restore Directory Memory
4
+
5
+ Read `.claude-orchestrator/docs/{{name}}/YYYY-MM-DD/CLAUDE.md` to restore session context (create the directory and seed it if new). Read your personal CLAUDE.md at `.claude-orchestrator/docs/{{name}}/CLAUDE.md`.
6
+
7
+ ## Task
8
+
9
+ - **Title**: {{task_title}}
10
+ - **Description**: {{task_description}}
11
+ - **Criteria**: {{task_criteria}}
12
+ - **Spec**: {{task_doc_path}}
13
+
14
+ ## Process
15
+
16
+ Use the **task-acceptance** skill (read `.claude/skills/task-acceptance/SKILL.md`).
17
+
18
+ **Read all four upstream artifacts (required)**:
19
+ 1. `.claude-orchestrator/docs/{planner_name}/YYYY-MM-DD/blueprint.md`
20
+ 2. `.claude-orchestrator/docs/{builder_name}/YYYY-MM-DD/traceability-map.md`
21
+ 3. `.claude-orchestrator/docs/{verifier_name}/YYYY-MM-DD/verification-map.md`
22
+ 4. `.claude-orchestrator/docs/{reviewer_name}/YYYY-MM-DD/review-judgment.md`
23
+ Fallback: `{{task_doc_path}}`. If any is missing → cannot accept, report to Leader.
24
+
25
+ For each acceptance criterion: does the deliverable exist? Are Verifier FAILUREs resolved? Are Reviewer CONCERNs addressed? Is evidence independently verifiable?
26
+
27
+ - **GO**: All criteria met. Zero issues.
28
+ - **NO-GO**: Any criterion unmet. Specify what's missing and which link must address it.
29
+
30
+ ## Outputs
31
+
32
+ 1. Write acceptance report to **{{result_path}}** (for Leader)
33
+ 2. Write identical copy to **.claude-orchestrator/docs/{{name}}/YYYY-MM-DD/acceptance-report.md**
34
+
35
+ ## Completion Report
36
+
37
+ ```
38
+ Link: accept
39
+ Status: completed
40
+ Decision: GO | NO-GO
41
+ Criteria Checked: <count> | Passed: <count> | Failed: <count>
42
+ Upstream Issues: Verifier FAILUREs <resolved>/<total>, Reviewer CONCERNs <addressed>/<total>
43
+ Failed Criteria (NO-GO): <list each with responsible link>
44
+ Acceptance Report: .claude-orchestrator/docs/{{name}}/YYYY-MM-DD/acceptance-report.md
45
+ Upstream Artifacts Read: <list all four paths>
46
+ ```
47
+
48
+ Update `.claude-orchestrator/docs/{{name}}/YYYY-MM-DD/CLAUDE.md`.
@@ -0,0 +1,38 @@
1
+ Your link in the responsibility chain is **Build** — produce verifiable results according to the Planner's blueprint.
2
+
3
+ ## Step 0: Restore Directory Memory
4
+
5
+ Read `.claude-orchestrator/docs/{{name}}/YYYY-MM-DD/CLAUDE.md` to restore session context (create the directory and seed it if new). Read your personal CLAUDE.md at `.claude-orchestrator/docs/{{name}}/CLAUDE.md`.
6
+
7
+ ## Task
8
+
9
+ - **Title**: {{task_title}}
10
+ - **Description**: {{task_description}}
11
+ - **Criteria**: {{task_criteria}}
12
+ - **Spec**: {{task_doc_path}}
13
+
14
+ ## Process
15
+
16
+ Use the **task-execution** skill (read `.claude/skills/task-execution/SKILL.md`). Use **task-traceability** (`.claude/skills/task-traceability/SKILL.md`) as the foundational layer. Follow Trace → Execute → Map → Evidence → Record.
17
+
18
+ **Trace**: Read the Planner's blueprint from `.claude-orchestrator/docs/{planner_name}/YYYY-MM-DD/blueprint.md`. Fallback: `{{task_doc_path}}`. Extract every implementable requirement as a checklist.
19
+
20
+ ## Outputs
21
+
22
+ 1. Write traceability map to **{{result_path}}** (for Leader evaluation)
23
+ 2. Write identical copy to **.claude-orchestrator/docs/{{name}}/YYYY-MM-DD/traceability-map.md** (for Verifier)
24
+ 3. Save evidence files to **.claude-orchestrator/docs/{{name}}/YYYY-MM-DD/evidence/**
25
+
26
+ ## Completion Report
27
+
28
+ ```
29
+ Link: build
30
+ Status: completed
31
+ Implemented: <count> items
32
+ Deviations: <count> items (list each with reason)
33
+ Evidence: .claude-orchestrator/docs/{{name}}/YYYY-MM-DD/evidence/
34
+ Traceability Map: .claude-orchestrator/docs/{{name}}/YYYY-MM-DD/traceability-map.md
35
+ Next Link Ready: yes
36
+ ```
37
+
38
+ Update `.claude-orchestrator/docs/{{name}}/YYYY-MM-DD/CLAUDE.md`. Git commit with your name signature.
@@ -0,0 +1,40 @@
1
+ Break down the requirement below into a chain of tasks following the Plan → Build → Verify → Review → Accept responsibility chain.
2
+
3
+ ## Step 0: Restore Directory Memory
4
+
5
+ Read `.claude-orchestrator/docs/{{name}}/YYYY-MM-DD/CLAUDE.md` (use today's date) to restore session context. If it doesn't exist, create the directory and seed it with today's date, your name and role. Read your personal CLAUDE.md at `.claude-orchestrator/docs/{{name}}/CLAUDE.md` for role-specific rules.
6
+
7
+ ## Requirement
8
+
9
+ {{task_description}}
10
+
11
+ ## Instructions
12
+
13
+ 1. Analyze the requirement. Identify how many independent delivery chains are needed.
14
+ 2. For each chain, define five link tasks. Plan is optional (set to null when the requirement is clear enough to build directly). Build, Verify, Review, and Accept are mandatory.
15
+ 3. For each task, specify objectively verifiable completion criteria — use concrete commands and expected outputs, not vague descriptions.
16
+ 4. Assign priority: 0 (urgent), 1 (high), 2 (normal).
17
+
18
+ ## Output
19
+
20
+ Write the result to {{result_path}}. Also save a copy to `.claude-orchestrator/docs/{{name}}/YYYY-MM-DD/chain-def.json`.
21
+
22
+ ```json
23
+ {
24
+ "chain_id": "chain-<seq>",
25
+ "chain_title": "<short summary>",
26
+ "tasks": {
27
+ "plan": {"title": "<title>", "description": "<desc>", "criteria": "<verifiable criteria>", "priority": 1} | null,
28
+ "build": {"title": "<title>", "description": "<desc>", "criteria": "<verifiable criteria>", "priority": 1},
29
+ "verify": {"title": "<title>", "description": "<what and how to verify>", "criteria": "<verifiable criteria>", "priority": 1},
30
+ "review": {"title": "<title>", "description": "<what to review>", "criteria": "<verifiable criteria>", "priority": 1},
31
+ "accept": {"title": "<title>", "description": "<what to validate>", "criteria": "<verifiable criteria>", "priority": 1}
32
+ }
33
+ }
34
+ ```
35
+
36
+ Output ONLY the JSON. No explanation.
37
+
38
+ ## Record
39
+
40
+ After completion, update `.claude-orchestrator/docs/{{name}}/YYYY-MM-DD/CLAUDE.md` with the chain_id and chain_title.
@@ -0,0 +1,49 @@
1
+ You just completed a task in the Plan → Build → Verify → Review → Accept responsibility chain. Evaluate your own output and decide the next action.
2
+
3
+ ## Task Context
4
+
5
+ - **Link**: {{link}}
6
+ - **Title**: {{task_title}}
7
+ - **Description**: {{task_description}}
8
+ - **Criteria**: {{task_criteria}}
9
+
10
+ ## Your Result
11
+
12
+ Review your work at {{task_result_path}}.
13
+
14
+ ## Directory Memory Check
15
+
16
+ Before evaluating, verify:
17
+ 1. Does `.claude-orchestrator/docs/{{name}}/YYYY-MM-DD/` contain the expected artifact for your link?
18
+ - plan → `blueprint.md`
19
+ - build → `traceability-map.md` + `evidence/`
20
+ - verify → `verification-map.md` + `evidence/`
21
+ - review → `review-judgment.md`
22
+ - accept → `acceptance-report.md`
23
+ 2. Has `.claude-orchestrator/docs/{{name}}/YYYY-MM-DD/CLAUDE.md` been updated?
24
+ 3. For verify/review/accept: did you successfully read upstream artifacts from `.claude-orchestrator/docs/`?
25
+
26
+ ## Decision Rules
27
+
28
+ 1. **Criteria fully met** AND output artifacts are in place → `activate_next`
29
+ 2. **Criteria partially met** OR artifacts missing from docs → `feedback` (describe what's missing)
30
+ 3. **Criteria not met** → `feedback` with clear explanation
31
+ 4. **Accept link passes** → `close_chain`
32
+
33
+ For verify/review/accept: if upstream artifacts were missing from `.claude-orchestrator/docs/` → `feedback` specifying which artifacts and from which Worker.
34
+
35
+ ## Output
36
+
37
+ Output exactly one JSON. Write to {{result_path}}.
38
+
39
+ ```json
40
+ {
41
+ "decision": "activate_next" | "feedback" | "close_chain",
42
+ "reason": "<one-line explanation>",
43
+ "feedback": "<only if feedback: what to improve or which artifact is missing>",
44
+ "nextLink": "<build|verify|review|accept>",
45
+ "suggestedWorker": null
46
+ }
47
+ ```
48
+
49
+ Output ONLY the JSON. No explanation.
@@ -0,0 +1,36 @@
1
+ Your link in the responsibility chain is **Plan** — define the blueprint that Build, Verify, Review, and Accept will follow.
2
+
3
+ ## Step 0: Restore Directory Memory
4
+
5
+ Read `.claude-orchestrator/docs/{{name}}/YYYY-MM-DD/CLAUDE.md` to restore session context (create the directory and seed it if new). Read your personal CLAUDE.md at `.claude-orchestrator/docs/{{name}}/CLAUDE.md`.
6
+
7
+ ## Task
8
+
9
+ - **Title**: {{task_title}}
10
+ - **Description**: {{task_description}}
11
+ - **Criteria**: {{task_criteria}}
12
+ - **Spec**: {{task_doc_path}}
13
+
14
+ ## Process
15
+
16
+ Use the **task-planning** skill (read `.claude/skills/task-planning/SKILL.md`). Use **task-traceability** (`.claude/skills/task-traceability/SKILL.md`) as the foundational layer. Follow Trace → Execute → Map → Evidence → Record.
17
+
18
+ ## Outputs
19
+
20
+ 1. Write blueprint to **{{result_path}}** (for Leader evaluation)
21
+ 2. Write identical copy to **.claude-orchestrator/docs/{{name}}/YYYY-MM-DD/blueprint.md** (for downstream Workers)
22
+
23
+ Blueprint must be self-contained with architecture, interfaces, data flow, and concrete build steps with verifiable criteria.
24
+
25
+ ## Completion Report
26
+
27
+ ```
28
+ Link: plan
29
+ Status: completed
30
+ Blueprint Summary: <one paragraph>
31
+ Build Steps: <count> steps listed
32
+ Self-Check: all passed | <items needing attention>
33
+ Blueprint Path: .claude-orchestrator/docs/{{name}}/YYYY-MM-DD/blueprint.md
34
+ ```
35
+
36
+ Update `.claude-orchestrator/docs/{{name}}/YYYY-MM-DD/CLAUDE.md` with completion status.
@@ -0,0 +1,42 @@
1
+ Your link in the responsibility chain is **Review** — the quality gate. Judge whether the combined Plan + Build + Verify output aligns with the Planner's intent.
2
+
3
+ ## Step 0: Restore Directory Memory
4
+
5
+ Read `.claude-orchestrator/docs/{{name}}/YYYY-MM-DD/CLAUDE.md` to restore session context (create the directory and seed it if new). Read your personal CLAUDE.md at `.claude-orchestrator/docs/{{name}}/CLAUDE.md`.
6
+
7
+ ## Task
8
+
9
+ - **Title**: {{task_title}}
10
+ - **Description**: {{task_description}}
11
+ - **Criteria**: {{task_criteria}}
12
+ - **Spec**: {{task_doc_path}}
13
+
14
+ ## Process
15
+
16
+ Use the **task-review** skill (read `.claude/skills/task-review/SKILL.md`). Use **task-traceability** (`.claude/skills/task-traceability/SKILL.md`) as the foundational layer. Follow Trace → Execute → Map → Evidence → Record.
17
+
18
+ **Trace — Read all three upstream artifacts (required)**:
19
+ 1. `.claude-orchestrator/docs/{planner_name}/YYYY-MM-DD/blueprint.md`
20
+ 2. `.claude-orchestrator/docs/{builder_name}/YYYY-MM-DD/traceability-map.md`
21
+ 3. `.claude-orchestrator/docs/{verifier_name}/YYYY-MM-DD/verification-map.md`
22
+ Fallback: `{{task_doc_path}}`. If any is missing → cannot review, report to Leader.
23
+
24
+ For each checklist item: ACCEPT (meets intent), CONCERN (specify which link addresses it), or REJECT (fundamentally fails).
25
+
26
+ ## Outputs
27
+
28
+ 1. Write review judgment to **{{result_path}}** (for Leader evaluation)
29
+ 2. Write identical copy to **.claude-orchestrator/docs/{{name}}/YYYY-MM-DD/review-judgment.md** (for Accepter)
30
+
31
+ ## Completion Report
32
+
33
+ ```
34
+ Link: review
35
+ Status: completed
36
+ Decision: PASS | FEEDBACK | REJECT
37
+ Accepted: <count> | Concerns: <count> | Rejected: <count>
38
+ Review Judgment: .claude-orchestrator/docs/{{name}}/YYYY-MM-DD/review-judgment.md
39
+ Upstream Artifacts Read: <list all three paths>
40
+ ```
41
+
42
+ Update `.claude-orchestrator/docs/{{name}}/YYYY-MM-DD/CLAUDE.md`.
@@ -0,0 +1,44 @@
1
+ Your link in the responsibility chain is **Verify** — independently check the Builder's output against the Planner's blueprint. This forms the responsibility chain closed loop.
2
+
3
+ ## Step 0: Restore Directory Memory
4
+
5
+ Read `.claude-orchestrator/docs/{{name}}/YYYY-MM-DD/CLAUDE.md` to restore session context (create the directory and seed it if new). Read your personal CLAUDE.md at `.claude-orchestrator/docs/{{name}}/CLAUDE.md`.
6
+
7
+ ## Task
8
+
9
+ - **Title**: {{task_title}}
10
+ - **Description**: {{task_description}}
11
+ - **Criteria**: {{task_criteria}}
12
+ - **Spec**: {{task_doc_path}}
13
+
14
+ ## Process
15
+
16
+ Use the **task-verification** skill (read `.claude/skills/task-verification/SKILL.md`). Use **task-traceability** (`.claude/skills/task-traceability/SKILL.md`) as the foundational layer. Follow Trace → Execute → Map → Evidence → Record.
17
+
18
+ **Trace — Collect upstream artifacts (required)**:
19
+ 1. Planner blueprint: `.claude-orchestrator/docs/{planner_name}/YYYY-MM-DD/blueprint.md`
20
+ 2. Builder traceability map: `.claude-orchestrator/docs/{builder_name}/YYYY-MM-DD/traceability-map.md`
21
+ Fallback: `{{task_doc_path}}`. If either is missing → BLOCKED, report to Leader.
22
+
23
+ Cross-reference to build a verification checklist. Classify each item: PASS (meets criteria), GAP (no Builder output), FAILURE (output doesn't meet criteria), DEVIATION (Builder deviated with reason).
24
+
25
+ ## Outputs
26
+
27
+ 1. Write verification map to **{{result_path}}** (for Leader evaluation)
28
+ 2. Write identical copy to **.claude-orchestrator/docs/{{name}}/YYYY-MM-DD/verification-map.md** (for Reviewer)
29
+ 3. Save evidence files to **.claude-orchestrator/docs/{{name}}/YYYY-MM-DD/evidence/**
30
+
31
+ ## Completion Report
32
+
33
+ ```
34
+ Link: verify
35
+ Status: completed
36
+ Verified: <count> | Passed: <count> | Gaps: <count> | Failures: <count>
37
+ Recommendation: proceed | needs fixes (<specific fixes>)
38
+ Upstream Artifacts:
39
+ - Blueprint: .claude-orchestrator/docs/{planner}/YYYY-MM-DD/blueprint.md
40
+ - Traceability: .claude-orchestrator/docs/{builder}/YYYY-MM-DD/traceability-map.md
41
+ Verification Map: .claude-orchestrator/docs/{{name}}/YYYY-MM-DD/verification-map.md
42
+ ```
43
+
44
+ Update `.claude-orchestrator/docs/{{name}}/YYYY-MM-DD/CLAUDE.md`.