opencodekit 0.16.1 → 0.16.2
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/AGENTS.md +45 -5
- package/dist/template/.opencode/command/create.md +3 -3
- package/dist/template/.opencode/dcp.jsonc +79 -70
- package/dist/template/.opencode/memory.db-shm +0 -0
- package/dist/template/.opencode/memory.db-wal +0 -0
- package/dist/template/.opencode/opencode.json +1 -1
- package/dist/template/.opencode/package.json +1 -1
- package/dist/template/.opencode/plugin/sdk/copilot/chat/convert-to-openai-compatible-chat-messages.ts +3 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -750,7 +750,7 @@ var cac = (name = "") => new CAC(name);
|
|
|
750
750
|
// package.json
|
|
751
751
|
var package_default = {
|
|
752
752
|
name: "opencodekit",
|
|
753
|
-
version: "0.16.
|
|
753
|
+
version: "0.16.2",
|
|
754
754
|
description: "CLI tool for bootstrapping and managing OpenCodeKit projects",
|
|
755
755
|
keywords: ["agents", "cli", "mcp", "opencode", "opencodekit", "template"],
|
|
756
756
|
license: "MIT",
|
|
@@ -16,6 +16,27 @@ Everything else is guidelines, not laws.
|
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
+
## Trust Hierarchy
|
|
20
|
+
|
|
21
|
+
**DO NOT search when instructions already exist.** Searching is expensive. Follow this order:
|
|
22
|
+
|
|
23
|
+
1. **AGENTS.md** - Project-specific rules (this file or `./AGENTS.md`)
|
|
24
|
+
2. **Memory** - Past decisions, patterns, gotchas (`memory-search`)
|
|
25
|
+
3. **Project files** - `.opencode/memory/project/` (commands, conventions, tech-stack)
|
|
26
|
+
4. **Codebase search** - Only if above sources are incomplete or wrong
|
|
27
|
+
|
|
28
|
+
If instructions are incomplete or wrong, **update them** after finding the truth. Don't just use the correct info once—fix the source so future work benefits.
|
|
29
|
+
|
|
30
|
+
### Atomic Version
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
DO NOT search when instructions exist.
|
|
34
|
+
TRUST: AGENTS.md → memory → project files → search
|
|
35
|
+
UPDATE instructions when you find errors.
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
19
40
|
## Skills vs Commands
|
|
20
41
|
|
|
21
42
|
- Use **commands** for user-facing entrypoints (workflows and intent).
|
|
@@ -423,7 +444,25 @@ Before you start implementing, verify the requirements are clear. If interpretat
|
|
|
423
444
|
|
|
424
445
|
Before you claim completion, verify these things:
|
|
425
446
|
|
|
426
|
-
1. **Run
|
|
447
|
+
1. **Run validation commands** (in order):
|
|
448
|
+
|
|
449
|
+
```bash
|
|
450
|
+
# Type check (REQUIRED if TypeScript/JavaScript)
|
|
451
|
+
npm run typecheck # or: bun run typecheck, tsc --noEmit
|
|
452
|
+
|
|
453
|
+
# Build (REQUIRED)
|
|
454
|
+
npm run build # or: bun run build, cargo build, go build
|
|
455
|
+
|
|
456
|
+
# Test (REQUIRED if tests exist)
|
|
457
|
+
npm test # or: bun test, cargo test, go test, pytest
|
|
458
|
+
|
|
459
|
+
# Lint (REQUIRED if linter configured)
|
|
460
|
+
npm run lint # or: bun run lint, cargo clippy, golangci-lint
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
Skip only if project lacks that script. Document missing scripts in `project/gotchas.md`.
|
|
464
|
+
|
|
465
|
+
2. **Run review agent** on any significant code changes:
|
|
427
466
|
|
|
428
467
|
```typescript
|
|
429
468
|
Task({
|
|
@@ -435,11 +474,12 @@ Before you claim completion, verify these things:
|
|
|
435
474
|
|
|
436
475
|
If review suggests simplification, implement it before proceeding.
|
|
437
476
|
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
477
|
+
3. You ran `bd close <id>` with a meaningful reason
|
|
478
|
+
4. You ran `bd sync` to push changes
|
|
479
|
+
5. There are no pending LSP nudges
|
|
480
|
+
6. You saved observations for any important decisions or patterns
|
|
442
481
|
|
|
482
|
+
**DO NOT skip validation commands.** Failed builds/tests after merge waste everyone's time.
|
|
443
483
|
**DO NOT skip the Oracle critique for non-trivial changes.** This prevents bloated, overcomplicated solutions that could be 10x simpler.
|
|
444
484
|
|
|
445
485
|
---
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Create a specification for a bead using templates
|
|
3
3
|
argument-hint: "<bead-id> [--prd] [--proposal]"
|
|
4
|
-
agent:
|
|
5
|
-
subtask: true
|
|
4
|
+
agent: build
|
|
6
5
|
---
|
|
7
6
|
|
|
8
7
|
# Create: $ARGUMENTS
|
|
@@ -108,7 +107,8 @@ question({
|
|
|
108
107
|
},
|
|
109
108
|
{
|
|
110
109
|
header: "Users",
|
|
111
|
-
question:
|
|
110
|
+
question:
|
|
111
|
+
"Who will use this? (developers, end users, API consumers, etc.)",
|
|
112
112
|
options: [
|
|
113
113
|
{ label: "Developers", description: "Internal tooling or API" },
|
|
114
114
|
{ label: "End users", description: "Customer-facing feature" },
|
|
@@ -1,72 +1,81 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/Opencode-DCP/opencode-dynamic-context-pruning/dev/dcp.schema.json",
|
|
3
|
+
"enabled": true,
|
|
4
|
+
"debug": false,
|
|
5
|
+
// "minimal" shows prune activity without noise; "detailed" shows token counts
|
|
6
|
+
"pruneNotification": "off",
|
|
7
|
+
// "chat" (in-conversation) or "toast" (system notification) - beta feature
|
|
8
|
+
"pruneNotificationType": "chat",
|
|
9
|
+
// Commands: /dcp context, /dcp stats, /dcp sweep
|
|
10
|
+
"commands": {
|
|
11
|
+
"enabled": true,
|
|
12
|
+
// Protect these from /dcp sweep
|
|
13
|
+
"protectedTools": ["observation", "memory-update", "memory-search"]
|
|
14
|
+
},
|
|
15
|
+
"turnProtection": {
|
|
16
|
+
"enabled": true,
|
|
17
|
+
"turns": 4
|
|
18
|
+
},
|
|
19
|
+
// Protected file patterns - never auto-prune reads of these files
|
|
20
|
+
"protectedFilePatterns": [
|
|
21
|
+
"**/.env*",
|
|
22
|
+
"**/AGENTS.md",
|
|
23
|
+
"**/.opencode/**",
|
|
24
|
+
"**/.beads/**",
|
|
25
|
+
"**/package.json",
|
|
26
|
+
"**/tsconfig.json",
|
|
27
|
+
"**/biome.json"
|
|
28
|
+
],
|
|
29
|
+
"tools": {
|
|
30
|
+
"settings": {
|
|
31
|
+
"nudgeEnabled": true,
|
|
32
|
+
"nudgeFrequency": 10,
|
|
33
|
+
// Protect state-modifying and critical workflow tools
|
|
34
|
+
// LSP excluded: ephemeral exploration, prune after understanding
|
|
35
|
+
"protectedTools": [
|
|
36
|
+
"write",
|
|
37
|
+
"edit",
|
|
38
|
+
"memory-update",
|
|
39
|
+
"observation",
|
|
40
|
+
"skill",
|
|
41
|
+
"skill_mcp",
|
|
42
|
+
"task",
|
|
43
|
+
"batch",
|
|
44
|
+
"todowrite",
|
|
45
|
+
"todoread"
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
// Beta: renamed from "discard" - removes tool content without preservation
|
|
49
|
+
"prune": {
|
|
50
|
+
"enabled": true
|
|
51
|
+
},
|
|
52
|
+
// Beta: renamed from "extract" - distills key findings before removing
|
|
53
|
+
"distill": {
|
|
54
|
+
"enabled": true,
|
|
55
|
+
"showDistillation": false
|
|
56
|
+
},
|
|
57
|
+
// Beta: NEW - collapses range of messages + tools into single summary
|
|
58
|
+
"compress": {
|
|
59
|
+
"enabled": true,
|
|
60
|
+
"showCompression": true
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"strategies": {
|
|
64
|
+
// Dedup = zero LLM cost, high impact - always enable
|
|
65
|
+
"deduplication": {
|
|
66
|
+
"enabled": true,
|
|
67
|
+
"protectedTools": []
|
|
68
|
+
},
|
|
69
|
+
// Supersede writes = zero cost, removes redundant write inputs after read
|
|
70
|
+
// Note: default changed to false in beta, we explicitly enable
|
|
71
|
+
"supersedeWrites": {
|
|
72
|
+
"enabled": true
|
|
73
|
+
},
|
|
74
|
+
// Purge error inputs after N turns
|
|
75
|
+
"purgeErrors": {
|
|
76
|
+
"enabled": true,
|
|
77
|
+
"turns": 4,
|
|
78
|
+
"protectedTools": []
|
|
79
|
+
}
|
|
80
|
+
}
|
|
72
81
|
}
|
|
Binary file
|
|
Binary file
|
|
@@ -20,14 +20,11 @@ export function convertToOpenAICompatibleChatMessages(
|
|
|
20
20
|
const metadata = getOpenAIMetadata({ ...message });
|
|
21
21
|
switch (role) {
|
|
22
22
|
case "system": {
|
|
23
|
+
// v1.1.49 fix: Copilot API expects system message content as plain string,
|
|
24
|
+
// not array format. Array format causes AGENTS.md to be silently ignored.
|
|
23
25
|
messages.push({
|
|
24
26
|
role: "system",
|
|
25
|
-
content:
|
|
26
|
-
{
|
|
27
|
-
type: "text",
|
|
28
|
-
text: content,
|
|
29
|
-
},
|
|
30
|
-
],
|
|
27
|
+
content: content,
|
|
31
28
|
...metadata,
|
|
32
29
|
});
|
|
33
30
|
break;
|
package/package.json
CHANGED