pub fn load_project_prompt(cwd: &Path) -> Result<Option<String>, Error>Expand description
Load only the project instruction layer (AGENTS.md, collected up the directory
tree) as a single rendered string, or None if there is none.
This is the “project world knowledge” slice of resolve_system_prompt — deliberately
excluding the base prompt, environment block, provider/model overlays, and session
overlay (all of which are the parent agent’s identity/runtime, not shareable project
context). A subagent profile may opt in to this layer (inherit_project_prompt = true)
so it gets build/test/architecture conventions without inheriting the parent’s identity.
§Errors
Propagates IO errors from reading AGENTS.md files (NotFound is not an error).