Thanks! I will definitely give ai-digest a try tomorrow! I was doing all of that manually - copying codebase into project knowledge text files. It was exhausting work. 🤖🦕👽
I managed to get this to work, however the commit hash is not shown on the caprover but if we deploy usince caprover cli the commit has shows on the caprover app deployment page.
You are correct, to get the deploy to show the hash in the CapRover list of deploys you'll need to modify the GitHub workflow, save the commit hash as an output, then in the last step deploy the output hash instead of :main like the workflow does now.
Great video! As I am still a beginner in webdev, I think that I will stick to "normal" SvelteKit with SSR and CSR, and learn local-first technology later if I need it. By the way, would you consider optimistic updates to be a kind of (very) light local-first method?
Thanks for the comment! Optimistic updates are a great way to make your app feel better to use, and it definitely fits with the "no spinners" criteria of local first!
@@RenanFranca I spend some time writing the prompt as detailed as I can, this avoids misunderstandings and usually you can get a small feature done in 2-3 prompts. So you can do quite a lot if you try to be economical. If you need to ask questions that don't require lots of context you can use apps like Jan or Msty and connect to the Anthropic API which does not have as heavy limits.
@@StanislavKhromov Thank you very much for the detailed answer! Great idea! Have you tried using Claude 3 Opus in your workflow? Is it worth it? Don't you use ChatGPT?
As of today, Opus scores worse on most coding benchmarks. I don't use ChatGPT because it scores worse than Sonnet currently and doesn't have anything equivalent to Projects. Hopefully they will improve!
thanks a lot , very useful. I also added --ignore function in my REPO because I didn't know how to submit in yours. But superuseful, Thanks a lot, now I also got claude pro to try these extra codebase option.
Hi, you can use the .aidigestignore file to ignore parts of your project. You are welcome to create an issue on GitHub if you still have issues: github.com/khromov/ai-digest
You can find the script here: www.npmjs.com/package/ai-digest The system prompt is nothing special, you can use the approach from the video to create your own prompt because it will depend on the programming language and libraries used!
Pretty awesome tool ... unfortunately I just ran it on my project, and it says I it's an estimated 2,153,301 tokens so I guess I'll just go back to how I was Sonnet before or on much smaller projects.
Remove files you don't need with the .aidigestignore file and use --show-output-files flag to check which files actually get included, if you have a giant enterprise project you might need to selectively remove less important parts of it to fit the Projects context.
In VSCode settings, search for customLabels, then add this configuration: "workbench.editor.customLabels.patterns": { "**/routes/**/{+server,+layout,+page,+error}.{svelte,ts,server.ts,js,server.js}": "/${dirname} (${filename})" } The first value goes in Item and second in Value.
I’ll definitely use your script to upload my project to Claude. Some thoughts: * we need a better flow to move data back and forth between the IDE and Claude. I hope Anthropic exposes a projects API at some point. That way we can integrate the ide with the project. * you can always try to request diff files instead of having to fish where the diffs are at or have to request context consuming large files * maybe pre processing docs to produce a condensed version that is AI friendly, so that you don’t consume your project space. The largest the project context, the faster you run out of quota. You were already running out of messages. On the flip side, this does timebox your work so that could be a good thing for personal projects. * developers are not at risk yet. This workflow would be near impossible if you didn’t know programming or the framework. * one extra instruction I like to add to the project is to make it output the response in a tutorial like way. So that it teaches me or reminds me of what to do whenever there is a new concept or feature. It is a good balance between just copy pasting and having to do it yourself. I want to avoid my knowledge to degrade due to use of this. * one thing it would be interesting to try for larger projects is adding an overview description of the project (what files are available, what do they have) and instruct Claude to request full source code when needed.
Hey, thanks for your thoughtful comments! I find asking Claude to give you the full file back is better than asking it to write a diff, you might end up with 10+ diffs in complex projects which takes a long time to paste in. Regarding condensed docs version, this can be hard without omitting important sections. I don't find the limit particularly problematic, since you have the whole codebase and put care into your prompts you can get a lot done in a single prompt. If I need to ask something not requiring the project context I'll use a frontend like Jan or Msty and connect to Anthropic API directly. PS. Maybe Anthropic will change this in the future, but right now the rate limits between a 100% filled project context and a no-context chat are very similar, maybe 15 messages for the first and 25 for the latter. So loading up the context is highly efficient message-wise.
Interesting video. I like the idea of putting the Svelte docs into the project context. Have you looked at Cursor at all? I find having to copy paste changes annoying and Cursor helps with that (but then you don't have the project context...)
Hi, thanks for your comment! You can use Cursor in a similar workflow by using the "long context chat" feature and referencing @Codebase. However, because the API has no memory you have to do this for almost every message and it gets expensive and also you might be rate limited due to number of tokens.
Hi! You can download it from below. Using it as a JSON file is fine or you can ask Claude to write a script to convert it to Markdown. kit.svelte.dev/content.json
@@StanislavKhromov Genius! Didn't know about this. Is this something one can use for other documentations, or is this only sveltekit docs that provided this?
It's specific to Kit unfortunately. Usually I check if the documentation is available on GitHub, in this case you can clone it and merge the markdown documentation files with ai-digest, or you can ask Claude to scrape the docs website by providing it with a HTML example. Good luck with your AI development!
A much needed tutorial! Loved how you brought a clear concept about ai development pathways. But I feel we still need an in-depth knowledge of programming to actually build something complex and functional. Hope you can do another video showing how to use ai for dummies to create and develop a fully functional webapp. Thanks again! (this would be particularly helpful for entrepreneurs like me who has very elementary knowledge about programming but are passionate about developing own web apps!)
It would be really helpful if you could create a command to update the context file automatically by providing the chat ID or something similar. This way, every once in a while, when you've made changes in multiple files, you can delete the old file from context and update it with a new one.
Thanks for the feedback! Unfortunately Claude Projects does not have an API. Perhaps a web extension can be made to automate updating the codebase file. For now, as long as you're in the same chat Claude will remember the state of your project even if you ask it to update certain files. So you only have to update codebase when starting a new chat!
@@StanislavKhromov dang! I’m sure they’ll an API for it sooner than later. I would say you might be able to do that now with ChatGPT but once you start using Claude for coding ChatGPT seems silly because it’s so much better. This is very cool, thanks for building and sharing it!
I have watched your video through the end, it is sooo satisfying and clear. Thank you so so much, you have not left your contact. Can you please share it
thanks for ai-digest , I was looking through the docs , I assume this is for webdev mostly , i wanted to know if it works with projects in other langs ? python, c#, C++ ?
Thank you for the comment! ai-digest works with any programming language, you can open an issue on GitHub if something doesn't work for you. The only prerequisite is Node.js to run it!
Thanks for ai-digest! Initial testing today, I've uploaded my small codebases on claude, perplexity and gpt-4o (without any pro subscriptions), looking at simpler repos that mostly contain notebooks and accompanying python utilities. It works! Claude was most helpful, whilst gpt-4o seemed less "into" the idea. After a longer session, both perplexity and gpt4o returned a json version of a notebook under review and it seemed tricky to "unsteer" this behavior. Vi tackar ifrån Sjömarken....
I have an open source project for this im building rn too. Some differences: 1. It uses the API 2. It uses GPT4o mini as a semantic router to go through your codebase and create enriched metadata 3. When you ask a question about your project, Gpt4o mini finds the actual files that need to be included in the prompt. 4. Claude gets a prompt with a bunch of customized preferences and the complete code for only the files it needs to know about. Since GPT4o is mapping your code base Claude is getting a complete control flow of your code base so it knows exactly what functions call to other functions in other scripts.
Sounds cool, sort of like embeddings but with GPT4o mini. How do you create enriched metadata continuously as you add and remove files? Does the tool run in the background? If you share a link I'd be happy to check it out.
@@StanislavKhromov absolutely. I tried to put the project name but I think the RU-vid algorithm thinks I'm promoting lol. It's on a famous website that has coding projects and called Better-Artifacts lol. To answer your question: 1. The user selects a folder in the beginning. 2. We copy the folder to the local server folder (to maintain the structure and contents) 3. Then each file is hashed. 4. When you make changes on the codebase you press the update button and it compares hashes to see what actually needs updated. 5. The files that need updated are sent to GPT4o mini to re-enrich
@@StanislavKhromov should be working for testing. Keep in mind, it's 2 days old and barely functional :P I haven't pushed the update for an .ai_ignore file like you have yet so I wouldn't try to feed it a large project yet until that's pushed...unless you want Gpt4o mini chomping through your node_modules lol
@@jaysonp9426 that’s interesting re: Aider. Can you elaborate on your experiences? I’m just getting to grips with it now. Have turned off linting and found that made a big difference, but still trying to delineate between when to use an IDE-based tool and when to stick with Claude Pro’s web UI. Your concept of using one model to feed another is interesting. Will try it out.
hi there. awesome video, i learnt a lot. I am by no means a porgramer but have been developing with Claude and loving it. I will try your ai-digest tool, thank you very much. Would love to hear what are your thoughts on Aider as an ai pair programmer? Best of luck to you. Subscribed.
Hi! Yes, it will work on projects in any language. However, in order to run "npx ai-digest" you will need to have a recent version of Node.js installed.
Holy damn, I've been using Claude for code snippets and was wondering how I'd upload an entire project base. BRAVO! Will try your ai-digest package. Thank you
Hey, thanks for sharing. Did you try similar workflow with cursor AI? I find it works better if you tag specific files you need in specific task than all codebase. Also you can ask same question other LLMs if you don't like the answer. Sometimes claude is better, sometimes gpt.
Thanks you for your comment! I have tried Cursor, both the normal RAG version with embeddings and their new "long context" chat feature where you can upload the whole codebase. Since Cursor uses the API the chat gets very expensive quickly because you pay for the whole codebase tokens for every message. I find the convenience of Projects and full code recall easier than having to remember which files to include in every message, but you should use the workflows that works best for you!
Of course! Here is the prompt that was used in the video. Keep in mind you have to change your app name, purpose and technologies used in the beginning of the prompt. "You are an AI assistant with expertise in the Appreciation Jar app, a digital platform for couples to share appreciative messages. The app is built using SvelteKit, TypeScript, and PostgreSQL, with additional technologies like Capacitor for mobile app development (iOS and Android), Firebase for push notifications, and various APIs for different functionalities. You should be able to answer questions about the app's features, architecture, and implementation details. When asked about code specifics, refer to the structure and patterns used in the provided codebase. If asked about future improvements or features, consider the existing architecture and suggest enhancements that align with the app's current code. Write TypeScript code, add and infer types when possible. Always write out changes to files in full, never write out partial files or files with comments in them like /* existing code here */. Always write code using Claude Artifacts. After you produce code changes, make a very short bullet point summary of the changes that were made."
Very interesting! Nice video! The RU-vid standard is going up quickly! Being your 6th video it is great. Some parts could be edited to make it keep the pace (and some I would explain in more detail, at least I got lost). But so useful.
Run the migration in the npm start command so it runs when the container starts. Instead of `node build/index` your command would look like `npm run migrate && node build/index`
If you're using SvelteKit with adapter-node it should be port 3000, if you're using a different framework, refer to their guide for the correct port and make sure to set the correct port in EXPOSE inside the Dockerfile as well