@aryaminus/controlkeel-opencode 0.3.12 → 0.3.13

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.
@@ -0,0 +1,501 @@
1
+ # Agent Pattern Checklist
2
+
3
+ Detailed patterns and examples for agent pattern verification checks.
4
+
5
+ ## Loop Safety Patterns
6
+
7
+ ### Python Patterns
8
+
9
+ #### `while True` without break
10
+
11
+ **Pattern:**
12
+ ```python
13
+ # ❌ Issue - No break condition
14
+ while True:
15
+ result = process()
16
+ if result.success:
17
+ return result
18
+ # Never breaks on failure - infinite loop
19
+ ```
20
+
21
+ **Pattern:**
22
+ ```python
23
+ # ✅ Pass - Has break condition
24
+ while True:
25
+ result = process()
26
+ if result.success:
27
+ return result
28
+ if attempt_count >= MAX_ATTEMPTS:
29
+ break
30
+ attempt_count += 1
31
+ ```
32
+
33
+ #### Recursive functions without base case
34
+
35
+ **Pattern:**
36
+ ```python
37
+ # ❌ Issue - No base case or depth limit
38
+ def process_node(node):
39
+ for child in node.children:
40
+ process_node(child)
41
+ ```
42
+
43
+ **Pattern:**
44
+ ```python
45
+ # ✅ Pass - Has base case and depth limit
46
+ def process_node(node, depth=0, max_depth=100):
47
+ if depth > max_depth:
48
+ return
49
+ for child in node.children:
50
+ process_node(child, depth + 1, max_depth)
51
+ ```
52
+
53
+ ### TypeScript/JavaScript Patterns
54
+
55
+ #### `while (true)` without break
56
+
57
+ **Pattern:**
58
+ ```typescript
59
+ // ❌ Issue - No break condition
60
+ while (true) {
61
+ const result = await process();
62
+ if (result.success) {
63
+ return result;
64
+ }
65
+ // Never breaks on failure
66
+ }
67
+ ```
68
+
69
+ **Pattern:**
70
+ ```typescript
71
+ // ✅ Pass - Has break condition
72
+ while (true) {
73
+ const result = await process();
74
+ if (result.success) {
75
+ return result;
76
+ }
77
+ if (attemptCount >= MAX_ATTEMPTS) {
78
+ break;
79
+ }
80
+ attemptCount++;
81
+ }
82
+ ```
83
+
84
+ ### Go Patterns
85
+
86
+ #### `for {}` without break
87
+
88
+ **Pattern:**
89
+ ```go
90
+ // ❌ Issue - No break or return
91
+ for {
92
+ result := process()
93
+ if result.Success {
94
+ return result
95
+ }
96
+ // Never breaks on failure
97
+ }
98
+ ```
99
+
100
+ **Pattern:**
101
+ ```go
102
+ // ✅ Pass - Has break condition
103
+ for {
104
+ result := process()
105
+ if result.Success {
106
+ return result
107
+ }
108
+ if attemptCount >= maxAttempts {
109
+ break
110
+ }
111
+ attemptCount++
112
+ }
113
+ ```
114
+
115
+ ## Retry Limit Patterns
116
+
117
+ ### Python - Tenacity
118
+
119
+ **Pattern:**
120
+ ```python
121
+ # ❌ Issue - No stop parameter
122
+ @retry
123
+ def api_call():
124
+ return requests.get(url)
125
+ ```
126
+
127
+ **Pattern:**
128
+ ```python
129
+ # ✅ Pass - Has stop parameter
130
+ @retry(stop=stop_after_attempt(3))
131
+ def api_call():
132
+ return requests.get(url)
133
+ ```
134
+
135
+ ### Python - Backoff
136
+
137
+ **Pattern:**
138
+ ```python
139
+ # ❌ Issue - No max_tries
140
+ @backoff.on_exception(backoff.expo, requests.exceptions.RequestException)
141
+ def api_call():
142
+ return requests.get(url)
143
+ ```
144
+
145
+ **Pattern:**
146
+ ```python
147
+ # ✅ Pass - Has max_tries
148
+ @backoff.on_exception(backoff.expo, requests.exceptions.RequestException, max_tries=3)
149
+ def api_call():
150
+ return requests.get(url)
151
+ ```
152
+
153
+ ### Python - urllib3
154
+
155
+ **Pattern:**
156
+ ```python
157
+ # ❌ Issue - No total parameter
158
+ retry = urllib3.Retry()
159
+ http = urllib3.PoolManager(retries=retry)
160
+ ```
161
+
162
+ **Pattern:**
163
+ ```python
164
+ # ✅ Pass - Has total parameter
165
+ retry = urllib3.Retry(total=3)
166
+ http = urllib3.PoolManager(retries=retry)
167
+ ```
168
+
169
+ ### JavaScript/TypeScript - async-retry
170
+
171
+ **Pattern:**
172
+ ```typescript
173
+ // ❌ Issue - No retries option
174
+ const result = await retry(async () => {
175
+ return await apiCall();
176
+ });
177
+ ```
178
+
179
+ **Pattern:**
180
+ ```typescript
181
+ // ✅ Pass - Has retries option
182
+ const result = await retry(async () => {
183
+ return await apiCall();
184
+ }, { retries: 3 });
185
+ ```
186
+
187
+ ### JavaScript/TypeScript - p-retry
188
+
189
+ **Pattern:**
190
+ ```typescript
191
+ // ❌ Issue - No retries option
192
+ const result = await pRetry(async () => {
193
+ return await apiCall();
194
+ });
195
+ ```
196
+
197
+ **Pattern:**
198
+ ```typescript
199
+ // ✅ Pass - Has retries option
200
+ const result = await pRetry(async () => {
201
+ return await apiCall();
202
+ }, { retries: 3 });
203
+ ```
204
+
205
+ ### Custom Retry Loops
206
+
207
+ **Pattern:**
208
+ ```python
209
+ # ❌ Issue - No counter
210
+ while True:
211
+ try:
212
+ return api_call()
213
+ except Exception:
214
+ continue
215
+ ```
216
+
217
+ **Pattern:**
218
+ ```python
219
+ # ✅ Pass - Has counter with max check
220
+ attempt = 0
221
+ while attempt < MAX_RETRIES:
222
+ try:
223
+ return api_call()
224
+ except Exception:
225
+ attempt += 1
226
+ continue
227
+ ```
228
+
229
+ ## Tool Registry Patterns
230
+
231
+ ### Python - LangChain Decorator
232
+
233
+ **Definition:**
234
+ ```python
235
+ @tool
236
+ def search_web(query: str) -> str:
237
+ """Search the web for information."""
238
+ return search_engine.search(query)
239
+ ```
240
+
241
+ **Prompt reference:**
242
+ ```markdown
243
+ You have access to the following tools:
244
+ - search_web: Search the web for information
245
+ ```
246
+
247
+ **Extracted name:** `search_web`
248
+
249
+ ### Python - OpenAI Function Schema
250
+
251
+ **Definition:**
252
+ ```python
253
+ tools = [{
254
+ "type": "function",
255
+ "function": {
256
+ "name": "get_weather",
257
+ "description": "Get current weather",
258
+ "parameters": {...}
259
+ }
260
+ }]
261
+ ```
262
+
263
+ **Prompt reference:**
264
+ ```markdown
265
+ Available tools:
266
+ - get_weather: Get current weather
267
+ ```
268
+
269
+ **Extracted name:** `get_weather`
270
+
271
+ ### Python - LangGraph ToolNode
272
+
273
+ **Definition:**
274
+ ```python
275
+ from langgraph.prebuilt import ToolNode
276
+
277
+ tools = [search_web, get_weather, calculate]
278
+ tool_node = ToolNode(tools)
279
+ ```
280
+
281
+ **Prompt reference:**
282
+ ```markdown
283
+ You have access to: search_web, get_weather, calculate
284
+ ```
285
+
286
+ **Extracted names:** `search_web`, `get_weather`, `calculate`
287
+
288
+ ### TypeScript - OpenAI Function Schema
289
+
290
+ **Definition:**
291
+ ```typescript
292
+ const tools = [{
293
+ type: "function",
294
+ function: {
295
+ name: "get_weather",
296
+ description: "Get current weather",
297
+ parameters: {...}
298
+ }
299
+ }];
300
+ ```
301
+
302
+ **Prompt reference:**
303
+ ```markdown
304
+ Available tools:
305
+ - get_weather: Get current weather
306
+ ```
307
+
308
+ **Extracted name:** `get_weather`
309
+
310
+ ### Hallucinated Tool Example
311
+
312
+ **Prompt reference:**
313
+ ```markdown
314
+ You have access to:
315
+ - execute_sql: Execute SQL queries
316
+ - search_web: Search the web
317
+ - analyze_data: Analyze data
318
+ ```
319
+
320
+ **Tool definitions:**
321
+ ```python
322
+ tools = [search_web, analyze_data] # execute_sql not defined
323
+ ```
324
+
325
+ **Finding:** ❌ Issue - Hallucinated tool `execute_sql` referenced in prompt but not defined
326
+
327
+ ### Undocumented Tool Example
328
+
329
+ **Tool definitions:**
330
+ ```python
331
+ tools = [search_web, get_weather, calculate]
332
+ ```
333
+
334
+ **Prompt reference:**
335
+ ```markdown
336
+ You have access to:
337
+ - search_web: Search the web
338
+ - get_weather: Get current weather
339
+ ```
340
+
341
+ **Finding:** ⚠️ Warning - Tool `calculate` defined but not documented in prompt
342
+
343
+ ## Context Size Patterns
344
+
345
+ ### System Prompt Size
346
+
347
+ **Pattern:**
348
+ ```python
349
+ # Calculate token estimate
350
+ system_prompt_content = open("system.md").read()
351
+ token_estimate = len(system_prompt_content) / 4
352
+
353
+ if token_estimate > 8000:
354
+ # ❌ Issue - System prompt too large
355
+ record_finding("system_prompt_too_large", severity="issue")
356
+ elif token_estimate > 4000:
357
+ # ⚠️ Warning - System prompt approaching limit
358
+ record_finding("system_prompt_large", severity="warning")
359
+ ```
360
+
361
+ ### Tool Description Size
362
+
363
+ **Pattern:**
364
+ ```python
365
+ # Calculate single tool description size
366
+ tool_description = tool_schema["description"]
367
+ token_estimate = len(tool_description) / 4
368
+
369
+ if token_estimate > 1000:
370
+ # ❌ Issue - Tool description too large
371
+ record_finding("tool_description_too_large", severity="issue")
372
+ elif token_estimate > 500:
373
+ # ⚠️ Warning - Tool description large
374
+ record_finding("tool_description_large", severity="warning")
375
+ ```
376
+
377
+ ### Combined Tool Descriptions
378
+
379
+ **Pattern:**
380
+ ```python
381
+ # Calculate combined tool descriptions size
382
+ total_tool_tokens = sum(
383
+ len(tool["description"]) / 4
384
+ for tool in tools
385
+ )
386
+
387
+ if total_tool_tokens > 4000:
388
+ # ❌ Issue - Combined tool descriptions too large
389
+ record_finding("combined_tool_descriptions_too_large", severity="issue")
390
+ elif total_tool_tokens > 2000:
391
+ # ⚠️ Warning - Combined tool descriptions large
392
+ record_finding("combined_tool_descriptions_large", severity="warning")
393
+ ```
394
+
395
+ ## LangGraph Cycle Analysis
396
+
397
+ ### Infinite Cycle Detection
398
+
399
+ **Pattern:**
400
+ ```python
401
+ # ❌ Issue - Cycle with no path to END
402
+ workflow = StateGraph(AgentState)
403
+ workflow.add_node("agent", agent_node)
404
+ workflow.add_node("tools", tool_node)
405
+
406
+ # Creates cycle: agent -> tools -> agent
407
+ workflow.add_edge("agent", "tools")
408
+ workflow.add_edge("tools", "agent")
409
+
410
+ # No path to END - infinite loop
411
+ ```
412
+
413
+ **Finding:** ❌ Issue - Cycle exists between agent and tools with no path to END
414
+
415
+ ### Valid Cycle with Conditional Exit
416
+
417
+ **Pattern:**
418
+ ```python
419
+ # ✅ Pass - Cycle with conditional path to END
420
+ workflow = StateGraph(AgentState)
421
+ workflow.add_node("agent", agent_node)
422
+ workflow.add_node("tools", tool_node)
423
+
424
+ workflow.add_edge("agent", "tools")
425
+ workflow.add_edge("tools", "agent")
426
+
427
+ # Conditional edge can route to END
428
+ workflow.add_conditional_edges(
429
+ "agent",
430
+ should_continue,
431
+ {
432
+ "continue": "tools",
433
+ "end": END
434
+ }
435
+ )
436
+ ```
437
+
438
+ ### Dead-End Node Detection
439
+
440
+ **Pattern:**
441
+ ```python
442
+ # ⚠️ Warning - Node with no outgoing edges
443
+ workflow = StateGraph(AgentState)
444
+ workflow.add_node("agent", agent_node)
445
+ workflow.add_node("tools", tool_node)
446
+ workflow.add_node("cleanup", cleanup_node)
447
+
448
+ workflow.add_edge("agent", "tools")
449
+ workflow.add_edge("tools", "cleanup")
450
+ # cleanup has no outgoing edges and is not END
451
+ ```
452
+
453
+ **Finding:** ⚠️ Warning - Node `cleanup` has no outgoing edges and is not END
454
+
455
+ ## Framework Detection Patterns
456
+
457
+ ### LangGraph Detection
458
+
459
+ **Python imports:**
460
+ ```python
461
+ from langgraph.graph import StateGraph, END
462
+ from langgraph.prebuilt import ToolNode
463
+ ```
464
+
465
+ **Config files:**
466
+ - `langgraph.json`
467
+
468
+ ### CrewAI Detection
469
+
470
+ **Python imports:**
471
+ ```python
472
+ from crewai import Agent, Task, Crew
473
+ ```
474
+
475
+ **Config files:**
476
+ - `crew.yaml`
477
+
478
+ ### AutoGen Detection
479
+
480
+ **Python imports:**
481
+ ```python
482
+ from autogen import AssistantAgent, UserProxyAgent
483
+ ```
484
+
485
+ ### LangChain Detection
486
+
487
+ **Python imports:**
488
+ ```python
489
+ from langchain.agents import AgentExecutor
490
+ from langchain.tools import Tool
491
+ ```
492
+
493
+ ### Custom Agent Detection
494
+
495
+ **Direct SDK usage:**
496
+ ```python
497
+ import openai
498
+ import anthropic
499
+ ```
500
+
501
+ No framework-specific imports detected.
@@ -11,6 +11,27 @@ compatibility:
11
11
  - copilot-plugin
