@chorus-aidlc/chorus-openclaw-plugin 0.4.0 → 0.5.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 (58) hide show
  1. package/README.md +208 -278
  2. package/dist/commands.d.ts +5 -0
  3. package/dist/commands.d.ts.map +1 -0
  4. package/dist/commands.js +147 -0
  5. package/dist/commands.js.map +1 -0
  6. package/dist/config.d.ts +38 -0
  7. package/dist/config.d.ts.map +1 -0
  8. package/dist/config.js +57 -0
  9. package/dist/config.js.map +1 -0
  10. package/dist/event-router.d.ts +55 -0
  11. package/dist/event-router.d.ts.map +1 -0
  12. package/dist/event-router.js +157 -0
  13. package/dist/event-router.js.map +1 -0
  14. package/dist/index.d.ts +3 -0
  15. package/dist/index.d.ts.map +1 -0
  16. package/dist/index.js +108 -0
  17. package/dist/index.js.map +1 -0
  18. package/dist/mcp-client.d.ts +37 -0
  19. package/dist/mcp-client.d.ts.map +1 -0
  20. package/dist/mcp-client.js +137 -0
  21. package/dist/mcp-client.js.map +1 -0
  22. package/dist/mcp-registration.d.ts +25 -0
  23. package/dist/mcp-registration.d.ts.map +1 -0
  24. package/dist/mcp-registration.js +93 -0
  25. package/dist/mcp-registration.js.map +1 -0
  26. package/dist/sse-listener.d.ts +37 -0
  27. package/dist/sse-listener.d.ts.map +1 -0
  28. package/dist/sse-listener.js +152 -0
  29. package/dist/sse-listener.js.map +1 -0
  30. package/dist/wake.d.ts +67 -0
  31. package/dist/wake.d.ts.map +1 -0
  32. package/dist/wake.js +234 -0
  33. package/dist/wake.js.map +1 -0
  34. package/openclaw.plugin.json +13 -12
  35. package/package.json +23 -5
  36. package/skills/brainstorm/SKILL.md +163 -0
  37. package/skills/chorus/SKILL.md +113 -96
  38. package/skills/develop/SKILL.md +195 -51
  39. package/skills/idea/SKILL.md +136 -149
  40. package/skills/openspec-aware/SKILL.md +425 -0
  41. package/skills/proposal/SKILL.md +155 -157
  42. package/skills/proposal-reviewer/SKILL.md +117 -0
  43. package/skills/quick-dev/SKILL.md +31 -7
  44. package/skills/review/SKILL.md +105 -33
  45. package/skills/task-reviewer/SKILL.md +113 -0
  46. package/skills/yolo/SKILL.md +498 -0
  47. package/src/commands.ts +138 -71
  48. package/src/config.ts +23 -10
  49. package/src/event-router.ts +46 -54
  50. package/src/index.ts +56 -83
  51. package/src/mcp-client.ts +17 -0
  52. package/src/mcp-registration.ts +142 -0
  53. package/src/openclaw-sdk.d.ts +95 -0
  54. package/src/wake.ts +310 -0
  55. package/src/tools/admin-tools.ts +0 -126
  56. package/src/tools/common-tools.ts +0 -575
  57. package/src/tools/dev-tools.ts +0 -105
  58. package/src/tools/pm-tools.ts +0 -411
@@ -1,37 +1,33 @@
1
1
  ---
2
2
  name: idea
3
- description: Chorus Idea workflow — claim ideas, run elaboration, and prepare for proposal.
3
+ description: Chorus Idea workflow — claim ideas, run elaboration rounds, and prepare for proposal creation.
4
+ license: AGPL-3.0
4
5
  metadata:
5
- openclaw:
6
- emoji: "💡"
6
+ author: chorus
7
+ version: "0.9.0"
8
+ category: project-management
9
+ mcp_server: chorus
7
10
  ---
8
11
 
9
12
  # Idea Skill
10
13
 
