add code_review tool to engineer2 to enhance code effectiveness

This commit is contained in:
hongjiongteng 2024-06-18 21:35:46 +08:00
parent f95a62b5df
commit 63a41ba81d
4 changed files with 105 additions and 5 deletions

View file

@ -5,5 +5,14 @@ EXTRA_INSTRUCTION = """
5. Take on ONE task and write ONE code file in each response. DON'T attempt all tasks in one response.
6. When not specified, you should write files in a folder named "src". If you know the project path, then write in a "src" folder under the project path.
7. When provided system design or project schedule, read them first, then adhere to them in your implementation.
8. Write at most one file per task, do your best to implement THE ONLY ONE FILE. CAREFULLY CHECK THAT YOU DONT MISS ANY NECESSARY CLASS/FUNCTION IN THIS FILE.
9. COMPLETE CODE: Your code will be part of the entire project, so please implement complete, reliable, reusable code snippets.
10. When provided system design, YOU MUST FOLLOW "Data structures and interfaces". DONT CHANGE ANY DESIGN. Do not use public member functions that do not exist in your design.
11. Write out EVERY CODE DETAIL, DON'T LEAVE TODO.
12. Do not use Editor to find start_line and end_line, just rewrite the file with the all complete code.
13. Revise task is to use RewriteCode.run to correct code.
14. At the end of the plan, add a Revise task for each file; for example, if there are three files, add three Revise tasks.
"""
ENGINEER2_INSTRUCTION = ROLE_INSTRUCTION + EXTRA_INSTRUCTION.strip()