opencodekit 0.10.0 → 0.11.1

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 (47) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/template/.opencode/agent/planner.md +3 -2
  3. package/dist/template/.opencode/command/accessibility-check.md +297 -30
  4. package/dist/template/.opencode/command/analyze-mockup.md +412 -20
  5. package/dist/template/.opencode/command/analyze-project.md +445 -30
  6. package/dist/template/.opencode/command/brainstorm.md +294 -5
  7. package/dist/template/.opencode/command/commit.md +231 -17
  8. package/dist/template/.opencode/command/create.md +415 -77
  9. package/dist/template/.opencode/command/design-audit.md +483 -29
  10. package/dist/template/.opencode/command/design.md +615 -6
  11. package/dist/template/.opencode/command/edit-image.md +223 -20
  12. package/dist/template/.opencode/command/finish.md +163 -71
  13. package/dist/template/.opencode/command/fix-ci.md +297 -24
  14. package/dist/template/.opencode/command/fix-types.md +351 -13
  15. package/dist/template/.opencode/command/fix-ui.md +299 -13
  16. package/dist/template/.opencode/command/fix.md +262 -9
  17. package/dist/template/.opencode/command/generate-diagram.md +327 -26
  18. package/dist/template/.opencode/command/generate-icon.md +266 -22
  19. package/dist/template/.opencode/command/generate-image.md +232 -12
  20. package/dist/template/.opencode/command/generate-pattern.md +234 -20
  21. package/dist/template/.opencode/command/generate-storyboard.md +231 -21
  22. package/dist/template/.opencode/command/handoff.md +208 -31
  23. package/dist/template/.opencode/command/implement.md +163 -50
  24. package/dist/template/.opencode/command/import-plan.md +253 -52
  25. package/dist/template/.opencode/command/init.md +154 -35
  26. package/dist/template/.opencode/command/integration-test.md +410 -24
  27. package/dist/template/.opencode/command/issue.md +177 -21
  28. package/dist/template/.opencode/command/new-feature.md +390 -54
  29. package/dist/template/.opencode/command/plan.md +394 -107
  30. package/dist/template/.opencode/command/pr.md +235 -29
  31. package/dist/template/.opencode/command/quick-build.md +234 -5
  32. package/dist/template/.opencode/command/research-and-implement.md +442 -12
  33. package/dist/template/.opencode/command/research-ui.md +444 -34
  34. package/dist/template/.opencode/command/research.md +179 -45
  35. package/dist/template/.opencode/command/restore-image.md +416 -22
  36. package/dist/template/.opencode/command/resume.md +447 -63
  37. package/dist/template/.opencode/command/revert-feature.md +347 -65
  38. package/dist/template/.opencode/command/review-codebase.md +199 -4
  39. package/dist/template/.opencode/command/skill-create.md +506 -14
  40. package/dist/template/.opencode/command/skill-optimize.md +487 -16
  41. package/dist/template/.opencode/command/status.md +326 -60
  42. package/dist/template/.opencode/command/summarize.md +374 -33
  43. package/dist/template/.opencode/command/triage.md +361 -0
  44. package/dist/template/.opencode/command/ui-review.md +296 -25
  45. package/dist/template/.opencode/skill/beads/SKILL.md +108 -3
  46. package/dist/template/.opencode/skill/playwriter/SKILL.md +148 -0
  47. package/package.json +1 -1
@@ -1,137 +1,473 @@
1
1
  ---
2
- description: Create a new feature with bead, spec, and plan
3
- argument-hint: "<feature-name> [--priority=high|medium|low] [--type=feature|bug|refactor]"
2
+ description: Create a new feature with discovery, spec, plan, and sub-tasks
3
+ argument-hint: "<feature-name> [--priority=<0-4>] [--type=<type>] [--branch] [--quick]"
4
4
  agent: planner
5
5
  model: proxypal/gemini-3-flash-preview
6
6
  ---
7
7
 
8
8
  # New Feature: $ARGUMENTS
9
9
 
