@chorus-aidlc/chorus-openclaw-plugin 0.3.0 → 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.
@@ -0,0 +1,399 @@
1
+ ---
2
+ name: proposal
3
+ description: Chorus Proposal workflow — create proposals with document & task drafts, manage DAG, submit for review.
4
+ metadata:
5
+ openclaw:
6
+ emoji: "📋"
7
+ ---
8
+
9
+ # Proposal Skill
10
+
11
+ This skill covers the **Planning** stage of the AI-DLC workflow: creating Proposals that contain document drafts (PRD, tech design) and task drafts with dependency DAGs, then submitting them for Admin review.
12
+
13
+ ---
14
+
15
+ ## Overview
16
+
17
+ After an Idea's elaboration is resolved (see `/idea`), the PM Agent creates a Proposal — a container that holds document drafts and task drafts. On Admin approval, these drafts materialize into real Documents and Tasks.
18
+
19
+ ```
20
+ Elaboration resolved --> Create Proposal --> Add drafts --> Validate --> Submit --> Admin review
21
+ ```
22
+
23
+ ### Proposal Lifecycle
24
+
25
+ ```
26
+ draft --> pending --> approved
27
+ \--> rejected --> (revise drafts) --> pending (resubmit cycle)
28
+ ```
29
+
30
+ | Status | Meaning |
31
+ |--------|---------|
32
+ | `draft` | Proposal is being built — add/edit document and task drafts |
33
+ | `pending` | Submitted for Admin review |
34
+ | `approved` | Admin approved — drafts materialized into real Documents and Tasks |
35
+ | `rejected` | Admin rejected with feedback — revise drafts and resubmit |
36
+
37
+ A rejected proposal returns to `draft` status. Fix issues based on the review note, then validate and resubmit.
38
+
39
+ ---
40
+
41
+ ## Tools
42
+
43
+ **Proposal Management:**
44
+
45
+ | Tool | Purpose |
46
+ |------|---------|
47
+ | `chorus_create_proposal` | Create an empty proposal container linked to input ideas |
48
+ | `chorus_get_proposal` | Get full proposal details including all document and task drafts |
49
+ | `chorus_validate_proposal` | Validate proposal completeness (returns errors, warnings, info) |
50
+ | `chorus_submit_proposal` | Submit proposal for Admin approval (draft -> pending) |
51
+
52
+ **Document Drafts:**
53
+
54
+ | Tool | Purpose |
55
+ |------|---------|
56
+ | `chorus_add_document_draft` | Add a document draft to the proposal |
57
+ | `chorus_update_document_draft` | Update document draft title, type, or content |
58
+ | `chorus_remove_document_draft` | Remove a document draft from the proposal |
59
+
60
+ **Task Drafts:**
61
+
62
+ | Tool | Purpose |
63
+ |------|---------|
64
+ | `chorus_add_task_draft` | Add a task draft (returns draftUuid for dependency chaining) |
65
+ | `chorus_update_task_draft` | Update task draft fields or dependencies |
66
+ | `chorus_remove_task_draft` | Remove a task draft from the proposal |
67
+
68
+ **Post-Approval (tasks exist):**
69
+
70
+ | Tool | Purpose |
71
+ |------|---------|
72
+ | `chorus_create_tasks` | Batch create tasks with intra-batch dependencies (also supports Quick Task mode) |
73
+ | `chorus_update_task` | Update task fields, dependencies, or status |
74
+ | `chorus_pm_assign_task` | Assign a task to a Developer Agent |
75
+
76
+ **Shared tools** (checkin, query, comment, search, notifications): see `/chorus`
77
+
78
+ ---
79
+
80
+ ## SSE Wake Events (OpenClaw-Specific)
81
+
82
+ OpenClaw is a single-agent model with SSE-driven wake. The following notification events trigger the agent to wake and act on proposals:
83
+
84
+ | SSE Event | Trigger | Agent Action |
85
+ |-----------|---------|--------------|
86
+ | `proposal_rejected` | Admin rejected your proposal | Wake, read review note, revise drafts, resubmit |
87
+ | `proposal_approved` | Admin approved your proposal | Wake, update idea status, check new tasks ready for work |
88
+
89
+ When a proposal is rejected, the event router provides the review note and instructs the agent to fix issues. When approved, it notifies that documents and tasks have been created.
90
+
91
+ ---
92
+
93
+ ## Workflow
94
+
95
+ ### Step 1: Create an Empty Proposal
96
+
97
+ Create the proposal container first, then incrementally add drafts.
98
+
99
+ ```
100
+ chorus_create_proposal({
101
+ projectUuid: "<project-uuid>",
102
+ title: "Implement <feature name>",
103
+ description: "Analysis and implementation plan for Idea #xxx",
104
+ inputType: "idea",
105
+ inputUuids: ["<idea-uuid>"]
106
+ })
107
+ ```
108
+
109
+ **Multiple Ideas:** You can combine multiple ideas into one proposal by passing multiple UUIDs in `inputUuids`.
110
+
111
+ ### Step 2: Add Document Drafts
112
+
113
+ Add document drafts one at a time.
114
+
115
+ **Document types:** `prd`, `tech_design`, `adr`, `spec`, `guide`
116
+
117
+ ```
118
+ # Add PRD
119
+ chorus_add_document_draft({
120
+ proposalUuid: "<proposal-uuid>",
121
+ type: "prd",
122
+ title: "PRD: <Feature Name>",
123
+ content: "# PRD: <Feature Name>\n\n## Background\n...\n## Requirements\n..."
124
+ })
125
+
126
+ # Add Tech Design
127
+ chorus_add_document_draft({
128
+ proposalUuid: "<proposal-uuid>",
129
+ type: "tech_design",
130
+ title: "Tech Design: <Feature Name>",
131
+ content: "# Technical Design\n\n## Architecture\n...\n## Implementation\n..."
132
+ })
133
+ ```
134
+
135
+ #### Document Type Guidelines
136
+
137
+ | Type | Focus | When to Use |
138
+ |------|-------|-------------|
139
+ | `prd` | What and why — requirements, user stories, scope | Every feature proposal |
140
+ | `tech_design` | How — architecture, data model, API design | Features with non-trivial implementation |
141
+ | `adr` | Architecture Decision Record — decision context, options, outcome | Significant architectural choices |
142
+ | `spec` | Detailed specification — protocols, formats, interfaces | API contracts, data formats |
143
+ | `guide` | How-to guide — setup, usage, runbooks | Operational procedures |
144
+
145
+ ### Step 3: Add Task Drafts with Dependency DAG
146
+
147
+ Add task drafts one at a time. Each response returns the new draft's `draftUuid` — use it in `dependsOnDraftUuids` for subsequent drafts to build the dependency DAG.
148
+
149
+ ```
150
+ # First task (no dependencies) -> response includes { draftUuid, draftTitle }
151
+ chorus_add_task_draft({
152
+ proposalUuid: "<proposal-uuid>",
153
+ title: "Create database schema",
154
+ description: "Add new tables for ...",
155
+ priority: "high",
156
+ storyPoints: 2,
157
+ acceptanceCriteriaItems: [
158
+ { description: "Migration runs without errors", required: true },
159
+ { description: "Rollback migration works", required: true }
160
+ ]
161
+ })
162
+
163
+ # Second task — depends on first
164
+ chorus_add_task_draft({
165
+ proposalUuid: "<proposal-uuid>",
166
+ title: "Implement API endpoints",
167
+ description: "REST endpoints for ...",
168
+ priority: "high",
169
+ storyPoints: 4,
170
+ acceptanceCriteriaItems: [
171
+ { description: "All endpoints return correct responses", required: true },
172
+ { description: "Input validation covers edge cases", required: true },
173
+ { description: "OpenAPI spec updated", required: false }
174
+ ],
175
+ dependsOnDraftUuids: ["<draftUuid-from-first-task>"]
176
+ })
177
+
178
+ # Third task — depends on second
179
+ chorus_add_task_draft({
180
+ proposalUuid: "<proposal-uuid>",
181
+ title: "Write integration tests",
182
+ description: "End-to-end tests covering ...",
183
+ priority: "medium",
184
+ storyPoints: 2,
185
+ acceptanceCriteriaItems: [
186
+ { description: "Test coverage > 80%", required: true }
187
+ ],
188
+ dependsOnDraftUuids: ["<draftUuid-from-second-task>"]
189
+ })
190
+ ```
191
+
192
+ **Task priority:** `low`, `medium`, `high`
193
+
194
+ **Dependency DAG rules:**
195
+ - `dependsOnDraftUuids` references other task drafts *within the same proposal*
196
+ - Dependencies form a Directed Acyclic Graph (DAG) — no circular dependencies allowed
197
+ - Tasks without dependencies are assumed parallelizable
198
+ - On approval, draft dependencies become real task dependencies
199
+
200
+ ### Step 4: Review and Refine Drafts
201
+
202
+ ```
203
+ # Review current state
204
+ chorus_get_proposal({ proposalUuid: "<proposal-uuid>" })
205
+
206
+ # Update a document draft
207
+ chorus_update_document_draft({
208
+ proposalUuid: "<proposal-uuid>",
209
+ draftUuid: "<draft-uuid>",
210
+ content: "Updated content..."
211
+ })
212
+
213
+ # Update a task draft (including changing dependencies)
214
+ chorus_update_task_draft({
215
+ proposalUuid: "<proposal-uuid>",
216
+ draftUuid: "<draft-uuid>",
217
+ description: "Updated description...",
218
+ dependsOnDraftUuids: ["<other-draft-uuid>"]
219
+ })
220
+
221
+ # Remove a draft that is no longer needed
222
+ chorus_remove_task_draft({
223
+ proposalUuid: "<proposal-uuid>",
224
+ draftUuid: "<draft-uuid>"
225
+ })
226
+ ```
227
+
228
+ ### Step 5: Validate and Submit
229
+
230
+ **Always validate before submitting.** Validation catches errors that would block approval.
231
+
232
+ ```
233
+ chorus_validate_proposal({ proposalUuid: "<proposal-uuid>" })
234
+ ```
235
+
236
+ Returns `{ valid, issues }` where issues have levels:
237
+ - **error** — Must fix before submitting (e.g., missing required fields, circular dependencies)
238
+ - **warning** — Should fix but won't block submission (e.g., missing story points)
239
+ - **info** — Suggestions (e.g., consider adding acceptance criteria)
240
+
241
+ When validation passes (no errors):
242
+
243
+ ```
244
+ chorus_submit_proposal({ proposalUuid: "<proposal-uuid>" })
245
+ ```
246
+
247
+ This changes the status from `draft` to `pending`. An Admin will review it.
248
+
249
+ Add a comment explaining your reasoning:
250
+
251
+ ```
252
+ chorus_add_comment({
253
+ targetType: "proposal",
254
+ targetUuid: "<proposal-uuid>",
255
+ content: "This proposal addresses Idea #xxx. Key decisions: ..."
256
+ })
257
+ ```
258
+
259
+ ### Step 6: Handle Rejection (SSE-Driven)
260
+
261
+ If the proposal is rejected, the `proposal_rejected` SSE event wakes the agent with the review note. To handle:
262
+
263
+ 1. **Read the feedback:**
264
+ ```
265
+ chorus_get_proposal({ proposalUuid: "<proposal-uuid>" })
266
+ chorus_get_comments({ targetType: "proposal", targetUuid: "<proposal-uuid>" })
267
+ ```
268
+
269
+ 2. **Revise the drafts** based on feedback:
270
+ ```
271
+ chorus_update_task_draft({ proposalUuid: "<proposal-uuid>", draftUuid: "<draft-uuid>", ... })
272
+ chorus_update_document_draft({ proposalUuid: "<proposal-uuid>", draftUuid: "<draft-uuid>", ... })
273
+ ```
274
+
275
+ 3. **Validate and resubmit:**
276
+ ```
277
+ chorus_validate_proposal({ proposalUuid: "<proposal-uuid>" })
278
+ chorus_submit_proposal({ proposalUuid: "<proposal-uuid>" })
279
+ ```
280
+
281
+ ### Step 7: Post-Approval (SSE-Driven)
282
+
283
+ When the `proposal_approved` SSE event fires:
284
+ - Document drafts have become real Documents
285
+ - Task drafts have become real Tasks (status: `open`, ready for developers)
286
+
287
+ You can now assign tasks to developer agents:
288
+
289
+ ```
290
+ chorus_pm_assign_task({ taskUuid: "<task-uuid>", agentUuid: "<developer-agent-uuid>" })
291
+ ```
292
+
293
+ - Task must be `open` or `assigned`
294
+ - Target agent must have `developer` or `developer_agent` role
295
+ - Use `chorus_search_mentionables` to find the agent UUID
296
+
297
+ ### Step 8: Manage Post-Approval Dependencies (Optional)
298
+
299
+ After tasks are created, you can manage dependencies on existing tasks:
300
+
301
+ ```
302
+ chorus_update_task({
303
+ taskUuid: "<task-uuid>",
304
+ addDependsOn: ["<other-task-uuid>"],
305
+ removeDependsOn: ["<old-dependency-uuid>"]
306
+ })
307
+ ```
308
+
309
+ Or batch create additional tasks with intra-batch dependencies:
310
+
311
+ ```
312
+ chorus_create_tasks({
313
+ projectUuid: "<project-uuid>",
314
+ tasks: [
315
+ { draftUuid: "draft-db", title: "Create database schema", priority: "high", storyPoints: 2 },
316
+ { draftUuid: "draft-api", title: "Implement API endpoints", priority: "high", storyPoints: 4, dependsOnDraftUuids: ["draft-db"] }
317
+ ]
318
+ })
319
+ ```
320
+
321
+ Dependencies are validated: same project, no self-dependency, no cycles (DFS detection).
322
+
323
+ ---
324
+
325
+ ## Document Writing Guidelines
326
+
327
+ ### PRD Structure
328
+ ```markdown
329
+ # PRD: <Feature Name>
330
+
331
+ ## Background
332
+ Why this feature is needed.
333
+
334
+ ## Requirements
335
+ ### Functional Requirements
336
+ - FR-1: ...
337
+
338
+ ### Non-Functional Requirements
339
+ - NFR-1: ...
340
+
341
+ ## User Stories
342
+ - As a <role>, I want <action>, so that <benefit>
343
+
344
+ ## Out of Scope
345
+ What is NOT included.
346
+ ```
347
+
348
+ ### Tech Design Structure
349
+ ```markdown
350
+ # Technical Design: <Feature Name>
351
+
352
+ ## Overview
353
+ High-level approach.
354
+
355
+ ## Architecture
356
+ System design, component interactions.
357
+
358
+ ## Data Model
359
+ Schema changes, new tables.
360
+
361
+ ## API Design
362
+ New/modified endpoints.
363
+
364
+ ## Implementation Plan
365
+ Step-by-step implementation order.
366
+
367
+ ## Risks & Mitigations
368
+ Potential issues and how to address them.
369
+ ```
370
+
371
+ ### Task Writing Guidelines
372
+
373
+ Good tasks are:
374
+ - **Atomic** — One clear deliverable per task
375
+ - **Testable** — Clear acceptance criteria with `acceptanceCriteriaItems`
376
+ - **Sized** — 1-8 story points (hours of agent work)
377
+ - **Ordered** — Use `dependsOnDraftUuids` to express execution order in the DAG
378
+ - **Descriptive** — Include enough context for a developer agent to start without questions
379
+
380
+ ---
381
+
382
+ ## Tips
383
+
384
+ - Keep PRD focused on *what* and *why*; tech design focused on *how*
385
+ - Break large features into multiple smaller tasks rather than one monolithic task
386
+ - Add `storyPoints` to help prioritize and estimate effort
387
+ - Use `acceptanceCriteriaItems` with `required: true` for clear verification criteria
388
+ - Always set up the task dependency DAG — tasks without dependencies are assumed parallelizable
389
+ - When combining multiple ideas, explain how they relate in the proposal description
390
+ - SSE events mean you do not need to poll for approval/rejection — the plugin wakes you automatically
391
+
392
+ ---
393
+
394
+ ## Next
395
+
396
+ - After submission, an Admin will review using `/review`
397
+ - After approval, Developers claim tasks using `/develop`
398
+ - For Idea elaboration, see `/idea`
399
+ - For platform overview, see `/chorus`
@@ -0,0 +1,174 @@
1
+ ---
2
+ name: quick-dev
3
+ description: Quick Task workflow — skip Idea→Proposal, create tasks directly, execute, and verify.
4
+ metadata:
5
+ openclaw:
6
+ emoji: "⚡"
7
+ ---
8
+
9
+ # Quick Dev Skill
10
+
11
+ Skip the full AI-DLC pipeline (Idea → Elaboration → Proposal → Approval) and create tasks directly. Ideal for small, well-understood work. The goal is for agents to **autonomously record their development work and verify task completion** through structured acceptance criteria.
12
+
13
+ ---
14
+
15
+ ## Overview
16
+
17
+ The standard AI-DLC flow ensures quality through structured planning, but adds overhead that slows down small tasks. Quick Dev provides a lightweight alternative:
18
+
19
+ ```
20
+ [check admin role] → chorus_create_tasks → chorus_claim_task → in_progress → report → self-check AC → submit for verify → [self-verify if admin] → done
21
+ ```
22
+
23
+ **Use Quick Dev when:**
24
+ - Bug fixes with clear reproduction steps
25
+ - Small features (< 2 story points)
26
+ - Post-delivery patches and gap-filling after a proposal's tasks are done
27
+ - Prototype or exploratory tasks
28
+ - Urgent hotfixes that can't wait for proposal review
29
+
30
+ **Do NOT use Quick Dev when:**
31
+ - The feature needs a PRD or tech design document
32
+ - Multiple interdependent tasks require upfront planning
33
+ - Stakeholder elaboration is needed to clarify requirements
34
+ - The work impacts architecture or shared components significantly
35
+
36
+ For complex work, use `/idea` + `/proposal` instead.
37
+
38
+ ---
39
+
40
+ ## Pre-Flight: Admin Self-Verify Check
41
+
42
+ **Before creating tasks**, if you have the `admin_agent` role, ask the user:
43
+
44
+ > "I have admin privileges. After development, should I verify the task myself, or leave it for another admin to verify?"
45
+
46
+ This matters because admin agents can call `chorus_admin_verify_task` to close the loop autonomously. If the user approves self-verification, you can complete the entire create → develop → verify cycle without human intervention. Record the decision and apply it in Step 7.
47
+
48
+ ---
49
+
50
+ ## Tools
51
+
52
+ | Tool | Purpose |
53
+ |------|---------|
54
+ | `chorus_create_tasks` | Create task(s) — omit `proposalUuid` for standalone Quick Task, or pass it to attach to an existing proposal |
55
+ | `chorus_update_task` | Edit task fields (title, description, priority, AC, dependencies) or change status |
56
+ | `chorus_claim_task` | Claim a task (open → assigned) |
57
+ | `chorus_report_work` | Report progress with optional status update |
58
+ | `chorus_report_criteria_self_check` | Self-check acceptance criteria before submitting |
59
+ | `chorus_submit_for_verify` | Submit for admin verification |
60
+ | `chorus_admin_verify_task` | **(admin only)** Verify task — use when self-verification is approved |
61
+
62
+ ---
63
+
64
+ ## Workflow
65
+
66
+ ### Step 1: Create a Quick Task
67
+
68
+ **Always include `acceptanceCriteriaItems`** — these are the foundation for self-checking in Step 6. Write specific, testable criteria that you can objectively verify after development. Vague AC like "works correctly" defeats the purpose; prefer "returns 200 on GET /api/foo with valid token".
69
+
70
+ ```
71
+ chorus_create_tasks({
72
+ projectUuid: "<project-uuid>",
73
+ tasks: [{
74
+ title: "Fix login redirect loop on Safari",
75
+ description: "Safari loses session cookie after redirect...",
76
+ priority: "high",
77
+ storyPoints: 1,
78
+ acceptanceCriteriaItems: [
79
+ { description: "Login works on Safari 17+", required: true },
80
+ { description: "Existing Chrome/Firefox behavior unchanged", required: true }
81
+ ]
82
+ }]
83
+ })
84
+ ```
85
+
86
+ **`proposalUuid` is optional:**
87
+ - **Omit** for standalone quick tasks (bug fixes, hotfixes, exploratory work)
88
+ - **Pass** to attach the task to an existing proposal — useful for gap-filling, follow-up patches, or continuing work after a proposal's initial tasks are delivered
89
+
90
+ ### Step 2: Claim the Task
91
+
92
+ ```
93
+ chorus_claim_task({ taskUuid: "<task-uuid>" })
94
+ ```
95
+
96
+ ### Step 3: Edit Details (if needed)
97
+
98
+ Use `chorus_update_task` to refine the task after creation. **If you skipped AC in Step 1, add them now** — you will need them for self-check later. Also update AC when your understanding of the task changes during development.
99
+
100
+ ```
101
+ chorus_update_task({
102
+ taskUuid: "<task-uuid>",
103
+ description: "Updated with more details...",
104
+ acceptanceCriteriaItems: [
105
+ { description: "Login works on Safari 17+", required: true },
106
+ { description: "Added CSRF token handling", required: true }
107
+ ],
108
+ addDependsOn: ["<other-task-uuid>"]
109
+ })
110
+ ```
111
+
112
+ ### Step 4: Start Working
113
+
114
+ ```
115
+ chorus_update_task({ taskUuid: "<task-uuid>", status: "in_progress" })
116
+ ```
117
+
118
+ ### Step 5: Report Progress
119
+
120
+ ```
121
+ chorus_report_work({
122
+ taskUuid: "<task-uuid>",
123
+ report: "Fixed Safari cookie issue:\n- Root cause: SameSite=Strict incompatible with redirect\n- Changed to SameSite=Lax\n- Commit: abc1234"
124
+ })
125
+ ```
126
+
127
+ ### Step 6: Self-Check Acceptance Criteria
128
+
129
+ ```
130
+ chorus_report_criteria_self_check({
131
+ taskUuid: "<task-uuid>",
132
+ criteria: [
133
+ { uuid: "<ac-uuid-1>", devStatus: "passed", devEvidence: "Tested on Safari 17.2" },
134
+ { uuid: "<ac-uuid-2>", devStatus: "passed", devEvidence: "Chrome/Firefox regression tests pass" }
135
+ ]
136
+ })
137
+ ```
138
+
139
+ ### Step 7: Submit for Verification (or Self-Verify)
140
+
141
+ ```
142
+ chorus_submit_for_verify({
143
+ taskUuid: "<task-uuid>",
144
+ summary: "Fixed Safari login redirect loop. Changed SameSite cookie policy. All AC passed."
145
+ })
146
+ ```
147
+
148
+ **Admin self-verification:** If you have the `admin_agent` role and the user approved self-verification in the Pre-Flight check, you can verify the task yourself immediately after submitting:
149
+
150
+ ```
151
+ chorus_admin_verify_task({ taskUuid: "<task-uuid>" })
152
+ ```
153
+
154
+ This completes the full autonomous cycle: create → develop → verify → done.
155
+
156
+ ---
157
+
158
+ ## Tips
159
+
160
+ - Keep Quick Tasks small — if you need more than 2-3 tasks, consider using `/proposal`
161
+ - **Always write acceptance criteria at creation time** — they are your self-check contract. Specific, testable AC enables autonomous verification and makes the entire workflow self-contained
162
+ - Use `chorus_update_task` to refine tasks (including AC) after creation rather than deleting and recreating
163
+ - Pass `proposalUuid` to attach follow-up or gap-filling tasks to an existing proposal — this keeps related work grouped in the same project context and DAG
164
+ - Quick Tasks show up in the same project task list and DAG as proposal-based tasks
165
+ - Admin agents can run the full lifecycle autonomously (create → develop → self-verify) — but always confirm with the user first
166
+
167
+ ---
168
+
169
+ ## Next
170
+
171
+ - For full task lifecycle details, see `/develop`
172
+ - For admin verification, see `/review`
173
+ - For the standard planning flow, see `/idea` and `/proposal`
174
+ - For platform overview, see `/chorus`