@jiggai/recipes 0.2.20 → 0.2.22

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.
@@ -195,9 +195,24 @@ Default tool policy:
195
195
 
196
196
  ---
197
197
 
198
+ # Teams
199
+
200
+ ## 11) `marketing-team` (team)
201
+ **Use when:** you want a full marketing execution loop: SEO + copy + ads + social + design + analytics.
202
+
203
+ Scaffold:
204
+ ```bash
205
+ openclaw recipes scaffold-team marketing-team --team-id marketing-team-team --apply-config
206
+ ```
207
+
208
+ Roles:
209
+ - lead, seo, copywriter, ads, social, designer, analyst
210
+
211
+ ---
212
+
198
213
  # Vertical packs (bundled team recipes)
199
214
 
200
- ## 11) `business-team` (team)
215
+ ## 12) `business-team` (team)
201
216
  **Use when:** you want a general-purpose business execution team.
202
217
 
203
218
  Scaffold:
@@ -208,7 +223,7 @@ openclaw recipes scaffold-team business-team --team-id business-team-team --appl
208
223
  Roles:
209
224
  - lead, ops, sales, marketing, finance, analyst
210
225
 
211
- ## 12) `law-firm-team` (team)
226
+ ## 13) `law-firm-team` (team)
212
227
  **Use when:** you want a legal practice workflow: intake → research → drafting → compliance.
213
228
 
214
229
  Scaffold:
@@ -219,7 +234,7 @@ openclaw recipes scaffold-team law-firm-team --team-id law-firm-team-team --appl
219
234
  Roles:
220
235
  - lead, intake, researcher, drafter, compliance, ops
221
236
 
222
- ## 13) `clinic-team` (team)
237
+ ## 14) `clinic-team` (team)
223
238
  **Use when:** you want a clinic ops workflow: intake/scheduling/billing/compliance/patient education.
224
239
 
225
240
  Scaffold:
@@ -230,7 +245,7 @@ openclaw recipes scaffold-team clinic-team --team-id clinic-team-team --apply-co
230
245
  Roles:
231
246
  - lead, intake, scheduler, billing, compliance, educator
232
247
 
233
- ## 14) `construction-team` (team)
248
+ ## 15) `construction-team` (team)
234
249
  **Use when:** you want a construction delivery workflow: PM/estimation/scheduling/safety/procurement.
235
250
 
236
251
  Scaffold:
@@ -241,7 +256,7 @@ openclaw recipes scaffold-team construction-team --team-id construction-team-tea
241
256
  Roles:
242
257
  - lead, pm, estimator, scheduler, safety, procurement
243
258
 
244
- ## 15) `financial-planner-team` (team)
259
+ ## 16) `financial-planner-team` (team)
245
260
  **Use when:** you want a financial planning practice workflow.
246
261
 
247
262
  Scaffold:
@@ -252,7 +267,7 @@ openclaw recipes scaffold-team financial-planner-team --team-id financial-planne
252
267
  Roles:
253
268
  - lead, advisor, analyst, tax, insurance, ops
254
269
 
255
- ## 16) `stock-trader-team` (team)
270
+ ## 17) `stock-trader-team` (team)
256
271
  **Use when:** you want a trading workflow: research/signals/risk/journaling.
257
272
 
258
273
  Scaffold:
@@ -263,7 +278,7 @@ openclaw recipes scaffold-team stock-trader-team --team-id stock-trader-team-tea
263
278
  Roles:
264
279
  - lead, researcher, signals, risk, journal, ops
265
280
 
266
- ## 17) `crypto-trader-team` (team)
281
+ ## 18) `crypto-trader-team` (team)
267
282
  **Use when:** you want a crypto trading workflow with onchain research.
268
283
 
269
284
  Scaffold:
@@ -24,25 +24,67 @@ When you scaffold a team:
24
24
  1) **Intake**
25
25
  - New requests land in `inbox/`.
26
26
 
27
- 2) **Plan**
27
+ 2) **(Optional) Nudge / automation**
28
+ - A cron job can periodically ping the team lead to triage `inbox/` and keep work moving.
29
+
30
+ 3) **Plan / triage (lead)**
28
31
  - Convert the request into a numbered ticket in `work/backlog/`.
