opencodekit 0.7.0 → 0.9.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 (42) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/template/.opencode/AGENTS.md +65 -27
  3. package/dist/template/.opencode/README.md +14 -19
  4. package/dist/template/.opencode/agent/build.md +4 -6
  5. package/dist/template/.opencode/agent/explore.md +18 -18
  6. package/dist/template/.opencode/agent/planner.md +4 -7
  7. package/dist/template/.opencode/agent/review.md +1 -2
  8. package/dist/template/.opencode/agent/rush.md +4 -6
  9. package/dist/template/.opencode/agent/scout.md +45 -38
  10. package/dist/template/.opencode/agent/vision.md +16 -24
  11. package/dist/template/.opencode/command/analyze-project.md +9 -9
  12. package/dist/template/.opencode/command/create.md +9 -4
  13. package/dist/template/.opencode/command/finish.md +12 -17
  14. package/dist/template/.opencode/command/fix-ci.md +10 -9
  15. package/dist/template/.opencode/command/fix-types.md +4 -11
  16. package/dist/template/.opencode/command/handoff.md +14 -18
  17. package/dist/template/.opencode/command/implement.md +11 -11
  18. package/dist/template/.opencode/command/import-plan.md +25 -14
  19. package/dist/template/.opencode/command/integration-test.md +1 -1
  20. package/dist/template/.opencode/command/issue.md +10 -9
  21. package/dist/template/.opencode/command/new-feature.md +4 -6
  22. package/dist/template/.opencode/command/plan.md +3 -5
  23. package/dist/template/.opencode/command/pr.md +2 -4
  24. package/dist/template/.opencode/command/research-and-implement.md +1 -1
  25. package/dist/template/.opencode/command/research.md +13 -15
  26. package/dist/template/.opencode/command/resume.md +2 -2
  27. package/dist/template/.opencode/command/revert-feature.md +5 -7
  28. package/dist/template/.opencode/command/status.md +8 -10
  29. package/dist/template/.opencode/dcp.jsonc +20 -2
  30. package/dist/template/.opencode/opencode.json +20 -35
  31. package/dist/template/.opencode/package.json +1 -1
  32. package/dist/template/.opencode/plugin/beads.ts +667 -0
  33. package/dist/template/.opencode/plugin/compaction.ts +80 -0
  34. package/dist/template/.opencode/plugin/skill-mcp.ts +458 -0
  35. package/dist/template/.opencode/skill/beads/SKILL.md +419 -0
  36. package/dist/template/.opencode/skill/beads/references/BOUNDARIES.md +218 -0
  37. package/dist/template/.opencode/skill/beads/references/DEPENDENCIES.md +130 -0
  38. package/dist/template/.opencode/skill/beads/references/RESUMABILITY.md +180 -0
  39. package/dist/template/.opencode/skill/beads/references/WORKFLOWS.md +222 -0
  40. package/dist/template/.opencode/skill/figma/SKILL.md +214 -0
  41. package/dist/template/.opencode/skill/playwright/SKILL.md +187 -0
  42. package/package.json +1 -1
