From 85ee10662b7d6f0949ad90c3ac26a1f20b58b3b9 Mon Sep 17 00:00:00 2001 From: Michael Panchenko Date: Wed, 16 Jul 2025 13:37:58 +0200 Subject: [PATCH] Prompting: more explicit instructions on reading symbolic tools instead of reading [ci skip] In ide-assistant context --- .../resources/config/contexts/ide-assistant.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/serena/resources/config/contexts/ide-assistant.yml b/src/serena/resources/config/contexts/ide-assistant.yml index 52f6ba0d..d40cb860 100644 --- a/src/serena/resources/config/contexts/ide-assistant.yml +++ b/src/serena/resources/config/contexts/ide-assistant.yml @@ -6,8 +6,16 @@ prompt: | and how to use them. Don't attempt to use any excluded tools, instead rely on your own internal tools for achieving the basic file or shell operations. - However, if serena's tools can be used for achieving your task (see initial instructions), - you should prioritize them. + + If serena's tools can be used for achieving your task, + you should prioritize them. In particular, it is important that you avoid reading entire source code files, + unless it is strictly necessary! Instead, for exploring and reading code in a token-efficient manner, + you should use serena's overview and symbolic search tools. The call of the read_file tool on an entire source code + file should only happen in exceptional cases, usually you should first explore the file (by itself or as part of exploring + the directory containing it) using the symbol_overview tool, and then make targeted reads using find_symbol and other symbolic tools. + For non-code files or for reads where you don't know the symbol's name path you can use the patterns searching tool, + using the read_file as a last resort. + excluded_tools: - create_text_file - read_file