opencodekit 0.12.1 → 0.12.3
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 +1 -1
- package/dist/template/.opencode/AGENTS.md +40 -417
- package/dist/template/.opencode/agent/build.md +53 -0
- package/dist/template/.opencode/agent/explore.md +6 -6
- package/dist/template/.opencode/agent/planner.md +0 -1
- package/dist/template/.opencode/agent/rush.md +38 -0
- package/dist/template/.opencode/command/accessibility-check.md +1 -1
- package/dist/template/.opencode/command/brainstorm.md +1 -1
- package/dist/template/.opencode/command/commit.md +1 -1
- package/dist/template/.opencode/command/create.md +68 -441
- package/dist/template/.opencode/command/finish.md +82 -252
- package/dist/template/.opencode/command/fix-ci.md +52 -247
- package/dist/template/.opencode/command/fix-types.md +33 -293
- package/dist/template/.opencode/command/fix-ui.md +49 -234
- package/dist/template/.opencode/command/fix.md +57 -194
- package/dist/template/.opencode/command/handoff.md +66 -243
- package/dist/template/.opencode/command/implement.md +67 -231
- package/dist/template/.opencode/command/issue.md +42 -190
- package/dist/template/.opencode/command/new-feature.md +1 -1
- package/dist/template/.opencode/command/plan.md +86 -442
- package/dist/template/.opencode/command/pr.md +3 -1
- package/dist/template/.opencode/command/research-and-implement.md +69 -370
- package/dist/template/.opencode/command/research-ui.md +1 -1
- package/dist/template/.opencode/command/research.md +72 -197
- package/dist/template/.opencode/command/resume.md +70 -438
- package/dist/template/.opencode/command/review-codebase.md +1 -1
- package/dist/template/.opencode/command/status.md +11 -11
- package/dist/template/.opencode/command/triage.md +23 -18
- package/dist/template/.opencode/dcp.jsonc +16 -33
- package/dist/template/.opencode/memory/project/commands.md +176 -5
- package/dist/template/.opencode/memory/project/conventions.md +104 -5
- package/dist/template/.opencode/memory/project/gotchas.md +128 -9
- package/dist/template/.opencode/opencode.json +511 -523
- package/dist/template/.opencode/package.json +1 -1
- package/dist/template/.opencode/plugin/beads.ts +181 -16
- package/dist/template/.opencode/skill/beads/SKILL.md +15 -0
- package/dist/template/.opencode/skill/context-engineering/SKILL.md +94 -0
- package/dist/template/.opencode/skill/memory-system/SKILL.md +107 -0
- package/dist/template/.opencode/skill/session-management/SKILL.md +111 -0
- package/dist/template/.opencode/skill/tool-priority/SKILL.md +115 -0
- package/package.json +1 -1
- package/dist/template/.opencode/tool/lsp.ts +0 -786
|
@@ -1,310 +1,146 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Implement a bead -
|
|
2
|
+
description: Implement a bead - load context, make changes, verify
|
|
3
3
|
argument-hint: "<bead-id>"
|
|
4
4
|
agent: build
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Implement
|
|
7
|
+
# Implement: $ARGUMENTS
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
You're implementing a tracked task. Stay focused, verify as you go, hand off if you hit limits.
|
|
10
|
+
|
|
11
|
+
## First: Load Context
|
|
10
12
|
|
|
11
13
|
```typescript
|
|
12
|
-
skill({ name: "beads" });
|
|
14
|
+
skill({ name: "beads" });
|
|
13
15
|
skill({ name: "test-driven-development" });
|
|
14
16
|
skill({ name: "verification-before-completion" });
|
|
15
17
|
```
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
## Phase 1: Setup Workspace
|
|
20
|
-
|
|
21
|
-
```typescript
|
|
22
|
-
bd_init({ team: "project", role: "<your-role>" });
|
|
23
|
-
bd_show({ id: "$ARGUMENTS" });
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
**Check for messages from other agents:**
|
|
19
|
+
Get the task details and check for messages:
|
|
27
20
|
|
|
28
|
-
```
|
|
29
|
-
|
|
21
|
+
```bash
|
|
22
|
+
bd show $ARGUMENTS
|
|
23
|
+
bd list --status=in_progress # See what else is active
|
|
30
24
|
```
|
|
31
25
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
Check git state:
|
|
26
|
+
Check git state. If dirty, ask whether to stash, commit, or continue:
|
|
35
27
|
|
|
36
28
|
```bash
|
|
37
29
|
git status --porcelain
|
|
38
30
|
git branch --show-current
|
|
39
31
|
```
|
|
40
32
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
Create branch if not on bead branch:
|
|
33
|
+
Create a branch if not already on one for this task:
|
|
44
34
|
|
|
45
35
|
```bash
|
|
46
|
-
git checkout -b
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
**Claim the task:**
|
|
50
|
-
|
|
51
|
-
```typescript
|
|
52
|
-
bd_claim({ reason: "Starting implementation of <bead-id>" });
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
This registers you in the workspace. If another agent is working on the same task, you'll be notified.
|
|
56
|
-
|
|
57
|
-
## Phase 2: Load Context & Estimation
|
|
58
|
-
|
|
59
|
-
**Check for previous session work:**
|
|
60
|
-
|
|
61
|
-
```typescript
|
|
62
|
-
list_sessions({ project: "current", limit: 3 });
|
|
36
|
+
git checkout -b $ARGUMENTS
|
|
63
37
|
```
|
|
64
38
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
```typescript
|
|
68
|
-
read_session({ session_reference: "last", project: "current" });
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
Review what was already attempted/completed.
|
|
72
|
-
|
|
73
|
-
**Load artifacts:**
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
ls .beads/artifacts/<bead-id>/ 2>/dev/null || echo "No artifacts yet"
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
**Extract estimation from spec/plan:**
|
|
80
|
-
|
|
81
|
-
Look for estimate tag (S/M/L/XL) and set budget:
|
|
82
|
-
|
|
83
|
-
| Estimate | Tool Call Budget | Checkpoint Frequency |
|
|
84
|
-
| -------- | ---------------- | -------------------- |
|
|
85
|
-
| S | ~10 | End only |
|
|
86
|
-
| M | ~30 | Every 10 calls |
|
|
87
|
-
| L | ~100 | Every 20 calls |
|
|
88
|
-
| XL | Decomposed | Every step |
|
|
89
|
-
|
|
90
|
-
```
|
|
91
|
-
Implementation Budget:
|
|
92
|
-
━━━━━━━━━━━━━━━━━━━━━
|
|
93
|
-
|
|
94
|
-
Estimate: [S/M/L] (~[N] tool calls)
|
|
95
|
-
Budget: [N] tool calls
|
|
96
|
-
Checkpoint: Every [N] calls
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
**Determine mode:**
|
|
100
|
-
|
|
101
|
-
- **If `plan.md` exists:** Follow the plan step-by-step (Planned Mode)
|
|
102
|
-
- **If `research.md` exists but no plan:** Ask user "Create plan first? Or implement directly?"
|
|
103
|
-
- **If only `spec.md` exists:** Read spec and implement directly (Quick Mode)
|
|
104
|
-
- **If no artifacts:** Read bead description and implement based on that
|
|
105
|
-
|
|
106
|
-
Check for handoffs:
|
|
39
|
+
Mark the task in progress:
|
|
107
40
|
|
|
108
41
|
```bash
|
|
109
|
-
|
|
42
|
+
bd update $ARGUMENTS --status in_progress
|
|
110
43
|
```
|
|
111
44
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
## Phase 3: Detect Project Type
|
|
45
|
+
## Load Artifacts
|
|
115
46
|
|
|
116
|
-
Check
|
|
47
|
+
Check what context exists:
|
|
117
48
|
|
|
118
49
|
```bash
|
|
119
|
-
ls
|
|
50
|
+
ls .beads/artifacts/$ARGUMENTS/ 2>/dev/null || echo "No artifacts"
|
|
120
51
|
```
|
|
121
52
|
|
|
122
|
-
|
|
123
|
-
| ------------------ | --------------- | ------------------------------------ |
|
|
124
|
-
| Node.js/TypeScript | `npm test` | `npm run lint && npm run type-check` |
|
|
125
|
-
| Rust | `cargo test` | `cargo clippy -- -D warnings` |
|
|
126
|
-
| Python | `pytest` | `ruff check . && mypy .` |
|
|
127
|
-
| Go | `go test ./...` | `golangci-lint run` |
|
|
128
|
-
| Make-based | `make test` | `make lint` |
|
|
53
|
+
If `plan.md` exists, follow it step by step. If only `spec.md` exists, implement directly from requirements. If nothing exists, work from the bead description.
|
|
129
54
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
```
|
|
133
|
-
Implementing: <bead-id>
|
|
134
|
-
━━━━━━━━━━━━━━━━━━━━━━
|
|
135
|
-
|
|
136
|
-
Project: [detected type]
|
|
137
|
-
Mode: [Quick/Planned]
|
|
138
|
-
Estimate: [S/M/L] (~[N] tool calls)
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
## Phase 4: Implementation
|
|
142
|
-
|
|
143
|
-
### Check Locks & Reserve Files
|
|
144
|
-
|
|
145
|
-
```typescript
|
|
146
|
-
bd_reservations({ reason: "Checking for conflicts before implementation" });
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
If files you need are locked:
|
|
150
|
-
|
|
151
|
-
- Wait for lock to expire, or
|
|
152
|
-
- Coordinate via `bd_msg`, or
|
|
153
|
-
- Work on different files
|
|
154
|
-
|
|
155
|
-
Reserve files before editing:
|
|
55
|
+
Check for previous session work:
|
|
156
56
|
|
|
157
57
|
```typescript
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
reason: "Implementing <bead-id>",
|
|
161
|
-
ttl: 600,
|
|
162
|
-
});
|
|
58
|
+
list_sessions({ project: "current", limit: 3 });
|
|
59
|
+
read_session({ session_reference: "last", project: "current" });
|
|
163
60
|
```
|
|
164
61
|
|
|
165
|
-
|
|
62
|
+
## Estimate Your Budget
|
|
166
63
|
|
|
167
|
-
|
|
64
|
+
Look at the task complexity and set limits:
|
|
168
65
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
| Budget 80% exhausted | Checkpoint commit, reassess scope |
|
|
174
|
-
| Budget exhausted | `/handoff` with progress summary |
|
|
175
|
-
| Blocked on external dependency | Create blocker bead, move on |
|
|
66
|
+
- **Small** (~10 tool calls): Simple change, one file, clear path
|
|
67
|
+
- **Medium** (~30 tool calls): Multiple files, some exploration needed
|
|
68
|
+
- **Large** (~100 tool calls): Cross-cutting, needs research, checkpoint often
|
|
69
|
+
- **XL**: Should be decomposed into smaller tasks first
|
|
176
70
|
|
|
177
|
-
|
|
71
|
+
If you hit 80% of budget without finishing, create a handoff. Don't push past limits and produce garbage.
|
|
178
72
|
|
|
179
|
-
|
|
73
|
+
## Do The Work
|
|
180
74
|
|
|
181
|
-
|
|
182
|
-
2. Make changes to listed files
|
|
183
|
-
3. Run step verification command
|
|
184
|
-
4. If fails 3x: Use rollback, try different approach
|
|
185
|
-
5. Mark step complete: `- [x]`
|
|
186
|
-
6. **Checkpoint commit** (if L/XL or significant change)
|
|
75
|
+
Detect project type and know your verification commands:
|
|
187
76
|
|
|
188
77
|
```bash
|
|
189
|
-
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
### Without Plan (Quick Mode)
|
|
193
|
-
|
|
194
|
-
1. Read spec requirements and success criteria
|
|
195
|
-
2. Identify files to change
|
|
196
|
-
3. Make minimal, focused changes
|
|
197
|
-
4. Run verification after each logical change
|
|
198
|
-
5. Keep changes atomic and reviewable
|
|
199
|
-
|
|
200
|
-
### Gate Rules
|
|
201
|
-
|
|
202
|
-
| Gate | On Failure |
|
|
203
|
-
| ---------- | ----------------------------------- |
|
|
204
|
-
| Type check | Fix before proceeding |
|
|
205
|
-
| Tests | Fix before proceeding (max 3 tries) |
|
|
206
|
-
| Lint | Auto-fix if possible, else note |
|
|
207
|
-
|
|
208
|
-
### Track Progress
|
|
209
|
-
|
|
210
|
-
After every 10 tool calls (or per checkpoint frequency):
|
|
211
|
-
|
|
78
|
+
ls package.json Cargo.toml pyproject.toml go.mod Makefile 2>/dev/null
|
|
212
79
|
```
|
|
213
|
-
Progress: <bead-id>
|
|
214
|
-
━━━━━━━━━━━━━━━━━━
|
|
215
80
|
|
|
216
|
-
|
|
217
|
-
|
|
81
|
+
Node/TypeScript: `npm test`, `npm run lint && npm run type-check`
|
|
82
|
+
Rust: `cargo test`, `cargo clippy -- -D warnings`
|
|
83
|
+
Python: `pytest`, `ruff check . && mypy .`
|
|
84
|
+
Go: `go test ./...`, `golangci-lint run`
|
|
218
85
|
|
|
219
|
-
|
|
220
|
-
- src/foo.ts:15 - [what changed]
|
|
86
|
+
**Rules while implementing:**
|
|
221
87
|
|
|
222
|
-
|
|
88
|
+
1. Read before edit. Always.
|
|
89
|
+
2. Run verification after each logical change
|
|
90
|
+
3. If something fails 3 times, stop and try a different approach
|
|
91
|
+
4. Checkpoint commit after significant progress: `git commit -m "WIP: $ARGUMENTS - [step]"`
|
|
92
|
+
5. If blocked on external dependency, create a new bead for it and move on
|
|
223
93
|
|
|
224
|
-
|
|
225
|
-
```
|
|
94
|
+
Track your progress. Every 10 tool calls, check: Am I on track? Should I checkpoint? Am I approaching budget?
|
|
226
95
|
|
|
227
|
-
|
|
96
|
+
## Before Claiming Done
|
|
228
97
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
Before claiming done, verify against spec success criteria:
|
|
98
|
+
Verify against success criteria in the spec:
|
|
232
99
|
|
|
233
100
|
```bash
|
|
234
|
-
cat .beads/artifacts
|
|
101
|
+
cat .beads/artifacts/$ARGUMENTS/spec.md | grep -A 20 "Success Criteria"
|
|
235
102
|
```
|
|
236
103
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
- [ ] Run the verification command listed
|
|
240
|
-
- [ ] Confirm it passes
|
|
241
|
-
- [ ] Document result
|
|
104
|
+
Run each verification command. All must pass. No exceptions.
|
|
242
105
|
|
|
243
|
-
|
|
244
|
-
Success Criteria Check:
|
|
245
|
-
━━━━━━━━━━━━━━━━━━━━━━
|
|
106
|
+
Run the full test suite one more time:
|
|
246
107
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
108
|
+
```bash
|
|
109
|
+
# Whatever your project uses
|
|
110
|
+
npm test && npm run type-check
|
|
250
111
|
```
|
|
251
112
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
## Phase 6: Update Memory (if needed)
|
|
113
|
+
## Complete
|
|
255
114
|
|
|
256
|
-
If
|
|
115
|
+
If all gates pass:
|
|
257
116
|
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
file: "project/gotchas",
|
|
262
|
-
content: "## [Issue Title]\n\n[What happened and how to avoid it]",
|
|
263
|
-
mode: "append",
|
|
264
|
-
});
|
|
117
|
+
```bash
|
|
118
|
+
git add -A
|
|
119
|
+
git commit -m "$ARGUMENTS: [summary]"
|
|
265
120
|
```
|
|
266
121
|
|
|
267
|
-
## Phase 7: Complete
|
|
268
|
-
|
|
269
|
-
Release file reservations:
|
|
270
|
-
|
|
271
122
|
```typescript
|
|
272
|
-
|
|
123
|
+
bd_sync({ reason: "Sync implementation progress" });
|
|
273
124
|
```
|
|
274
125
|
|
|
275
|
-
|
|
126
|
+
Report what was done and suggest next step:
|
|
276
127
|
|
|
277
|
-
```bash
|
|
278
|
-
[project-specific test command]
|
|
279
|
-
[project-specific lint command]
|
|
280
128
|
```
|
|
129
|
+
Done: $ARGUMENTS
|
|
281
130
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
bd_sync({ reason: "Implementation complete for <bead-id>" });
|
|
131
|
+
Changes: [files modified]
|
|
132
|
+
Tests: Pass
|
|
133
|
+
Next: /finish $ARGUMENTS
|
|
286
134
|
```
|
|
287
135
|
|
|
288
|
-
|
|
136
|
+
If gates fail, fix them. Don't proceed with broken code.
|
|
289
137
|
|
|
290
|
-
If
|
|
138
|
+
## If You Can't Finish
|
|
291
139
|
|
|
292
|
-
|
|
293
|
-
Implementation Complete: <bead-id>
|
|
294
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
295
|
-
|
|
296
|
-
Tool calls: [actual]/[budget] ([over/under] by [N])
|
|
297
|
-
All gates passed ✓
|
|
298
|
-
All success criteria verified ✓
|
|
140
|
+
Hit budget limit or context getting too large? Create a handoff:
|
|
299
141
|
|
|
300
|
-
Next: /finish <bead-id>
|
|
301
142
|
```
|
|
302
|
-
|
|
303
|
-
If any fail:
|
|
304
|
-
|
|
143
|
+
/handoff $ARGUMENTS "Stopped at [step]. Next: [what to do]"
|
|
305
144
|
```
|
|
306
|
-
Gate failed: [which one]
|
|
307
|
-
Retries: [N]/3
|
|
308
145
|
|
|
309
|
-
|
|
310
|
-
```
|
|
146
|
+
Then start a fresh session. Don't grind past diminishing returns.
|
|
@@ -1,254 +1,106 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: Import GitHub issue as tracked bead
|
|
3
3
|
argument-hint: "<issue-number>"
|
|
4
4
|
agent: build
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
#
|
|
7
|
+
# Issue: $ARGUMENTS
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
You're importing a GitHub issue into beads for tracking.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
skill({ name: "beads" });
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Phase 1: Check for Duplicates
|
|
16
|
-
|
|
17
|
-
Before creating, search for existing similar beads:
|
|
11
|
+
## Check For Duplicates
|
|
18
12
|
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
bd_search({ query: "[keywords from issue title]" });
|
|
22
|
-
|
|
23
|
-
// Or list recent beads
|
|
24
|
-
bd_ls({ status: "all", limit: 20 });
|
|
13
|
+
```bash
|
|
14
|
+
bd list --status=all | grep -i "[keywords from issue]"
|
|
25
15
|
```
|
|
26
16
|
|
|
27
|
-
If similar bead exists
|
|
17
|
+
If similar bead exists, link to it instead of creating duplicate.
|
|
28
18
|
|
|
29
|
-
|
|
30
|
-
- Add to existing bead, or
|
|
31
|
-
- Confirm this is intentionally separate
|
|
32
|
-
|
|
33
|
-
## Phase 2: Fetch GitHub Issue
|
|
19
|
+
## Fetch The Issue
|
|
34
20
|
|
|
35
21
|
```bash
|
|
36
|
-
gh issue view $ARGUMENTS --json title,body,labels,state
|
|
22
|
+
gh issue view $ARGUMENTS --json title,body,labels,state
|
|
37
23
|
```
|
|
38
24
|
|
|
39
25
|
Extract:
|
|
40
26
|
|
|
41
|
-
- **Title
|
|
42
|
-
- **Labels
|
|
43
|
-
- **Body
|
|
44
|
-
|
|
45
|
-
## Phase 3: Analysis
|
|
46
|
-
|
|
47
|
-
Parse the issue content:
|
|
48
|
-
|
|
49
|
-
| Field | Extract From |
|
|
50
|
-
| ------------ | ------------------------------- |
|
|
51
|
-
| **Problem** | What's broken/needed? |
|
|
52
|
-
| **Expected** | What should happen? |
|
|
53
|
-
| **Current** | What happens now? |
|
|
54
|
-
| **Steps** | How to reproduce? |
|
|
55
|
-
| **Files** | Mentioned files or components |
|
|
56
|
-
| **Labels** | bug, feature, enhancement, etc. |
|
|
57
|
-
|
|
58
|
-
## Phase 4: Map Labels & Priority
|
|
59
|
-
|
|
60
|
-
**Label → Tag mapping:**
|
|
61
|
-
|
|
62
|
-
| GitHub Label | Bead Tag |
|
|
63
|
-
| ------------- | -------- |
|
|
64
|
-
| bug | bug |
|
|
65
|
-
| enhancement | feature |
|
|
66
|
-
| feature | feature |
|
|
67
|
-
| documentation | docs |
|
|
68
|
-
| frontend, ui | fe |
|
|
69
|
-
| backend, api | be |
|
|
70
|
-
| mobile | mobile |
|
|
71
|
-
| devops, infra | devops |
|
|
72
|
-
| testing | qa |
|
|
27
|
+
- **Title** - issue title
|
|
28
|
+
- **Labels** - for type/priority mapping
|
|
29
|
+
- **Body** - problem description, reproduction steps
|
|
73
30
|
|
|
74
|
-
|
|
31
|
+
## Map Labels
|
|
75
32
|
|
|
76
|
-
| GitHub
|
|
77
|
-
|
|
|
78
|
-
|
|
|
79
|
-
|
|
|
80
|
-
|
|
|
81
|
-
| low,
|
|
82
|
-
| backlog, P4, nice-to-have | 4 |
|
|
33
|
+
| GitHub Label | Bead Type | Priority |
|
|
34
|
+
| -------------------- | --------- | -------- |
|
|
35
|
+
| bug | bug | 1 |
|
|
36
|
+
| feature, enhancement | feature | 2 |
|
|
37
|
+
| critical, blocker | - | 0 |
|
|
38
|
+
| low, backlog | - | 4 |
|
|
83
39
|
|
|
84
|
-
##
|
|
40
|
+
## Create The Bead
|
|
85
41
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
| Signals | Estimate | Next Step |
|
|
89
|
-
| ------------------------------------- | -------- | ---------- |
|
|
90
|
-
| Single file, obvious fix, clear repro | S (~10) | /implement |
|
|
91
|
-
| Few files, clear scope, known area | M (~30) | /implement |
|
|
92
|
-
| Multiple files, needs investigation | L (~100) | /research |
|
|
93
|
-
| Vague, architectural, cross-cutting | XL | Decompose |
|
|
94
|
-
|
|
95
|
-
## Phase 6: Create Tracking Bead
|
|
96
|
-
|
|
97
|
-
Reserve spec file:
|
|
98
|
-
|
|
99
|
-
```typescript
|
|
100
|
-
bd_reserve({
|
|
101
|
-
paths: [".beads/artifacts/<bead-id>/spec.md"],
|
|
102
|
-
reason: "Creating issue bead",
|
|
103
|
-
ttl: 600,
|
|
104
|
-
});
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
Create bead with mapped values:
|
|
108
|
-
|
|
109
|
-
```typescript
|
|
110
|
-
bd_add({
|
|
111
|
-
title: "<issue title>",
|
|
112
|
-
type: "[bug|feature|task]", // from label mapping
|
|
113
|
-
pri: [0 - 4], // from priority mapping
|
|
114
|
-
tags: ["[role]", "[estimate]"], // e.g., ["fe", "M"]
|
|
115
|
-
desc: "GitHub Issue #$ARGUMENTS",
|
|
116
|
-
});
|
|
42
|
+
```bash
|
|
43
|
+
bd create "[issue title]" -t [type] -p [priority]
|
|
117
44
|
```
|
|
118
45
|
|
|
119
|
-
##
|
|
46
|
+
## Create Spec
|
|
120
47
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
Save to `.beads/artifacts/<bead-id>/spec.md`:
|
|
48
|
+
Write `.beads/artifacts/<bead-id>/spec.md`:
|
|
124
49
|
|
|
125
50
|
```markdown
|
|
126
51
|
# [Issue Title]
|
|
127
52
|
|
|
128
53
|
**Bead:** <bead-id>
|
|
54
|
+
**GitHub:** #$ARGUMENTS
|
|
129
55
|
**Created:** [date]
|
|
130
|
-
**Status:** To Do
|
|
131
|
-
**GitHub Issue:** #$ARGUMENTS
|
|
132
|
-
**Estimate:** [S/M/L/XL] (~[N] tool calls)
|
|
133
56
|
|
|
134
57
|
## Goal
|
|
135
58
|
|
|
136
|
-
[What
|
|
137
|
-
|
|
138
|
-
## Scope
|
|
139
|
-
|
|
140
|
-
**In-Scope:**
|
|
59
|
+
[What we're fixing/building from issue body]
|
|
141
60
|
|
|
142
|
-
|
|
143
|
-
- [Specific functionality to fix/add]
|
|
61
|
+
## Reproduction
|
|
144
62
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
- [What we are NOT touching]
|
|
148
|
-
|
|
149
|
-
## User Flow
|
|
150
|
-
|
|
151
|
-
1. [How user encounters the issue]
|
|
152
|
-
2. [Expected behavior after fix]
|
|
63
|
+
[Steps from issue if bug]
|
|
153
64
|
|
|
154
65
|
## Success Criteria
|
|
155
66
|
|
|
156
|
-
- [ ] [
|
|
157
|
-
- Verify: `[
|
|
158
|
-
- [ ]
|
|
159
|
-
- Verify: `[actual command to test]`
|
|
160
|
-
- [ ] No regression in related functionality
|
|
67
|
+
- [ ] [From issue acceptance criteria]
|
|
68
|
+
- Verify: `[command]`
|
|
69
|
+
- [ ] No regression
|
|
161
70
|
- Verify: `npm test`
|
|
162
71
|
|
|
163
72
|
## Constraints
|
|
164
73
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
- [Required constraint from issue]
|
|
168
|
-
|
|
169
|
-
**Never:**
|
|
170
|
-
|
|
171
|
-
- [Anti-pattern or forbidden action]
|
|
172
|
-
|
|
173
|
-
## Dependencies
|
|
174
|
-
|
|
175
|
-
- [List any prerequisites or blocking tasks]
|
|
176
|
-
|
|
177
|
-
## Notes
|
|
178
|
-
|
|
179
|
-
- **Risks/edge cases:** [What could go wrong]
|
|
180
|
-
- **Testing strategy:** [How to verify fix]
|
|
181
|
-
- **Related issues:** [Link to related GitHub issues]
|
|
74
|
+
[From issue if any]
|
|
182
75
|
```
|
|
183
76
|
|
|
184
|
-
##
|
|
185
|
-
|
|
186
|
-
Add bead reference back to GitHub:
|
|
77
|
+
## Comment On GitHub
|
|
187
78
|
|
|
188
79
|
```bash
|
|
189
80
|
gh issue comment $ARGUMENTS --body "Tracking: \`<bead-id>\`
|
|
190
81
|
|
|
191
|
-
Estimate: [S/M/L
|
|
82
|
+
Estimate: [S/M/L]
|
|
192
83
|
Next: [/implement or /research]"
|
|
193
84
|
```
|
|
194
85
|
|
|
195
|
-
##
|
|
196
|
-
|
|
197
|
-
For multi-agent workflows:
|
|
86
|
+
## Sync
|
|
198
87
|
|
|
199
88
|
```typescript
|
|
200
|
-
|
|
89
|
+
bd_sync({ reason: "Sync imported issue" });
|
|
201
90
|
```
|
|
202
91
|
|
|
203
|
-
##
|
|
92
|
+
## Output
|
|
204
93
|
|
|
205
|
-
```typescript
|
|
206
|
-
bd_release({ _: true });
|
|
207
|
-
bd_sync({ reason: "Created bead for issue #$ARGUMENTS" });
|
|
208
94
|
```
|
|
209
|
-
|
|
210
|
-
```
|
|
211
|
-
Issue Imported: #$ARGUMENTS
|
|
212
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
95
|
+
Imported: #$ARGUMENTS
|
|
213
96
|
|
|
214
97
|
Bead: <bead-id>
|
|
215
98
|
Type: [bug/feature/task]
|
|
216
99
|
Priority: [0-4]
|
|
217
|
-
Estimate: [S/M/L/XL] (~[N] tool calls)
|
|
218
|
-
|
|
219
|
-
Labels mapped: [list]
|
|
220
|
-
Tags: [list]
|
|
221
|
-
|
|
222
100
|
Spec: .beads/artifacts/<bead-id>/spec.md
|
|
223
|
-
GitHub: Commented with bead reference ✓
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
**Next steps by estimate:**
|
|
227
|
-
|
|
228
|
-
| Estimate | Command |
|
|
229
|
-
| -------- | ---------------------- |
|
|
230
|
-
| S/M | `/implement <bead-id>` |
|
|
231
|
-
| L | `/research <bead-id>` |
|
|
232
|
-
| XL | Decompose first |
|
|
233
|
-
|
|
234
|
-
## Discovered Work
|
|
235
101
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
title: "<discovered issue>",
|
|
241
|
-
type: "task",
|
|
242
|
-
pri: 2,
|
|
243
|
-
parent: "<parent-bead-id>",
|
|
244
|
-
tags: ["[role]", "[estimate]"],
|
|
245
|
-
});
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
Report discovered work:
|
|
249
|
-
|
|
250
|
-
```
|
|
251
|
-
Discovered Work:
|
|
252
|
-
- <child-bead-id>: [title] ([estimate])
|
|
253
|
-
- <child-bead-id>: [title] ([estimate])
|
|
102
|
+
Next:
|
|
103
|
+
- S/M estimate: /implement <bead-id>
|
|
104
|
+
- L estimate: /research <bead-id>
|
|
105
|
+
- XL: Decompose first
|
|
254
106
|
```
|
|
@@ -39,7 +39,7 @@ bd_ls({ status: "all", limit: 20, offset: 0 })
|
|
|
39
39
|
|
|
40
40
|
# Analyze codebase structure
|
|
41
41
|
glob pattern="src/**/*.{ts,tsx,py}"
|
|
42
|
-
|
|
42
|
+
lsp_lsp_workspace_symbols({ query: "[relevant-terms]" })
|
|
43
43
|
|
|
44
44
|
# Check recent changes in related areas
|
|
45
45
|
git log --oneline -10 -- src/[relevant-path]/
|