Remix.run Logo
sdesol 2 hours ago

Can you comment more on

> Context management so the right agents have the right context for the right sessions at the right time

I'm going to do a show HN tomorrow that explains how you can give your agents years of experience. The basic idea is, you would commit in your repo or download manifests (JSON files) that can be converted to "Brains" (SQLite databases). Each brain can have its own properties.

For example, I provide a "code intent" analyzer (instructions for AI) that says when analyzing a file, extract this metadata. For the code intent analyzer, I have the AI extract a single sentence purpose for the file. So if you execute:

gsc rg cache --db code-intent --fields purpose

you get all matches for 'cache' plus the matching file's purpose like "Modify file to update caching strategy". This is how the agent can tell if the file is talking about cache vs. whether this file is what you should change if you want to update the caching strategy.

So for what you described, you can have a brain for different stages of a task. It can be as simple as, in the planning stage, make sure you do this if you need to touch this file.

I am working on a rust-blast-radius brain that uses `syn` + AI generated metadata to help you understand "what if I changed this file, what would be affected". With the rust-blast-radius brain, the AI can summarize the types of files that will be affected without having to open the file based on what has been changed or discussed.

So you can have a rule like, if I make changes to a Rust file, make sure to do a blast radius analysis so we don't forget to consider something.

Does this align with what you are looking for?

andai an hour ago | parent [-]

(I'm not the guy but) That's funny, I had the same idea the other day. Keeping summaries of files. Haven't tested that yet.

Another thing I've been thinking is how, most parts of a file are not relevant to the whole system.

Like there are parts where they intersect, and those seem to be the most important ones for capturing the big picture. You wanna be able to see the entire "skeleton".

So I thought the summary maybe shouldn't be English but it should be a subset of the code — the subset that's relevant to the rest of the program.

`grep import` gets you 90% of the way there.

sdesol an hour ago | parent [-]

If you include the following:

https://github.com/gitsense/chat/blob/main/base-state/analyz...

In your chat with AI, include the above file and let it know what your requirements are and I can create the analyzer and include it.

You can also think of my tool as data prepping tool. So if you have a clear prompt the AI can review the file during analysis and remove all unnecessary code so the extracted metadata will the stripped text which you can use search against.