opencodekit 0.15.21 → 0.16.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.
Files changed (116) hide show
  1. package/dist/index.js +5 -7
  2. package/dist/template/.opencode/AGENTS.md +21 -20
  3. package/dist/template/.opencode/agent/build.md +88 -7
  4. package/dist/template/.opencode/agent/explore.md +1 -1
  5. package/dist/template/.opencode/agent/general.md +54 -4
  6. package/dist/template/.opencode/agent/looker.md +1 -1
  7. package/dist/template/.opencode/agent/painter.md +1 -1
  8. package/dist/template/.opencode/agent/plan.md +52 -0
  9. package/dist/template/.opencode/agent/review.md +1 -1
  10. package/dist/template/.opencode/agent/scout.md +3 -3
  11. package/dist/template/.opencode/agent/vision.md +1 -1
  12. package/dist/template/.opencode/command/create.md +201 -95
  13. package/dist/template/.opencode/command/design.md +5 -7
  14. package/dist/template/.opencode/command/handoff.md +7 -0
  15. package/dist/template/.opencode/command/init.md +25 -47
  16. package/dist/template/.opencode/command/plan.md +35 -16
  17. package/dist/template/.opencode/command/resume.md +7 -18
  18. package/dist/template/.opencode/command/ship.md +156 -0
  19. package/dist/template/.opencode/command/start.md +315 -28
  20. package/dist/template/.opencode/command/ui-review.md +5 -7
  21. package/dist/template/.opencode/command/verify.md +279 -0
  22. package/dist/template/.opencode/memory/_templates/README.md +57 -19
  23. package/dist/template/.opencode/memory/_templates/prd.md +29 -0
  24. package/dist/template/.opencode/memory/_templates/project/tech-stack.md +50 -0
  25. package/dist/template/.opencode/memory/_templates/proposal.md +38 -0
  26. package/dist/template/.opencode/memory/_templates/spec.md +66 -0
  27. package/dist/template/.opencode/memory/_templates/tasks.md +198 -0
  28. package/dist/template/.opencode/memory/observations/2026-02-01-decision-add-skills-vs-commands-to-global-agents-.md +15 -0
  29. package/dist/template/.opencode/memory/observations/2026-02-01-decision-build-agent-auto-loads-skills-contextual.md +31 -0
  30. package/dist/template/.opencode/memory/observations/2026-02-01-decision-fixed-agent-configuration-for-opencodeki.md +25 -0
  31. package/dist/template/.opencode/memory/observations/2026-02-01-decision-focused-agents-md-upgrade-for-opencode-k.md +14 -0
  32. package/dist/template/.opencode/memory/observations/2026-02-01-decision-implement-tier-1-permission-upgrades.md +15 -0
  33. package/dist/template/.opencode/memory/observations/2026-02-01-decision-instructions-config-explicit-paths-not-w.md +40 -0
  34. package/dist/template/.opencode/memory/observations/2026-02-01-decision-merged-context-into-memory-project-singl.md +42 -0
  35. package/dist/template/.opencode/memory/observations/2026-02-01-decision-oracle-tool-should-use-review-agent-not-.md +14 -0
  36. package/dist/template/.opencode/memory/observations/2026-02-01-decision-plan-agent-auto-loads-skills-contextuall.md +31 -0
  37. package/dist/template/.opencode/memory/observations/2026-02-01-decision-plan-phased-oracle-command-merge-into-ne.md +14 -0
  38. package/dist/template/.opencode/memory/observations/2026-02-01-decision-prd-workflow-uses-prd-and-prd-task-skill.md +23 -0
  39. package/dist/template/.opencode/memory/observations/2026-02-01-decision-prefer-review-agent-via-opencode-cli-ove.md +14 -0
  40. package/dist/template/.opencode/memory/observations/2026-02-01-decision-remove-oracle-tool-add-ship-command-with.md +14 -0
  41. package/dist/template/.opencode/memory/observations/2026-02-01-decision-remove-oracle-tool-and-add-ship-command-.md +14 -0
  42. package/dist/template/.opencode/memory/observations/2026-02-01-decision-remove-oracle-tool-and-add-ship-command.md +14 -0
  43. package/dist/template/.opencode/memory/observations/2026-02-01-decision-remove-skills-vs-commands-section-from-a.md +14 -0
  44. package/dist/template/.opencode/memory/observations/2026-02-01-decision-replace-oracle-tool-with-ship-command-fl.md +14 -0
  45. package/dist/template/.opencode/memory/observations/2026-02-01-decision-replace-oracle-with-ship-command-workflo.md +14 -0
  46. package/dist/template/.opencode/memory/observations/2026-02-01-decision-replace-proxypal-oracle-with-cli-review-.md +14 -0
  47. package/dist/template/.opencode/memory/observations/2026-02-01-decision-simplified-dist-template-only-tech-stack.md +50 -0
  48. package/dist/template/.opencode/memory/observations/2026-02-01-decision-simplified-templates-only-tech-stack-md.md +26 -0
  49. package/dist/template/.opencode/memory/observations/2026-02-01-decision-subagents-load-minimal-skills-stay-lean.md +29 -0
  50. package/dist/template/.opencode/memory/observations/2026-02-01-decision-user-approved-permission-upgrades-in-ope.md +15 -0
  51. package/dist/template/.opencode/memory/observations/2026-02-01-discovery-verify-command-already-implemented.md +28 -0
  52. package/dist/template/.opencode/memory/observations/2026-02-01-feature-openspec-phase-b-complete-template-upgra.md +43 -0
  53. package/dist/template/.opencode/memory/observations/2026-02-01-learning-build-agent-should-use-dynamic-lsp-not-f.md +14 -0
  54. package/dist/template/.opencode/memory/observations/2026-02-01-learning-kimi-k2-5-model-requires-temperature-1-0.md +22 -0
  55. package/dist/template/.opencode/memory/observations/2026-02-01-learning-opencode-context-injection-already-imple.md +27 -0
  56. package/dist/template/.opencode/memory/observations/2026-02-01-learning-opencode-context-injection-uses-instruct.md +35 -0
  57. package/dist/template/.opencode/memory/observations/2026-02-01-learning-update-build-agent-prompt-to-use-context.md +14 -0
  58. package/dist/template/.opencode/memory/observations/2026-02-01-learning-upgrade-agents-md-using-opencode-expert-.md +14 -0
  59. package/dist/template/.opencode/memory/observations/2026-02-01-learning-upgrade-agents-md-with-opencode-expert-g.md +14 -0
  60. package/dist/template/.opencode/memory/observations/2026-02-01-learning-upgrade-agents-md-with-opencode-expert-r.md +14 -0
  61. package/dist/template/.opencode/memory/observations/2026-02-01-learning-user-prefers-copilot-gpt-5-2-codex-mediu.md +14 -0
  62. package/dist/template/.opencode/memory/observations/2026-02-01-learning-user-wants-general-agent-prompt-contextu.md +15 -0
  63. package/dist/template/.opencode/memory/observations/2026-02-01-learning-user-wants-general-agent-prompt-reviewed.md +15 -0
  64. package/dist/template/.opencode/memory/project/command-rules.md +122 -0
  65. package/dist/template/.opencode/memory/project/tech-stack.md +50 -0
  66. package/dist/template/.opencode/memory/research/ccpm-analysis.md +334 -0
  67. package/dist/template/.opencode/memory/research/openspec-analysis.md +226 -0
  68. package/dist/template/.opencode/opencode.json +916 -803
  69. package/dist/template/.opencode/skill/tool-priority/SKILL.md +2 -2
  70. package/package.json +1 -1
  71. package/dist/template/.opencode/command/accessibility-check.md +0 -331
  72. package/dist/template/.opencode/command/agent-browser.md +0 -21
  73. package/dist/template/.opencode/command/analyze-mockup.md +0 -423
  74. package/dist/template/.opencode/command/analyze-project.md +0 -295
  75. package/dist/template/.opencode/command/brainstorm.md +0 -373
  76. package/dist/template/.opencode/command/cloudflare.md +0 -70
  77. package/dist/template/.opencode/command/commit.md +0 -245
  78. package/dist/template/.opencode/command/complete-next-task.md +0 -77
  79. package/dist/template/.opencode/command/design-audit.md +0 -480
  80. package/dist/template/.opencode/command/edit-image.md +0 -242
  81. package/dist/template/.opencode/command/finish.md +0 -255
  82. package/dist/template/.opencode/command/fix-ci.md +0 -109
  83. package/dist/template/.opencode/command/fix-types.md +0 -104
  84. package/dist/template/.opencode/command/fix-ui.md +0 -117
  85. package/dist/template/.opencode/command/fix.md +0 -168
  86. package/dist/template/.opencode/command/frontend-design.md +0 -21
  87. package/dist/template/.opencode/command/generate-diagram.md +0 -349
  88. package/dist/template/.opencode/command/generate-icon.md +0 -283
  89. package/dist/template/.opencode/command/generate-image.md +0 -246
  90. package/dist/template/.opencode/command/generate-pattern.md +0 -247
  91. package/dist/template/.opencode/command/generate-storyboard.md +0 -250
  92. package/dist/template/.opencode/command/implement.md +0 -609
  93. package/dist/template/.opencode/command/import-plan.md +0 -406
  94. package/dist/template/.opencode/command/index-knowledge.md +0 -25
  95. package/dist/template/.opencode/command/integration-test.md +0 -424
  96. package/dist/template/.opencode/command/issue.md +0 -102
  97. package/dist/template/.opencode/command/new-feature.md +0 -651
  98. package/dist/template/.opencode/command/opensrc.md +0 -58
  99. package/dist/template/.opencode/command/quick-build.md +0 -238
  100. package/dist/template/.opencode/command/ralph.md +0 -41
  101. package/dist/template/.opencode/command/research-and-implement.md +0 -148
  102. package/dist/template/.opencode/command/research-ui.md +0 -466
  103. package/dist/template/.opencode/command/restore-image.md +0 -424
  104. package/dist/template/.opencode/command/revert-feature.md +0 -386
  105. package/dist/template/.opencode/command/skill-create.md +0 -517
  106. package/dist/template/.opencode/command/skill-optimize.md +0 -556
  107. package/dist/template/.opencode/command/summarize.md +0 -412
  108. package/dist/template/.opencode/command/triage.md +0 -398
  109. package/dist/template/.opencode/memory/_templates/project/architecture.md +0 -60
  110. package/dist/template/.opencode/memory/_templates/project/commands.md +0 -72
  111. package/dist/template/.opencode/memory/_templates/project/conventions.md +0 -68
  112. package/dist/template/.opencode/memory/_templates/project/gotchas.md +0 -41
  113. package/dist/template/.opencode/skill/notebooklm/SKILL.md +0 -272
  114. package/dist/template/.opencode/skill/notebooklm/references/setup.md +0 -353
  115. package/dist/template/.opencode/tool/notebooklm.ts +0 -488
  116. package/dist/template/.opencode/tool/oracle.ts +0 -240
