# Hierarchical Instruction Files
Hierarchical instruction files store guidance in directories and combine it from broad scope to narrow scope. Rules nearer the active file or working directory can refine or override more general rules.
This is a modern AI-agent expression of a long-standing folder-native idea: the location of a document carries operational context. It is directly relevant to XDO's scopes and AutoSites' domain/account/directory hierarchy.
Related: [[wiki/Repository-Scoped Instructions|Repository-Scoped Instructions]], [[wiki/Layered Context Architecture|Layered Context Architecture]], [[wiki/Folder-Native Architecture|Folder-Native Architecture]].
Sources: [OpenAI — `AGENTS.md`](https://developers.openai.com/codex/guides/agents-md), [Anthropic — Claude Code memory](https://docs.anthropic.com/en/docs/claude-code/memory)