10
+ Create a complete feature track with discovery, specification, implementation plan, and sub-tasks.
11
+
12
+ ## Load Beads Skill
13
+
14
+ ```typescript
15
+ skill({ name: "beads" });
16
+ ```
17
+
18
+ This skill provides Epic → Task → Subtask hierarchy for complex features.
19
+
20
+ ## Parse Arguments
21
+
22
+ | Argument | Default | Options |
23
+ | ------------ | -------- | ------------------------------------ |
24
+ | Feature name | required | Descriptive name |
25
+ | `--priority` | 2 | 0 (critical) to 4 (backlog) |
26
+ | `--type` | feature | feature, bug, refactor, chore |
27
+ | `--branch` | false | Create git branch |
28
+ | `--quick` | false | Skip brainstorming, use minimal spec |
29
+
30
+ ---
31
+
32
+ ## Phase 1: Context Gathering
33
+
34
+ Before creating anything, understand the landscape:
35
+
36
+ ```bash
37
+ # Check for related existing work
38
+ bd_ls({ status: "all", limit: 20, offset: 0 })
39
+
40
+ # Analyze codebase structure
41
+ glob pattern="src/**/*.{ts,tsx,py}"
42
+ lsp_workspace_symbols({ query: "[relevant-terms]" })
43
+
44
+ # Check recent changes in related areas
45
+ git log --oneline -10 -- src/[relevant-path]/
46
+ ```
47
+
48
+ **Report:**
49
+
50
+ ```
51
+ Context Analysis
52
+ ━━━━━━━━━━━━━━━━
53
+
54
+ Related beads found:
55
+ - bd-abc123: "User auth system" (closed)
56
+ - bd-def456: "Session management" (in_progress)
57
+
58
+ Relevant code areas:
59
+ - src/auth/ (12 files)
60
+ - src/api/users/ (5 files)
61
+
62
+ Recent changes:
63
+ - 3 commits in last week to src/auth/
64
+ ```
65
+
66
+ ---
67
+
68
+ ## Phase 2: Brainstorming (unless --quick)
69
+
10
70
  **Load skill:** `skill({ name: "brainstorming" })`
11
71
 
12
- Create a complete feature track with bead, specification, and implementation plan.
72
+ Before filling templates, explore the problem space:
73
+
74
+ ### Discovery Questions
75
+
76
+ Ask the user (or infer from context):
77
+
78
+ 1. **Problem**: What specific problem are we solving?
79
+ 2. **Users**: Who benefits from this feature?
80
+ 3. **Success**: How will we know it's working?
81
+ 4. **Alternatives**: What other approaches exist?
82
+ 5. **Risks**: What could go wrong?
83
+ 6. **Dependencies**: What does this need to work?
84
+ 7. **Scope**: What's explicitly NOT included?
85
+
86
+ ### Exploration
87
+
88
+ ```
89
+ Brainstorming: [Feature Name]
90
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
91
+
92
+ Problem understood:
93
+ [Summarize the core problem]
94
+
95
+ Considered approaches:
96
+ 1. [Approach A] - Pros: [...] Cons: [...]
97
+ 2. [Approach B] - Pros: [...] Cons: [...]
98
+ 3. [Approach C] - Pros: [...] Cons: [...]
99
+
100
+ Recommended approach: [X]
101
+ Rationale: [Why this approach]
13
102
 
14
- ## Instructions
103
+ Key risks identified:
104
+ - [Risk 1]: Mitigation: [...]
105
+ - [Risk 2]: Mitigation: [...]
15
106
 
16
- Parse from `$ARGUMENTS`:
107
+ Proceed with spec? (yes/modify/explore-more)
108
+ ```
17
109
 
18
- - Feature name (required)
19
- - Priority (default: medium)
20
- - Type (default: feature)
110
+ **STOP and wait for approval** before proceeding.
21
111
 
22
- ## Workflow
112
+ ---
23
113
 
24
- ### Step 1: Create Bead
114
+ ## Phase 3: Create Epic Bead
25
115
 
26
116
  ```typescript
27
- bd_add({ title: "[feature-name]", type: "[type]", pri: [priority] });
117
+ bd_add({
118
+ title: "[Feature Name]",
119
+ type: "epic",
120
+ pri: [priority],
121
+ desc: "[Brief description from brainstorming]",
122
+ tags: ["feature", ...inferred_tags],
123
+ });
28
124
  ```
29
125
 
30
- Capture the bead ID from output.
126
+ Capture the bead ID for artifact creation.
127
+
128
+ ---
31
129
 
32
- ### Step 2: Create Specification
130
+ ## Phase 4: Create Specification
33
131
 
