opencodekit 0.15.14 → 0.15.16
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/README.md +4 -4
- package/dist/index.js +7 -19
- package/dist/template/.opencode/AGENTS.md +20 -1
- package/dist/template/.opencode/README.md +2 -2
- package/dist/template/.opencode/agent/plan.md +2 -2
- package/dist/template/.opencode/agent/scout.md +18 -18
- package/dist/template/.opencode/command/research-ui.md +1 -1
- package/dist/template/.opencode/command/research.md +4 -4
- package/dist/template/.opencode/memory/observations/2026-01-28-decision-gh-grep-mcp-wrapper-vs-native-grep-searc.md +4 -4
- package/dist/template/.opencode/memory/observations/2026-01-29-learning-karpathy-llm-coding-insights-dec-2025.md +44 -0
- package/dist/template/.opencode/memory/research/opencode-mcp-bug-report.md +1 -1
- package/dist/template/.opencode/opencode.json +841 -697
- package/dist/template/.opencode/package.json +1 -1
- package/dist/template/.opencode/plans/1768385996691-silent-wizard.md +2 -2
- package/dist/template/.opencode/skill/deep-research/SKILL.md +1 -1
- package/dist/template/.opencode/skill/source-code-research/SKILL.md +2 -2
- package/dist/template/.opencode/skill/tool-priority/SKILL.md +1 -1
- package/dist/template/.opencode/tool/{grep-search.ts → grepsearch.ts} +3 -3
- package/package.json +4 -16
package/README.md
CHANGED
|
@@ -80,8 +80,8 @@ Background Plugins:
|
|
|
80
80
|
Supporting:
|
|
81
81
|
• 30+ Skills (domain expertise loaded on-demand)
|
|
82
82
|
• 26+ Commands (workflow shortcuts)
|
|
83
|
-
• 3 MCP Services (context7, exa) +
|
|
84
|
-
• Custom Tools (memory-*, observation,
|
|
83
|
+
• 3 MCP Services (context7, exa) + grepsearch tool + skill-embedded MCPs
|
|
84
|
+
• Custom Tools (memory-*, observation, grepsearch, lsp-*)
|
|
85
85
|
• Beads task tracking (`bd` CLI for multi-session workflows)
|
|
86
86
|
• Manual Handoffs (clean phase transitions)
|
|
87
87
|
```
|
|
@@ -223,9 +223,9 @@ You've successfully set up OpenCodeKit when:
|
|
|
223
223
|
- ✅ Skills load on-demand (30+ skills)
|
|
224
224
|
- ✅ Delegation is clear (build → specialized subagents)
|
|
225
225
|
- ✅ `/handoff` creates portable bundles (.opencode/memory/handoffs/)
|
|
226
|
-
- ✅ Tools configured (context7,
|
|
226
|
+
- ✅ Tools configured (context7, grepsearch + skill-embedded MCP)
|
|
227
227
|
- ✅ Background plugins active (enforcer, compactor, truncator)
|
|
228
|
-
- ✅ Custom tools available (memory-_, observation,
|
|
228
|
+
- ✅ Custom tools available (memory-_, observation, grepsearch, lsp-_)
|
|
229
229
|
- ✅ Environment variables set (.opencode/.env with API keys)
|
|
230
230
|
|
|
231
231
|
---
|
package/dist/index.js
CHANGED
|
@@ -750,16 +750,9 @@ var cac = (name = "") => new CAC(name);
|
|
|
750
750
|
// package.json
|
|
751
751
|
var package_default = {
|
|
752
752
|
name: "opencodekit",
|
|
753
|
-
version: "0.15.
|
|
753
|
+
version: "0.15.16",
|
|
754
754
|
description: "CLI tool for bootstrapping and managing OpenCodeKit projects",
|
|
755
|
-
keywords: [
|
|
756
|
-
"agents",
|
|
757
|
-
"cli",
|
|
758
|
-
"mcp",
|
|
759
|
-
"opencode",
|
|
760
|
-
"opencodekit",
|
|
761
|
-
"template"
|
|
762
|
-
],
|
|
755
|
+
keywords: ["agents", "cli", "mcp", "opencode", "opencodekit", "template"],
|
|
763
756
|
license: "MIT",
|
|
764
757
|
author: "OpenCodeKit",
|
|
765
758
|
repository: {
|
|
@@ -769,10 +762,7 @@ var package_default = {
|
|
|
769
762
|
bin: {
|
|
770
763
|
ock: "dist/index.js"
|
|
771
764
|
},
|
|
772
|
-
files: [
|
|
773
|
-
"dist",
|
|
774
|
-
"README.md"
|
|
775
|
-
],
|
|
765
|
+
files: ["dist", "README.md"],
|
|
776
766
|
type: "module",
|
|
777
767
|
publishConfig: {
|
|
778
768
|
access: "public",
|
|
@@ -816,9 +806,7 @@ var package_default = {
|
|
|
816
806
|
engines: {
|
|
817
807
|
bun: ">=1.3.2"
|
|
818
808
|
},
|
|
819
|
-
trustedDependencies: [
|
|
820
|
-
"@beads/bd"
|
|
821
|
-
]
|
|
809
|
+
trustedDependencies: ["@beads/bd"]
|
|
822
810
|
};
|
|
823
811
|
|
|
824
812
|
// src/commands/agent.ts
|
|
@@ -3884,13 +3872,13 @@ var MODEL_PRESETS = {
|
|
|
3884
3872
|
}
|
|
3885
3873
|
},
|
|
3886
3874
|
recommend: {
|
|
3887
|
-
model: "
|
|
3875
|
+
model: "github-copilot/claude-opus-4.5",
|
|
3888
3876
|
agents: {
|
|
3889
|
-
build: "
|
|
3877
|
+
build: "github-copilot/claude-opus-4.5",
|
|
3890
3878
|
plan: "openai/gpt-5.2",
|
|
3891
3879
|
review: "openai/gpt-5.2-codex",
|
|
3892
3880
|
explore: "proxypal/gemini-3-flash-preview",
|
|
3893
|
-
general: "
|
|
3881
|
+
general: "github-copilot/claude-haiku-4.5",
|
|
3894
3882
|
looker: "proxypal/gemini-3-flash-preview",
|
|
3895
3883
|
vision: "proxypal/gemini-3-pro-preview",
|
|
3896
3884
|
scout: "proxypal/gemini-3-flash-preview",
|
|
@@ -359,7 +359,26 @@ Before you start implementing, verify the requirements are clear. If interpretat
|
|
|
359
359
|
|
|
360
360
|
### Before claiming done
|
|
361
361
|
|
|
362
|
-
Before you claim completion, verify these things:
|
|
362
|
+
Before you claim completion, verify these things:
|
|
363
|
+
|
|
364
|
+
1. **Run Oracle critique** on any significant code changes:
|
|
365
|
+
|
|
366
|
+
```typescript
|
|
367
|
+
oracle({
|
|
368
|
+
question: "Is this solution overcomplicated? Could it be 10x simpler?",
|
|
369
|
+
mode: "critique",
|
|
370
|
+
context: "<summary of changes>",
|
|
371
|
+
});
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
If Oracle suggests simplification, implement it before proceeding.
|
|
375
|
+
|
|
376
|
+
2. You ran `bd close <id>` with a meaningful reason
|
|
377
|
+
3. You ran `bd sync` to push changes
|
|
378
|
+
4. There are no pending LSP nudges
|
|
379
|
+
5. You saved observations for any important decisions or patterns
|
|
380
|
+
|
|
381
|
+
**DO NOT skip the Oracle critique for non-trivial changes.** This prevents bloated, overcomplicated solutions that could be 10x simpler.
|
|
363
382
|
|
|
364
383
|
---
|
|
365
384
|
|
|
@@ -189,8 +189,8 @@ Plugins run automatically in every session:
|
|
|
189
189
|
- Requires: EXA_API_KEY
|
|
190
190
|
- GitHub: https://github.com/exa-labs/exa-mcp-server
|
|
191
191
|
|
|
192
|
-
3. **
|
|
193
|
-
- Native tool: `
|
|
192
|
+
3. **grepsearch** - Search 1M+ public GitHub repositories via grep.app
|
|
193
|
+
- Native tool: `grepsearch({ query: "...", language: [...] })`
|
|
194
194
|
- No API key needed (public service)
|
|
195
195
|
- Direct HTTP wrapper (no MCP overhead)
|
|
196
196
|
|
|
@@ -4,13 +4,13 @@ mode: primary
|
|
|
4
4
|
temperature: 0.2
|
|
5
5
|
permission:
|
|
6
6
|
write:
|
|
7
|
-
"*":
|
|
7
|
+
"*": ask
|
|
8
8
|
".beads/artifacts/*/*.md": allow
|
|
9
9
|
".opencode/memory/plans/*.md": allow
|
|
10
10
|
".opencode/memory/project/*.md": allow
|
|
11
11
|
".opencode/plans/*.md": allow
|
|
12
12
|
edit:
|
|
13
|
-
"*":
|
|
13
|
+
"*": ask
|
|
14
14
|
".beads/artifacts/*/*.md": allow
|
|
15
15
|
".opencode/memory/plans/*.md": allow
|
|
16
16
|
".opencode/memory/project/*.md": allow
|
|
@@ -93,7 +93,7 @@ Run 2-3 tool calls in parallel.
|
|
|
93
93
|
**Triggers:** "how do others", "compare", "best practices", "production patterns"
|
|
94
94
|
**Target:** Summary, 3-5 code examples, tradeoffs, recommendation
|
|
95
95
|
|
|
96
|
-
1. Search GitHub with
|
|
96
|
+
1. Search GitHub with grepsearch (vary queries for different angles)
|
|
97
97
|
2. Compare 3-5 implementations from different repositories
|
|
98
98
|
3. Synthesize common patterns
|
|
99
99
|
4. Note tradeoffs and edge cases
|
|
@@ -101,8 +101,8 @@ Run 2-3 tool calls in parallel.
|
|
|
101
101
|
```typescript
|
|
102
102
|
// Run 4-6 external tool calls in parallel
|
|
103
103
|
// Adapt language filter based on research context
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
grepsearch({ query: "<pattern 1>" }); // No language filter = search all
|
|
105
|
+
grepsearch({ query: "<pattern 2>", language: "<relevant lang>" });
|
|
106
106
|
codesearch({ query: "<API usage>", tokensNum: 5000 });
|
|
107
107
|
context7_query_docs({ libraryId: "<id>", topic: "<feature>" });
|
|
108
108
|
```
|
|
@@ -123,7 +123,7 @@ Run 4-6 tool calls in parallel.
|
|
|
123
123
|
|
|
124
124
|
Every code reference must include a GitHub permalink. Never link to a branch or tag that can change.
|
|
125
125
|
|
|
126
|
-
To construct a permalink: use `
|
|
126
|
+
To construct a permalink: use `grepsearch` to find code, then build the URL from the repository and file path returned. Format: `https://github.com/owner/repo/blob/<sha>/path/to/file#L10-L20`.
|
|
127
127
|
|
|
128
128
|
## Tool Priority (External Sources Only)
|
|
129
129
|
|
|
@@ -132,7 +132,7 @@ To construct a permalink: use `grep_search` to find code, then build the URL fro
|
|
|
132
132
|
| 1 | memory-search | Past research findings | Instant |
|
|
133
133
|
| 2 | context7 | Official library docs | Fast |
|
|
134
134
|
| 3 | codesearch | Exa Code API for SDK/library patterns | Fast |
|
|
135
|
-
| 4 |
|
|
135
|
+
| 4 | grepsearch | Cross-repo GitHub code search (1M+ repos) | Medium |
|
|
136
136
|
| 5 | webfetch | Specific doc URLs, READMEs, changelogs | Medium |
|
|
137
137
|
| 6 | opensrc + LSP | Clone & analyze source code | Slow |
|
|
138
138
|
| 7 | websearch | Tutorials, blog posts, recent news | Slow |
|
|
@@ -210,14 +210,14 @@ context7_query_docs({ libraryId: nodeId, topic: "streams API" });
|
|
|
210
210
|
| Empty results | Try related terms or "API reference" |
|
|
211
211
|
| API error | Verify CONTEXT7_API_KEY is set (optional) |
|
|
212
212
|
|
|
213
|
-
##
|
|
213
|
+
## grepsearch Tool
|
|
214
214
|
|
|
215
215
|
Use for cross-repository code search across 1M+ public GitHub repositories.
|
|
216
216
|
|
|
217
217
|
### Schema
|
|
218
218
|
|
|
219
219
|
```typescript
|
|
220
|
-
|
|
220
|
+
grepsearch({
|
|
221
221
|
query: string, // Required - search pattern (literal code, not keywords)
|
|
222
222
|
repo?: string, // Optional - filter to specific repo (e.g., "vercel/ai")
|
|
223
223
|
language?: string[], // Optional - e.g., ["TypeScript", "TSX"]
|
|
@@ -247,22 +247,22 @@ grep_search({
|
|
|
247
247
|
|
|
248
248
|
```typescript
|
|
249
249
|
// Basic repo search
|
|
250
|
-
|
|
250
|
+
grepsearch({ query: "batch_tool", repo: "anomalyco/opencode" });
|
|
251
251
|
|
|
252
252
|
// With language filter
|
|
253
|
-
|
|
253
|
+
grepsearch({
|
|
254
254
|
query: "getServerSession",
|
|
255
255
|
language: ["TypeScript", "TSX"],
|
|
256
256
|
});
|
|
257
257
|
|
|
258
258
|
// Regex pattern (multi-line)
|
|
259
|
-
|
|
259
|
+
grepsearch({
|
|
260
260
|
query: "(?s)useEffect\\(\\(\\) => {.*removeEventListener",
|
|
261
261
|
useRegexp: true,
|
|
262
262
|
});
|
|
263
263
|
|
|
264
264
|
// Path filter for specific files
|
|
265
|
-
|
|
265
|
+
grepsearch({
|
|
266
266
|
query: "CORS(",
|
|
267
267
|
language: ["Python"],
|
|
268
268
|
matchCase: true,
|
|
@@ -406,8 +406,8 @@ Structure your response as:
|
|
|
406
406
|
|
|
407
407
|
```
|
|
408
408
|
context7 fails → try codesearch for patterns
|
|
409
|
-
codesearch empty → try
|
|
410
|
-
|
|
409
|
+
codesearch empty → try grepsearch with broader query
|
|
410
|
+
grepsearch empty → webfetch specific doc URLs if known
|
|
411
411
|
still stuck → opensrc clone + LSP analysis
|
|
412
412
|
last resort → websearch for tutorials/blogs
|
|
413
413
|
```
|
|
@@ -417,10 +417,10 @@ last resort → websearch for tutorials/blogs
|
|
|
417
417
|
**context7 doesn't find library:**
|
|
418
418
|
|
|
419
419
|
1. Try `codesearch({ query: "<library> <function> example" })`
|
|
420
|
-
2. Try `
|
|
420
|
+
2. Try `grepsearch({ query: "import.*from.*<library>", language: ["TypeScript"] })`
|
|
421
421
|
3. Clone with `npx opensrc <library>` and read source
|
|
422
422
|
|
|
423
|
-
**
|
|
423
|
+
**grepsearch returns nothing:**
|
|
424
424
|
|
|
425
425
|
- Broaden query: search concepts, not exact function names
|
|
426
426
|
- Remove specific repo filter to search across all repos
|
|
@@ -429,7 +429,7 @@ last resort → websearch for tutorials/blogs
|
|
|
429
429
|
- Search for error messages, config patterns, or import statements
|
|
430
430
|
- Fall back to `codesearch` for conceptual queries
|
|
431
431
|
|
|
432
|
-
**
|
|
432
|
+
**grepsearch API error:**
|
|
433
433
|
|
|
434
434
|
- The grep.app API may be temporarily unavailable
|
|
435
435
|
- Fall back to `codesearch` for similar functionality
|
|
@@ -458,6 +458,6 @@ NO URL GUESSING: Only use URLs from tools or user input.
|
|
|
458
458
|
CITE EVERYTHING: No claims without source links.
|
|
459
459
|
|
|
460
460
|
Quick: context7 → codesearch → websearch (2-3 parallel calls)
|
|
461
|
-
Deep:
|
|
462
|
-
Fallback: context7 → codesearch →
|
|
461
|
+
Deep: grepsearch (4-6 parallel calls) → compare 3-5 repos → synthesize
|
|
462
|
+
Fallback: context7 → codesearch → grepsearch → webfetch → opensrc → websearch
|
|
463
463
|
```
|
|
@@ -50,7 +50,7 @@ Return file:line references for all findings.`,
|
|
|
50
50
|
|
|
51
51
|
### External Research → @scout (this agent)
|
|
52
52
|
|
|
53
|
-
Scout handles external sources (context7,
|
|
53
|
+
Scout handles external sources (context7, grepsearch, codesearch, etc.)
|
|
54
54
|
|
|
55
55
|
### Parallel Execution
|
|
56
56
|
|
|
@@ -60,7 +60,7 @@ Run internal and external research in parallel:
|
|
|
60
60
|
// Launch both in parallel
|
|
61
61
|
task({ subagent_type: "explore", prompt: "LSP analysis of..." });
|
|
62
62
|
context7_resolve_library_id({ libraryName: "<lib>" });
|
|
63
|
-
|
|
63
|
+
grepsearch({ query: "<pattern>", language: "TypeScript" });
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
## Load Context
|
|
@@ -107,7 +107,7 @@ If memory search fails (Ollama not running), continue to external sources.
|
|
|
107
107
|
2. **Official docs** (high trust) - What does the library documentation say?
|
|
108
108
|
3. **Context7** (high trust) - API usage and examples
|
|
109
109
|
4. **Source code** (high trust) - Library implementation (use `source-code-research` skill)
|
|
110
|
-
5. **GitHub examples** (medium trust) - Real-world patterns via codesearch/
|
|
110
|
+
5. **GitHub examples** (medium trust) - Real-world patterns via codesearch/grepsearch
|
|
111
111
|
6. **Web search** (lower trust) - Only if tiers 1-5 don't answer
|
|
112
112
|
|
|
113
113
|
## Research
|
|
@@ -161,7 +161,7 @@ npx opensrc <owner>/<repo> # GitHub repo
|
|
|
161
161
|
|
|
162
162
|
```typescript
|
|
163
163
|
codesearch({ query: "<API usage pattern>", tokensNum: 5000 });
|
|
164
|
-
|
|
164
|
+
grepsearch({ query: "<code pattern>", language: "TypeScript" });
|
|
165
165
|
```
|
|
166
166
|
|
|
167
167
|
## Validate Findings
|
|
@@ -4,18 +4,18 @@ created: 2026-01-28T16:59:35.621Z
|
|
|
4
4
|
confidence: high
|
|
5
5
|
valid_until: null
|
|
6
6
|
superseded_by: null
|
|
7
|
-
concepts: ["
|
|
7
|
+
concepts: ["grepsearch", "MCP", "native tool", "architecture", "best practices"]
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
# 🎯 gh-grep MCP wrapper vs native
|
|
10
|
+
# 🎯 gh-grep MCP wrapper vs native grepsearch tool
|
|
11
11
|
|
|
12
12
|
🟢 **Confidence:** high
|
|
13
13
|
|
|
14
14
|
Created two implementations for GitHub code search:
|
|
15
15
|
|
|
16
|
-
1. **Native tool** (.opencode/tool/
|
|
16
|
+
1. **Native tool** (.opencode/tool/grepsearch.ts): TypeScript wrapper around grep.app API - WORKING ✅
|
|
17
17
|
2. **MCP skill** (.opencode/skill/gh-grep/): Skill wrapper that calls uvx grep-mcp server - BROKEN ❌
|
|
18
18
|
|
|
19
|
-
The MCP server has an argument parsing bug ('str' object has no attribute 'get') that prevents tool execution. Even the SKILL.md documentation admits: "Note: The MCP server (grep-mcp) may have bugs. The native
|
|
19
|
+
The MCP server has an argument parsing bug ('str' object has no attribute 'get') that prevents tool execution. Even the SKILL.md documentation admits: "Note: The MCP server (grep-mcp) may have bugs. The native grepsearch tool is recommended."
|
|
20
20
|
|
|
21
21
|
**Key insight**: We already documented the problem and recommended against the MCP approach. The native tool works perfectly and doesn't require external process dependencies.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: learning
|
|
3
|
+
created: 2026-01-29T01:59:58.781Z
|
|
4
|
+
confidence: high
|
|
5
|
+
valid_until: null
|
|
6
|
+
superseded_by: null
|
|
7
|
+
concepts: ["karpathy", "llm-coding", "best-practices", "declarative", "test-first", "sycophancy", "simplicity", "leverage"]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# 📚 Karpathy LLM coding insights Dec 2025
|
|
11
|
+
|
|
12
|
+
🟢 **Confidence:** high
|
|
13
|
+
|
|
14
|
+
From Andrej Karpathy's analysis of LLM-assisted coding (Dec 2025):
|
|
15
|
+
|
|
16
|
+
KEY PROBLEMS:
|
|
17
|
+
1. Wrong assumptions - models assume without checking
|
|
18
|
+
2. No confusion management - don't seek clarifications
|
|
19
|
+
3. Sycophancy - don't push back when they should
|
|
20
|
+
4. Overcomplicate - bloated abstractions (1000 lines → 100 lines possible)
|
|
21
|
+
5. Side effects - change unrelated code
|
|
22
|
+
6. No cleanup - dead code remains
|
|
23
|
+
|
|
24
|
+
BEST PRACTICES:
|
|
25
|
+
1. DECLARATIVE > IMPERATIVE - give success criteria, not step-by-step instructions
|
|
26
|
+
2. TEST-FIRST - write tests, then pass them (TDD skill)
|
|
27
|
+
3. LOOPING - LLMs excel at looping until goals met (verification skill)
|
|
28
|
+
4. NAIVE → OPTIMIZED - write correct first, then optimize
|
|
29
|
+
5. BROWSER MCP - put agents in feedback loops with real systems
|
|
30
|
+
|
|
31
|
+
LEVERAGE PRINCIPLE:
|
|
32
|
+
"Don't tell it what to do, give it success criteria and watch it go"
|
|
33
|
+
|
|
34
|
+
OPENCODE ALIGNMENT:
|
|
35
|
+
- Oracle tool → anti-sycophancy (critique mode)
|
|
36
|
+
- Question tool → clarification seeking
|
|
37
|
+
- TDD skill → test-first workflow
|
|
38
|
+
- Verification skill → looping until green
|
|
39
|
+
- LSP chain → prevent wrong assumptions
|
|
40
|
+
|
|
41
|
+
MISSING:
|
|
42
|
+
- Explicit simplicity gate ("can this be 10x simpler?")
|
|
43
|
+
- Dead code cleanup protocol
|
|
44
|
+
- Side-effect prevention checklist
|
|
@@ -100,7 +100,7 @@ The bug is in **OpenCode's tool response handler**, not the MCP connection layer
|
|
|
100
100
|
|
|
101
101
|
- `context7_resolve-library-id` - Native HTTP wrapper (works)
|
|
102
102
|
- `context7_query-docs` - Native HTTP wrapper (works)
|
|
103
|
-
- `
|
|
103
|
+
- `grepsearch` - Native HTTP wrapper (works)
|
|
104
104
|
- `codesearch` (Exa Code API) - works
|
|
105
105
|
- `websearch` (Exa Web Search) - works
|
|
106
106
|
|