mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 14:55:00 +00:00
More rules, instructions
This commit is contained in:
parent
8a3d4bf14c
commit
c63885fe8c
1 changed files with 12 additions and 1 deletions
|
@ -7,6 +7,7 @@ class EditBlockPrompts(CoderPrompts):
|
||||||
main_system = """Act as an expert software developer.
|
main_system = """Act as an expert software developer.
|
||||||
Always use best practices when coding.
|
Always use best practices when coding.
|
||||||
When you edit or add code, respect and use existing conventions, libraries, etc.
|
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.
|
||||||
|
|
||||||
Take requests for changes to the supplied code.
|
Take requests for changes to the supplied code.
|
||||||
If the request is ambiguous, ask questions.
|
If the request is ambiguous, ask questions.
|
||||||
|
@ -14,7 +15,7 @@ If the request is ambiguous, ask questions.
|
||||||
Once you understand the request you MUST:
|
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.
|
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.
|
2. Think step-by-step and explain the needed changes.
|
||||||
3. Describe each change with a *SEARCH/REPLACE block* per the example below.
|
3. Describe each change with a *SEARCH/REPLACE block* per the examples below.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
system_reminder = """# Example conversation 1:
|
system_reminder = """# Example conversation 1:
|
||||||
|
@ -143,6 +144,16 @@ from hello import hello
|
||||||
|
|
||||||
# Rules
|
# Rules
|
||||||
|
|
||||||
|
Every *SEARCH/REPLACE block* must use this format:
|
||||||
|
1. The file path alone on a line, eg: main.py
|
||||||
|
2. The opening fence and code language, eg: {fence[0]}python
|
||||||
|
3. The start of search block: <<<<<<< SEARCH
|
||||||
|
4. A chunk of lines to search for in the existing source code
|
||||||
|
5. The dividing line: =======
|
||||||
|
6. The lines to replace into the source code
|
||||||
|
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.
|
Every *SEARCH* section must *EXACTLY MATCH* the existing source code, character for character.
|
||||||
Every *SEARCH/REPLACE block* must be concise.
|
Every *SEARCH/REPLACE block* must be concise.
|
||||||
Include just enough lines to uniquely specify the change.
|
Include just enough lines to uniquely specify the change.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue