Skip to main content

Module context_files

Module context_files 

Source
Expand description

AGENTS.md / CLAUDE.md walk-up (matches pi’s resource-loader.ts::loadProjectContextFiles).

Algorithm: load agent_dir/AGENTS.md (or case/CLAUDE variants) as a global layer if present; then walk from cwd upward to FS root, taking the first matching file at each level. Outer ancestors render first in the assembled system prompt; cwd-innermost renders last.

Structs§

ContextFile
One context file loaded from disk.

Functions§

assemble_system_prompt
Assemble the final system prompt from the base + loaded context files.
load_project_context_files
Walk cwd upward to FS root, returning context files in outer→inner order (global first if present, then outermost ancestor, then cwd-innermost last).