From 2637b69c2c10a767411fdad88021b8377a1b86db Mon Sep 17 00:00:00 2001 From: ajet Date: Tue, 22 Sep 2026 11:49:16 -0900 Subject: [PATCH] proomptin' --- shared/tbd/agent/prompt.cljc | 6 +++--- src/tbd/agent/instructions.clj | 7 +++---- ui/src/tbd/ui/webmcp.cljs | 5 +++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/shared/tbd/agent/prompt.cljc b/shared/tbd/agent/prompt.cljc index 333a1bf..3263442 100644 --- a/shared/tbd/agent/prompt.cljc +++ b/shared/tbd/agent/prompt.cljc @@ -71,9 +71,9 @@ "they are watching, and what you do is done in front of them.\n" "\n" "The app has several pages, which the `navigate` tool lists. Every tool is on offer whichever page\n" - "is open, and a tool that changes something opens the page it acts on first; `navigate` is for when\n" - "the user only wants to look at a page. The `webmcp://app/state` resource says which page is open\n" - "and whether anyone is logged in.\n" + "is open, and a tool that changes something opens the page it acts on first, so you rarely need to\n" + "navigate yourself. It only moves you there: it does not read what a page holds, so use it when\n" + "the user wants to look at a page, not to check or refresh one.\n" "\n" act (work-it-out (str "- Chain calls without stopping. You need an id: list first, then act. Never invent an id, a\n" diff --git a/src/tbd/agent/instructions.clj b/src/tbd/agent/instructions.clj index 9fcf09e..9a1ef34 100644 --- a/src/tbd/agent/instructions.clj +++ b/src/tbd/agent/instructions.clj @@ -45,10 +45,9 @@ (seq tools) (str (if page " Its" "\n\nYour") " tools: " (str/join ", " (map :name tools)) ". The tools of other pages are offered once you navigate there.") - (seq state) (str "\n\nCurrent state of the page (JSON), refreshed on every message you get, so it is\n" - "always current — more current than anything said earlier in this conversation, any\n" - "tool result in it, or what you said before. Go by this, not an earlier result:\n" - "never call a tool just to read it, only to act:\n" (json/write-value-as-string state)))) + (seq state) (str "\n\nCurrent state of the page (JSON), current as of this message. Go by it, not an\n" + "earlier tool result or what you said before: never call a tool just to read it,\n" + "only to act:\n" (json/write-value-as-string state)))) (defn a2a "The A2A server's system prompt: an outside agent calling this app directly, not through a diff --git a/ui/src/tbd/ui/webmcp.cljs b/ui/src/tbd/ui/webmcp.cljs index 1bb6e9a..4ecc4a8 100644 --- a/ui/src/tbd/ui/webmcp.cljs +++ b/ui/src/tbd/ui/webmcp.cljs @@ -365,8 +365,9 @@ :input-schema (object-schema {} []) :handler whoami} {:name "navigate" - :description (str "Opens one of the pages of the app, as a click on its tab would, and returns the page " - "that is shown now (JSON). The pages are: " + :description (str "Opens one of the pages of the app, as a click on its tab would. It only moves you " + "there: it does not read what the page holds, so it is not a way to check or refresh " + "anything. The pages are: " (str/join ", " (map (fn [{:keys [id title login?]}] (str (name id) " (" title (when login? ", needs a login") ")")) pages/pages))