@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/README.md CHANGED
@@ -1,189 +1,307 @@
1
- # ClawRecipes (OpenClaw Recipes Plugin)
2
-
1
+ # ClawRecipes
3
2
 
4
3
  <p align="center">
5
4
  <img src="https://github.com/JIGGAI/ClawRecipes/blob/main/clawcipes_cook.jpg" alt="ClawRecipes logo" width="240" />
6
5
  </p>
7
6
 
8
- ClawRecipes is an OpenClaw plugin that provides **CLI-first recipes** for scaffolding specialist agents and teams from Markdown.
7
+ ClawRecipes is an **OpenClaw plugin** for scaffolding agents, teams, and file-first workflows from Markdown recipes.
8
+
9
+ If you want the short version:
10
+ - install the plugin
11
+ - scaffold a team or agent
12
+ - dispatch work into tickets
13
+ - run the file-first workflow
14
+ - optionally use **ClawKitchen** for a UI on top
15
+
16
+ ClawRecipes is **CLI-first**. It works without a UI.
17
+
18
+ ---
19
+
20
+ ## What ClawRecipes does
21
+
22
+ ClawRecipes gives you:
23
+ - **recipes** written in Markdown
24
+ - **agent scaffolding** (`openclaw recipes scaffold`)
25
+ - **team scaffolding** (`openclaw recipes scaffold-team`)
26
+ - **file-first ticket workflow** (`dispatch → backlog → in-progress → testing → done`)
27
+ - **workflow runner utilities** for scheduled / approval-gated workflows
28
+ - **workspace recipe installs** from the marketplace
29
+ - **ClawHub skill installs** for agents or teams
9
30
 
10
- If you like durable workflows, ClawRecipes is built around a **file-first team workspace** (inbox/backlog/in-progress/testing/done) that plays nicely with git.
31
+ It is built for people who want durable artifacts on disk, not hidden app state.
11
32
 
12
- For those who prefer a beautiful user interface, install **[ClawKitchen](https://github.com/JIGGAI/ClawKitchen)** — our latest plugin where you can add, remove, update, and fully manage your teams in one place. It includes an agile workflow board, a goal tracker, and cron management for convenience.
33
+ ---
13
34
 
14
35
  ## Quickstart
15
- ### 1) Install
16
- #### Option A (preferred): install from npm
17
- When published on npm:
18
36
 
19
- ```bash
20
- openclaw plugins install @jiggai/recipes
37
+ ### 1) Install the plugin
21
38
 
22
- # If you use a plugin allowlist (plugins.allow), you must explicitly trust it:
23
- openclaw config get plugins.allow --json
24
- # then add "recipes" and set it back, e.g.
25
- openclaw config set plugins.allow --json '["memory-core","telegram","recipes"]'
39
+ **From npm**
26
40
 
41
+ ```bash
42
+ openclaw plugins install @jiggai/recipes
27
43
  openclaw gateway restart
28
44
  openclaw plugins list
29
45
  ```
30
46
 
31
- #### Option B: install from GitHub
47
+ **From a local checkout**
48
+
32
49
  ```bash
33
- git clone https://github.com/JIGGAI/ClawRecipes.git ~/clawrecipes
34
- openclaw plugins install --link ~/clawrecipes
50
+ git clone https://github.com/JIGGAI/ClawRecipes.git ~/ClawRecipes
51
+ openclaw plugins install --link ~/ClawRecipes
35
52
  openclaw gateway restart
36
53
  openclaw plugins list
37
54
  ```
38
55
 
39
- ### 2) List available recipes
56
+ Then verify the commands exist:
57
+
58
+ ```bash
59
+ openclaw recipes list
60
+ ```
61
+
62
+ More install details: [docs/INSTALLATION.md](docs/INSTALLATION.md)
63
+
64
+ ---
65
+
66
+ ### 2) See what recipes you have
67
+
40
68
  ```bash
41
69
  openclaw recipes list
70
+ openclaw recipes show development-team
71
+ openclaw recipes status development-team
42
72
  ```
43
73
 
74
+ ---
75
+
44
76
  ### 3) Scaffold a team
77
+
45
78
  ```bash
46
79
  openclaw recipes scaffold-team development-team \
47
- --team-id development-team-team \
48
- --overwrite \
49
- --apply-config
80
+ --team-id development-team \
81
+ --apply-config \
82
+ --overwrite
50
83
  ```
51
84
 
52
- ### 4) Dispatch a request into work artifacts
85
+ This creates:
86
+ - `~/.openclaw/workspace-development-team/`
87
+ - team roles under `roles/`
88
+ - ticket lanes under `work/`
89
+ - optional OpenClaw agent config entries (when `--apply-config` is used)
90
+
91
+ ---
92
+
93
+ ### 4) Put work into the system
94
+
53
95
  ```bash
54
96
  openclaw recipes dispatch \
55
- --team-id development-team-team \
56
- --request "Add a new recipe for a customer-support team" \
57
- --owner lead
97
+ --team-id development-team \
98
+ --owner lead \
99
+ --request "Add a new clinic-team recipe"
58
100
  ```
59
101
 
60
- ## Commands (high level)
61
- - `openclaw recipes list|show|status`
62
- - `openclaw recipes scaffold` (agent → `workspace-<agentId>` + writes workspace recipe `~/.openclaw/workspace/recipes/<agentId>.md` by default)
63
- - `openclaw recipes scaffold-team` (team → `workspace-<teamId>` + `roles/<role>/` + writes workspace recipe `~/.openclaw/workspace/recipes/<teamId>.md` by default)
64
- - `openclaw recipes install-skill <idOrSlug> [--yes] [--global|--agent-id <id>|--team-id <id>]` (skills: global or scoped)
65
- - `openclaw recipes install <slug>` (marketplace recipe)
66
- - `openclaw recipes bind|unbind|bindings` (multi-agent routing)
67
- - `openclaw recipes dispatch ...` (request → inbox + ticket + assignment)
68
- - `openclaw recipes tickets|move-ticket|assign|take|handoff|complete` (file-first ticket workflow)
69
- - `openclaw recipes cleanup-workspaces` (safe cleanup of temporary test/scaffold workspaces)
70
-
71
- For full details, see `docs/COMMANDS.md`.
72
-
73
- ## Configuration
74
- The plugin supports these config keys (with defaults):
75
- - `workspaceRecipesDir` (default: `recipes`)
76
- - `workspaceAgentsDir` (default: `agents`)
77
- - `workspaceSkillsDir` (default: `skills`)
78
- - `workspaceTeamsDir` (default: `teams`)
79
- - `autoInstallMissingSkills` (default: `false`)
80
- - `confirmAutoInstall` (default: `true`)
81
- - `cronInstallation` (default: `prompt`; values: `off|prompt|on`)
82
-
83
- Cron note:
84
- - You do **not** enable cron via `tools.cron` in `openclaw.json` (that key is not part of the config schema).
85
- - ClawRecipes reconciles recipe cron jobs via the Gateway `cron.*` RPC surface when available; otherwise it **warns and skips** (scaffold/team creation must still succeed).
86
-
87
- Config schema is defined in `openclaw.plugin.json`.
88
-
89
- ## Documentation
90
- **For users:**
91
- - [Installation](docs/INSTALLATION.md) — install the plugin
92
- - [Agents & skills](docs/AGENTS_AND_SKILLS.md) — mental model, tool policies
93
- - [Tutorial](docs/TUTORIAL_CREATE_RECIPE.md) — create your first recipe
94
- - [Commands](docs/COMMANDS.md) — full command reference
95
- - [Team workflow](docs/TEAM_WORKFLOW.md) — file-first workflow
96
-
97
- **For contributors:**
98
- - [Architecture](docs/ARCHITECTURE.md) — codebase structure
99
- - [Contributing](CONTRIBUTING.md) — setup, tests, PR workflow
102
+ Then work the ticket flow:
100
103
 
101
- ## Development
102
- ### Unit tests (vitest)
103
- Run:
104
- - `npm test`
105
- - `npm run test:coverage` coverage with CI thresholds (see `vitest.config.ts`)
106
- - `npm run smell-check` — quality checks (ESLint, jscpd, pattern grep)
107
-
108
- ### Pre-commit hooks
109
- Husky runs on commit. Run `npm ci` first to install hooks.
110
-
111
- ### Scaffold smoke test (regression)
112
- A lightweight smoke check validates scaffold-team output contains the required testing workflow docs (ticket 0004).
113
-
114
- Run:
115
- - `npm run test:smoke` (or `npm run scaffold:smoke`)
116
-
117
- Notes:
118
- - Creates a temporary `workspace-smoke-<timestamp>-team` under `~/.openclaw/`.
119
- - If it does not delete cleanly (crash/interrupt), run cleanup:
120
- - `openclaw recipes cleanup-workspaces --prefix smoke- --yes`
121
- - Exits non-zero on mismatch.
122
- - Requires OpenClaw and workspace config.
123
-
124
- ### For contributors
125
- - [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) — codebase structure
126
- - [CONTRIBUTING.md](CONTRIBUTING.md) — setup, commands, pre-commit, CI
127
-
128
- Reference:
129
- - Commands: `docs/COMMANDS.md`
130
- - Recipe format: `docs/RECIPE_FORMAT.md`
131
- - Bundled recipes: `docs/BUNDLED_RECIPES.md`
132
- - Team workflow: `docs/TEAM_WORKFLOW.md`
133
- - ClawRecipes Kitchen (UI): `docs/CLAWCIPES_KITCHEN.md`
134
-
135
- (Also see: GitHub repo https://github.com/JIGGAI/ClawRecipes)
136
- ## Notes / principles
137
- - Workspaces:
138
- - Standalone agents: `~/.openclaw/workspace-<agentId>/`
139
- - Teams: `~/.openclaw/workspace-<teamId>/` with `roles/<role>/...`
140
- - Skills:
141
- - Global (shared): `~/.openclaw/skills/<skill>`
142
- - Scoped (agent/team): `~/.openclaw/workspace-*/skills/<skill>`
143
- - Team IDs end with `-team`; agent IDs are namespaced: `<teamId>-<role>`.
144
- - Recipe template rendering is intentionally simple: `{{var}}` replacement only.
145
-
146
- ## Removing (uninstalling) a scaffolded team
147
- ClawRecipes includes a safe uninstall command:
104
+ ```bash
105
+ openclaw recipes tickets --team-id development-team
106
+ openclaw recipes take --team-id development-team --ticket 0001 --owner dev
107
+ openclaw recipes handoff --team-id development-team --ticket 0001
108
+ openclaw recipes complete --team-id development-team --ticket 0001
109
+ ```
110
+
111
+ ---
112
+
113
+ ## Workflow support
114
+
115
+ ClawRecipes supports **file-first workflows** with:
116
+ - workflow JSON files under `shared-context/workflows/`
117
+ - workflow runs under `shared-context/workflow-runs/`
118
+ - runner / worker execution model
119
+ - approval-gated steps
120
+ - tool nodes
121
+ - LLM nodes
122
+
123
+ ### Basic workflow commands
148
124
 
149
125
  ```bash
150
- openclaw recipes remove-team --team-id <teamId> --plan --json
151
- openclaw recipes remove-team --team-id <teamId> --yes
152
- openclaw gateway restart
126
+ # Run one workflow manually
127
+ openclaw recipes workflows run \
128
+ --team-id development-team \
129
+ --workflow-file marketing.workflow.json
130
+
131
+ # Scheduler / runner
132
+ openclaw recipes workflows runner-once --team-id development-team
133
+ openclaw recipes workflows runner-tick --team-id development-team --concurrency 2
134
+
135
+ # Worker / executor
136
+ openclaw recipes workflows worker-tick \
137
+ --team-id development-team \
138
+ --agent-id development-team-lead
153
139
  ```
154
140
 
155
- Notes:
156
- - The command is confirmation-gated by default (use `--yes` to apply).
157
- - Cron cleanup is conservative: it removes only cron jobs that are explicitly **stamped** with `recipes.teamId=<teamId>`.
158
- - If you need a manual fallback, you can still delete `~/.openclaw/workspace-<teamId>` and remove `<teamId>-*` agents from `agents.list[]` in `~/.openclaw/openclaw.json`.
159
-
160
- ## Links
161
- - GitHub: https://github.com/JIGGAI/ClawRecipes
162
- - Docs:
163
- - [Installation](https://github.com/JIGGAI/ClawRecipes/blob/main/docs/INSTALLATION.md): `docs/INSTALLATION.md`
164
- - [Commands](https://github.com/JIGGAI/ClawRecipes/blob/main/docs/COMMANDS.md): `docs/COMMANDS.md`
165
- - [Recipe format](https://github.com/JIGGAI/ClawRecipes/blob/main/docs/RECIPE_FORMAT.md): `docs/RECIPE_FORMAT.md`
166
- - [Team workflow](https://github.com/JIGGAI/ClawRecipes/blob/main/docs/TEAM_WORKFLOW.md): `docs/TEAM_WORKFLOW.md`
167
- - [Agents & Skills](https://github.com/JIGGAI/ClawRecipes/blob/main/docs/AGENTS_AND_SKILLS.md): `docs/AGENTS_AND_SKILLS.md`
168
- - [Architecture](https://github.com/JIGGAI/ClawRecipes/blob/main/docs/ARCHITECTURE.md): `docs/ARCHITECTURE.md`
169
- - [Bundled](https://github.com/JIGGAI/ClawRecipes/blob/main/docs/BUNDLED_RECIPES.md): `docs/BUNDLED_RECIPES.md`
170
- - [Create Recipe Tutorial](https://github.com/JIGGAI/ClawRecipes/blob/main/docs/TUTORIAL_CREATE_RECIPE.md): `docs/TUTORIAL_CREATE_RECIPE.md`
171
- - [Contributing](https://github.com/JIGGAI/ClawRecipes/blob/main/CONTRIBUTING.md): `CONTRIBUTING.md`
172
-
173
- ## Note
174
- ClawRecipes is meant to be *installed* and then used to build **agents + teams**.
175
-
176
- Most users should focus on:
177
- - authoring recipes in their OpenClaw workspace (`<workspace>/recipes/*.md`)
178
- - scaffolding teams (`openclaw recipes scaffold-team ...`)
179
- - running the file-first workflow (dispatch → backlog → in-progress → testing → done)
141
+ ### Approval flow commands
180
142
 
181
- ## License
143
+ ```bash
144
+ # approve
145
+ openclaw recipes workflows approve \
146
+ --team-id development-team \
147
+ --run-id <runId> \
148
+ --approved true
149
+
150
+ # reject with note
151
+ openclaw recipes workflows approve \
152
+ --team-id development-team \
153
+ --run-id <runId> \
154
+ --approved false \
155
+ --note "Tighten the X post hook"
156
+
157
+ # resume an awaiting run
158
+ openclaw recipes workflows resume \
159
+ --team-id development-team \
160
+ --run-id <runId>
161
+ ```
182
162
 
183
- ClawRecipes is licensed under **Apache-2.0**.
163
+ See also:
164
+ - [docs/WORKFLOW_RUNS_FILE_FIRST.md](docs/WORKFLOW_RUNS_FILE_FIRST.md)
165
+ - [docs/OUTBOUND_POSTING.md](docs/OUTBOUND_POSTING.md)
166
+
167
+ ---
168
+
169
+ ## Important workflow posting note
170
+
171
+ This is the part most people trip over.
172
+
173
+ ### What ships by default
174
+ Published ClawRecipes builds are intentionally conservative:
175
+ - **workflow posting side effects are not automatically turned on for every install**
176
+ - the old local `marketing.post_all` posting path is **not something users should assume is active** after install
177
+
178
+ ### What you should do after installing
179
+ If you want workflows that actually publish content:
180
+
181
+ **Recommended path**
182
+ - use `outbound.post`
183
+ - configure an outbound posting service
184
+ - keep approval gates in the workflow
185
+
186
+ **Local-controller / patched path**
187
+ - if you are using a local controller-specific patch for workflow posting, you must **apply that patch after install/update**
188
+ - and you may need to **explicitly tell your assistant to turn workflow posting back on** for your local environment
189
+
190
+ In plain English:
191
+ - installing ClawRecipes does **not** mean "workflow posting is live"
192
+ - you must either:
193
+ 1. configure the supported outbound posting path, or
194
+ 2. reapply your local posting patch after install/update
195
+
196
+ If you are using RJ's local controller flow, document and keep your patch handy.
197
+
198
+ ---
184
199
 
185
- Attribution requirement (practical): if you redistribute ClawRecipes (or a derivative work), you must retain the license and attribution notices (see `LICENSE` and `NOTICE`).
200
+ ## Common commands
186
201
 
187
- Branding note: the license does not grant permission to use JIGGAI trademarks except as required for reasonable and customary attribution. See `TRADEMARK.md`.
202
+ ### Recipes
188
203
 
189
- Contributions: we welcome PRs. By contributing, you agree that your contributions are licensed under the project’s Apache-2.0 license.
204
+ ```bash
205
+ openclaw recipes list
206
+ openclaw recipes show development-team
207
+ openclaw recipes install clinic-team
208
+ ```
209
+
210
+ ### Agents and teams
211
+
212
+ ```bash
213
+ # single agent
214
+ openclaw recipes scaffold project-manager --agent-id pm --apply-config
215
+
216
+ # team
217
+ openclaw recipes scaffold-team development-team --team-id development-team --apply-config
218
+
219
+ # add a role into an existing team
220
+ openclaw recipes add-role \
221
+ --team-id development-team \
222
+ --role workflow-runner \
223
+ --recipe workflow-runner-addon \
224
+ --apply-config
225
+ ```
226
+
227
+ ### Ticket workflow
228
+
229
+ ```bash
230
+ openclaw recipes tickets --team-id development-team
231
+ openclaw recipes move-ticket --team-id development-team --ticket 0007 --to in-progress
232
+ openclaw recipes assign --team-id development-team --ticket 0007 --owner dev
233
+ openclaw recipes take --team-id development-team --ticket 0007 --owner dev
234
+ openclaw recipes handoff --team-id development-team --ticket 0007 --tester test
235
+ openclaw recipes complete --team-id development-team --ticket 0007
236
+ openclaw recipes cleanup-closed-assignments --team-id development-team
237
+ ```
238
+
239
+ ### Bindings
240
+
241
+ ```bash
242
+ openclaw recipes bindings
243
+ openclaw recipes bind --agent-id dev --channel telegram --peer-kind dm --peer-id 6477250615
244
+ openclaw recipes unbind --agent-id dev --channel telegram --peer-kind dm --peer-id 6477250615
245
+ ```
246
+
247
+ ### Cleanup / removal
248
+
249
+ ```bash
250
+ openclaw recipes cleanup-workspaces
251
+ openclaw recipes cleanup-workspaces --prefix smoke- --yes
252
+ openclaw recipes remove-team --team-id development-team --plan --json
253
+ openclaw recipes remove-team --team-id development-team --yes
254
+ ```
255
+
256
+ Full reference: [docs/COMMANDS.md](docs/COMMANDS.md)
257
+
258
+ ---
259
+
260
+ ## Recommended docs order for humans
261
+
262
+ If you are new, read these in order:
263
+
264
+ 1. [Installation](docs/INSTALLATION.md)
265
+ 2. [Commands](docs/COMMANDS.md)
266
+ 3. [Team workflow](docs/TEAM_WORKFLOW.md)
267
+ 4. [Workflow runs](docs/WORKFLOW_RUNS_FILE_FIRST.md)
268
+ 5. [Outbound posting](docs/OUTBOUND_POSTING.md)
269
+
270
+ If you are building recipes:
271
+
272
+ 1. [Recipe format](docs/RECIPE_FORMAT.md)
273
+ 2. [Create recipe tutorial](docs/TUTORIAL_CREATE_RECIPE.md)
274
+ 3. [Bundled recipes](docs/BUNDLED_RECIPES.md)
275
+
276
+ If you are contributing to the codebase:
277
+
278
+ 1. [Architecture](docs/ARCHITECTURE.md)
279
+ 2. [Contributing](CONTRIBUTING.md)
280
+ 3. [Releasing](docs/releasing.md)
281
+
282
+ ---
283
+
284
+ ## ClawKitchen
285
+
286
+ If you want a UI for teams, workflows, goals, approvals, and management, use:
287
+ - **ClawKitchen**: https://github.com/JIGGAI/ClawKitchen
288
+
289
+ ClawKitchen is optional. ClawRecipes works without it.
290
+
291
+ More: [docs/CLAWCIPES_KITCHEN.md](docs/CLAWCIPES_KITCHEN.md)
292
+
293
+ ---
294
+
295
+ ## Development
296
+
297
+ ```bash
298
+ npm test
299
+ npm run test:coverage
300
+ npm run smell-check
301
+ ```
302
+
303
+ ---
304
+
305
+ ## License
306
+
307
+ ClawRecipes is licensed under **Apache-2.0**.