pub fn discovered_chain(
cwd: &Path,
envmap: &HashMap<&str, &str>,
) -> Result<Vec<String>, String>Expand description
The whole discovery chain, LOWEST precedence first: the user rung, then the project rung, then the local overlay. Every rung that has a file contributes one, and they merge in that order — so a user default is overridden by the project’s config and that by a machine-local overlay, with flags and environment still on top of all three.
Err names the rung that is ambiguous. Ambiguity is per RUNG, not across
the chain: agentd.yml beside agentd.local.yml is the design, while
agentd.yml beside agentd.yaml is a coin toss nobody should have to
debug.