opencodekit 0.18.3 → 0.18.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 CHANGED
@@ -18,7 +18,7 @@ var __require = /* @__PURE__ */ createRequire(import.meta.url);
18
18
 
19
19
  //#endregion
20
20
  //#region package.json
21
- var version = "0.18.3";
21
+ var version = "0.18.4";
22
22
 
23
23
  //#endregion
24
24
  //#region src/utils/errors.ts
@@ -2721,15 +2721,15 @@ const MODEL_PRESETS = {
2721
2721
  }
2722
2722
  },
2723
2723
  recommend: {
2724
- model: "opencode/minimax-m2.5-free",
2724
+ model: "github-copilot/gpt-5.4",
2725
2725
  agents: {
2726
2726
  build: "github-copilot/claude-opus-4.6",
2727
- plan: "openai/gpt-5.3-codex",
2728
- review: "openai/gpt-5.3-codex",
2729
- explore: "opencode/minimax-m2.5-free",
2730
- general: "github-copilot/claude-sonnet-4.6",
2731
- vision: "proxypal/gemini-3.1-pro-high",
2732
- scout: "proxypal/claude-sonnet-4-6",
2727
+ plan: "github-copilot/gpt-5.4",
2728
+ review: "github-copilot/claude-opus-4.6",
2729
+ explore: "github-copilot/claude-haiku-4.5",
2730
+ general: "github-copilot/gpt-5.3-codex",
2731
+ vision: "github-copilot/gemini-3.1-pro-preview",
2732
+ scout: "github-copilot/claude-sonnet-4.6",
2733
2733
  painter: "proxypal/gemini-3.1-flash-image"
2734
2734
  }
2735
2735
  }
@@ -2751,7 +2751,7 @@ const AGENT_DESCRIPTIONS = {
2751
2751
  review: "Code review and debugging",
2752
2752
  explore: "Fast codebase search",
2753
2753
  general: "Quick, simple tasks",
2754
- looker: "Image/PDF extraction (cheap)",
2754
+ painter: "Image generation and editing",
2755
2755
  vision: "Visual analysis (quality)",
2756
2756
  scout: "External research/docs",
2757
2757
  compaction: "Context summarization"
@@ -2760,11 +2760,11 @@ async function promptCustomModels(targetDir) {
2760
2760
  const configPath = join(targetDir, ".opencode", "opencode.json");
2761
2761
  if (!existsSync(configPath)) return;
2762
2762
  const config = JSON.parse(readFileSync(configPath, "utf-8"));
2763
- p.log.info(color.dim("Enter model IDs (e.g., opencode/grok-code, proxypal/gemini-3-pro-preview)"));
2763
+ p.log.info(color.dim("Enter model IDs (e.g., github-copilot/gpt-5.4, proxypal/gemini-3.1-flash-image)"));
2764
2764
  p.log.info(color.dim("Press Enter to keep current value\n"));
2765
2765
  const mainModel = await p.text({
2766
2766
  message: "Main session model",
2767
- placeholder: config.model || "opencode/minimax-m2.1-free",
2767
+ placeholder: config.model || "github-copilot/gpt-5.4",
2768
2768
  defaultValue: config.model
2769
2769
  });
2770
2770
  if (p.isCancel(mainModel)) {
@@ -3033,7 +3033,7 @@ async function initCommand(rawOptions = {}) {
3033
3033
  {
3034
3034
  value: "recommend",
3035
3035
  label: "Recommended models",
3036
- hint: "claude-opus, gemini-pro (best quality)"
3036
+ hint: "gpt-5.4, opus-4.6, sonnet-4.6, gemini-3.1"
3037
3037
  },
3038
3038
  {
3039
3039
  value: "custom",
@@ -1 +1 @@
1
- 0.18.3
1
+ 0.18.4
Binary file
@@ -11,7 +11,7 @@
11
11
  "type-check": "tsc --noEmit"
12
12
  },
13
13
  "dependencies": {
14
- "@opencode-ai/plugin": "1.2.19"
14
+ "@opencode-ai/plugin": "1.2.20"
15
15
  },
16
16
  "devDependencies": {
17
17
  "@types/node": "^25.3.0",
@@ -1,230 +1,367 @@
1
1
  ---
2
2
  name: requesting-code-review
3
- description: Use when completing tasks, implementing major features, or before merging to verify work meets requirements - dispatches 5 parallel specialized review agents for comprehensive multi-angle review
4
- version: 1.0.0
5
- tags: [workflow, code-quality]
3
+ description: Use when completing meaningful implementation work and needing a high-signal review pass before merge or release - dispatches scoped review agents, synthesizes findings, and routes follow-up actions by severity.
4
+ version: 1.1.0
5
+ tags: [workflow, code-quality, research]
6
6
  dependencies: []
7
7
  ---
8
8
 
9
9
  # Requesting Code Review
10
10
 
11
+ ## Overview
12
+
13
+ Request review when work is **potentially shippable** and you need fresh scrutiny before moving on.
14
+
15
+ This skill is for **asking for review**, not blindly obeying reviewers. The review output is advisory until verified against the codebase.
16
+
17
+ **Core principle:** tighter review packet → better findings. Fewer files + clearer requirements beats dumping a vague diff at five agents.
18
+
11
19
  ## When to Use
12
20
 
13
- - After completing a feature/task batch and before moving on
14
- - Before merging to main or shipping changes
21
+ - After completing a feature, bugfix, or meaningful task batch
22
+ - Before merging to main or creating a PR
23
+ - Before release or after a risky refactor
24
+ - When you need multiple review angles on the same implementation
15
25
 
16
26
  ## When NOT to Use
17
27
 
18
- - During TDD RED commits or other intentionally failing states
19
- - When you only need a targeted answer to a specific question
28
+ - During TDD RED phase or any intentionally failing state
29
+ - When you only need a single targeted technical answer
30
+ - When implementation is still obviously incomplete and review would be premature
20
31
 
32
+ ## Golden Path
21
33
 
34
+ 1. **Stabilize the work** — run the relevant verification first
35
+ 2. **Build a tight review packet** — what changed, requirements, diff range, notable risks
36
+ 3. **Choose review depth** — targeted, standard, or full multi-angle review
37
+ 4. **Dispatch review agents in parallel**
38
+ 5. **Deduplicate + synthesize findings**
39
+ 6. **Fix or push back with evidence**
40
+ 7. **Re-verify after changes**
22
41
 
23
- ## When to Request Review
42
+ ## Review Packet
24
43
 
25
- **Mandatory:**
44
+ Before dispatching any reviewer, assemble a packet with:
26
45
 
27
- - After completing a feature / task batch before moving to next
28
- - Before merge to main
46
+ - **What changed** 2-6 bullet summary
47
+ - **Requirements / plan** — acceptance criteria or plan excerpt
48
+ - **Diff range** — `BASE_SHA..HEAD_SHA`
49
+ - **Risk hints** — auth, migrations, concurrency, data deletion, perf-sensitive path, etc.
50
+ - **Verification already run** — typecheck/lint/test/build status
51
+
52
+ Minimal packet template:
53
+
54
+ ```markdown
55
+ What was implemented:
29
56
 
30
- **Not a review use case:**
57
+ - [change 1]
58
+ - [change 2]
31
59
 
32
- - When stuck on an approach → ask one agent a specific question directly
33
- - TDD RED commits (failing test commits are supposed to fail — don't review non-shippable state)
60
+ Requirements:
34
61
 
35
- ## How to Request
62
+ - [acceptance criterion 1]
63
+ - [acceptance criterion 2]
36
64
 
37
- ### Step 1: Get git context
65
+ Diff:
66
+
67
+ - BASE_SHA: {BASE_SHA}
68
+ - HEAD_SHA: {HEAD_SHA}
69
+
70
+ Already verified:
71
+
72
+ - [command] — [result]
73
+
74
+ Risk areas:
75
+
76
+ - [auth | migrations | concurrency | performance | none]
77
+ ```
38
78
 
39
- #### Review Setup Checklist
79
+ ## Review Depth Selection
40
80
 
41
- - [ ] Determine BASE_SHA and HEAD_SHA
42
- - [ ] Ensure requirements summary or plan link is available
81
+ Choose the smallest review depth that still covers the risk.
82
+
83
+ | Depth | Use When | Agents |
84
+ | ------------ | ------------------------------------------- | ------ |
85
+ | **targeted** | Small fix, one main risk, one area changed | 1-2 |
86
+ | **standard** | Typical feature/fix ready for merge | 3 |
87
+ | **full** | Risky, cross-cutting, release-critical work | 5 |
88
+
89
+ ### Routing Rules
90
+
91
+ - **targeted**: use 1-2 specific review prompts
92
+ - **standard**: use security/correctness, tests/types, and completeness
93
+ - **full**: use all 5 specialized review prompts
94
+
95
+ Do **not** dispatch 5 reviewers by reflex for every tiny change. That produces noise, not rigor.
96
+
97
+ ## Step 1: Get Git Context
98
+
99
+ ### Setup Checklist
100
+
101
+ - [ ] Determine `BASE_SHA` and `HEAD_SHA`
102
+ - [ ] Summarize requirements or link plan
103
+ - [ ] Decide review depth
43
104
 
44
105
  ```bash
45
106
  BASE_SHA=$(git rev-parse origin/main 2>/dev/null || git rev-parse HEAD~1)
46
107
  HEAD_SHA=$(git rev-parse HEAD)
47
108
  ```
48
109
 
49
- ### Step 2: Dispatch all 5 agents in parallel
110
+ If work is still uncommitted, use the working tree review path and clearly say so in the review packet.
111
+
112
+ ## Step 2: Dispatch Reviewers in Parallel
50
113
 
51
- No tiering. 5 agents always. They run simultaneously — wall-clock cost is the same as 1.
114
+ ### A. Security + Correctness
52
115
 
53
116
  ```typescript
54
117
  task({
55
118
  subagent_type: "review",
56
119
  description: "Security + correctness review",
57
- prompt: `Review this implementation for security vulnerabilities and correctness issues.
120
+ prompt: `Review this implementation for real bugs in changed code only.
58
121
 
59
- What was implemented: {WHAT_WAS_IMPLEMENTED}
60
- Requirements: {PLAN_OR_REQUIREMENTS}
122
+ Review packet:
123
+ {REVIEW_PACKET}
61
124
 
62
125
  Run:
63
126
  git diff {BASE_SHA}..{HEAD_SHA}
64
127
 
65
128
  Check for:
66
- - Security vulnerabilities (injection, auth bypass, secrets exposure, input validation)
67
- - Logic errors, off-by-one, null/undefined access
68
- - Missing error handling on async operations
129
+ - Security vulnerabilities (injection, auth bypass, secrets exposure, missing validation)
130
+ - Logic errors, null/undefined access, incorrect guards
131
+ - Broken async/error handling
69
132
  - Data integrity issues
70
133
 
71
- Return: CRITICAL / IMPORTANT / MINOR findings with file:line references.`,
134
+ Rules:
135
+ - Review only changed code
136
+ - Read full changed files for context before flagging issues
137
+ - Do not speculate; explain the concrete failure scenario
138
+
139
+ Return:
140
+ - CRITICAL / IMPORTANT / MINOR findings
141
+ - file:line references
142
+ - brief reasoning for each finding`,
72
143
  });
144
+ ```
145
+
146
+ ### B. Performance + Architecture
73
147
 
148
+ ```typescript
74
149
  task({
75
150
  subagent_type: "review",
76
151
  description: "Performance + architecture review",
77
- prompt: `Review this implementation for performance and architectural concerns.
152
+ prompt: `Review this implementation for performance and architecture issues.
78
153
 
79
- What was implemented: {WHAT_WAS_IMPLEMENTED}
154
+ Review packet:
155
+ {REVIEW_PACKET}
80
156
 
81
157
  Run:
82
158
  git diff {BASE_SHA}..{HEAD_SHA}
83
159
 
84
160
  Check for:
85
- - N+1 queries, unnecessary loops, missing indexes
86
- - Over-engineering (abstraction not earned by use cases)
87
- - Coupling that will make future changes painful
88
- - Missing caching where obviously needed
89
- - Bundle size regressions (if frontend)
90
-
91
- Return: CRITICAL / IMPORTANT / MINOR findings with file:line references.`,
161
+ - Obviously expensive loops / N+1 / repeated work
162
+ - Over-engineering or abstraction without clear value
163
+ - Coupling that will make maintenance painful
164
+ - Missing use of existing abstractions/utilities
165
+
166
+ Rules:
167
+ - Flag only meaningful issues
168
+ - Skip style-only comments unless they cause structural problems
169
+
170
+ Return:
171
+ - CRITICAL / IMPORTANT / MINOR findings
172
+ - file:line references`,
92
173
  });
174
+ ```
93
175
 
176
+ ### C. Type Safety + Test Quality
177
+
178
+ ```typescript
94
179
  task({
95
180
  subagent_type: "review",
96
- description: "Type safety + test coverage review",
181
+ description: "Type safety + test review",
97
182
  prompt: `Review this implementation for type safety and test quality.
98
183
 
99
- What was implemented: {WHAT_WAS_IMPLEMENTED}
184
+ Review packet:
185
+ {REVIEW_PACKET}
100
186
 
101
187
  Run:
102
188
  git diff {BASE_SHA}..{HEAD_SHA}
103
189
 
104
190
  Check for:
105
- - Type safety holes (any casts, unsafe assertions, missing generics)
106
- - Tests that only test mocks instead of real behavior
107
- - Missing edge case tests (null, empty, boundary values)
108
- - Tests that would pass even if the implementation was wrong
109
- - Coverage gaps on critical paths
110
-
111
- Return: CRITICAL / IMPORTANT / MINOR findings with file:line references.`,
191
+ - Unsafe assertions, type holes, lossy casts
192
+ - Missing coverage on important branches or edge cases
193
+ - Tests that only prove mocks, not behavior
194
+ - Tests that would still pass if implementation were wrong
195
+
196
+ Return:
197
+ - CRITICAL / IMPORTANT / MINOR findings
198
+ - file:line references`,
112
199
  });
200
+ ```
201
+
202
+ ### D. Conventions + Existing Patterns
113
203
 
204
+ ```typescript
114
205
  task({
115
206
  subagent_type: "review",
116
207
  description: "Conventions + patterns review",
117
- prompt: `Review this implementation against codebase conventions.
208
+ prompt: `Review this implementation against existing codebase patterns.
118
209
 
119
- What was implemented: {WHAT_WAS_IMPLEMENTED}
210
+ Review packet:
211
+ {REVIEW_PACKET}
120
212
 
121
213
  Run:
122
214
  git diff {BASE_SHA}..{HEAD_SHA}
123
215
  git log --oneline -10
124
216
 
125
217
  Check for:
126
- - Inconsistent naming vs rest of codebase
127
- - Patterns that diverge from established codebase patterns
128
- - Missing or wrong use of shared utilities already in the codebase
129
- - File organization that doesn't match project structure
130
- - Documentation drift (code does X, docs say Y)
131
-
132
- Return: CRITICAL / IMPORTANT / MINOR findings with file:line references.`,
218
+ - Divergence from existing code organization or naming
219
+ - Reimplementation of existing utilities/helpers
220
+ - Documentation drift where changed code no longer matches docs
221
+ - New patterns that conflict with established ones
222
+
223
+ Return:
224
+ - CRITICAL / IMPORTANT / MINOR findings
225
+ - file:line references`,
133
226
  });
227
+ ```
134
228
 
229
+ ### E. Simplicity + Completeness
230
+
231
+ ```typescript
135
232
  task({
136
233
  subagent_type: "review",
137
234
  description: "Simplicity + completeness review",
138
- prompt: `Review this implementation for simplicity and completeness.
235
+ prompt: `Review this implementation for completeness and unnecessary complexity.
139
236
 
140
- What was implemented: {WHAT_WAS_IMPLEMENTED}
141
- Requirements: {PLAN_OR_REQUIREMENTS}
237
+ Review packet:
238
+ {REVIEW_PACKET}
142
239
 
143
240
  Run:
144
241
  git diff {BASE_SHA}..{HEAD_SHA}
145
242
 
146
243
  Check for:
147
- - Dead code (unreachable branches, unused variables, commented-out code)
148
- - Requirements that were specified but not implemented
149
- - Complexity that could be deleted without losing value
150
- - TODOs left in production code paths
151
-
152
- Return: CRITICAL / IMPORTANT / MINOR findings with file:line references.`,
244
+ - Missing requirements or acceptance criteria
245
+ - Dead code, TODOs, unreachable branches
246
+ - Complexity that can be deleted without losing behavior
247
+ - Behavior changes that appear unintentional
248
+
249
+ Return:
250
+ - CRITICAL / IMPORTANT / MINOR findings
251
+ - file:line references`,
153
252
  });
154
253
  ```
155
254
 
156
- ### Step 3: Synthesize findings
255
+ ## Dispatch Matrix
157
256
 
158
- #### Synthesis Checklist
257
+ | Depth | Reviewers to Run |
258
+ | ------------ | ---------------------------- |
259
+ | **targeted** | Choose the 1-2 most relevant |
260
+ | **standard** | A + C + E |
261
+ | **full** | A + B + C + D + E |
159
262
 
160
- - [ ] Count Critical / Important / Minor findings
161
- - [ ] List file:line references for each issue
162
- - [ ] Mark readiness: proceed vs fix required
263
+ ## Step 3: Synthesize Findings
163
264
 
164
- After all 5 agents return:
265
+ ### Synthesis Checklist
266
+
267
+ - [ ] Merge duplicate findings across reviewers
268
+ - [ ] Keep the strongest explanation when multiple reviewers report same issue
269
+ - [ ] Separate real blockers from optional improvements
270
+ - [ ] Mark disputed / uncertain findings explicitly
271
+
272
+ Output format:
165
273
 
166
274
  ```markdown
167
275
  ## Review Summary
168
276
 
169
- **Agents run:** 5
170
- **Critical:** [N] — BLOCK, fix before proceeding
171
- **Important:** [N] — Fix in this PR
172
- **Minor:** [N] — Track as improvements
277
+ **Review depth:** [targeted | standard | full]
278
+ **Agents run:** [N]
279
+ **Critical:** [N]
280
+ **Important:** [N]
281
+ **Minor:** [N]
173
282
 
174
283
  ### Critical Issues
175
284
 
176
- [List with file:line, description, suggested fix]
285
+ - `path/to/file.ts:123` [issue + why it breaks]
177
286
 
178
287
  ### Important Issues
179
288
 
180
- [List with file:line, description]
289
+ - `path/to/file.ts:123` — [issue]
290
+
291
+ ### Minor Issues
292
+
293
+ - `path/to/file.ts:123` — [optional improvement]
294
+
295
+ ### Disputed / Needs Verification
296
+
297
+ - [finding that may be wrong, plus what evidence would confirm it]
181
298
 
182
299
  ### Assessment
183
300
 
184
- [ ] Ready to proceed [ ] Fix required first
301
+ - [ ] Ready to proceed
302
+ - [ ] Fix required first
185
303
  ```
186
304
 
187
- ### Step 4: Act on findings
305
+ ## Step 4: Act on Findings
188
306
 
189
- #### Remediation Checklist
307
+ ### Remediation Checklist
190
308
 
191
- - [ ] Fix all Critical issues before proceeding
192
- - [ ] Fix Important issues in this PR
193
- - [ ] Record Minor issues for later
309
+ - [ ] Fix all Critical findings before proceeding
310
+ - [ ] Fix Important findings in the current branch unless consciously deferred
311
+ - [ ] Record deferred Minor findings somewhere durable
312
+ - [ ] Push back on wrong findings with code/tests, not opinion
194
313
 
195
- | Severity | Action |
196
- | ------------- | ---------------------------------------- |
197
- | **Critical** | Fix immediately before any other work |
198
- | **Important** | Fix in this PR before merge |
199
- | **Minor** | Note in bead comments, fix later or skip |
314
+ | Severity | Action |
315
+ | ------------- | --------------------------------------------- |
316
+ | **Critical** | Fix immediately before any further work |
317
+ | **Important** | Fix now or explicitly defer with reason |
318
+ | **Minor** | Track for later if not worth immediate change |
200
319
 
201
- Push back if reviewer is wrong show code/tests that prove it works.
320
+ If a finding looks wrong, verify it against the codebase before changing anything.
321
+
322
+ ## Step 5: Re-verify
323
+
324
+ After fixing review findings, re-run the relevant verification commands.
325
+
326
+ At minimum, use the commands appropriate for the project toolchain:
327
+
328
+ - `npm run typecheck`
329
+ - `npm run lint`
330
+ - `npm test`
331
+ - `npm run build` (if release/build-sensitive)
332
+
333
+ Do not claim review is resolved until fresh verification passes.
202
334
 
203
335
  ## Placeholders Reference
204
336
 
205
- | Placeholder | What to fill |
206
- | ------------------------ | --------------------------------------- |
207
- | `{WHAT_WAS_IMPLEMENTED}` | Brief description of the feature/fix |
208
- | `{PLAN_OR_REQUIREMENTS}` | Link to plan.md or requirements summary |
209
- | `{BASE_SHA}` | Starting commit SHA |
210
- | `{HEAD_SHA}` | Ending commit SHA |
337
+ | Placeholder | What to fill |
338
+ | ----------------- | -------------------------------- |
339
+ | `{REVIEW_PACKET}` | Tight review packet with context |
340
+ | `{BASE_SHA}` | Starting commit SHA |
341
+ | `{HEAD_SHA}` | Ending commit SHA |
211
342
 
212
343
  ## Integration with Workflows
213
344
 
214
- | Command | When review runs |
215
- | ------- | ------------------------------------- |
216
- | `/ship` | After all tasks complete + gates pass |
217
- | `/pr` | Mandatory gate before push to GitHub |
218
- | `/lfg` | Between work and compound steps |
345
+ | Command | When review runs |
346
+ | ------- | ------------------------------------ |
347
+ | `/ship` | After work is complete and verified |
348
+ | `/pr` | Before pushing or opening PR |
349
+ | `/lfg` | Between execution and compound steps |
350
+
351
+ ## Common Mistakes
219
352
 
220
- All Critical issues must be resolved before proceeding. No exceptions.
353
+ - Running 5 reviewers on a tiny one-file fix with no real risk
354
+ - Sending vague prompts with no requirements or verification status
355
+ - Treating reviewer output as automatically correct
356
+ - Failing to deduplicate repeated findings
357
+ - Skipping re-verification after review fixes
221
358
 
222
359
  ## After Review: Compound
223
360
 
224
- Run `/compound` after fixing review findings to capture:
361
+ Run `/compound` after resolving review findings to capture:
225
362
 
226
- - What the review caught (patterns to watch for)
227
- - What false positives were dismissed (and why)
228
- - Any codebase conventions discovered during review
363
+ - Patterns review caught that should be prevented earlier
364
+ - False positives that should not be repeated
365
+ - Newly discovered codebase conventions
229
366
 
230
- This is how the review step feeds the compound flywheel.
367
+ That turns review from a gate into a feedback loop.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencodekit",
3
- "version": "0.18.3",
3
+ "version": "0.18.4",
4
4
  "description": "CLI tool for bootstrapping and managing OpenCodeKit projects",
5
5
  "keywords": [
6
6
  "agents",