clew-code 0.3.2 → 0.3.4

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 (49) hide show
  1. package/README.md +196 -114
  2. package/dist/generated/version.json +1 -1
  3. package/dist/main.js +2963 -3272
  4. package/package.json +5 -5
  5. package/scripts/bun-run.mjs +33 -0
  6. package/scripts/postbuild-inject-macro.mjs +36 -0
  7. package/docs/.nojekyll +0 -0
  8. package/docs/_config.yml +0 -3
  9. package/docs/architecture.html +0 -90
  10. package/docs/assets/clew-agent-loop.png +0 -0
  11. package/docs/assets/clew-general-architecture.png +0 -0
  12. package/docs/assets/clew-mcp-architecture.png +0 -0
  13. package/docs/assets/clew-p2p-swarm.png +0 -0
  14. package/docs/assets/clew.svg +0 -33
  15. package/docs/changelog.html +0 -141
  16. package/docs/cli-reference.html +0 -89
  17. package/docs/commands.html +0 -161
  18. package/docs/configuration.html +0 -85
  19. package/docs/contributing.html +0 -91
  20. package/docs/css/styles.css +0 -545
  21. package/docs/daemon.html +0 -62
  22. package/docs/features/bridge-mode.html +0 -62
  23. package/docs/features/evals.html +0 -58
  24. package/docs/features/searxng-search.html +0 -59
  25. package/docs/features/sentry-setup.html +0 -62
  26. package/docs/generated/providers.html +0 -625
  27. package/docs/generated/tools.html +0 -559
  28. package/docs/index.html +0 -182
  29. package/docs/installation.html +0 -77
  30. package/docs/internals/claude-ai-backend-dependencies.md +0 -278
  31. package/docs/internals/growthbook-ab-testing.html +0 -70
  32. package/docs/internals/hidden-features.html +0 -82
  33. package/docs/internals/long-term-memory-design.md +0 -173
  34. package/docs/js/main.js +0 -438
  35. package/docs/loop.html +0 -69
  36. package/docs/mcp.html +0 -99
  37. package/docs/models.html +0 -81
  38. package/docs/permission-model.html +0 -86
  39. package/docs/personal-profile.html +0 -113
  40. package/docs/plugins.html +0 -84
  41. package/docs/providers.html +0 -625
  42. package/docs/quick-start.html +0 -81
  43. package/docs/research-memory.html +0 -71
  44. package/docs/security.html +0 -71
  45. package/docs/skills.html +0 -67
  46. package/docs/swarm.html +0 -78
  47. package/docs/tools.html +0 -559
  48. package/docs/troubleshooting.html +0 -86
  49. package/docs/voice-mode.html +0 -79