32
+ - Fill out: Context, Requirements, Acceptance Criteria, Tasks, Owner, Status, and verification steps.
33
+ - **Every ticket must include a `## Comments` section.** Agents must check/respond to comments on tickets they’re assigned to **or** where they are mentioned via `@<agentname>`.
29
34
  - Filename ordering is the priority queue.
30
35
 
31
- 3) **Execute**
36
+ 4) **Execute (dev/devops)**
32
37
  - Move ticket file to `work/in-progress/` (or use `take`).
33
38
  - Do work; write artifacts into `shared/` or agent workspaces.
34
39
 
35
- 4) **Test**
40
+ 5) **Test**
36
41
  - Move ticket to `work/testing/`.
37
42
  - Assign `Owner: test` (or explicitly tag the tester role) and include clear “Verification steps” in the ticket.
38
43
  - Tester verifies and either:
39
44
  - moves to `work/done/` (pass), or
40
45
  - bounces back to `work/in-progress/` with a bug note (fail)
41
46
 
42
- 5) **Complete**
47
+ 6) **Complete**
43
48
  - Move ticket to `work/done/` (or use `complete`).
44
49
  - Add `Completed:` timestamp (automated by `complete` or `move-ticket --completed`).
45
50
 
51
+ ## Sub-agents + waking up the lead (important)
52
+ Two concepts people often mix up:
53
+
54
+ 1) **Chatting with a role agent directly**
55
+ - If an agent id exists (configured under `agents.list`), you can start a chat with it directly via UI/CLI.
56
+
57
+ 2) **Asking one agent (usually `main`) to wake/spawn/ping another agent**
58
+ - This uses sub-agent/session tooling, and is gated by the requester’s allowlist.
59
+
60
+ ### Why the lead sometimes “never picks it up”
61
+ Even if `openclaw recipes dispatch` created an inbox entry + backlog ticket, the lead won’t act unless:
62
+ - a human opens the lead agent/chat, **or**
63
+ - an automation loop runs (cron triage), **or**
64
+ - `main` is allowed to message/spawn the lead agent.
65
+
66
+ ### Allowlisting other agents (subagents.allowAgents)
67
+ To allow `main` to target team role agents (like `development-team-lead`), add this to your OpenClaw config:
68
+
69
+ ```json5
70
+ {
71
+ agents: {
72
+ list: [
73
+ {
74
+ id: "main",
75
+ subagents: {
76
+ allowAgents: ["development-team-lead"], // or ["*"] for any configured agent
77
+ },
78
+ },
79
+ ],
80
+ },
81
+ }
82
+ ```
83
+
84
+ Then restart the gateway.
85
+
86
+ Tip: use the `agents_list` tool to see what’s currently allowed.
87
+
46
88
  ## Dispatcher command
47
89
  The lead can convert a natural-language request into artifacts with:
48
90
 
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
 