11
14
  This skill covers the **Ideation** stage of the AI-DLC workflow: claiming Ideas, running structured elaboration rounds to clarify requirements, and preparing for Proposal creation.
12
15
 
16
+ > **Tool namespace:** Chorus tools are exposed by the connected MCP server under a `chorus__` prefix on OpenClaw (e.g. `chorus__chorus_get_idea`). Bare names are used below for readability — prepend `chorus__` when invoking. See `/chorus` for the full rule.
17
+
13
18
  ---
14
19
 
15
20
  ## Overview
16
21
 
17
22
  Ideas are the starting point of the AI-DLC pipeline. Humans (or Admin agents) create Ideas describing what they need. The PM Agent claims an Idea, runs elaboration to clarify requirements, and then moves on to `/proposal` to create a Proposal with document and task drafts.
18
23
 
19
- ### Idea Lifecycle
24
+ **Idea status lifecycle (3 stored states):**
20
25
 
21
26
  ```
22
- open --> elaborating --> proposal_created --> completed
23
- \--> closed
27
+ open --> elaborating --> elaborated
24
28
  ```
25
29
 
26
- | Status | Meaning |
27
- |--------|---------|
28
- | `open` | Idea is available for an agent to claim |
29
- | `elaborating` | An agent has claimed the idea and is gathering requirements |
30
- | `proposal_created` | A Proposal has been created from this idea |
31
- | `completed` | The resulting Proposal was approved and work is done |
32
- | `closed` | Idea was closed without implementation |
33
-
34
- Claiming an idea automatically transitions it from `open` to `elaborating`.
30
+ All post-elaboration progress (planning, building, verifying, done) is **derived** from the state of linked Proposals and Tasks. No agent should set Idea status directly beyond elaboration -- all transitions are side-effects of claiming, releasing, or completing elaboration.
35
31
 
36
32
  ---
37
33
 
@@ -41,40 +37,25 @@ Claiming an idea automatically transitions it from `open` to `elaborating`.
41
37
 
42
38
  | Tool | Purpose |
43
39
  |------|---------|
40
+ | `chorus_pm_create_idea` | Create a new idea in a project (on behalf of humans) |
44
41
  | `chorus_claim_idea` | Claim an open idea (open -> elaborating) |
45
- | `chorus_get_available_ideas` | List open ideas in a project available to claim |
46
- | `chorus_get_idea` | Get detailed information for a single idea |
47
- | `chorus_get_ideas` | List ideas in a project with optional status filter |
48
- | `chorus_pm_create_idea` | Create a new idea in a project |
49
- | `chorus_move_idea` | Move an idea to a different project (also moves linked draft/pending proposals) |
42
+ | `chorus_release_idea` | Release a claimed idea (elaborating -> open) |
43
+ | `chorus_move_idea` | Move an Idea to a different Project. Cascade-migrates the Idea, all linked Proposals (any status), all materialized Documents and Tasks, and all related Activities atomically. Comments, TaskDependency, AcceptanceCriterion, AgentSession, SessionTaskCheckin, Notification history, and Task assignees are NOT modified. Returns `moved: { proposals, documents, tasks, activities }` counts. Requires `idea:write` only — no project-level checks. |
50
44
 
51
45
  **Requirements Elaboration:**
52
46
 
53
47
  | Tool | Purpose |
54
48
  |------|---------|
55
- | `chorus_start_elaboration` | Start an elaboration round with structured questions |
56
- | `chorus_validate_elaboration` | Validate answers empty issues = resolved, with issues = follow-up round |
49
+ | `chorus_pm_start_elaboration` | Start an elaboration round with structured questions |
50
+ | `chorus_pm_validate_elaboration` | Validate answers (resolve or create follow-up round) |
51
+ | `chorus_pm_skip_elaboration` | Skip elaboration for trivially clear Ideas |
57
52
  | `chorus_answer_elaboration` | Submit answers for an elaboration round |
58
- | `chorus_get_elaboration` | Get full elaboration state (all rounds, questions, answers) |
53
+ | `chorus_get_elaboration` | Get full elaboration state (rounds, questions, answers) |
59
54
 
