From 6b61ed6175ec196ec42b250850158244fd643c77 Mon Sep 17 00:00:00 2001 From: Oleksandr Kozachuk Date: Tue, 14 Jul 2026 12:43:01 +0200 Subject: [PATCH] tool clarity + luma is male: get_news preferred over web_search, sharper codex/websearch descriptions, luma he-pronouns --- fjerkroa_bot/codex.py | 2 +- fjerkroa_bot/news.py | 7 ++++--- fjerkroa_bot/websearch.py | 7 ++++--- specs/SPEC-014-codex.md | 4 ++-- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/fjerkroa_bot/codex.py b/fjerkroa_bot/codex.py index 06566e1..cacddaf 100644 --- a/fjerkroa_bot/codex.py +++ b/fjerkroa_bot/codex.py @@ -1,7 +1,7 @@ """Codex Mechanicus search tool (SPEC-014, FDB-019). Luma's own sacred archive — the Codex Mechanicus at binaric.tech — as a -function tool. She searches the codex index and answers Cult Mechanicus +function tool. He searches the codex index and answers Cult Mechanicus lore from real, sourced inscriptions instead of inventing it. The index is fetched over HTTPS (SSRF-guarded, size-bounded, cached in memory) and every field returned to the model is sanitized (SAF-03), because even diff --git a/fjerkroa_bot/news.py b/fjerkroa_bot/news.py index 1349843..1849080 100644 --- a/fjerkroa_bot/news.py +++ b/fjerkroa_bot/news.py @@ -191,9 +191,10 @@ class NewsPoster: GET_NEWS_TOOL = { "name": "get_news", - "description": "Fetch recent real-world news the bot has collected from its RSS feeds (local, national, world, sport, " - "culture). Use when someone asks what is new or what is happening, optionally about a topic or from a particular " - "source. Returns headlines with a short summary and a link to read more.", + "description": "Fetch news the bot has collected from its RSS feeds — this is the SAME news that gets posted in the " + "server's news channels (e.g. #news, #newsjp / ニュース). Use this FIRST, before web_search, for anything about " + "current news or about something someone saw in a news channel; filter by topic (a keyword, also matches the source " + "label) or by source. Returns headlines with a short summary and a link; follow up with fetch_url for the full text.", "parameters": { "type": "object", "properties": { diff --git a/fjerkroa_bot/websearch.py b/fjerkroa_bot/websearch.py index 36db165..a6c50f1 100644 --- a/fjerkroa_bot/websearch.py +++ b/fjerkroa_bot/websearch.py @@ -24,9 +24,10 @@ FETCH_TIMEOUT_S = 15 WEB_SEARCH_TOOL = { "name": "web_search", - "description": "Search the open web for current information when the user asks you to look something up and it is not " - "covered by game info (IGDB), the Codex, the news store, or a URL they pasted. Returns result titles, URLs, and a short " - "snippet; follow up with fetch_url on a result link for the full article.", + "description": "Search the open web for general information. Use ONLY when the answer is not in your own sources: for " + "the server's news use get_news, for Adeptus Mechanicus / Warhammer 40k lore use codex_search, for video-game facts use " + "the game tools, for a specific URL someone pasted use fetch_url. Returns result titles, URLs, and a short snippet; " + "follow up with fetch_url on a result link for the full article.", "parameters": { "type": "object", "properties": { diff --git a/specs/SPEC-014-codex.md b/specs/SPEC-014-codex.md index 27d1abe..302c709 100644 --- a/specs/SPEC-014-codex.md +++ b/specs/SPEC-014-codex.md @@ -1,8 +1,8 @@ # SPEC-014 — Codex Mechanicus search -Luma is an Adeptus Mechanicus tech-priest; her lore has a real home — +Luma is an Adeptus Mechanicus tech-priest; his lore has a real home — the priest's own Codex Mechanicus at `binaric.tech` (an Astro/MDX -archive, five tongues). A `codex_search` function tool lets her consult +archive, five tongues). A `codex_search` function tool lets him consult that archive and answer from sourced inscriptions instead of inventing lore. The index is public but still untrusted by the time it reaches a prompt: the fetch is SSRF-guarded (SPEC-011 shares `guard_url`),