opencodekit 0.16.0 → 0.16.1

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 (119) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/template/.opencode/AGENTS.md +64 -3
  3. package/dist/template/.opencode/command/create.md +34 -0
  4. package/dist/template/.opencode/command/design.md +35 -0
  5. package/dist/template/.opencode/command/handoff.md +15 -0
  6. package/dist/template/.opencode/command/init.md +40 -47
  7. package/dist/template/.opencode/command/plan.md +1 -0
  8. package/dist/template/.opencode/command/pr.md +15 -0
  9. package/dist/template/.opencode/command/research.md +3 -0
  10. package/dist/template/.opencode/command/resume.md +1 -0
  11. package/dist/template/.opencode/command/review-codebase.md +30 -0
  12. package/dist/template/.opencode/command/ship.md +43 -0
  13. package/dist/template/.opencode/command/start.md +1 -0
  14. package/dist/template/.opencode/command/status.md +24 -1
  15. package/dist/template/.opencode/command/ui-review.md +31 -0
  16. package/dist/template/.opencode/command/verify.md +35 -7
  17. package/dist/template/.opencode/memory/project/tech-stack.md +25 -22
  18. package/dist/template/.opencode/memory.db +0 -0
  19. package/dist/template/.opencode/memory.db-shm +0 -0
  20. package/dist/template/.opencode/memory.db-wal +0 -0
  21. package/dist/template/.opencode/opencode.json +817 -916
  22. package/dist/template/.opencode/package.json +1 -0
  23. package/dist/template/.opencode/plans/1770006237537-mighty-otter.md +418 -0
  24. package/dist/template/.opencode/plans/1770006913647-glowing-forest.md +170 -0
  25. package/dist/template/.opencode/plans/1770013678126-witty-planet.md +278 -0
  26. package/dist/template/.opencode/plugin/lib/memory-db.ts +828 -0
  27. package/dist/template/.opencode/plugin/memory.ts +38 -1
  28. package/dist/template/.opencode/skill/index-knowledge/SKILL.md +76 -31
  29. package/dist/template/.opencode/skill/memory-system/SKILL.md +110 -55
  30. package/dist/template/.opencode/tool/memory-get.ts +143 -0
  31. package/dist/template/.opencode/tool/memory-maintain.ts +167 -0
  32. package/dist/template/.opencode/tool/memory-migrate.ts +319 -0
  33. package/dist/template/.opencode/tool/memory-read.ts +17 -46
  34. package/dist/template/.opencode/tool/memory-search.ts +131 -28
  35. package/dist/template/.opencode/tool/memory-timeline.ts +105 -0
  36. package/dist/template/.opencode/tool/memory-update.ts +21 -26
  37. package/dist/template/.opencode/tool/observation.ts +112 -100
  38. package/dist/template/.opencode/tsconfig.json +19 -19
  39. package/package.json +1 -1
  40. package/dist/template/.opencode/memory/_templates/README.md +0 -73
  41. package/dist/template/.opencode/memory/_templates/observation.md +0 -39
  42. package/dist/template/.opencode/memory/_templates/prompt-engineering.md +0 -333
  43. package/dist/template/.opencode/memory/observations/2026-01-22-decision-agents-md-prompt-engineering-improvement.md +0 -29
  44. package/dist/template/.opencode/memory/observations/2026-01-25-decision-agent-roles-build-orchestrates-general-e.md +0 -14
  45. package/dist/template/.opencode/memory/observations/2026-01-25-decision-simplified-swarm-helper-tool-to-fix-type.md +0 -20
  46. package/dist/template/.opencode/memory/observations/2026-01-25-decision-use-beads-as-swarm-board-source-of-truth.md +0 -14
  47. package/dist/template/.opencode/memory/observations/2026-01-25-learning-user-wants-real-swarm-coordination-guida.md +0 -15
  48. package/dist/template/.opencode/memory/observations/2026-01-28-decision-created-deep-research-skill-for-thorough.md +0 -29
  49. package/dist/template/.opencode/memory/observations/2026-01-28-decision-gh-grep-mcp-wrapper-vs-native-grep-searc.md +0 -21
  50. package/dist/template/.opencode/memory/observations/2026-01-28-decision-oracle-tool-optimal-usage-patterns.md +0 -32
  51. package/dist/template/.opencode/memory/observations/2026-01-28-learning-ampcode-deep-mode-research-integration-w.md +0 -42
  52. package/dist/template/.opencode/memory/observations/2026-01-28-pattern-research-delegation-pattern-explore-for-.md +0 -32
  53. package/dist/template/.opencode/memory/observations/2026-01-29-decision-copilot-auth-plugin-rate-limit-handling.md +0 -27
  54. package/dist/template/.opencode/memory/observations/2026-01-29-decision-spec-driven-approach-for-opencodekit.md +0 -21
  55. package/dist/template/.opencode/memory/observations/2026-01-29-learning-karpathy-llm-coding-insights-dec-2025.md +0 -44
  56. package/dist/template/.opencode/memory/observations/2026-01-30-decision-github-copilot-claude-routing-keep-disab.md +0 -32
  57. package/dist/template/.opencode/memory/observations/2026-01-30-discovery-context-management-research-critical-gap.md +0 -14
  58. package/dist/template/.opencode/memory/observations/2026-01-30-discovery-kimi-k2-5-agent-swarm-architecture-patte.md +0 -45
  59. package/dist/template/.opencode/memory/observations/2026-01-30-pattern-swarm-tools-architecture.md +0 -28
  60. package/dist/template/.opencode/memory/observations/2026-01-31-decision-copilot-auth-plugin-updated-with-baseurl.md +0 -63
  61. package/dist/template/.opencode/memory/observations/2026-01-31-decision-created-dedicated-worker-agent-for-swarm.md +0 -20
  62. package/dist/template/.opencode/memory/observations/2026-01-31-decision-rollback-to-v1-1-47-for-copilot-claude-r.md +0 -21
  63. package/dist/template/.opencode/memory/observations/2026-01-31-decision-simplified-swarm-to-task-tool-pattern.md +0 -44
  64. package/dist/template/.opencode/memory/observations/2026-01-31-decision-swarm-architecture-task-tool-over-tmux.md +0 -33
  65. package/dist/template/.opencode/memory/observations/2026-01-31-decision-worker-skills-defined-for-swarm-delegati.md +0 -30
  66. package/dist/template/.opencode/memory/observations/2026-01-31-learning-gpt-reasoning-config-for-github-copilot.md +0 -51
  67. package/dist/template/.opencode/memory/observations/2026-01-31-learning-opencode-copilot-auth-comparison-finding.md +0 -61
  68. package/dist/template/.opencode/memory/observations/2026-01-31-learning-opencode-copilot-reasoning-architecture-.md +0 -66
  69. package/dist/template/.opencode/memory/observations/2026-01-31-learning-opencode-custom-tools-api.md +0 -48
  70. package/dist/template/.opencode/memory/observations/2026-01-31-learning-opencode-v1-1-48-skills-as-slash-command.md +0 -21
  71. package/dist/template/.opencode/memory/observations/2026-01-31-learning-swarm-system-simplified-removed-mailbox-.md +0 -30
  72. package/dist/template/.opencode/memory/observations/2026-01-31-learning-v1-1-48-native-copilot-reasoning-via-pr-.md +0 -45
  73. package/dist/template/.opencode/memory/observations/2026-01-31-warning-cannot-add-custom-config-to-opencode-jso.md +0 -18
  74. package/dist/template/.opencode/memory/observations/2026-01-31-warning-copilot-claude-v1-endpoint-returns-404-c.md +0 -48
  75. package/dist/template/.opencode/memory/observations/2026-01-31-warning-opencode-v1-1-48-claude-thinking-block-s.md +0 -51
  76. package/dist/template/.opencode/memory/observations/2026-02-01-decision-add-skills-vs-commands-to-global-agents-.md +0 -15
  77. package/dist/template/.opencode/memory/observations/2026-02-01-decision-build-agent-auto-loads-skills-contextual.md +0 -31
  78. package/dist/template/.opencode/memory/observations/2026-02-01-decision-fixed-agent-configuration-for-opencodeki.md +0 -25
  79. package/dist/template/.opencode/memory/observations/2026-02-01-decision-focused-agents-md-upgrade-for-opencode-k.md +0 -14
  80. package/dist/template/.opencode/memory/observations/2026-02-01-decision-implement-tier-1-permission-upgrades.md +0 -15
  81. package/dist/template/.opencode/memory/observations/2026-02-01-decision-instructions-config-explicit-paths-not-w.md +0 -40
  82. package/dist/template/.opencode/memory/observations/2026-02-01-decision-merged-context-into-memory-project-singl.md +0 -42
  83. package/dist/template/.opencode/memory/observations/2026-02-01-decision-oracle-tool-should-use-review-agent-not-.md +0 -14
  84. package/dist/template/.opencode/memory/observations/2026-02-01-decision-plan-agent-auto-loads-skills-contextuall.md +0 -31
  85. package/dist/template/.opencode/memory/observations/2026-02-01-decision-plan-phased-oracle-command-merge-into-ne.md +0 -14
  86. package/dist/template/.opencode/memory/observations/2026-02-01-decision-prd-workflow-uses-prd-and-prd-task-skill.md +0 -23
  87. package/dist/template/.opencode/memory/observations/2026-02-01-decision-prefer-review-agent-via-opencode-cli-ove.md +0 -14
  88. package/dist/template/.opencode/memory/observations/2026-02-01-decision-remove-oracle-tool-add-ship-command-with.md +0 -14
  89. package/dist/template/.opencode/memory/observations/2026-02-01-decision-remove-oracle-tool-and-add-ship-command-.md +0 -14
  90. package/dist/template/.opencode/memory/observations/2026-02-01-decision-remove-oracle-tool-and-add-ship-command.md +0 -14
  91. package/dist/template/.opencode/memory/observations/2026-02-01-decision-remove-skills-vs-commands-section-from-a.md +0 -14
  92. package/dist/template/.opencode/memory/observations/2026-02-01-decision-replace-oracle-tool-with-ship-command-fl.md +0 -14
  93. package/dist/template/.opencode/memory/observations/2026-02-01-decision-replace-oracle-with-ship-command-workflo.md +0 -14
  94. package/dist/template/.opencode/memory/observations/2026-02-01-decision-replace-proxypal-oracle-with-cli-review-.md +0 -14
  95. package/dist/template/.opencode/memory/observations/2026-02-01-decision-simplified-dist-template-only-tech-stack.md +0 -50
  96. package/dist/template/.opencode/memory/observations/2026-02-01-decision-simplified-templates-only-tech-stack-md.md +0 -26
  97. package/dist/template/.opencode/memory/observations/2026-02-01-decision-subagents-load-minimal-skills-stay-lean.md +0 -29
  98. package/dist/template/.opencode/memory/observations/2026-02-01-decision-user-approved-permission-upgrades-in-ope.md +0 -15
  99. package/dist/template/.opencode/memory/observations/2026-02-01-discovery-verify-command-already-implemented.md +0 -28
  100. package/dist/template/.opencode/memory/observations/2026-02-01-feature-openspec-phase-b-complete-template-upgra.md +0 -43
  101. package/dist/template/.opencode/memory/observations/2026-02-01-learning-build-agent-should-use-dynamic-lsp-not-f.md +0 -14
  102. package/dist/template/.opencode/memory/observations/2026-02-01-learning-kimi-k2-5-model-requires-temperature-1-0.md +0 -22
  103. package/dist/template/.opencode/memory/observations/2026-02-01-learning-opencode-context-injection-already-imple.md +0 -27
  104. package/dist/template/.opencode/memory/observations/2026-02-01-learning-opencode-context-injection-uses-instruct.md +0 -35
  105. package/dist/template/.opencode/memory/observations/2026-02-01-learning-update-build-agent-prompt-to-use-context.md +0 -14
  106. package/dist/template/.opencode/memory/observations/2026-02-01-learning-upgrade-agents-md-using-opencode-expert-.md +0 -14
  107. package/dist/template/.opencode/memory/observations/2026-02-01-learning-upgrade-agents-md-with-opencode-expert-g.md +0 -14
  108. package/dist/template/.opencode/memory/observations/2026-02-01-learning-upgrade-agents-md-with-opencode-expert-r.md +0 -14
  109. package/dist/template/.opencode/memory/observations/2026-02-01-learning-user-prefers-copilot-gpt-5-2-codex-mediu.md +0 -14
  110. package/dist/template/.opencode/memory/observations/2026-02-01-learning-user-wants-general-agent-prompt-contextu.md +0 -15
  111. package/dist/template/.opencode/memory/observations/2026-02-01-learning-user-wants-general-agent-prompt-reviewed.md +0 -15
  112. package/dist/template/.opencode/memory/project/architecture.md +0 -60
  113. package/dist/template/.opencode/memory/project/command-rules.md +0 -122
  114. package/dist/template/.opencode/memory/project/commands.md +0 -72
  115. package/dist/template/.opencode/memory/project/conventions.md +0 -68
  116. package/dist/template/.opencode/memory/project/gotchas.md +0 -41
  117. /package/dist/template/.opencode/memory/_templates/{project/tech-stack.md → tech-stack.md} +0 -0
  118. /package/dist/template/.opencode/memory/{user.example.md → _templates/user.md} +0 -0
  119. /package/dist/template/.opencode/memory/{user.md → project/user.md} +0 -0
