opencodekit 0.18.2 → 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 +172 -49
- package/dist/template/.opencode/.version +1 -1
- package/dist/template/.opencode/AGENTS.md +39 -9
- package/dist/template/.opencode/AGENT_ALIGNMENT.md +6 -6
- package/dist/template/.opencode/agent/build.md +7 -103
- package/dist/template/.opencode/agent/general.md +0 -52
- package/dist/template/.opencode/agent/plan.md +10 -0
- package/dist/template/.opencode/agent/runner.md +79 -0
- package/dist/template/.opencode/command/create.md +13 -1
- package/dist/template/.opencode/command/init-context.md +20 -6
- package/dist/template/.opencode/command/init-user.md +18 -16
- package/dist/template/.opencode/command/lfg.md +3 -4
- package/dist/template/.opencode/command/ship.md +6 -48
- package/dist/template/.opencode/command/start.md +20 -3
- package/dist/template/.opencode/command/verify.md +12 -17
- package/dist/template/.opencode/context/README.md +29 -0
- package/dist/template/.opencode/memory/_templates/{STATE.md → state.md} +1 -1
- package/dist/template/.opencode/memory.db +0 -0
- package/dist/template/.opencode/memory.db-shm +0 -0
- package/dist/template/.opencode/memory.db-wal +0 -0
- package/dist/template/.opencode/opencode.json +131 -7
- package/dist/template/.opencode/package.json +1 -1
- package/dist/template/.opencode/plugin/lib/memory-helpers.ts +51 -16
- package/dist/template/.opencode/plugin/lib/memory-hooks.ts +1 -1
- package/dist/template/.opencode/skill/beads/references/TROUBLESHOOTING.md +25 -0
- package/dist/template/.opencode/skill/requesting-code-review/SKILL.md +242 -105
- package/dist/template/.opencode/skill/using-git-worktrees/SKILL.md +26 -0
- package/dist/template/.opencode/skill/verification-before-completion/references/VERIFICATION_PROTOCOL.md +67 -0
- package/package.json +1 -1
- /package/dist/template/.opencode/memory/_templates/{PROJECT.md → project.md} +0 -0
- /package/dist/template/.opencode/memory/_templates/{ROADMAP.md → roadmap.md} +0 -0
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://opencode.ai/config.json",
|
|
3
|
+
"keybinds": {
|
|
4
|
+
"leader": "`",
|
|
5
|
+
"session_parent": "<leader>up"
|
|
6
|
+
},
|
|
3
7
|
"agent": {
|
|
4
8
|
"build": {
|
|
5
9
|
"description": "Primary development agent with full codebase access",
|
|
@@ -10,11 +14,11 @@
|
|
|
10
14
|
},
|
|
11
15
|
"explore": {
|
|
12
16
|
"description": "Fast codebase search specialist",
|
|
13
|
-
"model": "
|
|
17
|
+
"model": "github-copilot/claude-haiku-4.5"
|
|
14
18
|
},
|
|
15
19
|
"general": {
|
|
16
20
|
"description": "General-purpose subagent for fast, well-defined tasks; delegates complexity quickly",
|
|
17
|
-
"model": "github-copilot/gpt-5.
|
|
21
|
+
"model": "github-copilot/gpt-5.3-codex"
|
|
18
22
|
},
|
|
19
23
|
"painter": {
|
|
20
24
|
"description": "Image generation and editing specialist using Gemini 3 Pro Image. Use for creating UI mockups, app icons, hero images, visual assets, and editing/redacting existing images",
|
|
@@ -22,19 +26,19 @@
|
|
|
22
26
|
},
|
|
23
27
|
"plan": {
|
|
24
28
|
"description": "Primary planning agent for architecture and multi-phase execution",
|
|
25
|
-
"model": "
|
|
29
|
+
"model": "github-copilot/gpt-5.4"
|
|
26
30
|
},
|
|
27
31
|
"review": {
|
|
28
32
|
"description": "Code review, debugging, and security audit specialist",
|
|
29
|
-
"model": "
|
|
33
|
+
"model": "github-copilot/claude-opus-4.6"
|
|
30
34
|
},
|
|
31
35
|
"scout": {
|
|
32
36
|
"description": "External research specialist for library docs and patterns",
|
|
33
|
-
"model": "
|
|
37
|
+
"model": "github-copilot/claude-sonnet-4.6"
|
|
34
38
|
},
|
|
35
39
|
"vision": {
|
|
36
40
|
"description": "Visual content specialist for multimodal analysis and UI/UX guidance",
|
|
37
|
-
"model": "
|
|
41
|
+
"model": "github-copilot/gemini-3.1-pro-preview"
|
|
38
42
|
}
|
|
39
43
|
},
|
|
40
44
|
"autoupdate": false,
|
|
@@ -387,6 +391,47 @@
|
|
|
387
391
|
}
|
|
388
392
|
}
|
|
389
393
|
},
|
|
394
|
+
"gpt-5.4": {
|
|
395
|
+
"modalities": {
|
|
396
|
+
"input": [
|
|
397
|
+
"text",
|
|
398
|
+
"image"
|
|
399
|
+
],
|
|
400
|
+
"output": [
|
|
401
|
+
"text"
|
|
402
|
+
]
|
|
403
|
+
},
|
|
404
|
+
"attachment": true,
|
|
405
|
+
"limit": {
|
|
406
|
+
"context": 400000,
|
|
407
|
+
"output": 128000
|
|
408
|
+
},
|
|
409
|
+
"options": {
|
|
410
|
+
"reasoningEffort": "medium",
|
|
411
|
+
"reasoningSummary": "auto",
|
|
412
|
+
"textVerbosity": "medium"
|
|
413
|
+
},
|
|
414
|
+
"reasoning": true,
|
|
415
|
+
"temperature": true,
|
|
416
|
+
"tool_call": true,
|
|
417
|
+
"variants": {
|
|
418
|
+
"high": {
|
|
419
|
+
"include": [
|
|
420
|
+
"reasoning.encrypted_content"
|
|
421
|
+
],
|
|
422
|
+
"reasoningEffort": "high",
|
|
423
|
+
"reasoningSummary": "auto"
|
|
424
|
+
},
|
|
425
|
+
"low": {
|
|
426
|
+
"reasoningEffort": "low",
|
|
427
|
+
"reasoningSummary": "auto"
|
|
428
|
+
},
|
|
429
|
+
"medium": {
|
|
430
|
+
"reasoningEffort": "medium",
|
|
431
|
+
"reasoningSummary": "auto"
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
},
|
|
390
435
|
"gpt-5.2-codex": {
|
|
391
436
|
"attachment": true,
|
|
392
437
|
"limit": {
|
|
@@ -423,6 +468,44 @@
|
|
|
423
468
|
"textVerbosity": "medium"
|
|
424
469
|
}
|
|
425
470
|
}
|
|
471
|
+
},
|
|
472
|
+
"gpt-5.3-codex": {
|
|
473
|
+
"name": "Gpt 5 3 Codex",
|
|
474
|
+
"attachment": true,
|
|
475
|
+
"limit": {
|
|
476
|
+
"context": 400000,
|
|
477
|
+
"output": 128000
|
|
478
|
+
},
|
|
479
|
+
"options": {
|
|
480
|
+
"reasoningEffort": "medium",
|
|
481
|
+
"reasoningSummary": "auto",
|
|
482
|
+
"textVerbosity": "medium"
|
|
483
|
+
},
|
|
484
|
+
"reasoning": true,
|
|
485
|
+
"temperature": true,
|
|
486
|
+
"tool_call": true,
|
|
487
|
+
"variants": {
|
|
488
|
+
"fast": {
|
|
489
|
+
"disabled": true
|
|
490
|
+
},
|
|
491
|
+
"high": {
|
|
492
|
+
"include": [
|
|
493
|
+
"reasoning.encrypted_content"
|
|
494
|
+
],
|
|
495
|
+
"reasoningEffort": "high",
|
|
496
|
+
"reasoningSummary": "auto",
|
|
497
|
+
"textVerbosity": "medium"
|
|
498
|
+
},
|
|
499
|
+
"low": {
|
|
500
|
+
"reasoningEffort": "low",
|
|
501
|
+
"reasoningSummary": "auto"
|
|
502
|
+
},
|
|
503
|
+
"medium": {
|
|
504
|
+
"reasoningEffort": "medium",
|
|
505
|
+
"reasoningSummary": "auto",
|
|
506
|
+
"textVerbosity": "medium"
|
|
507
|
+
}
|
|
508
|
+
}
|
|
426
509
|
}
|
|
427
510
|
},
|
|
428
511
|
"options": {
|
|
@@ -533,6 +616,47 @@
|
|
|
533
616
|
}
|
|
534
617
|
}
|
|
535
618
|
},
|
|
619
|
+
"gpt-5.4": {
|
|
620
|
+
"modalities": {
|
|
621
|
+
"input": [
|
|
622
|
+
"text",
|
|
623
|
+
"image"
|
|
624
|
+
],
|
|
625
|
+
"output": [
|
|
626
|
+
"text"
|
|
627
|
+
]
|
|
628
|
+
},
|
|
629
|
+
"attachment": true,
|
|
630
|
+
"limit": {
|
|
631
|
+
"context": 400000,
|
|
632
|
+
"output": 128000
|
|
633
|
+
},
|
|
634
|
+
"options": {
|
|
635
|
+
"reasoningEffort": "medium",
|
|
636
|
+
"reasoningSummary": "auto",
|
|
637
|
+
"textVerbosity": "medium"
|
|
638
|
+
},
|
|
639
|
+
"reasoning": true,
|
|
640
|
+
"temperature": true,
|
|
641
|
+
"tool_call": true,
|
|
642
|
+
"variants": {
|
|
643
|
+
"high": {
|
|
644
|
+
"include": [
|
|
645
|
+
"reasoning.encrypted_content"
|
|
646
|
+
],
|
|
647
|
+
"reasoningEffort": "high",
|
|
648
|
+
"reasoningSummary": "auto"
|
|
649
|
+
},
|
|
650
|
+
"low": {
|
|
651
|
+
"reasoningEffort": "low",
|
|
652
|
+
"reasoningSummary": "auto"
|
|
653
|
+
},
|
|
654
|
+
"medium": {
|
|
655
|
+
"reasoningEffort": "medium",
|
|
656
|
+
"reasoningSummary": "auto"
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
},
|
|
536
660
|
"gpt-5.2-codex": {
|
|
537
661
|
"variants": {
|
|
538
662
|
"fast": {
|
|
@@ -1553,4 +1677,4 @@
|
|
|
1553
1677
|
".DS_Store"
|
|
1554
1678
|
]
|
|
1555
1679
|
}
|
|
1556
|
-
}
|
|
1680
|
+
}
|
|
@@ -48,6 +48,8 @@ export const MAX_PROJECT_FILE_CHARS = 900;
|
|
|
48
48
|
export const MAX_HANDOFF_CHARS = 2500;
|
|
49
49
|
export const MAX_BEADS = 8;
|
|
50
50
|
export const MAX_COMBINED_CONTEXT_CHARS = 10000;
|
|
51
|
+
const BEADS_DB_READ_ATTEMPTS = 3;
|
|
52
|
+
const BEADS_DB_RETRY_DELAY_MS = 500;
|
|
51
53
|
|
|
52
54
|
// ============================================================================
|
|
53
55
|
// Compaction Helpers
|
|
@@ -122,24 +124,57 @@ export async function readLatestHandoff(handoffDir: string): Promise<string> {
|
|
|
122
124
|
return `Source: ${latest.name}\n${truncate(content, MAX_HANDOFF_CHARS)}`;
|
|
123
125
|
}
|
|
124
126
|
|
|
125
|
-
|
|
127
|
+
function delay(ms: number): Promise<void> {
|
|
128
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export async function readInProgressBeads(directory: string): Promise<string> {
|
|
126
132
|
const dbPath = path.join(directory, ".beads", "beads.db");
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
db
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
133
|
+
|
|
134
|
+
for (let attempt = 0; attempt < BEADS_DB_READ_ATTEMPTS; attempt++) {
|
|
135
|
+
let db: Database | undefined;
|
|
136
|
+
try {
|
|
137
|
+
db = new Database(dbPath, { readonly: true });
|
|
138
|
+
const rows = db
|
|
139
|
+
.query<{ id: string; title: string }, [number]>(
|
|
140
|
+
"SELECT id, title FROM issues WHERE status = 'in_progress' ORDER BY updated_at DESC LIMIT ?",
|
|
141
|
+
)
|
|
142
|
+
.all(MAX_BEADS);
|
|
143
|
+
return rows.length > 0
|
|
144
|
+
? rows.map((r) => `- ${r.id}: ${r.title}`).join("\n")
|
|
145
|
+
: "";
|
|
146
|
+
} catch (error) {
|
|
147
|
+
const code = String((error as { code?: string } | undefined)?.code ?? "");
|
|
148
|
+
const message = String(
|
|
149
|
+
(error as { message?: string } | undefined)?.message ?? error,
|
|
150
|
+
);
|
|
151
|
+
const isRetryable =
|
|
152
|
+
code.includes("SQLITE_BUSY") ||
|
|
153
|
+
code.includes("SQLITE_LOCKED") ||
|
|
154
|
+
message.includes("SQLITE_BUSY") ||
|
|
155
|
+
message.includes("SQLITE_LOCKED");
|
|
156
|
+
|
|
157
|
+
if (isRetryable && attempt < BEADS_DB_READ_ATTEMPTS - 1) {
|
|
158
|
+
await delay(BEADS_DB_RETRY_DELAY_MS);
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
if (isRetryable) {
|
|
163
|
+
console.warn(
|
|
164
|
+
`[memory] Failed to read beads.db after ${BEADS_DB_READ_ATTEMPTS} attempts: ${message}`,
|
|
165
|
+
);
|
|
166
|
+
} else {
|
|
167
|
+
console.warn(
|
|
168
|
+
`[memory] Failed to read beads.db, continuing without bead context: ${message}`,
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
return "";
|
|
172
|
+
} finally {
|
|
173
|
+
db?.close();
|
|
174
|
+
}
|
|
142
175
|
}
|
|
176
|
+
|
|
177
|
+
return "";
|
|
143
178
|
}
|
|
144
179
|
|
|
145
180
|
// ============================================================================
|
|
@@ -180,7 +180,7 @@ export function createHooks(deps: HookDeps) {
|
|
|
180
180
|
readLatestHandoff(handoffDir),
|
|
181
181
|
]);
|
|
182
182
|
|
|
183
|
-
const beadsContext = readInProgressBeads(directory);
|
|
183
|
+
const beadsContext = await readInProgressBeads(directory);
|
|
184
184
|
|
|
185
185
|
// Add relevant observations for session
|
|
186
186
|
let knowledgeContext = "";
|
|
@@ -11,3 +11,28 @@
|
|
|
11
11
|
|
|
12
12
|
- Run `br doctor` to repair database
|
|
13
13
|
- Check git remote access
|
|
14
|
+
|
|
15
|
+
## Database Lock / WAL Conflicts
|
|
16
|
+
|
|
17
|
+
**Symptoms:**
|
|
18
|
+
|
|
19
|
+
- `SQLITE_BUSY` or `SQLITE_LOCKED` errors when reading beads
|
|
20
|
+
- Stale `.beads/beads.db-wal` or `.beads/beads.db-journal` files after agent crash
|
|
21
|
+
|
|
22
|
+
**Cause:**
|
|
23
|
+
Agent interruption during bead operations can leave WAL/journal files in an inconsistent state.
|
|
24
|
+
|
|
25
|
+
**Fix:**
|
|
26
|
+
|
|
27
|
+
1. Ensure no agents are actively writing to beads.db
|
|
28
|
+
2. Remove stale lock files:
|
|
29
|
+
```bash
|
|
30
|
+
rm -f .beads/beads.db-wal .beads/beads.db-journal
|
|
31
|
+
```
|
|
32
|
+
3. Run `br sync --flush-only` to rebuild from JSONL source of truth
|
|
33
|
+
4. Verify: `br ready` should work without errors
|
|
34
|
+
|
|
35
|
+
**Prevention:**
|
|
36
|
+
|
|
37
|
+
- The memory plugin now retries bead.db reads automatically (3 attempts, 500ms delay)
|
|
38
|
+
- If persistent, check for zombie agent processes: `ps aux | grep opencode`
|