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 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.1",
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 review agent** on any significant code changes:
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
- 2. You ran `bd close <id>` with a meaningful reason
439
- 3. You ran `bd sync` to push changes
440
- 4. There are no pending LSP nudges
441
- 5. You saved observations for any important decisions or patterns
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: plan
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: "Who will use this? (developers, end users, API consumers, etc.)",
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
- "$schema": "https://unpkg.com/@anthropic/dynamic-context-protocol@1.2.7/schema.json",
3
- "enabled": true,
4
- "debug": false,
5
- // "minimal" shows prune activity without noise; "detailed" shows token counts
6
- "pruneNotification": "off",
7
- "turnProtection": {
8
- "enabled": true,
9
- // 3 turns = faster cleanup while still protecting recent context
10
- "turns": 3,
11
- },
12
- // Protected file patterns - never auto-prune reads of these files (v1.1.5+)
13
- "protectedFilePatterns": [
14
- "**/.env*",
15
- "**/AGENTS.md",
16
- "**/.opencode/**",
17
- "**/.beads/**",
18
- "**/package.json",
19
- "**/tsconfig.json",
20
- "**/biome.json",
21
- ],
22
- "tools": {
23
- "settings": {
24
- "nudgeEnabled": true,
25
- // Nudge every 8 tool calls (slightly more aggressive than default 10)
26
- "nudgeFrequency": 8,
27
- // Protect state-modifying and critical workflow tools
28
- "protectedTools": [
29
- "write",
30
- "edit",
31
- "memory-update",
32
- "skill",
33
- "skill_mcp",
34
- "task",
35
- "batch",
36
- "todowrite",
37
- "todoread",
38
- "lsp",
39
- "lsp_lsp_rename",
40
- "lsp_lsp_find_references",
41
- "lsp_lsp_goto_definition",
42
- "lsp_lsp_code_actions",
43
- "lsp_lsp_code_action_apply",
44
- "lsp_lsp_organize_imports",
45
- ],
46
- },
47
- "discard": {
48
- "enabled": true,
49
- },
50
- "extract": {
51
- "enabled": true,
52
- "showDistillation": false,
53
- },
54
- },
55
- "strategies": {
56
- // Dedup = zero LLM cost, high impact - always enable
57
- "deduplication": {
58
- "enabled": true,
59
- "protectedTools": [],
60
- },
61
- // Supersede writes = zero cost, removes redundant write inputs after read
62
- "supersedeWrites": {
63
- "enabled": true,
64
- },
65
- // Purge error inputs after 3 turns
66
- "purgeErrors": {
67
- "enabled": true,
68
- "turns": 3,
69
- "protectedTools": [],
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
  }
@@ -155,7 +155,7 @@
155
155
  }
156
156
  },
157
157
  "plugin": [
158
- "@tarquinen/opencode-dcp@latest",
158
+ "@tarquinen/opencode-dcp@beta",
159
159
  "@franlol/opencode-md-table-formatter@0.0.3"
160
160
  ],
161
161
  "provider": {
@@ -11,7 +11,7 @@
11
11
  "type-check": "tsc --noEmit"
12
12
  },
13
13
  "dependencies": {
14
- "@opencode-ai/plugin": "1.1.48"
14
+ "@opencode-ai/plugin": "1.1.49"
15
15
  },
16
16
  "devDependencies": {
17
17
  "@types/node": "^25.1.0",
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencodekit",
3
- "version": "0.16.1",
3
+ "version": "0.16.2",
4
4
  "description": "CLI tool for bootstrapping and managing OpenCodeKit projects",
5
5
  "keywords": ["agents", "cli", "mcp", "opencode", "opencodekit", "template"],
6
6
  "license": "MIT",