opencodekit 0.18.4 → 0.18.6

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 (43) hide show
  1. package/dist/index.js +491 -47
  2. package/dist/template/.opencode/AGENTS.md +13 -1
  3. package/dist/template/.opencode/agent/build.md +4 -1
  4. package/dist/template/.opencode/agent/explore.md +25 -58
  5. package/dist/template/.opencode/command/ship.md +7 -5
  6. package/dist/template/.opencode/command/verify.md +63 -12
  7. package/dist/template/.opencode/memory/research/benchmark-framework.md +162 -0
  8. package/dist/template/.opencode/memory/research/effectiveness-audit.md +213 -0
  9. package/dist/template/.opencode/memory.db +0 -0
  10. package/dist/template/.opencode/memory.db-shm +0 -0
  11. package/dist/template/.opencode/memory.db-wal +0 -0
  12. package/dist/template/.opencode/opencode.json +1429 -1678
  13. package/dist/template/.opencode/package.json +1 -1
  14. package/dist/template/.opencode/plugin/lib/memory-helpers.ts +3 -129
  15. package/dist/template/.opencode/plugin/lib/memory-hooks.ts +4 -60
  16. package/dist/template/.opencode/plugin/memory.ts +0 -3
  17. package/dist/template/.opencode/skill/agent-teams/SKILL.md +16 -1
  18. package/dist/template/.opencode/skill/beads/SKILL.md +22 -0
  19. package/dist/template/.opencode/skill/brainstorming/SKILL.md +28 -0
  20. package/dist/template/.opencode/skill/code-navigation/SKILL.md +130 -0
  21. package/dist/template/.opencode/skill/condition-based-waiting/SKILL.md +12 -0
  22. package/dist/template/.opencode/skill/context-management/SKILL.md +122 -113
  23. package/dist/template/.opencode/skill/defense-in-depth/SKILL.md +20 -0
  24. package/dist/template/.opencode/skill/design-system-audit/SKILL.md +113 -112
  25. package/dist/template/.opencode/skill/dispatching-parallel-agents/SKILL.md +8 -0
  26. package/dist/template/.opencode/skill/executing-plans/SKILL.md +156 -132
  27. package/dist/template/.opencode/skill/memory-system/SKILL.md +50 -266
  28. package/dist/template/.opencode/skill/mockup-to-code/SKILL.md +21 -6
  29. package/dist/template/.opencode/skill/receiving-code-review/SKILL.md +8 -0
  30. package/dist/template/.opencode/skill/root-cause-tracing/SKILL.md +15 -0
  31. package/dist/template/.opencode/skill/session-management/SKILL.md +4 -103
  32. package/dist/template/.opencode/skill/subagent-driven-development/SKILL.md +23 -2
  33. package/dist/template/.opencode/skill/swarm-coordination/SKILL.md +17 -1
  34. package/dist/template/.opencode/skill/systematic-debugging/SKILL.md +21 -0
  35. package/dist/template/.opencode/skill/tool-priority/SKILL.md +34 -16
  36. package/dist/template/.opencode/skill/ui-ux-research/SKILL.md +5 -127
  37. package/dist/template/.opencode/skill/verification-before-completion/SKILL.md +36 -0
  38. package/dist/template/.opencode/skill/verification-before-completion/references/VERIFICATION_PROTOCOL.md +133 -29
  39. package/dist/template/.opencode/skill/visual-analysis/SKILL.md +20 -7
  40. package/dist/template/.opencode/skill/writing-plans/SKILL.md +7 -0
  41. package/dist/template/.opencode/tool/context7.ts +9 -1
  42. package/dist/template/.opencode/tool/grepsearch.ts +9 -1
  43. package/package.json +1 -1
@@ -1,28 +1,31 @@
1
1
  ---
2
2
  name: executing-plans
3
- description: Use when partner provides a complete implementation plan to execute in controlled batches with review checkpoints - loads plan, reviews critically, executes tasks in batches, reports for review between batches
4
- version: 1.0.0
5
- tags: [workflow, planning]
3
+ description: Use when a complete implementation plan exists parses dependency waves, executes independent tasks in parallel via subagents, runs review checkpoints between waves
4
+ version: 2.0.0
5
+ tags: [workflow, planning, parallel]
6
6
  dependencies: [writing-plans]
7
7
  ---
8
8
 
9
9
  # Executing Plans
10
10
 
11
+ > **Replaces** sequential task-by-task implementation — detects parallelizable waves and dispatches subagents concurrently within each wave
12
+
11
13
  ## When to Use
12
14
 
13
- - A complete implementation plan exists and you need to execute it in batches with checkpoints
14
- - You must follow a plan precisely and report between waves for feedback
15
+ - A complete implementation plan exists (`.beads/artifacts/<id>/plan.md` or provided directly)
16
+ - The plan has a dependency graph with wave assignments from `/plan`
15
17
 
16
18
  ## When NOT to Use
17
19
 
18
- - There is no plan yet or requirements are still unclear
19
- - You need to create the plan or tasks first (use writing-plans or prd)
20
+ - No plan yet (use `writing-plans` or `prd` first)
21
+ - All tasks are tightly sequential with no parallelism opportunity
22
+ - Fewer than 3 tasks (just execute directly, overhead not worth it)
20
23
 
21
24
  ## Overview
22
25
 
23
- Load plan, review critically, execute tasks in batches, report for review between batches.
26
+ Load plan parse dependency waves → execute each wave (parallel within, sequential between) review after each wave → next wave.
24
27
 
25
- **Core principle:** Batch execution with checkpoints for architect review.
28
+ **Core principle:** Parallel within waves, sequential between waves, review at wave boundaries.
26
29
 
27
30
  **Announce at start:** "I'm using the executing-plans skill to implement this plan."
28
31
 
@@ -35,104 +38,149 @@ Load plan, review critically, execute tasks in batches, report for review betwee
35
38
  - [ ] Read the plan file end-to-end
36
39
  - [ ] Identify goal, deliverables, risks, and missing pieces
37
40
  - [ ] If concerns, ask via `question()` and wait for decision
38
- - [ ] If no concerns, create TodoWrite and proceed
41
+ - [ ] If no concerns, proceed to wave parsing
39
42
 
40
43
  1. Read plan file
41
- 2. Review critically - identify any questions or concerns about the plan
42
- 3. If concerns: Use question tool to raise them:
44
+ 2. Review critically identify any questions or concerns
45
+ 3. If concerns: raise them with `question()` tool
46
+ 4. If no concerns: proceed
43
47
 
44
- ```typescript
45
- question({
46
- questions: [
47
- {
48
- header: "Concerns",
49
- question: "Plan review complete. Any concerns before proceeding?",
50
- options: [
51
- {
52
- label: "No concerns (Recommended)",
53
- description: "Plan looks good, execute batches",
54
- },
55
- {
56
- label: "Has concerns",
57
- description: "Need clarification before starting",
58
- },
59
- ],
60
- },
61
- ],
62
- });
63
- ```
48
+ ### Step 2: Parse Dependency Graph
64
49
 
65
- 4. Read plan and identify:
66
- - What is the goal?
67
- - What are the deliverables?
68
- - What are the risks?
69
- - Does the approach make sense?
70
- - Are there missing pieces?
50
+ Look for the dependency graph section in the plan. The `/plan` command generates this format:
71
51
 
72
- If no concerns: Create TodoWrite and proceed
73
- If concerns: Wait for human to decide and resubmit
52
+ ```
53
+ ## Dependency Graph
74
54
 
75
- ### Step 2: Execute Batch
55
+ Task A: needs nothing, creates src/models/X.ts
56
+ Task B: needs Task A, creates src/api/X.ts
57
+ Task C: needs nothing, creates src/utils/Y.ts
58
+ Task D: needs Task B + Task C, creates src/routes/Z.ts
76
59
 
77
- **Default: First 3 tasks**
60
+ Wave 1: A, C (independent)
61
+ Wave 2: B (depends on A)
62
+ Wave 3: D (depends on B, C)
63
+ ```
78
64
 