12
12
  - github-repo
13
13
  - open-standard
14
+ - cline-native
15
+ - cursor-native
16
+ - windsurf-native
17
+ - continue-native
18
+ - letta-code-native
19
+ - pi-native
20
+ - roo-native
21
+ - goose-native
22
+ - opencode-native
23
+ - gemini-cli-native
24
+ - kiro-native
25
+ - kilo-native
26
+ - amp-native
27
+ - augment-native
28
+ - hermes-native
29
+ - multica-native
30
+ - openclaw-native
31
+ - devin-terminal-native
32
+ - warp-native
33
+ - droid-bundle
34
+ - forge-acp
14
35
  metadata:
15
36
  author: controlkeel
16
37
  version: "1.0"
@@ -37,9 +58,10 @@ Reach a **shared design concept** with the user before any plan or code is writt
37
58
  **Why** — What problem does this solve? What is the success signal?
38
59
  **Who** — Who uses the result? Which roles, systems, or integrations are affected?
39
60
  **Layers** — Which system layers does this touch? (schema, services, APIs, UI, infra, third-party) Record each touched layer explicitly — this drives vertical slice decomposition later.
40
- **Acceptance criteria** — What does "done" look like? What would a failing test catch?
61
+ **Acceptance criteria** — What does "done" look like? What would a failing test catch? Reframe vague requirements into concrete, testable conditions.
41
62
  **Edge cases** — What breaks if inputs are invalid, empty, or unexpected?
