Skip to content

fix: improve MCP instructions directive discoverability#571

Merged
buildingjoshbetter merged 1 commit into
mainfrom
fix/564-565-mcp-instructions
Jun 8, 2026
Merged

fix: improve MCP instructions directive discoverability#571
buildingjoshbetter merged 1 commit into
mainfrom
fix/564-565-mcp-instructions

Conversation

@buildingjoshbetter

Copy link
Copy Markdown
Owner

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=True until 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

  1. Storing section (D2): Added cross-reference line pointing to Directives section for standing instructions
  2. Directives section (D3): Added trigger phrases ("from now on", "in every session", "make this a rule", "this should always apply"), deletion guidance (truememory_directives → truememory_forget), and contradiction handling

Dependency Impact

  • instructions string is consumed only by FastMCP() constructor at line 211 — no code path changes
  • Instructions string grew by ~300 chars (4565 → 4865) — well within MCP limits
  • No function signatures, return types, or side effects changed

Test Plan

  • test_issue_564_storing_section_cross_references_directives — fails pre-fix, passes post-fix
  • test_issue_565_directive_trigger_from_now_on — fails pre-fix, passes post-fix
  • test_issue_565_directive_trigger_every_session — already passes (pre-existing text)
  • test_issue_565_directive_management_forget — fails pre-fix, passes post-fix
  • test_issue_565_directive_management_contradict — fails pre-fix, passes post-fix
  • Full suite: 1044 passed, 6 skipped, 0 new failures

Validation

Deterministic gates: all pass (regression tests verified, suite green, callers checked)

@buildingjoshbetter buildingjoshbetter merged commit 85b460e into main Jun 8, 2026
2 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant