Let the agent read the index first
Claude has a feature called Projects, where you upload files that the model reads in every chat inside that project. Using it often comes with one problem. We need to throw a lot of resources into the context, including files such as API schemas, architecture notes, and style guides. As a result, the context window gets crowded quite quickly and the model has less room to think.
My approach to this is a lazy one. I save everything that happens in a conversation about a specific tool or skill I'm building to a folder that belongs to that conversation. Since all the notes are saved automatically, they have the same structure, which means each note can be accessed at a granular level.
On top of the pile that contains everything, there is an index file. With this construction, every time I start talking to the agent about something, it first looks up the index file. The index gives it pointers to where to look for more information. After that, it can drill down through the notes to as much detail as required, no matter how far back the conversation took place.
There is also an automated procedure that keeps conversations about different things in different buckets. And whenever I open a new terminal window, I'm forced to choose which conversation I want to join or to create a new one. This leaves no ambiguity about what I'm discussing in any specific case.
All of this is complemented by constant cleanup of the context window, so at every moment the agent has only a specific set of information. That lets it work on the task at hand while keeping maximum free space for the actual work. The cleanup procedure is based on a maximum number of tokens per session. It gives a warning when the limit is breached, so you can quickly refresh and continue working.
From the working folder,
Zhenia