@chorus-aidlc/chorus-openclaw-plugin 0.3.1 → 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 +218 -218
  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 +14 -12
  35. package/package.json +24 -5
  36. package/skills/brainstorm/SKILL.md +163 -0
  37. package/skills/chorus/SKILL.md +413 -0
  38. package/skills/develop/SKILL.md +434 -0
  39. package/skills/idea/SKILL.md +293 -0
  40. package/skills/openspec-aware/SKILL.md +425 -0
  41. package/skills/proposal/SKILL.md +397 -0
  42. package/skills/proposal-reviewer/SKILL.md +117 -0
  43. package/skills/quick-dev/SKILL.md +198 -0
  44. package/skills/review/SKILL.md +354 -0
  45. package/skills/task-reviewer/SKILL.md +113 -0
  46. package/skills/yolo/SKILL.md +498 -0
  47. package/src/commands.ts +147 -57
  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 -117
  56. package/src/tools/common-tools.ts +0 -546
  57. package/src/tools/dev-tools.ts +0 -97
  58. package/src/tools/pm-tools.ts +0 -390
@@ -0,0 +1,293 @@
1
+ ---
2
+ name: idea
3
+ description: Chorus Idea workflow — claim ideas, run elaboration rounds, and prepare for proposal creation.
4
+ license: AGPL-3.0
5
+ metadata:
6
+ author: chorus
7
+ version: "0.9.0"
8
+ category: project-management
9
+ mcp_server: chorus
10
+ ---
11
+
12
+ # Idea Skill
13
+
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.
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
+
18
+ ---
19
+
20
+ ## Overview
21
+
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.
23
+
24
+ **Idea status lifecycle (3 stored states):**
25
+
26
+ ```
27
+ open --> elaborating --> elaborated
28
+ ```
29
+
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.
31
+
32
+ ---
33
+
34
+ ## Tools
35
+
36
+ **Idea Management:**
37
+
38
+ | Tool | Purpose |
39
+ |------|---------|
40
+ | `chorus_pm_create_idea` | Create a new idea in a project (on behalf of humans) |
41
+ | `chorus_claim_idea` | Claim an open idea (open -> elaborating) |
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. |
44
+
45
+ **Requirements Elaboration:**
46
+
47
+ | Tool | Purpose |
48
+ |------|---------|
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 |
52
+ | `chorus_answer_elaboration` | Submit answers for an elaboration round |
53
+ | `chorus_get_elaboration` | Get full elaboration state (rounds, questions, answers) |
54
+
55
+ **Shared tools** (checkin, query, comment, search, notifications): see `/chorus`
56
+
57
+ ---
58
+
59
+ ## Workflow
60
+
61
+ ### Step 1: Check In
62
+
63
+ ```
64
+ chorus_checkin()
65
+ ```
66
+
67
+ Review your persona, current assignments, and pending work counts.
68
+
69
+ ### Step 2: Find Work
70
+
71
+ ```
72
+ chorus_get_available_ideas({ projectUuid: "<project-uuid>" })
73
+ ```
74
+
75
+ Or check existing assignments:
76
+
77
+ ```
78
+ chorus_get_my_assignments()
79
+ ```
80
+
81
+ ### Step 3: Claim an Idea
82
+
83
+ Claiming automatically transitions the Idea to `elaborating` status:
84
+
85
+ ```
86
+ chorus_claim_idea({ ideaUuid: "<idea-uuid>" })
87
+ ```
88
+
89
+ ### Step 4: Gather Context
90
+
91
+ Before elaborating, understand the full picture:
92
+
93
+ 1. **Read the idea in detail:**
94
+ ```
95
+ chorus_get_idea({ ideaUuid: "<idea-uuid>" })
96
+ ```
97
+
98
+ 2. **Read existing project documents** (for context, tech stack, conventions):
99
+ ```
100
+ chorus_get_documents({ projectUuid: "<project-uuid>" })
101
+ chorus_get_document({ documentUuid: "<doc-uuid>" })
102
+ ```
103
+
104
+ 3. **Review past proposals** (to understand patterns and standards):
105
+ ```
106
+ chorus_get_proposals({ projectUuid: "<project-uuid>", status: "approved" })
107
+ ```
108
+
109
+ 4. **Check existing tasks** (to avoid duplication):
110
+ ```
111
+ chorus_list_tasks({ projectUuid: "<project-uuid>" })
112
+ ```
113
+
114
+ 5. **Read comments** on the idea for additional context:
115
+ ```
116
+ chorus_get_comments({ targetType: "idea", targetUuid: "<idea-uuid>" })
117
+ ```
118
+
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."
126
+
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.
129
+
130
+ When `/brainstorm` returns, you own the lifecycle decision (the brainstorm skill deliberately leaves it to you):
131
+
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.
134
+
135
+ Either outcome ends Step 4.5; skip Step 5.
136
+
137
+ ### Step 5: Elaborate on the Idea
138
+
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.
140
+
141
+ #### Simple Ideas (skip elaboration)
142
+
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.
144
+
145
+ ```
146
+ chorus_pm_skip_elaboration({
147
+ ideaUuid: "<idea-uuid>",
148
+ reason: "Bug fix with clear reproduction steps"
149
+ })
150
+ ```
151
+
152
+ #### Standard/Complex Ideas (run elaboration)
153
+
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)
158
+
159
+ 2. **Create elaboration questions:**
160
+
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.
162
+
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
+ ```
181
+
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:
183
+
184
+ ```
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. ...
193
+ ```
194
+
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:**
198
+ ```
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
+ ]
206
+ })
207
+ ```
208
+
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
213
+
214
+ 5. **Review answers and confirm with the owner (@mention flow):**
215
+
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.
217
+
218
+ a. **Get owner info** from checkin response (`agent.owner`) or search:
219
+ ```
220
+ chorus_search_mentionables({ query: "owner-name" })
221
+ ```
222
+
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
+ ```
231
+
232
+ c. **Wait for confirmation** via comments.
233
+
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
238
+
239
+ 6. **Validate the elaboration:**
240
+
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.
242
+
243
+ ```
244
+ chorus_pm_validate_elaboration({
245
+ ideaUuid: "<idea-uuid>",
246
+ roundUuid: "<round-uuid>",
247
+ issues: [],
248
+ followUpQuestions: []
249
+ })
250
+ ```
251
+
252
+ If issues are found (contradictions, ambiguities, incomplete answers), include them in `issues` and provide `followUpQuestions` for a new round:
253
+
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
+ ```
266
+
267
+ 7. **Check elaboration status** at any time:
268
+ ```
269
+ chorus_get_elaboration({ ideaUuid: "<idea-uuid>" })
270
+ ```
271
+
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.
273
+
274
+ **Question categories:** `functional`, `non_functional`, `business_context`, `technical_context`, `user_scenario`, `scope`
275
+
276
+ **Validation issue types:** `contradiction`, `ambiguity`, `incomplete`
277
+
278
+ ---
279
+
280
+ ## Tips
281
+
282
+ - When combining multiple ideas, explain how they relate in the proposal description
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
285
+ - Record decisions made in conversation as elaboration rounds for auditability
286
+ - Always @mention the owner to confirm understanding before validating
287
+
288
+ ---
289
+
290
+ ## Next
291
+
292
+ - Once elaboration is resolved, use `/proposal` to create a Proposal with document and task drafts
293
+ - For platform overview and shared tools, see `/chorus`