42
63
  **Constraints** — Budget, timeline, tech stack limits, compliance requirements, or must-not-change areas.
64
+ **Assumptions** — What are you assuming about the environment, tech stack, data sources, or integrations? Surface these explicitly before proceeding.
43
65
  **Unknowns** — What do you not know yet? What needs a spike or research before implementation starts?
44
66
 
45
67
  5. After each resolved decision, call `ck_memory_record` with type `decision` to persist it. Future agents resuming this work will recover these without asking again.
@@ -58,7 +80,7 @@ Reach a **shared design concept** with the user before any plan or code is writt
58
80
  ## What you produce
59
81
 
60
82
  At the end of this skill:
61
- - A `ck_goal` record with: objective, acceptance criteria, touched layers, known constraints, open unknowns.
83
+ - A `ck_goal` record with: objective, acceptance criteria, touched layers, known constraints, explicit assumptions, open unknowns.
62
84
  - One or more `ck_memory_record` entries (type: `decision`) for each resolved design choice.
63
85
  - A clear recommendation on whether to proceed to `plan-slice` or directly to `ck_review_submit`.
64
86
 
@@ -11,6 +11,27 @@ compatibility:
11
11
  - copilot-plugin
12
12
  - github-repo
13
13
  - open-standard
14
+ - cline-native
15
+ - cursor-native
16
+ - windsurf-native
17
+ - continue-native
18
+ - letta-code-native
19
+ - pi-native
20
+ - roo-native
21
+ - goose-native
22
+ - opencode-native
23
+ - gemini-cli-native
24
+ - kiro-native
25
+ - kilo-native
26
+ - amp-native
27
+ - augment-native
28
+ - hermes-native
29
+ - multica-native
30
+ - openclaw-native
31
+ - devin-terminal-native
32
+ - warp-native
33
+ - droid-bundle
34
+ - forge-acp
14
35
  disable-model-invocation: true
