Skip to main content

load_agents_md

Function load_agents_md 

Source
pub fn load_agents_md(project_dir: &Path) -> Option<String>
Expand description

Search project_dir for an AGENTS.md file and return its content.

Returns Some(content) for the first file found in the priority order listed above, or None if no file exists.

§Why first-match-wins?

Concatenating multiple files would make the system prompt unpredictable in length and could smuggle conflicting instructions. A single file is intentional: the most specific file (.xcodeai/AGENTS.md) overrides the generic one (AGENTS.md).