Live data from Hacker News

Show HN: Transform your codebase into a single Markdown doc for feeding into AI

tesserato.web.app

31–40 of 172 posts

Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI

#31

Wouldn't it be wonderful to have a tool where you interact with AI interactively through the codebase via IDE / vim / emacs tree? Say, you open your codebase and start with prompts and AI+tool navigates to a function or a place where it needs to and modifies stuff while chatting to you about it? Or you jump to somewhere, highlight where you are to scope down the focus of it (while it still retains all of the code in…

Apologies if I'm missing something, but aren't you describing Cursor/Copilot/Windsurf?

you're not. looks like that's kind of it, but would the thing have the context of the whole project when I'm in a file/class/function? With copilot, in my case, it was so far mostly like a fancy autocomplete that has immediate vicinity in its memory where it would be vastly more useful if it had the context of the whole project / all files.

Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI

#32
post #24

This could be a lot better. The example linked in the Github README is a markdown file full of binary garbage because it also tried to convert gzip files to markdown. Pretty big flag that this isn't ready for primetime.

Thank you for pointing that out. Just fixed it.

Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI

#33
I use the following for feeding into AI

   find . -print -exec cat {} \; -exec echo \;
Which will return for each file (and subfolders) the filename and then the content of the file.

Then `| pbcopy` to copy to clipboard and paste it into ChatGPT or similar.

Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI

#35
post #28

I've been enjoying `files-to-prompt` by Simon Willison: https://github.com/simonw/files-to-prompt

here is mine

https://github.com/franzenzenhofer/thisismy

supports files, resursive directories, .gitignor and .thisismyignore and online ressources / URLs + tree commands

also available as a chrome extension https://thisismy.franzai.com/

Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI

#37

Earlier quoted context omitted.

Apologies if I'm missing something, but aren't you describing Cursor/Copilot/Windsurf?

you're not. looks like that's kind of it, but would the thing have the context of the whole project when I'm in a file/class/function? With copilot, in my case, it was so far mostly like a fancy autocomplete that has immediate vicinity in its memory where it would be vastly more useful if it had the context of the whole project / all files.

Cursor indexes the entire code use with embeddings. It works well in small single app projects

Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI

#38
I could see this being quite useful in the background for apps like cursor when they need to perform a full codebase search. I imagine it could be more effective in breaking up larger codebases where embeddings start to fall out. If you could fit the entire document into context, you'd be able to "point the model" in the right direction.

The challenge is maintaining it... But you'd maybe ask the model to do that incrementally on every commit, or just throw it away and regenerate from scratch occasionally.

Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI

#40

Wouldn't it be wonderful to have a tool where you interact with AI interactively through the codebase via IDE / vim / emacs tree? Say, you open your codebase and start with prompts and AI+tool navigates to a function or a place where it needs to and modifies stuff while chatting to you about it? Or you jump to somewhere, highlight where you are to scope down the focus of it (while it still retains all of the code in…

This doesn't sound good to me, you end up with a large codebase that no human has actually laid eyes on. When you get a bug weird enough that you can't reason the LLM through it, then what? What if a bug is because of interactions between two systems, and you don't own one of them? What if there's an issue due to convoluted business process failures, that just end in a bug report like "my data is missing!"? I honestly think in the latter case, the LLM will just fix a 'bug' and miss the forest for the trees.

I prefer the idea of the other comment reply where you use AI as a tool to explore a codebase and assist you, not something you instruct to do the work. It can accelerate you building that experience and intuition at a level we've never been able to do before.

Post reply on HN