pub fn load_instructions(
base_dir: &Path,
provider_kinds: &[ProviderKind],
explicit_files: &[PathBuf],
auto_detect: bool,
) -> Vec<InstructionBlock>Expand description
Load instruction blocks from provider-specific and explicit files.
base_dir is resolved as the process working directory at startup via
std::env::current_dir(). This matches the directory from which the user
launches zeph and is therefore the most natural project root for file
discovery. Non-git projects are fully supported; git root is not used.
Candidate paths are collected in this order:
- Always:
base_dir/zeph.mdandbase_dir/.zeph/zeph.md. - If
auto_detect, per-provider paths fromdetection_paths()for each kind. explicit_filesas provided (trusted — user controls config.toml).
Deduplication uses fs::canonicalize. Paths that do not exist are silently
skipped; canonicalize fails on nonexistent paths, so they cannot be deduped
via symlinks against existing paths — this is an acceptable edge case documented here.