feat(memory): strengthen default toolset instructions#3395
Merged
Conversation
Silence rule now names specific leaking phrases, adds a RECALL-first rule for context-dependent questions, a proactive STORE scan with secret hygiene, and two new categories (environment, correction). Assisted-By: Claude
rumpl
approved these changes
Jul 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The default
Instructions()in the memory toolset were written at a fairly high level of abstraction, making it easy for agents to leak tool usage into their replies or to skip recall when it would help. This PR ports the memory-handling lessons that were refined in theassistant/gordon.yamldoctrine and validated by theassistant/evals/memory-*.jsoneval suite into the shared toolset defaults, so every agent that uses the memory toolset benefits.The changes tighten four areas. First, the silence rule now lists the specific phrases to avoid ("I'll remember that", "stored", "saved", "noted", "I searched my memory") rather than a vague directive, which makes it actionable for an LLM rather than interpretable. Second, a RECALL-first rule instructs agents to call
search_memoriesbefore answering context-dependent or personal questions (e.g. "what's my name?"), with an explicit carve-out for greetings and self-contained informational questions so the tool is not overused. Third, a proactive STORE scan asks agents to check each user message for durable facts — including ones mentioned in passing — and to treat corrections as preferences rather than one-off overrides. Fourth, a secret-hygiene rule prevents storing secrets, tokens, or transient debugging details.Two categories ("environment" and "correction") were added to the suggested taxonomy to match the new behavioral rules. Gordon-specific persona rules (banned words, response styles, empty-prose mechanics) were deliberately excluded; those remain in
gordon.yamlwhere they belong.go test ./pkg/tools/builtin/memory/...passes with the updatedTestMemoryTool_Instructionsassertions, andgofmt/go vetare clean.