Use web_fetch for API documentation
This commit is contained in:
parent
6cb78aeb9c
commit
e54f494458
|
|
@ -80,7 +80,7 @@ Do not guess at API behavior. Do not rely on pattern matching from similar-looki
|
|||
|
||||
**Procedure:**
|
||||
1. Identify the specific API/framework/library in use (Qt, React, Go stdlib, etc.)
|
||||
2. If uncertain about any method, property, or behavior, fetch the official docs via `curl` or `shell`
|
||||
2. If uncertain about any method, property, or behavior, fetch the official docs via the `web_fetch` tool
|
||||
3. Read the relevant sections before implementing
|
||||
4. Cite what you learned when explaining your implementation
|
||||
|
||||
|
|
@ -92,15 +92,15 @@ Do not guess at API behavior. Do not rely on pattern matching from similar-looki
|
|||
- Working with positioning, layout, or scrolling APIs (these are notoriously tricky)
|
||||
|
||||
**How to fetch docs:**
|
||||
```bash
|
||||
```text
|
||||
# Qt documentation
|
||||
curl -s "https://doc.qt.io/qt-6/qml-qtquick-listview.html" | grep -A10 "methodName"
|
||||
web_fetch(url="https://doc.qt.io/qt-6/qml-qtquick-listview.html")
|
||||
|
||||
# Go stdlib
|
||||
go doc package.Function
|
||||
web_fetch(url="https://pkg.go.dev/std")
|
||||
|
||||
# MDN for web APIs
|
||||
curl -s "https://developer.mozilla.org/en-US/docs/Web/API/..."
|
||||
web_fetch(url="https://developer.mozilla.org/en-US/docs/Web/API/")
|
||||
```
|
||||
|
||||
This is not optional. Guessing at APIs wastes time, breaks code, and frustrates users.
|
||||
|
|
@ -32,7 +32,7 @@ The embedded `system_prompt.md` is identical for every agent profile. It contain
|
|||
- ~100 lines of **9P namespace reference** (session management, ctl commands, examples)
|
||||
- Large **tool-first table** mapping tasks→tools (lsp_*, gui_*, memory_*)
|
||||
- **Sandbox & Bypass** section
|
||||
- **API documentation fetching** section (curl examples)
|
||||
- **API documentation fetching** section (`web_fetch` examples)
|
||||
|
||||
Agents that can't run `ollie-9p` (copilot, librarian, explorer) pay the token cost for all of it. The model sees instructions about tools it doesn't have.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue