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.
Files changed (32) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/template/.opencode/AGENTS.md +40 -417
  3. package/dist/template/.opencode/agent/build.md +53 -0
  4. package/dist/template/.opencode/agent/planner.md +0 -1
  5. package/dist/template/.opencode/agent/rush.md +38 -0
  6. package/dist/template/.opencode/command/accessibility-check.md +1 -1
  7. package/dist/template/.opencode/command/commit.md +1 -1
  8. package/dist/template/.opencode/command/create.md +68 -441
  9. package/dist/template/.opencode/command/finish.md +82 -252
  10. package/dist/template/.opencode/command/fix-ci.md +52 -247
  11. package/dist/template/.opencode/command/fix-types.md +32 -292
  12. package/dist/template/.opencode/command/fix-ui.md +49 -234
  13. package/dist/template/.opencode/command/fix.md +57 -194
  14. package/dist/template/.opencode/command/handoff.md +66 -243
  15. package/dist/template/.opencode/command/implement.md +67 -231
  16. package/dist/template/.opencode/command/issue.md +42 -190
  17. package/dist/template/.opencode/command/plan.md +86 -442
  18. package/dist/template/.opencode/command/pr.md +3 -1
  19. package/dist/template/.opencode/command/research-and-implement.md +69 -370
  20. package/dist/template/.opencode/command/research.md +72 -197
  21. package/dist/template/.opencode/command/resume.md +70 -438
  22. package/dist/template/.opencode/command/status.md +11 -11
  23. package/dist/template/.opencode/command/triage.md +23 -18
  24. package/dist/template/.opencode/memory/project/commands.md +139 -7
  25. package/dist/template/.opencode/memory/project/gotchas.md +85 -0
  26. package/dist/template/.opencode/plugin/beads.ts +181 -16
  27. package/dist/template/.opencode/skill/beads/SKILL.md +15 -0
  28. package/dist/template/.opencode/skill/context-engineering/SKILL.md +94 -0
  29. package/dist/template/.opencode/skill/memory-system/SKILL.md +107 -0
  30. package/dist/template/.opencode/skill/session-management/SKILL.md +111 -0
  31. package/dist/template/.opencode/skill/tool-priority/SKILL.md +115 -0
  32. package/package.json +1 -1
@@ -1,513 +1,140 @@
1
1
  ---
2
- description: Create bead(s) with automatic complexity analysis and decomposition
3
- argument-hint: "[optional title]"
2
+ description: Create a tracked task with spec
3
+ argument-hint: "[title or description]"
4
4
  agent: build
5
5
  ---
6
6
 
7
- # Create Task
7
+ # Create: $ARGUMENTS
8
8
 
9
- ## Load Beads Skill
9
+ You're creating a new tracked task. Keep it simple unless complexity demands otherwise.
10
10
 
11
- ```typescript
12
- skill({ name: "beads" });
13
- ```
14
-
15
- This skill provides the full beads workflow including Epic → Task → Subtask hierarchy.
16
-
17
- ## Phase 1: Check for Similar Work
18
-
19
- Before creating, search for existing or past work:
20
-
21
- ```typescript
22
- memory_search({ query: "[keywords from title/problem]", type: "observations" });
23
- bd_ls({ status: "all", limit: 20, offset: 0 });
24
- ```
25
-
26
- If similar task exists:
27
-
28
- - Link as dependency, or
29
- - Extend existing task, or
30
- - Confirm this is intentionally separate
31
-
32
- ## Phase 2: Interview
33
-
34
- **If title provided:** Use `$ARGUMENTS` as starting point.
35
-
36
- **If no title:** Ask in one message:
37
-
38
- 1. "What problem are we solving?"
39
- 2. "Bug, feature, or task?"
40
- 3. "What's the acceptance criteria?"
41
- 4. "Any constraints or 'never do X' rules?"
42
- 5. "Related existing code or past work?"
43
-
44
- Keep it brief. Get: clear goal, success criteria, scope, constraints.
45
-
46
- ## Phase 3: Complexity Analysis
47
-
48
- Analyze the request to determine if it should be a single bead or decomposed:
49
-
50
- ### Complexity Signals
51
-
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
- ```
62
-
63
- ### Automatic Classification
64
-
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
- ```
96
-
97
- ### Decision Point
98
-
99
- ```
100
- COMPLEXITY ANALYSIS
101
- ━━━━━━━━━━━━━━━━━━━
102
-
103
- Request: "[user's request]"
104
-
105
- Signals detected:
106
- ✓ Multiple domains (frontend + backend)
107
- ✓ Multi-phase work (setup → implement → test)
108
- ✓ Integration required
11
+ ## Check For Duplicates First
109
12
 
110
- Classification: COMPLEX
111
-
112
- Recommendation: Create Epic with 3-4 subtasks
113
-
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): _
13
+ ```bash
14
+ bd list --status=all | grep -i "[keywords]"
120
15
  ```
121
16
 
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
134
-
135
- ```typescript
136
- bd_add({
137
- title: "[title]",
138
- type: "[type]",
139
- pri: [priority],
140
- desc: "[description]",
141
- tags: ["[role]", "[estimate]"],
142
- });
143
- ```
144
-
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)
17
+ If similar work exists, link to it or extend it instead of creating duplicate.
152
18
 
153
- If COMPLEX and user confirms decomposition:
19
+ ## Gather Requirements
154
20
 
155
- ### Step 1: Identify Natural Breakdown
21
+ If `$ARGUMENTS` is clear, use it directly. If vague, ask:
156
22
 
157
- ```
158
- DECOMPOSITION ANALYSIS
159
- ━━━━━━━━━━━━━━━━━━━━━━
160
-
161
- Request: "Add user authentication with OAuth"
23
+ 1. What problem are we solving?
24
+ 2. Bug, feature, or task?
25
+ 3. What's the acceptance criteria?
26
+ 4. Any constraints?
162
27
 
