I've started to build this exact kind of setup for everything I do into Emacs. It has dramatically improved my productivity and made development a joy. Rather than just having the completion style AI of Github copilot I freely move around my work, highlight functions and ask for completions. Or I provide an entire package/directory as context and ask for new files. I can iterate with followups. I can ask for inplace responses or commentary in a sidebar. I've setup predesignated prompts/questions and tied them to keybindings. I've discovered that I can provide stacktraces to GPT4 with my code context and it can pretty quickly debug my code. It feels like pair programming with a very fast junior engineer.
I do this with code, design documents, and task planning.
> I've discovered that I can provide stacktraces to GPT4 with my code context and it can pretty quickly debug my code.
I was blown away by how effective it is when I tried it. Unfortunately there are cases where it doesn't work well, and it can still hallucinate solutions when it has no idea what the problem is, but generally speaking it's excellent.
My goal was to tie this into VS Code and attach it to processes that would expose an error stack to the AI agent when things went wrong, and it would then iteratively attempt to find and test solutions for you. I couldn't get the success rate high enough to bother publishing it, but it was really fun and I learned a lot. I also saw that GitHub is essentially doing this and much more with Copilot X, so my solution would never compare anyways. I think this will become a huge time saver in the near future, though. When it worked well, I could have a solution to the error and tests to validate the solution within 30 seconds or so.
Wow. Ya this is great. Any dotfiles to skim through? I am a Doom Emacser myself, slowly learning the elisp flow to make my own config, and this seems like something I could chew on. :)
I do this with code, design documents, and task planning.