opencodekit 0.11.0 → 0.12.0

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.
Files changed (45) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/template/.opencode/AGENTS.md +2 -2
  3. package/dist/template/.opencode/agent/build.md +20 -20
  4. package/dist/template/.opencode/agent/explore.md +13 -13
  5. package/dist/template/.opencode/agent/planner.md +20 -20
  6. package/dist/template/.opencode/agent/review.md +18 -18
  7. package/dist/template/.opencode/agent/rush.md +20 -20
  8. package/dist/template/.opencode/agent/scout.md +16 -16
  9. package/dist/template/.opencode/agent/vision.md +19 -19
  10. package/dist/template/.opencode/command/accessibility-check.md +6 -2
  11. package/dist/template/.opencode/command/analyze-mockup.md +6 -0
  12. package/dist/template/.opencode/command/analyze-project.md +6 -0
  13. package/dist/template/.opencode/command/brainstorm.md +6 -0
  14. package/dist/template/.opencode/command/commit.md +6 -1
  15. package/dist/template/.opencode/command/create.md +369 -134
  16. package/dist/template/.opencode/command/design-audit.md +6 -0
  17. package/dist/template/.opencode/command/design.md +6 -0
  18. package/dist/template/.opencode/command/finish.md +1 -0
  19. package/dist/template/.opencode/command/fix-ci.md +1 -0
  20. package/dist/template/.opencode/command/fix-types.md +6 -0
  21. package/dist/template/.opencode/command/fix-ui.md +6 -0
  22. package/dist/template/.opencode/command/fix.md +6 -0
  23. package/dist/template/.opencode/command/handoff.md +6 -1
  24. package/dist/template/.opencode/command/implement.md +1 -0
  25. package/dist/template/.opencode/command/import-plan.md +7 -2
  26. package/dist/template/.opencode/command/integration-test.md +5 -0
  27. package/dist/template/.opencode/command/issue.md +11 -2
  28. package/dist/template/.opencode/command/new-feature.md +8 -0
  29. package/dist/template/.opencode/command/plan.md +282 -21
  30. package/dist/template/.opencode/command/pr.md +6 -1
  31. package/dist/template/.opencode/command/research-and-implement.md +6 -0
  32. package/dist/template/.opencode/command/research.md +6 -0
  33. package/dist/template/.opencode/command/resume.md +8 -0
  34. package/dist/template/.opencode/command/revert-feature.md +7 -2
  35. package/dist/template/.opencode/command/review-codebase.md +6 -0
  36. package/dist/template/.opencode/command/status.md +6 -0
  37. package/dist/template/.opencode/command/triage.md +17 -12
  38. package/dist/template/.opencode/command/ui-review.md +4 -0
  39. package/dist/template/.opencode/opencode.json +479 -514
  40. package/dist/template/.opencode/package.json +1 -1
  41. package/dist/template/.opencode/plugin/beads.ts +857 -270
  42. package/dist/template/.opencode/skill/beads/SKILL.md +110 -17
  43. package/dist/template/.opencode/skill/beads/references/DEPENDENCIES.md +3 -3
  44. package/dist/template/.opencode/skill/beads/references/WORKFLOWS.md +1 -1
  45. package/package.json +1 -1
@@ -1,19 +1,26 @@
1
1
  ---
2
- description: Create a new bead with spec
2
+ description: Create bead(s) with automatic complexity analysis and decomposition
3
3
  argument-hint: "[optional title]"
4
4
  agent: build
5
5
  ---
6
6
 
7
7
  # Create Task
8
8
 
9
+ ## Load Beads Skill
10
+
11
+ ```typescript
12
+ skill({ name: "beads" });
13
+ ```
14
+
15
+ This skill provides the full beads workflow including Epic → Task → Subtask hierarchy.
16
+
9
17
  ## Phase 1: Check for Similar Work
10
18
 
11
19
  Before creating, search for existing or past work:
12
20
 
13
21
  ```typescript
14
- memory -
15
- search({ query: "[keywords from title/problem]", type: "observations" });
16
- bd_ls({ status: "all", limit: 20 });
22
+ memory_search({ query: "[keywords from title/problem]", type: "observations" });
23
+ bd_ls({ status: "all", limit: 20, offset: 0 });
17
24
  ```
