Skip to content llms.txt

hierarchical_loading

Whether rules load from multiple directory levels with defined precedence. Enables project-root rules plus subdirectory-scoped overrides.

Type: bool Content type: rules

ProviderSupportedMechanism
claude-codeCLAUDE.md files load from all ancestor directories up to repo root (ancestor files load in full at launch; subdirectory CLAUDE.md files beyond 200 lines threshold load on demand when Claude reads files in those subdirectories); .claude/rules/ files discovered recursively; user-level rules (~/.claude/rules/) load before project rules; rules without paths frontmatter load unconditionally
codexhierarchical_agents_md: Codex loads AGENTS.md from subdirectories with defined precedence (deeper overrides higher)
copilot-cliCopilot CLI supports repo-wide instructions plus path-specific and personal instruction layers with defined precedence
cursorRules can live in nested .cursor/rules/ directories within a project; rules in a subtree apply when working with files under that subtree, enabling monorepo-style scoping. AGENTS.md also supports nested files in subdirectories for granular context-specific guidance.
factory-droidFactory Droid loads global and project rule layers; innermost (most specific) layer takes precedence
gemini-clihierarchical_context_loading: Gemini CLI loads GEMINI.md files from multiple directory levels with defined precedence
opencodeOpenCode traverses up from the current directory collecting AGENTS.md (or CLAUDE.md fallback) at each level; global files at ~/.config/opencode/AGENTS.md and ~/.claude/CLAUDE.md are appended; all matching files are combined into context
roo-codemode_scoped_loading: files under .roo/rules/ load universally; files under .roo/rules-<mode>/ load conditionally based on the active mode
windsurfrules_hierarchical_discovery: Windsurf discovers .windsurf/rules/ directories in the current workspace, all sub-directories, and parent directories up to the git root; rules from all levels are merged and deduplicated
ampAmp rule files are project-scoped; no subdirectory hierarchy documented
clineCline rules are project-scoped or global; no per-subdirectory loading hierarchy documented
crushCrush documents context files at the project root only; no hierarchical/subdirectory loading documented
kiroKiro steering files are project-scoped; no multi-level subdirectory hierarchy documented
piPi rule files are not documented as supporting multi-level directory loading
zedZed loads rule files from the project root only; no multi-tier hierarchical loading documented