opencodekit 0.14.0 → 0.14.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.
Files changed (54) hide show
  1. package/dist/index.js +53 -18
  2. package/dist/template/.opencode/.background-tasks.json +96 -0
  3. package/dist/template/.opencode/.ralph-state.json +12 -0
  4. package/dist/template/.opencode/AGENTS.md +112 -6
  5. package/dist/template/.opencode/agent/build.md +60 -8
  6. package/dist/template/.opencode/agent/explore.md +1 -0
  7. package/dist/template/.opencode/agent/looker.md +124 -0
  8. package/dist/template/.opencode/agent/planner.md +40 -1
  9. package/dist/template/.opencode/agent/review.md +1 -0
  10. package/dist/template/.opencode/agent/rush.md +53 -6
  11. package/dist/template/.opencode/agent/scout.md +1 -1
  12. package/dist/template/.opencode/agent/vision.md +0 -1
  13. package/dist/template/.opencode/command/brainstorm.md +58 -3
  14. package/dist/template/.opencode/command/finish.md +18 -8
  15. package/dist/template/.opencode/command/fix.md +24 -15
  16. package/dist/template/.opencode/command/implement.md +95 -29
  17. package/dist/template/.opencode/command/import-plan.md +30 -8
  18. package/dist/template/.opencode/command/new-feature.md +105 -14
  19. package/dist/template/.opencode/command/plan.md +78 -11
  20. package/dist/template/.opencode/command/pr.md +25 -15
  21. package/dist/template/.opencode/command/ralph-loop.md +97 -0
  22. package/dist/template/.opencode/command/revert-feature.md +15 -3
  23. package/dist/template/.opencode/command/skill-optimize.md +71 -7
  24. package/dist/template/.opencode/command/start.md +63 -15
  25. package/dist/template/.opencode/dcp.jsonc +11 -7
  26. package/dist/template/.opencode/memory/{project/beads-workflow.md → beads-workflow.md} +53 -0
  27. package/dist/template/.opencode/memory/observations/2026-01-09-pattern-ampcode-mcp-json-includetools-pattern.md +42 -0
  28. package/dist/template/.opencode/memory/project/conventions.md +53 -3
  29. package/dist/template/.opencode/memory/project/gotchas.md +52 -5
  30. package/dist/template/.opencode/memory/vector_db/memories.lance/_transactions/{0-8d00d272-cb80-463b-9774-7120a1c994e7.txn → 0-0d25ba80-ba3b-4209-9046-b45d6093b4da.txn} +0 -0
  31. package/dist/template/.opencode/memory/vector_db/memories.lance/_versions/1.manifest +0 -0
  32. package/dist/template/.opencode/memory/vector_db/memories.lance/data/{001010101000000101110001f998d04b63936ff83f9a34152d.lance → 1111100101010101011010004a9ef34df6b29f36a9a53a2892.lance} +0 -0
  33. package/dist/template/.opencode/opencode.json +529 -587
  34. package/dist/template/.opencode/package.json +2 -1
  35. package/dist/template/.opencode/plugin/lsp.ts +299 -0
  36. package/dist/template/.opencode/plugin/memory.ts +77 -1
  37. package/dist/template/.opencode/plugin/package.json +1 -1
  38. package/dist/template/.opencode/plugin/ralph-wiggum.ts +182 -0
  39. package/dist/template/.opencode/plugin/skill-mcp.ts +155 -36
  40. package/dist/template/.opencode/skill/chrome-devtools/SKILL.md +43 -65
  41. package/dist/template/.opencode/skill/chrome-devtools/mcp.json +19 -0
  42. package/dist/template/.opencode/skill/executing-plans/SKILL.md +32 -2
  43. package/dist/template/.opencode/skill/finishing-a-development-branch/SKILL.md +42 -17
  44. package/dist/template/.opencode/skill/playwright/SKILL.md +58 -133
  45. package/dist/template/.opencode/skill/playwright/mcp.json +16 -0
  46. package/dist/template/.opencode/tool/background.ts +461 -0
  47. package/dist/template/.opencode/tool/memory-search.ts +2 -2
  48. package/dist/template/.opencode/tool/ralph.ts +203 -0
  49. package/package.json +4 -16
  50. package/dist/template/.opencode/memory/vector_db/memories.lance/_transactions/1-a3bea825-dad3-47dd-a6d6-ff41b76ff7b0.txn +0 -0
  51. package/dist/template/.opencode/memory/vector_db/memories.lance/_versions/2.manifest +0 -0
  52. package/dist/template/.opencode/memory/vector_db/memories.lance/data/010000101010000000010010701b3840d38c2b5f275da99978.lance +0 -0
  53. /package/dist/template/.opencode/memory/{project/README.md → README.md} +0 -0
  54. /package/dist/template/.opencode/plugin/{notification.ts → notification.ts.bak} +0 -0
