@jiggai/recipes 0.4.17 → 0.4.18

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.
package/docs/COMMANDS.md CHANGED
@@ -1,351 +1,385 @@
1
- # Command reference
1
+ # ClawRecipes command reference
2
2
 
3
- All commands live under:
3
+ All commands are under:
4
4
 
5
5
  ```bash
6
6
  openclaw recipes <command>
7
7
  ```
8
8
 
9
- ## `list`
10
- List available recipes (builtin + workspace).
9
+ This page is organized by the jobs humans actually need to do.
10
+
11
+ ---
12
+
13
+ ## 1) Browse recipes
14
+
15
+ ### List all recipes
11
16
 
12
17
  ```bash
13
18
  openclaw recipes list
14
19
  ```
15
20
 
16
- Outputs JSON rows:
17
- - `id`, `name`, `kind`, `source`
18
-
19
- ## `show <id>`
20
- Print the raw recipe markdown.
21
+ ### Show one recipe
21
22
 
22
23
  ```bash
23
24
  openclaw recipes show development-team
24
25
  ```
25
26
 
26
- ## `status [id]`
27
- Check missing skills for a recipe (or all recipes).
27
+ ### Check recipe status / missing skills
28
28
 
29
29
  ```bash
30
30
  openclaw recipes status
31
31
  openclaw recipes status development-team
32
32
  ```
33
33
 
34
- ## `scaffold <recipeId>`
35
- Scaffold a single agent workspace from an **agent** recipe.
34
+ ---
35
+
36
+ ## 2) Install recipes and skills
37
+
38
+ ### Install a marketplace recipe into your workspace
39
+
40
+ ```bash
41
+ openclaw recipes install development-team
42
+ openclaw recipes install clinic-team --overwrite
43
+ ```
44
+
45
+ Optional:
46
+ - `--registry-base <url>`
47
+ - `--overwrite`
48
+
49
+ Alias:
50
+
51
+ ```bash
52
+ openclaw recipes install-recipe development-team
53
+ ```
54
+
55
+ ### Install a skill from ClawHub
36
56
 
37
57
  ```bash
38
- openclaw recipes scaffold project-manager --agent-id pm --name "Project Manager" --apply-config
58
+ # global
59
+ openclaw recipes install-skill agentchat --yes
60
+
61
+ # scoped to one agent
62
+ openclaw recipes install-skill agentchat --yes --agent-id dev
63
+
64
+ # scoped to one team
65
+ openclaw recipes install-skill agentchat --yes --team-id development-team
39
66
  ```
40
67
 
41
68
  Options:
42
- - `--agent-id <id>` (required)
43
- - `--name <name>`
44
- - `--recipe-id <recipeId>` (workspace recipe id to write; default: `<agentId>`)
45
- - `--auto-increment` (if the workspace recipe id is taken, pick `<agentId>-2/-3/...`)
46
- - `--overwrite-recipe` (overwrite the generated workspace recipe file if it already exists)
47
- - `--overwrite` (overwrite recipe-managed files)
48
- - `--apply-config` (write/update `agents.list[]` in OpenClaw config)
49
- - Cron: see Cron installation under scaffold-team.
69
+ - `--yes`
70
+ - `--global`
71
+ - `--agent-id <id>`
72
+ - `--team-id <id>`
50
73
 
51
- Also writes a workspace recipe file:
52
- - `~/.openclaw/workspace/recipes/<recipeId>.md`
74
+ ---
53
75
 
54
- ## `scaffold-team <recipeId>`
76
+ ## 3) Scaffold agents and teams
55
77
 
56
- Scaffold a shared **team workspace** + multiple agents from a **team** recipe.
78
+ ### Scaffold a single agent
57
79
 
58
80
  ```bash
59
- openclaw recipes scaffold-team development-team \
60
- --team-id development-team-team \
61
- --overwrite \
81
+ openclaw recipes scaffold project-manager \
82
+ --agent-id pm \
83
+ --name "Project Manager" \
62
84
  --apply-config
63
85
  ```
64
86
 
65
- Options:
66
- - `--team-id <teamId>` (required)
67
- - **Must end with `-team`** (enforced)
68
- - `--recipe-id <recipeId>` (workspace recipe id to write; default: `<teamId>`)
69
- - `--auto-increment` (if the workspace recipe id is taken, pick `<teamId>-2/-3/...`)
70
- - `--overwrite-recipe` (overwrite the generated workspace recipe file if it already exists)
87
+ Useful options:
88
+ - `--agent-id <id>`
89
+ - `--name <name>`
90
+ - `--recipe-id <recipeId>`
91
+ - `--auto-increment`
92
+ - `--overwrite-recipe`
71
93
  - `--overwrite`
72
94
  - `--apply-config`
73
95
 
74
- Also writes a workspace recipe file:
75
- - `~/.openclaw/workspace/recipes/<recipeId>.md`
96
+ What it writes:
97
+ - `~/.openclaw/workspace-<agentId>/...`
98
+ - workspace recipe file under `~/.openclaw/workspace/recipes/`
99
+
100
+ ### Scaffold a team
101
+
102
+ ```bash
103
+ openclaw recipes scaffold-team development-team \
104
+ --team-id development-team \
105
+ --apply-config \
106
+ --overwrite
107
+ ```
76
108
 
77
- Creates a shared team workspace root:
109
+ Useful options:
110
+ - `--team-id <teamId>`
111
+ - `--recipe-id <recipeId>`
112
+ - `--auto-increment`
113
+ - `--overwrite-recipe`
114
+ - `--overwrite`
115
+ - `--apply-config`
78
116
 
117
+ What it writes:
79
118
  - `~/.openclaw/workspace-<teamId>/...`
119
+ - role folders under `roles/`
120
+ - ticket lanes under `work/`
121
+ - workspace recipe file under `~/.openclaw/workspace/recipes/`
80
122
 
81
- Standard folders:
82
- - `inbox/`, `outbox/`, `shared/`, `notes/`
83
- - `work/{backlog,in-progress,testing,done,assignments}`
84
- - `roles/<role>/...` (role-specific recipe files)
123
+ ### Add a role to an existing team
85
124
 
86
- Also creates agent config entries under `agents.list[]` (when `--apply-config`), with agent ids:
87
- - `<teamId>-<role>`
125
+ ```bash
126
+ openclaw recipes add-role \
127
+ --team-id development-team \
128
+ --role workflow-runner \
129
+ --recipe workflow-runner-addon \
130
+ --apply-config
131
+ ```
88
132
 
89
- ### Cron installation
90
- If a recipe declares `cronJobs`, scaffold and scaffold-team reconcile those jobs using the plugin config key:
91
- - `plugins.entries.recipes.config.cronInstallation`: `off | prompt | on`
92
- - `off`: never install/reconcile
93
- - `prompt` (default): prompt each run (default answer is **No**)
94
- - `on`: install/reconcile; new jobs follow `enabledByDefault`
133
+ Useful options:
134
+ - `--team-id <teamId>`
135
+ - `--role <role>`
136
+ - `--recipe <recipeId>`
137
+ - `--agent-id <agentId>`
138
+ - `--apply-config`
139
+ - `--overwrite`
140
+ - `--no-cron`
95
141
 
96
- Applies to both `scaffold` and `scaffold-team` when the recipe declares `cronJobs`.
142
+ ---
97
143
 
98
- ## `install-skill <idOrSlug> [--yes]`
99
- Install skills from ClawHub (confirmation-gated).
144
+ ## 4) Work the file-first ticket flow
100
145
 
101
- Default: **global** into `~/.openclaw/skills`.
146
+ The normal lane flow is:
102
147
 
