opencodekit 0.10.0 → 0.11.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.
- package/dist/index.js +1 -1
- package/dist/template/.opencode/agent/planner.md +3 -2
- package/dist/template/.opencode/command/accessibility-check.md +293 -30
- package/dist/template/.opencode/command/analyze-mockup.md +406 -20
- package/dist/template/.opencode/command/analyze-project.md +439 -30
- package/dist/template/.opencode/command/brainstorm.md +288 -5
- package/dist/template/.opencode/command/commit.md +226 -17
- package/dist/template/.opencode/command/create.md +138 -35
- package/dist/template/.opencode/command/design-audit.md +477 -29
- package/dist/template/.opencode/command/design.md +609 -6
- package/dist/template/.opencode/command/edit-image.md +223 -20
- package/dist/template/.opencode/command/finish.md +162 -71
- package/dist/template/.opencode/command/fix-ci.md +296 -24
- package/dist/template/.opencode/command/fix-types.md +345 -13
- package/dist/template/.opencode/command/fix-ui.md +293 -13
- package/dist/template/.opencode/command/fix.md +256 -9
- package/dist/template/.opencode/command/generate-diagram.md +327 -26
- package/dist/template/.opencode/command/generate-icon.md +266 -22
- package/dist/template/.opencode/command/generate-image.md +232 -12
- package/dist/template/.opencode/command/generate-pattern.md +234 -20
- package/dist/template/.opencode/command/generate-storyboard.md +231 -21
- package/dist/template/.opencode/command/handoff.md +202 -30
- package/dist/template/.opencode/command/implement.md +162 -50
- package/dist/template/.opencode/command/import-plan.md +247 -51
- package/dist/template/.opencode/command/init.md +154 -35
- package/dist/template/.opencode/command/integration-test.md +405 -24
- package/dist/template/.opencode/command/issue.md +171 -21
- package/dist/template/.opencode/command/new-feature.md +382 -54
- package/dist/template/.opencode/command/plan.md +144 -118
- package/dist/template/.opencode/command/pr.md +229 -28
- package/dist/template/.opencode/command/quick-build.md +234 -5
- package/dist/template/.opencode/command/research-and-implement.md +436 -12
- package/dist/template/.opencode/command/research-ui.md +444 -34
- package/dist/template/.opencode/command/research.md +173 -45
- package/dist/template/.opencode/command/restore-image.md +416 -22
- package/dist/template/.opencode/command/resume.md +439 -63
- package/dist/template/.opencode/command/revert-feature.md +341 -64
- package/dist/template/.opencode/command/review-codebase.md +193 -4
- package/dist/template/.opencode/command/skill-create.md +506 -14
- package/dist/template/.opencode/command/skill-optimize.md +487 -16
- package/dist/template/.opencode/command/status.md +320 -60
- package/dist/template/.opencode/command/summarize.md +374 -33
- package/dist/template/.opencode/command/triage.md +355 -0
- package/dist/template/.opencode/command/ui-review.md +292 -25
- package/dist/template/.opencode/skill/playwriter/SKILL.md +148 -0
- package/package.json +1 -1
|
@@ -1,40 +1,243 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Edit image with natural language instructions
|
|
3
|
-
argument-hint: "<image-path> <edit-instruction>"
|
|
3
|
+
argument-hint: "<image-path> <edit-instruction> [--hd] [--preserve-size] [--compare]"
|
|
4
4
|
agent: vision
|
|
5
5
|
model: proxypal/gemini-3-pro-image-preview
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Edit Image: $ARGUMENTS
|
|
9
9
|
|
|
10
|
-
Edit an existing image using natural language.
|
|
10
|
+
Edit an existing image using natural language instructions.
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## Parse Arguments
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Extract from `$ARGUMENTS`:
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
| Argument | Required | Description |
|
|
17
|
+
| ----------------- | -------- | ------------------------------ |
|
|
18
|
+
| Image path | Yes | Path to source image |
|
|
19
|
+
| Edit instruction | Yes | Natural language edit request |
|
|
20
|
+
| `--hd` | No | Higher quality output (slower) |
|
|
21
|
+
| `--preserve-size` | No | Maintain original dimensions |
|
|
22
|
+
| `--compare` | No | Output before/after comparison |
|
|
18
23
|
|
|
19
|
-
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Edit Types & What Works
|
|
27
|
+
|
|
28
|
+
### Works Well
|
|
29
|
+
|
|
30
|
+
| Edit Type | Example | Success Rate |
|
|
31
|
+
| -------------------------- | ----------------------------------------- | ------------ |
|
|
32
|
+
| **Background removal** | "remove the background" | High |
|
|
33
|
+
| **Background replacement** | "replace background with beach sunset" | High |
|
|
34
|
+
| **Color changes** | "change the shirt to blue" | High |
|
|
35
|
+
| **Style transfer** | "make it look like a watercolor painting" | High |
|
|
36
|
+
| **Add elements** | "add a hat to the person" | Medium-High |
|
|
37
|
+
| **Remove objects** | "remove the car from the image" | Medium-High |
|
|
38
|
+
| **Lighting adjustments** | "make it look like golden hour" | High |
|
|
39
|
+
| **Extend canvas** | "extend the image to the right" | Medium |
|
|
20
40
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
41
|
+
### Works Poorly (Set Expectations)
|
|
42
|
+
|
|
43
|
+
| Edit Type | Why It's Hard | Alternative |
|
|
44
|
+
| ------------------------------- | ------------------------------ | ----------------------- |
|
|
45
|
+
| **Text changes** | AI struggles with precise text | Use image editor |
|
|
46
|
+
| **Face/hand details** | Often distorts | Mask specific region |
|
|
47
|
+
| **Precise positioning** | "Move object 50px left" | Use coordinates in mask |
|
|
48
|
+
| **Multiple simultaneous edits** | Conflicts | Do one edit at a time |
|
|
49
|
+
| **Preserving fine details** | May blur/change | Use `--preserve-size` |
|
|
50
|
+
|
|
51
|
+
---
|
|
25
52
|
|
|
26
53
|
## Process
|
|
27
54
|
|
|
28
|
-
1. Load
|
|
29
|
-
2.
|
|
30
|
-
3.
|
|
31
|
-
4.
|
|
55
|
+
1. **Load** the source image from path
|
|
56
|
+
2. **Analyze** the original (note key features to preserve)
|
|
57
|
+
3. **Interpret** the edit instruction
|
|
58
|
+
4. **Apply** the edit, preserving unaffected areas
|
|
59
|
+
5. **Save** with versioning to track iterations
|
|
60
|
+
6. **Compare** if `--compare` flag set
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Common Edit Patterns
|
|
65
|
+
|
|
66
|
+
### Background Operations
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
# Remove background (transparent)
|
|
70
|
+
/edit-image photo.jpg remove the background
|
|
71
|
+
|
|
72
|
+
# Replace background
|
|
73
|
+
/edit-image photo.jpg replace background with a modern office
|
|
74
|
+
|
|
75
|
+
# Extend/outpaint
|
|
76
|
+
/edit-image landscape.jpg extend the sky upward
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Color & Style
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
# Color change
|
|
83
|
+
/edit-image product.jpg change the product color to red
|
|
84
|
+
|
|
85
|
+
# Style transfer
|
|
86
|
+
/edit-image photo.jpg convert to anime style
|
|
87
|
+
|
|
88
|
+
# Mood change
|
|
89
|
+
/edit-image scene.jpg make it look like nighttime with city lights
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Object Manipulation
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
# Add object
|
|
96
|
+
/edit-image room.jpg add a plant in the corner
|
|
97
|
+
|
|
98
|
+
# Remove object
|
|
99
|
+
/edit-image street.jpg remove the person on the left
|
|
100
|
+
|
|
101
|
+
# Replace object
|
|
102
|
+
/edit-image desk.jpg replace the laptop with a typewriter
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Enhancement
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
# Lighting
|
|
109
|
+
/edit-image portrait.jpg add dramatic studio lighting
|
|
110
|
+
|
|
111
|
+
# Quality
|
|
112
|
+
/edit-image old-photo.jpg enhance and sharpen, remove grain --hd
|
|
113
|
+
|
|
114
|
+
# Composition
|
|
115
|
+
/edit-image product.jpg add subtle shadow underneath
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
---
|
|
32
119
|
|
|
33
120
|
## Output
|
|
34
121
|
|
|
35
|
-
|
|
122
|
+
### Standard Output
|
|
123
|
+
|
|
124
|
+
```markdown
|
|
125
|
+
## Edit Complete
|
|
126
|
+
|
|
127
|
+
**Source:** `path/to/original.jpg`
|
|
128
|
+
**Edit:** "remove the background"
|
|
129
|
+
**Output:** `.opencode/memory/design/edited/original-v1-bg-removed.png`
|
|
130
|
+
|
|
131
|
+
### Original Analysis
|
|
132
|
+
|
|
133
|
+
- Dimensions: 1920x1080
|
|
134
|
+
- Key elements: Person in center, office background
|
|
135
|
+
- Preserved: Person, clothing, pose
|
|
136
|
+
|
|
137
|
+
### Edit Applied
|
|
138
|
+
|
|
139
|
+
- Background detected and removed
|
|
140
|
+
- Edges refined with feathering
|
|
141
|
+
- Output format: PNG (transparent)
|
|
142
|
+
|
|
143
|
+
### Refinements Available
|
|
144
|
+
|
|
145
|
+
- "Soften the edges more"
|
|
146
|
+
- "Keep the shadow underneath"
|
|
147
|
+
- "Make background white instead of transparent"
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Comparison Output (--compare)
|
|
151
|
+
|
|
152
|
+
```markdown
|
|
153
|
+
## Before/After Comparison
|
|
154
|
+
|
|
155
|
+
| Aspect | Before | After |
|
|
156
|
+
| ---------- | ------------ | ----------- |
|
|
157
|
+
| Background | Office scene | Transparent |
|
|
158
|
+
| Subject | Unchanged | Unchanged |
|
|
159
|
+
| Dimensions | 1920x1080 | 1920x1080 |
|
|
160
|
+
| File size | 450KB | 380KB |
|
|
161
|
+
|
|
162
|
+
**Visual diff:** Key changes highlighted in output
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Version History
|
|
168
|
+
|
|
169
|
+
Edits are saved with version tracking:
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
.opencode/memory/design/edited/
|
|
173
|
+
├── photo-v1-bg-removed.png # First edit
|
|
174
|
+
├── photo-v2-color-change.png # Second edit
|
|
175
|
+
├── photo-v3-add-shadow.png # Third edit
|
|
176
|
+
└── photo-history.json # Edit history
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
**History file:**
|
|
180
|
+
|
|
181
|
+
```json
|
|
182
|
+
{
|
|
183
|
+
"source": "photo.jpg",
|
|
184
|
+
"edits": [
|
|
185
|
+
{ "v": 1, "instruction": "remove background", "timestamp": "..." },
|
|
186
|
+
{ "v": 2, "instruction": "change shirt to blue", "timestamp": "..." }
|
|
187
|
+
]
|
|
188
|
+
}
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
To revert: Reference previous version as source.
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Tips for Better Results
|
|
196
|
+
|
|
197
|
+
1. **Be specific**: "Add a red baseball cap" > "add a hat"
|
|
198
|
+
2. **One edit at a time**: Chain simple edits for complex changes
|
|
199
|
+
3. **Describe what to keep**: "Change background but keep the shadow"
|
|
200
|
+
4. **Use style references**: "Make it look like a Pixar movie"
|
|
201
|
+
5. **Specify format needs**: "Remove background, keep as PNG with transparency"
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## Limitations
|
|
206
|
+
|
|
207
|
+
- **Text editing**: AI cannot reliably modify or add text
|
|
208
|
+
- **Precise geometry**: Exact pixel-level positioning not supported
|
|
209
|
+
- **Faces**: May alter facial features unintentionally
|
|
210
|
+
- **Hands**: Often produces artifacts
|
|
211
|
+
- **Multiple subjects**: May struggle to isolate specific elements
|
|
212
|
+
- **Brand logos**: May distort or refuse (safety filters)
|
|
213
|
+
|
|
214
|
+
For precise edits, consider: Photoshop, GIMP, or Figma.
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## Examples
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
# Basic edit
|
|
222
|
+
/edit-image screenshot.png remove the background
|
|
223
|
+
|
|
224
|
+
# High quality with comparison
|
|
225
|
+
/edit-image product.jpg enhance lighting and add reflection --hd --compare
|
|
226
|
+
|
|
227
|
+
# Preserve dimensions
|
|
228
|
+
/edit-image banner.png change the color scheme to dark mode --preserve-size
|
|
229
|
+
|
|
230
|
+
# Style transfer
|
|
231
|
+
/edit-image photo.jpg convert to oil painting style --hd
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## Related Commands
|
|
36
237
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
238
|
+
| Need | Command |
|
|
239
|
+
| ------------------ | ----------------- |
|
|
240
|
+
| Generate new image | `/generate-image` |
|
|
241
|
+
| Analyze image | `/analyze-mockup` |
|
|
242
|
+
| Restore old photo | `/restore-image` |
|
|
243
|
+
| Create icon | `/generate-icon` |
|
|
@@ -8,15 +8,20 @@ agent: build
|
|
|
8
8
|
|
|
9
9
|
**Load skills:**
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
```typescript
|
|
12
|
+
skill({ name: "verification-before-completion" });
|
|
13
|
+
skill({ name: "finishing-a-development-branch" });
|
|
14
|
+
```
|
|
13
15
|
|
|
14
|
-
## Phase 1: Load Bead
|
|
16
|
+
## Phase 1: Load Bead & Check Messages
|
|
15
17
|
|
|
16
18
|
```typescript
|
|
17
19
|
bd_show({ id: "$ARGUMENTS" });
|
|
20
|
+
bd_inbox({ n: 5, unread: true, global: false });
|
|
18
21
|
```
|
|
19
22
|
|
|
23
|
+
Review any messages about this bead before proceeding.
|
|
24
|
+
|
|
20
25
|
Verify status is `in-progress` or `open`.
|
|
21
26
|
|
|
22
27
|
## Phase 2: Detect Project Type
|
|
@@ -27,50 +32,24 @@ Check which project files exist to determine verification commands:
|
|
|
27
32
|
ls package.json Cargo.toml pyproject.toml setup.py Makefile go.mod 2>/dev/null || true
|
|
28
33
|
```
|
|
29
34
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
**Rust** (`Cargo.toml` exists):
|
|
38
|
-
|
|
39
|
-
- Build: `cargo build`
|
|
40
|
-
- Test: `cargo test`
|
|
41
|
-
- Lint: `cargo clippy -- -D warnings`
|
|
42
|
-
|
|
43
|
-
**Python** (`pyproject.toml` or `setup.py` exists):
|
|
44
|
-
|
|
45
|
-
- Test: `pytest`
|
|
46
|
-
- Lint: `ruff check .` or `flake8`
|
|
47
|
-
- Type check: `mypy .`
|
|
35
|
+
| Project Type | Build | Test | Lint |
|
|
36
|
+
| ------------------ | ---------------- | --------------- | ----------------------------- |
|
|
37
|
+
| Node.js/TypeScript | `npm run build` | `npm test` | `npm run lint && type-check` |
|
|
38
|
+
| Rust | `cargo build` | `cargo test` | `cargo clippy -- -D warnings` |
|
|
39
|
+
| Python | - | `pytest` | `ruff check . && mypy .` |
|
|
40
|
+
| Go | `go build ./...` | `go test ./...` | `golangci-lint run` |
|
|
41
|
+
| Make-based | `make build` | `make test` | `make lint` |
|
|
48
42
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
- Build: `go build ./...`
|
|
52
|
-
- Test: `go test ./...`
|
|
53
|
-
- Lint: `golangci-lint run`
|
|
54
|
-
|
|
55
|
-
**Make-based** (`Makefile` exists, no other markers):
|
|
56
|
-
|
|
57
|
-
- Build: `make build`
|
|
58
|
-
- Test: `make test`
|
|
59
|
-
- Lint: `make lint`
|
|
60
|
-
|
|
61
|
-
**No recognized files:** Skip automated gates, proceed to Phase 4.
|
|
62
|
-
|
|
63
|
-
Check if each command actually exists before running (e.g., verify script exists in `package.json`).
|
|
43
|
+
Check if each command actually exists before running.
|
|
64
44
|
|
|
65
45
|
## Phase 3: Hard Gates (MUST ALL PASS)
|
|
66
46
|
|
|
67
|
-
Run detected verification commands. Skip any that don't exist
|
|
68
|
-
|
|
69
|
-
Report:
|
|
47
|
+
Run detected verification commands. Skip any that don't exist.
|
|
70
48
|
|
|
71
49
|
```
|
|
72
50
|
Finish Gates: <bead-id>
|
|
73
51
|
━━━━━━━━━━━━━━━━━━━━━━
|
|
52
|
+
|
|
74
53
|
Project: [detected type]
|
|
75
54
|
|
|
76
55
|
Build: [✓/✗/skipped]
|
|
@@ -97,13 +76,19 @@ Read spec:
|
|
|
97
76
|
cat .beads/artifacts/<bead-id>/spec.md
|
|
98
77
|
```
|
|
99
78
|
|
|
100
|
-
Check each success criterion:
|
|
79
|
+
Check each success criterion with its verification command:
|
|
101
80
|
|
|
102
81
|
```
|
|
103
82
|
Success Criteria:
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
- [
|
|
83
|
+
━━━━━━━━━━━━━━━━
|
|
84
|
+
|
|
85
|
+
- [x] [Criterion 1]
|
|
86
|
+
Verify: `[command]` ✓
|
|
87
|
+
- [x] [Criterion 2]
|
|
88
|
+
Verify: `[command]` ✓
|
|
89
|
+
- [ ] [Criterion 3] - NOT MET
|
|
90
|
+
Verify: `[command]` ✗
|
|
91
|
+
Reason: [what failed]
|
|
107
92
|
```
|
|
108
93
|
|
|
109
94
|
**If any criterion not met: STOP.**
|
|
@@ -115,7 +100,38 @@ Missing:
|
|
|
115
100
|
- [Criterion] - [what's needed]
|
|
116
101
|
```
|
|
117
102
|
|
|
118
|
-
## Phase 5:
|
|
103
|
+
## Phase 5: Verify ADR (for L/XL tasks)
|
|
104
|
+
|
|
105
|
+
Check if spec indicated L/XL complexity:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
cat .beads/artifacts/<bead-id>/adr.md 2>/dev/null || echo "No ADR"
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
For L/XL tasks, ADR should exist documenting the design decision.
|
|
112
|
+
|
|
113
|
+
If missing and was L/XL: Warn but don't block.
|
|
114
|
+
|
|
115
|
+
## Phase 6: Calculate Estimation Accuracy
|
|
116
|
+
|
|
117
|
+
Extract estimate from spec/plan and compare to actual:
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
Estimation Accuracy:
|
|
121
|
+
━━━━━━━━━━━━━━━━━━━
|
|
122
|
+
|
|
123
|
+
Estimated: [S/M/L] (~[N] tool calls)
|
|
124
|
+
Actual: [N] tool calls
|
|
125
|
+
Variance: [+/-N%] ([over/under]estimated)
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**Learning signals:**
|
|
129
|
+
|
|
130
|
+
- > 50% over: Task was harder than expected. Document why in review.
|
|
131
|
+
- > 50% under: Task was easier. Consider if similar tasks should be estimated lower.
|
|
132
|
+
- Within 20%: Good estimate. Pattern worth remembering.
|
|
133
|
+
|
|
134
|
+
## Phase 7: Create Review
|
|
119
135
|
|
|
120
136
|
Write `.beads/artifacts/<bead-id>/review.md`:
|
|
121
137
|
|
|
@@ -125,6 +141,16 @@ Write `.beads/artifacts/<bead-id>/review.md`:
|
|
|
125
141
|
**Bead:** <bead-id>
|
|
126
142
|
**Completed:** <date>
|
|
127
143
|
|
|
144
|
+
## Estimation Accuracy
|
|
145
|
+
|
|
146
|
+
| Metric | Value |
|
|
147
|
+
| --------- | -------------------- |
|
|
148
|
+
| Estimated | [S/M/L] (~[N] calls) |
|
|
149
|
+
| Actual | [N] calls |
|
|
150
|
+
| Variance | [+/-N%] |
|
|
151
|
+
|
|
152
|
+
**Why variance?** [If significant, explain]
|
|
153
|
+
|
|
128
154
|
## Changes Made
|
|
129
155
|
|
|
130
156
|
| File | Change |
|
|
@@ -136,13 +162,18 @@ Write `.beads/artifacts/<bead-id>/review.md`:
|
|
|
136
162
|
|
|
137
163
|
- [Thing that went well]
|
|
138
164
|
|
|
165
|
+
## What Was Difficult
|
|
166
|
+
|
|
167
|
+
- [Challenge encountered and how resolved]
|
|
168
|
+
|
|
139
169
|
## What Was Skipped
|
|
140
170
|
|
|
141
171
|
- [Thing intentionally not done and why]
|
|
142
172
|
|
|
143
|
-
##
|
|
173
|
+
## Lessons Learned
|
|
144
174
|
|
|
145
|
-
- [
|
|
175
|
+
- [Pattern worth documenting]
|
|
176
|
+
- [Gotcha to remember]
|
|
146
177
|
|
|
147
178
|
## Test Coverage
|
|
148
179
|
|
|
@@ -155,7 +186,51 @@ Write `.beads/artifacts/<bead-id>/review.md`:
|
|
|
155
186
|
- [x] [Criterion 2]
|
|
156
187
|
```
|
|
157
188
|
|
|
158
|
-
## Phase
|
|
189
|
+
## Phase 8: Create Observation (if notable findings)
|
|
190
|
+
|
|
191
|
+
If you discovered something worth remembering:
|
|
192
|
+
|
|
193
|
+
```typescript
|
|
194
|
+
observation({
|
|
195
|
+
type: "learning", // or: decision, bugfix, pattern, discovery, warning
|
|
196
|
+
title: "[concise title]",
|
|
197
|
+
content: "[what was learned and why it matters]",
|
|
198
|
+
concepts: "[keywords]",
|
|
199
|
+
files: "[affected files]",
|
|
200
|
+
bead_id: "<bead-id>",
|
|
201
|
+
});
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
**Create observations for:**
|
|
205
|
+
|
|
206
|
+
- Patterns that should be reused
|
|
207
|
+
- Gotchas that wasted time
|
|
208
|
+
- Design decisions with rationale
|
|
209
|
+
- Bug root causes
|
|
210
|
+
|
|
211
|
+
## Phase 9: Update Memory (if applicable)
|
|
212
|
+
|
|
213
|
+
If patterns or gotchas discovered:
|
|
214
|
+
|
|
215
|
+
```typescript
|
|
216
|
+
// For new patterns
|
|
217
|
+
memory -
|
|
218
|
+
update({
|
|
219
|
+
file: "project/conventions",
|
|
220
|
+
content: "## [Pattern Name]\n\n[Description and example]",
|
|
221
|
+
mode: "append",
|
|
222
|
+
});
|
|
223
|
+
|
|
224
|
+
// For gotchas
|
|
225
|
+
memory -
|
|
226
|
+
update({
|
|
227
|
+
file: "project/gotchas",
|
|
228
|
+
content: "## [Gotcha Title]\n\n[What happened and how to avoid]",
|
|
229
|
+
mode: "append",
|
|
230
|
+
});
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
## Phase 10: Final Commit
|
|
159
234
|
|
|
160
235
|
```bash
|
|
161
236
|
git add -A
|
|
@@ -173,27 +248,36 @@ git commit -m "<bead-id>: [summary of changes]
|
|
|
173
248
|
Closes: <bead-id>"
|
|
174
249
|
```
|
|
175
250
|
|
|
176
|
-
## Phase
|
|
251
|
+
## Phase 11: Close Bead & Notify
|
|
177
252
|
|
|
178
|
-
Complete the task
|
|
253
|
+
Complete the task:
|
|
179
254
|
|
|
180
255
|
```typescript
|
|
181
256
|
bd_done({ id: "$ARGUMENTS", msg: "Implemented: [1-liner summary]" });
|
|
182
257
|
```
|
|
183
258
|
|
|
184
|
-
|
|
259
|
+
Notify dependent tasks are now unblocked:
|
|
185
260
|
|
|
186
|
-
|
|
261
|
+
```typescript
|
|
262
|
+
bd_msg({
|
|
263
|
+
subj: "<bead-id> completed",
|
|
264
|
+
body: "Dependent tasks now unblocked. Summary: [1-liner]",
|
|
265
|
+
to: "all",
|
|
266
|
+
importance: "normal",
|
|
267
|
+
global: true,
|
|
268
|
+
});
|
|
269
|
+
```
|
|
187
270
|
|
|
188
|
-
|
|
271
|
+
## Phase 12: Database Health Check
|
|
189
272
|
|
|
190
273
|
```typescript
|
|
191
274
|
bd_ls({ status: "all", limit: 1 });
|
|
192
275
|
```
|
|
193
276
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
277
|
+
| Issue Count | Action |
|
|
278
|
+
| ----------- | -------------------------------------------- |
|
|
279
|
+
| >200 | Warn about performance |
|
|
280
|
+
| >500 | Strongly recommend `bd_cleanup({ days: 7 })` |
|
|
197
281
|
|
|
198
282
|
## Output
|
|
199
283
|
|
|
@@ -205,37 +289,44 @@ Gates: All passed ✓
|
|
|
205
289
|
Criteria: All met ✓
|
|
206
290
|
Commit: [commit hash]
|
|
207
291
|
|
|
292
|
+
Estimation:
|
|
293
|
+
- Estimated: [S/M/L] (~[N] calls)
|
|
294
|
+
- Actual: [N] calls
|
|
295
|
+
- Accuracy: [good/over/under]
|
|
296
|
+
|
|
208
297
|
Artifacts:
|
|
209
298
|
- .beads/artifacts/<bead-id>/spec.md
|
|
210
|
-
- .beads/artifacts/<bead-id>/research.md
|
|
211
|
-
- .beads/artifacts/<bead-id>/plan.md
|
|
212
299
|
- .beads/artifacts/<bead-id>/review.md
|
|
300
|
+
[- .beads/artifacts/<bead-id>/research.md]
|
|
301
|
+
[- .beads/artifacts/<bead-id>/plan.md]
|
|
302
|
+
[- .beads/artifacts/<bead-id>/adr.md]
|
|
213
303
|
|
|
214
304
|
Branch: <bead-id>
|
|
215
305
|
```
|
|
216
306
|
|
|
217
|
-
**
|
|
307
|
+
**Next steps:**
|
|
218
308
|
|
|
219
309
|
```
|
|
220
|
-
|
|
221
|
-
bd_cleanup({ days: 7 })
|
|
222
|
-
bd_sync()
|
|
223
|
-
```
|
|
310
|
+
━━━━━━━━━━━━━━━━━━━━━
|
|
224
311
|
|
|
225
|
-
|
|
312
|
+
Ready to merge:
|
|
313
|
+
/pr <bead-id> # Create pull request
|
|
314
|
+
git checkout main && git merge <bead-id> # Direct merge
|
|
226
315
|
|
|
316
|
+
Or start fresh:
|
|
317
|
+
→ Start new session for next task
|
|
318
|
+
→ Previous work: read_session("last")
|
|
227
319
|
```
|
|
228
|
-
━━━━━━━━━━━━━━━━━━━━━
|
|
229
|
-
Task complete. For best performance:
|
|
230
|
-
→ Start a fresh agent session for next task
|
|
231
|
-
→ Previous work available via read_session("last")
|
|
232
320
|
|
|
233
|
-
|
|
234
|
-
```
|
|
321
|
+
**If issue count >200:**
|
|
235
322
|
|
|
236
|
-
|
|
323
|
+
```
|
|
324
|
+
⚠️ Database has [count] issues. Run:
|
|
325
|
+
bd_cleanup({ days: 7 })
|
|
326
|
+
bd_sync({ reason: "Cleanup after finish" })
|
|
327
|
+
```
|
|
237
328
|
|
|
238
|
-
**If work was
|
|
329
|
+
**If work was incomplete:**
|
|
239
330
|
|
|
240
331
|
```
|
|
241
332
|
⚠️ Work incomplete? Create handoff:
|