It is difficult to get the AI models to get everything right every time. I noticed too that it would sometimes remove comments etc when re-writing code.
The way to get better results is with agentic workflows that breakdown the task into smaller steps that the models can iteratively come to a correct result.
One important step I added to mine is a review step (in the reviewChanges.ts
file) in my workflow at
https://github.com/TrafficGuard/nous/blob/main/src/swe/codeE...
This gets the diff and asks questions like:
- Are there any redundant changes in the diff?
- Was any code removed in the changes which should not have been?
- Review the style of the code changes in the diff carefully against the original code.
Maybe try using that, or the package that I use which does the actual code edits called Aider https://aider.chat/
The way to get better results is with agentic workflows that breakdown the task into smaller steps that the models can iteratively come to a correct result. One important step I added to mine is a review step (in the reviewChanges.ts file) in my workflow at https://github.com/TrafficGuard/nous/blob/main/src/swe/codeE...
This gets the diff and asks questions like:
- Are there any redundant changes in the diff? - Was any code removed in the changes which should not have been? - Review the style of the code changes in the diff carefully against the original code.
Maybe try using that, or the package that I use which does the actual code edits called Aider https://aider.chat/