@chorus-aidlc/chorus-openclaw-plugin 0.16.0 → 0.16.2

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.
@@ -67,6 +67,21 @@ export declare class ChorusEventRouter {
67
67
  * Instructs the agent to @mention the actor after completing work.
68
68
  */
69
69
  private buildMentionGuidance;
70
+ /**
71
+ * Orchestrator-handoff guidance for a wake — the OpenClaw twin of the daemon's
72
+ * orchestratorGuidance in cli/prompts.mjs. KEEP THE TWO WORDINGS IN SYNC. Returns
73
+ * null unless the resource has an AGENT orchestrator; a human-assigned resource
74
+ * hands back to the human via the actor @mention above (buildMentionGuidance).
75
+ */
76
+ private buildOrchestratorGuidance;
77
+ /**
78
+ * Append orchestrator-handoff guidance (when the resource has an agent orchestrator)
79
+ * to a wake message and dispatch it. Every handler routes its wake through this so the
80
+ * handback instruction rides EVERY action — parity with the daemon, which appends
81
+ * orchestratorGuidance once in buildPrompt (cli/prompts.mjs). No orchestrator → the
82
+ * message is dispatched unchanged.
83
+ */
84
+ private wakeWithHandoff;
70
85
  private handleTaskAssigned;
71
86
  private handleMentioned;
72
87
  private handleElaborationRequested;
@@ -1 +1 @@
1
- {"version":3,"file":"event-router.d.ts","sourceRoot":"","sources":["../src/event-router.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AA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,CAAC,QAAQ,CAAC,MAAM,CAAqC;gBAEhD,IAAI,EAAE,wBAAwB;IAO1C;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,oBAAoB,GAAG,IAAI;IAgC3C;;;;OAIG;IACH,OAAO,CAAC,aAAa;YAIP,aAAa;IA8F3B;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAO5B;;;;;OAKG;IACH,OAAO,CAAC,yBAAyB;IAYjC;;;;;;OAMG;IACH,OAAO,CAAC,eAAe;IAUvB,OAAO,CAAC,kBAAkB;IAW1B,OAAO,CAAC,eAAe;IAavB,OAAO,CAAC,0BAA0B;IASlC,OAAO,CAAC,sBAAsB;IAc9B,OAAO,CAAC,sBAAsB;IAc9B,OAAO,CAAC,iBAAiB;IAazB,OAAO,CAAC,kBAAkB;IAU1B,OAAO,CAAC,kBAAkB;IAY1B,OAAO,CAAC,yBAAyB;IAgBjC;;;;;;OAMG;IACH,OAAO,CAAC,yBAAyB;IAcjC;;;;;;OAMG;IACH,OAAO,CAAC,sBAAsB;IAiB9B;;;;;;;;OAQG;IACH,OAAO,CAAC,mBAAmB;CAgB5B"}
@@ -147,56 +147,83 @@ export class ChorusEventRouter {
147
147
  return (`After completing your work, post a comment on this ${entityType} using chorus_add_comment with @mention:\n` +
148
148
  `Use this exact mention format: @[${n.actorName}](${n.actorType}:${n.actorUuid})`);
149
149
  }
150
+ /**
151
+ * Orchestrator-handoff guidance for a wake — the OpenClaw twin of the daemon's
152
+ * orchestratorGuidance in cli/prompts.mjs. KEEP THE TWO WORDINGS IN SYNC. Returns
153
+ * null unless the resource has an AGENT orchestrator; a human-assigned resource
154
+ * hands back to the human via the actor @mention above (buildMentionGuidance).
155
+ */
156
+ buildOrchestratorGuidance(n) {
157
+ if (n.orchestrator?.type !== "agent")
158
+ return null;
159
+ return (`Your orchestrator for this resource is @${n.orchestrator.name}.\n` +
160
+ `At a human-only gate you cannot cross, or when this child resource is complete, hand control ` +
161
+ `back by commenting on the resource and mentioning ` +
162
+ `@[${n.orchestrator.name}](agent:${n.orchestrator.uuid}) with the decision needed or completion ` +
163
+ `evidence, then leave any human-gated resource pending and end the turn. Do not @mention the ` +
164
+ `orchestrator for ordinary internal progress.`);
165
+ }
166
+ /**
167
+ * Append orchestrator-handoff guidance (when the resource has an agent orchestrator)
168
+ * to a wake message and dispatch it. Every handler routes its wake through this so the
169
+ * handback instruction rides EVERY action — parity with the daemon, which appends
170
+ * orchestratorGuidance once in buildPrompt (cli/prompts.mjs). No orchestrator → the
171
+ * message is dispatched unchanged.
172
+ */
173
+ wakeWithHandoff(message, contextKey, n, attr) {
174
+ const handoff = this.buildOrchestratorGuidance(n);
175
+ this.wake(handoff ? `${message}\n\n${handoff}` : message, contextKey, attr);
176
+ }
150
177
  handleTaskAssigned(n, attr) {
151
178
  const mentionGuidance = this.buildMentionGuidance(n, "task");
152
- this.wake(`[Chorus] Task assigned: ${n.entityTitle}. Task UUID: ${n.entityUuid}, Project UUID: ${n.projectUuid}. Use chorus_get_task to review the task, then chorus_claim_task to start work.\n${mentionGuidance}`, this.contextKeyFor("task_assigned", n.entityUuid), attr);
179
+ this.wakeWithHandoff(`[Chorus] Task assigned: ${n.entityTitle}. Task UUID: ${n.entityUuid}, Project UUID: ${n.projectUuid}. Use chorus_get_task to review the task, then chorus_claim_task to start work.\n${mentionGuidance}`, this.contextKeyFor("task_assigned", n.entityUuid), n, attr);
153
180
  }
154
181
  handleMentioned(n, attr) {
155
182
  const mentionGuidance = this.buildMentionGuidance(n, n.entityType);
156
- this.wake(`[Chorus] You were @mentioned in ${n.entityType} '${n.entityTitle}' (entityType: ${n.entityType}, entityUuid: ${n.entityUuid}, projectUuid: ${n.projectUuid}): ${n.message}\n` +
183
+ this.wakeWithHandoff(`[Chorus] You were @mentioned in ${n.entityType} '${n.entityTitle}' (entityType: ${n.entityType}, entityUuid: ${n.entityUuid}, projectUuid: ${n.projectUuid}): ${n.message}\n` +
157
184
  `Review the ${n.entityType} content and use chorus_get_comments (targetType: "${n.entityType}", targetUuid: "${n.entityUuid}") to see the full conversation, then respond.\n` +
158
- mentionGuidance, this.contextKeyFor("mentioned", n.entityUuid), attr);
185
+ mentionGuidance, this.contextKeyFor("mentioned", n.entityUuid), n, attr);
159
186
  }
160
187
  handleElaborationRequested(n, attr) {
161
- this.wake(`[Chorus] Elaboration requested for idea '${n.entityTitle}' (ideaUuid: ${n.entityUuid}, projectUuid: ${n.projectUuid}). Use chorus_get_elaboration to review questions.`, this.contextKeyFor("elaboration_requested", n.entityUuid), attr);
188
+ this.wakeWithHandoff(`[Chorus] Elaboration requested for idea '${n.entityTitle}' (ideaUuid: ${n.entityUuid}, projectUuid: ${n.projectUuid}). Use chorus_get_elaboration to review questions.`, this.contextKeyFor("elaboration_requested", n.entityUuid), n, attr);
162
189
  }
163
190
  handleProposalRejected(n, attr) {
164
191
  const mentionGuidance = this.buildMentionGuidance(n, "proposal");
165
- this.wake(`[Chorus] Proposal '${n.entityTitle}' was REJECTED (proposalUuid: ${n.entityUuid}, projectUuid: ${n.projectUuid}). Review note: "${n.message}". ` +
192
+ this.wakeWithHandoff(`[Chorus] Proposal '${n.entityTitle}' was REJECTED (proposalUuid: ${n.entityUuid}, projectUuid: ${n.projectUuid}). Review note: "${n.message}". ` +
166
193
  `Use chorus_get_proposal to review the proposal, then fix issues with chorus_update_task_draft / chorus_update_document_draft. ` +
167
194
  `After fixing, call chorus_validate_proposal then chorus_submit_proposal to resubmit.\n` +
168
- mentionGuidance, this.contextKeyFor("proposal_rejected", n.entityUuid), attr);
195
+ mentionGuidance, this.contextKeyFor("proposal_rejected", n.entityUuid), n, attr);
169
196
  }
170
197
  handleProposalApproved(n, attr) {
171
198
  const mentionGuidance = this.buildMentionGuidance(n, "proposal");
172
199
  const reviewInfo = n.message.includes("Note: ") ? ` Review note: "${n.message.split("Note: ").pop()}"` : "";
173
- this.wake(`[Chorus] Proposal '${n.entityTitle}' was APPROVED (proposalUuid: ${n.entityUuid}, projectUuid: ${n.projectUuid})!${reviewInfo} Documents and tasks have been created. ` +
200
+ this.wakeWithHandoff(`[Chorus] Proposal '${n.entityTitle}' was APPROVED (proposalUuid: ${n.entityUuid}, projectUuid: ${n.projectUuid})!${reviewInfo} Documents and tasks have been created. ` +
174
201
  `Use chorus_get_available_tasks with projectUuid: "${n.projectUuid}" to see the new tasks ready for work.\n` +
175
- mentionGuidance, this.contextKeyFor("proposal_approved", n.entityUuid), attr);
202
+ mentionGuidance, this.contextKeyFor("proposal_approved", n.entityUuid), n, attr);
176
203
  }
177
204
  handleIdeaClaimed(n, attr) {
178
205
  const mentionGuidance = this.buildMentionGuidance(n, "idea");
179
- this.wake(`[Chorus] Idea '${n.entityTitle}' has been assigned to you (ideaUuid: ${n.entityUuid}, projectUuid: ${n.projectUuid}). ` +
206
+ this.wakeWithHandoff(`[Chorus] Idea '${n.entityTitle}' has been assigned to you (ideaUuid: ${n.entityUuid}, projectUuid: ${n.projectUuid}). ` +
180
207
  `Use chorus_get_idea to review the idea, then chorus_claim_idea to start elaboration.\n` +
181
- mentionGuidance, this.contextKeyFor("idea_claimed", n.entityUuid), attr);
208
+ mentionGuidance, this.contextKeyFor("idea_claimed", n.entityUuid), n, attr);
182
209
  }
183
210
  handleTaskVerified(n, attr) {
184
- this.wake(`[Chorus] Task '${n.entityTitle}' has been verified and is now done (taskUuid: ${n.entityUuid}, projectUuid: ${n.projectUuid}). ` +
185
- `Check if this unblocks other tasks: use chorus_get_unblocked_tasks with projectUuid "${n.projectUuid}" to find tasks that are now ready to start.`, this.contextKeyFor("task_verified", n.entityUuid), attr);
211
+ this.wakeWithHandoff(`[Chorus] Task '${n.entityTitle}' has been verified and is now done (taskUuid: ${n.entityUuid}, projectUuid: ${n.projectUuid}). ` +
212
+ `Check if this unblocks other tasks: use chorus_get_unblocked_tasks with projectUuid "${n.projectUuid}" to find tasks that are now ready to start.`, this.contextKeyFor("task_verified", n.entityUuid), n, attr);
186
213
  }
187
214
  handleTaskReopened(n, attr) {
188
215
  const mentionGuidance = this.buildMentionGuidance(n, "task");
189
- this.wake(`[Chorus] Task '${n.entityTitle}' has been reopened and needs rework (taskUuid: ${n.entityUuid}, projectUuid: ${n.projectUuid}). ` +
190
- `Use chorus_get_task to review the task and chorus_get_comments to see verification feedback, then fix the issues.\n${mentionGuidance}`, this.contextKeyFor("task_reopened", n.entityUuid), attr);
216
+ this.wakeWithHandoff(`[Chorus] Task '${n.entityTitle}' has been reopened and needs rework (taskUuid: ${n.entityUuid}, projectUuid: ${n.projectUuid}). ` +
217
+ `Use chorus_get_task to review the task and chorus_get_comments to see verification feedback, then fix the issues.\n${mentionGuidance}`, this.contextKeyFor("task_reopened", n.entityUuid), n, attr);
191
218
  }
192
219
  handleElaborationAnswered(n, attr) {
193
220
  const mentionGuidance = this.buildMentionGuidance(n, "idea");
194
- this.wake(`[Chorus] Elaboration answers submitted for idea '${n.entityTitle}' (ideaUuid: ${n.entityUuid}, projectUuid: ${n.projectUuid}). ` +
221
+ this.wakeWithHandoff(`[Chorus] Elaboration answers submitted for idea '${n.entityTitle}' (ideaUuid: ${n.entityUuid}, projectUuid: ${n.projectUuid}). ` +
195
222
  `Review the answers with chorus_get_elaboration, then either:\n` +
196
223
  `- Call chorus_validate_elaboration with empty issues [] to resolve and proceed to proposal creation\n` +
197
224
  `- Call chorus_validate_elaboration with issues + followUpQuestions for another round\n\n` +
198
225
  `After reviewing, @mention the answerer to ask if they have any further questions before you proceed.\n` +
199
- mentionGuidance, this.contextKeyFor("elaboration_answered", n.entityUuid), attr);
226
+ mentionGuidance, this.contextKeyFor("elaboration_answered", n.entityUuid), n, attr);
200
227
  }
201
228
  /**
202
229
  * A human clicked "Verify Elaborate" (add-elaboration-verify-wake). The elaboration
@@ -207,10 +234,10 @@ export class ChorusEventRouter {
207
234
  */
208
235
  handleElaborationVerified(n, attr) {
209
236
  const mentionGuidance = this.buildMentionGuidance(n, "idea");
210
- this.wake(`[Chorus] Elaboration for idea '${n.entityTitle}' was VERIFIED by a human (ideaUuid: ${n.entityUuid}, projectUuid: ${n.projectUuid}). ` +
237
+ this.wakeWithHandoff(`[Chorus] Elaboration for idea '${n.entityTitle}' was VERIFIED by a human (ideaUuid: ${n.entityUuid}, projectUuid: ${n.projectUuid}). ` +
211
238
  `The idea is now elaborated — do NOT answer elaboration questions. Proceed to WRITE THE PROPOSAL: gather context with ` +
212
239
  `chorus_get_idea and chorus_get_elaboration, then author the proposal via the existing proposal flow ` +
213
- `(chorus_pm_create_proposal / the proposal skill).\n${mentionGuidance}`, this.contextKeyFor("elaboration_verified", n.entityUuid), attr);
240
+ `(chorus_pm_create_proposal / the proposal skill).\n${mentionGuidance}`, this.contextKeyFor("elaboration_verified", n.entityUuid), n, attr);
214
241
  }
215
242
  /**
216
243
  * A human clicked "Start Development" (add-stage-advance-start-development). The idea's
@@ -221,13 +248,13 @@ export class ChorusEventRouter {
221
248
  */
222
249
  handleStartDevelopment(n, attr) {
223
250
  const mentionGuidance = this.buildMentionGuidance(n, "idea");
224
- this.wake(`[Chorus] A human started DEVELOPMENT for idea '${n.entityTitle}' (ideaUuid: ${n.entityUuid}, projectUuid: ${n.projectUuid}). ` +
251
+ this.wakeWithHandoff(`[Chorus] A human started DEVELOPMENT for idea '${n.entityTitle}' (ideaUuid: ${n.entityUuid}, projectUuid: ${n.projectUuid}). ` +
225
252
  `The idea's proposal is approved and unfinished tasks remain. Claim and execute ALL remaining tasks of that proposal in ` +
226
253
  `dependency order, following the develop workflow: repeatedly find claimable tasks (chorus_get_unblocked_tasks with ` +
227
254
  `projectUuid: "${n.projectUuid}"), claim one (chorus_claim_task), implement it, self-check its acceptance criteria ` +
228
255
  `(chorus_report_criteria_self_check), and submit it (chorus_submit_for_verify) — then loop until NO claimable task remains. ` +
229
256
  `Do NOT stop after one task. Leave tasks already in to_verify (awaiting human verification) and tasks claimed by other ` +
230
- `sessions untouched. If nothing is claimable, post a brief status comment on the idea and end the turn.\n${mentionGuidance}`, this.contextKeyFor("start_development", n.entityUuid), attr);
257
+ `sessions untouched. If nothing is claimable, post a brief status comment on the idea and end the turn.\n${mentionGuidance}`, this.contextKeyFor("start_development", n.entityUuid), n, attr);
231
258
  }
232
259
  /**
233
260
  * A human clicked "Yolo" (add-stage-advance-yolo). Unlike start_development (always the
@@ -240,13 +267,13 @@ export class ChorusEventRouter {
240
267
  */
241
268
  handleYoloRequested(n, attr) {
242
269
  const mentionGuidance = this.buildMentionGuidance(n, "idea");
243
- this.wake(`[Chorus] A human requested a YOLO run for idea '${n.entityTitle}' (ideaUuid: ${n.entityUuid}, projectUuid: ${n.projectUuid}). ` +
270
+ this.wakeWithHandoff(`[Chorus] A human requested a YOLO run for idea '${n.entityTitle}' (ideaUuid: ${n.entityUuid}, projectUuid: ${n.projectUuid}). ` +
244
271
  `Drive this idea all the way to done following the yolo skill (the full-auto AI-DLC pipeline: Idea → Elaboration → Proposal → ` +
245
272
  `Execute → Verify). First read the idea's current state with chorus_get_idea (plus chorus_get_elaboration / ` +
246
273
  `chorus_get_proposals as needed) and RESUME from whatever phase it is already in — do NOT assume a fixed stage: if ` +
247
274
  `elaboration isn't resolved, self-elaborate then write the proposal; if a proposal is approved with open tasks, execute them; ` +
248
275
  `and so on. Complete the pipeline through the final done state and completion report, but do NOT merge or push a pull request ` +
249
- `without explicit human approval.\n${mentionGuidance}`, this.contextKeyFor("yolo_requested", n.entityUuid), attr);
276
+ `without explicit human approval.\n${mentionGuidance}`, this.contextKeyFor("yolo_requested", n.entityUuid), n, attr);
250
277
  }
251
278
  }
252
279
  //# sourceMappingURL=event-router.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"event-router.js","sourceRoot":"","sources":["../src/event-router.ts"],"names":[],"mappings":"AAmEA,MAAM,OAAO,iBAAiB;IACX,SAAS,CAAkB;IAC3B,IAAI,CAAe;IACnB,OAAO,CAAmB;IAC1B,MAAM,CAAqC;IAE5D,YAAY,IAA8B;QACxC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QAChC,IAAI,CAAC,IAAI,GAAG,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penClaw plugin for Chorus AI-DLC collaboration platform — native MCP + SSE real-time events",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -4,7 +4,7 @@ description: Optional divergent-then-convergent dialogue for fuzzy ideas. Invoke
4
4
  license: AGPL-3.0
5
5
  metadata:
6
6
  author: chorus
7
- version: "0.16.0"
7
+ version: "0.16.2"
8
8
  category: project-management
9
9
  mcp_server: chorus
10
10
  ---
@@ -4,7 +4,7 @@ description: Chorus AI Agent collaboration platform — overview, common tools,
4
4
  license: AGPL-3.0
5
5
  metadata:
6
6
  author: chorus
7
- version: "0.16.0"
7
+ version: "0.16.2"
8
8
  category: project-management
9
9
  mcp_server: chorus
10
10
  ---
@@ -71,7 +71,7 @@ All Agent roles can use the following tools for querying information and collabo
71
71
 
72
72
  The checkin response includes **owner/master information** for the agent:
73
73
  - `agent.owner`: `{ uuid, name, email }` or `null` — the human user who owns this agent
74
- - Use the owner info to know who to @mention for confirmations and approvals
74
+ - Use the owner info as one @mention target — but hand a finished or gated resource back to whoever engaged you (the human or agent that assigned, @mentioned, or woke you), which is not always your owner
75
75
 
76
76
  #### Project Filtering
77
77
 
@@ -197,7 +197,7 @@ Use @mentions to notify specific users or agents. Mention syntax: `@[DisplayName
197
197
  **When to @mention:**
198
198
  - **Elaboration completion** — confirm understanding with the answerer before validating (see `/idea`)
199
199
  - **Proposal creation/update** — notify stakeholders when submitting
200
- - **Task submission** — notify PM/owner for significant decisions
200
+ - **Handback & significant decisions** — @mention whoever engaged you (a human, or an agent orchestrator), not only the PM/owner
201
201
  - **Blocking issues** — notify relevant person for human input
202
202
 
203
203
  ### Search
@@ -4,7 +4,7 @@ description: Final ship-time review of an Idea's aggregate code change — the w
4
4
  license: AGPL-3.0
5
5
  metadata:
6
6
  author: chorus
7
- version: "0.16.0"
7
+ version: "0.16.2"
8
8
  category: project-management
9
9
  mcp_server: chorus
10
10
  ---
@@ -56,7 +56,7 @@ Read each task's work report (in its comments) — the developers describe what
56
56
  **Step 3: Review the whole-feature dimensions** (what per-task review cannot catch — cover each):
57
57
 
58
58
  1. **Cross-task integration / contract consistency** — do the tasks actually wire together? Interface contracts, return formats, error patterns, call points across module boundaries different tasks built.
59
- 2. **Architecture & convention consistency (no drift)** — does the aggregate conform to project patterns, or did tasks each invent their own approach? Duplicated logic, divergent naming, inconsistent layering.
59
+ 2. **Architecture & convention consistency (no drift)** — does the aggregate conform to project patterns and the rules its context files declare (CLAUDE.md / AGENTS.md / .cursorrules, if present), or did any task drift from them or violate a declared project-level constraint? Duplicated logic, divergent naming, inconsistent layering.
60
60
  3. **Security** — does the combination introduce a security risk (authz gaps at a seam, injection, secret handling, unsafe deserialization, missing tenant scoping) — especially risks visible only when the pieces are seen together.
61
61
  4. **Regression risk / impact on untouched areas / performance** — does the change break or degrade code no single task owned? N+1s, hot-path cost, shared-state contention.
62
62
  5. **Feature-level test coverage adequacy** — across the whole feature, are integration seams and end-to-end paths tested, or only per-task units? Gaps between tasks.
@@ -4,7 +4,7 @@ description: Chorus Development workflow — claim tasks, report work, manage se
4
4
  license: AGPL-3.0
5
5
  metadata:
6
6
  author: chorus
7
- version: "0.16.0"
7
+ version: "0.16.2"
8
8
  category: project-management
9
9
  mcp_server: chorus
10
10
  ---
@@ -4,7 +4,7 @@ description: Chorus documentation router — consult the live Chorus docs site t
4
4
  license: AGPL-3.0
5
5
  metadata:
6
6
  author: chorus
7
- version: "0.16.0"
7
+ version: "0.16.2"
8
8
  category: project-management
9
9
  mcp_server: chorus
10
10
  ---
@@ -4,7 +4,7 @@ description: Chorus Idea workflow — claim ideas, run elaboration rounds, and p
4
4
  license: AGPL-3.0
5
5
  metadata:
6
6
  author: chorus
7
- version: "0.16.0"
7
+ version: "0.16.2"
8
8
  category: project-management
9
9
  mcp_server: chorus
10
10
  ---
@@ -4,7 +4,7 @@ description: Opt-in OpenSpec-mode authoring for Chorus PM workflows on OpenClaw.
4
4
  license: AGPL-3.0
5
5
  metadata:
6
6
  author: chorus
7
- version: "0.16.0"
7
+ version: "0.16.2"
8
8
  category: project-management
9
9
  mcp_server: chorus
10
10
  ---
@@ -4,7 +4,7 @@ description: Chorus Proposal workflow — create proposals with document and tas
4
4
  license: AGPL-3.0
5
5
  metadata:
6
6
  author: chorus
7
- version: "0.16.0"
7
+ version: "0.16.2"
8
8
  category: project-management
9
9
  mcp_server: chorus
10
10
  ---
@@ -4,7 +4,7 @@ description: Adversarial read-only review of a submitted Chorus proposal — doc
4
4
  license: AGPL-3.0
5
5
  metadata:
6
6
  author: chorus
7
- version: "0.16.0"
7
+ version: "0.16.2"
8
8
  category: project-management
9
9
  mcp_server: chorus
10
10
  ---
@@ -52,6 +52,7 @@ chorus_get_elaboration({ ideaUuid: "<idea-uuid>" })
52
52
  - **Tech feasibility**: Does the architecture make sense? Missing auth, race conditions, no error handling?
53
53
  - **Module contracts**: If multiple tasks share interfaces, are return formats, error patterns, and call points defined?
54
54
  - **Hallucination risk**: Flag any specific external detail that looks LLM-fabricated (API signatures, model IDs, SDK versions, CLI flags, config keys, endpoint paths) as NOTE. The PM is an LLM — it confidently invents plausible-looking specifics.
55
+ - **Project constraints**: If the repo declares project rules in context files (CLAUDE.md / AGENTS.md / .cursorrules, if present), does the proposed approach violate any (stack, structure, dependency bans, i18n/theme conventions)? Conflict → BLOCKER.
55
56
 
56
57
  **Step 3: Review task drafts** — for each task draft, check:
57
58
  - **Granularity**: Each task should be cohesive and independently testable. 2–10 AC items is the sweet spot.
@@ -4,7 +4,7 @@ description: Quick Task workflow — skip Idea→Proposal, create tasks directly
4
4
  license: AGPL-3.0
5
5
  metadata:
6
6
  author: chorus
7
- version: "0.16.0"
7
+ version: "0.16.2"
8
8
  category: project-management
9
9
  mcp_server: chorus
10
10
  ---
@@ -4,7 +4,7 @@ description: Chorus Review workflow — approve/reject proposals, verify tasks,
4
4
  license: AGPL-3.0
5
5
  metadata:
6
6
  author: chorus
7
- version: "0.16.0"
7
+ version: "0.16.2"
8
8
  category: project-management
9
9
  mcp_server: chorus
10
10
  ---
@@ -4,7 +4,7 @@ description: Adversarial verification of a submitted Chorus task against its AC
4
4
  license: AGPL-3.0
5
5
  metadata:
6
6
  author: chorus
7
- version: "0.16.0"
7
+ version: "0.16.2"
8
8
  category: project-management
9
9
  mcp_server: chorus
10
10
  ---
@@ -50,7 +50,7 @@ chorus_get_document({ documentUuid: "<doc-uuid>" })
50
50
 
51
51
  **Step 3: Verify each AC independently.** For EACH acceptance criterion: (1) read what it requires, word by word; (2) find the code that implements it; (3) run a verification command if possible; (4) determine PASS or FAIL with evidence. Do NOT batch AC as "all look good." Check each one.
52
52
 
53
- **Step 4: Cross-reference with proposal documents.** Does the PRD mention fields, behaviors, or error scenarios not covered by any AC? Does the tech design specify contracts the code doesn't follow?
53
+ **Step 4: Cross-reference with proposal documents.** Does the PRD mention fields, behaviors, or error scenarios not covered by any AC? Does the tech design specify contracts the code doesn't follow? **Project constraints:** read the repo's context files (CLAUDE.md / AGENTS.md / .cursorrules, if present); code that violates a declared project-level rule → BLOCKER.
54
54
 
55
55
  **Step 5: Run tests/build if available.** A broken build or failing tests is an automatic FAIL. Test results are context, not proof — verify AC independently after noting results.
56
56
 
@@ -4,7 +4,7 @@ description: Full-auto AI-DLC pipeline — from prompt to done. Automates the en
4
4
  license: AGPL-3.0
5
5
  metadata:
6
6
  author: chorus
7
- version: "0.16.0"
7
+ version: "0.16.2"
8
8
  category: project-management
9
9
  mcp_server: chorus
10
10
  ---
@@ -63,6 +63,14 @@ interface NotificationDetail {
63
63
  actorType: string;
64
64
  actorUuid: string;
65
65
  actorName: string;
66
+ /**
67
+ * The agent orchestrator for this resource (server read-projection,
68
+ * add-agent-orchestrator-handoff). Present only when the resource was assigned by an
69
+ * agent; null/absent for human-assigned or unattributed resources. Mirrors the
70
+ * daemon's cli/prompts.mjs `orchestrator` field so buildOrchestratorGuidance can
71
+ * inject the same handback instruction the daemon does.
72
+ */
73
+ orchestrator?: { type: string; uuid: string; name: string } | null;
66
74
  }
67
75
 
68
76
  export class ChorusEventRouter {
@@ -228,12 +236,48 @@ export class ChorusEventRouter {
228
236
  );
229
237
  }
230
238
 
239
+ /**
240
+ * Orchestrator-handoff guidance for a wake — the OpenClaw twin of the daemon's
241
+ * orchestratorGuidance in cli/prompts.mjs. KEEP THE TWO WORDINGS IN SYNC. Returns
242
+ * null unless the resource has an AGENT orchestrator; a human-assigned resource
243
+ * hands back to the human via the actor @mention above (buildMentionGuidance).
244
+ */
245
+ private buildOrchestratorGuidance(n: NotificationDetail): string | null {
246
+ if (n.orchestrator?.type !== "agent") return null;
247
+ return (
248
+ `Your orchestrator for this resource is @${n.orchestrator.name}.\n` +
249
+ `At a human-only gate you cannot cross, or when this child resource is complete, hand control ` +
250
+ `back by commenting on the resource and mentioning ` +
251
+ `@[${n.orchestrator.name}](agent:${n.orchestrator.uuid}) with the decision needed or completion ` +
252
+ `evidence, then leave any human-gated resource pending and end the turn. Do not @mention the ` +
253
+ `orchestrator for ordinary internal progress.`
254
+ );
255
+ }
256
+
257
+ /**
258
+ * Append orchestrator-handoff guidance (when the resource has an agent orchestrator)
259
+ * to a wake message and dispatch it. Every handler routes its wake through this so the
260
+ * handback instruction rides EVERY action — parity with the daemon, which appends
261
+ * orchestratorGuidance once in buildPrompt (cli/prompts.mjs). No orchestrator → the
262
+ * message is dispatched unchanged.
263
+ */
264
+ private wakeWithHandoff(
265
+ message: string,
266
+ contextKey: string,
267
+ n: NotificationDetail,
268
+ attr: WakeAttribution,
269
+ ): void {
270
+ const handoff = this.buildOrchestratorGuidance(n);
271
+ this.wake(handoff ? `${message}\n\n${handoff}` : message, contextKey, attr);
272
+ }
273
+
231
274
  private handleTaskAssigned(n: NotificationDetail, attr: WakeAttribution): void {
232
275
  const mentionGuidance = this.buildMentionGuidance(n, "task");
233
276
 
234
- this.wake(
277
+ this.wakeWithHandoff(
235
278
  `[Chorus] Task assigned: ${n.entityTitle}. Task UUID: ${n.entityUuid}, Project UUID: ${n.projectUuid}. Use chorus_get_task to review the task, then chorus_claim_task to start work.\n${mentionGuidance}`,
236
279
  this.contextKeyFor("task_assigned", n.entityUuid),
280
+ n,
237
281
  attr
238
282
  );
239
283
  }
@@ -241,19 +285,21 @@ export class ChorusEventRouter {
241
285
  private handleMentioned(n: NotificationDetail, attr: WakeAttribution): void {
242
286
  const mentionGuidance = this.buildMentionGuidance(n, n.entityType);
243
287
 
244
- this.wake(
288
+ this.wakeWithHandoff(
245
289
  `[Chorus] You were @mentioned in ${n.entityType} '${n.entityTitle}' (entityType: ${n.entityType}, entityUuid: ${n.entityUuid}, projectUuid: ${n.projectUuid}): ${n.message}\n` +
246
290
  `Review the ${n.entityType} content and use chorus_get_comments (targetType: "${n.entityType}", targetUuid: "${n.entityUuid}") to see the full conversation, then respond.\n` +
247
291
  mentionGuidance,
248
292
  this.contextKeyFor("mentioned", n.entityUuid),
293
+ n,
249
294
  attr
250
295
  );
251
296
  }
252
297
 
253
298
  private handleElaborationRequested(n: NotificationDetail, attr: WakeAttribution): void {
254
- this.wake(
299
+ this.wakeWithHandoff(
255
300
  `[Chorus] Elaboration requested for idea '${n.entityTitle}' (ideaUuid: ${n.entityUuid}, projectUuid: ${n.projectUuid}). Use chorus_get_elaboration to review questions.`,
256
301
  this.contextKeyFor("elaboration_requested", n.entityUuid),
302
+ n,
257
303
  attr
258
304
  );
259
305
  }
@@ -261,12 +307,13 @@ export class ChorusEventRouter {
261
307
  private handleProposalRejected(n: NotificationDetail, attr: WakeAttribution): void {
262
308
  const mentionGuidance = this.buildMentionGuidance(n, "proposal");
263
309
 
264
- this.wake(
310
+ this.wakeWithHandoff(
265
311
  `[Chorus] Proposal '${n.entityTitle}' was REJECTED (proposalUuid: ${n.entityUuid}, projectUuid: ${n.projectUuid}). Review note: "${n.message}". ` +
266
312
  `Use chorus_get_proposal to review the proposal, then fix issues with chorus_update_task_draft / chorus_update_document_draft. ` +
267
313
  `After fixing, call chorus_validate_proposal then chorus_submit_proposal to resubmit.\n` +
268
314
  mentionGuidance,
269
315
  this.contextKeyFor("proposal_rejected", n.entityUuid),
316
+ n,
270
317
  attr
271
318
  );
272
319
  }
@@ -275,11 +322,12 @@ export class ChorusEventRouter {
275
322
  const mentionGuidance = this.buildMentionGuidance(n, "proposal");
276
323
 
277
324
  const reviewInfo = n.message.includes("Note: ") ? ` Review note: "${n.message.split("Note: ").pop()}"` : "";
278
- this.wake(
325
+ this.wakeWithHandoff(
279
326
  `[Chorus] Proposal '${n.entityTitle}' was APPROVED (proposalUuid: ${n.entityUuid}, projectUuid: ${n.projectUuid})!${reviewInfo} Documents and tasks have been created. ` +
280
327
  `Use chorus_get_available_tasks with projectUuid: "${n.projectUuid}" to see the new tasks ready for work.\n` +
281
328
  mentionGuidance,
282
329
  this.contextKeyFor("proposal_approved", n.entityUuid),
330
+ n,
283
331
  attr
284
332
  );
285
333
  }
@@ -287,20 +335,22 @@ export class ChorusEventRouter {
287
335
  private handleIdeaClaimed(n: NotificationDetail, attr: WakeAttribution): void {
288
336
  const mentionGuidance = this.buildMentionGuidance(n, "idea");
289
337
 
290
- this.wake(
338
+ this.wakeWithHandoff(
291
339
  `[Chorus] Idea '${n.entityTitle}' has been assigned to you (ideaUuid: ${n.entityUuid}, projectUuid: ${n.projectUuid}). ` +
292
340
  `Use chorus_get_idea to review the idea, then chorus_claim_idea to start elaboration.\n` +
293
341
  mentionGuidance,
294
342
  this.contextKeyFor("idea_claimed", n.entityUuid),
343
+ n,
295
344
  attr
296
345
  );
297
346
  }
298
347
 
299
348
  private handleTaskVerified(n: NotificationDetail, attr: WakeAttribution): void {
300
- this.wake(
349
+ this.wakeWithHandoff(
301
350
  `[Chorus] Task '${n.entityTitle}' has been verified and is now done (taskUuid: ${n.entityUuid}, projectUuid: ${n.projectUuid}). ` +
302
351
  `Check if this unblocks other tasks: use chorus_get_unblocked_tasks with projectUuid "${n.projectUuid}" to find tasks that are now ready to start.`,
303
352
  this.contextKeyFor("task_verified", n.entityUuid),
353
+ n,
304
354
  attr
305
355
  );
306
356
  }
@@ -308,10 +358,11 @@ export class ChorusEventRouter {
308
358
  private handleTaskReopened(n: NotificationDetail, attr: WakeAttribution): void {
309
359
  const mentionGuidance = this.buildMentionGuidance(n, "task");
310
360
 
311
- this.wake(
361
+ this.wakeWithHandoff(
312
362
  `[Chorus] Task '${n.entityTitle}' has been reopened and needs rework (taskUuid: ${n.entityUuid}, projectUuid: ${n.projectUuid}). ` +
313
363
  `Use chorus_get_task to review the task and chorus_get_comments to see verification feedback, then fix the issues.\n${mentionGuidance}`,
314
364
  this.contextKeyFor("task_reopened", n.entityUuid),
365
+ n,
315
366
  attr
316
367
  );
317
368
  }
@@ -319,7 +370,7 @@ export class ChorusEventRouter {
319
370
  private handleElaborationAnswered(n: NotificationDetail, attr: WakeAttribution): void {
320
371
  const mentionGuidance = this.buildMentionGuidance(n, "idea");
321
372
 
322
- this.wake(
373
+ this.wakeWithHandoff(
323
374
  `[Chorus] Elaboration answers submitted for idea '${n.entityTitle}' (ideaUuid: ${n.entityUuid}, projectUuid: ${n.projectUuid}). ` +
324
375
  `Review the answers with chorus_get_elaboration, then either:\n` +
325
376
  `- Call chorus_validate_elaboration with empty issues [] to resolve and proceed to proposal creation\n` +
@@ -327,6 +378,7 @@ export class ChorusEventRouter {
327
378
  `After reviewing, @mention the answerer to ask if they have any further questions before you proceed.\n` +
328
379
  mentionGuidance,
329
380
  this.contextKeyFor("elaboration_answered", n.entityUuid),
381
+ n,
330
382
  attr
331
383
  );
332
384
  }
@@ -341,12 +393,13 @@ export class ChorusEventRouter {
341
393
  private handleElaborationVerified(n: NotificationDetail, attr: WakeAttribution): void {
342
394
  const mentionGuidance = this.buildMentionGuidance(n, "idea");
343
395
 
344
- this.wake(
396
+ this.wakeWithHandoff(
345
397
  `[Chorus] Elaboration for idea '${n.entityTitle}' was VERIFIED by a human (ideaUuid: ${n.entityUuid}, projectUuid: ${n.projectUuid}). ` +
346
398
  `The idea is now elaborated — do NOT answer elaboration questions. Proceed to WRITE THE PROPOSAL: gather context with ` +
347
399
  `chorus_get_idea and chorus_get_elaboration, then author the proposal via the existing proposal flow ` +
348
400
  `(chorus_pm_create_proposal / the proposal skill).\n${mentionGuidance}`,
349
401
  this.contextKeyFor("elaboration_verified", n.entityUuid),
402
+ n,
350
403
  attr
351
404
  );
352
405
  }
@@ -361,7 +414,7 @@ export class ChorusEventRouter {
361
414
  private handleStartDevelopment(n: NotificationDetail, attr: WakeAttribution): void {
362
415
  const mentionGuidance = this.buildMentionGuidance(n, "idea");
363
416
 
364
- this.wake(
417
+ this.wakeWithHandoff(
365
418
  `[Chorus] A human started DEVELOPMENT for idea '${n.entityTitle}' (ideaUuid: ${n.entityUuid}, projectUuid: ${n.projectUuid}). ` +
366
419
  `The idea's proposal is approved and unfinished tasks remain. Claim and execute ALL remaining tasks of that proposal in ` +
367
420
  `dependency order, following the develop workflow: repeatedly find claimable tasks (chorus_get_unblocked_tasks with ` +
@@ -370,6 +423,7 @@ export class ChorusEventRouter {
370
423
  `Do NOT stop after one task. Leave tasks already in to_verify (awaiting human verification) and tasks claimed by other ` +
371
424
  `sessions untouched. If nothing is claimable, post a brief status comment on the idea and end the turn.\n${mentionGuidance}`,
372
425
  this.contextKeyFor("start_development", n.entityUuid),
426
+ n,
373
427
  attr
374
428
  );
375
429
  }
@@ -386,7 +440,7 @@ export class ChorusEventRouter {
386
440
  private handleYoloRequested(n: NotificationDetail, attr: WakeAttribution): void {
387
441
  const mentionGuidance = this.buildMentionGuidance(n, "idea");
388
442
 
389
- this.wake(
443
+ this.wakeWithHandoff(
390
444
  `[Chorus] A human requested a YOLO run for idea '${n.entityTitle}' (ideaUuid: ${n.entityUuid}, projectUuid: ${n.projectUuid}). ` +
391
445
  `Drive this idea all the way to done following the yolo skill (the full-auto AI-DLC pipeline: Idea → Elaboration → Proposal → ` +
392
446
  `Execute → Verify). First read the idea's current state with chorus_get_idea (plus chorus_get_elaboration / ` +
@@ -395,6 +449,7 @@ export class ChorusEventRouter {
395
449
  `and so on. Complete the pipeline through the final done state and completion report, but do NOT merge or push a pull request ` +
396
450
  `without explicit human approval.\n${mentionGuidance}`,
397
451
  this.contextKeyFor("yolo_requested", n.entityUuid),
452
+ n,
398
453
  attr
399
454
  );
400
455
  }