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.74k stars 444 forks source link

continuing / picking up where you left off #70

Closed jtac closed 2 weeks ago

jtac commented 1 month ago

Currently "catching up" to what's been done so far has been a bit tricky, i usually tell claude-dev to create a readme to describe the system and a roadmap to keep tab of tasks to do. But I usually end up starting the agent each time with a command like: "read readme.md, roadmap.md and familiarize with the main project files, the project is a xyz project" where xyz is the framework used or the style of the implementation.

Right now I'm testing creating a Django site and this means there's a lot of existing files to take into account.

Even doing this, claude sometimes decides to wipe out most of the existing work, like when fixing a bug in urls.py it nukes all the existing urls and makes just one new one.

So, there's 2 things in this issue:

jtac commented 1 month ago

Correction, nuking content was an issue with big files (separately handled) but the context memory is still an issue. Perhaps we should save an abbreviated context as a pickup if nothing else is given?

sergeyka commented 1 month ago

I am wondering if vector database is a relevant solution here?

mmuyakwa commented 1 month ago

Unfortunately, I don't know of any code assist solution that solves the token limit using a vector database. It is actually obvious. Unfortunately, everyone is struggling with it.

jtac commented 1 month ago

I am wondering if vector database is a relevant solution here?

not on the output side of things, it solves more on the context side, for github copilot you can use the @workspace tag and it will try to answer your question based on your workspace contents using a vector comparison. so yea, perhaps you could do that with a small chromadb and embedding happening in your workspace, i havent tried to do it live so dont know how well that'd work.

you could even embed all the previous claude-dev conversations to get more insight into the project and the goals of the user, a bit like i do with readme and roadmap.

alternatively, you could automatically build project file that works like my readme and roadmap perhaps?

saoudrizwan commented 1 month ago

v1.1.13 now lets you add custom instructions to the system prompt. This would be a good place to put your "read readme.md, roadmap.md and familiarize with the main project files, the project is a xyz project".

Regarding the RAG concept–one of my biggest frustrations with existing AI tools is when referencing @workspace, all the semantically "relevant" code was almost always irrelevant for complex enough queries. Claude Dev on the other hand explores projects using names. It looks for relevant files to read into context the same way you or I would, by looking at the names of directories, files, classes, functions, etc. as these tend to encapsulate the project's architecture and relationships between different components. So it's a bit different than traditional RAGs but at least doesn't require vectorizing your entire codebase, which requires an embeddings model (either locally which isn't great, or hosted so another API key).

As for the lazy coding, please see this comment.

JosephShawa commented 1 month ago

Im in the process of making a "save chat" that loads both the saved chat and a summary that is supposed to summarize the essence. I would like the conversation to pick up where it left off as it does on Chatgpt. I also added a regularly updated "where we are now and where are we going file to be read at startup. So much happening and then I run out of tokens. Need that local anthingllm or any local llm as an llm choice.

CiberNin commented 1 month ago

It would be nice to store the full history of claude interactions / prompts / actions inside .vscode of each project. To allow for resuming of different tasks.

chrisq084 commented 1 month ago

defininitly a way to retrive the previous conversations in case, you pc reset or you click new task by mistake you lose your whole contest that you had going, just an undo btn will be fine or save the contest in a saprete folder some were so we can retrive it.

saoudrizwan commented 1 month ago

v1.3.0 now has task history 🎉 Please check it out and let me know what you think!