@jiggai/recipes 0.4.18 → 0.4.19
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 +4 -1
- package/docs/BUNDLED_RECIPES.md +3 -0
- package/docs/COMMANDS.md +3 -2
- package/docs/MEMORY_SYSTEM.md +304 -0
- package/docs/SWARM_ORCHESTRATOR.md +317 -0
- package/docs/TEAM_WORKFLOW.md +4 -0
- package/docs/WORKFLOW_EXAMPLES.md +292 -0
- package/docs/WORKFLOW_RUNS_FILE_FIRST.md +575 -0
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/src/lib/workflows/workflow-runner.ts +56 -5
package/README.md
CHANGED
|
@@ -265,7 +265,10 @@ If you are new, read these in order:
|
|
|
265
265
|
2. [Commands](docs/COMMANDS.md)
|
|
266
266
|
3. [Team workflow](docs/TEAM_WORKFLOW.md)
|
|
267
267
|
4. [Workflow runs](docs/WORKFLOW_RUNS_FILE_FIRST.md)
|
|
268
|
-
5. [
|
|
268
|
+
5. [Workflow examples](docs/WORKFLOW_EXAMPLES.md)
|
|
269
|
+
6. [Outbound posting](docs/OUTBOUND_POSTING.md)
|
|
270
|
+
7. [Memory system](docs/MEMORY_SYSTEM.md)
|
|
271
|
+
8. [Swarm Orchestrator](docs/SWARM_ORCHESTRATOR.md)
|
|
269
272
|
|
|
270
273
|
If you are building recipes:
|
|
271
274
|
|
package/docs/BUNDLED_RECIPES.md
CHANGED
package/docs/COMMANDS.md
CHANGED
|
@@ -302,8 +302,9 @@ Examples:
|
|
|
302
302
|
So if you install the plugin and then say "the workflow exists but does not fully work," check the optional workflow dependencies next.
|
|
303
303
|
|
|
304
304
|
More:
|
|
305
|
-
- [WORKFLOW_RUNS_FILE_FIRST.md](WORKFLOW_RUNS_FILE_FIRST.md)
|
|
306
|
-
- [
|
|
305
|
+
- [WORKFLOW_RUNS_FILE_FIRST.md](WORKFLOW_RUNS_FILE_FIRST.md) — node kinds, triggers, runs, edges, runner/worker model, approvals
|
|
306
|
+
- [WORKFLOW_EXAMPLES.md](WORKFLOW_EXAMPLES.md) — copy-paste workflow patterns
|
|
307
|
+
- [OUTBOUND_POSTING.md](OUTBOUND_POSTING.md) — publishing/posting behavior and setup
|
|
307
308
|
|
|
308
309
|
---
|
|
309
310
|
|
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
# Memory System
|
|
2
|
+
|
|
3
|
+
This document explains the ClawRecipes memory system in practical terms, especially as it appears in the team editor.
|
|
4
|
+
|
|
5
|
+
If you want the short version:
|
|
6
|
+
- memory is **file-first**
|
|
7
|
+
- not all memory is the same
|
|
8
|
+
- private continuity, team coordination, team knowledge, and role memory should stay separate
|
|
9
|
+
- the team editor should help you see and manage the right layer without mixing them up
|
|
10
|
+
|
|
11
|
+
This doc builds on the canonical memory model doc:
|
|
12
|
+
- [MEMORY_MODEL.md](MEMORY_MODEL.md)
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Why this exists
|
|
17
|
+
|
|
18
|
+
Without a clear memory system, teams end up dumping everything everywhere:
|
|
19
|
+
- private context leaks into shared files
|
|
20
|
+
- ticket status gets mixed with durable knowledge
|
|
21
|
+
- role-specific learnings get lost
|
|
22
|
+
- nobody knows where to put anything
|
|
23
|
+
|
|
24
|
+
ClawRecipes avoids that by being explicit about memory layers.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## The four memory layers
|
|
29
|
+
|
|
30
|
+
ClawRecipes uses four memory layers:
|
|
31
|
+
|
|
32
|
+
1. assistant continuity memory
|
|
33
|
+
2. team coordination docs
|
|
34
|
+
3. team knowledge memory
|
|
35
|
+
4. role memory
|
|
36
|
+
|
|
37
|
+
The canonical explanation lives here:
|
|
38
|
+
- [MEMORY_MODEL.md](MEMORY_MODEL.md)
|
|
39
|
+
|
|
40
|
+
This page is the easier operational guide.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Layer 1: assistant continuity memory
|
|
45
|
+
|
|
46
|
+
What it is:
|
|
47
|
+
- the assistant’s own continuity
|
|
48
|
+
- preferences
|
|
49
|
+
- personal working context
|
|
50
|
+
- long-running private context
|
|
51
|
+
|
|
52
|
+
Typical files:
|
|
53
|
+
- `SOUL.md`
|
|
54
|
+
- `USER.md`
|
|
55
|
+
- `memory/YYYY-MM-DD.md`
|
|
56
|
+
- `MEMORY.md`
|
|
57
|
+
|
|
58
|
+
Important rule:
|
|
59
|
+
- this does **not** belong in the team workspace
|
|
60
|
+
|
|
61
|
+
Use this for:
|
|
62
|
+
- assistant continuity
|
|
63
|
+
- private context
|
|
64
|
+
- user-specific preferences
|
|
65
|
+
|
|
66
|
+
Do not use it for:
|
|
67
|
+
- shared team knowledge
|
|
68
|
+
- team ticket history
|
|
69
|
+
- shared operational docs
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Layer 2: team coordination docs
|
|
74
|
+
|
|
75
|
+
What it is:
|
|
76
|
+
- the team’s operating surface
|
|
77
|
+
- plans, tickets, status, assignments, checklists
|
|
78
|
+
|
|
79
|
+
Typical files:
|
|
80
|
+
- `work/backlog/`
|
|
81
|
+
- `work/in-progress/`
|
|
82
|
+
- `work/testing/`
|
|
83
|
+
- `work/done/`
|
|
84
|
+
- `notes/plan.md`
|
|
85
|
+
- `notes/status.md`
|
|
86
|
+
- `TICKETS.md`
|
|
87
|
+
- `AGENTS.md`
|
|
88
|
+
|
|
89
|
+
Use this for:
|
|
90
|
+
- what the team is doing right now
|
|
91
|
+
- blockers
|
|
92
|
+
- decisions attached to tickets
|
|
93
|
+
- ongoing work coordination
|
|
94
|
+
|
|
95
|
+
Do not use it for:
|
|
96
|
+
- curated long-term knowledge base entries
|
|
97
|
+
- private assistant memory
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Layer 3: team knowledge memory
|
|
102
|
+
|
|
103
|
+
What it is:
|
|
104
|
+
- shared durable knowledge for the whole team
|
|
105
|
+
- facts worth keeping
|
|
106
|
+
- canonical links
|
|
107
|
+
- runbooks
|
|
108
|
+
- known fixes
|
|
109
|
+
- decisions worth reusing later
|
|
110
|
+
|
|
111
|
+
Typical files:
|
|
112
|
+
|
|
113
|
+
```text
|
|
114
|
+
shared-context/memory/
|
|
115
|
+
team.jsonl
|
|
116
|
+
pinned.jsonl
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Use this for:
|
|
120
|
+
- reusable knowledge
|
|
121
|
+
- facts the whole team should remember
|
|
122
|
+
- high-signal decisions worth pinning
|
|
123
|
+
|
|
124
|
+
This is the memory layer most closely associated with a memory tab in the team editor.
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Layer 4: role memory
|
|
129
|
+
|
|
130
|
+
What it is:
|
|
131
|
+
- continuity for one role inside the team
|
|
132
|
+
- role-specific learnings and playbooks
|
|
133
|
+
|
|
134
|
+
Typical files:
|
|
135
|
+
|
|
136
|
+
```text
|
|
137
|
+
roles/<role>/
|
|
138
|
+
MEMORY.md
|
|
139
|
+
memory/YYYY-MM-DD.md
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Use this for:
|
|
143
|
+
- role-specific learnings
|
|
144
|
+
- role runbooks
|
|
145
|
+
- role continuity that should not become global team knowledge yet
|
|
146
|
+
|
|
147
|
+
Examples:
|
|
148
|
+
- QA-specific release checks
|
|
149
|
+
- dev-specific implementation gotchas
|
|
150
|
+
- lead-specific prioritization habits
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## Team editor angle
|
|
155
|
+
|
|
156
|
+
From the team editor point of view, the memory system should feel like a set of clearly separated panels, not one giant dumping ground.
|
|
157
|
+
|
|
158
|
+
A good team editor should help you understand:
|
|
159
|
+
- what belongs in team memory vs role memory
|
|
160
|
+
- what is operational status vs durable knowledge
|
|
161
|
+
- what is pinned vs append-only
|
|
162
|
+
- what should stay private and never move into team memory
|
|
163
|
+
|
|
164
|
+
### The most useful things the team editor can surface
|
|
165
|
+
|
|
166
|
+
#### Memory overview
|
|
167
|
+
- short explanation of the memory layers
|
|
168
|
+
- link to the canonical memory model doc
|
|
169
|
+
|
|
170
|
+
#### Team memory
|
|
171
|
+
- `shared-context/memory/team.jsonl`
|
|
172
|
+
- `shared-context/memory/pinned.jsonl`
|
|
173
|
+
- counts / recent entries / pinned items
|
|
174
|
+
|
|
175
|
+
#### Coordination docs
|
|
176
|
+
- `notes/status.md`
|
|
177
|
+
- `notes/plan.md`
|
|
178
|
+
- current ticket lanes
|
|
179
|
+
|
|
180
|
+
#### Role memory
|
|
181
|
+
- links into `roles/<role>/MEMORY.md`
|
|
182
|
+
- links into role daily memory files
|
|
183
|
+
|
|
184
|
+
#### Policy docs
|
|
185
|
+
- `notes/memory-policy.md`
|
|
186
|
+
- any team-specific memory conventions
|
|
187
|
+
|
|
188
|
+
In other words:
|
|
189
|
+
- the editor should help you navigate the memory system
|
|
190
|
+
- the files remain the real source of truth
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## What goes where?
|
|
195
|
+
|
|
196
|
+
### Put it in team coordination docs when...
|
|
197
|
+
- it is about current work
|
|
198
|
+
- it is ticket-specific
|
|
199
|
+
- it is a progress update
|
|
200
|
+
- it is a blocker or immediate plan
|
|
201
|
+
|
|
202
|
+
### Put it in team knowledge memory when...
|
|
203
|
+
- it is reusable later
|
|
204
|
+
- the whole team should know it
|
|
205
|
+
- it is a known fix / canonical answer / stable reference
|
|
206
|
+
|
|
207
|
+
### Put it in role memory when...
|
|
208
|
+
- it mainly belongs to one role
|
|
209
|
+
- it is useful continuity for that role
|
|
210
|
+
- it is not yet broad enough to become team-wide knowledge
|
|
211
|
+
|
|
212
|
+
### Keep it in assistant continuity memory when...
|
|
213
|
+
- it is private context
|
|
214
|
+
- it is user/assistant specific
|
|
215
|
+
- it should not leak into the team workspace
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## Pinned vs append-only memory
|
|
220
|
+
|
|
221
|
+
### Append-only memory
|
|
222
|
+
This is the stream of memory as things are learned.
|
|
223
|
+
|
|
224
|
+
Examples:
|
|
225
|
+
- `team.jsonl`
|
|
226
|
+
- daily memory files
|
|
227
|
+
- status logs
|
|
228
|
+
|
|
229
|
+
### Pinned memory
|
|
230
|
+
This is the smaller curated set of high-signal items worth keeping easy to find.
|
|
231
|
+
|
|
232
|
+
Example:
|
|
233
|
+
- `pinned.jsonl`
|
|
234
|
+
|
|
235
|
+
Rule of thumb:
|
|
236
|
+
- append everything useful first
|
|
237
|
+
- pin only the things you expect to matter again later
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## Suggested habits
|
|
242
|
+
|
|
243
|
+
### After finishing work
|
|
244
|
+
- update the ticket comments
|
|
245
|
+
- append to `notes/status.md`
|
|
246
|
+
- save artifacts to `shared-context/agent-outputs/`
|
|
247
|
+
- if a reusable lesson emerged, write it to team memory
|
|
248
|
+
- if it is especially important, pin it
|
|
249
|
+
|
|
250
|
+
### During triage or lead review
|
|
251
|
+
- move short-lived work chatter into tickets/status docs
|
|
252
|
+
- move durable lessons into team knowledge memory
|
|
253
|
+
- curate pinned memory so it stays high-signal
|
|
254
|
+
|
|
255
|
+
### For role agents
|
|
256
|
+
- keep role-specific continuity in role memory
|
|
257
|
+
- escalate broadly useful knowledge into team memory
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## Common mistakes
|
|
262
|
+
|
|
263
|
+
### 1) Treating status logs like a knowledge base
|
|
264
|
+
`notes/status.md` is for operational history, not your long-term memory system.
|
|
265
|
+
|
|
266
|
+
### 2) Dumping private context into shared memory
|
|
267
|
+
Private assistant continuity should stay private.
|
|
268
|
+
|
|
269
|
+
### 3) Pinning too much
|
|
270
|
+
If everything is pinned, nothing is pinned.
|
|
271
|
+
|
|
272
|
+
### 4) Never promoting useful knowledge
|
|
273
|
+
If good lessons stay buried in tickets forever, the team never really learns.
|
|
274
|
+
|
|
275
|
+
### 5) Skipping role memory
|
|
276
|
+
Role memory is useful because not every lesson belongs at the whole-team level.
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## Simple example
|
|
281
|
+
|
|
282
|
+
Imagine a team learns these three things:
|
|
283
|
+
|
|
284
|
+
1. “Ticket 0042 is blocked waiting on API credentials.”
|
|
285
|
+
2. “The fix for workflow-runner approval retries is to clear stale locks before requeue.”
|
|
286
|
+
3. “QA should always capture screenshots for UI changes.”
|
|
287
|
+
|
|
288
|
+
Where should they go?
|
|
289
|
+
|
|
290
|
+
- #1 → ticket comments / `notes/status.md`
|
|
291
|
+
- #2 → team knowledge memory (`team.jsonl`, maybe pin it)
|
|
292
|
+
- #3 → role memory for QA, and maybe team memory too if it is now a team-wide rule
|
|
293
|
+
|
|
294
|
+
---
|
|
295
|
+
|
|
296
|
+
## How this connects to the canonical doc
|
|
297
|
+
|
|
298
|
+
This page is the practical operating guide.
|
|
299
|
+
|
|
300
|
+
The canonical model and boundaries remain here:
|
|
301
|
+
- [MEMORY_MODEL.md](MEMORY_MODEL.md)
|
|
302
|
+
|
|
303
|
+
If you want the philosophy and the exact layer definitions, read that doc.
|
|
304
|
+
If you want to know how to use the memory system day-to-day, start here.
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
# Swarm Orchestrator
|
|
2
|
+
|
|
3
|
+
This document explains what the **Swarm Orchestrator** is, when to use it, and how to work with it from the team editor.
|
|
4
|
+
|
|
5
|
+
If you want the short version:
|
|
6
|
+
- a normal team handles work through shared files and ticket lanes
|
|
7
|
+
- a swarm orchestrator is for **parallel coding work** using **git worktrees + tmux sessions**
|
|
8
|
+
- it is best when one lead wants to fan work out to multiple coding agents at once
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## What it is
|
|
13
|
+
|
|
14
|
+
The Swarm Orchestrator is a recipe/scaffold that creates an orchestration workspace for parallel coding work.
|
|
15
|
+
|
|
16
|
+
Its job is to:
|
|
17
|
+
- split work into focused tasks
|
|
18
|
+
- spin up multiple coding agents in parallel
|
|
19
|
+
- give each one its own branch/worktree/session
|
|
20
|
+
- track what is active
|
|
21
|
+
- help monitor and clean up those parallel tasks
|
|
22
|
+
|
|
23
|
+
Think of it as a coordination layer for multi-agent coding, not as a replacement for the normal team workspace.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## When to use it
|
|
28
|
+
|
|
29
|
+
Use Swarm Orchestrator when:
|
|
30
|
+
- one ticket can be split into several parallel coding tasks
|
|
31
|
+
- you want separate branches/worktrees for isolation
|
|
32
|
+
- you want to monitor several coding sessions at once
|
|
33
|
+
- you want a lead/orchestrator role to coordinate multiple implementation attempts
|
|
34
|
+
|
|
35
|
+
Do **not** use it when:
|
|
36
|
+
- the work is simple enough for one normal ticket/one agent
|
|
37
|
+
- you do not want git worktrees
|
|
38
|
+
- you do not want tmux sessions
|
|
39
|
+
- the extra orchestration overhead is not worth it
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## What it creates
|
|
44
|
+
|
|
45
|
+
The bundled `swarm-orchestrator` recipe creates an orchestrator workspace with files like:
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
.clawdbot/
|
|
49
|
+
CONVENTIONS.md
|
|
50
|
+
PROMPT_TEMPLATE.md
|
|
51
|
+
TEMPLATE.md
|
|
52
|
+
env.sh
|
|
53
|
+
spawn.sh
|
|
54
|
+
task.sh
|
|
55
|
+
check-agents.sh
|
|
56
|
+
cleanup.sh
|
|
57
|
+
active-tasks.json
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
These files are the operating surface for the orchestrator.
|
|
61
|
+
|
|
62
|
+
Important ones:
|
|
63
|
+
- `CONVENTIONS.md` — naming rules and defaults
|
|
64
|
+
- `PROMPT_TEMPLATE.md` — the required base prompt for spawned coding agents
|
|
65
|
+
- `TEMPLATE.md` — starter task/spec shape
|
|
66
|
+
- `env.sh` — local environment values
|
|
67
|
+
- `spawn.sh` / `task.sh` — start work
|
|
68
|
+
- `check-agents.sh` — inspect current swarm sessions
|
|
69
|
+
- `cleanup.sh` — safe cleanup helpers
|
|
70
|
+
- `active-tasks.json` — lightweight task registry
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Core concepts
|
|
75
|
+
|
|
76
|
+
### Worktree
|
|
77
|
+
Each coding task gets its own git worktree.
|
|
78
|
+
|
|
79
|
+
That means one repo can support multiple isolated task directories at the same time.
|
|
80
|
+
|
|
81
|
+
### Branch
|
|
82
|
+
Each task gets its own branch.
|
|
83
|
+
|
|
84
|
+
That keeps parallel agent work separated and easier to review.
|
|
85
|
+
|
|
86
|
+
### tmux session
|
|
87
|
+
Each coding agent runs in its own tmux session.
|
|
88
|
+
|
|
89
|
+
That means you can:
|
|
90
|
+
- attach to it
|
|
91
|
+
- watch it live
|
|
92
|
+
- steer it
|
|
93
|
+
- recover it if needed
|
|
94
|
+
|
|
95
|
+
### Registry
|
|
96
|
+
The orchestrator keeps a lightweight registry of active tasks in:
|
|
97
|
+
|
|
98
|
+
```text
|
|
99
|
+
.clawdbot/active-tasks.json
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
This is the quick answer to:
|
|
103
|
+
- what is running?
|
|
104
|
+
- on what branch?
|
|
105
|
+
- in which worktree?
|
|
106
|
+
- in which tmux session?
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Team editor angle
|
|
111
|
+
|
|
112
|
+
From the team editor point of view, the Swarm Orchestrator is useful when you want a visible place to manage parallel implementation work.
|
|
113
|
+
|
|
114
|
+
The team editor should help you:
|
|
115
|
+
- see whether an orchestrator exists for the team
|
|
116
|
+
- see the orchestrator workspace path
|
|
117
|
+
- inspect active tasks / sessions / branches
|
|
118
|
+
- know where env/config values live
|
|
119
|
+
- know which files to edit for conventions and prompts
|
|
120
|
+
|
|
121
|
+
A good mental model for the team editor is:
|
|
122
|
+
- the team editor is the dashboard
|
|
123
|
+
- the orchestrator workspace is the operating surface
|
|
124
|
+
|
|
125
|
+
So if the editor shows a Swarm Orchestrator area, the most useful things it can surface are:
|
|
126
|
+
- worktree root
|
|
127
|
+
- base ref
|
|
128
|
+
- active tasks
|
|
129
|
+
- task ids
|
|
130
|
+
- tmux session names
|
|
131
|
+
- registry status
|
|
132
|
+
- links to `.clawdbot/CONVENTIONS.md` and `.clawdbot/PROMPT_TEMPLATE.md`
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## How to inspect the recipe
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
openclaw recipes show swarm-orchestrator
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
This is the fastest way to inspect what the bundled recipe currently scaffolds.
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Typical setup flow
|
|
147
|
+
|
|
148
|
+
### 1) Scaffold the orchestrator
|
|
149
|
+
|
|
150
|
+
The exact scaffold command depends on how you want to install it, but the first thing is to inspect the recipe and then scaffold it into a workspace.
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
openclaw recipes show swarm-orchestrator
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
If you are using it as a standalone workspace recipe, scaffold it like your other recipes.
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
### 2) Configure environment values
|
|
161
|
+
|
|
162
|
+
The orchestrator relies on values in `.clawdbot/env.sh`.
|
|
163
|
+
|
|
164
|
+
Common ones include:
|
|
165
|
+
- `SWARM_REPO_DIR`
|
|
166
|
+
- `SWARM_WORKTREE_ROOT`
|
|
167
|
+
- `SWARM_BASE_REF`
|
|
168
|
+
- optional agent-runner command settings
|
|
169
|
+
|
|
170
|
+
Practical advice:
|
|
171
|
+
- keep worktrees in a dedicated folder
|
|
172
|
+
- keep that folder outside the repo
|
|
173
|
+
- keep it outside the OpenClaw workspace if possible
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
### 3) Check prerequisites
|
|
178
|
+
|
|
179
|
+
Common prerequisites include:
|
|
180
|
+
- `git`
|
|
181
|
+
- `tmux`
|
|
182
|
+
- `jq`
|
|
183
|
+
|
|
184
|
+
The orchestrator recipe/source docs also mention these directly.
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## Starting work
|
|
189
|
+
|
|
190
|
+
The orchestrator’s job is to start focused tasks.
|
|
191
|
+
|
|
192
|
+
Typical pattern:
|
|
193
|
+
- create a task spec
|
|
194
|
+
- choose branch/worktree/session names
|
|
195
|
+
- spawn the task
|
|
196
|
+
- record/update the registry
|
|
197
|
+
|
|
198
|
+
The scaffolded scripts are designed to help with that.
|
|
199
|
+
|
|
200
|
+
Example commands from the orchestrator workspace:
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
./.clawdbot/task.sh start --task-id 0082 --spec "Implement workflow queue improvements"
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Or directly:
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
./.clawdbot/spawn.sh feat-0082-a codex swarm-0082-a
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
Exact flags may vary with your local scaffold/version, so treat the local generated files as the source of truth.
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## Monitoring work
|
|
217
|
+
|
|
218
|
+
To inspect current orchestrated work:
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
./.clawdbot/check-agents.sh
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
And for tmux directly:
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
tmux ls
|
|
228
|
+
tmux attach -t swarm-0082-a
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Use the registry too:
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
cat ./.clawdbot/active-tasks.json
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
This gives you the fastest picture of:
|
|
238
|
+
- active tasks
|
|
239
|
+
- branch names
|
|
240
|
+
- worktree paths
|
|
241
|
+
- tmux sessions
|
|
242
|
+
- rough task status
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## Cleanup
|
|
247
|
+
|
|
248
|
+
There is also a cleanup script in the scaffold.
|
|
249
|
+
|
|
250
|
+
Typical use:
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
./.clawdbot/cleanup.sh
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
Important rule:
|
|
257
|
+
- do **not** delete worktrees/branches casually
|
|
258
|
+
- cleanup should stay conservative unless explicitly enabled
|
|
259
|
+
|
|
260
|
+
That caution matters, because orchestrator cleanup can otherwise destroy in-progress work.
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
## Suggested workflow
|
|
265
|
+
|
|
266
|
+
A practical orchestrator loop looks like this:
|
|
267
|
+
|
|
268
|
+
1. identify a ticket worth parallelizing
|
|
269
|
+
2. break it into 2–N focused tasks
|
|
270
|
+
3. create one branch/worktree/session per task
|
|
271
|
+
4. monitor progress via tmux + registry
|
|
272
|
+
5. review outputs / PRs
|
|
273
|
+
6. merge or discard branches intentionally
|
|
274
|
+
7. clean up finished worktrees
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
## Common mistakes
|
|
279
|
+
|
|
280
|
+
### 1) Using swarm for tiny work
|
|
281
|
+
If one agent can do it cleanly, swarm is probably overkill.
|
|
282
|
+
|
|
283
|
+
### 2) Not setting a dedicated worktree root
|
|
284
|
+
That turns cleanup and inspection into a mess.
|
|
285
|
+
|
|
286
|
+
### 3) Letting naming drift
|
|
287
|
+
Use the conventions file. Otherwise you end up with branch/session chaos.
|
|
288
|
+
|
|
289
|
+
### 4) Treating tmux as optional when debugging
|
|
290
|
+
If agents are launched into tmux, tmux is the source of truth for what is actually happening live.
|
|
291
|
+
|
|
292
|
+
### 5) Deleting worktrees too early
|
|
293
|
+
Only clean up once branches/PRs/status are clearly done.
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## How this should relate to the team editor
|
|
298
|
+
|
|
299
|
+
The team editor should make orchestrator use easier by exposing:
|
|
300
|
+
- whether the team has an orchestrator
|
|
301
|
+
- the orchestrator workspace location
|
|
302
|
+
- key env/config values
|
|
303
|
+
- active tasks summary
|
|
304
|
+
- links to conventions/prompt files
|
|
305
|
+
- where to monitor/clean up
|
|
306
|
+
|
|
307
|
+
This is the sweet spot:
|
|
308
|
+
- editor for visibility and navigation
|
|
309
|
+
- orchestrator workspace/scripts for execution
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
313
|
+
## Recommended related docs
|
|
314
|
+
|
|
315
|
+
- [TEAM_WORKFLOW.md](TEAM_WORKFLOW.md)
|
|
316
|
+
- [BUNDLED_RECIPES.md](BUNDLED_RECIPES.md)
|
|
317
|
+
- [AGENTS_AND_SKILLS.md](AGENTS_AND_SKILLS.md)
|
package/docs/TEAM_WORKFLOW.md
CHANGED
|
@@ -199,6 +199,10 @@ Because it gives you:
|
|
|
199
199
|
- easy automation
|
|
200
200
|
- less dependency on one UI or one database
|
|
201
201
|
|
|
202
|
+
Related:
|
|
203
|
+
- [MEMORY_SYSTEM.md](MEMORY_SYSTEM.md)
|
|
204
|
+
- [SWARM_ORCHESTRATOR.md](SWARM_ORCHESTRATOR.md)
|
|
205
|
+
|
|
202
206
|
---
|
|
203
207
|
|
|
204
208
|
## Recommended daily commands
|