Skip to main content

load_project_context

Function load_project_context 

Source
pub fn load_project_context(
    cwd: &Path,
    mem_cfg: &MemoryConfig,
) -> (Option<LoadedInstructions>, Option<LoadedMemory>, Option<LoadedSkills>)
Expand description

Load project instructions + the durable memory index + the skills index for a one-shot, watcher-less run (mermaid run and subagents). The interactive TUI gets instructions/memory from the config watcher’s first poll (and loads skills once at startup); the headless and subagent drivers have no watcher, so they must load synchronously before the first model call — otherwise the request goes out with no MERMAID.md/AGENTS.md, no memory index, and no skills, which is exactly the context mermaid doctor reports as loaded.