103
- ```bash
104
- # Global (shared across all agents)
105
- openclaw recipes install-skill agentchat --yes
148
+ ```text
149
+ backlog in-progress testing → done
150
+ ```
106
151
 
107
- # Agent-scoped (into workspace-<agentId>/skills)
108
- openclaw recipes install-skill agentchat --yes --agent-id dev
152
+ ### Turn a request into a ticket
109
153
 
110
- # Team-scoped (into workspace-<teamId>/skills)
111
- openclaw recipes install-skill agentchat --yes --team-id development-team-team
154
+ ```bash
155
+ openclaw recipes dispatch \
156
+ --team-id development-team \
157
+ --owner lead \
158
+ --request "Add a customer-support team recipe"
112
159
  ```
113
160
 
114
161
  Options:
115
- - `--yes` — skip confirmation
116
- - `--global` — install into global skills (default when no scope flags)
117
- - `--agent-id <id>` — install into agent workspace
118
- - `--team-id <id>` — install into team workspace
119
-
120
- Behavior:
121
- - If `idOrSlug` matches a recipe id, installs that recipe’s `requiredSkills` + `optionalSkills`.
122
- - Otherwise treats it as a ClawHub skill slug.
123
- - Installs via `npx clawhub@latest ...`. Confirmation-gated unless `--yes`. In non-interactive mode (no TTY), requires `--yes`.
162
+ - `--team-id <teamId>`
163
+ - `--request <text>`
164
+ - `--owner dev|devops|lead|test`
165
+ - `--yes`
124
166
 
125
- ## `install <slug>`
126
- Install a marketplace recipe into your workspace recipes dir (by slug).
167
+ ### List tickets
127
168
 
128
169
  ```bash
129
- openclaw recipes install development-team
130
- openclaw recipes install development-team --overwrite
170
+ openclaw recipes tickets --team-id development-team
171
+ openclaw recipes tickets --team-id development-team --json
131
172
  ```
132
173
 
133
- Options:
134
- - `--registry-base <url>` — Marketplace API base URL (default: `https://clawkitchen.ai`)
135
- - `--overwrite` — overwrite existing recipe file
174
+ ### Move a ticket between lanes
136
175
 
137
- Use `install-recipe` as an alias for this command.
176
+ ```bash
177
+ openclaw recipes move-ticket --team-id development-team --ticket 0007 --to in-progress
178
+ openclaw recipes move-ticket --team-id development-team --ticket 0007 --to testing
179
+ openclaw recipes move-ticket --team-id development-team --ticket 0007 --to done --completed
180
+ ```
138
181
 
139
- ## `bind`
140
- Add/update a multi-agent routing binding (writes `bindings[]` in `~/.openclaw/openclaw.json`).
182
+ Options:
183
+ - `--team-id <teamId>`
184
+ - `--ticket <ticket>`
185
+ - `--to backlog|in-progress|testing|done`
186
+ - `--completed`
187
+ - `--yes`
141
188
 
142
- Examples:
189
+ ### Assign a ticket
143
190
 
144
191
  ```bash
145
- # Route one Telegram DM to an agent
146
- openclaw recipes bind --agent-id dev --channel telegram --peer-kind dm --peer-id 6477250615
147
-
148
- # Route all Telegram traffic to an agent (broad match)
149
- openclaw recipes bind --agent-id dev --channel telegram
192
+ openclaw recipes assign --team-id development-team --ticket 0007 --owner dev
193
+ openclaw recipes assign --team-id development-team --ticket 0007 --owner lead
150
194
  ```
151
195
 
152
- Notes:
153
- - `peer.kind` must be one of: `dm|group|channel`.
154
- - Peer-specific bindings are inserted first (more specific wins).
196
+ Options:
197
+ - `--team-id <teamId>`
198
+ - `--ticket <ticket>`
199
+ - `--owner dev|devops|lead|test`
200
+ - `--overwrite`
201
+ - `--yes`
155
202
 
156
- ## `unbind`
157
- Remove routing binding(s) from OpenClaw config (`bindings[]`).
203
+ ### Take a ticket
158
204
 
159
- Examples:
205
+ Shortcut for assign + move to in-progress.
160
206
 
161
207
  ```bash
162
- # Remove a specific DM binding for an agent
163
- openclaw recipes unbind --agent-id dev --channel telegram --peer-kind dm --peer-id 6477250615
164
-
165
- # Remove ALL bindings that match this peer (any agent)
166
- openclaw recipes unbind --channel telegram --peer-kind dm --peer-id 6477250615
208
+ openclaw recipes take --team-id development-team --ticket 0007 --owner dev
167
209
  ```
168
210
 
169
- ## `bindings`
170
- Print the current `bindings[]` from OpenClaw config.
211
+ ### Handoff to testing
171
212
 
172
213
  ```bash
173
- openclaw recipes bindings
214
+ openclaw recipes handoff --team-id development-team --ticket 0007
215
+ openclaw recipes handoff --team-id development-team --ticket 0007 --tester test
174
216
  ```
175
217
 
176
- ## `migrate-team`
177
- Migrate a legacy team scaffold into the new `workspace-<teamId>` layout.
218
+ ### Complete a ticket
178
219
 
179
220
  ```bash
180
- openclaw recipes migrate-team --team-id development-team-team --dry-run
181
- openclaw recipes migrate-team --team-id development-team-team --mode move
221
+ openclaw recipes complete --team-id development-team --ticket 0007
182
222
  ```
183
223
 
184
- Options:
185
- - `--dry-run`
186
- - `--mode move|copy`
187
- - `--overwrite` (merge into existing destination)
188
-
189
- ## `remove-team`
190
- Safe uninstall: remove a scaffolded team workspace, agents from config, and stamped cron jobs.
224
+ ### Clean up stale assignment stubs for done work
191
225
 
192
226
  ```bash
193
- openclaw recipes remove-team --team-id development-team-team --plan --json
194
- openclaw recipes remove-team --team-id development-team-team --yes
227
+ openclaw recipes cleanup-closed-assignments --team-id development-team
228
+ openclaw recipes cleanup-closed-assignments --team-id development-team --ticket 0050 0064
195
229
  ```
196
230
 
197
- Options:
198
- - `--team-id <teamId>` (required)
199
- - `--plan` — print plan and exit without applying
200
- - `--json` — output JSON
201
- - `--yes` — skip confirmation (apply destructive changes)
202
- - `--include-ambiguous` — also remove cron jobs that only loosely match the team (dangerous)
231
+ ---
203
232
 
204
- Notes:
205
- - Confirmation-gated by default. Use `--yes` to apply without prompting.
206
- - Cron cleanup removes only cron jobs stamped with `recipes.teamId=<teamId>`.
207
- - Restart required after removal: `openclaw gateway restart`
233
+ ## 5) Workflows
208
234
 
209
- ## `dispatch`
210
- Convert a natural-language request into file-first execution artifacts (inbox + backlog ticket + assignment stubs).
235
+ Use these when you are running file-first workflows from `shared-context/workflows/`.
236
+
237
+ ### See workflow command help
211
238
 
212
239
  ```bash
213
- openclaw recipes dispatch \
214
- --team-id development-team-team \
215
- --request "Add a customer-support team recipe" \
216
- --owner lead
240
+ openclaw recipes workflows --help
217
241
  ```
218
242
 
219
- Options:
220
- - `--team-id <teamId>` (required)
221
- - `--request <text>` (optional; prompts in TTY)
222
- - `--owner dev|devops|lead|test` (default: `dev`)
223
- - `--yes` (skip review prompt)
243
+ ### Run one workflow manually
224
244
 
225
- Creates:
226
- - `workspace-<teamId>/inbox/<timestamp>-<slug>.md`
227
- - `workspace-<teamId>/work/backlog/<NNNN>-<slug>.md`
228
- - `workspace-<teamId>/work/assignments/<NNNN>-assigned-<owner>.md`
245
+ ```bash
246
+ openclaw recipes workflows run \
247
+ --team-id development-team \
248
+ --workflow-file marketing.workflow.json
249
+ ```
229
250
 
230
- Ticket numbering:
231
- - Scans `work/backlog`, `work/in-progress`, `work/testing`, `work/done` and uses max+1.
251
+ ### Runner commands
232
252
 
233
- Review-before-write:
234
- - Prints a JSON plan and asks for confirmation unless `--yes`.
253
+ ```bash
254
+ openclaw recipes workflows runner-once --team-id development-team
255
+
256
+ openclaw recipes workflows runner-tick \
257
+ --team-id development-team \
258
+ --concurrency 2 \
259
+ --lease-seconds 120
260
+ ```
235
261
 
236
- ## Ticket workflow commands
262
+ ### Worker commands
237
263
 
