From c51e5b2f68b573209a2f5e17e8c67ca14c3c5a64 Mon Sep 17 00:00:00 2001 From: javis-bot Date: Wed, 18 Nov 2026 01:50:16 +0900 Subject: [PATCH] fix(notes): say 'save' in the first 120 characters so the planner plans the note MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The planner and router read only the first 120 characters of a tool's description. personalNotes started by describing the notes, so for '앞으로 나한테는 짧게 대답해줘' the planner planned a plain reply and the answer promised to be brief from now on without saving anything. Eval (qwen3.6-35b-a3b, game PC): from-now-on cases 0/6 -> 6/6, the one-off and note-shapes-answer cases still pass (15/15). Co-Authored-By: Claude Opus 5.5 --- evals/test_personal_notes.py | 7 +++++-- src/jarvis/tools/builtin/personal_notes.py | 10 +++++----- src/jarvis/tools/builtin/personal_notes.spec.md | 5 ++++- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/evals/test_personal_notes.py b/evals/test_personal_notes.py index 1baadeb..2dc7237 100644 --- a/evals/test_personal_notes.py +++ b/evals/test_personal_notes.py @@ -69,8 +69,11 @@ class TestPersonalNotes: _, reply = _run(mock_config, eval_db, eval_dialogue_memory, "고양이는 하루에 몇 시간 자?") assert not _ends_with_roger(reply), reply - def test_asking_for_it_from_now_on_saves_a_note(self, mock_config, eval_db, eval_dialogue_memory): - backend, _ = _run(mock_config, eval_db, eval_dialogue_memory, "앞으로 나한테는 반말로 대답해") + # The second phrasing is from the field (2026-11-18): no note was saved but the answer said + # "from now on I will answer briefly". + @pytest.mark.parametrize("query", ["앞으로 나한테는 반말로 대답해", "자비스 앞으로 나한테는 짧게 대답해줘"]) + def test_asking_for_it_from_now_on_saves_a_note(self, mock_config, eval_db, eval_dialogue_memory, query): + backend, _ = _run(mock_config, eval_db, eval_dialogue_memory, query) adds = [kw for a, kw in backend.acts if a == "add"] assert adds and adds[0]["text"], backend.acts diff --git a/src/jarvis/tools/builtin/personal_notes.py b/src/jarvis/tools/builtin/personal_notes.py index c3035ee..4c0f7ab 100644 --- a/src/jarvis/tools/builtin/personal_notes.py +++ b/src/jarvis/tools/builtin/personal_notes.py @@ -30,11 +30,11 @@ class PersonalNotesTool(Tool): @property def description(self) -> str: return ( - "The person's standing instructions for how you answer them from now on, such as how to " - "address them or which units to use. Call it with action='add' only when they ask for " - "something to apply from now on (not for a one-off request), with text as one short " - "instruction in their language; list or delete them when asked. The saved instructions " - "are shown to you on every answer to this person." + "Save (action='add') how the person wants to be answered from now on: how to address " + "them, answer length, units. Use action='add' only when they ask for something to apply " + "from now on (not for a one-off request), with text as one short instruction in their " + "language; saying you will do it without this call saves nothing. List or delete them " + "when asked. The saved instructions are shown to you on every answer to this person." ) @property diff --git a/src/jarvis/tools/builtin/personal_notes.spec.md b/src/jarvis/tools/builtin/personal_notes.spec.md index 7189218..4ed3c91 100644 --- a/src/jarvis/tools/builtin/personal_notes.spec.md +++ b/src/jarvis/tools/builtin/personal_notes.spec.md @@ -12,7 +12,10 @@ it to add, list or delete them. without a backend, scheduled tasks) it is not offered and refuses. The backend acts for the person asking only. - **Saved only when asked to apply from now on.** The description tells the model to add a note - only for something the person wants from now on, never for a one-off request. + only for something the person wants from now on, never for a one-off request. Its first sentence + says to save (action='add'), because the router and the planner read only the first 120 + characters; when it only described the notes, the planner planned a plain reply and the answer + promised "from now on I will answer briefly" without saving anything (live 2026-11-18). - **Notes shape answers, never permissions.** The reply engine puts the asker's notes (`run_reply_engine(person_notes=...)`) in the system prompt inside a `` fence, labelled as the person's own preferences for how they are answered, to follow unless they conflict