What do you want to change?
Make Pi recognize AGENTS.override.md when discovering context files.
When both files exist in the same directory, Pi can load AGENTS.override.md for that directory instead of AGENTS.md. Context files from other directories continue to layer normally.
Why?
I work in repositories where I cannot change the checked-in AGENTS.md but need a local replacement. Codex supports this with an uncommitted AGENTS.override.md, and it would be useful to use the same file in Pi.
An extension can approximate this by rewriting the assembled system prompt, but Pi would still treat the original AGENTS.md as the selected context file. This seems more naturally handled during context discovery.
How? (optional)
Check for AGENTS.override.md before the existing candidates:
const candidates = [
"AGENTS.override.md",
"AGENTS.md",
"AGENTS.MD",
"CLAUDE.md",
"CLAUDE.MD",
];
For example, when running Pi from repo/service:
repo/
├── AGENTS.md loaded
└── service/
├── AGENTS.md skipped
└── AGENTS.override.md loaded
result: repo/AGENTS.md + repo/service/AGENTS.override.md
The existing ordering and one-file-per-directory behavior remain unchanged.
What do you want to change?
Make Pi recognize
AGENTS.override.mdwhen discovering context files.When both files exist in the same directory, Pi can load
AGENTS.override.mdfor that directory instead ofAGENTS.md. Context files from other directories continue to layer normally.Why?
I work in repositories where I cannot change the checked-in
AGENTS.mdbut need a local replacement. Codex supports this with an uncommittedAGENTS.override.md, and it would be useful to use the same file in Pi.An extension can approximate this by rewriting the assembled system prompt, but Pi would still treat the original
AGENTS.mdas the selected context file. This seems more naturally handled during context discovery.How? (optional)
Check for
AGENTS.override.mdbefore the existing candidates:For example, when running Pi from
repo/service:The existing ordering and one-file-per-directory behavior remain unchanged.