Skip to content

Commit e4c7bc8

Browse files
ChenNimaclaude
andauthored
feat: add native skills to OpenClaw plugin (v0.4.0) (#66)
* feat: add native skills to OpenClaw plugin (v0.4.0) Adapt to OpenClaw's new plugin skill discovery system by embedding 6 SKILL.md files directly in the plugin package. OpenClaw auto-scans skills/ directory — no manual download needed. Skills: chorus, idea, proposal, develop, quick-dev, review Each written independently for OC's single-agent + SSE wake model (no CC session/Agent Team content). Also: /chorus skills command, updated README with full tool inventory. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: remove MCP tool name mapping notes from OC skills Skills should only reference OC-registered tool names, not expose internal MCP mappings. Removed "Note on tool names" blocks from idea and proposal skills that referenced chorus_pm_* MCP names. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: add label field and AgentToolResult return type to all OC tools OpenClaw's AgentTool interface requires: - `label: string` (mandatory field, was missing from all 50 tools) - `execute` must return `{ content: [{ type: "text", text }], details }` (was returning plain string via JSON.stringify) Added toolResult() helper to each tool file for consistent formatting. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add sandbox troubleshooting to OC plugin README Document that sandbox mode blocks plugin tools by default and how to add chorus-openclaw-plugin to the alsoAllow list. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: silence comment_added SSE event in event router comment_added notifications don't need to wake the agent — @mentions are already handled by the separate "mentioned" action. Added explicit case to suppress "Unhandled notification action" log noise. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Revert "fix: silence comment_added SSE event in event router" This reverts commit 5c3b4fe. --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1936746 commit e4c7bc8

File tree

14 files changed

+2072
-63
lines changed

14 files changed

+2072
-63
lines changed

packages/openclaw-plugin/README.md

Lines changed: 81 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ Chorus Server
3939
│ └──────────────────────┘ (immediate heartbeat)
4040
4141
├── MCP (POST /api/mcp)
42-
40 Chorus MCP tools available as native
42+
47 Chorus MCP tools available as native
4343
│ OpenClaw agent tools via @modelcontextprotocol/sdk
4444
4545
└─────────────────────────────────────────────────────
4646
```
4747

4848
**Key design decisions:**
4949

50-
- **MCP Client, not REST** — Uses `@modelcontextprotocol/sdk` to call Chorus MCP tools directly. Zero Chorus-side code changes needed. 40 tools registered out of the box. When Chorus adds new MCP tools, adding them to the plugin is a one-liner.
50+
- **MCP Client, not REST** — Uses `@modelcontextprotocol/sdk` to call Chorus MCP tools directly. Zero Chorus-side code changes needed. 47 tools registered out of the box. When Chorus adds new MCP tools, adding them to the plugin is a one-liner.
5151
- **SSE for push, MCP for pull** — SSE delivers real-time notifications; MCP handles all tool operations (claim, report, submit, etc.).
5252
- **Hooks-based agent wake** — Uses OpenClaw's `/hooks/wake` API to inject system events and trigger immediate heartbeats when Chorus events arrive.
5353

@@ -138,9 +138,24 @@ The plugin maintains a persistent SSE connection to Chorus and reacts to these e
138138

139139
**Resilience:** Exponential backoff reconnect (1s → 2s → 4s → ... → 30s max). After reconnect, unread notifications are back-filled via MCP to ensure no events are lost.
140140

141-
### Registered Tools (40 total)
141+
### Built-in Skills (6)
142142

143-
#### PM Workflow (15 tools)
143+
The plugin ships with 6 SKILL.md files that OpenClaw auto-discovers and loads. These provide workflow guidance to the agent without consuming tool calls.
144+
145+
| Skill | Description |
146+
|-------|-------------|
147+
| `chorus` | Platform overview, common tools, setup, and workflow routing |
148+
| `idea` | Claim ideas, run elaboration rounds, prepare for proposal |
149+
| `proposal` | Create proposals with document & task drafts, manage dependency DAG |
150+
| `develop` | Claim tasks, report work, submit for verification |
151+
| `quick-dev` | Skip Idea→Proposal, create tasks directly, execute, and verify |
152+
| `review` | Approve/reject proposals, verify tasks, project governance |
153+
154+
Skills are automatically available when the plugin is enabled — no extra configuration needed.
155+
156+
### Registered Tools (47 total)
157+
158+
#### PM Workflow (17 tools)
144159

145160
| Tool | Description |
146161
|------|-------------|
@@ -159,17 +174,20 @@ The plugin maintains a persistent SSE connection to Chorus and reacts to these e
159174
| `chorus_validate_proposal` | Check proposal completeness before submit |
160175
| `chorus_submit_proposal` | Submit proposal for approval |
161176
| `chorus_pm_create_idea` | Create a new idea in a project |
177+
| `chorus_pm_assign_task` | Assign a task to a specific Developer Agent |
178+
| `chorus_move_idea` | Move an idea to a different project |
162179

163180
#### Developer Workflow (4 tools)
164181

165182
| Tool | Description |
166183
|------|-------------|
167184
| `chorus_claim_task` | Claim an open task |
168-
| `chorus_update_task` | Update task status (in_progress / to_verify) |
169-
| `chorus_report_work` | Report work progress |
185+
| `chorus_update_task` | Update task status or fields (title, description, priority, dependencies) |
186+
| `chorus_report_work` | Report work progress (writes comment + records activity) |
170187
| `chorus_submit_for_verify` | Submit completed task for verification |
188+
| `chorus_report_criteria_self_check` | Self-check acceptance criteria before submitting |
171189

172-
#### Common & Exploration (20 tools)
190+
#### Common & Exploration (21 tools)
173191

174192
| Tool | Description |
175193
|------|-------------|
@@ -193,12 +211,20 @@ The plugin maintains a persistent SSE connection to Chorus and reacts to these e
193211
| `chorus_get_comments` | Get comments on an entity |
194212
| `chorus_get_elaboration` | Get full elaboration state for an idea |
195213
| `chorus_get_my_assignments` | Get all claimed ideas and tasks |
214+
| `chorus_get_project_groups` | List all project groups |
215+
| `chorus_get_project_group` | Get a project group with its projects |
216+
| `chorus_create_tasks` | Batch create tasks (Quick Task or Proposal-linked) |
217+
| `chorus_search` | Search across tasks, ideas, proposals, documents, projects |
196218

197-
#### Admin (1 tool)
219+
#### Admin (5 tools)
198220

199221
| Tool | Description |
200222
|------|-------------|
201223
| `chorus_admin_create_project` | Create a new project |
224+
| `chorus_admin_create_project_group` | Create a new project group |
225+
| `chorus_admin_approve_proposal` | Approve a proposal (materializes drafts into Documents + Tasks) |
226+
| `chorus_admin_verify_task` | Verify a task (to_verify → done, unblocks downstream) |
227+
| `chorus_mark_acceptance_criteria` | Mark acceptance criteria as passed/failed |
202228

203229
### Commands
204230

@@ -209,14 +235,22 @@ Bypass LLM for fast status queries:
209235
| `/chorus` or `/chorus status` | Connection status, assignments, unread count |
210236
| `/chorus tasks` | List your assigned tasks |
211237
| `/chorus ideas` | List your assigned ideas |
238+
| `/chorus skills` | List available Chorus skills |
212239

213240
## Architecture
214241

215242
```
216243
packages/openclaw-plugin/
217244
├── package.json # npm package config
218-
├── openclaw.plugin.json # OpenClaw plugin manifest
245+
├── openclaw.plugin.json # OpenClaw plugin manifest (declares skills)
219246
├── tsconfig.json
247+
├── skills/ # 6 SKILL.md files (auto-discovered by OpenClaw)
248+
│ ├── chorus/SKILL.md # Core overview & routing
249+
│ ├── idea/SKILL.md # Idea → Elaboration workflow
250+
│ ├── proposal/SKILL.md # Proposal → DAG → Submit workflow
251+
│ ├── develop/SKILL.md # Task → Report → Verify workflow
252+
│ ├── quick-dev/SKILL.md # Quick task creation & execution
253+
│ └── review/SKILL.md # Admin review & governance
220254
└── src/
221255
├── index.ts # Plugin entry — wires all modules together
222256
├── config.ts # Zod config schema
@@ -225,9 +259,10 @@ packages/openclaw-plugin/
225259
├── event-router.ts # Event → agent action mapping
226260
├── commands.ts # /chorus commands
227261
└── tools/
228-
├── pm-tools.ts # 14 PM workflow tools
262+
├── pm-tools.ts # 17 PM workflow tools
229263
├── dev-tools.ts # 4 Developer tools
230-
└── common-tools.ts # 21 common/exploration/admin tools
264+
├── common-tools.ts # 21 common/exploration tools
265+
└── admin-tools.ts # 5 Admin tools
231266
```
232267

233268
### MCP Client (`mcp-client.ts`)
@@ -254,6 +289,41 @@ Wraps `@modelcontextprotocol/sdk` with:
254289

255290
## Troubleshooting
256291

292+
### chorus_* tools not available in agent (sandbox mode)
293+
294+
**Symptom:** Agent cannot call `chorus_checkin` or any `chorus_*` tool. Tools are missing from the tool list.
295+
296+
**Cause:** When OpenClaw sandbox mode is enabled (`agents.defaults.sandbox.mode = "all"` or `"non-main"`), the sandbox tool policy only allows a fixed set of core tools by default. Plugin-registered tools are excluded unless explicitly allowed.
297+
298+
**Verify:**
299+
```bash
300+
openclaw sandbox explain
301+
# Look for: Sandbox tool policy → allow (default)
302+
# chorus_* tools will NOT appear unless configured
303+
```
304+
305+
**Fix:** Add the plugin to the sandbox tool allow list:
306+
```bash
307+
openclaw config set tools.sandbox.tools.alsoAllow '["chorus-openclaw-plugin"]'
308+
# Then restart gateway
309+
openclaw gateway restart
310+
```
311+
312+
Or add directly to `~/.openclaw/openclaw.json`:
313+
```json
314+
{
315+
"tools": {
316+
"sandbox": {
317+
"tools": {
318+
"alsoAllow": ["chorus-openclaw-plugin"]
319+
}
320+
}
321+
}
322+
}
323+
```
324+
325+
---
326+
257327
### "plugin id mismatch" warning
258328
Ensure `openclaw.plugin.json` `id` and `index.ts` `id` both equal `chorus-openclaw-plugin`.
259329

packages/openclaw-plugin/openclaw.plugin.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"id": "chorus-openclaw-plugin",
3+
"skills": ["./skills"],
34
"configSchema": {
45
"type": "object",
56
"additionalProperties": false,

packages/openclaw-plugin/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@chorus-aidlc/chorus-openclaw-plugin",
3-
"version": "0.3.1",
3+
"version": "0.4.0",
44
"description": "OpenClaw plugin for Chorus AI-DLC collaboration platform — SSE real-time events + MCP tool integration",
55
"license": "MIT",
66
"type": "module",
@@ -30,6 +30,7 @@
3030
"keywords": ["openclaw", "chorus", "ai-dlc", "mcp", "plugin", "agent"],
3131
"files": [
3232
"src",
33+
"skills",
3334
"openclaw.plugin.json",
3435
"README.md"
3536
]

0 commit comments

Comments
 (0)