fix: improve MCP instructions directive discoverability#571
Merged
Conversation
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.
Summary
Add directive cross-reference to the Storing memories section, expand trigger phrases, and add directive management guidance (deletion, contradiction handling).
Fixes #564
Fixes #565
Root Cause
The MCP instructions "Storing memories" section had no mention of directives — a model learning to store wouldn't encounter
directive=Trueuntil the Directives section 20+ lines below. The Directives section itself had limited trigger phrases (only "save this as a directive", "always do X", "never do Y") and no guidance on managing directives (deleting, handling contradictions).Fix
Dependency Impact
instructionsstring is consumed only byFastMCP()constructor at line 211 — no code path changesTest Plan
test_issue_564_storing_section_cross_references_directives— fails pre-fix, passes post-fixtest_issue_565_directive_trigger_from_now_on— fails pre-fix, passes post-fixtest_issue_565_directive_trigger_every_session— already passes (pre-existing text)test_issue_565_directive_management_forget— fails pre-fix, passes post-fixtest_issue_565_directive_management_contradict— fails pre-fix, passes post-fixValidation
Deterministic gates: all pass (regression tests verified, suite green, callers checked)