34
- Create `.beads/[bead-id]/spec.md`:
132
+ Create `.beads/artifacts/[bead-id]/spec.md`:
35
133
 
36
134
  ```markdown
37
135
  # [Feature Name] Specification
38
136
 
39
137
  ## Overview
40
138
 
41
- [Brief description of the feature]
139
+ [1-2 paragraph summary of the feature]
42
140
 
43
141
  ## Problem Statement
44
142
 
45
- [What problem does this solve?]
143
+ **Current state:** [What exists now / what's broken]
144
+ **Desired state:** [What we want to achieve]
145
+ **Gap:** [The specific problem to solve]
46
146
 
47
147
  ## User Stories
48
148
 
49
- - As a [user], I want [goal], so that [benefit]
149
+ - As a [user type], I want [goal], so that [benefit]
150
+ - As a [user type], I want [goal], so that [benefit]
50
151
 
51
152
  ## Acceptance Criteria
52
153
 
154
+ Must-have (P0):
155
+
53
156
  - [ ] [Criterion 1]
54
157
  - [ ] [Criterion 2]
158
+
159
+ Should-have (P1):
160
+
55
161
  - [ ] [Criterion 3]
56
162
 
57
- ## Technical Considerations
163
+ Nice-to-have (P2):
164
+
165
+ - [ ] [Criterion 4]
166
+
167
+ ## Technical Design
168
+
169
+ ### Approach
170
+
171
+ [Chosen approach from brainstorming]
172
+
173
+ ### Architecture Changes
58
174
 
59
- - [Consideration 1]
60
- - [Consideration 2]
175
+ - [Component 1]: [Change description]
176
+ - [Component 2]: [Change description]
177
+
178
+ ### API Changes
179
+
180
+ | Endpoint | Method | Description |
181
+ | -------- | ------ | -------------- |
182
+ | /api/... | POST | [What it does] |
183
+
184
+ ### Database Changes
185
+
186
+ - [ ] New table: [table_name]
187
+ - [ ] New column: [table.column]
188
+ - [ ] Migration needed: [yes/no]
189
+
190
+ ### Dependencies
191
+
192
+ - External: [APIs, services]
193
+ - Internal: [Other features, beads]
194
+
195
+ ## Estimation
196
+
197
+ | Size | Effort | Confidence |
198
+ | ---------- | ----------- | ----------------- |
199
+ | [S/M/L/XL] | [X-Y hours] | [High/Medium/Low] |
200
+
201
+ Breakdown:
202
+
203
+ - Design: [X hours]
204
+ - Implementation: [X hours]
205
+ - Testing: [X hours]
206
+ - Documentation: [X hours]
207
+
208
+ ## Risks
209
+
210
+ | Risk | Likelihood | Impact | Mitigation |
211
+ | -------- | ---------- | ------ | ----------------------- |
212
+ | [Risk 1] | Medium | High | [How to prevent/handle] |
213
+ | [Risk 2] | Low | Medium | [How to prevent/handle] |
61
214
 
62
215
  ## Out of Scope
63
216
 
64
- - [What we're NOT doing]
217
+ Explicitly NOT included in this feature:
218
+
219
+ - [Thing 1]
220
+ - [Thing 2]
221
+
222
+ ## Success Metrics
223
+
224
+ How we'll measure success:
225
+
226
+ - [ ] [Metric 1]: [Target]
227
+ - [ ] [Metric 2]: [Target]
65
228
 
66
- ## Dependencies
229
+ ## Open Questions
67
230
 
68
- - [Other features/systems this depends on]
231
+ - [ ] [Question that needs answering]
232
+ - [ ] [Question that needs answering]
69
233
  ```
70
234
 
71
- ### Step 3: Create Plan
235
+ ---
236
+
237
+ ## Phase 5: Validate Specification
238
+
239
+ Before proceeding to plan, validate spec completeness:
240
+
241
+ ```
242
+ Spec Validation
243
+ ━━━━━━━━━━━━━━━
244
+
245
+ ✓ Problem statement clear
246
+ ✓ User stories defined
247
+ ✓ Acceptance criteria measurable
248
+ ⚠ Technical design incomplete - missing API details
249
+ ✓ Estimation provided
250
+ ✓ Risks identified
251
+ ⚠ Open questions remain (2 items)
252
+
253
+ Validation: PASS with warnings
254
+
255
+ Proceed to plan? (yes/fix-warnings/cancel)
256
+ ```
257
+
258
+ ---
259
+
260
+ ## Phase 6: Create Implementation Plan
72
261
 
