opencodekit 0.18.5 → 0.18.7
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.
- package/dist/index.js +107 -53
- package/dist/template/.opencode/AGENTS.md +9 -7
- package/dist/template/.opencode/agent/explore.md +25 -28
- package/dist/template/.opencode/command/ship.md +7 -5
- package/dist/template/.opencode/dcp.jsonc +71 -81
- package/dist/template/.opencode/memory/project/gotchas.md +3 -3
- package/dist/template/.opencode/memory.db +0 -0
- package/dist/template/.opencode/memory.db-shm +0 -0
- package/dist/template/.opencode/memory.db-wal +0 -0
- package/dist/template/.opencode/opencode.json +1 -1
- package/dist/template/.opencode/package.json +1 -1
- package/dist/template/.opencode/pnpm-lock.yaml +71 -0
- package/dist/template/.opencode/skill/compaction/SKILL.md +19 -48
- package/dist/template/.opencode/skill/context-engineering/SKILL.md +1 -1
- package/dist/template/.opencode/skill/context-management/SKILL.md +16 -26
- package/dist/template/.opencode/skill/executing-plans/SKILL.md +155 -138
- package/package.json +1 -1
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: executing-plans
|
|
3
|
-
description: Use when
|
|
4
|
-
version:
|
|
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**
|
|
11
|
+
> **Replaces** sequential task-by-task implementation — detects parallelizable waves and dispatches subagents concurrently within each wave
|
|
12
|
+
|
|
12
13
|
## When to Use
|
|
13
14
|
|
|
14
|
-
- A complete implementation plan exists
|
|
15
|
-
-
|
|
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`
|
|
16
17
|
|
|
17
18
|
## When NOT to Use
|
|
18
19
|
|
|
19
|
-
-
|
|
20
|
-
-
|
|
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)
|
|
21
23
|
|
|
22
24
|
## Overview
|
|
23
25
|
|
|
24
|
-
Load plan
|
|
26
|
+
Load plan → parse dependency waves → execute each wave (parallel within, sequential between) → review after each wave → next wave.
|
|
25
27
|
|
|
26
|
-
**Core principle:**
|
|
28
|
+
**Core principle:** Parallel within waves, sequential between waves, review at wave boundaries.
|
|
27
29
|
|
|
28
30
|
**Announce at start:** "I'm using the executing-plans skill to implement this plan."
|
|
29
31
|
|
|
@@ -36,104 +38,149 @@ Load plan, review critically, execute tasks in batches, report for review betwee
|
|
|
36
38
|
- [ ] Read the plan file end-to-end
|
|
37
39
|
- [ ] Identify goal, deliverables, risks, and missing pieces
|
|
38
40
|
- [ ] If concerns, ask via `question()` and wait for decision
|
|
39
|
-
- [ ] If no concerns,
|
|
41
|
+
- [ ] If no concerns, proceed to wave parsing
|
|
40
42
|
|
|
41
43
|
1. Read plan file
|
|
42
|
-
2. Review critically
|
|
43
|
-
3. If concerns:
|
|
44
|
+
2. Review critically — identify any questions or concerns
|
|
45
|
+
3. If concerns: raise them with `question()` tool
|
|
46
|
+
4. If no concerns: proceed
|
|
44
47
|
|
|
45
|
-
|
|
46
|
-
question({
|
|
47
|
-
questions: [
|
|
48
|
-
{
|
|
49
|
-
header: "Concerns",
|
|
50
|
-
question: "Plan review complete. Any concerns before proceeding?",
|
|
51
|
-
options: [
|
|
52
|
-
{
|
|
53
|
-
label: "No concerns (Recommended)",
|
|
54
|
-
description: "Plan looks good, execute batches",
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
label: "Has concerns",
|
|
58
|
-
description: "Need clarification before starting",
|
|
59
|
-
},
|
|
60
|
-
],
|
|
61
|
-
},
|
|
62
|
-
],
|
|
63
|
-
});
|
|
64
|
-
```
|
|
48
|
+
### Step 2: Parse Dependency Graph
|
|
65
49
|
|
|
66
|
-
|
|
67
|
-
- What is the goal?
|
|
68
|
-
- What are the deliverables?
|
|
69
|
-
- What are the risks?
|
|
70
|
-
- Does the approach make sense?
|
|
71
|
-
- Are there missing pieces?
|
|
50
|
+
Look for the dependency graph section in the plan. The `/plan` command generates this format:
|
|
72
51
|
|
|
73
|
-
|
|
74
|
-
|
|
52
|
+
```
|
|
53
|
+
## Dependency Graph
|
|
75
54
|
|
|
76
|
-
|
|
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
|
|
77
59
|
|
|
78
|
-
|
|
60
|
+
Wave 1: A, C (independent)
|
|
61
|
+
Wave 2: B (depends on A)
|
|
62
|
+
Wave 3: D (depends on B, C)
|
|
63
|
+
```
|
|
79
64
|
|
|
80
|
-
**
|
|
65
|
+
**Extract:**
|
|
66
|
+
- Which tasks belong to each wave
|
|
67
|
+
- Which files each task modifies (for conflict detection)
|
|
68
|
+
- Dependencies between tasks
|
|
81
69
|
|
|
82
|
-
|
|
83
|
-
# Tag the safe point before this batch/wave
|
|
84
|
-
git tag wave-${BATCH_NUMBER}-start
|
|
85
|
-
```
|
|
70
|
+
**If no dependency graph found:** Fall back to sequential execution (batch of 3 tasks).
|
|
86
71
|
|
|
87
|
-
|
|
72
|
+
**File conflict check:** Tasks in the same wave MUST NOT modify the same files. If they do, move one to the next wave.
|
|
88
73
|
|
|
89
|
-
|
|
90
|
-
- [ ] Mark each task in_progress
|
|
91
|
-
- [ ] Follow each step exactly as written
|
|
92
|
-
- [ ] Run all specified verifications
|
|
93
|
-
- [ ] Mark tasks completed
|
|
94
|
-
- [ ] Create wave complete tag: `git tag wave-${BATCH_NUMBER}-complete`
|
|
74
|
+
### Step 3: Create TodoWrite
|
|
95
75
|
|
|
96
|
-
|
|
76
|
+
Create todos for all tasks, grouped by wave:
|
|
97
77
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
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
|
|
102
92
|
|
|
103
|
-
**
|
|
93
|
+
**Before starting a wave:** create a git tag for safe rollback:
|
|
104
94
|
|
|
105
95
|
```bash
|
|
106
|
-
|
|
107
|
-
git tag wave-${BATCH_NUMBER}-complete
|
|
96
|
+
git tag wave-${WAVE_NUMBER}-start
|
|
108
97
|
```
|
|
109
98
|
|
|
110
|
-
|
|
99
|
+
#### Single-task wave (no parallelism needed)
|
|
111
100
|
|
|
112
|
-
|
|
101
|
+
Execute directly in the current agent context. No subagent overhead.
|
|
113
102
|
|
|
114
|
-
-
|
|
115
|
-
- [ ] Include verification output
|
|
116
|
-
- [ ] Confirm wave tag created (e.g., `wave-1-complete`)
|
|
117
|
-
- [ ] Ask for feedback before continuing
|
|
103
|
+
#### Multi-task wave (2+ independent tasks)
|
|
118
104
|
|
|
119
|
-
|
|
105
|
+
Dispatch parallel subagents — one per task:
|
|
120
106
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
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
|
+
```
|
|
125
135
|
|
|
126
|
-
|
|
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
|
|
127
175
|
|
|
128
176
|
Based on feedback:
|
|
177
|
+
- Apply corrections if needed
|
|
178
|
+
- Execute next wave (repeat Steps 4-5)
|
|
179
|
+
- Continue until all waves complete
|
|
129
180
|
|
|
130
|
-
|
|
131
|
-
- Execute next batch
|
|
132
|
-
- Repeat until complete
|
|
133
|
-
|
|
134
|
-
### Step 5: Complete Development
|
|
181
|
+
### Step 7: Complete Development
|
|
135
182
|
|
|
136
|
-
After all
|
|
183
|
+
After all waves complete and verified:
|
|
137
184
|
|
|
138
185
|
- Announce: "I'm using finishing-a-development-branch skill to complete this work."
|
|
139
186
|
- **REQUIRED SUB-SKILL:** Use skill({ name: "finishing-a-development-branch" })
|
|
@@ -147,84 +194,54 @@ Git tags act as checkpoints between waves. If a wave fails irrecoverably, roll b
|
|
|
147
194
|
|
|
148
195
|
| When | Command | Purpose |
|
|
149
196
|
| ---------------------------- | ------------------------------- | ------------------------- |
|
|
150
|
-
| Before starting any
|
|
151
|
-
| After
|
|
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 |
|
|
152
199
|
| On irrecoverable failure | `git reset --hard wave-N-start` | Restore to pre-wave state |
|
|
153
200
|
| Listing all wave checkpoints | `git tag --list "wave-*"` | Audit trail of execution |
|
|
154
201
|
|
|
155
202
|
### When to Rollback
|
|
156
203
|
|
|
157
204
|
Roll back (with user confirmation) when:
|
|
158
|
-
|
|
159
|
-
-
|
|
160
|
-
- Unexpected destructive changes were made
|
|
161
|
-
- 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
|
|
162
207
|
- Tests were broken and the cause is unclear
|
|
163
208
|
|
|
164
|
-
**Always ask the user before running `git reset --hard`**
|
|
165
|
-
|
|
166
|
-
### Rollback Steps
|
|
167
|
-
|
|
168
|
-
```bash
|
|
169
|
-
# 1. Identify safe point
|
|
170
|
-
git tag --list "wave-*"
|
|
171
|
-
# e.g.: wave-1-complete wave-2-start wave-2-complete wave-3-start
|
|
172
|
-
|
|
173
|
-
# 2. Confirm with user: rollback to which tag?
|
|
174
|
-
# e.g.: git reset --hard wave-2-complete (last known good)
|
|
209
|
+
**Always ask the user before running `git reset --hard`** — it discards uncommitted changes irreversibly.
|
|
175
210
|
|
|
176
|
-
|
|
177
|
-
git reset --hard wave-2-complete
|
|
211
|
+
## Sequential Fallback
|
|
178
212
|
|
|
179
|
-
|
|
180
|
-
npm run typecheck && npm run lint
|
|
213
|
+
If the plan has no dependency graph or waves:
|
|
181
214
|
|
|
182
|
-
|
|
183
|
-
|
|
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
|
|
184
219
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
```
|
|
188
|
-
wave-1-start # Before batch 1 starts
|
|
189
|
-
wave-1-complete # After batch 1 passes all gates
|
|
190
|
-
wave-2-start # Before batch 2 starts
|
|
191
|
-
wave-2-complete # After batch 2 passes all gates
|
|
192
|
-
...
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
Use numeric batch numbers, not task names, for predictable reference.
|
|
220
|
+
This preserves backward compatibility with plans that don't have wave assignments.
|
|
196
221
|
|
|
197
222
|
## When to Stop and Ask for Help
|
|
198
223
|
|
|
199
224
|
**STOP executing immediately when:**
|
|
200
|
-
|
|
201
|
-
-
|
|
225
|
+
- Subagent reports a blocker or failure
|
|
226
|
+
- File conflict detected between parallel tasks
|
|
227
|
+
- Verification fails twice in the same wave
|
|
202
228
|
- Plan has critical gaps preventing starting
|
|
203
|
-
- You don't understand an instruction
|
|
204
|
-
- Verification fails repeatedly
|
|
205
229
|
|
|
206
230
|
**Ask for clarification rather than guessing.**
|
|
207
231
|
|
|
208
|
-
##
|
|
209
|
-
|
|
210
|
-
**Return to Review (Step 1) when:**
|
|
211
|
-
|
|
212
|
-
- Partner updates the plan based on your feedback
|
|
213
|
-
- Fundamental approach needs rethinking
|
|
214
|
-
|
|
215
|
-
**Don't force through blockers** - stop and ask.
|
|
216
|
-
|
|
217
|
-
## Remember
|
|
232
|
+
## Anti-Patterns
|
|
218
233
|
|
|
219
|
-
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
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 |
|
|
225
241
|
|
|
226
242
|
## See Also
|
|
227
243
|
|
|
228
|
-
- `writing-plans`
|
|
229
|
-
- `swarm-coordination`
|
|
230
|
-
- `
|
|
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
|