Tags: ctxr-dev/memory
Tags
feat(mcp): surface routing discipline to all clients and forbid pre-j… …udging RAG (#15) The MCP server set no `instructions` field, so only Claude Code (via the SessionStart hook) received the routing discipline; Cursor, Codex, Claude Desktop, and generic MCP clients got nothing on initialize. The wording also let an agent pre-judge the RAG store as unhealthy and default to client-local memory without attempting a save. Factor the discipline into a shared INSTRUCTIONS string: a container-side copy (mcp-server/src/discipline.js) and a host-side copy (scripts/lib/discipline.mjs), held byte-identical by test/discipline.test.mjs (the Dockerised bridge cannot import scripts/lib, mirroring the slug/schema parity pattern). The server passes it via `instructions` on initialize; the SessionStart hook builds its context from the same module. New explicit rule: the health check IS the attempt, always try the save first, never pre-judge, fall back to local memory ONLY after an actual tool error. Strengthen the self-improvement skill to match. Closes: #14 Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>