@@ -1330,7 +1332,7 @@ const recipesPlugin = {
1330
1332
 
1331
1333
  const inboxMd = `# Inbox — ${teamId}\n\nReceived: ${receivedIso}\n\n## Request\n${requestText}\n\n## Proposed work\n- Ticket: ${ticketNumStr}-${baseSlug}\n- Owner: ${owner}\n\n## Links\n- Ticket: ${path.relative(teamDir, ticketPath)}\n- Assignment: ${path.relative(teamDir, assignmentPath)}\n`;
1332
1334
 
1333
- const ticketMd = `# ${ticketNumStr}-${baseSlug}\n\nCreated: ${receivedIso}\nOwner: ${owner}\nStatus: queued\nInbox: ${path.relative(teamDir, inboxPath)}\nAssignment: ${path.relative(teamDir, assignmentPath)}\n\n## Context\n${requestText}\n\n## Requirements\n- (fill in)\n\n## Acceptance criteria\n- (fill in)\n\n## Tasks\n- [ ] (fill in)\n`;
1335
+ const ticketMd = `# ${ticketNumStr}-${baseSlug}\n\nCreated: ${receivedIso}\nOwner: ${owner}\nStatus: queued\nInbox: ${path.relative(teamDir, inboxPath)}\nAssignment: ${path.relative(teamDir, assignmentPath)}\n\n## Context\n${requestText}\n\n## Requirements\n- (fill in)\n\n## Acceptance criteria\n- (fill in)\n\n## Tasks\n- [ ] (fill in)\n\n## Comments\n- (use this section for @mentions, questions, decisions, and dated replies)\n`;
1334
1336
 
1335
1337
  const assignmentMd = `# Assignment — ${ticketNumStr}-${baseSlug}\n\nCreated: ${receivedIso}\nAssigned: ${owner}\n\n## Goal\n${title}\n\n## Ticket\n${path.relative(teamDir, ticketPath)}\n\n## Notes\n- Created by: openclaw recipes dispatch\n`;
1336
1338
 
@@ -1353,6 +1355,25 @@ const recipesPlugin = {
1353
1355
  await writeFileSafely(inboxPath, inboxMd, "createOnly");
1354
1356
  await writeFileSafely(ticketPath, ticketMd, "createOnly");
1355
1357
  await writeFileSafely(assignmentPath, assignmentMd, "createOnly");
1358
+
1359
+ // Best-effort nudge: enqueue a system event for the team lead session.
1360
+ // This does not spawn the lead; it ensures that when the lead session runs next,
1361
+ // it sees the dispatch immediately.
1362
+ try {
1363
+ const leadAgentId = `${teamId}-lead`;
1364
+ api.runtime.system.enqueueSystemEvent(
1365
+ [
1366
+ `Dispatch created new intake for team: ${teamId}`,
1367
+ `- Inbox: ${path.relative(teamDir, inboxPath)}`,
1368
+ `- Backlog: ${path.relative(teamDir, ticketPath)}`,
1369
+ `- Assignment: ${path.relative(teamDir, assignmentPath)}`,
1370
+ `Action: please triage/normalize the ticket (fill Requirements/AC/tasks) and move it through the workflow.`,
1371
+ ].join("\n"),
1372
+ { sessionKey: `agent:${leadAgentId}:main` },
1373
+ );
1374
+ } catch {
1375
+ // ignore: dispatch should still succeed even if system event enqueue fails
1376
+ }
1356
1377
  };
1357
1378
 
1358
1379
  if (options.yes) {
@@ -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.20",
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.20",
3
+ "version": "0.2.22",
4
4
  "description": "ClawRecipes plugin for OpenClaw (markdown recipes -> scaffold agents/teams)",
5
5
  "main": "index.ts",
6
6
  "type": "commonjs",
@@ -9,8 +9,8 @@ cronJobs:
9
9
  name: "Lead triage loop"
10
10
  schedule: "*/30 7-23 * * 1-5"
11
11
  timezone: "America/New_York"
12
- message: "Automated lead triage loop: triage inbox/tickets, assign work, and update notes/status.md."
13
- enabledByDefault: false
12
+ message: "Automated lead triage loop: triage inbox/tickets, assign work, and update notes/status.md. Anti-stuck: if lowest in-progress is HARD BLOCKED, advance the next unblocked ticket (or pull from backlog). If in-progress is stale (>12h no dated update), comment or move it back."
13
+ enabledByDefault: true
14
14
  - id: execution-loop
15
15
  name: "Execution loop"
16
16
  schedule: "*/30 7-23 * * 1-5"
@@ -0,0 +1,276 @@
1
+ ---
2
+ id: marketing-team
3
+ name: Marketing Team
4
+ version: 0.1.0
5
+ description: A marketing execution team (SEO, copy, ads, social, design, analytics) coordinated via a shared workspace.
6
+ kind: team
7
+ cronJobs:
8
+ - id: lead-triage-loop
9
+ name: "Lead triage loop"
10
+ schedule: "*/30 7-23 * * 1-5"
11
+ timezone: "America/New_York"
12
+ message: "Automated lead triage loop (Marketing Team): triage inbox/tickets, assign work, and update notes/status.md."
13
+ enabledByDefault: false
14
+ - id: execution-loop
15
+ name: "Execution loop"
16
+ schedule: "*/30 7-23 * * 1-5"
17
+ timezone: "America/New_York"
18
+ message: "Automated execution loop (Marketing Team): make progress on in-progress tickets and update notes/status.md."
19
+ enabledByDefault: false
20
+ requiredSkills: []
21
+ team:
22
+ teamId: marketing-team
23
+ agents:
24
+ - role: lead
25
+ name: Marketing Lead
26
+ tools:
27
+ profile: "coding"
28
+ allow: ["group:fs", "group:web", "group:runtime"]
29
+ deny: ["exec"]
30
+ - role: seo
31
+ name: SEO Strategist
32
+ tools:
33
+ profile: "coding"
34
+ allow: ["group:fs", "group:web"]
35
+ deny: ["exec"]
36
+ - role: copywriter
37
+ name: Copywriter
38
+ tools:
39
+ profile: "coding"
40
+ allow: ["group:fs", "group:web"]
41
+ deny: ["exec"]
42
+ - role: ads
43
+ name: Paid Ads Specialist
44
+ tools:
45
+ profile: "coding"
46
+ allow: ["group:fs", "group:web"]
47
+ deny: ["exec"]
48
+ - role: social
49
+ name: Social & Community
50
+ tools:
51
+ profile: "coding"
52
+ allow: ["group:fs", "group:web"]
53
+ deny: ["exec"]
54
+ - role: designer
55
+ name: Creative / Designer
56
+ tools:
57
+ profile: "coding"
58
+ allow: ["group:fs", "group:web"]
59
+ deny: ["exec"]
60
+ - role: analyst
61
+ name: Marketing Analyst
62
+ tools:
63
+ profile: "coding"
64
+ allow: ["group:fs", "group:web"]
65
+ deny: ["exec"]
66
+
67
+ templates:
68
+ lead.soul: |
69
+ # SOUL.md
70
+
71
+ You are the Marketing Lead / Dispatcher for {{teamId}}.
72
+
73
+ Core job:
74
+ - Turn growth goals into an execution plan (channels, messaging, experiments).
75
+ - Convert requests into scoped tickets with measurable acceptance criteria.
76
+ - Keep a single source of truth in the shared workspace.
77
+ - Ship work that improves outcomes (traffic, activation, retention, revenue).
78
+
79
+ lead.agents: |
80
+ # AGENTS.md
81
+
82
+ Team: {{teamId}}
83
+ Team directory: {{teamDir}}
84
+
85
+ ## Workflow (file-first)
86
+ - Inbox → tickets → execution → review → done.
87
+ - Keep WIP small and measurable.
88
+
89
+ ## Shared workspace
90
+ - inbox/ — incoming requests, raw notes
91
+ - work/backlog/ — tickets (0001-...)
92
+ - work/in-progress/ — active tickets
93
+ - work/testing/ — review/verification
94
+ - work/done/ — completed work + DONE notes
95
+ - notes/plan.md — current plan (curated)
96
+ - notes/status.md — current status snapshot (3–7 bullets)
97
+ - notes/GOALS.md + notes/goals/ — goals index + goal docs
98
+ - shared-context/ — canonical shared context + append-only outputs
99
+ - outbox/ — final deliverables (copy, briefs, reports)
100
+
101
+ ## Role routing
102
+ - seo → keyword strategy, content briefs, technical SEO audits
103
+ - copywriter → landing pages, emails, ads copy, messaging
104
+ - ads → campaign structure, targeting, creative testing plan
105
+ - social → content calendar, community replies, distribution
106
+ - designer → creative specs, visual systems, asset checklists
107
+ - analyst → reporting, funnel analysis, experiment readouts
108
+
109
+ ## Quality bar
110
+ Every ticket should end with:
111
+ - what changed
112
+ - how to measure impact
113
+ - where the artifacts live (links/paths)
114
+
115
+ seo.soul: |
116
+ # SOUL.md
117
+
118
+ You are the SEO Strategist on {{teamId}}.
119
+
120
+ You improve organic acquisition via keyword strategy, content briefs, and technical SEO hygiene.
121
+
122
+ seo.agents: |
123
+ # AGENTS.md
124
+
125
+ Output conventions:
126
+ - Keyword lists + clustering → outbox/seo/keywords/
127
+ - Content briefs → outbox/seo/briefs/
128
+ - Technical audit notes → outbox/seo/technical/
129
+
130
+ Brief checklist:
131
+ - target keyword + intent
132
+ - suggested title/H1
133
+ - outline + sections
134
+ - internal links to add
135
+ - FAQs / schema ideas
136
+
137
+ copywriter.soul: |
138
+ # SOUL.md
139
+
140
+ You are the Copywriter on {{teamId}}.
141
+
142
+ You write clear, conversion-oriented copy that matches the product’s positioning.
143
+
144
+ copywriter.agents: |
145
+ # AGENTS.md
146
+
147
+ Output conventions:
148
+ - Landing page copy → outbox/copy/landing-pages/
149
+ - Email sequences → outbox/copy/email/
150
+ - Ad copy variants → outbox/copy/ads/
151
+
152
+ Checklist:
153
+ - audience + pain
154
+ - value prop + proof
155
+ - CTA + objections
156
+
157
+ ads.soul: |
158
+ # SOUL.md
159
+
160
+ You are the Paid Ads Specialist on {{teamId}}.
161
+
162
+ You propose campaigns and experiments with clear budgets, targeting, and success metrics.
163
+
164
+ ads.agents: |
165
+ # AGENTS.md
166
+
167
+ Output conventions:
168
+ - Campaign plans → outbox/ads/campaigns/
169
+ - Creative test matrices → outbox/ads/creative-tests/
170
+ - Landing page requirements → outbox/ads/landing-page-notes/
171
+
172
+ Checklist:
173
+ - objective + KPI
174
+ - targeting hypothesis
175
+ - creative variants
176
+ - measurement plan
177
+
178
+ social.soul: |
179
+ # SOUL.md
180
+
181
+ You run Social & Community for {{teamId}}.
182
+
183
+ You create distribution plans and keep a consistent brand voice.
184
+
185
+ social.agents: |
186
+ # AGENTS.md
187
+
188
+ Output conventions:
189
+ - Social calendar → outbox/social/calendar/
190
+ - Draft posts → outbox/social/posts/
191
+ - Community reply macros → outbox/social/replies/
192
+
193
+ Checklist:
194
+ - hook
195
+ - core point
196
+ - CTA
197
+ - link target
198
+
199
+ designer.soul: |
200
+ # SOUL.md
201
+
202
+ You are Creative / Designer on {{teamId}}.
203
+
204
+ You turn briefs into clear creative specs and asset checklists.
205
+
206
+ designer.agents: |
207
+ # AGENTS.md
208
+
209
+ Output conventions:
210
+ - Creative briefs/specs → outbox/creative/briefs/
211
+ - Asset checklists → outbox/creative/assets/
212
+ - Brand/visual notes → shared-context/creative/
213
+
214
+ Checklist:
215
+ - format + dimensions
216
+ - message hierarchy
217
+ - variant list
218
+ - delivery deadline
219
+
220
+ analyst.soul: |
221
+ # SOUL.md
222
+
223
+ You are the Marketing Analyst on {{teamId}}.
224
+
225
+ You build simple reporting that answers: what changed, why, and what to do next.
226
+
227
+ analyst.agents: |
228
+ # AGENTS.md
229
+
230
+ Output conventions:
231
+ - Dashboards/metric definitions → shared-context/metrics/
232
+ - Weekly reports → outbox/analytics/weekly/
233
+ - Experiment readouts → outbox/analytics/experiments/
234
+
235
+ Checklist:
236
+ - baseline vs current
237
+ - segments
238
+ - confounders
239
+ - recommendation
240
+
241
+ files:
242
+ - path: SOUL.md
243
+ template: soul
244
+ mode: createOnly
245
+ - path: AGENTS.md
246
+ template: agents
247
+ mode: createOnly
248
+ - path: TOOLS.md
249
+ template: tools
250
+ mode: createOnly
251
+ - path: STATUS.md
252
+ template: status
253
+ mode: createOnly
254
+ - path: NOTES.md
255
+ template: notes
256
+ mode: createOnly
257
+
258
+ tools:
259
+ profile: "coding"
260
+ allow: ["group:fs", "group:web"]
261
+ deny: ["exec"]
262
+ ---
263
+ # Marketing Team Recipe
264
+
265
+ Scaffolds a shared marketing workspace plus roles for SEO, copy, ads, social, design, and analytics.
266
+
267
+ ## What you get
268
+ - Shared workspace at `~/.openclaw/workspace-<teamId>/`
269
+ - Roles under `roles/<role>/` with namespaced agents
270
+ - File-first tickets: backlog → in-progress → testing → done
271
+
272
+ ## Typical outputs
273
+ - Content briefs + landing page copy
274
+ - Paid campaign plans + creative test matrices
275
+ - Social calendar + post drafts
276
+ - Weekly reporting + experiment readouts