@@ -0,0 +1,42 @@
1
+ ---
2
+ type: pattern
3
+ created: 2026-01-09T08:04:40.257Z
4
+ confidence: high
5
+ valid_until: null
6
+ superseded_by: null
7
+ concepts: ["mcp", "includeTools", "ampcode", "skill", "token-optimization", "lazy-load", "filtering"]
8
+ ---
9
+
10
+ # 🔄 Ampcode mcp.json includeTools pattern
11
+
12
+ 🟢 **Confidence:** high
13
+
14
+ Learned from Ampcode's ui-preview skill (https://github.com/ampcode/amp-contrib/tree/main/.agents/skills/ui-preview):
15
+
16
+ ## Pattern: Lazy-load MCP with includeTools filtering
17
+
18
+ 1. **mcp.json file** (separate from SKILL.md):
19
+ ```json
20
+ {
21
+ "chrome-devtools": {
22
+ "command": "npx",
23
+ "args": ["-y", "chrome-devtools-mcp@latest"],
24
+ "includeTools": ["navigate_page", "take_screenshot", "new_page", "list_pages"]
25
+ }
26
+ }
27
+ ```
28
+
29
+ 2. **SKILL.md documents ONLY filtered tools**:
30
+ - "Available Tools" section lists only the filtered tools
31
+ - Workflow examples use only those tools
32
+ - Note at bottom explains how to expand filter if needed
33
+
34
+ 3. **Token savings**: ~90% reduction (4 tools vs 26+ for chrome-devtools)
35
+
36
+ ## Applied to OpenCodeKit:
37
+ - chrome-devtools: 11 tools (from 26+)
38
+ - playwright: 8 tools (from 17+)
39
+ - Other MCP skills already minimal (2-4 tools), no filtering needed
40
+
41
+ ## Key insight:
42
+ SKILL.md and mcp.json must be synchronized - don't document tools that aren't in includeTools filter, or agents get confused.
@@ -111,10 +111,60 @@ This transforms passive detection into active agent behavior (e.g., Memory plugi
111
111
 
112
112
  ## Agent Behavior Rules
113
113
 
114
- ### Active LSP Nudge
114
+ ### MANDATORY LSP-First Workflow
115
115
 
116
- When a tool output displays `[LSP NAVIGATION AVAILABLE]`, it means relevant code files were found.
117
- **Rule**: You MUST immediately execute the suggested `lsp_lsp_*` tool calls to retrieve code context without waiting for user instruction. This ensures you always have the latest code context for your implementation.
116
+ **HARD RULE**: Before editing ANY code file, you MUST use LSP tools first.
117
+
118
+ ```
119
+ grep/read → LSP → understand → THEN edit
120
+ ```
121
+
122
+ **After EVERY grep/glob/read that returns code files:**
123
+
124
+ 1. **IMMEDIATELY** call `lsp` with `documentSymbol` to understand file structure
125
+ 2. **IMMEDIATELY** call `lsp` with `findReferences` on symbols you'll modify
126
+ 3. **IMMEDIATELY** call `lsp` with `goToDefinition` to trace dependencies
127
+ 4. **USE** additional LSP operations as needed:
128
+ - `hover` - Get type info and documentation
129
+ - `goToImplementation` - Find implementations of interface/abstract
130
+ - `workspaceSymbol` - Search symbols across entire workspace
131
+ - `prepareCallHierarchy` - Get call hierarchy item at position
132
+ - `incomingCalls` - Find what calls this function
133
+ - `outgoingCalls` - Find what this function calls
134
+ 5. **ONLY THEN** proceed with edits
135
+
136
+ **Example - The Correct Flow:**
137
+
138
+ ```
139
+ User: "Fix the auth bug in src/auth.ts"
140
+
141
+ # Step 1: Read the file
142
+ read({ filePath: "src/auth.ts" })
143
+
144
+ # Step 2: MANDATORY LSP (before ANY edit) - use ALL relevant operations
145
+ lsp({ operation: "documentSymbol", filePath: "src/auth.ts", line: 1, character: 1 })
146
+ lsp({ operation: "findReferences", filePath: "src/auth.ts", line: 42, character: 10 })
147
+ lsp({ operation: "goToDefinition", filePath: "src/auth.ts", line: 42, character: 10 })
148
+ lsp({ operation: "hover", filePath: "src/auth.ts", line: 42, character: 10 })
149
+ lsp({ operation: "incomingCalls", filePath: "src/auth.ts", line: 42, character: 10 })
150
+ lsp({ operation: "outgoingCalls", filePath: "src/auth.ts", line: 42, character: 10 })
151
+
152
+ # Step 3: NOW you can edit
153
+ edit({ filePath: "src/auth.ts", ... })
154
+ ```
155
+
156
+ **Why This Matters:**
157
+
158
+ - LSP gives you semantic understanding (types, references, call hierarchy)
159
+ - grep/read only gives you text (no understanding of relationships)
160
+ - Editing without LSP context leads to broken refactors
161
+
162
+ **Violations:**
163
+
164
+ - ❌ `read → edit` (WRONG - no LSP)
165
+ - ❌ `grep → edit` (WRONG - no LSP)
166
+ - ✅ `read → LSP → edit` (CORRECT)
167
+ - ✅ `grep → read → LSP → edit` (CORRECT)
118
168
 
119
169
  ## Patterns to Avoid
120
170
 
@@ -1,12 +1,46 @@
1
1
  ---
2
2
  purpose: Footguns, edge cases, and "don't forget this" warnings
3
- updated: 2025-01-05
3
+ updated: 2025-01-09
4
4
  ---
5
5
 
6
6
  # Project Gotchas
7
7
 
8
8
  ## Configuration Quirks
9
9
 
10
+ ### OpenCode v1.1.7 → v1.1.8 Changes
11
+
12
+ **v1.1.7 Features:**
13
+
14
+ - **Question tool**: New interactive tool for gathering user preferences/clarifying instructions
15
+ - **Config precedence fix**: Local `.opencode/opencode.json` now correctly overrides remote/global config
16
+ - **`.claude` loading toggle**: Can disable via `--no-claude-prompts` / `--no-claude-skills` flags
17
+ - **Task tool filtering**: Simplified subagent filtering
18
+
19
+ **v1.1.8 Features:**
20
+
21
+ - **Multi-select questions**: Question tool now supports `multiple: true` for multi-select
22
+ - **Performance**: Chunked message loading, lazy diff rendering
23
+ - **Full path fuzzy matching**: Autocomplete uses full file paths
24
+ - **OpenTUI v0.1.70**: UI improvements
25
+
26
+ **Plugin SDK Update Required:**
27
+
28
+ ```json
29
+ "@opencode-ai/plugin": "^1.1.8" // Was ^1.1.2
30
+ ```
31
+
32
+ ### DCP Protected Tools (v1.1.8)
33
+
34
+ Legacy `bd_*` tool names don't exist - use actual custom tool names:
35
+
36
+ | Old (Wrong) | New (Correct) |
37
+ | ----------------- | ------------- |
38
+ | `bd_init` | N/A (use CLI) |
39
+ | `bd_claim` | N/A (use CLI) |
40
+ | `bd_reserve` | `bd-reserve` |
41
+ | `bd_reservations` | `bd-release` |
42
+ | `bd_sync` | N/A (use CLI) |
43
+
10
44
  ### DCP v1.1.3 Schema Breaking Changes
11
45
 
12
46
  1. **Legacy `strategies.onIdle` removed**: v1.1.2+ no longer supports this field
@@ -35,10 +69,23 @@ updated: 2025-01-05
35
69
 
36
70
  ### Protected Tools in DCP
37
71
 
38
- v1.1.3 recognizes more tool variants. Ensure these are protected:
39
-
40
- - `lsp_lsp_find_references`, `lsp_lsp_goto_definition` (plugin-specific naming)
41
- - `memory-search`, `skill_mcp`, `bd_sync` (often forgotten)
72
+ v1.1.8 recognizes more tool variants. Ensure these are protected:
73
+
74
+ ```jsonc
75
+ "protectedTools": [
76
+ // State-modifying
77
+ "write", "edit", "question",
78
+ // Memory/observation
79
+ "memory-read", "memory-update", "memory-search", "observation",
80
+ // Skills/tasks
81
+ "skill", "skill_mcp", "task", "batch", "todowrite", "todoread",
82
+ // LSP
83
+ "lsp", "lsp_lsp_rename", "lsp_lsp_find_references", "lsp_lsp_goto_definition",
84
+ "lsp_lsp_code_actions", "lsp_lsp_code_action_apply", "lsp_lsp_organize_imports",
85
+ // Beads (custom tools only - CLI uses bash)
86
+ "bd-reserve", "bd-release", "bd-msg", "bd-inbox"
87
+ ]
88
+ ```
42
89
 
43
90
  ## Time Wasters
44
91