@@ -1,242 +0,0 @@
1
- ---
2
- description: Edit image with natural language instructions
3
- argument-hint: "<image-path> <edit-instruction> [--hd] [--preserve-size] [--compare]"
4
- agent: painter
5
- ---
6
-
7
- # Edit Image: $ARGUMENTS
8
-
9
- Edit an existing image using natural language instructions.
10
-
11
- ## Parse Arguments
12
-
13
- Extract from `$ARGUMENTS`:
14
-
15
- | Argument | Required | Description |
16
- | ----------------- | -------- | ------------------------------ |
17
- | Image path | Yes | Path to source image |
18
- | Edit instruction | Yes | Natural language edit request |
19
- | `--hd` | No | Higher quality output (slower) |
20
- | `--preserve-size` | No | Maintain original dimensions |
21
- | `--compare` | No | Output before/after comparison |
22
-
23
- ---
24
-
25
- ## Edit Types & What Works
26
-
27
- ### Works Well
28
-
29
- | Edit Type | Example | Success Rate |
30
- | -------------------------- | ----------------------------------------- | ------------ |
31
- | **Background removal** | "remove the background" | High |
32
- | **Background replacement** | "replace background with beach sunset" | High |
33
- | **Color changes** | "change the shirt to blue" | High |
34
- | **Style transfer** | "make it look like a watercolor painting" | High |
35
- | **Add elements** | "add a hat to the person" | Medium-High |
36
- | **Remove objects** | "remove the car from the image" | Medium-High |
37
- | **Lighting adjustments** | "make it look like golden hour" | High |
38
- | **Extend canvas** | "extend the image to the right" | Medium |
39
-
40
- ### Works Poorly (Set Expectations)
41
-
42
- | Edit Type | Why It's Hard | Alternative |
43
- | ------------------------------- | ------------------------------ | ----------------------- |
44
- | **Text changes** | AI struggles with precise text | Use image editor |
45
- | **Face/hand details** | Often distorts | Mask specific region |
46
- | **Precise positioning** | "Move object 50px left" | Use coordinates in mask |
47
- | **Multiple simultaneous edits** | Conflicts | Do one edit at a time |
48
- | **Preserving fine details** | May blur/change | Use `--preserve-size` |
49
-
50
- ---
51
-
52
- ## Process
53
-
54
- 1. **Load** the source image from path
55
- 2. **Analyze** the original (note key features to preserve)
56
- 3. **Interpret** the edit instruction
57
- 4. **Apply** the edit, preserving unaffected areas
58
- 5. **Save** with versioning to track iterations
59
- 6. **Compare** if `--compare` flag set
60
-
61
- ---
62
-
63
- ## Common Edit Patterns
64
-
65
- ### Background Operations
66
-
67
- ```bash
68
- # Remove background (transparent)
69
- /edit-image photo.jpg remove the background
70
-
71
- # Replace background
72
- /edit-image photo.jpg replace background with a modern office
73
-
74
- # Extend/outpaint
75
- /edit-image landscape.jpg extend the sky upward
76
- ```
77
-
78
- ### Color & Style
79
-
80
- ```bash
81
- # Color change
82
- /edit-image product.jpg change the product color to red
83
-
84
- # Style transfer
85
- /edit-image photo.jpg convert to anime style
86
-
87
- # Mood change
88
- /edit-image scene.jpg make it look like nighttime with city lights
89
- ```
90
-
91
- ### Object Manipulation
92
-
93
- ```bash
94
- # Add object
95
- /edit-image room.jpg add a plant in the corner
96
-
97
- # Remove object
98
- /edit-image street.jpg remove the person on the left
99
-
100
- # Replace object
101
- /edit-image desk.jpg replace the laptop with a typewriter
102
- ```
103
-
104
- ### Enhancement
105
-
106
- ```bash
107
- # Lighting
108
- /edit-image portrait.jpg add dramatic studio lighting
109
-
110
- # Quality
111
- /edit-image old-photo.jpg enhance and sharpen, remove grain --hd
112
-
113
- # Composition
114
- /edit-image product.jpg add subtle shadow underneath
115
- ```
116
-
117
- ---
118
-
119
- ## Output
120
-
121
- ### Standard Output
122
-
123
- ```markdown
124
- ## Edit Complete
125
-
126
- **Source:** `path/to/original.jpg`
127
- **Edit:** "remove the background"
128
- **Output:** `.opencode/memory/design/edited/original-v1-bg-removed.png`
129
-
130
- ### Original Analysis
131
-
132
- - Dimensions: 1920x1080
133
- - Key elements: Person in center, office background
134
- - Preserved: Person, clothing, pose
135
-
136
- ### Edit Applied
137
-
138
- - Background detected and removed
139
- - Edges refined with feathering
140
- - Output format: PNG (transparent)
141
-
142
- ### Refinements Available
143
-
144
- - "Soften the edges more"
145
- - "Keep the shadow underneath"
146
- - "Make background white instead of transparent"
147
- ```
148
-
149
- ### Comparison Output (--compare)
150
-
151
- ```markdown
152
- ## Before/After Comparison
153
-
154
- | Aspect | Before | After |
155
- | ---------- | ------------ | ----------- |
156
- | Background | Office scene | Transparent |
157
- | Subject | Unchanged | Unchanged |
158
- | Dimensions | 1920x1080 | 1920x1080 |
159
- | File size | 450KB | 380KB |
160
-
161
- **Visual diff:** Key changes highlighted in output
162
- ```
163
-
164
- ---
165
-
166
- ## Version History
167
-
168
- Edits are saved with version tracking:
169
-
170
- ```
171
- .opencode/memory/design/edited/
172
- ├── photo-v1-bg-removed.png # First edit
173
- ├── photo-v2-color-change.png # Second edit
174
- ├── photo-v3-add-shadow.png # Third edit
175
- └── photo-history.json # Edit history
176
- ```
177
-
178
- **History file:**
179
-
180
- ```json
181
- {
182
- "source": "photo.jpg",
183
- "edits": [
184
- { "v": 1, "instruction": "remove background", "timestamp": "..." },
185
- { "v": 2, "instruction": "change shirt to blue", "timestamp": "..." }
186
- ]
187
- }
188
- ```
189
-
190
- To revert: Reference previous version as source.
191
-
192
- ---
193
-
194
- ## Tips for Better Results
195
-
196
- 1. **Be specific**: "Add a red baseball cap" > "add a hat"
197
- 2. **One edit at a time**: Chain simple edits for complex changes
198
- 3. **Describe what to keep**: "Change background but keep the shadow"
199
- 4. **Use style references**: "Make it look like a Pixar movie"
200
- 5. **Specify format needs**: "Remove background, keep as PNG with transparency"
201
-
202
- ---
203
-
204
- ## Limitations
205
-
206
- - **Text editing**: AI cannot reliably modify or add text
207
- - **Precise geometry**: Exact pixel-level positioning not supported
208
- - **Faces**: May alter facial features unintentionally
209
- - **Hands**: Often produces artifacts
210
- - **Multiple subjects**: May struggle to isolate specific elements
211
- - **Brand logos**: May distort or refuse (safety filters)
212
-
213
- For precise edits, consider: Photoshop, GIMP, or Figma.
214
-
215
- ---
216
-
217
- ## Examples
218
-
219
- ```bash
220
- # Basic edit
221
- /edit-image screenshot.png remove the background
222
-
223
- # High quality with comparison
224
- /edit-image product.jpg enhance lighting and add reflection --hd --compare
225
-
226
- # Preserve dimensions
227
- /edit-image banner.png change the color scheme to dark mode --preserve-size
228
-
229
- # Style transfer
230
- /edit-image photo.jpg convert to oil painting style --hd
231
- ```
232
-
233
- ---
234
-
235
- ## Related Commands
236
-
237
- | Need | Command |
238
- | ------------------ | ----------------- |
239
- | Generate new image | `/generate-image` |
240
- | Analyze image | `/analyze-mockup` |
241
- | Restore old photo | `/restore-image` |
242
- | Create icon | `/generate-icon` |
@@ -1,255 +0,0 @@
1
- ---
2
- description: Finish a bead - verify, commit, close
3
- argument-hint: "<bead-id>"
4
- agent: build
5
- ---
6
-
7
- # Finish: $ARGUMENTS
8
-
9
- You're closing out a task. This is the quality gate. No shortcuts.
10
-
11
- ## Load Skills
12
-
13
- ```typescript
14
- skill({ name: "beads" });
15
- skill({ name: "verification-before-completion" });
16
- skill({ name: "beads-bridge" }); // For todo sync
17
- ```
18
-
19
- ## Verify The Task Exists
20
-
21
- ```
22
- !`bd show $ARGUMENTS`
23
- ```
24
-
25
- If not found, stop. Check `bd list --status=all` for the correct ID.
26
-
27
- ## Run All Gates
28
-
29
- Detect your project type and run everything:
30
-
31
- ```
32
- !`ls package.json Cargo.toml pyproject.toml go.mod Makefile 2>/dev/null`
33
- ```
34
-
35
- **Node/TypeScript:**
36
-
37
- ```bash
38
- npm run build 2>/dev/null || true
39
- npm test
40
- npm run lint 2>/dev/null || true
41
- npm run type-check 2>/dev/null || true
42
- ```
43
-
44
- **Rust:**
45
-
46
- ```bash
47
- cargo build
48
- cargo test
49
- cargo clippy -- -D warnings
50
- ```
51
-
52
- **Python:**
53
-
54
- ```bash
55
- pytest
56
- ruff check .
57
- mypy . 2>/dev/null || true
58
- ```
59
-
60
- **Go:**
61
-
62
- ```bash
63
- go build ./...
64
- go test ./...
65
- golangci-lint run
66
- ```
67
-
68
- If ANY gate fails, stop. Fix it first. Don't close broken work.
69
-
70
- ## Verify Success Criteria
71
-
72
- Read the spec and check each criterion:
73
-
74
- ```
75
- !`cat .beads/artifacts/$ARGUMENTS/spec.md`
76
- ```
77
-
78
- For each success criterion listed, run its verification. All must pass. If something's missing, go back and implement it.
79
-
80
- ## If PRD Tasks Exist
81
-
82
- If `.beads/artifacts/$ARGUMENTS/prd.json` exists:
83
-
84
- - Ensure every task has `passes: true`
85
- - If tasks remain incomplete, do NOT close the bead yet
86
- - Continue with: `/complete-next-task $ARGUMENTS`
87
-
88
- ## Review Changes (Ask Before Commit)
89
-
90
- Show what would be committed:
91
-
92
- ```bash
93
- git add -A
94
- git status
95
- git diff --cached --stat
96
- ```
97
-
98
- **Present the changes to the user:**
99
-
100
- ```
101
- Ready to Commit
102
- ━━━━━━━━━━━━━━
103
-
104
- Files changed:
105
- [list from git status]
106
-
107
- Summary: $ARGUMENTS - [what was done]
108
-
109
- Would you like me to:
110
- 1. Commit these changes
111
- 2. Show full diff first
112
- 3. Skip commit (I'll review manually)
113
- ```
114
-
115
- **Wait for user confirmation before proceeding.**
116
-
117
- If user confirms commit:
118
-
119
- ```bash
120
- git commit -m "$ARGUMENTS: [what was done]
121
-
122
- - [change 1]
123
- - [change 2]
124
-
125
- Closes: $ARGUMENTS"
126
- ```
127
-
128
- ## Close The Task (Use Question Tool)
129
-
130
- ```typescript
131
- question({
132
- questions: [
133
- {
134
- header: "Close",
135
- question: "Should I close bead $ARGUMENTS?",
136
- options: [
137
- {
138
- label: "Yes, close it (Recommended)",
139
- description: "All gates passed, task complete",
140
- },
141
- { label: "No, keep open", description: "Need more work or review" },
142
- ],
143
- },
144
- ],
145
- });
146
- ```
147
-
148
- If user confirms close:
149
-
150
- ```bash
151
- bd close $ARGUMENTS --reason "Completed: [1-line summary]"
152
- ```
153
-
154
- ## Cleanup Swarm State (If Any)
155
-
156
- Clear any swarm data associated with this task:
157
-
158
- ```typescript
159
- const teamName = "$ARGUMENTS-swarm";
160
-
161
- // Clear swarm state
162
- await swarm_monitor({
163
- operation: "clear",
164
- team_name: teamName,
165
- });
166
-
167
- // Sync completed todos back to beads
168
- beads_sync({ operation: "pull" });
169
- ```
170
-
171
- ## Create Review (Optional But Recommended)
172
-
173
- If this was non-trivial work, document what happened:
174
-
175
- ```bash
176
- mkdir -p .beads/artifacts/$ARGUMENTS
177
- ```
178
-
179
- Write `.beads/artifacts/$ARGUMENTS/review.md`:
180
-
181
- ```markdown
182
- # Review: $ARGUMENTS
183
-
184
- **Completed:** [date]
185
-
186
- ## What Changed
187
-
188
- - [file]: [what and why]
189
-
190
- ## What Worked
191
-
192
- - [thing that went smoothly]
193
-
194
- ## What Was Hard
195
-
196
- - [challenge and how you solved it]
197
-
198
- ## Lessons
199
-
200
- - [anything worth remembering]
201
- ```
202
-
203
- ## Record Learnings
204
-
205
- If you discovered patterns, gotchas, or decisions worth remembering:
206
-
207
- ```typescript
208
- observation({
209
- type: "learning", // or "pattern", "bugfix", "decision", "warning"
210
- title: "[concise, searchable title]",
211
- content: "[what you learned - be specific and actionable]",
212
- bead_id: "$ARGUMENTS",
213
- files: "[affected files, comma-separated]",
214
- concepts: "[keywords for semantic search]",
215
- });
216
- ```
217
-
218
- **This auto-embeds into the vector store** for future semantic search. Future `/start` and `/implement` commands will find this learning.
219
-
220
- **When to create observations:**
221
-
222
- - Discovered a non-obvious gotcha
223
- - Made a significant architectural decision
224
- - Found a pattern worth reusing
225
- - Hit a bug that others might hit
226
-
227
- **Skip observations for:**
228
-
229
- - Routine implementations
230
- - Well-documented patterns
231
- - Trivial fixes
232
-
233
- ## Output
234
-
235
- ```
236
- Closed: $ARGUMENTS
237
-
238
- Gates: All passed
239
- Commit: [hash]
240
- Branch: [branch]
241
-
242
- Next:
243
- - /pr $ARGUMENTS # Create pull request
244
- - Or merge directly: git checkout main && git merge $ARGUMENTS
245
- ```
246
-
247
- ## If Work Is Incomplete
248
-
249
- Don't close incomplete work. Instead:
250
-
251
- ```
252
- /handoff $ARGUMENTS "Stopped at [step]. Remaining: [what's left]"
253
- ```
254
-
255
- Then start fresh session and `/resume $ARGUMENTS` later.
@@ -1,109 +0,0 @@
1
- ---
2
- description: Fix CI failures
3
- argument-hint: "<run-id or url>"
4
- agent: build
5
- ---
6
-
7
- # Fix CI: $ARGUMENTS
8
-
9
- CI failures are P0 bugs. Fix fast.
10
-
11
- ## Get The Logs
12
-
13
- !`gh run view $ARGUMENTS --log-failed`
14
-
15
- List recent failures:
16
-
17
- !`gh run list --status=failure --limit=5`
18
-
19
- ## Extract The Error
20
-
21
- !`gh run view $ARGUMENTS --json jobs --jq '.jobs[] | select(.conclusion=="failure")'`
22
-
23
- !`gh run view $ARGUMENTS --log > /tmp/ci-log.txt && grep -i "error\|failed" /tmp/ci-log.txt | head -30`
24
-
25
- Identify:
26
-
27
- - **Job** that failed
28
- - **Step** in that job
29
- - **Error message** exact text
30
-
31
- ## Common Patterns
32
-
33
- | Pattern | Symptoms | Fix |
34
- | -------------- | ----------------------- | ---------------------------------- |
35
- | Dependency | "module not found" | `rm -rf node_modules && npm ci` |
36
- | Environment | Works locally, fails CI | Check Node version, env vars |
37
- | Type error | "tsc" failed | `npm run type-check` locally first |
38
- | Lint error | ESLint failed | `npm run lint -- --fix` |
39
- | Test flaky | Intermittent | Add retries, fix race condition |
40
- | Secret missing | "secret not found" | Check repo settings |
41
-
42
- ## Reproduce Locally
43
-
44
- ```bash
45
- npm ci
46
- npm run build
47
- npm test
48
- npm run lint
49
- ```
50
-
51
- If passes locally but fails in CI, check environment differences.
52
-
53
- ## Fix And Verify
54
-
55
- Make the fix. Verify locally:
56
-
57
- ```bash
58
- npm run build && npm test && npm run lint && npm run type-check
59
- ```
60
-
61
- ## Push And Watch
62
-
63
- !`gh run watch`
64
-
65
- ## If Still Failing
66
-
67
- Iterate:
68
-
69
- 1. Fetch new logs
70
- 2. Identify remaining error
71
- 3. Fix and push again
72
- 4. Max 3 iterations, then escalate
73
-
74
- If fix makes things worse:
75
-
76
- ```bash
77
- git revert HEAD
78
- git push
79
- ```
80
-
81
- ## Document
82
-
83
- If it's a recurring issue:
84
-
85
- ```typescript
86
- observation({
87
- type: "bugfix",
88
- title: "CI: [issue]",
89
- content: "Root cause: [what]\nFix: [how]\nPrevention: [future]",
90
- });
91
- ```
92
-
93
- ## Sync
94
-
95
- ```bash
96
- bd sync
97
- ```
98
-
99
- ## Output
100
-
101
- ```
102
- CI Fixed: $ARGUMENTS
103
-
104
- Root cause: [brief]
105
- Changes: [files]
106
-
107
- New run: [url]
108
- Status: Passed ✓
109
- ```
@@ -1,104 +0,0 @@
1
- ---
2
- description: Fix TypeScript type errors
3
- argument-hint: "[bead-id] [--strict]"
4
- agent: build
5
- ---
6
-
7
- # Fix Type Errors
8
-
9
- Resolve TypeScript errors without adding `any` everywhere.
10
-
11
- ## Get Current State
12
-
13
- !`npx tsc --noEmit 2>&1 | head -50`
14
- !`npx tsc --noEmit 2>&1 | grep -c "error TS"`
15
-
16
- ## Use LSP For Context
17
-
18
- ```typescript
19
- lsp_lsp_diagnostics({ filePath: "<file>", severity: "error" });
20
- lsp_lsp_hover({ filePath: "<file>", line: N, character: N });
21
- ```
22
-
23
- ## Common Fixes
24
-
25
- **Missing type:**
26
-
27
- ```typescript
28
- // Before
29
- function process(data) { ... }
30
- // After
31
- function process(data: InputType): OutputType { ... }
32
- ```
33
-
34
- **Null handling:**
35
-
36
- ```typescript
37
- // Before
38
- const name = user.name.toUpperCase();
39
- // After
40
- const name = user?.name?.toUpperCase() ?? "Unknown";
41
- ```
42
-
43
- **Property doesn't exist:**
44
-
45
- ```typescript
46
- // Add to interface
47
- interface User {
48
- name: string;
49
- email?: string; // Add missing property
50
- }
51
- ```
52
-
53
- ## Rules
54
-
55
- - ❌ Never use `any` just to pass type check
56
- - ❌ Never use `// @ts-ignore` without justification
57
- - ❌ Never use `as unknown as T`
58
- - ✅ Prefer proper typing over assertions
59
- - ✅ Prefer narrowing with type guards
60
- - ✅ Prefer `unknown` over `any` when truly unknown
61
-
62
- ## Iterate Until Clean
63
-
64
- ```bash
65
- npx tsc --noEmit
66
- ```
67
-
68
- Repeat until 0 errors. Max 5 passes.
69
-
70
- ## Verify
71
-
72
- ```bash
73
- npx tsc --noEmit # Types
74
- npm test # Tests still pass
75
- npm run lint # Lint still passes
76
- ```
77
-
78
- ## Commit
79
-
80
- ```bash
81
- git add <files>
82
- git commit -m "fix(types): resolve type errors
83
-
84
- - Fixed [N] errors
85
- - No 'any' types added"
86
-
87
- bd sync
88
- ```
89
-
90
- ## Output
91
-
92
- ```
93
- Type Errors Fixed
94
-
95
- Before: [N] errors
96
- After: 0 errors
97
-
98
- Verification:
99
- - Types: ✓
100
- - Tests: ✓
101
- - Lint: ✓
102
-
103
- 'any' added: 0 ✓
104
- ```