opencodekit 0.12.2 → 0.12.3
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/dist/index.js +1 -1
- package/dist/template/.opencode/AGENTS.md +40 -417
- package/dist/template/.opencode/agent/build.md +53 -0
- package/dist/template/.opencode/agent/planner.md +0 -1
- package/dist/template/.opencode/agent/rush.md +38 -0
- package/dist/template/.opencode/command/accessibility-check.md +1 -1
- package/dist/template/.opencode/command/commit.md +1 -1
- package/dist/template/.opencode/command/create.md +68 -441
- package/dist/template/.opencode/command/finish.md +82 -252
- package/dist/template/.opencode/command/fix-ci.md +52 -247
- package/dist/template/.opencode/command/fix-types.md +32 -292
- package/dist/template/.opencode/command/fix-ui.md +49 -234
- package/dist/template/.opencode/command/fix.md +57 -194
- package/dist/template/.opencode/command/handoff.md +66 -243
- package/dist/template/.opencode/command/implement.md +67 -231
- package/dist/template/.opencode/command/issue.md +42 -190
- package/dist/template/.opencode/command/plan.md +86 -442
- package/dist/template/.opencode/command/pr.md +3 -1
- package/dist/template/.opencode/command/research-and-implement.md +69 -370
- package/dist/template/.opencode/command/research.md +72 -197
- package/dist/template/.opencode/command/resume.md +70 -438
- package/dist/template/.opencode/command/status.md +11 -11
- package/dist/template/.opencode/command/triage.md +23 -18
- package/dist/template/.opencode/memory/project/commands.md +139 -7
- package/dist/template/.opencode/memory/project/gotchas.md +85 -0
- package/dist/template/.opencode/plugin/beads.ts +181 -16
- package/dist/template/.opencode/skill/beads/SKILL.md +15 -0
- package/dist/template/.opencode/skill/context-engineering/SKILL.md +94 -0
- package/dist/template/.opencode/skill/memory-system/SKILL.md +107 -0
- package/dist/template/.opencode/skill/session-management/SKILL.md +111 -0
- package/dist/template/.opencode/skill/tool-priority/SKILL.md +115 -0
- package/package.json +1 -1
|
@@ -1,526 +1,170 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Create implementation plan
|
|
3
|
-
argument-hint: "<bead-id> [--create-beads]
|
|
2
|
+
description: Create implementation plan for a bead
|
|
3
|
+
argument-hint: "<bead-id> [--create-beads]"
|
|
4
4
|
agent: planner
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Plan
|
|
7
|
+
# Plan: $ARGUMENTS
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
You're creating an implementation plan. Design first, then execute.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
skill({ name: "beads" }); // For hierarchy and dependencies
|
|
13
|
-
skill({ name: "writing-plans" }); // For plan structure
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
## Arguments
|
|
17
|
-
|
|
18
|
-
| Argument | Default | Description |
|
|
19
|
-
| ---------------- | -------- | ------------------------------------- |
|
|
20
|
-
| `<bead-id>` | required | The bead to plan |
|
|
21
|
-
| `--create-beads` | false | Create child beads for each plan task |
|
|
22
|
-
| `--parallel` | false | Identify parallel execution tracks |
|
|
23
|
-
|
|
24
|
-
## Phase 1: Load Context
|
|
25
|
-
|
|
26
|
-
```typescript
|
|
27
|
-
bd_show({ id: "$ARGUMENTS" });
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
Read artifacts:
|
|
31
|
-
|
|
32
|
-
```typescript
|
|
33
|
-
read({ filePath: ".beads/artifacts/<bead-id>/spec.md" });
|
|
34
|
-
read({ filePath: ".beads/artifacts/<bead-id>/research.md" });
|
|
35
|
-
read({ filePath: ".beads/artifacts/<bead-id>/design.md" }); // May not exist
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
If spec.md missing: "Run `/create <bead-id>` first."
|
|
39
|
-
If research.md missing and complexity > M: "Run `/research <bead-id>` first."
|
|
40
|
-
If design.md exists: Resume from saved design options.
|
|
11
|
+
## Load Context
|
|
41
12
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
paths: [
|
|
47
|
-
".beads/artifacts/<bead-id>/design.md",
|
|
48
|
-
".beads/artifacts/<bead-id>/plan.md",
|
|
49
|
-
],
|
|
50
|
-
reason: "Planning $ARGUMENTS",
|
|
51
|
-
ttl: 1200,
|
|
52
|
-
});
|
|
13
|
+
```bash
|
|
14
|
+
bd show $ARGUMENTS
|
|
15
|
+
cat .beads/artifacts/$ARGUMENTS/spec.md
|
|
16
|
+
cat .beads/artifacts/$ARGUMENTS/research.md 2>/dev/null
|
|
53
17
|
```
|
|
54
18
|
|
|
55
|
-
|
|
19
|
+
If spec.md missing: "Run `/create $ARGUMENTS` first."
|
|
20
|
+
If complexity > M and no research: "Consider `/research $ARGUMENTS` first."
|
|
56
21
|
|
|
57
|
-
|
|
22
|
+
## Analyze For Decomposition
|
|
58
23
|
|
|
59
|
-
|
|
60
|
-
DECOMPOSITION ANALYSIS
|
|
61
|
-
━━━━━━━━━━━━━━━━━━━━━━
|
|
24
|
+
Should this be one bead or multiple?
|
|
62
25
|
|
|
63
|
-
|
|
64
|
-
Title: [title from bead]
|
|
65
|
-
Current Type: [task/feature/epic]
|
|
26
|
+
**Keep as single bead:**
|
|
66
27
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
[✓/✗] Could benefit from parallel execution
|
|
72
|
-
[✓/✗] Estimated > 50 tool calls
|
|
28
|
+
- Single domain (just frontend OR just backend)
|
|
29
|
+
- 2-3 files max
|
|
30
|
+
- ~50 tool calls or less
|
|
31
|
+
- No natural phases
|
|
73
32
|
|
|
74
|
-
|
|
33
|
+
**Decompose into subtasks:**
|
|
75
34
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
35
|
+
- Crosses domains (frontend + backend)
|
|
36
|
+
- Multiple independent pieces
|
|
37
|
+
- Natural phases (setup → implement → test)
|
|
38
|
+
- Could benefit from parallel agents
|
|
79
39
|
|
|
80
|
-
If
|
|
81
|
-
If complexity warrants decomposition, suggest it:
|
|
40
|
+
If decomposition makes sense, ask: "This would benefit from subtasks. Create child beads?"
|
|
82
41
|
|
|
83
|
-
|
|
84
|
-
This bead would benefit from decomposition into subtasks.
|
|
42
|
+
## Generate Design Options
|
|
85
43
|
|
|
86
|
-
|
|
87
|
-
• Parallel agent execution
|
|
88
|
-
• Better context management
|
|
89
|
-
• Clearer progress tracking
|
|
44
|
+
Present 2-3 approaches:
|
|
90
45
|
|
|
91
|
-
Create child beads? (yes/no)
|
|
92
46
|
```
|
|
47
|
+
## Option A: [Name]
|
|
93
48
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
Present 2-3 approaches with this format:
|
|
97
|
-
|
|
98
|
-
```markdown
|
|
99
|
-
## Design Options
|
|
100
|
-
|
|
101
|
-
### Option A: [Name]
|
|
102
|
-
|
|
103
|
-
**Approach:** [1-2 sentence description]
|
|
104
|
-
|
|
105
|
-
**Changes:**
|
|
106
|
-
|
|
107
|
-
- `src/foo.ts` - [what changes]
|
|
108
|
-
- `src/bar.ts` - [what changes]
|
|
49
|
+
Approach: [1-2 sentences]
|
|
109
50
|
|
|
110
|
-
|
|
111
|
-
|
|
51
|
+
Changes:
|
|
52
|
+
- `src/foo.ts` - [what]
|
|
53
|
+
- `src/bar.ts` - [what]
|
|
112
54
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
- Files touched: [N]
|
|
117
|
-
- Risk: [low/medium/high]
|
|
118
|
-
|
|
119
|
-
**Parallelization potential:** [High/Medium/Low]
|
|
55
|
+
Pros: [list]
|
|
56
|
+
Cons: [list]
|
|
57
|
+
Effort: [S/M/L] (~N tool calls)
|
|
120
58
|
|
|
121
59
|
---
|
|
122
60
|
|
|
123
|
-
|
|
61
|
+
## Option B: [Name]
|
|
124
62
|
|
|
125
|
-
[
|
|
63
|
+
[same format]
|
|
126
64
|
|
|
127
65
|
---
|
|
128
66
|
|
|
129
|
-
|
|
67
|
+
Recommendation: Option [A/B] because [reason].
|
|
130
68
|
```
|
|
131
69
|
|
|
132
|
-
Save to `.beads/artifacts
|
|
133
|
-
|
|
134
|
-
## Phase 4: Get Approval
|
|
135
|
-
|
|
136
|
-
**STOP and wait for human response.**
|
|
137
|
-
|
|
138
|
-
```
|
|
139
|
-
Pick an option (A/B/C), modify, or "none" to propose alternatives.
|
|
140
|
-
```
|
|
70
|
+
Save to `.beads/artifacts/$ARGUMENTS/design.md`.
|
|
141
71
|
|
|
142
|
-
|
|
72
|
+
**STOP. Wait for user to pick an option.**
|
|
143
73
|
|
|
144
|
-
##
|
|
74
|
+
## Create Plan
|
|
145
75
|
|
|
146
|
-
After approval, write `.beads/artifacts
|
|
76
|
+
After approval, write `.beads/artifacts/$ARGUMENTS/plan.md`:
|
|
147
77
|
|
|
148
78
|
```markdown
|
|
149
|
-
#
|
|
79
|
+
# Plan: [Title]
|
|
150
80
|
|
|
151
|
-
**Bead:**
|
|
152
|
-
**
|
|
153
|
-
**
|
|
154
|
-
**Estimation:** ~[N] tool calls, [N] files
|
|
155
|
-
**Decomposition:** [Yes - child beads created / No - single bead]
|
|
156
|
-
|
|
157
|
-
## Dependency Graph
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
[Task 1] ──┬──> [Task 2a] ──┬──> [Task 4]
|
|
161
|
-
│ │
|
|
162
|
-
└──> [Task 2b] ──┘
|
|
163
|
-
│
|
|
164
|
-
└──> [Task 3] (can run parallel)
|
|
165
|
-
|
|
166
|
-
````
|
|
167
|
-
|
|
168
|
-
**Parallel Tracks:**
|
|
169
|
-
- Track A: Tasks 1 → 2a → 4
|
|
170
|
-
- Track B: Tasks 1 → 2b → 3 (independent after Task 1)
|
|
81
|
+
**Bead:** $ARGUMENTS
|
|
82
|
+
**Approach:** [selected option]
|
|
83
|
+
**Estimate:** ~N tool calls
|
|
171
84
|
|
|
172
85
|
## Tasks
|
|
173
86
|
|
|
174
|
-
###
|
|
87
|
+
### 1. [Task name]
|
|
175
88
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
| **Bead** | [child-bead-id if created] |
|
|
179
|
-
| **Files** | `src/foo.ts` |
|
|
180
|
-
| **Input** | [What this task receives/needs] |
|
|
181
|
-
| **Output** | [What this task produces] |
|
|
182
|
-
| **Success** | [Concrete verification criteria] |
|
|
183
|
-
| **Rollback** | [How to undo if this fails] |
|
|
184
|
-
| **Depends** | None |
|
|
185
|
-
| **Effort** | S (~10 tool calls) |
|
|
89
|
+
Files: `src/foo.ts`
|
|
90
|
+
Changes:
|
|
186
91
|
|
|
187
|
-
|
|
188
|
-
- [ ] [
|
|
189
|
-
- [ ] [Specific change 2]
|
|
92
|
+
- [ ] [specific change]
|
|
93
|
+
- [ ] [specific change]
|
|
190
94
|
|
|
191
|
-
|
|
192
|
-
```bash
|
|
193
|
-
[Actual command to verify success]
|
|
194
|
-
````
|
|
95
|
+
Verify: `npm test -- foo.test.ts`
|
|
195
96
|
|
|
196
97
|
---
|
|
197
98
|
|
|
198
|
-
### Task
|
|
99
|
+
### 2. [Task name]
|
|
199
100
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
| **Files** | `src/bar.ts` |
|
|
204
|
-
| **Input** | Output from Task 1 |
|
|
205
|
-
| **Output** | [What this produces] |
|
|
206
|
-
| **Success** | [Test passes, type checks, etc.] |
|
|
207
|
-
| **Rollback** | `git checkout src/bar.ts` |
|
|
208
|
-
| **Depends** | Task 1 |
|
|
209
|
-
| **Effort** | M (~30 tool calls) |
|
|
101
|
+
Depends on: Task 1
|
|
102
|
+
Files: `src/bar.ts`
|
|
103
|
+
Changes:
|
|
210
104
|
|
|
211
|
-
|
|
105
|
+
- [ ] [specific change]
|
|
212
106
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
**Verification:**
|
|
216
|
-
|
|
217
|
-
```bash
|
|
218
|
-
npm run test -- src/bar.test.ts
|
|
219
|
-
```
|
|
107
|
+
Verify: `npm test -- bar.test.ts`
|
|
220
108
|
|
|
221
109
|
---
|
|
222
110
|
|
|
223
|
-
[Continue for all tasks...]
|
|
224
|
-
|
|
225
|
-
## Escape Hatches
|
|
226
|
-
|
|
227
|
-
- **Max iterations per task:** 3 attempts before human intervention
|
|
228
|
-
- **Checkpoint after:** Tasks 2a, 3 (high-risk points)
|
|
229
|
-
- **Abort if:** [Condition that means we should stop]
|
|
230
|
-
|
|
231
111
|
## Final Verification
|
|
232
112
|
|
|
233
|
-
- [ ]
|
|
234
|
-
- [ ] `npm run type-check`
|
|
235
|
-
- [ ] `npm run test` passes
|
|
236
|
-
- [ ] Manual smoke test: [specific action]
|
|
237
|
-
|
|
238
|
-
## Risks
|
|
239
|
-
|
|
240
|
-
| Risk | Likelihood | Impact | Mitigation |
|
|
241
|
-
| -------- | ---------- | ------ | --------------- |
|
|
242
|
-
| [Risk 1] | Medium | High | [How to handle] |
|
|
243
|
-
| [Risk 2] | Low | Medium | [How to handle] |
|
|
244
|
-
|
|
245
|
-
````
|
|
246
|
-
|
|
247
|
-
## Phase 6: Create Child Beads (if --create-beads or user approved)
|
|
248
|
-
|
|
249
|
-
For each task in the plan, create a child bead:
|
|
250
|
-
|
|
251
|
-
```typescript
|
|
252
|
-
// Get parent bead ID
|
|
253
|
-
const parentId = "$ARGUMENTS";
|
|
254
|
-
|
|
255
|
-
// Task 1: No dependencies
|
|
256
|
-
const task1 = bd_add({
|
|
257
|
-
title: "[Task 1 title from plan]",
|
|
258
|
-
type: "task",
|
|
259
|
-
pri: 2,
|
|
260
|
-
parent: parentId,
|
|
261
|
-
desc: "[Task 1 description]",
|
|
262
|
-
tags: ["[domain]", "[size]"],
|
|
263
|
-
});
|
|
264
|
-
|
|
265
|
-
// Task 2a: Depends on Task 1
|
|
266
|
-
const task2a = bd_add({
|
|
267
|
-
title: "[Task 2a title from plan]",
|
|
268
|
-
type: "task",
|
|
269
|
-
pri: 2,
|
|
270
|
-
parent: parentId,
|
|
271
|
-
deps: [task1.id],
|
|
272
|
-
desc: "[Task 2a description]",
|
|
273
|
-
tags: ["[domain]", "[size]"],
|
|
274
|
-
});
|
|
275
|
-
|
|
276
|
-
// Task 2b: Also depends on Task 1 (parallel with 2a)
|
|
277
|
-
const task2b = bd_add({
|
|
278
|
-
title: "[Task 2b title from plan]",
|
|
279
|
-
type: "task",
|
|
280
|
-
pri: 2,
|
|
281
|
-
parent: parentId,
|
|
282
|
-
deps: [task1.id],
|
|
283
|
-
desc: "[Task 2b description]",
|
|
284
|
-
tags: ["[domain]", "[size]"],
|
|
285
|
-
});
|
|
286
|
-
|
|
287
|
-
// Task 3: Depends on Task 1 (parallel track)
|
|
288
|
-
const task3 = bd_add({
|
|
289
|
-
title: "[Task 3 title from plan]",
|
|
290
|
-
type: "task",
|
|
291
|
-
pri: 2,
|
|
292
|
-
parent: parentId,
|
|
293
|
-
deps: [task1.id],
|
|
294
|
-
desc: "[Task 3 description]",
|
|
295
|
-
tags: ["[domain]", "[size]"],
|
|
296
|
-
});
|
|
297
|
-
|
|
298
|
-
// Task 4: Depends on 2a and 2b
|
|
299
|
-
const task4 = bd_add({
|
|
300
|
-
title: "[Task 4 title from plan]",
|
|
301
|
-
type: "task",
|
|
302
|
-
pri: 2,
|
|
303
|
-
parent: parentId,
|
|
304
|
-
deps: [task2a.id, task2b.id],
|
|
305
|
-
desc: "[Task 4 description]",
|
|
306
|
-
tags: ["[domain]", "[size]"],
|
|
307
|
-
});
|
|
308
|
-
````
|
|
309
|
-
|
|
310
|
-
### Update Plan with Bead IDs
|
|
311
|
-
|
|
312
|
-
After creating beads, update plan.md to include bead IDs in each task table.
|
|
313
|
-
|
|
314
|
-
### Visualize Dependency Graph
|
|
315
|
-
|
|
113
|
+
- [ ] `npm test`
|
|
114
|
+
- [ ] `npm run type-check`
|
|
316
115
|
```
|
|
317
|
-
CHILD BEADS CREATED
|
|
318
|
-
━━━━━━━━━━━━━━━━━━━
|
|
319
|
-
|
|
320
|
-
Parent: <parent-id> "[Title]"
|
|
321
116
|
|
|
322
|
-
|
|
323
|
-
(READY) │ │ │
|
|
324
|
-
│ ▼ │
|
|
325
|
-
└──> <parent>.3 [Task 2b] ──┘
|
|
326
|
-
│
|
|
327
|
-
└──> <parent>.4 [Task 3]
|
|
328
|
-
(parallel track)
|
|
117
|
+
## If Creating Child Beads
|
|
329
118
|
|
|
330
|
-
|
|
331
|
-
PARALLEL AFTER .1: <parent>.2, <parent>.3, <parent>.4
|
|
332
|
-
FINAL: <parent>.5
|
|
119
|
+
With `--create-beads` flag or user approval:
|
|
333
120
|
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
## Phase 7: Upgrade Parent to Epic (if needed)
|
|
121
|
+
```bash
|
|
122
|
+
# Task 1 (no blockers)
|
|
123
|
+
bd create "[task 1 title]" -t task -p 2
|
|
338
124
|
|
|
339
|
-
|
|
125
|
+
# Task 2 (blocked by task 1)
|
|
126
|
+
bd create "[task 2 title]" -t task -p 2
|
|
127
|
+
bd dep add bd-[task2] bd-[task1] --type blocks
|
|
340
128
|
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
const parent = bd_show({ id: parentId });
|
|
344
|
-
|
|
345
|
-
if (parent.type !== "epic" && childBeadsCreated > 0) {
|
|
346
|
-
// Update parent to epic type
|
|
347
|
-
bd_msg({
|
|
348
|
-
subj: "Upgraded to Epic",
|
|
349
|
-
body: `${parentId} upgraded from ${parent.type} to epic with ${childBeadsCreated} subtasks`,
|
|
350
|
-
to: "all",
|
|
351
|
-
importance: "normal",
|
|
352
|
-
global: true,
|
|
353
|
-
});
|
|
354
|
-
}
|
|
129
|
+
# Visualize
|
|
130
|
+
bd dep tree $ARGUMENTS
|
|
355
131
|
```
|
|
356
132
|
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
Create `.beads/artifacts/<bead-id>/adr.md`:
|
|
360
|
-
|
|
361
|
-
```markdown
|
|
362
|
-
# ADR: [Decision Title]
|
|
363
|
-
|
|
364
|
-
**Status:** Accepted
|
|
365
|
-
**Date:** <date>
|
|
366
|
-
**Bead:** <bead-id>
|
|
367
|
-
|
|
368
|
-
## Context
|
|
369
|
-
|
|
370
|
-
[Problem statement from spec.md - why we needed to decide]
|
|
371
|
-
|
|
372
|
-
## Decision
|
|
373
|
-
|
|
374
|
-
We chose **[Option Name]** because:
|
|
375
|
-
|
|
376
|
-
- [Reason 1]
|
|
377
|
-
- [Reason 2]
|
|
378
|
-
|
|
379
|
-
## Alternatives Considered
|
|
380
|
-
|
|
381
|
-
- **[Option B]:** Rejected because [reason]
|
|
382
|
-
- **[Option C]:** Rejected because [reason]
|
|
383
|
-
|
|
384
|
-
## Decomposition Decision
|
|
385
|
-
|
|
386
|
-
[If child beads created:]
|
|
387
|
-
We decomposed this into [N] subtasks because:
|
|
388
|
-
|
|
389
|
-
- [Reason: parallel execution, context management, etc.]
|
|
390
|
-
|
|
391
|
-
Child beads: <parent>.1, <parent>.2, ...
|
|
392
|
-
|
|
393
|
-
[If not decomposed:]
|
|
394
|
-
We kept this as a single bead because:
|
|
395
|
-
|
|
396
|
-
- [Reason: small scope, single domain, etc.]
|
|
133
|
+
Update plan.md with bead IDs.
|
|
397
134
|
|
|
398
|
-
##
|
|
399
|
-
|
|
400
|
-
**Positive:**
|
|
401
|
-
|
|
402
|
-
- [Benefit 1]
|
|
403
|
-
- [Benefit 2]
|
|
404
|
-
|
|
405
|
-
**Negative:**
|
|
406
|
-
|
|
407
|
-
- [Tradeoff 1]
|
|
408
|
-
- [Tradeoff 2]
|
|
409
|
-
|
|
410
|
-
## Confirmation
|
|
411
|
-
|
|
412
|
-
This decision is confirmed when:
|
|
413
|
-
|
|
414
|
-
- [ ] Implementation complete per plan.md
|
|
415
|
-
- [ ] All verification steps pass
|
|
416
|
-
```
|
|
417
|
-
|
|
418
|
-
Update bead and sync:
|
|
135
|
+
## Sync
|
|
419
136
|
|
|
420
137
|
```typescript
|
|
421
|
-
|
|
422
|
-
subj: "Plan approved",
|
|
423
|
-
body: `Approach: [selected option]\nTasks: [count]\nChild beads: [yes/no]\nEstimate: ~[N] tool calls`,
|
|
424
|
-
to: "all",
|
|
425
|
-
importance: "normal",
|
|
426
|
-
global: true,
|
|
427
|
-
});
|
|
428
|
-
|
|
429
|
-
bd_release({ _: true });
|
|
430
|
-
bd_sync({ reason: "Plan approved for $ARGUMENTS" });
|
|
138
|
+
bd_sync({ reason: "Sync plan" });
|
|
431
139
|
```
|
|
432
140
|
|
|
433
141
|
## Output
|
|
434
142
|
|
|
435
|
-
|
|
143
|
+
Without child beads:
|
|
436
144
|
|
|
437
145
|
```
|
|
438
|
-
Plan
|
|
439
|
-
━━━━━━━━━━━━━━━━━━━━━━━━
|
|
146
|
+
Plan: $ARGUMENTS
|
|
440
147
|
|
|
441
|
-
Approach: [selected
|
|
442
|
-
Tasks: [count]
|
|
443
|
-
Estimate: ~
|
|
148
|
+
Approach: [selected]
|
|
149
|
+
Tasks: [count]
|
|
150
|
+
Estimate: ~N tool calls
|
|
444
151
|
|
|
445
152
|
Artifacts:
|
|
446
|
-
- .beads/artifacts
|
|
447
|
-
- .beads/artifacts
|
|
448
|
-
- .beads/artifacts/<bead-id>/adr.md
|
|
153
|
+
- .beads/artifacts/$ARGUMENTS/design.md
|
|
154
|
+
- .beads/artifacts/$ARGUMENTS/plan.md
|
|
449
155
|
|
|
450
|
-
Next: /implement
|
|
156
|
+
Next: /implement $ARGUMENTS
|
|
451
157
|
```
|
|
452
158
|
|
|
453
|
-
|
|
159
|
+
With child beads:
|
|
454
160
|
|
|
455
161
|
```
|
|
456
|
-
Plan
|
|
457
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
458
|
-
|
|
459
|
-
Approach: [selected option]
|
|
460
|
-
Child beads created: [count]
|
|
162
|
+
Plan: $ARGUMENTS (Epic)
|
|
461
163
|
|
|
462
164
|
Subtasks:
|
|
463
|
-
├──
|
|
464
|
-
├──
|
|
465
|
-
|
|
466
|
-
├── <bead>.4: [Task 3] [S] ← blocked by .1
|
|
467
|
-
└── <bead>.5: [Task 4] [M] ← blocked by .2, .3
|
|
165
|
+
├── bd-[x].1: [title] ← READY
|
|
166
|
+
├── bd-[x].2: [title] ← blocked by .1
|
|
167
|
+
└── bd-[x].3: [title] ← blocked by .2
|
|
468
168
|
|
|
469
|
-
|
|
470
|
-
• Track A: .1 → .2 → .5
|
|
471
|
-
• Track B: .1 → .3 → .5
|
|
472
|
-
• Track C: .1 → .4
|
|
473
|
-
|
|
474
|
-
Artifacts:
|
|
475
|
-
- .beads/artifacts/<bead-id>/design.md
|
|
476
|
-
- .beads/artifacts/<bead-id>/plan.md
|
|
477
|
-
- .beads/artifacts/<bead-id>/adr.md
|
|
478
|
-
|
|
479
|
-
Next Steps:
|
|
480
|
-
├── Start first task: /implement <bead>.1
|
|
481
|
-
├── See ready work: bd ready
|
|
482
|
-
└── See blocked tasks: bd_blocked()
|
|
483
|
-
|
|
484
|
-
For parallel agents:
|
|
485
|
-
├── Agent 1 (backend): claim <bead>.1
|
|
486
|
-
├── Agent 2 (frontend): wait for .1, then claim .3
|
|
487
|
-
└── Agent 3 (qa): wait for .2 and .3, then claim .5
|
|
488
|
-
```
|
|
489
|
-
|
|
490
|
-
## When to Create Child Beads
|
|
491
|
-
|
|
492
|
-
| Scenario | Create Beads? |
|
|
493
|
-
| ------------------------------- | ------------------------------------ |
|
|
494
|
-
| Simple task, single domain | No - use plan.md checklist |
|
|
495
|
-
| 2-3 tasks, same domain | No - use plan.md checklist |
|
|
496
|
-
| 3+ tasks, multiple domains | Yes - enables parallel agents |
|
|
497
|
-
| Tasks with complex dependencies | Yes - beads tracks dependencies |
|
|
498
|
-
| Long-running work (days) | Yes - better progress tracking |
|
|
499
|
-
| Work that may span sessions | Yes - beads persists across sessions |
|
|
500
|
-
|
|
501
|
-
## Integration with Agent Workflow
|
|
502
|
-
|
|
503
|
-
After plan creates child beads:
|
|
504
|
-
|
|
505
|
-
```typescript
|
|
506
|
-
// Any agent can check ready work
|
|
507
|
-
bd_init({ team: "project", role: "backend" });
|
|
508
|
-
bd_ready(); // Shows <parent>.1 as ready
|
|
509
|
-
|
|
510
|
-
// Agent claims and works
|
|
511
|
-
bd_claim(); // Gets <parent>.1
|
|
512
|
-
// ... do the work ...
|
|
513
|
-
bd_done({ id: "<parent>.1", msg: "Completed setup" });
|
|
514
|
-
|
|
515
|
-
// Now <parent>.2, .3, .4 become ready (unblocked)
|
|
516
|
-
// Multiple agents can claim them in parallel
|
|
517
|
-
```
|
|
518
|
-
|
|
519
|
-
## Examples
|
|
520
|
-
|
|
521
|
-
```bash
|
|
522
|
-
/plan bd-auth01 # Plan without creating beads
|
|
523
|
-
/plan bd-auth01 --create-beads # Plan and create child beads
|
|
524
|
-
/plan bd-auth01 --parallel # Focus on parallel execution
|
|
525
|
-
/plan bd-auth01 --create-beads --parallel # Full decomposition
|
|
169
|
+
Next: /implement bd-[x].1
|
|
526
170
|
```
|