saoudrizwan / claude-dev

Autonomous coding agent right in your IDE, capable of creating/editing files, executing commands, and more with your permission every step of the way.
https://marketplace.visualstudio.com/items?itemName=saoudrizwan.claude-dev
MIT License
4.04k stars 381 forks source link

Claude Dev and Aider prompting question #131

Closed drhouse closed 1 week ago

drhouse commented 3 weeks ago

hey, thanks for Claude Dev. I'd been using Aider up until a few days ago when I first tried Claude Dev. I've been curious about whether my perceived increased success, in getting prompts to result in what I want through Dev, is real or imaginary.

Afaik, the differences between the two are that Aider uses Git, Dev uses history and that both tools have their own set of internal prompt instructions. In theory, if the prompt instructions were the same from Dev to Aider, should Aider deliver the same results? Also, are there any plans to have Git with Dev be an option?

saoudrizwan commented 3 weeks ago

Thanks for the feedback friend! There's a lot of differences, but I built claude dev with the intention of getting the most out of claude 3.5 sonnet's nuances (rather than being model agnostic like aider) which is maybe why you're getting different results. If you'd like a similar git functionality you can just prompt claude dev to git commit every now and then, summarizing recent changes in the commit message (in fact you could put this in 'custom instructions' in settings to do this across tasks)

mkearl commented 3 weeks ago

Can you give us an example of system instructions for successful git functionality?

saoudrizwan commented 3 weeks ago

This has worked for me quite well:

After completing a task or making significant changes, automatically run git add . && git commit -m with a message summarizing the recent updates.

stevebrainng commented 3 weeks ago

Thanks for the feedback friend! There's a lot of differences, but I built claude dev with the intention of getting the most out of claude 3.5 sonnet's nuances (rather than being model agnostic like aider) which is maybe why you're getting different results. If you'd like a similar git functionality you can just prompt claude dev to git commit every now and then, summarizing recent changes in the commit message (in fact you could put this in 'custom instructions' in settings to do this across tasks)

Thanks for the response, out of curiosity I wanted to contribute to the original question:

just like you said, Yes! there's a lot of difference, after checking Aider's source code, the system prompts processes are different. @drhouse said "Afaik, the differences between the two are that Aider uses Git, Dev uses history and that both tools have their own set of internal prompt instructions."

I think what he meant was that Aider AI uses git commit history for Context aware memory management, meaning that Aider can avoid making some mistakes that users are facing with ClaudeDev currently because it's more than just writing a system prompt to commit changes.

I hope you get my point, and I would love to see that ClaudeDev is something that's awesome!

saoudrizwan commented 3 weeks ago

Aider AI knows the recent changes from the git commit history.

Definitely want to add this to claude dev as well, a tool to get git log and then he could ask to look at certain commits and their changes.

Aider can avoid overwriting files that just need an update

I updated the tool prompt to see if that helps with that issue. I'm looking into ways to apply edits without outputting the whole file, but anthropic is coming out with a fast edit mode feature that uses speculative decoding that essentially speeds this up significantly. I'd like to wait to test that out before implementing some stopgap that could affect the quality of claude's output (asking to provide a structured output such as diff format like aider does has been shown to reduce reasoning abilities, ie asking it to do a hard math problem step by step usually fails if forced to do in json format)

stevebrainng commented 2 weeks ago

Thanks @saoudrizwan I appreciate your good work.

I'm open to contribution in anyway.