238
- The following commands manage the file-first ticket flow (`work/backlog` → `in-progress` → `testing` → `done`).
264
+ ```bash
265
+ openclaw recipes workflows worker-tick \
266
+ --team-id development-team \
267
+ --agent-id development-team-lead \
268
+ --limit 10
269
+ ```
239
270
 
240
- ### `tickets`
241
- List tickets for a team across the standard workflow stages.
271
+ ### Approval commands
242
272
 
243
273
  ```bash
244
- openclaw recipes tickets --team-id <teamId>
245
- openclaw recipes tickets --team-id <teamId> --json
274
+ openclaw recipes workflows approve \
275
+ --team-id development-team \
276
+ --run-id <runId> \
277
+ --approved true
278
+
279
+ openclaw recipes workflows approve \
280
+ --team-id development-team \
281
+ --run-id <runId> \
282
+ --approved false \
283
+ --note "Rewrite the hook"
284
+
285
+ openclaw recipes workflows resume \
286
+ --team-id development-team \
287
+ --run-id <runId>
288
+
289
+ openclaw recipes workflows poll-approvals \
290
+ --team-id development-team \
291
+ --limit 20
246
292
  ```
247
293
 
248
- ## `cleanup-workspaces`
249
- List (dry-run, default) or delete (with `--yes`) temporary test/scaffold team workspaces under your OpenClaw home directory.
294
+ ### Important workflow note
250
295
 
251
- Safety rails:
252
- - Only considers `workspace-<teamId>` directories where `<teamId>`:
253
- - ends with `-team`
254
- - starts with an allowed prefix (default: `smoke-`, `qa-`, `tmp-`, `test-`)
255
- - Refuses symlinks
256
- - Protected teams (at minimum: `development-team`) are never deleted
296
+ After installing ClawRecipes, workflows may still need optional pieces turned on.
257
297
 
258
298
  Examples:
259
- ```bash
260
- # Dry-run (default): list what would be deleted
261
- openclaw recipes cleanup-workspaces
262
-
263
- # Actually delete eligible workspaces
264
- openclaw recipes cleanup-workspaces --yes
299
+ - LLM workflows may require the built-in `llm-task` plugin to be enabled
300
+ - publishing workflows may require `outbound.post` config or a local posting patch to be reapplied
265
301
 
266
- # Custom prefixes (repeatable)
267
- openclaw recipes cleanup-workspaces --prefix smoke- --prefix qa- --yes
302
+ So if you install the plugin and then say "the workflow exists but does not fully work," check the optional workflow dependencies next.
268
303
 
269
- # JSON output
270
- openclaw recipes cleanup-workspaces --json
271
- ```
304
+ More:
305
+ - [WORKFLOW_RUNS_FILE_FIRST.md](WORKFLOW_RUNS_FILE_FIRST.md)
306
+ - [OUTBOUND_POSTING.md](OUTBOUND_POSTING.md)
272
307
 
273
- ### `move-ticket`
274
- Move a ticket file between workflow stages and update the ticket’s `Status:` field.
308
+ ---
275
309
 
276
- ```bash
277
- openclaw recipes move-ticket --team-id <teamId> --ticket 0007 --to in-progress
278
- openclaw recipes move-ticket --team-id <teamId> --ticket 0007 --to testing
279
- openclaw recipes move-ticket --team-id <teamId> --ticket 0007 --to done --completed
280
- ```
310
+ ## 6) Bindings
281
311
 
282
- Stages:
283
- - `backlog` → `Status: queued`
284
- - `in-progress` → `Status: in-progress`
285
- - `testing` → `Status: testing`
286
- - `done` → `Status: done` (optional `Completed:` timestamp)
312
+ Bindings route messages/traffic to the right agent.
287
313
 
288
- ### `assign`
289
- Assign a ticket to an owner (updates `Owner:` and creates an assignment stub).
314
+ ### Show bindings
290
315
 
291
316
  ```bash
292
- openclaw recipes assign --team-id <teamId> --ticket 0007 --owner dev
293
- openclaw recipes assign --team-id <teamId> --ticket 0007 --owner lead
317
+ openclaw recipes bindings
294
318
  ```
295
319
 
296
- Owners (current): `dev|devops|lead|test`.
297
-
298
- ### `take`
299
- Shortcut: assign + move to in-progress.
320
+ ### Add a binding
300
321
 