163
- Natural breakdown:
28
+ Keep it brief. Don't over-engineer the interview.
164
29
 
165
- 1. Database & Schema [Backend]
166
- - User table, sessions table
167
- - Can start immediately
30
+ ## Assess Complexity
168
31
 
169
- 2. OAuth Provider Integration [Backend]
170
- - Google, GitHub providers
171
- - Depends on: #1
32
+ **Simple** (single bead): One file, one clear action, ~30 min or less
33
+ **Complex** (needs decomposition): Multiple domains, natural phases, hours of work
172
34
 
173
- 3. Auth API Endpoints [Backend]
174
- - Login, logout, refresh
175
- - Depends on: #1, #2
35
+ If complex, ask: "This looks like it needs decomposition. Create an epic with subtasks?"
176
36
 
177
- 4. Frontend Auth Flow [Frontend]
178
- - Login page, protected routes
179
- - Depends on: #3
37
+ ## Create The Bead
180
38
 
181
- 5. Testing & Documentation [QA]
182
- - E2E tests, API docs
183
- - Depends on: #3, #4
39
+ Simple task:
184
40
 
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)
41
+ ```bash
42
+ bd create "[title]" -t task -p 2
191
43
  ```
192
44
 
193
- **STOP and wait for user confirmation.**
194
-
195
- ### Step 2: Create Epic
45
+ Bug:
196
46
 
197
- ```typescript
198
- const epic = bd_add({
199
- title: "[Feature Name]",
200
- type: "epic",
201
- pri: [priority],
202
- desc: "[Overview of the feature]",
203
- tags: ["epic", "[domain]"],
204
- });
205
- // Returns: { id: "bd-a3f8" }
47
+ ```bash
48
+ bd create "[title]" -t bug -p 1
206
49
  ```
207
50
 
208
- ### Step 3: Create Child Tasks with Dependencies
51
+ Feature:
209
52
 
210
- ```typescript
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" }
53
+ ```bash
54
+ bd create "[title]" -t feature -p 2
269
55
  ```
270
56
 
271
- ### Step 4: Visualize Dependency Graph
57
+ Epic (if decomposing):
272
58
 
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
59
+ ```bash
60
+ bd create "[title]" -t epic -p 1
290
61
  ```
291
62
 
292
- ## Phase 5: Create Spec for Epic
63
+ ## Create Spec
293
64
 
294
- Write `.beads/artifacts/<epic-id>/spec.md`:
65
+ Write `.beads/artifacts/<bead-id>/spec.md`:
295
66
 
296
67
  ```markdown
297
- # [Feature Name]
68
+ # [Title]
298
69
 
299
- **Epic:** <epic-id>
70
+ **Bead:** <bead-id>
300
71
  **Created:** [date]
301
- **Status:** In Progress
302
- **Complexity:** XL (decomposed into [N] subtasks)
303
72
 
304
73
  ## Goal
305
74
 
306
- [1-2 sentences: What exactly are we building and why?]
307
-
308
- ## Subtasks
309
-
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 |
317
-
318
- ## Parallel Execution
319
-
320
- Agents can work in parallel on:
321
-
322
- - **After .1 completes:** .2 can start
323
- - **After .3 completes:** .4 and .5 can start in parallel
75
+ [1-2 sentences: What and why]
324
76
 
325
77
  ## Success Criteria
326
78
 
327
- - [ ] All subtasks completed
328
- - [ ] Integration tests passing
329
- - [ ] [Specific acceptance criterion]
79
+ - [ ] [Criterion 1]
80
+ - Verify: `[command]`
81
+ - [ ] [Criterion 2]
330
82
  - Verify: `[command]`
331
83
 
332
84
  ## Constraints
333
85
 
334
- **Must:**
335
-
336
- - [Required constraint]
337
-
338
- **Never:**
339
-
340
- - [Anti-pattern or forbidden action]
86
+ **Must:** [required]
87
+ **Never:** [forbidden]
341
88
 
342
89
  ## Notes
343
90
 
344
- [Additional context]
91
+ [context if needed]
345
92
  ```
