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