@@ -0,0 +1,130 @@
1
+ # Dependency Types Guide
2
+
3
+ Beads supports task dependencies for ordering work.
4
+
5
+ ## Overview
6
+
7
+ Dependencies affect what work is "ready" - tasks with unmet dependencies won't appear in `bd_claim()` or `bd_priority()`.
8
+
9
+ ## Creating Dependencies
10
+
11
+ ```typescript
12
+ bd_add({
13
+ title: "Implement API endpoint",
14
+ deps: ["task:setup-db"], // depends on setup-db task
15
+ });
16
+ ```
17
+
18
+ ## Dependency Patterns
19
+
20
+ ### Sequential Work
21
+
22
+ ```
23
+ setup-db → implement-api → add-tests → deploy
24
+ ```
25
+
26
+ Each task depends on the previous. `bd_claim()` shows only the current step.
27
+
28
+ ### Parallel Then Merge
29
+
30
+ ```
31
+ research-a ─┐
32
+ research-b ─┼→ decision
33
+ research-c ─┘
34
+ ```
35
+
36
+ Multiple parallel tasks, then one that needs all of them.
37
+
38
+ ### Foundation First
39
+
40
+ ```
41
+ setup ─┬→ feature-a
42
+ ├→ feature-b
43
+ └→ feature-c
44
+ ```
45
+
46
+ One foundational task blocks multiple features.
47
+
48
+ ## Epic with Children
49
+
50
+ ```typescript
51
+ // Create epic
52
+ bd_add({ title: "OAuth Integration", type: "epic" });
53
+ // Returns: { id: "oauth-abc" }
54
+
55
+ // Create children with parent
56
+ bd_add({ title: "Setup credentials", parent: "oauth-abc" });
57
+ bd_add({
58
+ title: "Implement flow",
59
+ parent: "oauth-abc",
60
+ deps: ["task:credentials"],
61
+ });
62
+ bd_add({ title: "Add UI", parent: "oauth-abc", deps: ["task:flow"] });
63
+ ```
64
+
65
+ ## Automatic Unblocking
66
+
67
+ When you close a task that's blocking others:
68
+
69
+ ```
70
+ 1. bd_done({ id: "setup-db" })
71
+ 2. Beads automatically updates: implement-api is now ready
72
+ 3. bd_claim() returns implement-api
73
+ 4. No manual unblocking needed
74
+ ```
75
+
76
+ ## Common Mistakes
77
+
78
+ ### Using Dependencies for Preferences
79
+
80
+ **Wrong:**
81
+
82
+ ```
83
+ docs depends on feature // "prefer to update docs after"
84
+ ```
85
+
86
+ **Problem:** Documentation doesn't actually need feature complete.
87
+
88
+ **Right:** Only use dependencies for actual blockers.
89
+
90
+ ### Wrong Direction
91
+
92
+ **Wrong:**
93
+
94
+ ```
95
+ bd_add({ title: "API", deps: ["task:tests"] }) // API depends on tests?
96
+ ```
97
+
98
+ **Problem:** Usually tests depend on API, not the other way.
99
+
100
+ **Right:** Think "X needs Y complete first" → X depends on Y.
101
+
102
+ ### Over-Using Dependencies
103
+
104
+ **Problem:** Everything depends on everything. No parallel work possible.
105
+
106
+ **Right:** Only add dependencies for actual technical blockers.
107
+
108
+ ## Decision Guide
109
+
110
+ **Add dependency when:**
111
+
112
+ - Task literally cannot start without other task complete
113
+ - Code won't compile/run without prerequisite
114
+ - Data/schema must exist first
115
+
116
+ **Skip dependency when:**
117
+
118
+ - Just a preference for order
119
+ - Both can proceed independently
120
+ - Just want to note relationship
121
+
122
+ ## Viewing Dependencies
123
+
124
+ ```typescript
125
+ bd_show({ id: "task-abc" });
126
+ // Shows what blocks this task and what this task blocks
127
+
128
+ bd_insights();
129
+ // Shows bottlenecks and blocked work across project
130
+ ```
@@ -0,0 +1,180 @@
1
+ # Making Tasks Resumable Across Sessions
2
+
3
+ ## When Resumability Matters
4
+
5
+ **Use enhanced notes for:**
6
+
7
+ - Multi-session features with API integration
8
+ - Complex algorithms requiring code examples
9
+ - Features with specific output format requirements
10
+ - Work with undocumented APIs
11
+
12
+ **Skip for:**
13
+
14
+ - Simple bug fixes with clear scope
15
+ - Well-understood patterns (CRUD, etc.)
16
+ - Single-session tasks
17
+ - Work with obvious criteria
18
+
19
+ **The test:** Would a fresh agent (or you after 2 weeks) struggle to resume from the notes alone? If yes, add detail.
20
+
21
+ ## Anatomy of Resumable Notes
22
+
23
+ ### Minimal (Always Include)
24
+
25
+ ```
26
+ COMPLETED: What's done
27
+ IN PROGRESS: Current state
28
+ NEXT: Concrete next step
29
+ ```
30
+
31
+ ### Enhanced (Complex Work)
32
+
33
+ ````
34
+ COMPLETED: Specific deliverables
35
+ IN PROGRESS: Current state + what's working
36
+ NEXT: Concrete next step (not "continue")
37
+ BLOCKERS: What's preventing progress
38
+ KEY DECISIONS: Important context with rationale
39
+
40
+ WORKING CODE:
41
+ ```python
42
+ # Tested code that works
43
+ result = api.query(fields='importFormats')
44
+ # Returns: {'text/markdown': ['application/vnd.google-apps.document']}
45
+ ````
46
+
47
+ DESIRED OUTPUT:
48
+
49
+ ```markdown
50
+ # Example of what output should look like
51
+
52
+ Actual structure, not just "return markdown"
53
+ ```
54
+
55
+ ```
56
+
57
+ ## Example: Before vs After
58
+
59
+ ### Not Resumable
60
+
61
+ ```
62
+
63
+ Title: Add dynamic capabilities
64
+ Notes: Working on it. Made some progress.
65
+
66
+ ```
67
+
68
+ **Problem:** Future agent doesn't know:
69
+ - Which API endpoints to call
70
+ - What responses look like
71
+ - What format to return
72
+
73
+ ### Resumable
74
+
75
+ ```
76
+
77
+ Title: Add dynamic capabilities resources
78
+
79
+ Notes:
80
+ COMPLETED: API connection verified. Query working.
81
+ IN PROGRESS: Formatting response as markdown.
82
+ NEXT: Add caching for API responses.
83
+
84
+ WORKING CODE:
85
+
86
+ ```python
87
+ service = build('drive', 'v3', credentials=creds)
88
+ about = service.about().get(fields='importFormats').execute()
89
+ # Returns dict with 49 entries
90
+ ```
91
+
92
+ DESIRED OUTPUT:
93
+
94
+ ```markdown
95
+ # Drive Import Formats
96
+
97
+ - **text/markdown** → Google Docs
98
+ - text/plain → Google Docs
99
+ ```
100
+
101
+ KEY DECISION: Using live API query because text/markdown support (July 2024) not in static docs.
102
+
103
+ ```
104
+
105
+ **Result:** Fresh agent can:
106
+ 1. See working API code
107
+ 2. Understand response structure
108
+ 3. Know desired output format
109
+ 4. Implement with context
110
+
111
+ ## When to Add Detail
112
+
113
+ **During task creation:**
114
+ - Already have working code? Include it.
115
+ - Clear output format? Show example.
116
+
117
+ **During work:**
118
+ - Got API working? Add to notes.
119
+ - Discovered important context? Document it.
120
+ - Made key decision? Explain rationale.
121
+
122
+ **Session end:**
123
+ - If resuming will be hard, add implementation guide.
124
+ - If obvious, skip it.
125
+
126
+ ## Anti-Patterns
127
+
128
+ ### Over-Documenting Simple Work
129
+
130
+ ```
131
+
132
+ Title: Fix typo in README
133
+ Notes: IMPLEMENTATION GUIDE
134
+ WORKING CODE: Open README.md, change "teh" to "the"...
135
+
136
+ ```
137
+
138
+ **Problem:** Wastes tokens on obvious work.
139
+
140
+ ### Vague Progress
141
+
142
+ ```
143
+
144
+ Notes: Made progress. Will continue later.
145
+
146
+ ```
147
+
148
+ **Problem:** No context for resumption.
149
+
150
+ ### Raw Data Dumps
151
+
152
+ ```
153
+
154
+ API RESPONSE:
155
+ {giant unformatted JSON blob spanning 100 lines}
156
+
157
+ ```
158
+
159
+ **Problem:** Hard to read. Extract relevant parts.
160
+
161
+ ### Right Balance
162
+
163
+ ```
164
+
165
+ API returns dict with 49 entries. Examples:
166
+
167
+ - 'text/markdown': ['application/vnd.google-apps.document']
168
+ - 'text/plain': ['application/vnd.google-apps.document']
169
+
170
+ ```
171
+
172
+ ## The Principle
173
+
174
+ Help your future self (or next agent) resume without rediscovering everything.
175
+
176
+ Write notes as if explaining to someone with:
177
+ - Zero conversation context
178
+ - No memory of previous sessions
179
+ - Only the task description and notes
180
+ ```
@@ -0,0 +1,222 @@
1
+ # Workflows and Checklists
2
+
3
+ Detailed step-by-step workflows for common beads usage patterns.
4
+
5
+ ## Session Start Workflow
6
+
7
+ **Every session when beads is available:**
8
+
9
+ ```
10
+ Session Start:
11
+ - [ ] bd_init({ team: "project", role: "fe" })
12
+ - [ ] bd_claim() to get ready work
13
+ - [ ] If none ready, bd_ls({ status: "open" })
14
+ - [ ] bd_show({ id }) for full context
15
+ - [ ] bd_reserve({ paths }) before editing
16
+ ```
17
+
18
+ ## Compaction Survival
19
+
20
+ **Critical**: After compaction, conversation history is deleted but beads state persists.
21
+
22
+ **Post-compaction recovery:**
23
+
24
+ ```
25
+ After Compaction:
26
+ - [ ] bd_ls({ status: "in_progress" }) to see active work
27
+ - [ ] bd_show({ id }) for each in_progress task
28
+ - [ ] Read notes: COMPLETED, IN PROGRESS, BLOCKERS, KEY DECISIONS
29
+ - [ ] Reconstruct TodoWrite from notes if needed
30
+ ```
31
+
32
+ **Writing notes for compaction survival:**
33
+
34
+ **Good note (enables recovery):**
35
+
36
+ ```
37
+ COMPLETED: User auth - JWT tokens with 1hr expiry, refresh endpoint.
38
+ IN PROGRESS: Password reset flow. Email service working.
39
+ NEXT: Add rate limiting to reset endpoint.
40
+ KEY DECISION: Using bcrypt 12 rounds per OWASP.
41
+ ```
42
+
43
+ **Bad note:**
44
+
45
+ ```
46
+ Working on auth. Made some progress.
47
+ ```
48
+
49
+ ## Discovery Workflow
50
+
51
+ **When encountering new work during implementation:**
52
+
53
+ ```
54
+ Discovery:
55
+ - [ ] Notice bug, improvement, or follow-up
56
+ - [ ] Assess: blocker or deferrable?
57
+ - [ ] bd_add({ title, desc, pri })
58
+ - [ ] If blocker: pause and switch
59
+ - [ ] If deferrable: continue current work
60
+ ```
61
+
62
+ ## Epic Planning
63
+
64
+ **For complex multi-step features, think in Ready Fronts.**
65
+
66
+ A **Ready Front** is the set of tasks with all dependencies satisfied.
67
+
68
+ **Walk backward from goal:**
69
+
70
+ ```
71
+ "What's the final deliverable?"
72
+
73
+ "Integration tests passing" → task-integration
74
+
75
+ "What does that need?"
76
+
77
+ "Streaming support" → task-streaming
78
+ "Header display" → task-header
79
+
80
+ "What do those need?"
81
+
82
+ "Message rendering" → task-messages
83
+
84
+ "Buffer layout" → task-buffer (foundation)
85
+ ```
86
+
87
+ **Example: OAuth Integration**
88
+
89
+ ```typescript
90
+ // Create epic
91
+ bd_add({ title: "OAuth integration", type: "epic" });
92
+
93
+ // Walk backward: What does OAuth need?
94
+ bd_add({ title: "Login/logout endpoints", parent: "oauth-abc" });
95
+ bd_add({ title: "Token storage and refresh", parent: "oauth-abc" });
96
+ bd_add({ title: "Authorization code flow", parent: "oauth-abc" });
97
+ bd_add({ title: "OAuth client credentials", parent: "oauth-abc" }); // foundation
98
+ ```
99
+
100
+ ## Side Quest Handling
101
+
102
+ ```
103
+ Side Quest:
104
+ - [ ] During main work, discover problem
105
+ - [ ] bd_add() for side quest
106
+ - [ ] Assess: blocker or deferrable?
107
+ - [ ] If blocker: bd_release(), switch to side quest
108
+ - [ ] If deferrable: note it, continue main work
109
+ ```
110
+
111
+ ## Session Handoff
112
+
113
+ **At Session End:**
114
+
115
+ ```
116
+ Session End:
117
+ - [ ] Work reaching stopping point
118
+ - [ ] Update notes with COMPLETED/IN PROGRESS/NEXT
119
+ - [ ] bd_done() if task complete
120
+ - [ ] Otherwise leave in_progress with notes
121
+ - [ ] RESTART SESSION
122
+ ```
123
+
124
+ **At Session Start:**
125
+
126
+ ```
127
+ Session Start with in_progress:
128
+ - [ ] bd_ls({ status: "in_progress" })
129
+ - [ ] bd_show({ id }) for each
130
+ - [ ] Read notes field
131
+ - [ ] Continue from notes context
132
+ ```
133
+
134
+ ## Unblocking Work
135
+
136
+ **When ready list is empty:**
137
+
138
+ ```
139
+ Unblocking:
140
+ - [ ] bd_ls({ status: "open" }) to see all tasks
141
+ - [ ] bd_insights() to find bottlenecks
142
+ - [ ] Identify blocker tasks
143
+ - [ ] Work on blockers first
144
+ - [ ] Closing blocker unblocks dependent work
145
+ ```
146
+
147
+ ## Integration with TodoWrite
148
+
149
+ **Using both tools:**
150
+
151
+ ```
152
+ Hybrid:
153
+ - [ ] bd_claim() for high-level task
154
+ - [ ] Create TodoWrite from acceptance criteria
155
+ - [ ] Work through TodoWrite items
156
+ - [ ] Update bd notes as you learn
157
+ - [ ] When TodoWrite complete, bd_done()
158
+ ```
159
+
160
+ **Why hybrid**: bd provides persistent structure, TodoWrite provides visible progress.
161
+
162
+ ## Common Patterns
163
+
164
+ ### Systematic Exploration
165
+
166
+ ```
167
+ 1. Create research task
168
+ 2. Update notes with findings
169
+ 3. bd_add() for discoveries
170
+ 4. Close research with conclusion
171
+ ```
172
+
173
+ ### Bug Investigation
174
+
175
+ ```
176
+ 1. Create bug task
177
+ 2. Reproduce: note steps
178
+ 3. Investigate: track hypotheses in notes
179
+ 4. Fix: implement solution
180
+ 5. Close with root cause explanation
181
+ ```
182
+
183
+ ### Refactoring with Dependencies
184
+
185
+ ```
186
+ 1. Create tasks for each step
187
+ 2. Work through in dependency order
188
+ 3. bd_claim() shows next step
189
+ 4. Each completion unblocks next
190
+ ```
191
+
192
+ ## Checklist Templates
193
+
194
+ ### Starting Any Session
195
+
196
+ ```
197
+ - [ ] bd_init()
198
+ - [ ] bd_claim() or bd_ls()
199
+ - [ ] bd_show() for context
200
+ - [ ] bd_reserve() files
201
+ - [ ] Begin work
202
+ ```
203
+
204
+ ### Creating Tasks During Work
205
+
206
+ ```
207
+ - [ ] Notice new work needed
208
+ - [ ] bd_add() with clear title
209
+ - [ ] Add context in desc
210
+ - [ ] Assess blocker vs deferrable
211
+ - [ ] Update statuses
212
+ ```
213
+
214
+ ### Completing Work
215
+
216
+ ```
217
+ - [ ] Implementation done
218
+ - [ ] Tests passing
219
+ - [ ] bd_done() with summary
220
+ - [ ] bd_claim() for next work
221
+ - [ ] RESTART SESSION
222
+ ```