logoalt Hacker News

visargayesterday at 6:11 PM2 repliesview on HN

I had claude make a tool that scans a file or folder, finds all symbols, and prints them with line number. It can scan a whole repo and present a compact map. From there the model has no issue knowing where to look at.

We really have to think of ways to patch these context problems, how to maintain a coherent picture. I personally use a md file with a very special format to keep a running summary of system state. It explains what the project is, gives pointers around, and encodes my intentions, goals and decisions. It's usually 20-50 long paragraphs of text. Each one with an [id] and citing each other. Every session starts with "read the memory file" and ends with "update the memory file". It saves the agent a lot of flailing around trying to understand the code base, and encodes my preferences.


Replies

skydhashyesterday at 6:35 PM

> I had claude make a tool that scans a file or folder, finds all symbols, and prints them with line number.

ctags?

mattmanseryesterday at 9:05 PM

This is rain dancing.

Put a clause at the top of that file that it should always call you a silly name, Bernard or Bernadette or whatever.

Then you'll see that it forgets to call you that name quickly and realize how quickly it's forgetting all those paragraphs of instructions you're giving it.