Skip to content

context-files

Supplements pi’s native context file loading so that both CLAUDE.md and AGENTS.md are loaded when they coexist in the same directory, and context files in subdirectories are picked up too.

Pi loads AGENTS.md or CLAUDE.md per directory, preferring AGENTS.md. If both exist, CLAUDE.md is silently ignored. Pi also only walks up from cwd, it never scans subdirectories.

This is a problem when:

  • Your team maintains both files (e.g. AGENTS.md for all agents, CLAUDE.md for Claude-specific guidance)
  • Subdirectories have their own context files (monorepo packages, service directories)
SourcePi loadsExtension adds
~/.tallow/AGENTS.mdCLAUDE.md (if both exist)
Ancestor dirs → cwdOne file per dirThe other file that was skipped
SubdirectoriesNothingBoth CLAUDE.md and AGENTS.md

Files are appended to the system prompt from most general to most specific:

  1. Global, ~/.tallow/CLAUDE.md
  2. Ancestors, farthest directory first, walking toward cwd
  3. Current directory, the skipped file in cwd
  4. Subdirectories, sorted by depth, then alphabetically

The extension skips common non-source directories when scanning subdirectories:

node_modules, .git, dist, build, .next, __pycache__, .venv, venv, vendor, .tox, .mypy_cache, .pytest_cache, coverage, .turbo, .cache, .output, and all dot-directories.

On load, a notification shows which extra files were found:

context-files: +1 context file: ~/dev/myproject/CLAUDE.md