15
36
  metadata:
16
37
  author: controlkeel
@@ -11,6 +11,27 @@ compatibility:
11
11
  - copilot-plugin
12
12
  - github-repo
13
13
  - open-standard
14
+ - cline-native
15
+ - cursor-native
16
+ - windsurf-native
17
+ - continue-native
18
+ - letta-code-native
19
+ - pi-native
20
+ - roo-native
21
+ - goose-native
22
+ - opencode-native
23
+ - gemini-cli-native
24
+ - kiro-native
25
+ - kilo-native
26
+ - amp-native
27
+ - augment-native
28
+ - hermes-native
29
+ - multica-native
30
+ - openclaw-native
31
+ - devin-terminal-native
32
+ - warp-native
33
+ - droid-bundle
34
+ - forge-acp
14
35
  metadata:
15
36
  author: controlkeel
16
37
  version: "2.0"
@@ -11,6 +11,27 @@ compatibility:
11
11
  - copilot-plugin
12
12
  - github-repo
13
13
  - open-standard
14
+ - cline-native
15
+ - cursor-native
16
+ - windsurf-native
17
+ - continue-native
18
+ - letta-code-native
19
+ - pi-native
20
+ - roo-native
21
+ - goose-native
22
+ - opencode-native
23
+ - gemini-cli-native
24
+ - kiro-native
25
+ - kilo-native
26
+ - amp-native
27
+ - augment-native
28
+ - hermes-native
29
+ - multica-native
30
+ - openclaw-native
31
+ - devin-terminal-native
32
+ - warp-native
33
+ - droid-bundle
34
+ - forge-acp
14
35
  allowed-tools:
15
36
  - ck_validate
16
37
  - ck_execute_code
@@ -53,7 +74,7 @@ You are operating inside a **ControlKeel-governed session**. Start here whenever
53
74
 
54
75
  ## Before new work
55
76
 
56
- For any new feature, fix, or project — before writing plans or code — use the `align` skill to reach shared understanding of the goal, layers, and acceptance criteria. Once aligned, use `plan-slice` to decompose the goal into vertical slices with explicit blocking relationships before any implementation begins. Planning is always human-in-the-loop; implementation of an approved slice can be AFK.
77
+ For any new feature, fix, or project — before writing plans or code — use the `align` skill to reach shared understanding of the goal, layers, acceptance criteria, and **assumptions**. Surface assumptions explicitly before proceeding to prevent expensive misalignments caught after implementation. Once aligned, use `plan-slice` to decompose the goal into vertical slices with explicit blocking relationships and concrete success criteria before any implementation begins. Planning is always human-in-the-loop; implementation of an approved slice can be AFK.
57
78
 
58
79
  ## Core loop
59
80
 
@@ -11,6 +11,27 @@ compatibility:
11
11
  - copilot-plugin
12
12
  - github-repo
13
13
  - open-standard
14
+ - cline-native
15
+ - cursor-native
16
+ - windsurf-native
17
+ - continue-native
18
+ - letta-code-native
19
+ - pi-native
20
+ - roo-native
21
+ - goose-native
22
+ - opencode-native
23
+ - gemini-cli-native
24
+ - kiro-native
25
+ - kilo-native
26
+ - amp-native
27
+ - augment-native
28
+ - hermes-native
29
+ - multica-native
30
+ - openclaw-native
31
+ - devin-terminal-native
32
+ - warp-native
33
+ - droid-bundle
34
+ - forge-acp
14
35
  metadata:
15
36
  author: controlkeel
16
37
  version: "2.0"
@@ -11,6 +11,27 @@ compatibility:
11
11
  - copilot-plugin
12
12
  - github-repo
13
13
  - open-standard
14
+ - cline-native
15
+ - cursor-native
16
+ - windsurf-native
17
+ - continue-native
18
+ - letta-code-native
19
+ - pi-native
20
+ - roo-native
21
+ - goose-native
22
+ - opencode-native
23
+ - gemini-cli-native
24
+ - kiro-native
25
+ - kilo-native
26
+ - amp-native
27
+ - augment-native
28
+ - hermes-native
29
+ - multica-native
30
+ - openclaw-native
31
+ - devin-terminal-native
32
+ - warp-native
33
+ - droid-bundle
34
+ - forge-acp
14
35
  metadata:
15
36
  author: controlkeel
16
37
  version: "2.0"
@@ -11,6 +11,27 @@ compatibility:
11
11
  - copilot-plugin
12
12
  - github-repo
13
13
  - open-standard
14
+ - cline-native
15
+ - cursor-native
16
+ - windsurf-native
17
+ - continue-native
18
+ - letta-code-native
19
+ - pi-native
20
+ - roo-native
21
+ - goose-native
22
+ - opencode-native
23
+ - gemini-cli-native
24
+ - kiro-native
25
+ - kilo-native
26
+ - amp-native
27
+ - augment-native
28
+ - hermes-native
29
+ - multica-native
30
+ - openclaw-native
31
+ - devin-terminal-native
32
+ - warp-native
33
+ - droid-bundle
34
+ - forge-acp
14
35
  metadata:
15
36
  author: controlkeel
16
37
  version: "1.0"