Re-searching the docs as a composer agent action

as the composer agent works through problems, i often feel like the only thing it is missing is an action that would re-search the docs.

my specific example: i’m using svelte 5, which is very new. no matter how much i stuff the .cursorrules with svelte 5 instructions, sonnet just doesn’t know the syntax. and it’s not great at fixing the linter errors either because its a completely new framework that is very different than prior versions of svelte.

…but if one of the actions it could decide to take were to re-search the docs that it was previously given, then i think it could safely course-correct.

thank you for your consideration!

1 Like

Hey, the docs should automatically be re-scraped pretty frequently, especially popular documentation that a lot of people would be adding, so you can usually assume the scraped copy is maybe only a few hours old.

If you know there is a change to some documentation, you can always retrigger a lookup yourself.

let me be more clear:

the agent needs to know when it’s time for it to come up with a new query for the doc source.

i don’t mean that the docs need to be re-indexed mid chat, i mean that the ai needs to know when its time to read the docs.

Ah I see, you should be able to manually prompt the AI to look at the documentation again, and adding a “Rules for AI” enter may also work, adding a line such as:

“Assume you do not know any documentation by heart, always looking it up when needed for the code you are writing, regardless of if you seen it before in the history”

or something to that effect!

i know i can manually re “@” the docs.

are you sure that the composer agent has an action available to it to re-search the docs? i have never seen this behavior.

Sorry, my fault, got mixed up between forum threads I was reading!

The composer can’t choose to read documentation, as you said. But it could be a tool available if it was aware documentation for the framework it was using existed.

Currently thought, there isn’t another way to provide it the docs without @ it, or downloading them locally for it to “learn” like the rest of your code.

so then let me clarify my feature request further:

let’s say that in message one of an agent composer i reference @docs.

then going forward for the rest of that session, my feature request is that there is a tool available to the agent to decide to re-query the @docs that were previously mentioned.

i don’t expect the ai to be smart enough to find new docs, i do expect the ai to be smart enough to know when it should send a query to the docs RAG/reranking pipeline you have in place, to get some help from the docs. (and to come up with the new query based on the current state)

so i’m asking for a new agent composer action that is the human equivalent of “read the ■■■■■■■ docs”.

here’s an example from just now where the agent does an amazing job deciding to look through the files:

what if it could decide to re-read the referenced docs when it suspects there is something it doesn’t know that is in the docs?

This seems like a good way of getting this to work without some magic detection of the correct documentation to use! I’ll throw your idea to the team, thanks.

1 Like

Encountering this right now:

It would be cool if the agent have a tool to auto fetch docs, i will try to tweak the rules to make this interaction work better.