@@ -1,333 +0,0 @@
1
- ---
2
- purpose: System prompt best practices and templates for agent development
3
- updated: 2026-01-22
4
- sources:
5
- - Anthropic Claude Code Best Practices
6
- - OpenAI Prompt Engineering Guide
7
- - Mistral Prompting Capabilities
8
- - Google Gemini 3 Prompt Practices
9
- - Lilian Weng Prompt Engineering
10
- - Mitchell Hashimoto Prompt Engineering vs Blind Prompting
11
- ---
12
-
13
- # Prompt Engineering Best Practices
14
-
15
- ## Core Principles
16
-
17
- 1. **Precise Instructions** - Be concise and direct. State goals clearly without fluff.
18
- 2. **Consistency** - Maintain uniform structure (standardized tags, formatting).
19
- 3. **Specificity** - Avoid subjective words ("too long", "interesting", "better").
20
- 4. **Assertive Language** - Use "You MUST" instead of "You should try to".
21
- 5. **Show, Don't Just Tell** - Include examples (few-shot learning).
22
-
23
- ## Structure Template
24
-
25
- Use this order for system prompts:
26
-
27
- ```markdown
28
- # Identity
29
-
30
- [WHO the assistant is - role, personality, expertise]
31
-
32
- # Instructions
33
-
34
- [WHAT to do - specific rules, behaviors, workflows]
35
-
36
- # Constraints
37
-
38
- [BOUNDARIES - what NOT to do, limitations, guardrails]
39
-
40
- # Output Format
41
-
42
- [HOW to respond - structure, verbosity, tone]
43
-
44
- # Examples
45
-
46
- [DEMONSTRATIONS - input/output pairs for few-shot learning]
47
-
48
- # Context
49
-
50
- [DATA - documents, code, background info - place at END for long context]
51
- ```
52
-
53
- ## Formatting Guidelines
54
-
55
- ### Choose ONE format consistently:
56
-
57
- **Markdown (recommended for readability):**
58
-
59
- ```markdown
60
- # Section
61
-
62
- ## Subsection
63
-
64
- - Bullet point
65
- - Another point
66
-
67
- **Bold for emphasis**
68
- ```
69
-
70
- **XML tags (recommended for data boundaries):**
71
-
72
- ```xml
73
- <role>You are a code reviewer.</role>
74
- <constraints>
75
- - Only review TypeScript
76
- - Focus on security
77
- </constraints>
78
- <context>{{user_code}}</context>
79
- ```
80
-
81
- ### Never mix formats in the same prompt.
82
-
83
- ## Message Roles (Priority Order)
84
-
85
- | Role | Priority | Purpose |
86
- | ----------- | -------- | ------------------------------- |
87
- | `system` | Highest | Developer rules, business logic |
88
- | `user` | Medium | End-user input, queries |
89
- | `assistant` | Lowest | Model-generated responses |
90
-
91
- Think of system as **function definition**, user as **arguments**.
92
-
93
- ## Writing Effective Instructions
94
-
95
- ### DO:
96
-
97
- - Be specific: "Output exactly 3 bullet points" not "keep it brief"
98
- - Define audience: "Explain to a 6-year-old" or "Write for senior engineers"
99
- - Provide parameters: "Maximum 100 words" not "short response"
100
- - Use decision trees for complex logic
101
- - Tell it what TO do (not what NOT to do)
102
-
103
- ### DON'T:
104
-
105
- - Use subjective words: "too long", "interesting", "better"
106
- - Create contradictions in long prompts
107
- - Ask LLMs to count (provide counts as input)
108
- - Generate more tokens than necessary
109
-
110
- ## Few-Shot Learning
111
-
112
- ### Example Selection:
113
-
114
- - Choose semantically similar examples to expected inputs
115
- - Use diverse examples covering different scenarios
116
- - Include edge cases the model might get wrong
117
- - **Order: shortest to longest** (research-backed)
118
-
119
- ### Example Format:
120
-
121
- ```markdown
122
- # Examples
123
-
124
- <example id="positive">
125
- Input: Great product, love it!
126
- Output: {"sentiment": "positive"}
127
- </example>
128
-
129
- <example id="negative">
130
- Input: Terrible service, never again.
131
- Output: {"sentiment": "negative"}
132
- </example>
133
-
134
- <example id="neutral">
135
- Input: It's okay, nothing special.
136
- Output: {"sentiment": "neutral"}
137
- </example>
138
- ```
139
-
140
- ## Reasoning Patterns
141
-
142
- ### Chain-of-Thought
143
-
144
- ```markdown
145
- Think step by step before answering:
146
-
147
- 1. Identify the core problem
148
- 2. Break into sub-tasks
149
- 3. Solve each sub-task
150
- 4. Synthesize the final answer
151
- ```
152
-
153
- ### Extended Thinking Triggers (Claude)
154
-
155
- - "think" < "think hard" < "think harder" < "ultrathink"
156
-
157
- ### Self-Reflection Pattern
158
-
159
- ```markdown
160
- Before returning your final response:
161
-
162
- 1. Did I answer the user's _intent_, not just their literal words?
163
- 2. Is the tone authentic to the requested persona?
164
- 3. If I made an assumption, did I flag it?
165
- ```
166
-
167
- ### TODO Tracker (for agents)
168
-
169
- ```markdown
170
- Track progress with a TODO list:
171
-
172
- - [ ] Primary objective
173
- - [ ] Sub-task 1
174
- - [ ] Sub-task 2
175
- - [x] Completed task
176
- ```
177
-
178
- ## Error Handling
179
-
180
- ```markdown
181
- ## Error Protocol
182
-
183
- IF context is empty or missing necessary data:
184
-
185
- - DO NOT attempt to generate a solution
186
- - DO NOT make up data
187
- - Request the missing information clearly
188
- ```
189
-
190
- ## Prompt Caching (Cost Optimization)
191
-
192
- For cost/latency savings:
193
-
194
- - Put **static content FIRST** in prompts
195
- - Put **dynamic content LAST**
196
- - This maximizes cache hits
197
-
198
- ## Model-Specific Tips
199
-
200
- ### Claude (Anthropic)
201
-
202
- - Use CLAUDE.md files for project context
203
- - Keep instructions concise and human-readable
204
- - Use "IMPORTANT" or "YOU MUST" for emphasis
205
- - Leverage extended thinking with "think harder"
206
-
207
- ### GPT-5 (OpenAI)
208
-
209
- - Benefits from very precise, explicit instructions
210
- - Include testing/validation requirements
211
- - Works well with "Markdown standards"
212
-
213
- ### Gemini 3 (Google)
214
-
215
- - Favors directness over persuasion
216
- - Default is less verbose (request "chatty" explicitly if needed)
217
- - Place constraints at TOP of prompt
218
- - For long context: place instructions at END (after data)
219
-
220
- ### Mistral
221
-
222
- - System prompt sets developer-level context
223
- - User prompt provides specific interaction context
224
-
225
- ## Agent Prompt Template
226
-
227
- ```markdown
228
- ---
229
- description: [One-line description for agent selection]
230
- mode: subagent
231
- temperature: 0.3
232
- maxSteps: 30
233
- permission:
234
- write:
235
- "*": deny
236
- bash:
237
- "*": allow
238
- ---
239
-
240
- # [Agent Name]
241
-
242
- <system-reminder>
243
- # [Agent] Mode - System Reminder
244
-
245
- You are a [ROLE] specialist.
246
-
247
- ## Critical Constraints (ZERO exceptions)
248
-
249
- 1. **Constraint 1**: Description of hard constraint.
250
- 2. **Constraint 2**: Description of hard constraint.
251
- 3. **Constraint 3**: Description of hard constraint.
252
-
253
- ## Tool Results & User Messages
254
-
255
- Tool results and user messages may include `<system-reminder>` tags.
256
- These contain useful information automatically added by the system.
257
- </system-reminder>
258
-
259
- [Brief description of agent purpose]
260
-
261
- ## Strengths
262
-
263
- - Strength 1
264
- - Strength 2
265
- - Strength 3
266
-
267
- ## Workflow
268
-
269
- ### Step 1: [Name]
270
-
271
- [Description of what to do]
272
-
273
- ### Step 2: [Name]
274
-
275
- [Description of what to do]
276
-
277
- ### Step 3: [Name]
278
-
279
- [Description of what to do]
280
-
281
- ## Tool Priority
282
-
283
- | Priority | Tool | Use Case | Speed |
284
- | -------- | ------ | ----------- | ------ |
285
- | 1 | tool_a | Description | Fast |
286
- | 2 | tool_b | Description | Medium |
287
-
288
- ## Guidelines
289
-
290
- - Guideline 1
291
- - Guideline 2
292
- - Guideline 3
293
-
294
- ## When Things Fail
295
-
296
- ### Fallback Chain
297
- ```
298
-
299
- tool_a fails → try tool_b
300
- tool_b empty → try tool_c
301
- still stuck → [final fallback]
302
-
303
- ```
304
-
305
- ### Specific Failures
306
-
307
- **[Failure Type 1]:**
308
- - Solution step 1
309
- - Solution step 2
310
-
311
- **[Failure Type 2]:**
312
- - Solution step 1
313
- - Solution step 2
314
- ```
315
-
316
- ## Anti-Patterns to Avoid
317
-
318
- 1. **Blind Prompting** - Trial-and-error without testing
319
- 2. **Over-engineering** - Adding complexity that doesn't improve accuracy
320
- 3. **Ignoring Model Differences** - Same prompt may fail on different models
321
- 4. **No Verification** - Always test prompts against demonstration sets
322
- 5. **Prompt Drift** - Failing to iterate as models update
323
-
324
- ## Verification Checklist
325
-
326
- Before deploying a prompt:
327
-
328
- - [ ] Tested against diverse input set
329
- - [ ] Measured accuracy with demonstration set
330
- - [ ] Checked for contradictions in long prompts
331
- - [ ] Verified output format consistency
332
- - [ ] Tested edge cases and error conditions
333
- - [ ] Compared cost vs accuracy tradeoffs
@@ -1,29 +0,0 @@
1
- ---
2
- type: decision
3
- created: 2026-01-22T04:46:05.981Z
4
- confidence: high
5
- valid_until: null
6
- superseded_by: null
7
- concepts: ["AGENTS.md", "prompt-engineering", "system-prompt", "best-practices", "structure"]
8
- ---
9
-
10
- # 🎯 AGENTS.md prompt engineering improvements
11
-
12
- 🟢 **Confidence:** high
13
-
14
- Applied best practices from Anthropic, OpenAI, Mistral, Google, and prompt engineering experts to AGENTS.md:
15
-
16
- 1. Added Identity section at top (defines WHO before WHAT)
17
- 2. Moved Core Constraints near top (critical rules should be prominent)
18
- 3. Converted Delegation agents list to bullet points (scanability)
19
- 4. Converted LSP Operations to table format (checklist-style)
20
- 5. Added Error Protocol section (fallback patterns, retry limits)
21
- 6. Added brief Beads context intro (explains WHAT before HOW)
22
- 7. Added commit/secrets constraints to Core Constraints
23
-
24
- Key best practices applied:
25
- - Structure: Identity → Priority → Constraints → Instructions → Examples
26
- - "DO NOT" framing (inhibition > instruction)
27
- - Tables/bullets for scanability
28
- - Atomic summaries for each section
29
- - Error handling protocols
@@ -1,14 +0,0 @@
1
- ---
2
- type: decision
3
- created: 2026-01-25T05:33:03.130Z
4
- confidence: high
5
- valid_until: null
6
- superseded_by: null
7
- concepts: ["agents", "build", "general", "orchestrator", "executor", "workflow", "swarm"]
8
- ---
9
-
10
- # 🎯 Agent roles: Build orchestrates, General executes
11
-
12
- 🟢 **Confidence:** high
13
-
14
- User decided on agent role split: Build is the primary orchestrator/lead agent controlling the workflow; General is the executor/implementer for individual Beads tasks. Other agents (plan/explore/scout/review) support as needed.
@@ -1,20 +0,0 @@
1
- ---
2
- type: decision
3
- created: 2026-01-25T06:49:53.678Z
4
- confidence: high
5
- valid_until: null
6
- superseded_by: null
7
- files: [".opencode/tool/swarm-helper.ts"]
8
- ---
9
-
10
- # 🎯 Simplified swarm-helper tool to fix TypeScript errors
11
-
12
- 🟢 **Confidence:** high
13
-
14
- The swarm-helper tool had TypeScript errors because it tried to import and use a `Task` function that doesn't exist in the @opencode-ai/plugin package. The @opencode-ai/plugin package only exports `tool`, not a `Task` function.
15
-
16
- Solution: Simplified the tool to only provide coordination operations that don't require external tool calls:
17
- - Removed: spawnTeam, assignTask operations
18
- - Kept: getTeamStatus, sendTeamMessage operations
19
-
20
- Team spawning should be done directly via the task tool in the command workflows, not wrapped in this helper. This keeps the tool focused on mailbox coordination only.
@@ -1,14 +0,0 @@
1
- ---
2
- type: decision
3
- created: 2026-01-25T04:48:21.517Z
4
- confidence: high
5
- valid_until: null
6
- superseded_by: null
7
- concepts: ["beads", "swarm-protocol", "task-board", "dependencies", "source-of-truth", "opencode"]
8
- ---
9
-
10
- # 🎯 Use Beads as swarm board source of truth
11
-
12
- 🟢 **Confidence:** high
13
-
14
- User preference/decision: use `.beads/` as the single source of truth for the swarm task board (tasks + dependencies). Avoid introducing a separate swarm board file; plugins/tools should read from and write through Beads workflows.
@@ -1,15 +0,0 @@
1
- ---
2
- type: learning
3
- created: 2026-01-25T04:43:38.235Z
4
- confidence: high
5
- valid_until: null
6
- superseded_by: null
7
- concepts: ["swarms", "multi-agent", "orchestration", "delegation", "task-board", "dependencies", "coordination", "opencode"]
8
- files: [".opencode/AGENTS.md"]
9
- ---
10
-
11
- # 📚 User wants real swarm coordination guidance
12
-
13
- 🟢 **Confidence:** high
14
-
15
- User wants best-practice guidance for building/improving 'real swarms' (multi-agent coordination) beyond centralized orchestration. They asked me to review `.opencode/AGENTS.md` and all `.opencode/agent/*.md` specs and synthesize improvements: shared task board with dependencies, parallel specialists, and coordination/messaging patterns compatible with their constraints (security-first, no URL guessing, delegation thresholds, LSP-first before edits, read-only specialists).
@@ -1,29 +0,0 @@
1
- ---
2
- type: decision
3
- created: 2026-01-28T18:07:13.668Z
4
- confidence: high
5
- valid_until: null
6
- superseded_by: null
7
- concepts: ["deep-research", "skill", "LSP", "memory-first", "confidence-scoring", "scout-agent", "research-command"]
8
- files: [".opencode/skill/deep-research/SKILL.md"]
9
- ---
10
-
11
- # 🎯 Created deep-research skill for thorough codebase analysis
12
-
13
- 🟢 **Confidence:** high
14
-
15
- Created `.opencode/skill/deep-research/SKILL.md` to formalize extended research methodology.
16
-
17
- Key features:
18
- 1. **Memory-first protocol** - Check past research before exploring
19
- 2. **Full LSP exploration** - All 9 operations mandatory before edits
20
- 3. **Confidence scoring** - High/Medium/Low/None for findings
21
- 4. **Tool budgets** - quick (~10), default (~30), thorough (~100)
22
- 5. **Stop conditions** - Clear criteria for when to stop research
23
-
24
- Integration points:
25
- - Scout agent loads this for deep mode
26
- - Research command uses for --thorough flag
27
- - Pre-edit verification workflow
28
-
29
- This enhances both scout.md and research.md without breaking changes.
@@ -1,21 +0,0 @@
1
- ---
2
- type: decision
3
- created: 2026-01-28T16:59:35.621Z
4
- confidence: high
5
- valid_until: null
6
- superseded_by: null
7
- concepts: ["grepsearch", "MCP", "native tool", "architecture", "best practices"]
8
- ---
9
-
10
- # 🎯 gh-grep MCP wrapper vs native grepsearch tool
11
-
12
- 🟢 **Confidence:** high
13
-
14
- Created two implementations for GitHub code search:
15
-
16
- 1. **Native tool** (.opencode/tool/grepsearch.ts): TypeScript wrapper around grep.app API - WORKING ✅
17
- 2. **MCP skill** (.opencode/skill/gh-grep/): Skill wrapper that calls uvx grep-mcp server - BROKEN ❌
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 grepsearch tool is recommended."
20
-
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.
@@ -1,32 +0,0 @@
1
- ---
2
- type: decision
3
- created: 2026-01-28T18:51:45.226Z
4
- confidence: high
5
- valid_until: null
6
- superseded_by: null
7
- concepts: ["oracle", "second-opinion", "validation", "debugging", "architecture", "decision-making"]
8
- ---
9
-
10
- # 🎯 Oracle tool optimal usage patterns
11
-
12
- 🟢 **Confidence:** high
13
-
14
- Oracle tool should be used for:
15
- 1. Validating architectural decisions BEFORE implementing
16
- 2. Cross-checking debugging hypotheses when stuck
17
- 3. Getting alternative perspectives on tricky problems
18
- 4. Breaking out of reasoning ruts or confirmation bias
19
-
20
- Default model: gpt-5.2-codex (strong code understanding)
21
- Available models: gemini-3-pro-preview, gemini-claude-opus-4-5-thinking
22
-
23
- Modes:
24
- - validate: Check if reasoning is sound (default)
25
- - alternative: Get completely different approaches
26
- - critique: Stress-test ideas for weaknesses
27
- - brainstorm: Expand and generate new possibilities
28
-
29
- Integration points:
30
- - Use before major architectural decisions
31
- - Use when debugging complex failures (after 2 failed attempts)
32
- - Use in @review agent for code review validation
@@ -1,42 +0,0 @@
1
- ---
2
- type: learning
3
- created: 2026-01-28T18:03:19.579Z
4
- confidence: high
5
- valid_until: null
6
- superseded_by: null
7
- concepts: ["deep-mode", "ampcode", "scout", "research", "autonomous", "extended-thinking", "oracle"]
8
- ---
9
-
10
- # 📚 AmpCode Deep Mode Research - Integration with Scout/Research
11
-
12
- 🟢 **Confidence:** high
13
-
14
- ## AmpCode Deep Mode Research (Jan 2026)
15
-
16
- ### Key Concepts from AmpCode:
17
- 1. **Three Modes**: smart (collaborative), rush (fast/cheap), deep (autonomous/extended thinking)
18
- 2. **Deep Mode Behavior**: 5-15 minutes of silent reading before changes, uses GPT-5.2-Codex
19
- 3. **Oracle Pattern**: Second opinion tool using reasoning model for complex decisions
20
- 4. **Handoff**: Move context between modes/threads
21
-
22
- ### How This Maps to OpenCodeKit:
23
-
24
- **Scout Agent** already has:
25
- - Quick Mode (~2-3 tool calls)
26
- - Deep Mode (~4-6 tool calls) - triggers on "how do others", "compare", "best practices"
27
-
28
- **Research Command** already has:
29
- - `--quick` (~10 tool calls)
30
- - Default (~30 tool calls)
31
- - `--thorough` (~100+ tool calls)
32
-
33
- ### Enhancement Opportunities:
34
- 1. Add `--deep` flag to research that enforces extended LSP exploration before ANY findings
35
- 2. Create oracle tool for "second opinion" on complex architectural decisions
36
- 3. Add mode handoff commands: `/mode deep`, `/mode smart`
37
- 4. Make thorough mode more autonomous (fewer check-ins)
38
-
39
- ### AmpCode Insights to Adopt:
40
- - "Deep mode is lazy about verification" - sometimes useful to defer verification
41
- - "Requires clear problem definition upfront" - enforce problem statement template
42
- - "Goes off to solve problems alone, not pair program" - reduce chattiness in thorough mode
@@ -1,32 +0,0 @@
1
- ---
2
- type: pattern
3
- created: 2026-01-28T18:11:31.174Z
4
- confidence: high
5
- valid_until: null
6
- superseded_by: null
7
- concepts: ["delegation", "explore-agent", "scout-agent", "research-command", "LSP", "deep-research", "parallel-execution"]
8
- ---
9
-
10
- # 🔄 Research delegation pattern: @explore for LSP, @scout for external
11
-
12
- 🟢 **Confidence:** high
13
-
14
- Optimized scout.md and research.md to use proper delegation:
15
-
16
- **Delegation pattern:**
17
- - Internal codebase LSP analysis → delegate to @explore agent
18
- - External docs/GitHub patterns → @scout handles directly
19
- - Run both in parallel when possible
20
-
21
- **Key changes:**
22
- 1. Scout agent loads deep-research skill for deep mode
23
- 2. Research command loads deep-research skill for --thorough
24
- 3. Both delegate LSP exploration to @explore instead of manual LSP calls
25
- 4. Removed redundant manual LSP code examples
26
- 5. Added parallel execution pattern for internal + external research
27
-
28
- **Why this is better:**
29
- - @explore is specialized for LSP with structured output
30
- - Reduces manual tool call overhead (9 LSP ops → 1 delegation)
31
- - Enables parallel research (codebase + external simultaneously)
32
- - Consistent methodology via deep-research skill
@@ -1,27 +0,0 @@
1
- ---
2
- type: decision
3
- created: 2026-01-29T14:26:09.644Z
4
- confidence: high
5
- valid_until: null
6
- superseded_by: null
7
- concepts: ["copilot", "claude", "rate-limit", "retry", "exponential-backoff", "anthropic-sdk", "reasoning"]
8
- files: [".opencode/plugin/copilot-auth.ts"]
9
- ---
10
-
11
- # 🎯 Copilot Auth Plugin Rate Limit Handling
12
-
13
- 🟢 **Confidence:** high
14
-
15
- Implemented retry logic with exponential backoff for Copilot auth plugin to handle 429 rate limit errors while preserving Claude reasoning support.
16
-
17
- Changes made to .opencode/plugin/copilot-auth.ts:
18
- 1. Added RATE_LIMIT_CONFIG with maxRetries: 3, baseDelayMs: 2000, maxDelayMs: 30000
19
- 2. Added calculateRetryDelay() function with exponential backoff + jitter
20
- 3. Wrapped fetch() call in retry loop that handles:
21
- - HTTP 429 (Too Many Requests) with automatic retry
22
- - Network errors with automatic retry
23
- - Console logging for debugging retry attempts
24
-
25
- Retry delays: ~2s, ~4s, ~8s (with random jitter)
26
-
27
- This allows using Claude Opus 4.5 and Haiku 4.5 with reasoning support through Anthropic SDK while gracefully handling rate limit issues instead of failing immediately.
@@ -1,21 +0,0 @@
1
- ---
2
- type: decision
3
- created: 2026-01-29T15:07:22.755Z
4
- confidence: high
5
- valid_until: null
6
- superseded_by: null
7
- concepts: ["spec-driven", "code-generation", "agent-prompts", "templates", "testing"]
8
- ---
9
-
10
- # 🎯 Spec-driven approach for OpenCodeKit
11
-
12
- 🟢 **Confidence:** high
13
-
14
- After analyzing the 'no-code library' article, decided NOT to apply spec-driven generation to agent prompts themselves (too non-deterministic for production). Instead, adopt these principles:
15
-
16
- 1. Specs-first design for agent prompts - define expected behavior clearly
17
- 2. Portable test cases for CLI integration tests (language-agnostic YAML)
18
- 3. Generated scaffolding/templates for the `init` command to create OpenCode projects
19
- 4. Keep agent prompts as actual code for determinism and version control
20
-
21
- Key insight: Specs are the primary artifact for utilities/scaffolding, but code is primary for core agent behavior.
@@ -1,44 +0,0 @@
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