79
- **Before starting a batch**: create a wave-start git tag for safe rollback:
65
+ **Extract:**
66
+ - Which tasks belong to each wave
67
+ - Which files each task modifies (for conflict detection)
68
+ - Dependencies between tasks
80
69
 
81
- ```bash
82
- # Tag the safe point before this batch/wave
83
- git tag wave-${BATCH_NUMBER}-start
84
- ```
70
+ **If no dependency graph found:** Fall back to sequential execution (batch of 3 tasks).
85
71
 
86
- #### Batch Execution Checklist
72
+ **File conflict check:** Tasks in the same wave MUST NOT modify the same files. If they do, move one to the next wave.
87
73
 
88
- - [ ] Create wave start tag: `git tag wave-${BATCH_NUMBER}-start`
89
- - [ ] Mark each task in_progress
90
- - [ ] Follow each step exactly as written
91
- - [ ] Run all specified verifications
92
- - [ ] Mark tasks completed
93
- - [ ] Create wave complete tag: `git tag wave-${BATCH_NUMBER}-complete`
74
+ ### Step 3: Create TodoWrite
94
75
 
95
- For each task:
76
+ Create todos for all tasks, grouped by wave:
96
77
 
97
- 1. Mark as in_progress
98
- 2. Follow each step exactly (plan has bite-sized steps)
99
- 3. Run verifications as specified
100
- 4. Mark as completed
78
+ ```typescript
79
+ todowrite({
80
+ todos: [
81
+ { content: "Wave 1: Task A — [description]", status: "pending", priority: "high" },
82
+ { content: "Wave 1: Task C — [description]", status: "pending", priority: "high" },
83
+ { content: "Wave 1 review checkpoint", status: "pending", priority: "high" },
84
+ { content: "Wave 2: Task B — [description]", status: "pending", priority: "high" },
85
+ { content: "Wave 2 review checkpoint", status: "pending", priority: "high" },
86
+ // ...
87
+ ]
88
+ });
89
+ ```
90
+
91
+ ### Step 4: Execute Wave
101
92
 
102
- **After batch passes all gates**: create a wave-complete tag:
93
+ **Before starting a wave:** create a git tag for safe rollback:
103
94
 
104
95
  ```bash
105
- # Seal the completed wave - confirms all gates passed
106
- git tag wave-${BATCH_NUMBER}-complete
96
+ git tag wave-${WAVE_NUMBER}-start
107
97
  ```
108
98
 
109
- ### Step 3: Report
99
+ #### Single-task wave (no parallelism needed)
110
100
 
111
- #### Batch Report Checklist
101
+ Execute directly in the current agent context. No subagent overhead.
112
102
 
113
- - [ ] Summarize what was implemented
114
- - [ ] Include verification output
115
- - [ ] Confirm wave tag created (e.g., `wave-1-complete`)
116
- - [ ] Ask for feedback before continuing
103
+ #### Multi-task wave (2+ independent tasks)
117
104
 
118
- When batch complete:
105
+ Dispatch parallel subagents — one per task:
119
106
 
120
- - Show what was implemented
121
- - Show verification output
122
- - Show wave tag created (e.g., `wave-1-complete`)
123
- - Say: "Ready for feedback."
107
+ ```typescript
108
+ // Dispatch all tasks in this wave simultaneously
109
+ task({
110
+ subagent_type: "general",
111
+ description: `Wave ${N}: Task A — ${taskTitle}`,
112
+ prompt: `You are implementing Task A from the plan.
113
+
114
+ ## Task
115
+ ${taskDescription}
116
+
117
+ ## Files to modify
118
+ ${taskFiles.join('\n')}
119
+
120
+ ## Constraints
121
+ - ONLY modify files listed above
122
+ - Follow each step exactly as written in the task
123
+ - Run verification commands specified in the task
124
+ - Commit your changes: git add <specific-files> && git commit -m "feat: ${taskTitle}"
125
+
126
+ ## Report back
127
+ - What you implemented
128
+ - Files changed
129
+ - Verification results (pass/fail)
130
+ - Commit hash
131
+ - Any issues or blockers`
132
+ });
133
+ // ...dispatch other tasks in this wave simultaneously
134
+ ```
124
135
 