346
93
 
347
- ## Phase 6: Spec Quality Check
348
-
349
- Before presenting, verify:
350
-
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
94
+ ## If Epic: Create Subtasks
358
95
 
359
- Present the structure for approval:
96
+ ```bash
97
+ # First task (no blockers)
98
+ bd create "[subtask 1]" -t task -p 2
360
99
 
100
+ # Second task (blocked by first)
101
+ bd create "[subtask 2]" -t task -p 2
102
+ bd dep add bd-[second] bd-[first] --type blocks
361
103
  ```
362
- CREATED: [Feature Name]
363
- ━━━━━━━━━━━━━━━━━━━━━━━
364
104
 
365
- Epic: bd-a3f8 "[Feature Name]"
105
+ Visualize:
366
106
 
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
373
-
374
- Parallel Tracks:
375
- • Backend agent: .1 → .2 → .3
376
- • Frontend agent: .4 (after .3)
377
- • QA agent: .5 (after .3, .4)
378
-
379
- Spec: .beads/artifacts/bd-a3f8/spec.md
380
-
381
- Quality check:
382
- ✓ Testable criteria
383
- ✓ Dependencies valid
384
- ✓ Parallel paths identified
385
-
386
- Approve? (yes/modify)
107
+ ```bash
108
+ bd dep tree bd-[epic]
387
109
  ```
388
110
 
389
- **STOP and wait for human response.**
390
-
391
- ## Phase 8: Sync & Report
111
+ ## Sync
392
112
 
393
113
  ```typescript
394
- bd_sync({ reason: "Created epic $ARGUMENTS with subtasks" });
395
- ```
396
-
397
- ### Next Steps by Structure
398
-
399
- **Single Bead (Simple):**
400
-
401
- ```
402
- Next: /implement <bead-id>
114
+ bd_sync({ reason: "Sync new bead" });
403
115
  ```
404
116
 
405
- **Epic with Subtasks (Complex):**
117
+ ## Output
406
118
 
407
119
  ```
408
- Ready to start: bd-a3f8.1 (first unblocked task)
120
+ Created: bd-[id]
409
121
 
410
- Next steps:
411
- ├── /implement bd-a3f8.1 (start first task)
412
- ├── bd ready (see all ready work)
413
- └── bd_blocked() (see blocked tasks)
122
+ Type: [task/bug/feature/epic]
123
+ Priority: [0-4]
124
+ Spec: .beads/artifacts/bd-[id]/spec.md
414
125
 
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)
126
+ Next: /implement bd-[id]
419
127
  ```
420
128
 
421
- ## Templates
422
-
423
- ### Standard Spec (Simple Tasks)
424
-
425
- ```markdown
426
- # [Title]
427
-
428
- **Bead:** <bead-id>
429
- **Created:** [date]
430
- **Status:** To Do
431
- **Estimate:** [S/M] (~[N] tool calls)
432
-
433
- ## Goal
434
-
435
- [1-2 sentences: What exactly are we building and why?]
436
-
437
- ## Scope
129
+ If epic with subtasks:
438
130
 
439
- **In-Scope:**
440
-
441
- - [What we ARE doing]
442
-
443
- **Out-of-Scope:**
444
-
445
- - [What we are NOT doing]
446
-
447
- ## Success Criteria
448
-
449
- - [ ] [Criterion 1]
450
- - Verify: `[actual command to test this]`
451
- - [ ] [Criterion 2]
452
- - Verify: `[actual command to test this]`
453
-
454
- ## Constraints
455
-
456
- **Must:**
457
-
458
- - [Required constraint]
459
-
460
- **Never:**
461
-
462
- - [Anti-pattern or forbidden action]
463
-
464
- ## Notes
465
-
466
- [Additional context]
467
131
  ```
132
+ Created: bd-[epic] (Epic)
468
133
 
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)
134
+ Subtasks:
135
+ ├── bd-[epic].1: [title] ← READY
136
+ ├── bd-[epic].2: [title] ← blocked by .1
137
+ └── bd-[epic].3: [title] blocked by .2
510
138
 
511
- // After bd-a3f8.3 completes, both .4 and .5 become ready
512
- // Multiple agents can work on them in parallel
139
+ Next: /implement bd-[epic].1
513
140
  ```