opencodekit 0.16.3 → 0.16.4
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 +7685 -2238
- package/dist/template/.opencode/AGENTS.md +7 -7
- package/dist/template/.opencode/agent/build.md +1 -2
- package/dist/template/.opencode/agent/plan.md +0 -1
- package/dist/template/.opencode/command/create.md +2 -2
- package/dist/template/.opencode/command/design.md +1 -1
- package/dist/template/.opencode/command/handoff.md +2 -2
- package/dist/template/.opencode/command/plan.md +19 -19
- package/dist/template/.opencode/command/pr.md +2 -2
- package/dist/template/.opencode/command/research.md +1 -1
- package/dist/template/.opencode/command/resume.md +3 -3
- package/dist/template/.opencode/command/review-codebase.md +2 -2
- package/dist/template/.opencode/command/ship.md +4 -4
- package/dist/template/.opencode/command/start.md +7 -7
- package/dist/template/.opencode/command/status.md +3 -3
- package/dist/template/.opencode/command/ui-review.md +2 -2
- package/dist/template/.opencode/command/verify.md +1 -1
- package/dist/template/.opencode/memory/beads-workflow.md +65 -65
- package/dist/template/.opencode/memory.db-shm +0 -0
- package/dist/template/.opencode/memory.db-wal +0 -0
- package/dist/template/.opencode/plans/1770013678126-witty-planet.md +1 -1
- package/dist/template/.opencode/plans/1770112267595-shiny-rocket.md +258 -0
- package/dist/template/.opencode/plans/swarm-protocol.md +8 -8
- package/dist/template/.opencode/plugin/README.md +2 -2
- package/dist/template/.opencode/plugin/compaction.ts +1 -1
- package/dist/template/.opencode/plugin/swarm-enforcer.ts +6 -6
- package/dist/template/.opencode/skill/beads/SKILL.md +7 -7
- package/dist/template/.opencode/skill/beads-bridge/SKILL.md +3 -3
- package/dist/template/.opencode/skill/session-management/SKILL.md +2 -2
- package/dist/template/.opencode/skill/swarm-coordination/SKILL.md +4 -4
- package/dist/template/.opencode/tool/beads-sync.ts +5 -5
- package/dist/template/.opencode/tool/observation.ts +1 -1
- package/package.json +6 -19
|
@@ -141,11 +141,11 @@ Limit options to 3-5. Recommend best option first.
|
|
|
141
141
|
|
|
142
142
|
### The Three Blockers
|
|
143
143
|
|
|
144
|
-
These are hard gates that must be passed before proceeding. First, DO NOT start major work without running `
|
|
144
|
+
These are hard gates that must be passed before proceeding. First, DO NOT start major work without running `br show <id>` to understand the task context. Understanding the task context enables everything that follows, so skipping this blocks your ability to work effectively. Second, DO NOT generate ANY URL yourself. If you need an external link, either the user provides it or you use @scout to fetch verified information. Guessing URLs leads to hallucinated documentation and broken references. Third, DO NOT claim completion without running `br close <id>` to mark the task as done. Claiming work is finished without closing the task breaks the tracking system and loses context.
|
|
145
145
|
|
|
146
146
|
### Verification chain
|
|
147
147
|
|
|
148
|
-
Think of these checkpoints as a chain where each step enables the next. Running `
|
|
148
|
+
Think of these checkpoints as a chain where each step enables the next. Running `br show <id>` gives you task context, which enables you to proceed with confidence. Verifying links through fetch before using them enables you to trust your sources. Running `br close <id>` marks you as complete and finalizes the state.
|
|
149
149
|
|
|
150
150
|
### No guessing protocol
|
|
151
151
|
|
|
@@ -331,15 +331,15 @@ Beads is a git-backed task tracking system. Tasks have IDs, statuses, and depend
|
|
|
331
331
|
|
|
332
332
|
### Leader protocol for build and plan agents
|
|
333
333
|
|
|
334
|
-
Only build and plan agents own the beads database. Subagents work read-only and report findings back to their leader. The leader follows this chain: run `
|
|
334
|
+
Only build and plan agents own the beads database. Subagents work read-only and report findings back to their leader. The leader follows this chain: run `br ready` to find unblocked work, run `br update <id> --status in_progress` to claim the task, do the editing work, run `br close <id> --reason "..."` to mark it complete, run `br sync --flush-only` to export changes to JSONL (then git commit/push manually), and then restart the session. Skipping any step breaks the tracking flow.
|
|
335
335
|
|
|
336
336
|
### Subagent protocol
|
|
337
337
|
|
|
338
|
-
Subagents must not modify beads state. When a subagent needs task information, read it with `
|
|
338
|
+
Subagents must not modify beads state. When a subagent needs task information, read it with `br show <id>`. Report findings back to the leader agent rather than making decisions yourself. Let the leader agent update task status. This keeps the tracking system clean and ensures only one agent controls each task's state.
|
|
339
339
|
|
|
340
340
|
### Checkpoints before claiming done
|
|
341
341
|
|
|
342
|
-
Before you claim work is complete, verify these things have happened. You ran `
|
|
342
|
+
Before you claim work is complete, verify these things have happened. You ran `br update <id> --status in_progress` when you started. You completed the actual editing work. You ran `br close <id> --reason "..."` with a meaningful reason explaining what you did. You ran `br sync --flush-only` to export changes to JSONL (then git commit/push). If any of these are missing, the work is not done.
|
|
343
343
|
|
|
344
344
|
### Atomic Version
|
|
345
345
|
|
|
@@ -474,8 +474,8 @@ Before you claim completion, verify these things:
|
|
|
474
474
|
|
|
475
475
|
If review suggests simplification, implement it before proceeding.
|
|
476
476
|
|
|
477
|
-
3. You ran `
|
|
478
|
-
4. You ran `
|
|
477
|
+
3. You ran `br close <id>` with a meaningful reason
|
|
478
|
+
4. You ran `br sync --flush-only` to export changes
|
|
479
479
|
5. There are no pending LSP nudges
|
|
480
480
|
6. You saved observations for any important decisions or patterns
|
|
481
481
|
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
description: Leader agent for plan execution and parallel task coordination via Task tool.
|
|
3
3
|
mode: primary
|
|
4
4
|
temperature: 0.2
|
|
5
|
-
steps: 50
|
|
6
5
|
permission:
|
|
7
6
|
bash:
|
|
8
7
|
"*": allow
|
|
@@ -335,7 +334,7 @@ PARALLEL FLOW:
|
|
|
335
334
|
3. Task({ subagent_type: "...", prompt: "..." }) → Spawn workers
|
|
336
335
|
4. Wait for results (automatic)
|
|
337
336
|
5. Synthesize and verify
|
|
338
|
-
6.
|
|
337
|
+
6. br close <bead>
|
|
339
338
|
|
|
340
339
|
SINGLE FLOW:
|
|
341
340
|
Read → Edit → Verify → Repeat → Close
|
|
@@ -45,7 +45,7 @@ Review findings for:
|
|
|
45
45
|
## Load Bead Context
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
|
-
|
|
48
|
+
br show $ARGUMENTS
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
Check what artifacts already exist:
|
|
@@ -308,4 +308,4 @@ Next: /research $ARGUMENTS (optional)
|
|
|
308
308
|
| ------------------ | ---------------------- |
|
|
309
309
|
| Research first | `/research $ARGUMENTS` |
|
|
310
310
|
| Plan after spec | `/plan $ARGUMENTS` |
|
|
311
|
-
| Create bead itself | `
|
|
311
|
+
| Create bead itself | `br create "Title"` |
|
|
@@ -44,7 +44,7 @@ Don't grind past diminishing returns. A clean handoff beats degraded output.
|
|
|
44
44
|
|
|
45
45
|
Get current task status:
|
|
46
46
|
|
|
47
|
-
!`
|
|
47
|
+
!`br show $ARGUMENTS`
|
|
48
48
|
|
|
49
49
|
Get git state:
|
|
50
50
|
|
|
@@ -178,7 +178,7 @@ Start next session with: `/resume $ARGUMENTS`
|
|
|
178
178
|
## Sync State
|
|
179
179
|
|
|
180
180
|
```bash
|
|
181
|
-
|
|
181
|
+
br sync --flush-only
|
|
182
182
|
```
|
|
183
183
|
|
|
184
184
|
This commits the handoff and pushes to remote.
|
|
@@ -28,7 +28,7 @@ skill({ name: "memory-system" });
|
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
|
-
|
|
31
|
+
br show $ARGUMENTS
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
Check for existing artifacts:
|
|
@@ -288,47 +288,47 @@ With user approval or `--create-beads` flag:
|
|
|
288
288
|
PARENT=$ARGUMENTS
|
|
289
289
|
|
|
290
290
|
# Task 1 (no blockers - starts immediately)
|
|
291
|
-
|
|
291
|
+
br create "[Task 1 title]" -t task -p 2
|
|
292
292
|
# Capture: bd-xxx1
|
|
293
293
|
|
|
294
294
|
# Link to parent
|
|
295
|
-
|
|
295
|
+
br dep add bd-xxx1 $PARENT
|
|
296
296
|
|
|
297
297
|
# Task 2 (blocked by Task 1)
|
|
298
|
-
|
|
298
|
+
br create "[Task 2 title]" -t task -p 2
|
|
299
299
|
# Capture: bd-xxx2
|
|
300
300
|
|
|
301
|
-
|
|
302
|
-
|
|
301
|
+
br dep add bd-xxx2 $PARENT
|
|
302
|
+
br dep add bd-xxx2 bd-xxx1 --type blocks
|
|
303
303
|
|
|
304
304
|
# Task 3 (blocked by Task 2)
|
|
305
|
-
|
|
305
|
+
br create "[Task 3 title]" -t task -p 2
|
|
306
306
|
# Capture: bd-xxx3
|
|
307
307
|
|
|
308
|
-
|
|
309
|
-
|
|
308
|
+
br dep add bd-xxx3 $PARENT
|
|
309
|
+
br dep add bd-xxx3 bd-xxx2 --type blocks
|
|
310
310
|
```
|
|
311
311
|
|
|
312
312
|
### Create Subtasks (for complex tasks)
|
|
313
313
|
|
|
314
314
|
```bash
|
|
315
315
|
# For Task 2, create subtasks:
|
|
316
|
-
|
|
316
|
+
br create "[Subtask 2.1 title]" -t subtask -p 2
|
|
317
317
|
# Capture: bd-xxx2.1
|
|
318
318
|
|
|
319
|
-
|
|
319
|
+
br dep add bd-xxx2.1 bd-xxx2
|
|
320
320
|
|
|
321
|
-
|
|
321
|
+
br create "[Subtask 2.2 title]" -t subtask -p 2
|
|
322
322
|
# Capture: bd-xxx2.2
|
|
323
323
|
|
|
324
|
-
|
|
325
|
-
|
|
324
|
+
br dep add bd-xxx2.2 bd-xxx2
|
|
325
|
+
br dep add bd-xxx2.2 bd-xxx2.1 --type blocks # Sequential dependency
|
|
326
326
|
```
|
|
327
327
|
|
|
328
328
|
### Verify Hierarchy
|
|
329
329
|
|
|
330
330
|
```bash
|
|
331
|
-
|
|
331
|
+
br dep tree $ARGUMENTS
|
|
332
332
|
```
|
|
333
333
|
|
|
334
334
|
---
|
|
@@ -442,7 +442,7 @@ After creating hierarchy, execute READY tasks in parallel:
|
|
|
442
442
|
|
|
443
443
|
```bash
|
|
444
444
|
# Check what's ready to start
|
|
445
|
-
|
|
445
|
+
br ready --json
|
|
446
446
|
```
|
|
447
447
|
|
|
448
448
|
```typescript
|
|
@@ -473,7 +473,7 @@ for (const taskId of backgroundTaskIds) {
|
|
|
473
473
|
}
|
|
474
474
|
|
|
475
475
|
// Check newly unblocked tasks
|
|
476
|
-
|
|
476
|
+
br ready // → Next wave of tasks now READY
|
|
477
477
|
|
|
478
478
|
// Cleanup
|
|
479
479
|
background_cancel({ all: true })
|
|
@@ -484,7 +484,7 @@ background_cancel({ all: true })
|
|
|
484
484
|
## Phase 8: Sync and Report
|
|
485
485
|
|
|
486
486
|
```bash
|
|
487
|
-
|
|
487
|
+
br sync --flush-only
|
|
488
488
|
```
|
|
489
489
|
|
|
490
490
|
### Output (without child beads)
|
|
@@ -552,4 +552,4 @@ Next: /start bd-xxx1
|
|
|
552
552
|
| Research before plan | `/research <bead-id>` |
|
|
553
553
|
| Start first task | `/start <first-task-id>` |
|
|
554
554
|
| Ship the work | `/ship <bead-id>` |
|
|
555
|
-
| View hierarchy | `
|
|
555
|
+
| View hierarchy | `br dep tree <bead-id>` |
|
|
@@ -108,7 +108,7 @@ Resolve conflicts before creating PR:
|
|
|
108
108
|
**Load bead context (if provided):**
|
|
109
109
|
|
|
110
110
|
```
|
|
111
|
-
!`
|
|
111
|
+
!`br show $ARGUMENTS`
|
|
112
112
|
```
|
|
113
113
|
|
|
114
114
|
**Load artifacts:**
|
|
@@ -257,7 +257,7 @@ CI Status:
|
|
|
257
257
|
## Phase 7: Update Bead & Sync
|
|
258
258
|
|
|
259
259
|
```bash
|
|
260
|
-
|
|
260
|
+
br sync --flush-only
|
|
261
261
|
```
|
|
262
262
|
|
|
263
263
|
## Output
|
|
@@ -18,9 +18,9 @@ skill({ name: "memory-system" });
|
|
|
18
18
|
|
|
19
19
|
## Verify The Task Exists
|
|
20
20
|
|
|
21
|
-
!`
|
|
21
|
+
!`br show $ARGUMENTS`
|
|
22
22
|
|
|
23
|
-
If not found, check `
|
|
23
|
+
If not found, check `br list --status=all`. Maybe it was closed, or you have the wrong ID.
|
|
24
24
|
|
|
25
25
|
## Check Git State
|
|
26
26
|
|
|
@@ -168,7 +168,7 @@ Next: [from handoff resume instructions]
|
|
|
168
168
|
Mark in progress if not already:
|
|
169
169
|
|
|
170
170
|
```bash
|
|
171
|
-
|
|
171
|
+
br update $ARGUMENTS --status in_progress
|
|
172
172
|
```
|
|
173
173
|
|
|
174
174
|
Then continue with implementation:
|
|
@@ -35,7 +35,7 @@ Parse `$ARGUMENTS` to determine what to review:
|
|
|
35
35
|
| Input | Scope | How to Get Code |
|
|
36
36
|
| ------------------------ | ---------------------- | ------------------------------------------- |
|
|
37
37
|
| File/directory path | That path only | `read` or `glob` + `read` |
|
|
38
|
-
| Bead ID (e.g., `
|
|
38
|
+
| Bead ID (e.g., `br-123`) | Implementation vs spec | `br show` then `git diff` from spec |
|
|
39
39
|
| PR number (e.g., `#45`) | PR changes | `gh pr diff 45` |
|
|
40
40
|
| `all` or empty | Recent changes | `git diff main...HEAD` or `git diff HEAD~5` |
|
|
41
41
|
|
|
@@ -123,7 +123,7 @@ Review each category with specific focus:
|
|
|
123
123
|
For each Critical or Important finding:
|
|
124
124
|
|
|
125
125
|
```bash
|
|
126
|
-
|
|
126
|
+
br create "[Review] <brief issue description>" -t bug -p 1
|
|
127
127
|
```
|
|
128
128
|
|
|
129
129
|
Skip creating beads for Minor issues (just report them).
|
|
@@ -43,8 +43,8 @@ Apply past learnings to avoid known issues.
|
|
|
43
43
|
## Verify Task & Claim
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
br show $ARGUMENTS
|
|
47
|
+
br update $ARGUMENTS --status in_progress
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
## Pre-Flight Verification
|
|
@@ -166,8 +166,8 @@ question({
|
|
|
166
166
|
If confirmed:
|
|
167
167
|
|
|
168
168
|
```bash
|
|
169
|
-
|
|
170
|
-
|
|
169
|
+
br close $ARGUMENTS --reason "Shipped: verification + review passed"
|
|
170
|
+
br sync --flush-only
|
|
171
171
|
```
|
|
172
172
|
|
|
173
173
|
## Record Learnings (On Completion)
|
|
@@ -47,7 +47,7 @@ bd hooks install 2>/dev/null || echo "Hooks already installed"
|
|
|
47
47
|
|
|
48
48
|
### Active Tasks
|
|
49
49
|
|
|
50
|
-
!`
|
|
50
|
+
!`br list --status=in_progress`
|
|
51
51
|
|
|
52
52
|
If you have uncommitted changes, ask the user:
|
|
53
53
|
|
|
@@ -59,7 +59,7 @@ If you already have tasks in_progress, warn the user before claiming another.
|
|
|
59
59
|
|
|
60
60
|
## Task Details
|
|
61
61
|
|
|
62
|
-
!`
|
|
62
|
+
!`br show $ARGUMENTS`
|
|
63
63
|
|
|
64
64
|
Identify the task type from the bead:
|
|
65
65
|
|
|
@@ -72,13 +72,13 @@ Identify the task type from the bead:
|
|
|
72
72
|
Check for parent/child relationships:
|
|
73
73
|
|
|
74
74
|
```bash
|
|
75
|
-
|
|
75
|
+
br dep tree $ARGUMENTS 2>/dev/null || echo "No dependencies"
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
## Claim The Task
|
|
79
79
|
|
|
80
80
|
```bash
|
|
81
|
-
|
|
81
|
+
br update $ARGUMENTS --status in_progress
|
|
82
82
|
```
|
|
83
83
|
|
|
84
84
|
## Sync Beads State to OpenCode Todos
|
|
@@ -103,7 +103,7 @@ Extract task info and parent branch for a readable branch name:
|
|
|
103
103
|
PARENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
|
104
104
|
|
|
105
105
|
# Get task title and type from bead
|
|
106
|
-
BEAD_INFO=$(
|
|
106
|
+
BEAD_INFO=$(br show $ARGUMENTS --json 2>/dev/null)
|
|
107
107
|
BEAD_TITLE=$(echo "$BEAD_INFO" | jq -r '.title // ""' | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | cut -c1-40)
|
|
108
108
|
BEAD_TYPE=$(echo "$BEAD_INFO" | jq -r '.type // "task"')
|
|
109
109
|
|
|
@@ -150,7 +150,7 @@ skill({ name: "using-git-worktrees" });
|
|
|
150
150
|
PARENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
|
151
151
|
|
|
152
152
|
# Get task title for readable worktree name
|
|
153
|
-
BEAD_INFO=$(
|
|
153
|
+
BEAD_INFO=$(br show $ARGUMENTS --json 2>/dev/null)
|
|
154
154
|
BEAD_TITLE=$(echo "$BEAD_INFO" | jq -r '.title // ""' | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | cut -c1-40)
|
|
155
155
|
BEAD_TYPE=$(echo "$BEAD_INFO" | jq -r '.type // "task"')
|
|
156
156
|
|
|
@@ -301,7 +301,7 @@ Use swarm planning to analyze the specific task:
|
|
|
301
301
|
|
|
302
302
|
```typescript
|
|
303
303
|
// Get task details from bead
|
|
304
|
-
const beadInfo =
|
|
304
|
+
const beadInfo = br show $ARGUMENTS --json;
|
|
305
305
|
const taskTitle = beadInfo.title;
|
|
306
306
|
const taskDescription = beadInfo.description;
|
|
307
307
|
|
|
@@ -22,9 +22,9 @@ Run all status checks simultaneously:
|
|
|
22
22
|
|
|
23
23
|
```
|
|
24
24
|
# Beads CLI commands
|
|
25
|
-
!`
|
|
26
|
-
!`
|
|
27
|
-
!`
|
|
25
|
+
!`br status`
|
|
26
|
+
!`br list --status in_progress --limit 10`
|
|
27
|
+
!`br list --status ready --limit 10`
|
|
28
28
|
|
|
29
29
|
# Git state
|
|
30
30
|
!`git status --porcelain`
|
|
@@ -284,10 +284,10 @@ If `--bead=<id>` provided:
|
|
|
284
284
|
|
|
285
285
|
```bash
|
|
286
286
|
# Create issues for critical findings
|
|
287
|
-
|
|
287
|
+
br create "[UI] Fix invisible focus states" -t bug -p 1
|
|
288
288
|
|
|
289
289
|
# Then link to parent bead
|
|
290
|
-
|
|
290
|
+
br dep add <task-id> <bead-id>
|
|
291
291
|
```
|
|
292
292
|
|
|
293
293
|
---
|