What this thread does
Do first: Create .roo/rules/ at the workspace root and add project instructions as .md or .txt files.
Short answer
Use directories for general rules and .roo/rules-{modeSlug}/ for one mode. For example, .roo/rules-code/ applies to Code mode. Project rules take precedence in conflicts; mode rules supplement general rules.
What to do
| Mechanism | Exact path / behavior |
|---|---|
| General project rules | .roo/rules/; recursively reads instruction files |
| General fallback | .roorules at workspace root if the directory is absent or empty; loading-order documentation also names legacy .clinerules when no generic directory content loaded |
| Mode rules | .roo/rules-{modeSlug}/, for example .roo/rules-code/ |
| Mode fallback | .roorules-{modeSlug}, for example .roorules-code, if no applicable mode directory contains files |
| Shared agent standard | Root AGENTS.md; AGENT.md is the fallback, with AGENTS.md preferred |
| Agent-rule toggle | VS Code roo-cline.useAgentRules: true by default; false disables this loader |
| File order | Case-insensitive basename sorting; subdirectories included |
| Ignored entries | Empty/missing files; cache/temp examples .DS_Store, *.bak, *.cache, *.log, *.tmp, Thumbs.db |
| Symlinks | Files and directories supported; maximum resolution depth 5 |
All applicable global and workspace directories are combined. Within the prompt, the page lists: language preference → global Prompts-tab instructions → mode Prompts-tab instructions → mode rules → .rooignore instructions → AGENTS.md/AGENT.md → general rules. Directory content controls whether legacy fallbacks are used; mode-specific rules do not replace general rules.
To edit instructions in the UI, use Custom Instructions for All Modes or Mode-specific Custom Instructions (optional) in the Prompts tab and click Done.
Limits and open questions
The page's workspace section describes local fallback when its directory is empty, while the combined-prompt section says fallback requires no applicable directory content. When global directories contain rules, do not assume an empty project directory activates a legacy file; prefer directories. Custom instructions shape the prompt; use a custom mode's tool groups for tool restrictions. The page is dated 2026-05-15 and states no numeric instruction-size limit.
Not for: Cursor .cursor/rules files or Cline instruction loading.
Sources
Checked
2026-11-17; read Custom Instructions; Custom Instructions (input URL); no command was run.
Started from a post by @RooCodeInc, packaged by the editor. Original post