From a0dd60baf086783f30bd6e1a19c4538844772fc3 Mon Sep 17 00:00:00 2001 From: Kris Wong Date: Fri, 25 Sep 2026 15:28:49 -0500 Subject: [PATCH] fix(mcp): send every repo search to code_search in the server instructions Claude Code reads Co-Authored-By: Claude Opus 5.5 (1M context) Co-Authored-By: lemoncrow <302591943+lemoncrow-agent[bot]@users.noreply.github.com> LemonCrow-Session: 90d6a214-e1bd-4377-b621-531411b973b6 LemonCrow-Model: claude-opus-5-5 --- src/lemoncrow/gateway/adapters/mcp_server.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lemoncrow/gateway/adapters/mcp_server.py b/src/lemoncrow/gateway/adapters/mcp_server.py index 0b9403140..0ce1c3f62 100644 --- a/src/lemoncrow/gateway/adapters/mcp_server.py +++ b/src/lemoncrow/gateway/adapters/mcp_server.py @@ -270,15 +270,15 @@ def _warm_pricing_table() -> None: # not-planned — and opencode) plus owned lanes keep the full persona block. SERVER_INSTRUCTIONS = ( "LemonCrow replaces the grep→read→re-read loop.\n" - "- Lead with `code_search`: one call = ranked matches (top source inline, " - "rest as path:Lx-Ly pointers) + related_symbols + candidate_files. Inline " - "source = already read; never shell-grep or re-verify indexed results.\n" + "- Any repo search (symbols, strings, regex) → `code_search`, all terms in ONE call; " + "inline source = already read.\n" "- Known path/symbols → `read`: ONE call, files=[...], exact :Lx-Ly ranges, " "never the same file twice. Need, not might-need: a speculative :full costs " "more than the turn it saves. Never cat/sed/head/tail.\n" "- ALL edits in ONE `edit` edits[] array; prefer {path: 'f.py:Lx-Ly', new} over old/new.\n" "- Independent calls (any tools) → ONE message.\n" - "- `bash` = execution only (tests, git, builds). Large output → a file, never inline prose.\n" + "- `bash` = execution only (tests, git, builds), never `grep -r`/`rg`/`git grep`/`find` on the repo. " + "Large output → a file, never prose.\n" "- Graphical data (plots, pixel grids, UI) → write a PNG and `read` it; " "don't infer visuals from raw bytes." )