60
55
  **Shared tools** (checkin, query, comment, search, notifications): see `/chorus`
61
56
 
62
57
  ---
63
58
 
64
- ## SSE Wake Events (OpenClaw-Specific)
65
-
66
- OpenClaw is a single-agent model with SSE-driven wake. The following notification events trigger the agent to wake and act:
67
-
68
- | SSE Event | Trigger | Agent Action |
69
- |-----------|---------|--------------|
70
- | `idea_claimed` | An idea is assigned to you | Wake, review the idea with `chorus_get_idea`, claim it if not auto-claimed |
71
- | `elaboration_requested` | Elaboration round started on an idea you own | Wake, review questions with `chorus_get_elaboration` |
72
- | `elaboration_answered` | Answers submitted for your elaboration round | Wake, review answers, validate or create follow-up round |
73
-
74
- When an SSE event fires, the plugin's event router fetches the notification details and triggers the agent with context (ideaUuid, projectUuid, action). You do not need to poll — work arrives via these events.
75
-
76
- ---
77
-
78
59
  ## Workflow
79
60
 
80
61
  ### Step 1: Check In
@@ -135,168 +116,174 @@ Before elaborating, understand the full picture:
135
116
  chorus_get_comments({ targetType: "idea", targetUuid: "<idea-uuid>" })
136
117
  ```
137
118
 
138
- ### Step 5: Elaborate on the Idea
119
+ ### Step 4.5: Brainstorm Mode (Optional Prelude)
120
+
121
+ If the Idea is fuzzy and you'd struggle to enumerate concrete multi-choice questions, offer the user a brainstorm prelude before structured elaboration.
122
+
123
+ > **OpenClaw note:** there is no `AskUserQuestion` primitive. Ask the user once **as a plain-text prompt** whether they want to brainstorm first or jump straight to structured elaboration, e.g.:
124
+ >
125
+ > > "This idea is still fuzzy. Do you want to (A) brainstorm directions together first, or (B) go straight to structured elaboration? Reply A or B."
139
126
 
140
- **Every Idea should go through elaboration.** Elaboration improves Proposal quality and reduces rejection cycles.
127
+ - **"Already clear" (B):** Skip to Step 5.
128
+ - **"Brainstorm first" (A):** Invoke the `/brainstorm` skill. See `/brainstorm` for the dialogue cadence and synthesis rules — do NOT re-implement them here.
141
129
 
142
- #### Elaboration Depth
130
+ When `/brainstorm` returns, you own the lifecycle decision (the brainstorm skill deliberately leaves it to you):
143
131
 
144
- Determine depth based on idea complexity:
132
+ - If the synthesized round answers cover everything → call `chorus_pm_validate_elaboration` with `issues: []` to resolve elaboration.
133
+ - If gaps remain → call `chorus_pm_validate_elaboration` with `issues + followUpQuestions` to start a structured Round 2. Pick the depth yourself — do NOT re-prompt the user.
145
134
 
146
- - `"minimal"` 2-4 questions (small features, minor enhancements)
147
- - `"standard"` — 5-10 questions (typical new features)
148
- - `"comprehensive"` — 10-15 questions (large features, architectural changes)
135
+ Either outcome ends Step 4.5; skip Step 5.
149
136
 
150
- #### Question Categories
137
+ ### Step 5: Elaborate on the Idea
151
138
 
152
- `functional`, `non_functional`, `business_context`, `technical_context`, `user_scenario`, `scope`
139
+ **Every Idea should go through elaboration.** Skip only when requirements are completely unambiguous (e.g., bug fix with clear steps). Elaboration improves Proposal quality and reduces rejection cycles.
153
140
 
154
- #### Starting an Elaboration Round
141
+ #### Simple Ideas (skip elaboration)
155
142
 
156
- > **Note:** Do NOT include an "Other" option in your questions. The UI automatically adds a free-text "Other" option to every question.
143
+ You may skip elaboration, but **you MUST ask the user for permission first** before calling `chorus_pm_skip_elaboration`. On OpenClaw, ask as a plain-text prompt (e.g. "This idea has clear reproduction steps. OK to skip elaboration? Reply yes/no."). Never skip on your own judgment alone.
157
144
 
158
145
  ```
159
- chorus_start_elaboration({
146
+ chorus_pm_skip_elaboration({
160
147
  ideaUuid: "<idea-uuid>",
161
- depth: "standard",
162
- questions: [
163
- {
164
- id: "q1",
165
- text: "What user roles should have access to this feature?",
166
- category: "functional",
167
- options: [
168
- { id: "a", label: "All users" },
169
- { id: "b", label: "Admin only" },
170
- { id: "c", label: "Role-based (configurable)" }
171
- ]
172
- },
173
- {
174
- id: "q2",
175
- text: "What is the expected data volume?",
176
- category: "non_functional",
177
- options: [
178
- { id: "a", label: "Low (<1000 records)" },
179
- { id: "b", label: "Medium (1K-100K records)" },
180
- { id: "c", label: "High (>100K records)" }
181
- ]
182
- }
183
- ]
148
+ reason: "Bug fix with clear reproduction steps"
184
149
  })
185
150
  ```
186
151
 
187
- This triggers an `elaboration_requested` SSE event to stakeholders.
188
-
189
- #### Submitting Answers
152
+ #### Standard/Complex Ideas (run elaboration)
190
153
 
191
- When answers arrive (via `elaboration_answered` SSE wake event or manual flow):
154
+ 1. **Determine depth** based on idea complexity:
155
+ - `"minimal"` — 2-4 questions (small features, minor enhancements)
156
+ - `"standard"` — 5-10 questions (typical new features)
157
+ - `"comprehensive"` — 10-15 questions (large features, architectural changes)
192
158
 
193
- ```
194
- chorus_answer_elaboration({
195
- ideaUuid: "<idea-uuid>",
196
- roundUuid: "<round-uuid>",
197
- answers: [
198
- { questionId: "q1", selectedOptionId: "c", customText: null },
199
- { questionId: "q2", selectedOptionId: null, customText: "Custom hybrid approach" }
200
- ]
201
- })
202
- ```
159
+ 2. **Create elaboration questions:**
203
160
 
204
- Answer format:
205
- - **Select an option**: `selectedOptionId: "a", customText: null`
206
- - **Select an option + add a note**: `selectedOptionId: "a", customText: "additional context"`
207
- - **Choose "Other" (free text)**: `selectedOptionId: null, customText: "your answer"` — customText is required when no option is selected
161
+ > **Note:** Do NOT include an "Other" option in your questions. Treat the free-text path as always available — a user may answer any question with free text instead of picking an option.
208
162
 
209
- #### @Mention Workflow After Answers
163
+ ```
164
+ chorus_pm_start_elaboration({
165
+ ideaUuid: "<idea-uuid>",
166
+ depth: "standard",
167
+ questions: [
168
+ {
169
+ id: "q1",
170
+ text: "What user roles should have access to this feature?",
171
+ category: "functional",
172
+ options: [
173
+ { id: "a", label: "All users" },
174
+ { id: "b", label: "Admin only" },
175
+ { id: "c", label: "Role-based (configurable)" }
176
+ ]
177
+ }
178
+ ]
179
+ })
180
+ ```
210
181
 
211
- After answers are submitted, **@mention the answerer** with a summary of your understanding. This prevents misinterpretation before you validate.
182
+ 3. **Present questions to the user as plain text (OpenClaw has no `AskUserQuestion`).** Render each elaboration question and its options as a readable numbered/lettered prompt and ask the user to reply with their selections (and any free-text notes). Example:
212
183
 
213
- 1. **Get mentionable info:**
214
184
  ```
215
- chorus_search_mentionables({ query: "owner-name" })
185
+ I have a few questions to clarify this idea. Please reply with your choice for each (you can also write a free-text answer):
186
+
187
+ 1. Which new locales should be prioritized for V1?
188
+ a) Japanese only — single locale for initial release
189
+ b) Japanese + Korean — two East Asian locales
190
+ (or describe your own)
191
+
192
+ 2. ...
216
193
  ```
217
194
 
218
- 2. **Post a summary comment** on the idea:
195
+ After the user replies, map their answers back to option IDs and call `chorus_answer_elaboration`. If the user gave a free-text answer that doesn't match an option, set `selectedOptionId: null` and put their text in `customText`.
196
+
197
+ 4. **Submit answers:**
219
198
  ```