18
25
 
19
26
  If similar task exists:
@@ -36,52 +43,94 @@ If similar task exists:
36
43
 
37
44
  Keep it brief. Get: clear goal, success criteria, scope, constraints.
38
45
 
39
- ## Phase 3: Classify & Estimate
46
+ ## Phase 3: Complexity Analysis
40
47
 
41
- Based on interview:
48
+ Analyze the request to determine if it should be a single bead or decomposed:
42
49
 
43
- ### Type & Priority
50
+ ### Complexity Signals
44
51
 
45
- - **Type**: bug | feature | task | chore
46
- - **Priority**: 0 (critical) to 4 (low), default 2
52
+ ```
53
+ SIMPLE (Single Bead) COMPLEX (Needs Decomposition)
54
+ ━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
55
+ • Single file change • Multiple unrelated files
56
+ • One clear action • Multiple distinct actions
57
+ • ~30 min or less • Hours/days of work
58
+ • No phases needed • Has natural phases
59
+ • One skill domain • Crosses domains (FE + BE)
60
+ • Bug fix or small feature • New system or major feature
61
+ ```
47
62
 
48
- ### Complexity & Estimation
63
+ ### Automatic Classification
49
64
 
50
- | Complexity | Tool Calls | Description | Workflow |
51
- | ---------- | ---------- | ---------------------------------- | ------------------- |
52
- | **S** | ~10 | Single file fix, obvious solution | → /implement |
53
- | **M** | ~30 | Few files, clear scope | → /implement |
54
- | **L** | ~100 | Multiple files, needs research | → /research → /plan |
55
- | **XL** | Decompose | Too big - break into smaller tasks | → Create sub-beads |
65
+ ```typescript
66
+ const analyzeComplexity = (request: string) => {
67
+ const signals = {
68
+ // COMPLEX signals
69
+ multiDomain: /frontend.*backend|api.*ui|database.*interface/i,
70
+ multiPhase: /first.*then|phase|step \d|after.*before/i,
71
+ largeScope: /system|architecture|refactor.*entire|redesign/i,
72
+ multiComponent: /and.*and|multiple|several|all.*components/i,
73
+ integration: /integrate|connect|sync.*between/i,
74
+
75
+ // SIMPLE signals
76
+ singleAction: /fix|update|add|remove|change.*one/i,
77
+ bugFix: /bug|error|broken|not working|crash/i,
78
+ smallScope: /typo|config|env|readme|comment/i,
79
+ };
80
+
81
+ let complexScore = 0;
82
+ if (signals.multiDomain.test(request)) complexScore += 3;
83
+ if (signals.multiPhase.test(request)) complexScore += 2;
84
+ if (signals.largeScope.test(request)) complexScore += 3;
85
+ if (signals.multiComponent.test(request)) complexScore += 2;
86
+ if (signals.integration.test(request)) complexScore += 2;
87
+
88
+ let simpleScore = 0;
89
+ if (signals.singleAction.test(request)) simpleScore += 2;
90
+ if (signals.bugFix.test(request)) simpleScore += 1;
91
+ if (signals.smallScope.test(request)) simpleScore += 3;
92
+
93
+ return complexScore > simpleScore + 2 ? "COMPLEX" : "SIMPLE";
94
+ };
95
+ ```
56
96
 
57
- **Default:** M (medium)
97
+ ### Decision Point
58
98
 
59
- ## Phase 4: Create Bead
99
+ ```
100
+ COMPLEXITY ANALYSIS
101
+ ━━━━━━━━━━━━━━━━━━━
60
102
 
61
- Reserve the artifacts directory:
103
+ Request: "[user's request]"
62
104
 
63
- ```typescript
64
- bd_reserve({
65
- paths: [".beads/artifacts/<bead-id>/spec.md"],
66
- reason: "Creating new task",
67
- ttl: 600,
68
- });
69
- ```
105
+ Signals detected:
106
+ ✓ Multiple domains (frontend + backend)
107
+ Multi-phase work (setup → implement → test)
108
+ Integration required
70
109
 
71
- Propose:
110
+ Classification: COMPLEX
72
111
 
73
- ```
74
- Creating:
75
- Title: [title]
76
- Type: [type]
77
- Priority: [0-4]
78
- Estimate: [S/M/L/XL] (~[N] tool calls)
79
- Role: [fe/be/mobile/devops/qa] (optional)
112
+ Recommendation: Create Epic with 3-4 subtasks
80
113
 