package/docs/tools.html DELETED
@@ -1,559 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Tools & Prompts (Auto-generated) — Clew</title>
7
- <meta name="description" content="Auto-generated tool reference with 58 system prompts for Clew Code.">
8
- <link rel="preconnect" href="https://fonts.googleapis.com">
9
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
- <link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
11
- <link rel="stylesheet" href="../css/styles.css">
12
- <link rel="icon" type="image/svg+xml" href="../assets/clew.svg">
13
- </head>
14
- <body>
15
- <header class="header">
16
- <div class="header-inner">
17
- <a href="../index.html" class="logo"><span class="logo-mark">C</span><span>Clew Code</span></a>
18
- <nav class="header-nav">
19
- <a href="../index.html">Home</a>
20
- <a href="../commands.html">Commands</a>
21
- <a href="../tools.html">Tools</a>
22
- <a href="../providers.html">Providers</a>
23
- <a href="../prompts-and-features.html">Reference</a>
24
- <a href="../quick-start.html">Docs</a>
25
- </nav>
26
- </div>
27
- </header>
28
- <div class="app">
29
- <aside class="sidebar" id="sidebar">
30
- <div class="sidebar-section">
31
- <div class="sidebar-label">Generated Docs</div>
32
- <a href="providers.html" class="sidebar-link"><span class="link-icon"></span>Providers</a>
33
- <a href="tools.html" class="sidebar-link"><span class="link-icon"></span>Tools</a>
34
- </div>
35
- <div class="sidebar-section">
36
- <div class="sidebar-label">Static Docs</div>
37
- <a href="../commands.html" class="sidebar-link"><span class="link-icon"></span>Commands</a>
38
- <a href="../tools.html" class="sidebar-link"><span class="link-icon"></span>Tools</a>
39
- <a href="../providers.html" class="sidebar-link"><span class="link-icon"></span>Providers</a>
40
- </div>
41
- </aside>
42
- <div class="sidebar-overlay"></div>
43
- <div class="content-wrap"><main class="content">
44
- <div class="breadcrumbs"><a href="../index.html">Home</a><span class="sep">/</span><span>Tools & Prompts (Auto-generated)</span></div>
45
- <h1>Tools & Prompts (Auto-generated)</h1>
46
- <p class="section-subtitle"><em>Auto-generated from source code. Last updated: 2026-06-16.</em></p>
47
-
48
- <h2>All Tools with Prompts</h2>
49
- <p>Clew provides <strong>58 tools</strong> with system prompts. These prompts are injected into the AI model's context at session start to define the tool interface.</p>
50
- <div class="table-wrap"><table>
51
- <tr><th>Tool</th><th>Description</th></tr>
52
- <tr><td><code>Agent</code></td><td>Built-in tool &quot;Agent&quot;. See system prompt for details.</td></tr>
53
- <tr><td><code>AskUserQuestion</code></td><td>Asks the user multiple choice questions to gather information, clarify ambiguity, understand preferences, make decisions or offer them choices.</td></tr>
54
- <tr><td><code>Bash</code></td><td>Built-in tool &quot;Bash&quot;. See system prompt for details.</td></tr>
55
- <tr><td><code>Brief</code></td><td>Send a message to the user</td></tr>
56
- <tr><td><code>Config</code></td><td>Get or set Clew Code configuration settings.</td></tr>
57
- <tr><td><code>EnterPlanMode</code></td><td>Built-in tool &quot;EnterPlanMode&quot;. See system prompt for details.</td></tr>
58
- <tr><td><code>EnterWorktree</code></td><td>Built-in tool &quot;EnterWorktree&quot;. See system prompt for details.</td></tr>
59
- <tr><td><code>ExitPlanMode</code></td><td>Built-in tool &quot;ExitPlanMode&quot;. See system prompt for details.</td></tr>
60
- <tr><td><code>ExitWorktree</code></td><td>Built-in tool &quot;ExitWorktree&quot;. See system prompt for details.</td></tr>
61
- <tr><td><code>FileEdit</code></td><td>Built-in tool &quot;FileEdit&quot;. See system prompt for details.</td></tr>
62
- <tr><td><code>FileRead</code></td><td>Read a file or multiple files from the local filesystem. Supports batch reading multiple files in parallel for better performance.</td></tr>
63
- <tr><td><code>FileWrite</code></td><td>Write a file to the local filesystem.</td></tr>
64
- <tr><td><code>GenerateImage</code></td><td>Built-in tool &quot;GenerateImage&quot;. See system prompt for details.</td></tr>
65
- <tr><td><code>GenerateVideo</code></td><td>Built-in tool &quot;GenerateVideo&quot;. See system prompt for details.</td></tr>
66
- <tr><td><code>Glob</code></td><td>- Fast file pattern matching tool that works with any codebase size
67
- - Supports glob patterns like &quot;**/*.js&quot; or &quot;src/**/*.ts&quot;
68
- - Returns matching file paths sorted by modification time
69
- - Use this tool when you need to find files by name patterns
70
- - When you are doing an open ended search that may require multiple rounds of globbing and grepping, use the Agent tool instead</td></tr>
71
- <tr><td><code>Grep</code></td><td>Built-in tool &quot;Grep&quot;. See system prompt for details.</td></tr>
72
- <tr><td><code>JsonPath</code></td><td>Query, validate, format, and minify JSON data</td></tr>
73
- <tr><td><code>ListMcpResources</code></td><td>
74
- Lists available resources from configured MCP servers.
75
- Each resource object includes a 'server' field indicating which server it's from.
76
-
77
- Usage examples:
78
- - List all resources from all servers: \</td></tr>
79
- <tr><td><code>LSP</code></td><td>Interact with Language Server Protocol (LSP) servers to get code intelligence features.
80
-
81
- Supported operations:
82
- - goToDefinition: Find where a symbol is defined
83
- - findReferences: Find all references to a symbol
84
- - hover: Get hover information (documentation, type info) for a symbol
85
- - documentSymbol: Get all symbols (functions, classes, variables) in a document
86
- - workspaceSymbol: Search for symbols across the entire workspace
87
- - goToImplementation: Find implementations of an interface or abstract method
88
- - prepareCallHierarchy: Get call hierarchy item at a position (functions/methods)
89
- - incomingCalls: Find all functions/methods that call the function at a position
90
- - outgoingCalls: Find all functions/methods called by the function at a position
91
-
92
- All operations require:
93
- - filePath: The file to operate on
94
- - line: The line number (1-based, as shown in editors)
95
- - character: The character offset (1-based, as shown in editors)
96
-
97
- Note: LSP servers must be configured for the file type. If no server is available, an error will be returned.</td></tr>
98
- <tr><td><code>MCP</code></td><td>';
99
- export const DESCRIPTION =</td></tr>
100
- <tr><td><code>NotebookEdit</code></td><td>Replace the contents of a specific cell in a Jupyter notebook.</td></tr>
101
- <tr><td><code>PeerBroadcast</code></td><td>Broadcast a task to ALL currently connected peers at once. </td></tr>
102
- <tr><td><code>PeerDisconnect</code></td><td>Disconnect and remove a peer node from the connection list. </td></tr>
103
- <tr><td><code>PeerDiscover</code></td><td>Discover Clew Code workers on the local network. </td></tr>
104
- <tr><td><code>PeerHelp</code></td><td>Complete guide to agent-to-agent tools. </td></tr>
105
- <tr><td><code>PeerInfo</code></td><td>Get detailed information about a specific peer/worker by hostname or ID. </td></tr>
106
- <tr><td><code>PeerJoin</code></td><td>Connect to a peer node by host and port. Fetches the peer node info (hostname, name, role, shell, cwd) </td></tr>
107
- <tr><td><code>PeerListMessages</code></td><td>List chat messages received from peers. </td></tr>
108
- <tr><td><code>PeerListRoles</code></td><td>List all discovered peer nodes with their display names and roles. </td></tr>
109
- <tr><td><code>PeerPing</code></td><td>Check if a specific peer is still online and reachable. </td></tr>
110
- <tr><td><code>PeerRun</code></td><td>Run a shell command on a remote peer node and get the output back. </td></tr>
111
- <tr><td><code>PeerSendMessage</code></td><td>Send a chat message to a peer node Clew Code instance on the LAN. </td></tr>
112
- <tr><td><code>PeerSetName</code></td><td>Set a custom display name for a peer node. This name is shown in the peer list </td></tr>
113
- <tr><td><code>PeerSetRole</code></td><td>Assign a role to a peer node (e.g., &quot;builder&quot;, &quot;tester&quot;, &quot;deployer&quot;). </td></tr>
114
- <tr><td><code>PeerShare</code></td><td>Start or stop advertising this Clew Code instance as a worker. </td></tr>
115
- <tr><td><code>PeerSpawn</code></td><td>Spawn a new peer terminal window on the local machine with optional custom settings </td></tr>
116
- <tr><td><code>PowerShell</code></td><td>Built-in tool &quot;PowerShell&quot;. See system prompt for details.</td></tr>
117
- <tr><td><code>ProcessPeer</code></td><td>Delegate a task to a local process-backed AI worker (Codex, OpenCode, Claude Code) and return its output. </td></tr>
118
- <tr><td><code>PrSubscription</code></td><td>Built-in tool &quot;PrSubscription&quot;. See system prompt for details.</td></tr>
119
- <tr><td><code>ReadMcpResource</code></td><td>
120
- Reads a specific resource from an MCP server.
121
- - server: The name of the MCP server to read from
122
- - uri: The URI of the resource to read
123
-
124
- Usage examples:
125
- - Read a resource from a server: \</td></tr>
126
- <tr><td><code>RemoteTrigger</code></td><td>Manage scheduled remote Clew Code agents (triggers) via the claude.ai CCR API. Auth is handled in-process — the token never reaches the shell.</td></tr>
127
- <tr><td><code>RequestShutdown</code></td><td>Built-in tool &quot;RequestShutdown&quot;. See system prompt for details.</td></tr>
128
- <tr><td><code>ScheduleCron</code></td><td>Built-in tool &quot;ScheduleCron&quot;. See system prompt for details.</td></tr>
129
- <tr><td><code>SendMessage</code></td><td>Send a message to another agent</td></tr>
130
- <tr><td><code>SessionSearch</code></td><td>Built-in tool &quot;SessionSearch&quot;. See system prompt for details.</td></tr>
131
- <tr><td><code>Skill</code></td><td>Built-in tool &quot;Skill&quot;. See system prompt for details.</td></tr>
132
- <tr><td><code>Sleep</code></td><td>Wait for a specified duration</td></tr>
133
- <tr><td><code>TaskCreate</code></td><td>Create a new task in the task list</td></tr>
134
- <tr><td><code>TaskGet</code></td><td>Get a task by ID from the task list</td></tr>
135
- <tr><td><code>TaskList</code></td><td>List all tasks in the task list</td></tr>
136
- <tr><td><code>TaskStop</code></td><td>
137
- - Stops a running background task by its ID
138
- - Takes a task_id parameter identifying the task to stop
139
- - Returns a success or failure status
140
- - Use this tool when you need to terminate a long-running task
141
- </td></tr>
142
- <tr><td><code>TaskUpdate</code></td><td>Update a task in the task list</td></tr>
143
- <tr><td><code>TeamCreate</code></td><td>Built-in tool &quot;TeamCreate&quot;. See system prompt for details.</td></tr>
144
- <tr><td><code>TeamDelete</code></td><td>Built-in tool &quot;TeamDelete&quot;. See system prompt for details.</td></tr>
145
- <tr><td><code>TodoWrite</code></td><td>Update the todo list for the current session. To be used proactively and often to track progress and pending tasks. Make sure that at least one task is in_progress at all times. Always provide both content (imperative) and activeForm (present continuous) for each task.</td></tr>
146
- <tr><td><code>ToolSearch</code></td><td>Built-in tool &quot;ToolSearch&quot;. See system prompt for details.</td></tr>
147
- <tr><td><code>WebFetch</code></td><td>
148
- - Fetches content from a specified URL and processes it using an AI model
149
- - Takes a URL and a prompt as input
150
- - Fetches the URL content, converts HTML to markdown
151
- - Processes the content with the prompt using a small, fast model
152
- - Returns the model's response about the content
153
- - Use this tool when you need to retrieve and analyze web content
154
-
155
- Usage notes:
156
- - IMPORTANT: If an MCP-provided web fetch tool is available, prefer using that tool instead of this one, as it may have fewer restrictions.
157
- - The URL must be a fully-formed valid URL
158
- - HTTP URLs will be automatically upgraded to HTTPS
159
- - The prompt should describe what information you want to extract from the page
160
- - This tool is read-only and does not modify any files
161
- - Results may be summarized if the content is very large
162
- - Includes a self-cleaning 15-minute cache for faster responses when repeatedly accessing the same URL
163
- - When a URL redirects to a different host, the tool will inform you and provide the redirect URL in a special format. You should then make a new WebFetch request with the redirect URL to fetch the content.
164
- - For GitHub URLs, prefer using the gh CLI via Bash instead (e.g., gh pr view, gh issue view, gh api).
165
- </td></tr>
166
- <tr><td><code>WebSearch</code></td><td>Built-in tool &quot;WebSearch&quot;. See system prompt for details.</td></tr>
167
-
168
- </table></div>
169
-
170
- <h2>Tool Prompts</h2>
171
- <p>Each tool's system prompt, as seen by the AI model:</p>
172
- <div class="tool-prompts"><details>
173
- <summary><code>JsonPath</code> — System Prompt</summary>
174
- <div class="prompt-box">A tool for querying, validating, formatting, and minifying JSON data. Use this tool when you need to extract specific values from JSON, validate JSON structure, or transform JSON for storage/transmission.
175
-
176
- ## When to Use This Tool
177
-
178
- 1. **Query JSON** - Extract specific values, keys, or paths from JSON data using JSONPath expressions
179
- 2. **Validate JSON** - Check if JSON data matches an expected schema or structure
180
- 3. **Format JSON** - Pretty-print JSON with configurable indentation
181
- 4. **Minify JSON** - Compact JSON to remove unnecessary whitespace
182
- 5. **Convert to/from JSON** - Parse stringified JSON or stringify objects
183
-
184
- ## Features
185
-
186
- - **query**: Extract data using JSONPath or key paths (e.g., &quot;user.address.city&quot;, &quot;items[0].name&quot;)
187
- - **validate**: Validate JSON structure and optionally check against expected shape
188
- - **format**: Pretty-print with custom indent (2, 4, or tab)
189
- - **minify**: Remove all whitespace for compact storage
190
- - **stringify**: Convert JavaScript object to JSON string
191
- - **parse**: Convert JSON string to object (with optional validation)
192
-
193
- ## Examples
194
-
195
- &lt;example&gt;
196
- User: What's the email address in this JSON?
197
- Assistant: *Uses json_path with query to extract the email*
198
- \</div>
199
- </details>
200
- <details>
201
- <summary><code>ListMcpResources</code> — System Prompt</summary>
202
- <div class="prompt-box">List available resources from configured MCP servers.
203
- Each returned resource will include all standard MCP resource fields plus a 'server' field
204
- indicating which server the resource belongs to.
205
-
206
- Parameters:
207
- - server (optional): The name of a specific MCP server to get resources from. If not provided,
208
- resources from all servers will be returned.</div>
209
- </details>
210
- <details>
211
- <summary><code>MCP</code> — System Prompt</summary>
212
- <div class="prompt-box">';
213
- export const DESCRIPTION =</div>
214
- </details>
215
- <details>
216
- <summary><code>NotebookEdit</code> — System Prompt</summary>
217
- <div class="prompt-box">Completely replaces the contents of a specific cell in a Jupyter notebook (.ipynb file) with new source. Jupyter notebooks are interactive documents that combine code, text, and visualizations, commonly used for data analysis and scientific computing. The notebook_path parameter must be an absolute path, not a relative path. The cell_number is 0-indexed. Use edit_mode=insert to add a new cell at the index specified by cell_number. Use edit_mode=delete to delete the cell at the index specified by cell_number.</div>
218
- </details>
219
- <details>
220
- <summary><code>PeerBroadcast</code> — System Prompt</summary>
221
- <div class="prompt-box">This tool sends the same task to every connected peer simultaneously.</div>
222
- </details>
223
- <details>
224
- <summary><code>PeerDisconnect</code> — System Prompt</summary>
225
- <div class="prompt-box">This tool removes a peer node from the local connection list.</div>
226
- </details>
227
- <details>
228
- <summary><code>PeerDiscover</code> — System Prompt</summary>
229
- <div class="prompt-box">This tool scans the local network for other Clew Code instances that are</div>
230
- </details>
231
- <details>
232
- <summary><code>PeerInfo</code> — System Prompt</summary>
233
- <div class="prompt-box">Fetches detailed information about a peer node from the local peer store,</div>
234
- </details>
235
- <details>
236
- <summary><code>PeerJoin</code> — System Prompt</summary>
237
- <div class="prompt-box">Connects to a remote peer by making an HTTP request to their peer-info endpoint.</div>
238
- </details>
239
- <details>
240
- <summary><code>PeerListMessages</code> — System Prompt</summary>
241
- <div class="prompt-box">This tool lists peer chat messages in the local store.</div>
242
- </details>
243
- <details>
244
- <summary><code>PeerListRoles</code> — System Prompt</summary>
245
- <div class="prompt-box">Lists all discovered peer nodes and their assigned metadata (display name, role).</div>
246
- </details>
247
- <details>
248
- <summary><code>PeerPing</code> — System Prompt</summary>
249
- <div class="prompt-box">This tool pings a peer node to check if they are online.</div>
250
- </details>
251
- <details>
252
- <summary><code>PeerRun</code> — System Prompt</summary>
253
- <div class="prompt-box">Executes a shell command on a remote peer node via its HTTP API.</div>
254
- </details>
255
- <details>
256
- <summary><code>PeerSendMessage</code> — System Prompt</summary>
257
- <div class="prompt-box">This tool sends a chat message to a peer node Clew Code instance on the LAN.</div>
258
- </details>
259
- <details>
260
- <summary><code>PeerSetName</code> — System Prompt</summary>
261
- <div class="prompt-box">Assigns a human-readable display name to a peer node. The name is stored locally and</div>
262
- </details>
263
- <details>
264
- <summary><code>PeerSetRole</code> — System Prompt</summary>
265
- <div class="prompt-box">Assigns a functional role to a peer node. The role is displayed in the peer list and</div>
266
- </details>
267
- <details>
268
- <summary><code>PeerShare</code> — System Prompt</summary>
269
- <div class="prompt-box">Controls whether this Clew Code instance advertises itself as a worker on the LAN.</div>
270
- </details>
271
- <details>
272
- <summary><code>PeerSpawn</code> — System Prompt</summary>
273
- <div class="prompt-box">Spawns a new local peer terminal window running Clew Code. The spawned peer will share automatically.</div>
274
- </details>
275
- <details>
276
- <summary><code>ProcessPeer</code> — System Prompt</summary>
277
- <div class="prompt-box">Runs a local process-backed AI worker for one task and returns stdout/stderr.</div>
278
- </details>
279
- <details>
280
- <summary><code>ReadMcpResource</code> — System Prompt</summary>
281
- <div class="prompt-box">Reads a specific resource from an MCP server, identified by server name and resource URI.
282
-
283
- Parameters:
284
- - server (required): The name of the MCP server from which to read the resource
285
- - uri (required): The URI of the resource to read</div>
286
- </details>
287
- <details>
288
- <summary><code>RemoteTrigger</code> — System Prompt</summary>
289
- <div class="prompt-box">Call the claude.ai remote-trigger API. Use this instead of curl — the OAuth token is added automatically in-process and never exposed.
290
-
291
- Actions:
292
- - list: GET /v1/code/triggers
293
- - get: GET /v1/code/triggers/{trigger_id}
294
- - create: POST /v1/code/triggers (requires body)
295
- - update: POST /v1/code/triggers/{trigger_id} (requires body, partial update)
296
- - run: POST /v1/code/triggers/{trigger_id}/run
297
-
298
- The response is the raw JSON from the API.</div>
299
- </details>
300
- <details>
301
- <summary><code>TaskGet</code> — System Prompt</summary>
302
- <div class="prompt-box">Use this tool to retrieve a task by its ID from the task list.
303
-
304
- ## When to Use This Tool
305
-
306
- - When you need the full description and context before starting work on a task
307
- - To understand task dependencies (what it blocks, what blocks it)
308
- - After being assigned a task, to get complete requirements
309
-
310
- ## Output
311
-
312
- Returns full task details:
313
- - **subject**: Task title
314
- - **description**: Detailed requirements and context
315
- - **status**: 'pending', 'in_progress', or 'completed'
316
- - **blocks**: Tasks waiting on this one to complete
317
- - **blockedBy**: Tasks that must complete before this one can start
318
-
319
- ## Tips
320
-
321
- - After fetching a task, verify its blockedBy list is empty before beginning work.
322
- - Use TaskList to see all tasks in summary form.</div>
323
- </details>
324
- <details>
325
- <summary><code>TaskUpdate</code> — System Prompt</summary>
326
- <div class="prompt-box">Use this tool to update a task in the task list.
327
-
328
- ## When to Use This Tool
329
-
330
- **Mark tasks as resolved:**
331
- - When you have completed the work described in a task
332
- - When a task is no longer needed or has been superseded
333
- - IMPORTANT: Always mark your assigned tasks as resolved when you finish them
334
- - After resolving, call TaskList to find your next task
335
-
336
- - ONLY mark a task as completed when you have FULLY accomplished it
337
- - If you encounter errors, blockers, or cannot finish, keep the task as in_progress
338
- - When blocked, create a new task describing what needs to be resolved
339
- - Never mark a task as completed if:
340
- - Tests are failing
341
- - Implementation is partial
342
- - You encountered unresolved errors
343
- - You couldn't find necessary files or dependencies
344
-
345
- **Delete tasks:**
346
- - When a task is no longer relevant or was created in error
347
- - Setting status to \</div>
348
- </details>
349
- <details>
350
- <summary><code>TodoWrite</code> — System Prompt</summary>
351
- <div class="prompt-box">Use this tool to create and manage a structured task list for your current coding session. This helps you track progress, organize complex tasks, and demonstrate thoroughness to the user.
352
- It also helps the user understand the progress of the task and overall progress of their requests.
353
-
354
- ## When to Use This Tool
355
- Use this tool proactively in these scenarios:
356
-
357
- 1. Complex multi-step tasks - When a task requires 3 or more distinct steps or actions
358
- 2. Non-trivial and complex tasks - Tasks that require careful planning or multiple operations
359
- 3. User explicitly requests todo list - When the user directly asks you to use the todo list
360
- 4. User provides multiple tasks - When users provide a list of things to be done (numbered or comma-separated)
361
- 5. After receiving new instructions - Immediately capture user requirements as todos
362
- 6. When you start working on a task - Mark it as in_progress BEFORE beginning work. Ideally you should only have one todo as in_progress at a time
363
- 7. After completing a task - Mark it as completed and add any new follow-up tasks discovered during implementation
364
-
365
- ## When NOT to Use This Tool
366
-
367
- Skip using this tool when:
368
- 1. There is only a single, straightforward task
369
- 2. The task is trivial and tracking it provides no organizational benefit
370
- 3. The task can be completed in less than 3 trivial steps
371
- 4. The task is purely conversational or informational
372
-
373
- NOTE that you should not use this tool if there is only one trivial task to do. In this case you are better off just doing the task directly.
374
-
375
- ## Examples of When to Use the Todo List
376
-
377
- &lt;example&gt;
378
- User: I want to add a dark mode toggle to the application settings. Make sure you run the tests and build when you're done!
379
- Assistant: *Creates todo list with the following items:*
380
- 1. Creating dark mode toggle component in Settings page
381
- 2. Adding dark mode state management (context/store)
382
- 3. Implementing CSS-in-JS styles for dark theme
383
- 4. Updating existing components to support theme switching
384
- 5. Running tests and build process, addressing any failures or errors that occur
385
- *Begins working on the first task*
386
-
387
- &lt;reasoning&gt;
388
- The assistant used the todo list because:
389
- 1. Adding dark mode is a multi-step feature requiring UI, state management, and styling changes
390
- 2. The user explicitly requested tests and build be run afterward
391
- 3. The assistant inferred that tests and build need to pass by adding &quot;Ensure tests and build succeed&quot; as the final task
392
- &lt;/reasoning&gt;
393
- &lt;/example&gt;
394
-
395
- &lt;example&gt;
396
- User: Help me rename the function getCwd to getCurrentWorkingDirectory across my project
397
- Assistant: *Uses grep or search tools to locate all instances of getCwd in the codebase*
398
- I've found 15 instances of 'getCwd' across 8 different files.
399
- *Creates todo list with specific items for each file that needs updating*
400
-
401
- &lt;reasoning&gt;
402
- The assistant used the todo list because:
403
- 1. First, the assistant searched to understand the scope of the task
404
- 2. Upon finding multiple occurrences across different files, it determined this was a complex task with multiple steps
405
- 3. The todo list helps ensure every instance is tracked and updated systematically
406
- 4. This approach prevents missing any occurrences and maintains code consistency
407
- &lt;/reasoning&gt;
408
- &lt;/example&gt;
409
-
410
-
411
- &lt;example&gt;
412
- User: I need to implement these features for my e-commerce site: user registration, product catalog, shopping cart, and checkout flow.
413
- Assistant: *Creates a todo list breaking down each feature into specific tasks based on the project architecture*
414
- Let's start with user registration. This will involve creating database models, API endpoints, and frontend forms that integrate with your existing authentication system.
415
-
416
- &lt;reasoning&gt;
417
- The assistant used the todo list because:
418
- 1. The user provided multiple complex features to implement in a comma separated list
419
- 2. The todo list helps organize these large features into manageable tasks
420
- 3. This approach allows for tracking progress across the entire implementation
421
- &lt;/reasoning&gt;
422
- &lt;/example&gt;
423
-
424
- &lt;example&gt;
425
- User: Can you help optimize my React application? It's rendering slowly and has performance issues.
426
- Assistant: *Reviews component structure, render patterns, state management, and data fetching*
427
- After analyzing your codebase, I've identified several performance issues.
428
- *Creates todo list with items like: 1) Implementing memoization for expensive calculations in ProductList, 2) Adding virtualization for long lists in Dashboard, 3) Optimizing image loading in Gallery component, 4) Fixing state update loops in ShoppingCart, 5) Reviewing bundle size and implementing code splitting*
429
- Let's start by implementing memoization for the expensive calculations in your ProductList component.
430
-
431
- &lt;reasoning&gt;
432
- The assistant used the todo list because:
433
- 1. First, the assistant examined the codebase to identify specific performance issues
434
- 2. Based on this analysis, it identified multiple optimization opportunities
435
- 3. Performance optimization is a non-trivial task requiring multiple steps
436
- 4. The todo list helps methodically track improvements across different components
437
- 5. This systematic approach ensures all performance bottlenecks are addressed
438
- &lt;/reasoning&gt;
439
- &lt;/example&gt;
440
-
441
- ## Examples of When NOT to Use the Todo List
442
-
443
- &lt;example&gt;
444
- User: How do I print 'Hello World' in Python?
445
- Assistant: In Python, you can print &quot;Hello World&quot; with this simple code:
446
-
447
- python
448
- print(&quot;Hello World&quot;)
449
-
450
- This will output the text &quot;Hello World&quot; to the console when executed.
451
-
452
- &lt;reasoning&gt;
453
- The assistant did not use the todo list because this is a single, trivial task that can be completed in one step. There's no need to track multiple tasks or steps for such a straightforward request.
454
- &lt;/reasoning&gt;
455
- &lt;/example&gt;
456
-
457
- &lt;example&gt;
458
- User: What does the git status command do?
459
- Assistant: The git status command shows the current state of your working directory and staging area. It displays which changes have been staged, which haven't, and which files aren't being tracked by Git. This is a fundamental command for understanding the current state of your repository before making commits.
460
-
461
- &lt;reasoning&gt;
462
- The assistant did not use the todo list because this is an informational request with no actual coding task to complete. The user is simply asking for an explanation, not for the assistant to perform multiple steps or tasks.
463
- &lt;/reasoning&gt;
464
- &lt;/example&gt;
465
-
466
- &lt;example&gt;
467
- User: Can you add a comment to the calculateTotal function to explain what it does?
468
- Assistant: Sure, let me add a comment to the calculateTotal function to explain what it does.
469
- * Uses the ${FILE_EDIT_TOOL_NAME} tool to add a comment to the calculateTotal function *
470
-
471
- &lt;reasoning&gt;
472
- The assistant did not use the todo list because this is a single, straightforward task confined to one location in the code. Adding a comment doesn't require tracking multiple steps or systematic organization.
473
- &lt;/reasoning&gt;
474
- &lt;/example&gt;
475
-
476
- &lt;example&gt;
477
- User: Run npm install for me and tell me what happens.
478
- Assistant: I'll run the npm install command for you.
479
-
480
- *Executes: npm install*
481
-
482
- The command completed successfully. Here's the output:
483
- [Output of npm install command]
484
-
485
- All dependencies have been installed according to your package.json file.
486
-
487
- &lt;reasoning&gt;
488
- The assistant did not use the todo list because this is a single command execution with immediate results. There are no multiple steps to track or organize, making the todo list unnecessary for this straightforward task.
489
- &lt;/reasoning&gt;
490
- &lt;/example&gt;
491
-
492
- ## Task States and Management
493
-
494
- 1. **Task States**: Use these states to track progress:
495
- - pending: Task not yet started
496
- - in_progress: Currently working on (limit to ONE task at a time)
497
- - completed: Task finished successfully
498
-
499
- **IMPORTANT**: Task descriptions must have two forms:
500
- - content: The imperative form describing what needs to be done (e.g., &quot;Run tests&quot;, &quot;Build the project&quot;)
501
- - activeForm: The present continuous form shown during execution (e.g., &quot;Running tests&quot;, &quot;Building the project&quot;)
502
-
503
- 2. **Task Management**:
504
- - Update task status in real-time as you work
505
- - Mark tasks complete IMMEDIATELY after finishing (don't batch completions)
506
- - Exactly ONE task must be in_progress at any time (not less, not more)
507
- - Complete current tasks before starting new ones
508
- - Remove tasks that are no longer relevant from the list entirely
509
-
510
- 3. **Task Completion Requirements**:
511
- - ONLY mark a task as completed when you have FULLY accomplished it
512
- - If you encounter errors, blockers, or cannot finish, keep the task as in_progress
513
- - When blocked, create a new task describing what needs to be resolved
514
- - Never mark a task as completed if:
515
- - Tests are failing
516
- - Implementation is partial
517
- - You encountered unresolved errors
518
- - You couldn't find necessary files or dependencies
519
-
520
- 4. **Task Breakdown**:
521
- - Create specific, actionable items
522
- - Break complex tasks into smaller, manageable steps
523
- - Use clear, descriptive task names
524
- - Always provide both forms:
525
- - content: &quot;Fix authentication bug&quot;
526
- - activeForm: &quot;Fixing authentication bug&quot;
527
-
528
- When in doubt, use this tool. Being proactive with task management demonstrates attentiveness and ensures you complete all requirements successfully.</div>
529
- </details>
530
- </div>
531
-
532
- <style>
533
- .tool-prompts details {
534
- background: var(--bg-card);
535
- border: 1px solid var(--border-subtle);
536
- border-radius: 8px;
537
- margin: 0.5rem 0;
538
- padding: 0.75rem 1rem;
539
- }
540
- .tool-prompts summary { cursor: pointer; font-weight: 600; font-size: var(--text-sm); }
541
- .prompt-box {
542
- background: var(--code-bg);
543
- border: 1px solid var(--code-border);
544
- border-radius: 6px;
545
- padding: 1rem;
546
- margin: 0.75rem 0;
547
- font-family: var(--font-mono);
548
- font-size: var(--text-xs);
549
- line-height: 1.6;
550
- color: var(--code-text);
551
- white-space: pre-wrap;
552
- overflow-x: auto;
553
- }
554
- </style>
555
-
556
- </main></div>
557
- </div>
558
- </body>
559
- </html>
@@ -1,86 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Troubleshooting — Clew Code</title>
7
- <meta name="description" href="Common issues and solutions for Clew Code.">
8
- <link rel="icon" type="image/svg+xml" href="assets/clew.svg">
9
- <link rel="preconnect" href="https://fonts.googleapis.com">
10
- <link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
11
- <link rel="stylesheet" href="css/styles.css">
12
- </head>
13
- <body>
14
- <header class="header"></header>
15
- <div id="sidebarOverlay" class="sidebar-overlay"></div>
16
- <aside id="sidebar" class="sidebar"></aside>
17
-
18
- <div class="content-wrap">
19
- <div class="content">
20
-
21
- <div class="breadcrumbs"><a href="index.html">Home</a><span class="sep">/</span><span class="current">Troubleshooting</span></div>
22
-
23
- <h1>Troubleshooting</h1>
24
-
25
- <h2 id="no-provider">No Provider Configured</h2>
26
- <p>If Clew doesn't start, set at least one provider API key in your environment:</p>
27
- <pre><code class="language-bash">export ANTHROPIC_API_KEY=sk-ant-...
28
- clew
29
- </code></pre>
30
- <p>Or use the <code>/model</code> command inside the REPL to switch providers.</p>
31
-
32
- <h2 id="build-errors">Build Errors on Windows</h2>
33
- <pre><code class="language-powershell">Remove-Item -Recurse -Force node_modules
34
- bun install
35
- bun run dev
36
- </code></pre>
37
-
38
- <h2 id="peer-connectivity">Peer / Peer Discovery Not Working</h2>
39
- <ul>
40
- <li>Ensure both instances are on the same LAN</li>
41
- <li>Check that UDP multicast is not blocked by your firewall</li>
42
- <li>Run <code>/peer discover</code> with a longer timeout</li>
43
- <li>Try sharing via file registry: <code>/peer share</code></li>
44
- </ul>
45
-
46
- <h2 id="mcp-connection">MCP Server Connection Failures</h2>
47
- <ul>
48
- <li>Verify the server command exists (<code>which npx</code>, <code>which uvx</code>)</li>
49
- <li>Check <code>.mcp.json</code> syntax</li>
50
- <li>Run <code>/mcp list</code> to see all connected servers</li>
51
- <li>For SSE servers, verify the remote URL is reachable</li>
52
- </ul>
53
-
54
- <h2 id="context-limit">Context Limit Reached</h2>
55
- <p>Use the compact command to compress conversation history:</p>
56
- <pre><code class="language-bash">❯ /compact
57
- </code></pre>
58
- <p>This triggers the multi-pass context compaction system.</p>
59
-
60
- <h2 id="permission-denied">Permission Denied Errors</h2>
61
- <p>Switch to a permissive mode or configure allow rules:</p>
62
- <pre><code class="language-bash">❯ /permissions auto # auto-approve safe tools
63
- ❯ /permissions plan # full bypass for planning
64
- </code></pre>
65
- <p>See <a href="permission-model.html">Permission Model</a> for details.</p>
66
-
67
- <h2 id="provider-switch">Provider Switch Issues</h2>
68
- <ul>
69
- <li>Ensure the corresponding API key is set</li>
70
- <li>Some models have tool-calling limitations</li>
71
- <li>Run <code>/model list</code> to see available models with capability tags</li>
72
- </ul>
73
-
74
- <h2 id="logs">Getting Help</h2>
75
- <ul>
76
- <li>Run <code>/doctor</code> for system diagnostics</li>
77
- <li>Run <code>/status</code> for session info</li>
78
- <li>Check <code>.session/</code> for session logs</li>
79
- <li><a href="https://github.com/ClewCode/ClewCode/issues">Open a GitHub issue</a></li>
80
- </ul>
81
- </div>
82
- </div>
83
-
84
- <script src="js/main.js"></script>
85
- </body>
86
- </html>