From e54f49445830f2d37c9225fbcf5acef45e6f6852 Mon Sep 17 00:00:00 2001 From: Ollie Agent Date: Sun, 16 Aug 2026 13:13:16 +0200 Subject: [PATCH] Use web_fetch for API documentation --- data/prompts/agent-coding.md | 10 +++++----- doc/prompt-audit.md | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/data/prompts/agent-coding.md b/data/prompts/agent-coding.md index 3e66a86..0ecc309 100644 --- a/data/prompts/agent-coding.md +++ b/data/prompts/agent-coding.md @@ -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. \ No newline at end of file diff --git a/doc/prompt-audit.md b/doc/prompt-audit.md index 75cb7b4..c6d3f5f 100644 --- a/doc/prompt-audit.md +++ b/doc/prompt-audit.md @@ -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.