@jiggai/recipes 0.2.21 → 0.2.23

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,7 +1,7 @@
1
1
  # ClawRecipes (OpenClaw Recipes Plugin)
2
2
 
3
3
  <p align="center">
4
- <img src="./clawrecipes_cook.jpg" alt="ClawRecipes logo" width="240" />
4
+ <img src="clawrecipes_cook.jpg" alt="ClawRecipes logo" width="240" />
5
5
  </p>
6
6
 
7
7
  ClawRecipes is an OpenClaw plugin that provides **CLI-first recipes** for scaffolding specialist agents and teams from Markdown.
@@ -134,12 +134,15 @@ Notes:
134
134
  ## Links
135
135
  - GitHub: https://github.com/JIGGAI/ClawRecipes
136
136
  - Docs:
137
- - Installation: `docs/INSTALLATION.md`
138
- - Commands: `docs/COMMANDS.md`
139
- - Recipe format: `docs/RECIPE_FORMAT.md`
140
- - Team workflow: `docs/TEAM_WORKFLOW.md`
141
-
142
- ## What you should be developing (not this plugin)
137
+ - [Installation](https://github.com/JIGGAI/ClawRecipes/blob/main/docs/INSTALLATION.md): `docs/INSTALLATION.md`
138
+ - [Commands](https://github.com/JIGGAI/ClawRecipes/blob/main/docs/COMMANDS.md): `docs/COMMANDS.md`
139
+ - [Recipe format](https://github.com/JIGGAI/ClawRecipes/blob/main/docs/RECIPE_FORMAT.md): `docs/RECIPE_FORMAT.md`
140
+ - [Team workflow](https://github.com/JIGGAI/ClawRecipes/blob/main/docs/TEAM_WORKFLOW.md): `docs/TEAM_WORKFLOW.md`
141
+ - [Agents & Skills](https://github.com/JIGGAI/ClawRecipes/blob/main/docs/AGENTS_AND_SKILLS.md): `docs/AGENTS_AND_SKILLS.md`
142
+ - [Bundled](https://github.com/JIGGAI/ClawRecipes/blob/main/docs/BUNDLED_RECIPES.md): `docs/BUNDLED_RECIPES.md`
143
+ - [Create Recipe Tutorial](https://github.com/JIGGAI/ClawRecipes/blob/main/docs/TUTORIAL_CREATE_RECIPE.md): `docs/TUTORIAL_CREATE_RECIPE.md`
144
+
145
+ ## Note
143
146
  ClawRecipes is meant to be *installed* and then used to build **agents + teams**.
144
147
 
145
148
  Most users should focus on:
@@ -38,15 +38,27 @@ In OpenClaw, skills are surfaced as tools the agent can use.
38
38
  ## Tool policies (allow/deny)
39
39
  Every agent can have a tool policy in OpenClaw config (written via `--apply-config` when scaffolding).
40
40
 
41
- ClawRecipes recipes commonly use:
42
- - `allow: ["group:fs", "group:web"]` for safe file + web access
43
- - `allow: ["group:runtime"]` when the agent needs to run local commands
44
- - `allow: ["group:automation"]` for automation-oriented tools
45
- - `deny: ["exec"]` for safety on agents that shouldn’t execute commands
46
-
47
- The intent:
48
- - Most agents should **not** have `exec`.
49
- - Only agents that truly need it (dev/devops) should get runtime/exec capabilities.
41
+ ### About `exec`
42
+ `exec` is the shell-command tool. It can be used for things like:
43
+ - running tests/builds (`npm test`, `npm run build`)
44
+ - git operations (`git status`, `git diff`)
45
+ - codegen/migrations (`prisma migrate`, `pnpm lint`)
46
+ - quick diagnostics (`curl`, `jq`, `rg`)
47
+
48
+ ClawRecipes **does not deny `exec` by default** (many recipes set `deny: []`).
49
+
50
+ If you want an agent to be able to run commands, you must explicitly allow runtime capabilities.
51
+
52
+ ### Common patterns
53
+ - Safe-by-default agents:
54
+ - `allow: ["group:fs", "group:web"]`
55
+ - `deny: ["exec"]` (optional hard block)
56
+
57
+ - Developer/devops-style agents:
58
+ - `allow: ["group:fs", "group:web", "group:runtime"]`
59
+ - `deny: []`
60
+
61
+ > Note: even when allowed, `exec` may still be gated by your OpenClaw exec approvals / allowlists.
50
62
 
51
63
  ## How to add/update tool access (allow list)
52
64
  There are two common approaches.
@@ -29,7 +29,7 @@ Default tool policy (recipe-defined):
29
29
  ## 2) `social-team` (team)
30
30
  **Kind:** team
31
31
 
32
- **Use when:** you want a multi-role social pipeline: lead + research + writer + editor.
32
+ **Use when:** you want platform-specialist social execution (not copywriting): distribution + listening + platform SEO + community + reporting back to marketing.
33
33
 
34
34
  Scaffold:
35
35
  ```bash
@@ -37,14 +37,19 @@ openclaw recipes scaffold-team social-team --team-id social-team-team --apply-co
37
37
  ```
38
38
 
39
39
  What it creates:
40
- - `teams/social-team-team/` shared workspace
40
+ - shared team workspace
41
41
  - agents:
42
- - `agents/social-team-team-lead/`
43
- - `agents/social-team-team-research/`
44
- - `agents/social-team-team-writer/`
45
- - `agents/social-team-team-editor/`
42
+ - `lead`
43
+ - `research`
44
+ - `listening`
45
+ - `social-seo`
46
+ - `editorial`
47
+ - `community`
48
+ - `distributor`
49
+ - platform roles: `tiktok`, `instagram`, `youtube`, `facebook`, plus defaults `x`, `linkedin`
46
50
 
47
51
  Notes:
52
+ - Copy + creative live in `marketing-team` (not here).
48
53
  - Default `tools` in the recipe deny `exec` (safer by default).
49
54
 
50
55
  ## 3) `development-team` (team)
@@ -206,7 +211,7 @@ openclaw recipes scaffold-team marketing-team --team-id marketing-team-team --ap
206
211
  ```
207
212
 
208
213
  Roles:
209
- - lead, seo, copywriter, ads, social, designer, analyst
214
+ - lead, seo, copywriter, ads, social, designer, analyst, video, compliance
210
215
 
211
216
  ---
212
217
 
@@ -61,7 +61,9 @@ Two concepts people often mix up:
61
61
  Even if `openclaw recipes dispatch` created an inbox entry + backlog ticket, the lead won’t act unless:
62
62
  - a human opens the lead agent/chat, **or**
63
63
  - an automation loop runs (cron triage), **or**
64
- - `main` is allowed to message/spawn the lead agent.
64
+ - a best-effort nudge reaches the lead session.
65
+
66
+ By default, `openclaw recipes dispatch` will try to **enqueue a system event** to `agent:<teamId>-lead:main` (best-effort). If it can’t, the CLI prints explicit next steps (enable cron / run lead once / allowlist direct pings).
65
67
 
66
68
  ### Allowlisting other agents (subagents.allowAgents)
67
69
  To allow `main` to target team role agents (like `development-team-lead`), add this to your OpenClaw config:
package/index.ts CHANGED
@@ -782,7 +782,9 @@ const recipesPlugin = {
782
782
  console.error("[recipes] ensured agents.list includes main as first/default");
783
783
  }
784
784
  } catch (e) {
785
- console.error(`[recipes] warning: failed to ensure main agent in agents.list: ${(e as Error).message}`);
785
+ // Keep install/scaffold warning-free; this is non-critical and can fail on locked-down configs.
786
+ // (If needed, diagnose via debug logs instead of emitting warnings.)
787
+ console.error(`[recipes] note: failed to ensure main agent in agents.list: ${(e as Error).message}`);
786
788
  }
787
789
  })();
788
790
 
@@ -1357,6 +1359,7 @@ const recipesPlugin = {
1357
1359
  // Best-effort nudge: enqueue a system event for the team lead session.
1358
1360
  // This does not spawn the lead; it ensures that when the lead session runs next,
1359
1361
  // it sees the dispatch immediately.
1362
+ let nudgeQueued = false;
1360
1363
  try {
1361
1364
  const leadAgentId = `${teamId}-lead`;
1362
1365
  api.runtime.system.enqueueSystemEvent(
@@ -1369,8 +1372,20 @@ const recipesPlugin = {
1369
1372
  ].join("\n"),
1370
1373
  { sessionKey: `agent:${leadAgentId}:main` },
1371
1374
  );
1375
+ nudgeQueued = true;
1372
1376
  } catch {
1373
- // ignore: dispatch should still succeed even if system event enqueue fails
1377
+ nudgeQueued = false;
1378
+ }
1379
+
1380
+ if (nudgeQueued) {
1381
+ console.error(`[dispatch] Nudge queued: system event → agent:${teamId}-lead:main`);
1382
+ } else {
1383
+ console.error(`[dispatch] NOTE: Could not auto-nudge ${teamId}-lead (best-effort). Next steps:`);
1384
+ console.error(`- Option A (recommended): ensure the lead triage cron job is installed/enabled (lead-triage-loop).`);
1385
+ console.error(` - If you declined cron installation during scaffold, re-run scaffold with cron installation enabled, or enable it in settings.`);
1386
+ console.error(`- Option B: manually run/open the lead once so it sees inbox/backlog updates.`);
1387
+ console.error(`- Option C (advanced): allow subagent messaging (if you want direct pings). Add allowAgents in config and restart gateway.`);
1388
+ console.error(` { agents: { list: [ { id: "main", subagents: { allowAgents: ["${teamId}-lead"] } } ] } }`);
1374
1389
  }
1375
1390
  };
1376
1391
 
@@ -2,7 +2,7 @@
2
2
  "id": "recipes",
3
3
  "name": "Recipes",
4
4
  "description": "Markdown recipes that scaffold agents and teams (workspace-local).",
5
- "version": "0.2.21",
5
+ "version": "0.2.22",
6
6
  "configSchema": {
7
7
  "type": "object",
8
8
  "additionalProperties": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jiggai/recipes",
3
- "version": "0.2.21",
3
+ "version": "0.2.23",
4
4
  "description": "ClawRecipes plugin for OpenClaw (markdown recipes -> scaffold agents/teams)",
5
5
  "main": "index.ts",
6
6
  "type": "commonjs",
@@ -23,6 +23,7 @@
23
23
  ],
24
24
  "scripts": {
25
25
  "test": "vitest run",
26
+ "check:bundled-team-recipes": "node scripts/check-bundled-team-recipes.mjs",
26
27
  "test:smoke": "node scripts/scaffold-smoke.mjs",
27
28
  "test:provenance-smoke": "node scripts/scaffold-team-provenance-smoke.mjs",
28
29
  "test:agent-recipefile-smoke": "node scripts/scaffold-agent-recipefile-smoke.mjs",
@@ -62,43 +62,78 @@ templates:
62
62
  lead.soul: |
63
63
  # SOUL.md
64
64
 
65
- You are the Business Ops Lead / Dispatcher for {{teamId}}.
65
+ You are the Team Lead / Dispatcher for {{teamId}}.
66
66
 
67
67
  Core job:
68
- - Convert incoming requests into scoped tickets.
69
- - Assign to the right role (ops/sales/marketing/finance/analyst).
70
- - Keep priorities clear and measurable.
71
- - Maintain a single source of truth in the shared workspace.
72
-
68
+ - Convert new requests into scoped tickets.
69
+ - Assign work to Dev or DevOps.
70
+ - Monitor progress and unblock.
71
+ - Report completions.
73
72
  lead.agents: |
74
73
  # AGENTS.md
75
74
 
76
75
  Team: {{teamId}}
77
- Team directory: {{teamDir}}
78
-
79
- ## Shared workspace
80
- - inbox/ — incoming requests and raw notes
81
- - work/backlog/ — normalized tickets (0001-...)
82
- - work/in-progress/ — active tickets
83
- - work/testing/ — reviews/verification
84
- - work/done/ — completed tickets + DONE notes
85
- - notes/plan.md — current plan (curated)
86
- - notes/status.md current status snapshot
87
- - shared-context/ — shared references + append-only outputs
88
- - outbox/ — final deliverables (emails/copy/plans)
89
-
90
- ## Role routing
91
- - ops process, vendors, internal operations, SOPs
92
- - sales → outreach sequences, CRM notes, partnership drafts
93
- - marketing → positioning, campaigns, landing-page copy
94
- - finance → pricing, forecasts, bookkeeping checklists
95
- - analyst research, competitive scans, metrics
96
-
97
- ## Operating rhythm
98
- 1) Triage inbox/ → tickets.
99
- 2) Keep WIP small (max 1–2 active tickets per role).
100
- 3) Every work session updates notes/status.md.
101
-
76
+ Shared workspace: {{teamDir}}
77
+
78
+ ## Guardrails (read → act → write)
79
+
80
+ Before you act:
81
+ 1) Read:
82
+ - `notes/plan.md`
83
+ - `notes/status.md`
84
+ - `shared-context/priorities.md`
85
+ - the relevant ticket(s)
86
+
87
+ After you act:
88
+ 1) Write back:
89
+ - Update tickets with decisions/assignments.
90
+ - Keep `notes/status.md` current (3–5 bullets per active ticket).
91
+
92
+ ## Curator model
93
+
94
+ You are the curator of:
95
+ - `notes/plan.md`
96
+ - `shared-context/priorities.md`
97
+
98
+ Everyone else should append to:
99
+ - `shared-context/agent-outputs/` (append-only)
100
+ - `shared-context/feedback/`
101
+
102
+ Your job is to periodically distill those inputs into the curated files.
103
+
104
+ ## File-first workflow (tickets)
105
+
106
+ Source of truth is the shared team workspace.
107
+
108
+ Folders:
109
+ - `inbox/` — raw incoming requests (append-only)
110
+ - `work/backlog/` — normalized tickets, filename-ordered (`0001-...md`)
111
+ - `work/in-progress/` — tickets currently being executed
112
+ - `work/testing/` — tickets awaiting QA verification
113
+ - `work/done/` — completed tickets + completion notes
114
+ - `notes/plan.md` — current plan / priorities (curated)
115
+ - `notes/status.md` — current status snapshot
116
+ - `shared-context/` — shared context + append-only outputs
117
+
118
+ ### Ticket numbering (critical)
119
+ - Backlog tickets MUST be named `0001-...md`, `0002-...md`, etc.
120
+ - The developer pulls the lowest-numbered ticket assigned to them.
121
+
122
+ ### Ticket format
123
+ See `TICKETS.md` in the team root. Every ticket should include:
124
+ - Context
125
+ - Requirements
126
+ - Acceptance criteria
127
+ - Owner (dev/devops)
128
+ - Status
129
+
130
+ ### Your responsibilities
131
+ - For every new request in `inbox/`, create a normalized ticket in `work/backlog/`.
132
+ - Curate `notes/plan.md` and `shared-context/priorities.md`.
133
+ - Keep `notes/status.md` updated.
134
+ - When work is ready for QA, move the ticket to `work/testing/` and assign it to the tester.
135
+ - Only after QA verification, move the ticket to `work/done/` (or use `openclaw recipes complete`).
136
+ - When a completion appears in `work/done/`, write a short summary into `outbox/`.
102
137
  ops.soul: |
103
138
  # SOUL.md
104
139
 
@@ -109,11 +144,26 @@ templates:
109
144
  ops.agents: |
110
145
  # AGENTS.md
111
146
 
112
- Output:
113
- - SOPs/checklists → shared-context/sops/
114
- - Vendor notes → shared-context/vendors/
115
- - Operational plans → outbox/
116
-
147
+ Team: {teamId}
148
+ Shared workspace: {teamDir}
149
+ Role: ops
150
+
151
+ ## Guardrails (read → act → write)
152
+ Before you act:
153
+ 1) Read:
154
+ - `notes/plan.md`
155
+ - `notes/status.md`
156
+ - relevant ticket(s) in `work/in-progress/`
157
+ - any relevant shared context under `shared-context/`
158
+
159
+ After you act:
160
+ 1) Write back:
161
+ - Put outputs in the agreed folder (usually `outbox/` or a ticket file).
162
+ - Update the ticket with what you did and where the artifact is.
163
+
164
+ ## Workflow
165
+ - Prefer a pull model: wait for a clear task from the lead, or propose a scoped task.
166
+ - Keep work small and reversible.
117
167
  sales.soul: |
118
168
  # SOUL.md
119
169
 
@@ -124,11 +174,26 @@ templates:
124
174
  sales.agents: |
125
175
  # AGENTS.md
126
176
 
127
- Output:
128
- - Outreach sequences → outbox/sales/
129
- - Call notes → shared-context/sales/call-notes/
130
- - Partnership drafts → outbox/partnerships/
131
-
177
+ Team: {teamId}
178
+ Shared workspace: {teamDir}
179
+ Role: sales
180
+
181
+ ## Guardrails (read → act → write)
182
+ Before you act:
183
+ 1) Read:
184
+ - `notes/plan.md`
185
+ - `notes/status.md`
186
+ - relevant ticket(s) in `work/in-progress/`
187
+ - any relevant shared context under `shared-context/`
188
+
189
+ After you act:
190
+ 1) Write back:
191
+ - Put outputs in the agreed folder (usually `outbox/` or a ticket file).
192
+ - Update the ticket with what you did and where the artifact is.
193
+
194
+ ## Workflow
195
+ - Prefer a pull model: wait for a clear task from the lead, or propose a scoped task.
196
+ - Keep work small and reversible.
132
197
  marketing.soul: |
133
198
  # SOUL.md
134
199
 
@@ -139,11 +204,26 @@ templates:
139
204
  marketing.agents: |
140
205
  # AGENTS.md
141
206
 
142
- Output:
143
- - Positioning/messaging → shared-context/marketing/
144
- - Campaign plans → outbox/marketing/
145
- - Landing page copy → outbox/marketing/landing-pages/
146
-
207
+ Team: {teamId}
208
+ Shared workspace: {teamDir}
209
+ Role: marketing
210
+
211
+ ## Guardrails (read → act → write)
212
+ Before you act:
213
+ 1) Read:
214
+ - `notes/plan.md`
215
+ - `notes/status.md`
216
+ - relevant ticket(s) in `work/in-progress/`
217
+ - any relevant shared context under `shared-context/`
218
+
219
+ After you act:
220
+ 1) Write back:
221
+ - Put outputs in the agreed folder (usually `outbox/` or a ticket file).
222
+ - Update the ticket with what you did and where the artifact is.
223
+
224
+ ## Workflow
225
+ - Prefer a pull model: wait for a clear task from the lead, or propose a scoped task.
226
+ - Keep work small and reversible.
147
227
  finance.soul: |
148
228
  # SOUL.md
149
229
 
@@ -154,11 +234,26 @@ templates:
154
234
  finance.agents: |
155
235
  # AGENTS.md
156
236
 
157
- Output:
158
- - Pricing memos → outbox/finance/
159
- - Forecasts → outbox/finance/
160
- - Bookkeeping checklists → shared-context/finance/
161
-
237
+ Team: {teamId}
238
+ Shared workspace: {teamDir}
239
+ Role: finance
240
+
241
+ ## Guardrails (read → act → write)
242
+ Before you act:
243
+ 1) Read:
244
+ - `notes/plan.md`
245
+ - `notes/status.md`
246
+ - relevant ticket(s) in `work/in-progress/`
247
+ - any relevant shared context under `shared-context/`
248
+
249
+ After you act:
250
+ 1) Write back:
251
+ - Put outputs in the agreed folder (usually `outbox/` or a ticket file).
252
+ - Update the ticket with what you did and where the artifact is.
253
+
254
+ ## Workflow
255
+ - Prefer a pull model: wait for a clear task from the lead, or propose a scoped task.
256
+ - Keep work small and reversible.
162
257
  analyst.soul: |
163
258
  # SOUL.md
164
259
 
@@ -172,3 +267,23 @@ templates:
172
267
  Output:
173
268
  - Research briefs → outbox/research/
174
269
  - Metrics definitions/dashboards notes → shared-context/metrics/
270
+
271
+ ---
272
+
273
+ # Business Team Recipe
274
+
275
+ Bundled team recipe.
276
+
277
+ ## Files
278
+ - Creates a shared team workspace under `~/.openclaw/workspace-<teamId>/` (example: `~/.openclaw/workspace-business-team-team/`).
279
+ - Creates per-role directories under `roles/<role>/` for: `SOUL.md`, `AGENTS.md`, `TOOLS.md`, `STATUS.md`, `NOTES.md`.
280
+ - Creates shared team folders like `inbox/`, `outbox/`, `notes/`, `shared-context/`, and `work/` lanes (varies slightly by recipe).
281
+
282
+ ## Tooling
283
+ - Tool policies are defined per role in the recipe frontmatter (`agents[].tools`).
284
+ - Observed defaults in this recipe:
285
+ - profiles: coding
286
+ - allow groups: group:fs, group:runtime, group:web
287
+ - deny: exec
288
+ - Safety note: most bundled teams default to denying `exec` unless a role explicitly needs it.
289
+