301
322
  ```bash
302
- openclaw recipes take --team-id <teamId> --ticket 0007 --owner dev
323
+ openclaw recipes bind \
324
+ --agent-id dev \
325
+ --channel telegram \
326
+ --peer-kind dm \
327
+ --peer-id 6477250615
303
328
  ```
304
329
 
305
- ### `handoff`
306
- QA handoff in one step: move a ticket to `work/testing/`, set `Status: testing`, assign to a tester (default `test`), and write/update the assignment stub.
330
+ ### Remove a binding
307
331
 
308
332
  ```bash
309
- openclaw recipes handoff --team-id <teamId> --ticket 0007
310
- openclaw recipes handoff --team-id <teamId> --ticket 0007 --tester test
333
+ openclaw recipes unbind \
334
+ --agent-id dev \
335
+ --channel telegram \
336
+ --peer-kind dm \
337
+ --peer-id 6477250615
311
338
  ```
312
339
 
313
- Notes:
314
- - Creates `work/testing/` if missing.
315
- - Idempotent: if the ticket is already in `work/testing/`, it won’t re-move it; it will ensure fields + assignment stub.
340
+ ---
341
+
342
+ ## 7) Migrate / remove / clean up
316
343
 
317
- ### `complete`
318
- Shortcut: move to done + ensure `Status: done` + add `Completed:` timestamp. No confirmation prompt.
344
+ ### Migrate a legacy team layout
319
345
 
320
346
  ```bash
321
- openclaw recipes complete --team-id <teamId> --ticket 0007
347
+ openclaw recipes migrate-team --team-id development-team --dry-run
348
+ openclaw recipes migrate-team --team-id development-team --mode move
322
349
  ```
323
350
 
324
- ## `workflows <subcommand>`
325
-
326
- Workflow runner utilities (file-first runs, runner/worker model).
351
+ ### Remove a team safely
327
352
 
328
353
  ```bash
329
- openclaw recipes workflows --help
354
+ openclaw recipes remove-team --team-id development-team --plan --json
355
+ openclaw recipes remove-team --team-id development-team --yes
330
356
  ```
331
357
 
332
- Common commands:
358
+ ### Clean up temporary workspaces
333
359
 
334
360
  ```bash
335
- # Run a workflow once (manual trigger)
336
- openclaw recipes workflows run --team-id <teamId> --workflow-file <file.workflow.json>
337
-
338
- # Runner (scheduler)
339
- openclaw recipes workflows runner-once --team-id <teamId>
340
- openclaw recipes workflows runner-tick --team-id <teamId>
361
+ # dry-run
362
+ openclaw recipes cleanup-workspaces
341
363
 
342
- # Worker (executor) pull-based per-agent queue
343
- openclaw recipes workflows worker-tick --team-id <teamId> --agent-id <agentId>
364
+ # delete allowed temp prefixes
365
+ openclaw recipes cleanup-workspaces --prefix smoke- --prefix qa- --yes
344
366
 
345
- # Approval gating
346
- openclaw recipes workflows approve --team-id <teamId> --run-id <runId> --decision approve
347
- openclaw recipes workflows resume --team-id <teamId> --run-id <runId>
348
- openclaw recipes workflows poll-approvals --team-id <teamId>
367
+ # json output
368
+ openclaw recipes cleanup-workspaces --json
349
369
  ```
350
370
 
351
- See: `docs/WORKFLOW_RUNS_FILE_FIRST.md`
371
+ ---
372
+
373
+ ## Fastest useful command set
374
+
375
+ If you only want the high-value commands:
376
+
377
+ ```bash
378
+ openclaw recipes list
379
+ openclaw recipes scaffold-team development-team --team-id development-team --apply-config
380
+ openclaw recipes dispatch --team-id development-team --owner lead --request "Do a thing"
381
+ openclaw recipes tickets --team-id development-team
382
+ openclaw recipes take --team-id development-team --ticket 0001 --owner dev
383
+ openclaw recipes handoff --team-id development-team --ticket 0001
384
+ openclaw recipes complete --team-id development-team --ticket 0001
385
+ ```