@tecet/ollm 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +20 -14
- package/dist/cli.js.map +3 -3
- package/dist/services/documentService.d.ts.map +1 -1
- package/dist/services/documentService.js +12 -2
- package/dist/services/documentService.js.map +1 -1
- package/dist/ui/components/docs/DocsPanel.d.ts.map +1 -1
- package/dist/ui/components/docs/DocsPanel.js +1 -1
- package/dist/ui/components/docs/DocsPanel.js.map +1 -1
- package/dist/ui/components/launch/VersionBanner.js +1 -1
- package/dist/ui/components/launch/VersionBanner.js.map +1 -1
- package/dist/ui/components/layout/KeybindsLegend.d.ts.map +1 -1
- package/dist/ui/components/layout/KeybindsLegend.js +1 -1
- package/dist/ui/components/layout/KeybindsLegend.js.map +1 -1
- package/dist/ui/components/tabs/BugReportTab.js +1 -1
- package/dist/ui/components/tabs/BugReportTab.js.map +1 -1
- package/dist/ui/services/docsService.d.ts +12 -27
- package/dist/ui/services/docsService.d.ts.map +1 -1
- package/dist/ui/services/docsService.js +40 -67
- package/dist/ui/services/docsService.js.map +1 -1
- package/docs/README.md +3 -410
- package/package.json +10 -7
- package/scripts/copy-docs-to-user.cjs +34 -0
- package/docs/Context/CheckpointFlowDiagram.md +0 -673
- package/docs/Context/ContextArchitecture.md +0 -898
- package/docs/Context/ContextCompression.md +0 -1102
- package/docs/Context/ContextManagment.md +0 -750
- package/docs/Context/Index.md +0 -209
- package/docs/Context/README.md +0 -390
- package/docs/DevelopmentRoadmap/Index.md +0 -238
- package/docs/DevelopmentRoadmap/OLLM-CLI_Releases.md +0 -419
- package/docs/DevelopmentRoadmap/PlanedFeatures.md +0 -448
- package/docs/DevelopmentRoadmap/README.md +0 -174
- package/docs/DevelopmentRoadmap/Roadmap.md +0 -572
- package/docs/DevelopmentRoadmap/RoadmapVisual.md +0 -372
- package/docs/Hooks/Architecture.md +0 -885
- package/docs/Hooks/Index.md +0 -244
- package/docs/Hooks/KeyboardShortcuts.md +0 -248
- package/docs/Hooks/Protocol.md +0 -817
- package/docs/Hooks/README.md +0 -403
- package/docs/Hooks/UserGuide.md +0 -1483
- package/docs/Hooks/VisualGuide.md +0 -598
- package/docs/Index.md +0 -506
- package/docs/Installation.md +0 -586
- package/docs/Introduction.md +0 -367
- package/docs/LLM Models/Index.md +0 -239
- package/docs/LLM Models/LLM_GettingStarted.md +0 -748
- package/docs/LLM Models/LLM_Index.md +0 -701
- package/docs/LLM Models/LLM_MemorySystem.md +0 -337
- package/docs/LLM Models/LLM_ModelCompatibility.md +0 -499
- package/docs/LLM Models/LLM_ModelsArchitecture.md +0 -933
- package/docs/LLM Models/LLM_ModelsCommands.md +0 -839
- package/docs/LLM Models/LLM_ModelsConfiguration.md +0 -1094
- package/docs/LLM Models/LLM_ModelsList.md +0 -1071
- package/docs/LLM Models/LLM_ModelsList.md.backup +0 -400
- package/docs/LLM Models/README.md +0 -355
- package/docs/MCP/MCP_Architecture.md +0 -1086
- package/docs/MCP/MCP_Commands.md +0 -1111
- package/docs/MCP/MCP_GettingStarted.md +0 -590
- package/docs/MCP/MCP_Index.md +0 -524
- package/docs/MCP/MCP_Integration.md +0 -866
- package/docs/MCP/MCP_Marketplace.md +0 -160
- package/docs/MCP/README.md +0 -415
- package/docs/Prompts System/Architecture.md +0 -760
- package/docs/Prompts System/Index.md +0 -223
- package/docs/Prompts System/PromptsRouting.md +0 -1047
- package/docs/Prompts System/PromptsTemplates.md +0 -1102
- package/docs/Prompts System/README.md +0 -389
- package/docs/Prompts System/SystemPrompts.md +0 -856
- package/docs/Quickstart.md +0 -535
- package/docs/Tools/Architecture.md +0 -884
- package/docs/Tools/GettingStarted.md +0 -624
- package/docs/Tools/Index.md +0 -216
- package/docs/Tools/ManifestReference.md +0 -141
- package/docs/Tools/README.md +0 -440
- package/docs/Tools/UserGuide.md +0 -773
- package/docs/Troubleshooting.md +0 -1265
- package/docs/UI&Settings/Architecture.md +0 -729
- package/docs/UI&Settings/ColorASCII.md +0 -34
- package/docs/UI&Settings/Commands.md +0 -755
- package/docs/UI&Settings/Configuration.md +0 -872
- package/docs/UI&Settings/Index.md +0 -293
- package/docs/UI&Settings/Keybinds.md +0 -372
- package/docs/UI&Settings/README.md +0 -278
- package/docs/UI&Settings/Terminal.md +0 -637
- package/docs/UI&Settings/Themes.md +0 -604
- package/docs/UI&Settings/UIGuide.md +0 -550
package/docs/Tools/UserGuide.md
DELETED
|
@@ -1,773 +0,0 @@
|
|
|
1
|
-
# Tool System User Guide
|
|
2
|
-
|
|
3
|
-
**Complete Guide to Using Tools in OLLM CLI**
|
|
4
|
-
|
|
5
|
-
This guide covers everything you need to know about using tools for LLM-powered automation.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## 📋 Table of Contents
|
|
10
|
-
|
|
11
|
-
1. [Introduction](#introduction)
|
|
12
|
-
2. [Tool Basics](#tool-basics)
|
|
13
|
-
3. [Available Tools](#available-tools)
|
|
14
|
-
4. [Using Tools](#using-tools)
|
|
15
|
-
5. [Approval Modes](#approval-modes)
|
|
16
|
-
6. [Tool Categories](#tool-categories)
|
|
17
|
-
7. [Troubleshooting](#troubleshooting)
|
|
18
|
-
8. [Best Practices](#best-practices)
|
|
19
|
-
|
|
20
|
-
**See Also:**
|
|
21
|
-
|
|
22
|
-
- [Tool Architecture](Architecture.md) - Technical architecture
|
|
23
|
-
- [MCP Integration](../MCP/MCP_Integration.md) - MCP tool integration
|
|
24
|
-
- [Extension System](GettingStarted.md) - Extension tools
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
## Introduction
|
|
29
|
-
|
|
30
|
-
### What are Tools?
|
|
31
|
-
|
|
32
|
-
Tools are functions that the LLM can call to perform actions:
|
|
33
|
-
|
|
34
|
-
- **File Operations** - Read, write, edit files
|
|
35
|
-
- **Web Access** - Search internet, fetch URLs
|
|
36
|
-
- **Shell Commands** - Execute system commands
|
|
37
|
-
- **Memory** - Store and retrieve information
|
|
38
|
-
- **Goals** - Manage goals and decisions
|
|
39
|
-
|
|
40
|
-
### Why Use Tools?
|
|
41
|
-
|
|
42
|
-
**Benefits:**
|
|
43
|
-
|
|
44
|
-
- 🚀 Automation - LLM can perform actions automatically
|
|
45
|
-
- 🔍 Information Access - Access files, web, and data
|
|
46
|
-
- 💾 Persistence - Store information across sessions
|
|
47
|
-
- 🛡️ Safety - Permission-based approval system
|
|
48
|
-
- 🔧 Extensibility - Add custom tools via MCP
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
|
|
52
|
-
## Tool Basics
|
|
53
|
-
|
|
54
|
-
### How Tools Work
|
|
55
|
-
|
|
56
|
-
```
|
|
57
|
-
User Request
|
|
58
|
-
↓
|
|
59
|
-
LLM Analyzes Request
|
|
60
|
-
↓
|
|
61
|
-
LLM Selects Tool
|
|
62
|
-
↓
|
|
63
|
-
Permission Check
|
|
64
|
-
↓
|
|
65
|
-
User Approval (if needed)
|
|
66
|
-
↓
|
|
67
|
-
Tool Executes
|
|
68
|
-
↓
|
|
69
|
-
Result Returned to LLM
|
|
70
|
-
↓
|
|
71
|
-
LLM Responds to User
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### Tool Execution
|
|
75
|
-
|
|
76
|
-
**Automatic:**
|
|
77
|
-
|
|
78
|
-
- LLM decides when to use tools
|
|
79
|
-
- No explicit tool invocation needed
|
|
80
|
-
- Natural language requests
|
|
81
|
-
|
|
82
|
-
**Example:**
|
|
83
|
-
|
|
84
|
-
```
|
|
85
|
-
User: "What's in the README file?"
|
|
86
|
-
LLM: [Uses read_file tool]
|
|
87
|
-
LLM: "The README contains..."
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
### Tool Approval
|
|
91
|
-
|
|
92
|
-
Tools require approval based on risk level:
|
|
93
|
-
|
|
94
|
-
- **Low Risk** - Auto-approved (read operations)
|
|
95
|
-
- **Medium Risk** - Requires approval (write operations)
|
|
96
|
-
- **High Risk** - Always requires approval (shell commands)
|
|
97
|
-
|
|
98
|
-
---
|
|
99
|
-
|
|
100
|
-
## Available Tools
|
|
101
|
-
|
|
102
|
-
### File Discovery
|
|
103
|
-
|
|
104
|
-
| Tool | Description | Example |
|
|
105
|
-
| ------ | ----------------------- | -------------------------------- |
|
|
106
|
-
| `glob` | Find files by pattern | "Find all TypeScript files" |
|
|
107
|
-
| `ls` | List directory contents | "List files in src/" |
|
|
108
|
-
| `grep` | Search file contents | "Search for 'TODO' in all files" |
|
|
109
|
-
|
|
110
|
-
### File Operations
|
|
111
|
-
|
|
112
|
-
| Tool | Description | Example |
|
|
113
|
-
| ----------------- | ---------------------- | ------------------------------------ |
|
|
114
|
-
| `read_file` | Read single file | "Read README.md" |
|
|
115
|
-
| `read_many_files` | Read multiple files | "Read all config files" |
|
|
116
|
-
| `edit_file` | Edit file sections | "Update the version in package.json" |
|
|
117
|
-
| `write_file` | Create/overwrite files | "Create a new test file" |
|
|
118
|
-
|
|
119
|
-
### Web Tools
|
|
120
|
-
|
|
121
|
-
| Tool | Description | Example |
|
|
122
|
-
| ------------ | ----------------- | --------------------------------- |
|
|
123
|
-
| `web_search` | Search internet | "Search for React hooks tutorial" |
|
|
124
|
-
| `web_fetch` | Fetch URL content | "Fetch content from example.com" |
|
|
125
|
-
|
|
126
|
-
### Shell Tool
|
|
127
|
-
|
|
128
|
-
| Tool | Description | Example |
|
|
129
|
-
| ------- | ---------------- | -------------- |
|
|
130
|
-
| `shell` | Execute commands | "Run npm test" |
|
|
131
|
-
|
|
132
|
-
### Memory Tools
|
|
133
|
-
|
|
134
|
-
| Tool | Description | Example |
|
|
135
|
-
| ------------------- | --------------------- | -------------------------- |
|
|
136
|
-
| `memory` | Persistent memory | "Remember my API key" |
|
|
137
|
-
| `remember` | Simplified memory | "Remember this preference" |
|
|
138
|
-
| `write_memory_dump` | Context snapshot | "Save current context" |
|
|
139
|
-
| `read_reasoning` | Review past reasoning | "Show previous decisions" |
|
|
140
|
-
|
|
141
|
-
### Goal Tools
|
|
142
|
-
|
|
143
|
-
| Tool | Description | Example |
|
|
144
|
-
| ------------------- | ------------------ | -------------------------------- |
|
|
145
|
-
| `create_goal` | Create new goal | "Create goal for refactoring" |
|
|
146
|
-
| `switch_goal` | Switch active goal | "Switch to testing goal" |
|
|
147
|
-
| `complete_goal` | Mark goal complete | "Complete refactoring goal" |
|
|
148
|
-
| `create_checkpoint` | Create checkpoint | "Create checkpoint for progress" |
|
|
149
|
-
| `record_decision` | Record decision | "Record decision to use React" |
|
|
150
|
-
|
|
151
|
-
---
|
|
152
|
-
|
|
153
|
-
## Using Tools
|
|
154
|
-
|
|
155
|
-
### Natural Language Requests
|
|
156
|
-
|
|
157
|
-
Simply ask the LLM to perform actions:
|
|
158
|
-
|
|
159
|
-
**File Operations:**
|
|
160
|
-
|
|
161
|
-
```
|
|
162
|
-
"Read the package.json file"
|
|
163
|
-
"Show me all TypeScript files in src/"
|
|
164
|
-
"Update the version number in package.json to 2.0.0"
|
|
165
|
-
"Create a new file called test.ts with a basic test"
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
**Web Access:**
|
|
169
|
-
|
|
170
|
-
```
|
|
171
|
-
"Search for the latest React documentation"
|
|
172
|
-
"Fetch the content from https://example.com/api"
|
|
173
|
-
"Find tutorials about TypeScript generics"
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
**Shell Commands:**
|
|
177
|
-
|
|
178
|
-
```
|
|
179
|
-
"Run npm install"
|
|
180
|
-
"Execute the test suite"
|
|
181
|
-
"Check git status"
|
|
182
|
-
"Build the project"
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
**Memory:**
|
|
186
|
-
|
|
187
|
-
```
|
|
188
|
-
"Remember that I prefer tabs over spaces"
|
|
189
|
-
"What did I say about the API design?"
|
|
190
|
-
"Save this conversation for later"
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
**Goals:**
|
|
194
|
-
|
|
195
|
-
```
|
|
196
|
-
"Create a goal to refactor the authentication system"
|
|
197
|
-
"Switch to the testing goal"
|
|
198
|
-
"Mark the refactoring goal as complete"
|
|
199
|
-
"Record the decision to use PostgreSQL"
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
### Tool Approval
|
|
203
|
-
|
|
204
|
-
When a tool requires approval, you'll see:
|
|
205
|
-
|
|
206
|
-
```
|
|
207
|
-
🔧 Tool: write_file
|
|
208
|
-
📝 Action: Create file "test.ts"
|
|
209
|
-
📄 Content: [preview]
|
|
210
|
-
|
|
211
|
-
Approve? (y/n)
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
**Options:**
|
|
215
|
-
|
|
216
|
-
- `y` - Approve this execution
|
|
217
|
-
- `n` - Deny this execution
|
|
218
|
-
- `a` - Approve all (switch to YOLO mode)
|
|
219
|
-
- `s` - Skip and continue
|
|
220
|
-
|
|
221
|
-
---
|
|
222
|
-
|
|
223
|
-
## Approval Modes
|
|
224
|
-
|
|
225
|
-
### YOLO Mode
|
|
226
|
-
|
|
227
|
-
**Description:** Auto-approve all tools
|
|
228
|
-
|
|
229
|
-
**Use When:**
|
|
230
|
-
|
|
231
|
-
- You trust the LLM completely
|
|
232
|
-
- Working on non-critical tasks
|
|
233
|
-
- Maximum speed needed
|
|
234
|
-
|
|
235
|
-
**Risks:**
|
|
236
|
-
|
|
237
|
-
- No safety checks
|
|
238
|
-
- Potential for mistakes
|
|
239
|
-
- Irreversible actions
|
|
240
|
-
|
|
241
|
-
**Enable:**
|
|
242
|
-
|
|
243
|
-
```bash
|
|
244
|
-
/config set approvalMode YOLO
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
### AUTO Mode (Recommended)
|
|
248
|
-
|
|
249
|
-
**Description:** Auto-approve safe tools, ask for dangerous ones
|
|
250
|
-
|
|
251
|
-
**Use When:**
|
|
252
|
-
|
|
253
|
-
- Normal development work
|
|
254
|
-
- Balanced safety and speed
|
|
255
|
-
- Most use cases
|
|
256
|
-
|
|
257
|
-
**Behavior:**
|
|
258
|
-
|
|
259
|
-
- ✅ Auto-approve: Read operations, web search
|
|
260
|
-
- ❌ Require approval: Write operations, shell commands
|
|
261
|
-
|
|
262
|
-
**Enable:**
|
|
263
|
-
|
|
264
|
-
```bash
|
|
265
|
-
/config set approvalMode AUTO
|
|
266
|
-
```
|
|
267
|
-
|
|
268
|
-
### ASK Mode
|
|
269
|
-
|
|
270
|
-
**Description:** Confirm every tool
|
|
271
|
-
|
|
272
|
-
**Use When:**
|
|
273
|
-
|
|
274
|
-
- Learning the system
|
|
275
|
-
- Working with critical data
|
|
276
|
-
- Maximum safety needed
|
|
277
|
-
|
|
278
|
-
**Behavior:**
|
|
279
|
-
|
|
280
|
-
- ❌ Require approval: All tools
|
|
281
|
-
|
|
282
|
-
**Enable:**
|
|
283
|
-
|
|
284
|
-
```bash
|
|
285
|
-
/config set approvalMode ASK
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
---
|
|
289
|
-
|
|
290
|
-
## Tool Categories
|
|
291
|
-
|
|
292
|
-
### File Discovery Tools
|
|
293
|
-
|
|
294
|
-
**Purpose:** Find and locate files
|
|
295
|
-
|
|
296
|
-
**Tools:**
|
|
297
|
-
|
|
298
|
-
- `glob` - Pattern matching (wildcards, .gitignore aware)
|
|
299
|
-
- `ls` - Directory listing (recursive, sizes, permissions)
|
|
300
|
-
- `grep` - Content search (regex, case-sensitive/insensitive)
|
|
301
|
-
|
|
302
|
-
**Examples:**
|
|
303
|
-
|
|
304
|
-
```
|
|
305
|
-
"Find all JavaScript files"
|
|
306
|
-
"List files in the src directory"
|
|
307
|
-
"Search for 'TODO' comments in all files"
|
|
308
|
-
"Find files modified in the last week"
|
|
309
|
-
```
|
|
310
|
-
|
|
311
|
-
**Risk Level:** Low (read-only)
|
|
312
|
-
**Auto-Approve:** ✅ Yes (in AUTO mode)
|
|
313
|
-
|
|
314
|
-
### File Operations Tools
|
|
315
|
-
|
|
316
|
-
**Purpose:** Read and write files
|
|
317
|
-
|
|
318
|
-
**Tools:**
|
|
319
|
-
|
|
320
|
-
- `read_file` - Read single file (line ranges, large file handling)
|
|
321
|
-
- `read_many_files` - Read multiple files (batch reading)
|
|
322
|
-
- `edit_file` - Edit file sections (search-replace, diff preview)
|
|
323
|
-
- `write_file` - Create/overwrite files (creates directories)
|
|
324
|
-
|
|
325
|
-
**Examples:**
|
|
326
|
-
|
|
327
|
-
```
|
|
328
|
-
"Read the README file"
|
|
329
|
-
"Show me the first 10 lines of app.ts"
|
|
330
|
-
"Update the version in package.json"
|
|
331
|
-
"Create a new component file"
|
|
332
|
-
```
|
|
333
|
-
|
|
334
|
-
**Risk Level:**
|
|
335
|
-
|
|
336
|
-
- Read: Low
|
|
337
|
-
- Write: Medium
|
|
338
|
-
|
|
339
|
-
**Auto-Approve:**
|
|
340
|
-
|
|
341
|
-
- Read: ✅ Yes (in AUTO mode)
|
|
342
|
-
- Write: ❌ No (requires approval)
|
|
343
|
-
|
|
344
|
-
### Web Tools
|
|
345
|
-
|
|
346
|
-
**Purpose:** Access web resources
|
|
347
|
-
|
|
348
|
-
**Tools:**
|
|
349
|
-
|
|
350
|
-
- `web_search` - Search internet (multiple results, snippets)
|
|
351
|
-
- `web_fetch` - Fetch URL content (various content types, redirects)
|
|
352
|
-
|
|
353
|
-
**Examples:**
|
|
354
|
-
|
|
355
|
-
```
|
|
356
|
-
"Search for React hooks documentation"
|
|
357
|
-
"Fetch the content from example.com/api"
|
|
358
|
-
"Find the latest TypeScript release notes"
|
|
359
|
-
"Get the HTML from this URL"
|
|
360
|
-
```
|
|
361
|
-
|
|
362
|
-
**Risk Level:** Low (read-only)
|
|
363
|
-
**Auto-Approve:** ✅ Yes (in AUTO mode)
|
|
364
|
-
|
|
365
|
-
### Shell Tool
|
|
366
|
-
|
|
367
|
-
**Purpose:** Execute shell commands
|
|
368
|
-
|
|
369
|
-
**Tool:**
|
|
370
|
-
|
|
371
|
-
- `shell` - Execute commands (streams output, env vars)
|
|
372
|
-
|
|
373
|
-
**Examples:**
|
|
374
|
-
|
|
375
|
-
```
|
|
376
|
-
"Run npm test"
|
|
377
|
-
"Execute git status"
|
|
378
|
-
"Build the project with npm run build"
|
|
379
|
-
"Check the Node.js version"
|
|
380
|
-
```
|
|
381
|
-
|
|
382
|
-
**Risk Level:** High (can modify system)
|
|
383
|
-
**Auto-Approve:** ❌ No (always requires approval unless YOLO)
|
|
384
|
-
|
|
385
|
-
**Note:** Shell tool UI enhancement planned (collapsible terminal with visual indicators).
|
|
386
|
-
|
|
387
|
-
### Memory & Context Tools
|
|
388
|
-
|
|
389
|
-
**Purpose:** Store and retrieve information
|
|
390
|
-
|
|
391
|
-
**Tools:**
|
|
392
|
-
|
|
393
|
-
- `memory` - Persistent memory (survives sessions, searchable)
|
|
394
|
-
- `remember` - Simplified memory (quick storage)
|
|
395
|
-
- `write_memory_dump` - Context snapshot (debugging, backup)
|
|
396
|
-
- `read_reasoning` - Review past reasoning (conversation history)
|
|
397
|
-
|
|
398
|
-
**Examples:**
|
|
399
|
-
|
|
400
|
-
```
|
|
401
|
-
"Remember that I prefer TypeScript over JavaScript"
|
|
402
|
-
"What did I say about the database design?"
|
|
403
|
-
"Save the current context for later"
|
|
404
|
-
"Show me the reasoning from the last session"
|
|
405
|
-
```
|
|
406
|
-
|
|
407
|
-
**Risk Level:** Low (data storage)
|
|
408
|
-
**Auto-Approve:** ✅ Yes (in AUTO mode)
|
|
409
|
-
|
|
410
|
-
### Goal Management Tools
|
|
411
|
-
|
|
412
|
-
**Purpose:** Manage goals and decisions
|
|
413
|
-
|
|
414
|
-
**Tools:**
|
|
415
|
-
|
|
416
|
-
- `create_goal` - Create new goal
|
|
417
|
-
- `switch_goal` - Switch active goal
|
|
418
|
-
- `complete_goal` - Mark goal complete
|
|
419
|
-
- `create_checkpoint` - Create goal checkpoint
|
|
420
|
-
- `record_decision` - Record decision with rationale
|
|
421
|
-
|
|
422
|
-
**Examples:**
|
|
423
|
-
|
|
424
|
-
```
|
|
425
|
-
"Create a goal to refactor the authentication system"
|
|
426
|
-
"Switch to the testing goal"
|
|
427
|
-
"Mark the refactoring goal as complete"
|
|
428
|
-
"Create a checkpoint for the current progress"
|
|
429
|
-
"Record the decision to use PostgreSQL with rationale"
|
|
430
|
-
```
|
|
431
|
-
|
|
432
|
-
**Risk Level:** Low (metadata)
|
|
433
|
-
**Auto-Approve:** ✅ Yes (in AUTO mode)
|
|
434
|
-
|
|
435
|
-
**See:** Goal system documentation for more details
|
|
436
|
-
|
|
437
|
-
---
|
|
438
|
-
|
|
439
|
-
## Troubleshooting
|
|
440
|
-
|
|
441
|
-
### Tools Not Working
|
|
442
|
-
|
|
443
|
-
**Symptom:** LLM doesn't use tools, only provides advice
|
|
444
|
-
|
|
445
|
-
**Possible Causes:**
|
|
446
|
-
|
|
447
|
-
1. Tools not passed to provider (known issue)
|
|
448
|
-
2. Approval mode blocking tools
|
|
449
|
-
3. Tool not registered
|
|
450
|
-
|
|
451
|
-
**Solutions:**
|
|
452
|
-
|
|
453
|
-
**Check approval mode:**
|
|
454
|
-
|
|
455
|
-
```bash
|
|
456
|
-
/config get approvalMode
|
|
457
|
-
# Should be AUTO or YOLO for automatic tool use
|
|
458
|
-
```
|
|
459
|
-
|
|
460
|
-
**Check if tools are registered:**
|
|
461
|
-
|
|
462
|
-
```bash
|
|
463
|
-
/tools list
|
|
464
|
-
# Should show available tools
|
|
465
|
-
```
|
|
466
|
-
|
|
467
|
-
**Known Issue:** Tools not being passed to provider
|
|
468
|
-
**Status:** Fix in progress (see Architecture doc)
|
|
469
|
-
|
|
470
|
-
### Tool Execution Fails
|
|
471
|
-
|
|
472
|
-
**Symptom:** Tool call returns error
|
|
473
|
-
|
|
474
|
-
**Possible Causes:**
|
|
475
|
-
|
|
476
|
-
1. Invalid parameters
|
|
477
|
-
2. Permission denied
|
|
478
|
-
3. File not found
|
|
479
|
-
4. Network error
|
|
480
|
-
|
|
481
|
-
**Solutions:**
|
|
482
|
-
|
|
483
|
-
**Check error message:**
|
|
484
|
-
|
|
485
|
-
- Read the error carefully
|
|
486
|
-
- Verify parameters are correct
|
|
487
|
-
- Check file paths exist
|
|
488
|
-
- Verify network connectivity
|
|
489
|
-
|
|
490
|
-
**Try manual execution:**
|
|
491
|
-
|
|
492
|
-
```bash
|
|
493
|
-
# Test the operation manually
|
|
494
|
-
cat README.md # Instead of read_file
|
|
495
|
-
ls src/ # Instead of ls tool
|
|
496
|
-
```
|
|
497
|
-
|
|
498
|
-
**Check permissions:**
|
|
499
|
-
|
|
500
|
-
```bash
|
|
501
|
-
# Verify file permissions
|
|
502
|
-
ls -la file.txt
|
|
503
|
-
|
|
504
|
-
# Verify directory permissions
|
|
505
|
-
ls -la directory/
|
|
506
|
-
```
|
|
507
|
-
|
|
508
|
-
### Permission Denied
|
|
509
|
-
|
|
510
|
-
**Symptom:** Tool execution blocked by policy engine
|
|
511
|
-
|
|
512
|
-
**Possible Causes:**
|
|
513
|
-
|
|
514
|
-
1. Approval mode is ASK
|
|
515
|
-
2. Tool is high risk
|
|
516
|
-
3. User denied approval
|
|
517
|
-
|
|
518
|
-
**Solutions:**
|
|
519
|
-
|
|
520
|
-
**Change approval mode:**
|
|
521
|
-
|
|
522
|
-
```bash
|
|
523
|
-
# Switch to AUTO mode
|
|
524
|
-
/config set approvalMode AUTO
|
|
525
|
-
|
|
526
|
-
# Or YOLO mode (use with caution)
|
|
527
|
-
/config set approvalMode YOLO
|
|
528
|
-
```
|
|
529
|
-
|
|
530
|
-
**Approve manually:**
|
|
531
|
-
|
|
532
|
-
- When prompted, press `y` to approve
|
|
533
|
-
- Or press `a` to approve all
|
|
534
|
-
|
|
535
|
-
**Review tool risk:**
|
|
536
|
-
|
|
537
|
-
- Read operations: Low risk
|
|
538
|
-
- Write operations: Medium risk
|
|
539
|
-
- Shell commands: High risk
|
|
540
|
-
|
|
541
|
-
---
|
|
542
|
-
|
|
543
|
-
## Best Practices
|
|
544
|
-
|
|
545
|
-
### Tool Usage
|
|
546
|
-
|
|
547
|
-
**Do:**
|
|
548
|
-
|
|
549
|
-
- ✅ Use natural language requests
|
|
550
|
-
- ✅ Let LLM choose appropriate tools
|
|
551
|
-
- ✅ Review tool actions before approval
|
|
552
|
-
- ✅ Use AUTO mode for balanced safety
|
|
553
|
-
- ✅ Check tool results
|
|
554
|
-
|
|
555
|
-
**Don't:**
|
|
556
|
-
|
|
557
|
-
- ❌ Manually invoke tools (let LLM decide)
|
|
558
|
-
- ❌ Use YOLO mode on critical data
|
|
559
|
-
- ❌ Ignore approval prompts
|
|
560
|
-
- ❌ Approve without reading
|
|
561
|
-
|
|
562
|
-
### Approval Management
|
|
563
|
-
|
|
564
|
-
**Do:**
|
|
565
|
-
|
|
566
|
-
- ✅ Use AUTO mode for most work
|
|
567
|
-
- ✅ Use ASK mode when learning
|
|
568
|
-
- ✅ Review dangerous operations
|
|
569
|
-
- ✅ Switch modes as needed
|
|
570
|
-
|
|
571
|
-
**Don't:**
|
|
572
|
-
|
|
573
|
-
- ❌ Stay in YOLO mode permanently
|
|
574
|
-
- ❌ Approve blindly
|
|
575
|
-
- ❌ Ignore risk warnings
|
|
576
|
-
|
|
577
|
-
### File Operations
|
|
578
|
-
|
|
579
|
-
**Do:**
|
|
580
|
-
|
|
581
|
-
- ✅ Backup important files first
|
|
582
|
-
- ✅ Review diffs before approval
|
|
583
|
-
- ✅ Use version control
|
|
584
|
-
- ✅ Test on non-critical files first
|
|
585
|
-
|
|
586
|
-
**Don't:**
|
|
587
|
-
|
|
588
|
-
- ❌ Modify critical files without backup
|
|
589
|
-
- ❌ Approve large file changes without review
|
|
590
|
-
- ❌ Work without version control
|
|
591
|
-
|
|
592
|
-
### Shell Commands
|
|
593
|
-
|
|
594
|
-
**Do:**
|
|
595
|
-
|
|
596
|
-
- ✅ Review commands before approval
|
|
597
|
-
- ✅ Understand what commands do
|
|
598
|
-
- ✅ Use safe commands when possible
|
|
599
|
-
- ✅ Check command output
|
|
600
|
-
|
|
601
|
-
**Don't:**
|
|
602
|
-
|
|
603
|
-
- ❌ Approve dangerous commands (rm -rf)
|
|
604
|
-
- ❌ Run commands you don't understand
|
|
605
|
-
- ❌ Use YOLO mode with shell tool
|
|
606
|
-
- ❌ Ignore error messages
|
|
607
|
-
|
|
608
|
-
---
|
|
609
|
-
|
|
610
|
-
## Examples
|
|
611
|
-
|
|
612
|
-
### Example 1: File Operations
|
|
613
|
-
|
|
614
|
-
**Scenario:** Read and update a configuration file
|
|
615
|
-
|
|
616
|
-
```
|
|
617
|
-
User: "Read the package.json file"
|
|
618
|
-
|
|
619
|
-
LLM: [Uses read_file tool]
|
|
620
|
-
LLM: "The package.json contains..."
|
|
621
|
-
|
|
622
|
-
User: "Update the version to 2.0.0"
|
|
623
|
-
|
|
624
|
-
LLM: [Uses edit_file tool]
|
|
625
|
-
🔧 Tool: edit_file
|
|
626
|
-
📝 Action: Update version in package.json
|
|
627
|
-
📄 Changes: "version": "1.0.0" → "version": "2.0.0"
|
|
628
|
-
|
|
629
|
-
Approve? (y/n) y
|
|
630
|
-
|
|
631
|
-
LLM: "Version updated to 2.0.0"
|
|
632
|
-
```
|
|
633
|
-
|
|
634
|
-
### Example 2: Web Research
|
|
635
|
-
|
|
636
|
-
**Scenario:** Research and summarize information
|
|
637
|
-
|
|
638
|
-
```
|
|
639
|
-
User: "Search for React hooks best practices"
|
|
640
|
-
|
|
641
|
-
LLM: [Uses web_search tool]
|
|
642
|
-
LLM: "I found several resources about React hooks best practices..."
|
|
643
|
-
|
|
644
|
-
User: "Fetch the content from the first result"
|
|
645
|
-
|
|
646
|
-
LLM: [Uses web_fetch tool]
|
|
647
|
-
LLM: "Here's a summary of the best practices..."
|
|
648
|
-
```
|
|
649
|
-
|
|
650
|
-
### Example 3: Development Workflow
|
|
651
|
-
|
|
652
|
-
**Scenario:** Run tests and fix issues
|
|
653
|
-
|
|
654
|
-
```
|
|
655
|
-
User: "Run the test suite"
|
|
656
|
-
|
|
657
|
-
LLM: [Uses shell tool]
|
|
658
|
-
🔧 Tool: shell
|
|
659
|
-
📝 Command: npm test
|
|
660
|
-
|
|
661
|
-
Approve? (y/n) y
|
|
662
|
-
|
|
663
|
-
LLM: "Tests failed with 2 errors..."
|
|
664
|
-
|
|
665
|
-
User: "Show me the failing test file"
|
|
666
|
-
|
|
667
|
-
LLM: [Uses read_file tool]
|
|
668
|
-
LLM: "Here's the test file..."
|
|
669
|
-
|
|
670
|
-
User: "Fix the test"
|
|
671
|
-
|
|
672
|
-
LLM: [Uses edit_file tool]
|
|
673
|
-
🔧 Tool: edit_file
|
|
674
|
-
📝 Action: Fix test in test.ts
|
|
675
|
-
|
|
676
|
-
Approve? (y/n) y
|
|
677
|
-
|
|
678
|
-
LLM: "Test fixed. Run tests again?"
|
|
679
|
-
```
|
|
680
|
-
|
|
681
|
-
### Example 4: Goal Management
|
|
682
|
-
|
|
683
|
-
**Scenario:** Manage a refactoring goal
|
|
684
|
-
|
|
685
|
-
```
|
|
686
|
-
User: "Create a goal to refactor the authentication system"
|
|
687
|
-
|
|
688
|
-
LLM: [Uses create_goal tool]
|
|
689
|
-
LLM: "Goal created: Refactor authentication system"
|
|
690
|
-
|
|
691
|
-
User: "Record the decision to use JWT tokens"
|
|
692
|
-
|
|
693
|
-
LLM: [Uses record_decision tool]
|
|
694
|
-
LLM: "Decision recorded with rationale"
|
|
695
|
-
|
|
696
|
-
User: "Create a checkpoint for the current progress"
|
|
697
|
-
|
|
698
|
-
LLM: [Uses create_checkpoint tool]
|
|
699
|
-
LLM: "Checkpoint created"
|
|
700
|
-
|
|
701
|
-
User: "Mark the goal as complete"
|
|
702
|
-
|
|
703
|
-
LLM: [Uses complete_goal tool]
|
|
704
|
-
LLM: "Goal marked as complete"
|
|
705
|
-
```
|
|
706
|
-
|
|
707
|
-
---
|
|
708
|
-
|
|
709
|
-
## Advanced Usage
|
|
710
|
-
|
|
711
|
-
### Combining Tools
|
|
712
|
-
|
|
713
|
-
LLM can use multiple tools in sequence:
|
|
714
|
-
|
|
715
|
-
```
|
|
716
|
-
User: "Find all TODO comments and create a task list"
|
|
717
|
-
|
|
718
|
-
LLM: [Uses grep tool to find TODOs]
|
|
719
|
-
LLM: [Uses write_file tool to create task list]
|
|
720
|
-
LLM: "Created task list with 15 TODOs"
|
|
721
|
-
```
|
|
722
|
-
|
|
723
|
-
### Conditional Tool Use
|
|
724
|
-
|
|
725
|
-
LLM can decide whether to use tools based on context:
|
|
726
|
-
|
|
727
|
-
```
|
|
728
|
-
User: "If there are any errors in the logs, fix them"
|
|
729
|
-
|
|
730
|
-
LLM: [Uses grep tool to search logs]
|
|
731
|
-
LLM: "No errors found in logs"
|
|
732
|
-
# (No fix needed, no additional tools used)
|
|
733
|
-
```
|
|
734
|
-
|
|
735
|
-
### Tool Chaining
|
|
736
|
-
|
|
737
|
-
LLM can chain tools for complex workflows:
|
|
738
|
-
|
|
739
|
-
```
|
|
740
|
-
User: "Search for React documentation, fetch it, and summarize"
|
|
741
|
-
|
|
742
|
-
LLM: [Uses web_search tool]
|
|
743
|
-
LLM: [Uses web_fetch tool]
|
|
744
|
-
LLM: [Summarizes content]
|
|
745
|
-
LLM: "Here's a summary of React documentation..."
|
|
746
|
-
```
|
|
747
|
-
|
|
748
|
-
---
|
|
749
|
-
|
|
750
|
-
## Further Reading
|
|
751
|
-
|
|
752
|
-
### Documentation
|
|
753
|
-
|
|
754
|
-
- [Tool Architecture](Architecture.md) - Technical architecture
|
|
755
|
-
- [MCP Integration](../MCP/MCP_Integration.md) - MCP tool integration
|
|
756
|
-
- [Extension System](GettingStarted.md) - Extension tools
|
|
757
|
-
|
|
758
|
-
### Related Features
|
|
759
|
-
|
|
760
|
-
- [Hooks](../Hooks/UserGuide.md) - Hook system
|
|
761
|
-
- [MCP Servers](../MCP/MCP_GettingStarted.md) - MCP servers
|
|
762
|
-
- [Goals](dev_PromptSystem.md) - Goal management
|
|
763
|
-
|
|
764
|
-
### External Resources
|
|
765
|
-
|
|
766
|
-
- Tool Use Patterns (https://docs.anthropic.com/claude/docs/tool-use)
|
|
767
|
-
- JSON Schema (https://json-schema.org/)
|
|
768
|
-
|
|
769
|
-
---
|
|
770
|
-
|
|
771
|
-
**Last Updated:** 2026-01-26
|
|
772
|
-
**Version:** 0.1.0
|
|
773
|
-
**Next:** [Tool Architecture](Architecture.md)
|