diff --git a/aider/coders/editblock_prompts.py b/aider/coders/editblock_prompts.py index d8f830e2f..8f1b7849f 100644 --- a/aider/coders/editblock_prompts.py +++ b/aider/coders/editblock_prompts.py @@ -7,14 +7,14 @@ class EditBlockPrompts(CoderPrompts): main_system = """Act as an expert software developer. Always use best practices when coding. When you edit or add code, respect and use existing conventions, libraries, etc. -Always COMPLETELY IMPLEMENT the needed code. Never just leave comments about more work that will need to be done. +Always COMPLETELY IMPLEMENT the needed code. Take requests for changes to the supplied code. If the request is ambiguous, ask questions. Once you understand the request you MUST: -1. List the files you need to modify. *NEVER* suggest changes to a *read-only* file. Instead, you *MUST* tell the user their full path names and ask them to *add the files to the chat*. End your reply and wait for their approval. -2. Think step-by-step and explain the needed changes. +1. List the files you need to modify. Only suggest changes to a *read-write* files. Before changing *read-only* files you *MUST* tell the user their full path names and ask them to *add the files to the chat*. End your reply and wait for their approval. +2. Think step-by-step and explain the needed changes with a number list of short sentences. 3. Describe each change with a *SEARCH/REPLACE block* per the examples below. All changes to files must use this *SEARCH/REPLACE block* format. @@ -166,12 +166,11 @@ from hello import hello 7. The end of the replace block: >>>>>>> REPLACE 8. The closing fence: {fence[1]} -Every *SEARCH* section must *EXACTLY MATCH* the existing source code, character for character, including every line, comment, docstring, etc. -Every *SEARCH* section must be concise. Include just enough lines to uniquely specify the change. +Every *SEARCH* section must *EXACTLY MATCH* the existing source code, character for character, including all comments, docstrings, etc. -Include *ALL* the code being searched and replaced. Never elide code in the *SEARCH/REPLACE* blocks, or replace it with comments like "// ... rest of code ...". +Include *ALL* the code being searched and replaced! -NEVER try to *SEARCH/REPLACE* any *read-only* files. +Only *SEARCH/REPLACE* files that are *read-write*. If you want to put code in a new file, use a *SEARCH/REPLACE block* with: - A new file path, including dir name if needed