125
- ### Step 4: Continue
136
+ **Critical rules for parallel dispatch:**
137
+
138
+ | Rule | Why |
139
+ | --- | --- |
140
+ | Non-overlapping files | Subagents editing same file = merge conflicts |
141
+ | Exact file list per subagent | Prevents scope creep into other tasks |
142
+ | Each subagent commits independently | Clean git history per task |
143
+ | Never `git add .` | Only stage files from this task |
144
+
145
+ #### Wave Execution Checklist
146
+
147
+ - [ ] Create wave start tag: `git tag wave-${WAVE_NUMBER}-start`
148
+ - [ ] Dispatch subagents for all tasks in this wave (parallel)
149
+ - [ ] Collect results from all subagents
150
+ - [ ] Check for failures — if any task failed, stop and report
151
+ - [ ] Run verification gates (typecheck + lint in parallel, then tests)
152
+ - [ ] Create wave complete tag: `git tag wave-${WAVE_NUMBER}-complete`
153
+ - [ ] Mark wave tasks as completed in TodoWrite
154
+
155
+ ### Step 5: Review Wave
156
+
157
+ After each wave completes:
158
+
159
+ 1. **Synthesize results** from all subagents
160
+ 2. **Run verification gates** on the combined changes:
161
+ ```bash
162
+ # Parallel: typecheck + lint
163
+ npm run typecheck & npm run lint & wait
164
+ # Sequential: tests
165
+ npm test
166
+ ```
167
+ 3. **Report to user:**
168
+ - Tasks completed in this wave
169
+ - Verification results
170
+ - Wave tag created
171
+ - Any issues found
172
+ 4. **Wait for feedback** before proceeding to next wave
173
+
174
+ ### Step 6: Next Wave
126
175
 
127
176
  Based on feedback:
177
+ - Apply corrections if needed
178
+ - Execute next wave (repeat Steps 4-5)
179
+ - Continue until all waves complete
128
180
 
129
- - Apply changes if needed
130
- - Execute next batch
131
- - Repeat until complete
181
+ ### Step 7: Complete Development
132
182
 
133
- ### Step 5: Complete Development
134
-
135
- After all tasks complete and verified:
183
+ After all waves complete and verified:
136
184
 
137
185
  - Announce: "I'm using finishing-a-development-branch skill to complete this work."
138
186
  - **REQUIRED SUB-SKILL:** Use skill({ name: "finishing-a-development-branch" })
@@ -146,78 +194,54 @@ Git tags act as checkpoints between waves. If a wave fails irrecoverably, roll b
146
194
 
147
195
  | When | Command | Purpose |
148
196
  | ---------------------------- | ------------------------------- | ------------------------- |
149
- | Before starting any batch | `git tag wave-N-start` | Mark rollback point |
150
- | After batch passes all gates | `git tag wave-N-complete` | Seal confirmed-good state |
197
+ | Before starting any wave | `git tag wave-N-start` | Mark rollback point |
198
+ | After wave passes all gates | `git tag wave-N-complete` | Seal confirmed-good state |
151
199
  | On irrecoverable failure | `git reset --hard wave-N-start` | Restore to pre-wave state |
152
200
  | Listing all wave checkpoints | `git tag --list "wave-*"` | Audit trail of execution |
153
201
 
154
202
  ### When to Rollback
155
203
 
156
204
  Roll back (with user confirmation) when:
157
-
158
- - Build gates fail twice consecutively in the same wave
159
- - Unexpected destructive changes were made
160
- - Drift check detects unrecoverable scope creep
205
+ - Verification gates fail twice consecutively in the same wave
206
+ - Subagent made destructive changes outside its file scope
161
207
  - Tests were broken and the cause is unclear
162
208
 
163
- **Always ask the user before running `git reset --hard`** - it discards uncommitted changes irreversibly.
164
-
165
- ### Rollback Steps
166
-
167
- ```bash
168
- # 1. Identify safe point
169
- git tag --list "wave-*"
170
- # e.g.: wave-1-complete wave-2-start wave-2-complete wave-3-start
171
-
172
- # 2. Confirm with user: rollback to which tag?
173
- # e.g.: git reset --hard wave-2-complete (last known good)
174
-
175
- # 3. Execute rollback (ONLY after user confirms)
176
- git reset --hard wave-2-complete
209
+ **Always ask the user before running `git reset --hard`** it discards uncommitted changes irreversibly.
177
210
 
178
- # 4. Verify state is clean
179
- npm run typecheck && npm run lint
211
+ ## Sequential Fallback
180
212
 
181
- # 5. Re-plan the failed batch with new approach
182
- ```
183
-
184
- ### Tag Naming Convention
213
+ If the plan has no dependency graph or waves:
185
214
 
186
- ```
187
- wave-1-start # Before batch 1 starts
188
- wave-1-complete # After batch 1 passes all gates
189
- wave-2-start # Before batch 2 starts
190
- wave-2-complete # After batch 2 passes all gates
191
- ...
192
- ```
215
+ 1. Group tasks into batches of 3
216
+ 2. Execute each batch sequentially (no parallel subagents)
217
+ 3. Review between batches
218
+ 4. Same wave-tag protocol applies
193
219
 
194
- Use numeric batch numbers, not task names, for predictable reference.
220
+ This preserves backward compatibility with plans that don't have wave assignments.
195
221
 
196
222
  ## When to Stop and Ask for Help
197
223
 
198
224
  **STOP executing immediately when:**
199
-
200
- - Hit a blocker mid-batch (missing dependency, test fails, instruction unclear)
225
+ - Subagent reports a blocker or failure
226
+ - File conflict detected between parallel tasks
227
+ - Verification fails twice in the same wave
201
228
  - Plan has critical gaps preventing starting
202
- - You don't understand an instruction
203
- - Verification fails repeatedly
204
229
 
205
230
  **Ask for clarification rather than guessing.**
206
231
 
207
- ## When to Revisit Earlier Steps
208
-
209
- **Return to Review (Step 1) when:**
210
-
211
- - Partner updates the plan based on your feedback
212
- - Fundamental approach needs rethinking
232
+ ## Anti-Patterns
213
233
 
214
- **Don't force through blockers** - stop and ask.
234
+ | Anti-Pattern | Why It Fails | Instead |
235
+ | --- | --- | --- |
236
+ | Dispatching parallel subagents for tasks that share files | Edit conflicts, lost changes, merge chaos | Move conflicting tasks to separate waves |
237
+ | Skipping verification between waves | Broken code compounds across waves | Run all gates after each wave before proceeding |
238
+ | Giving subagents the full plan instead of their task | Context pollution, scope creep | Extract only the specific task + file list |
239
+ | Running all tasks in one wave regardless of dependencies | Later tasks fail because prerequisites aren't ready | Respect the dependency graph strictly |
240
+ | Not committing per-task | Can't rollback individual tasks, messy git history | Each subagent commits its own changes |
215
241
 
216
- ## Remember
242
+ ## See Also
217
243
 
218
- - Review plan critically first
219
- - Follow plan steps exactly
220
- - Don't skip verifications
221
- - Reference skills when plan says to
222
- - Between batches: just report and wait
223
- - Stop when blocked, don't guess
244
+ - `writing-plans` Create detailed, zero-ambiguity implementation plans before execution
245
+ - `swarm-coordination` For 10+ task scenarios with full PARL orchestration
246
+ - `subagent-driven-development` For sequential per-task execution with review between each
247
+ - `verification-before-completion` Run final verification gates before claiming completion