73
- Create `.beads/[bead-id]/plan.md`:
262
+ Create `.beads/artifacts/[bead-id]/plan.md`:
74
263
 
75
264
  ```markdown
76
265
  # [Feature Name] Implementation Plan
77
266
 
78
- ## Phases
267
+ ## Overview
268
+
269
+ **Epic:** [bead-id]
270
+ **Estimated effort:** [X-Y hours]
271
+ **Target completion:** [Date or sprint]
272
+
273
+ ## Phase 1: Foundation [S]
274
+
275
+ **Estimate:** 2-4 hours
276
+ **Assignee:** [role or @mention]
79
277
 
80
- ### Phase 1: [Name]
278
+ Tasks:
279
+
280
+ 1. [ ] Set up database schema
281
+ 2. [ ] Create base API types
282
+
283
+ **Exit criteria:** Database migrated, types compile
284
+
285
+ ## Phase 2: Core Implementation [M]
286
+
287
+ **Estimate:** 4-8 hours
288
+ **Depends on:** Phase 1
289
+
290
+ Tasks:
291
+
292
+ 1. [ ] Implement [core feature]
293
+ 2. [ ] Add business logic
294
+ 3. [ ] Connect to existing systems
81
295
 
82
- **Estimate:** [X hours]
296
+ **Exit criteria:** Core functionality works in isolation
297
+
298
+ ## Phase 3: Integration [M]
299
+
300
+ **Estimate:** 4-8 hours
301
+ **Depends on:** Phase 2
83
302
 
84
303
  Tasks:
85
304
 
86
- 1. [ ] [Task 1]
87
- 2. [ ] [Task 2]
305
+ 1. [ ] Integrate with [system]
306
+ 2. [ ] Add error handling
307
+ 3. [ ] Implement edge cases
88
308
 
89
- ### Phase 2: [Name]
309
+ **Exit criteria:** Feature works end-to-end
90
310
 
91
- **Estimate:** [X hours]
311
+ ## Phase 4: Testing & Polish [S]
312
+
313
+ **Estimate:** 2-4 hours
314
+ **Depends on:** Phase 3
92
315
 
93
316
  Tasks:
94
317
 
95
- 1. [ ] [Task 1]
96
- 2. [ ] [Task 2]
318
+ 1. [ ] Write unit tests
319
+ 2. [ ] Write integration tests
320
+ 3. [ ] Manual testing
321
+ 4. [ ] Fix bugs found
322
+
323
+ **Exit criteria:** Tests pass, no critical bugs
97
324
 
98
325
  ## Testing Strategy
99
326
 
100
- - [ ] Unit tests for [what]
101
- - [ ] Integration tests for [what]
327
+ | Type | Coverage | Focus |
328
+ | ----------- | ------------- | -------------------- |
329
+ | Unit | Core logic | [specific modules] |
330
+ | Integration | API endpoints | [specific endpoints] |
331
+ | E2E | Critical path | [user flow] |
102
332
 
103
333
  ## Rollout Plan
104
334
 
105
- 1. [Step 1]
106
- 2. [Step 2]
335
+ 1. [ ] Deploy to staging
336
+ 2. [ ] QA verification
337
+ 3. [ ] Deploy to production (feature flag)
338
+ 4. [ ] Monitor metrics
339
+ 5. [ ] Gradual rollout (10% → 50% → 100%)
107
340
 
108
341
  ## Rollback Plan
109
342
 
110
- [How to revert if needed]
343
+ If issues detected:
344
+
345
+ 1. Disable feature flag
346
+ 2. Revert database migration (if applicable)
347
+ 3. Deploy previous version
348
+ 4. Investigate and fix
349
+
350
+ ## Definition of Done
351
+
352
+ - [ ] All acceptance criteria met
353
+ - [ ] Tests written and passing
354
+ - [ ] Code reviewed
355
+ - [ ] Documentation updated
356
+ - [ ] Feature flag configured
357
+ - [ ] Monitoring in place
111
358
  ```
112
359
 
113
- ### Step 4: Update Bead
360
+ ---
114
361
 
115
- Update bead status by adding a note via `bd_msg` or updating the spec.
362
+ ## Phase 7: Create Sub-Task Beads
116
363
 