81
- Approve? (yes/modify)
114
+ Options:
115
+ 1. [Recommended] Create Epic + decompose into subtasks
116
+ 2. Create single bead (override complexity detection)
117
+ 3. Let me clarify scope first
118
+
119
+ Choose (1/2/3): _
82
120
  ```
83
121
 
84
- On approval:
122
+ **STOP and wait for user confirmation.**
123
+
124
+ ## Phase 4A: Simple Path (Single Bead)
125
+
126
+ If SIMPLE or user overrides:
127
+
128
+ ### Type & Priority
129
+
130
+ - **Type**: bug | feature | task | chore
131
+ - **Priority**: 0 (critical) to 4 (low), default 2
132
+
133
+ ### Create Single Bead
85
134
 
86
135
  ```typescript
87
136
  bd_add({
@@ -89,69 +138,196 @@ bd_add({
89
138
  type: "[type]",
90
139
  pri: [priority],
91
140
  desc: "[description]",
92
- tags: ["[role]", "[estimate]"], // e.g., ["fe", "M"]
141
+ tags: ["[role]", "[estimate]"],
93
142
  });
94
143
  ```
95
144
 
96
- ### Link Dependencies
145
+ ### Create Spec
146
+
147
+ Write `.beads/artifacts/<bead-id>/spec.md` (see Standard Spec template below).
148
+
149
+ **Continue to Phase 6.**
150
+
151
+ ## Phase 4B: Complex Path (Epic + Subtasks)
152
+
153
+ If COMPLEX and user confirms decomposition:
154
+
155
+ ### Step 1: Identify Natural Breakdown
156
+
157
+ ```
158
+ DECOMPOSITION ANALYSIS
159
+ ━━━━━━━━━━━━━━━━━━━━━━
160
+
161
+ Request: "Add user authentication with OAuth"
162
+
163
+ Natural breakdown:
164
+
165
+ 1. Database & Schema [Backend]
166
+ - User table, sessions table
167
+ - Can start immediately
168
+
169
+ 2. OAuth Provider Integration [Backend]
170
+ - Google, GitHub providers
171
+ - Depends on: #1
97
172
 
98
- If this task depends on others:
173
+ 3. Auth API Endpoints [Backend]
174
+ - Login, logout, refresh
175
+ - Depends on: #1, #2
176
+
177
+ 4. Frontend Auth Flow [Frontend]
178
+ - Login page, protected routes
179
+ - Depends on: #3
180
+
181
+ 5. Testing & Documentation [QA]
182
+ - E2E tests, API docs
183
+ - Depends on: #3, #4
184
+
185
+ Parallel execution possible:
186
+ - Track A: #1 → #2 → #3
187
+ - Track B: #4 (can start after #3 ready)
188
+ - Track C: #5 (final)
189
+
190
+ Create this structure? (yes/modify)
191
+ ```
192
+
193
+ **STOP and wait for user confirmation.**
194
+
195
+ ### Step 2: Create Epic
99
196
 
100
197
  ```typescript
101
- bd_add({
102
- title: "[title]",
103
- type: "[type]",
198
+ const epic = bd_add({
199
+ title: "[Feature Name]",
200
+ type: "epic",
104
201
  pri: [priority],
105
- deps: ["<blocking-bead-id>"], // Tasks that must complete first
202
+ desc: "[Overview of the feature]",
203
+ tags: ["epic", "[domain]"],
106
204
  });
205
+ // Returns: { id: "bd-a3f8" }
107
206
  ```
108
207
 
109
- ### Assign to Role (optional)
208
+ ### Step 3: Create Child Tasks with Dependencies
110
209
 
111
210
  ```typescript
112
- bd_assign({ id: "<bead-id>", role: "[fe/be/mobile/devops/qa]", notify: true });
211
+ // Task 1: No dependencies (can start immediately)
212
+ const task1 = bd_add({
213
+ title: "Database schema for auth",
214
+ type: "task",
215
+ pri: 2,
216
+ parent: "bd-a3f8", // Links to epic
217
+ desc: "Create user and session tables",
218
+ tags: ["backend", "database", "S"],
219
+ });
220
+ // Returns: { id: "bd-a3f8.1" }
221
+
222
+ // Task 2: Depends on Task 1
223
+ const task2 = bd_add({
224
+ title: "OAuth provider integration",
225
+ type: "task",
226
+ pri: 2,
227
+ parent: "bd-a3f8",
228
+ deps: ["bd-a3f8.1"], // Blocked by task 1
229
+ desc: "Integrate Google and GitHub OAuth",
230
+ tags: ["backend", "M"],
231
+ });
232
+ // Returns: { id: "bd-a3f8.2" }
233
+
234
+ // Task 3: Depends on Tasks 1 and 2
235
+ const task3 = bd_add({
236
+ title: "Auth API endpoints",
237
+ type: "task",
238
+ pri: 2,
239
+ parent: "bd-a3f8",
240
+ deps: ["bd-a3f8.1", "bd-a3f8.2"],
241
+ desc: "Login, logout, refresh endpoints",
242
+ tags: ["backend", "api", "M"],
243
+ });
244
+ // Returns: { id: "bd-a3f8.3" }
245
+
246
+ // Task 4: Depends on Task 3 (different domain - can be parallel agent)
247
+ const task4 = bd_add({
248
+ title: "Frontend auth flow",
249
+ type: "task",
250
+ pri: 2,
251
+ parent: "bd-a3f8",
252
+ deps: ["bd-a3f8.3"],
253
+ desc: "Login page, protected routes, auth context",
254
+ tags: ["frontend", "M"],
255
+ });
256
+ // Returns: { id: "bd-a3f8.4" }
257
+
258
+ // Task 5: Final task
259
+ const task5 = bd_add({
260
+ title: "Auth testing and docs",
261
+ type: "task",
262
+ pri: 3,
263
+ parent: "bd-a3f8",
264
+ deps: ["bd-a3f8.3", "bd-a3f8.4"],
265
+ desc: "E2E tests and API documentation",
266
+ tags: ["qa", "docs", "S"],
267
+ });
268
+ // Returns: { id: "bd-a3f8.5" }
113
269
  ```
114
270
 
115
- ## Phase 5: Create Spec
271
+ ### Step 4: Visualize Dependency Graph
116
272
 
117
- ```bash
118
- mkdir -p .beads/artifacts/<bead-id>
273
+ ```
274
+ DEPENDENCY GRAPH: bd-a3f8 "User Authentication"
275
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
276
+
277
+ bd-a3f8.1 [Database] ────┬────► bd-a3f8.2 [OAuth] ────┐
278
+ (ready) │ │ │
279
+ │ ▼ │
280
+ └────► bd-a3f8.3 [API] ◄─────┘
281
+
282
+ ┌────────────────┼────────────────┐
283
+ ▼ ▼
284
+ bd-a3f8.4 [Frontend] bd-a3f8.5 [Testing]
285
+ │ ▲
286
+ └─────────────────────────────────┘
287
+
288
+ READY NOW: bd-a3f8.1 (no blockers)
289
+ BLOCKED: bd-a3f8.2, bd-a3f8.3, bd-a3f8.4, bd-a3f8.5
119
290
  ```
120
291
 
121
- Use the PRD template from `.opencode/memory/_templates/prd.md` as the base structure.
122
-
123
- Write `.beads/artifacts/<bead-id>/spec.md`:
292
+ ## Phase 5: Create Spec for Epic
124
293
 
125
- ### Standard Spec (S/M complexity)
294
+ Write `.beads/artifacts/<epic-id>/spec.md`:
126
295
 
127
296
  ```markdown
128
- # [Title]
297
+ # [Feature Name]
129
298
 
130
- **Bead:** <bead-id>
299
+ **Epic:** <epic-id>
131
300
  **Created:** [date]
132
- **Status:** To Do
133
- **Estimate:** [S/M] (~[N] tool calls)
301
+ **Status:** In Progress
302
+ **Complexity:** XL (decomposed into [N] subtasks)
134
303
 
135
304
  ## Goal
136
305
 
137
306
  [1-2 sentences: What exactly are we building and why?]
138
307
 
139
- ## Scope
308
+ ## Subtasks
140
309
 
141
- **In-Scope:**
310
+ | ID | Title | Status | Depends On | Assignee |
311
+ | -------- | ----------------- | ------- | ---------- | -------- |
312
+ | <epic>.1 | Database schema | Ready | - | backend |
313
+ | <epic>.2 | OAuth integration | Blocked | .1 | backend |
314
+ | <epic>.3 | API endpoints | Blocked | .1, .2 | backend |
315
+ | <epic>.4 | Frontend flow | Blocked | .3 | frontend |
316
+ | <epic>.5 | Testing & docs | Blocked | .3, .4 | qa |
142
317
 
143
- - [What we ARE doing]
318
+ ## Parallel Execution
144
319
 
145
- **Out-of-Scope:**
320
+ Agents can work in parallel on:
146
321
 
147
- - [What we are NOT doing]
322
+ - **After .1 completes:** .2 can start
323
+ - **After .3 completes:** .4 and .5 can start in parallel
148
324
 
149
325
  ## Success Criteria
150
326
 
151
- - [ ] [Criterion 1]
152
- - Verify: `[actual command to test this]`
153
- - [ ] [Criterion 2]
154
- - Verify: `[actual command to test this]`
327
+ - [ ] All subtasks completed
328
+ - [ ] Integration tests passing
329
+ - [ ] [Specific acceptance criterion]
330
+ - Verify: `[command]`
155
331
 
156
332
  ## Constraints
157
333
 
@@ -168,111 +344,170 @@ Write `.beads/artifacts/<bead-id>/spec.md`:
168
344
  [Additional context]
169
345
  ```
170
346
 
171
- ### Deep Spec (L/XL complexity)
347
+ ## Phase 6: Spec Quality Check
172
348
 
173
- Add these sections:
349
+ Before presenting, verify:
174
350
 
175
- ```markdown
176
- ## User Flow
351
+ - [ ] **Testable criteria?** Each success criterion has a verification command
352
+ - [ ] **Constraints explicit?** "Must" and "Never" rules documented
353
+ - [ ] **Dependencies correct?** Graph makes sense, no cycles
354
+ - [ ] **Scope clear?** In/Out boundaries defined
355
+ - [ ] **Parallel paths identified?** Agents can work concurrently
356
+
357
+ ## Phase 7: Review and Confirm
177
358
 
178
- 1. [Step 1: What user sees/does]
179
- 2. [Step 2]
180
- 3. [Step 3]
359
+ Present the structure for approval:
181
360
 
182
- ## Dependencies
361
+ ```
362
+ CREATED: [Feature Name]
363
+ ━━━━━━━━━━━━━━━━━━━━━━━
364
+
365
+ Epic: bd-a3f8 "[Feature Name]"
366
+
367
+ Subtasks:
368
+ ├── bd-a3f8.1: Database schema [S] ← READY
369
+ ├── bd-a3f8.2: OAuth integration [M] ← blocked by .1
370
+ ├── bd-a3f8.3: API endpoints [M] ← blocked by .1, .2
371
+ ├── bd-a3f8.4: Frontend flow [M] ← blocked by .3
372
+ └── bd-a3f8.5: Testing & docs [S] ← blocked by .3, .4
183
373
 
184
- - `<bead-id>` - [what it provides]
185
- - [External dependency]
374
+ Parallel Tracks:
375
+ Backend agent: .1 → .2 → .3
376
+ • Frontend agent: .4 (after .3)
377
+ • QA agent: .5 (after .3, .4)
186
378
 
187
- ## Edge Cases
379
+ Spec: .beads/artifacts/bd-a3f8/spec.md
188
380
 
189
- - [Edge case 1] → [expected behavior]
190
- - [Edge case 2] → [expected behavior]
381
+ Quality check:
382
+ Testable criteria
383
+ ✓ Dependencies valid
384
+ ✓ Parallel paths identified
191
385
 
192
- ## Open Questions
386
+ Approve? (yes/modify)
387
+ ```
193
388
 
194
- - [Question for research phase]
195
- - [Uncertainty to resolve]
389
+ **STOP and wait for human response.**
196
390
 
197
- ## Technical Approach
391
+ ## Phase 8: Sync & Report
198
392
 
199
- [To be filled during /research phase]
393
+ ```typescript
394
+ bd_sync({ reason: "Created epic $ARGUMENTS with subtasks" });
200
395
  ```
201
396
 
202
- ## Phase 6: Spec Quality Check
397
+ ### Next Steps by Structure
203
398
 
204
- Before presenting, verify:
399
+ **Single Bead (Simple):**
205
400
 
206
- - [ ] **Testable criteria?** Each success criterion has a verification command
207
- - [ ] **Constraints explicit?** "Must" and "Never" rules documented
208
- - [ ] **Edge cases identified?** (for L/XL complexity)
209
- - [ ] **Scope clear?** In/Out boundaries defined
210
- - [ ] **Estimate realistic?** Based on similar past work
401
+ ```
402
+ Next: /implement <bead-id>
403
+ ```
211
404
 
212
- Fix any gaps before proceeding.
405
+ **Epic with Subtasks (Complex):**
213
406
 
214
- ## Phase 7: Review Spec
407
+ ```
408
+ Ready to start: bd-a3f8.1 (first unblocked task)
215
409
 
216
- Present the spec for approval:
410
+ Next steps:
411
+ ├── /implement bd-a3f8.1 (start first task)
412
+ ├── bd ready (see all ready work)
413
+ └── bd_blocked() (see blocked tasks)
217
414
 
415
+ For parallel agents:
416
+ ├── Agent 1: /implement bd-a3f8.1
417
+ ├── Agent 2: (wait for .1, then .2)
418
+ └── Agent 3: (wait for .3, then .4)
218
419
  ```
219
- Spec Preview:
220
- ━━━━━━━━━━━━━
221
420
 
222
- [Show full spec.md content]
421
+ ## Templates
223
422
 
224
- ━━━━━━━━━━━━━
225
- Quality check:
226
- ✓ Testable criteria
227
- ✓ Constraints explicit
228
- ✓ Scope clear
229
- [✓/⚠] Edge cases (if L/XL)
423
+ ### Standard Spec (Simple Tasks)
230
424
 
231
- Approve spec? (yes/modify)
232
- ```
425
+ ```markdown
426
+ # [Title]
233
427
 
234
- **STOP and wait for human response.**
428
+ **Bead:** <bead-id>
429
+ **Created:** [date]
430
+ **Status:** To Do
431
+ **Estimate:** [S/M] (~[N] tool calls)
235
432
 
236
- If "modify": Iterate on spec based on feedback until approved.
237
- If "yes": Proceed to sync and report.
433
+ ## Goal
238
434
 
239
- ## Phase 8: Sync & Report
435
+ [1-2 sentences: What exactly are we building and why?]
240
436
 
241
- ```typescript
242
- bd_release({ _: true });
243
- bd_sync({ reason: "Created task $ARGUMENTS" });
244
- ```
437
+ ## Scope
245
438
 
246
- ```
247
- Created: <bead-id>
248
- ━━━━━━━━━━━━━━━━━
439
+ **In-Scope:**
249
440
 
250
- Title: [title]
251
- Type: [type]
252
- Estimate: [S/M/L/XL] (~[N] tool calls)
441
+ - [What we ARE doing]
253
442
 
254
- Spec: .beads/artifacts/<bead-id>/spec.md
255
- ```
443
+ **Out-of-Scope:**
256
444
 
257
- ### Next Steps by Complexity
445
+ - [What we are NOT doing]
258
446
 
259
- **S/M complexity:**
447
+ ## Success Criteria
260
448
 
261
- ```
262
- Next: /implement <bead-id>
263
- ```
449
+ - [ ] [Criterion 1]
450
+ - Verify: `[actual command to test this]`
451
+ - [ ] [Criterion 2]
452
+ - Verify: `[actual command to test this]`
264
453
 
265
- **L complexity:**
454
+ ## Constraints
266
455
 
267
- ```
268
- Next: /research <bead-id>
269
- ```
456
+ **Must:**
270
457
 
271
- **XL complexity:**
458
+ - [Required constraint]
459
+
460
+ **Never:**
272
461
 
462
+ - [Anti-pattern or forbidden action]
463
+
464
+ ## Notes
465
+
466
+ [Additional context]
273
467
  ```
274
- This task is too large. Break it down:
275
- /create "[subtask 1]" # Then link as dependency
276
- /create "[subtask 2]"
277
- /create "[subtask 3]"
468
+
469
+ ## When to Decompose
470
+
471
+ | Scenario | Action |
472
+ | -------------------------- | ------------------------------------ |
473
+ | Bug fix | Single bead |
474
+ | Config change | Single bead |
475
+ | Small feature (1 file) | Single bead |
476
+ | Feature touching 2-3 files | Single bead with phases in plan |
477
+ | Feature crossing FE/BE | Epic + subtasks by domain |
478
+ | New system/service | Epic + subtasks by component |
479
+ | Refactor multiple areas | Epic + subtasks by area |
480
+ | Integration work | Epic + subtasks by integration point |
481
+
482
+ ## Anti-Patterns
483
+
484
+ ❌ **One Giant Bead**
485
+ Creating a single bead for "Implement entire auth system" - agents lose context, can't parallelize.
486
+
487
+ ❌ **Too Many Tiny Beads**
488
+ Creating 20 beads for a simple feature - overhead exceeds value.
489
+
490
+ ❌ **No Dependencies**
491
+ Creating subtasks without linking dependencies - agents don't know execution order.
492
+
493
+ ❌ **Missing Domain Tags**
494
+ Not tagging with `frontend`/`backend`/`qa` - can't route to specialized agents.
495
+
496
+ ## Integration with Parallel Agents
497
+
498
+ When epic is created with proper dependencies:
499
+
500
+ ```typescript
501
+ // Agent 1 claims ready work
502
+ bd_init({ team: "project", role: "backend" });
503
+ bd_claim(); // Gets bd-a3f8.1 (first ready task)
504
+
505
+ // Agent 1 completes, Agent 2 can now start
506
+ bd_done({ id: "bd-a3f8.1", msg: "Schema created" });
507
+
508
+ // Agent 2 claims next ready work
509
+ bd_claim(); // Gets bd-a3f8.2 (now unblocked)
510
+
511
+ // After bd-a3f8.3 completes, both .4 and .5 become ready
512
+ // Multiple agents can work on them in parallel
278
513
  ```
@@ -7,6 +7,12 @@ model: proxypal/gemini-3-pro-preview
7
7
 
8
8
  # Design Audit: $ARGUMENTS
9
9
 
10
+ ## Load Beads Skill
11
+
12
+ ```typescript
13
+ skill({ name: "beads" });
14
+ ```
15
+
10
16
  ## Phase 1: Source Detection & File Discovery
11
17
 
12
18
  Parse `$ARGUMENTS`:
@@ -6,6 +6,12 @@ agent: vision
6
6
 
7
7
  # Design: $ARGUMENTS
8
8
 
9
+ ## Load Beads Skill
10
+
11
+ ```typescript
12
+ skill({ name: "beads" });
13
+ ```
14
+
9
15
  ## Phase 1: Context Discovery
10
16
 
11
17
  Parse `$ARGUMENTS` to determine design task:
@@ -9,6 +9,7 @@ agent: build
9
9
  **Load skills:**
10
10
 
11
11
  ```typescript
12
+ skill({ name: "beads" }); // Session protocol
12
13
  skill({ name: "verification-before-completion" });
13
14
  skill({ name: "finishing-a-development-branch" });
14
15
  ```
@@ -11,6 +11,7 @@ agent: build
11
11
  **Load skills:**
12
12
 
13
13
  ```typescript
14
+ skill({ name: "beads" }); // Session protocol
14
15
  skill({ name: "systematic-debugging" });
15
16
  skill({ name: "root-cause-tracing" });
16
17
  ```
@@ -6,6 +6,12 @@ agent: build
6
6
 
7
7
  # Fix Type Errors
8
8
 
9
+ ## Load Beads Skill
10
+
11
+ ```typescript
12
+ skill({ name: "beads" });
13
+ ```
14
+
9
15
  ## Options
10
16
 
11
17
  - `--strict`: Also fix warnings and enable stricter checks