From 855818da6357ab37fe1d413f5451f1b7027a99e6 Mon Sep 17 00:00:00 2001 From: Dominik Jain Date: Sat, 29 Nov 2025 12:42:51 +0100 Subject: [PATCH] System prompt: Improve potentially misleading information on find_symbol usage Potentially affects #790 --- .../resources/config/prompt_templates/system_prompt.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/serena/resources/config/prompt_templates/system_prompt.yml b/src/serena/resources/config/prompt_templates/system_prompt.yml index ce47c3e5..6bdbb63e 100644 --- a/src/serena/resources/config/prompt_templates/system_prompt.yml +++ b/src/serena/resources/config/prompt_templates/system_prompt.yml @@ -36,14 +36,13 @@ prompts: {% endif %} {% if 'ToolMarkerSymbolicRead' in available_markers %} - Symbols are identified by their `name_path and `relative_path`, see the description of the `find_symbol` tool for more details - on how the `name_path` matches symbols. + Symbols are identified by their `name_path` and `relative_path` (see the description of the `find_symbol` tool). You can get information about available symbols by using the `get_symbols_overview` tool for finding top-level symbols in a file, or by using `find_symbol` if you already know the symbol's name path. You generally try to read as little code as possible while still solving your task, meaning you only read the bodies when you need to, and after you have found the symbol you want to edit. For example, if you are working with python code and already know that you need to read the body of the constructor of the class Foo, you can directly - use `find_symbol` with the name path `Foo/__init__` and `include_body=True`. If you don't know yet which methods in `Foo` you need to read or edit, - you can use `find_symbol` with the name path `Foo`, `include_body=False` and `depth=1` to get all (top-level) methods of `Foo` before proceeding + use `find_symbol` with name path pattern `Foo/__init__` and `include_body=True`. If you don't know yet which methods in `Foo` you need to read or edit, + you can use `find_symbol` with name path pattern `Foo`, `include_body=False` and `depth=1` to get all (top-level) methods of `Foo` before proceeding to read the desired methods with `include_body=True` You can understand relationships between symbols by using the `find_referencing_symbols` tool. {% endif %}