220
- chorus_add_comment({
221
- targetType: "idea",
222
- targetUuid: "<idea-uuid>",
223
- content: "@[Owner Name](user:owner-uuid) I've reviewed the elaboration answers. Here's my understanding:\n\n- Key requirement 1: ...\n- Key requirement 2: ...\n\nDoes this match your intent?"
199
+ chorus_answer_elaboration({
200
+ ideaUuid: "<idea-uuid>",
201
+ roundUuid: "<round-uuid>",
202
+ answers: [
203
+ { questionId: "q1", selectedOptionId: "c", customText: null },
204
+ { questionId: "q2", selectedOptionId: null, customText: "Custom hybrid approach" }
205
+ ]
224
206
  })
225
207
  ```
226
208
 
227
- 3. **Wait for confirmation** via comments or a `mentioned` SSE event.
209
+ Answer format:
210
+ - **Select an option**: `selectedOptionId: "a", customText: null`
211
+ - **Select an option + add a note**: `selectedOptionId: "a", customText: "additional context"`
212
+ - **Free text (no option matched)**: `selectedOptionId: null, customText: "your answer"` — customText is required when no option is selected
228
213
 
229
- 4. **Based on the response:**
230
- - **Confirmed** — Proceed to validate with empty issues
231
- - **Additions/corrections** — Incorporate feedback, optionally start a follow-up round
232
- - **Unclear** — Ask clarifying questions via another comment
214
+ 5. **Review answers and confirm with the owner (@mention flow):**
233
215
 
234
- #### Validating the Elaboration
216
+ After answers are submitted, **@mention the answerer** (typically the agent's owner) with a summary of your understanding. This prevents misinterpretation before you validate.
235
217
 
236
- When answers are satisfactory:
218
+ a. **Get owner info** from checkin response (`agent.owner`) or search:
219
+ ```
220
+ chorus_search_mentionables({ query: "owner-name" })
221
+ ```
237
222
 
238
- ```
239
- chorus_validate_elaboration({
240
- ideaUuid: "<idea-uuid>",
241
- roundUuid: "<round-uuid>",
242
- issues: []
243
- })
244
- ```
223
+ b. **Post a summary comment** on the idea:
224
+ ```
225
+ chorus_add_comment({
226
+ targetType: "idea",
227
+ targetUuid: "<idea-uuid>",
228
+ content: "@[Owner Name](user:owner-uuid) I've reviewed the elaboration answers. Here's my understanding:\n\n- Key requirement 1: ...\n- Key requirement 2: ...\n\nDoes this match your intent?"
229
+ })
230
+ ```
245
231
 
246
- If issues are found (contradictions, ambiguities, incomplete answers), include them and provide follow-up questions for a new round:
232
+ c. **Wait for confirmation** via comments.
247
233
 
248
- ```
249
- chorus_validate_elaboration({
250
- ideaUuid: "<idea-uuid>",
251
- roundUuid: "<round-uuid>",
252
- issues: [
253
- { questionId: "q1", type: "ambiguity", description: "Role-based access selected but no roles defined" }
254
- ],
255
- followUpQuestions: [
256
- {
257
- id: "fq1",
258
- text: "Which specific roles should have access?",
259
- category: "functional",
260
- options: [
261
- { id: "a", label: "Admin + Editor" },
262
- { id: "b", label: "All authenticated users" }
263
- ]
264
- }
265
- ]
266
- })
267
- ```
234
+ d. **Based on the response:**
235
+ - **Confirmed** — Proceed to validate with empty issues
236
+ - **Additions/corrections** — Incorporate feedback, optionally start a follow-up round
237
+ - **Unclear** — Ask clarifying questions via another comment
268
238
 
269
- This starts a new elaboration round, triggering another `elaboration_requested` event. The cycle repeats until all issues are resolved.
239
+ 6. **Validate the elaboration:**
270
240
 
271
- **Validation issue types:** `contradiction`, `ambiguity`, `incomplete`
241
+ `chorus_pm_validate_elaboration` is the **single commit gate for the entire elaboration phase**, NOT a per-round close. Calling it with `issues: []` resolves the whole elaboration (sets `idea.elaborationStatus = "resolved"`); calling it with `issues + followUpQuestions` opens a new round while keeping elaboration in progress. Do not call validate after every round — call it once when you believe elaboration is done, or when you want to start a follow-up round.
272
242
 
273
- #### Multi-Round Elaboration
243
+ ```
244
+ chorus_pm_validate_elaboration({
245
+ ideaUuid: "<idea-uuid>",
246
+ roundUuid: "<round-uuid>",
247
+ issues: [],
248
+ followUpQuestions: []
249
+ })
250
+ ```
274
251
 
275
- Complex ideas may require multiple rounds:
252
+ If issues are found (contradictions, ambiguities, incomplete answers), include them in `issues` and provide `followUpQuestions` for a new round:
276
253
 
277
- 1. Round 1: Broad scoping questions (functional, scope)
278
- 2. Round 2: Follow-up on ambiguous answers (technical_context)
279
- 3. Round 3: Final confirmation of edge cases (user_scenario)
254
+ ```
255
+ chorus_pm_validate_elaboration({
256
+ ideaUuid: "<idea-uuid>",
257
+ roundUuid: "<round-uuid>",
258
+ issues: [
259
+ { questionId: "q1", type: "ambiguity", description: "Role-based access selected but no roles defined" }
260
+ ],
261
+ followUpQuestions: [
262
+ { id: "fq1", text: "Which specific roles should have access?", category: "functional", options: [...] }
263
+ ]
264
+ })
265
+ ```
280
266
 
281
- Each round preserves the full history. Use `chorus_get_elaboration` at any time to see all rounds and their status.
267
+ 7. **Check elaboration status** at any time:
268
+ ```
269
+ chorus_get_elaboration({ ideaUuid: "<idea-uuid>" })
270
+ ```
282
271
 
283
- #### Checking Elaboration Status
272
+ **Elaboration as audit trail:** Even if the user discusses requirements with you outside the formal elaboration flow, record key decisions as elaboration rounds so they are persisted and visible to the team.
284
273
 
285
- ```
286
- chorus_get_elaboration({ ideaUuid: "<idea-uuid>" })
287
- ```
274
+ **Question categories:** `functional`, `non_functional`, `business_context`, `technical_context`, `user_scenario`, `scope`
288
275
 
289
- Returns all rounds, questions, answers, and a progress summary.
276
+ **Validation issue types:** `contradiction`, `ambiguity`, `incomplete`
290
277
 
291
278
  ---
292
279
 
293
280
  ## Tips
294
281
 
295
282
  - When combining multiple ideas, explain how they relate in the proposal description
296
- - Elaboration improves Proposal quality — run it for all non-trivial ideas
283
+ - Elaboration improves Proposal quality — don't skip it unless the requirements are trivially clear
284
+ - Present interactive questions as plain text and collect free-text replies — OpenClaw has no `AskUserQuestion` primitive
297
285
  - Record decisions made in conversation as elaboration rounds for auditability
298
286
  - Always @mention the owner to confirm understanding before validating
299
- - SSE events mean you do not need to poll — the plugin wakes you when action is needed
300
287
 
301
288
  ---
302
289