117
- ## Output
364
+ Break phases into individual trackable beads:
118
365
 
119
- Report:
366
+ ```typescript
367
+ // Phase 1 tasks
368
+ bd_add({
369
+ title: "Set up database schema for [feature]",
370
+ type: "task",
371
+ pri: 2,
372
+ parent: "<epic-id>",
373
+ desc: "Phase 1 of [feature]. Create tables and migrations.",
374
+ tags: ["backend", "database"],
375
+ });
376
+
377
+ // Phase 2 tasks (with dependency)
378
+ bd_add({
379
+ title: "Implement [core feature]",
380
+ type: "task",
381
+ pri: 2,
382
+ parent: "<epic-id>",
383
+ deps: ["<phase-1-bead-id>"],
384
+ tags: ["backend"],
385
+ });
386
+
387
+ // Continue for all phases...
388
+ ```
120
389
 
121
- - Bead ID created
122
- - Spec file path
123
- - Plan file path
124
- - Next command to run: `/implement [bead-id]`
390
+ ---
125
391
 
126
- ## Follow-up Commands
392
+ ## Phase 8: Create Branch (if --branch)
127
393
 
128
394
  ```bash
129
- # View the feature
130
- bd_show({ id: "[bead-id]" })
395
+ # Create feature branch
396
+ git checkout -b feature/[feature-name]
397
+
398
+ # Or with bead ID
399
+ git checkout -b feature/[bead-id]-[feature-name]
400
+ ```
401
+
402
+ ---
131
403
 
132
- # Start implementation
133
- /implement [bead-id]
404
+ ## Output
405
+
406
+ ```
407
+ Feature Created: [Feature Name]
408
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
409
+
410
+ Epic: [bead-id]
411
+ Priority: P[X]
412
+ Estimated effort: [X-Y hours]
134
413
 
135
- # Check status
136
- /status [bead-id]
414
+ Artifacts:
415
+ ├── .beads/artifacts/[bead-id]/spec.md
416
+ └── .beads/artifacts/[bead-id]/plan.md
417
+
418
+ Sub-tasks created:
419
+ ├── [task-id-1]: Set up database schema [S]
420
+ ├── [task-id-2]: Implement core feature [M] → blocked by task-1
421
+ ├── [task-id-3]: Integration [M] → blocked by task-2
422
+ └── [task-id-4]: Testing & polish [S] → blocked by task-3
423
+
424
+ Branch: feature/[feature-name] (if --branch)
425
+
426
+ Next Steps:
427
+ ├── View feature: bd_show({ id: "[bead-id]" })
428
+ ├── Start first task: /implement [task-id-1]
429
+ └── View ready work: bd_ls({ status: "ready" })
137
430
  ```
431
+
432
+ ---
433
+
434
+ ## Quick Mode (--quick)
435
+
436
+ Skip brainstorming, use minimal spec:
437
+
438
+ - No discovery questions
439
+ - Minimal spec template
440
+ - Single-phase plan
441
+ - No sub-task breakdown
442
+
443
+ Use for: Small features, bug fixes, well-understood work.
444
+
445
+ ---
446
+
447
+ ## Estimation Framework
448
+
449
+ | Size | Hours | Typical Scope |
450
+ | ---- | -------- | ---------------------------------------- |
451
+ | XS | 1-2 | Config change, typo fix |
452
+ | S | 2-4 | Simple feature, single file |
453
+ | M | 4-8 | Multi-file feature, some complexity |
454
+ | L | 1-3 days | Significant feature, multiple components |
455
+ | XL | 3-5 days | Major feature, architecture impact |
456
+
457
+ **Confidence levels:**
458
+
459
+ - **High**: Done this before, clear path
460
+ - **Medium**: Some unknowns, general approach clear
461
+ - **Low**: Significant unknowns, may need spikes
462
+
463
+ ---
464
+
465
+ ## Related Commands
466
+
467
+ | Need | Command |
468
+ | -------------------- | --------------------------- |
469
+ | Start implementation | `/implement <bead-id>` |
470
+ | View feature status | `/status <bead-id>` |
471
+ | Import existing plan | `/import-plan` |
472
+ | Complete feature | `/finish <bead-id>` |
473
+ | Revert feature | `/revert-feature <bead-id>` |