Skip to main content

discover_context_files

Function discover_context_files 

Source
pub fn discover_context_files(
    cwd: &Path,
    global_config_dir: Option<&Path>,
) -> ContextFiles
Expand description

Discover and concatenate AGENTS.md and CLAUDE.md context files.

Walks from cwd upward to the git root (detected by .git presence) or filesystem root, then checks global_config_dir if provided. Returns concatenated content with per-file headings.