docs(session_search): make user-configured default_mode load-bearing in schema

Smoke-test v2 surfaced that S13 (auxiliary.session_search.default_mode: summary)
went fast→guided 5/5 iterations instead of respecting the user's configured
summary default. The agent passed mode='fast' explicitly on every first call,
ignoring the config.

Root cause: the 'respect the configured default' guidance lived at the very
bottom of the schema description, after all the 'fast → guided is best' teaching.
The general guidance was louder than the user-preference clause.

Fix: hoist USER-CONFIGURED DEFAULT to the top of the description, framed as
something the agent should check FIRST. Strengthen the language: honour the
user's configured default on the first call unless the question shape
categorically requires a different mode. Don't override the user just because
the general guidance says fast→guided is best.

Replace the redundant bottom paragraph with a brief pointer to the top.

No code changes — schema description only. Tests still 99/99.
This commit is contained in:
yoniebans
2026-05-14 14:37:38 +02:00
parent 4f7e64c845
commit 71558e753d

View File

@@ -1168,7 +1168,18 @@ SESSION_SEARCH_SCHEMA = {
"description": (
"Search your long-term memory of past conversations, browse recent sessions, or drill "
"into a specific session. This is your recall -- every past session is searchable.\n\n"
"DEFAULT RECALL PATH: fast → guided.\n"
"USER-CONFIGURED DEFAULT (check this FIRST before picking a mode):\n"
" The user can configure their preferred default via "
"``auxiliary.session_search.default_mode`` in ~/.hermes/config.yaml. Accepted values: "
"``fast`` | ``summary``. When the user has set a default, **honour it on your first "
"call** unless the question shape categorically requires a different mode (e.g. "
"``guided`` only makes sense as a follow-up to anchors you already have). The user-"
"configured default expresses a deliberate cost/quality preference — fast for cheap "
"recall, summary for synthesised prose. Don't override it just because the schema's "
"general guidance below says fast→guided is usually best. The user has the better "
"context on which trade they want.\n"
" When no default is configured, fall through to the DEFAULT RECALL PATH below.\n\n"
"DEFAULT RECALL PATH (when the user hasn't configured a preference): fast → guided.\n"
" • mode='fast' (default starting move) — FTS5 snippets + 1 message of context, no LLM "
"call. ~10ms, ~1 KB per session. Use this for ANY recall question — discovery AND state "
"reconstruction. Returns session_id + match_message_id anchors you then drill into.\n"
@@ -1230,11 +1241,8 @@ SESSION_SEARCH_SCHEMA = {
"Browsing recent sessions: call with NO arguments to see what was worked on recently. "
"Returns titles, previews, timestamps. Zero LLM cost, instant. Start here when the user "
"asks 'what were we working on' or 'what did we do recently'.\n\n"
"The default mode is configurable per-user via ``auxiliary.session_search.default_mode`` "
"in ~/.hermes/config.yaml (``fast`` | ``summary``). When no mode is passed explicitly, "
"that user-configured value applies (then 'summary' as the final fallback for backward "
"compatibility). Respect the configured default — if a user set ``summary``, they made "
"that trade deliberately; if they set ``fast``, use fast without second-guessing.\n\n"
"(See USER-CONFIGURED DEFAULT at the top of this description for how the per-user "
"default_mode setting interacts with the guidance above.)\n\n"
"USE THIS PROACTIVELY when:\n"
"- **BEFORE reaching for `gh`, GitHub API, web search, or file inspection**: if the user "
"asks about the status of any project, branch, PR, design, or topic that's been worked on "