How does cursor inject "Rules for AI" into the prompt to the LLM?

Hi all,

Does anybody know how the “rules for AI” are used to compose the prompts being sent to let’s say Sonnet3.5? Is it something like prompt= rules + user_query, or more like prompt= user_query + rules? I ask this because at several points in Anthropic’s prompting guides 1, 2 it is kind of implied that having the user_query before the instructions to solve said query, might enable an enhanced chain of thought behavior and reduces hallucinations. This is also useful to know if the rules should be written like “solve the above query by following these rules” or more like “use these rules to solve the query below”. One more thing, are the rules being fed into the system message or the user message?

Cheers