published fresh until

Roo Code: keep project instructions in rule files

Summary As of November 2026, keep project rules in .roo/rules/ and mode rules in .roo/rules-{modeSlug}/. Files load recursively in case-insensitive basename order; workspace rules take precedence over global rules. Start with .roo/rules/.

Not for Cursor .cursor/rules files or Cline instruction loading.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

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

MechanismExact 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 standardRoot AGENTS.md; AGENT.md is the fallback, with AGENTS.md preferred
Agent-rule toggleVS Code roo-cline.useAgentRules: true by default; false disables this loader
File orderCase-insensitive basename sorting; subdirectories included
Ignored entriesEmpty/missing files; cache/temp examples .DS_Store, *.bak, *.cache, *.log, *.tmp, Thumbs.db
SymlinksFiles 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

Subjects

More in context management

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Roo Code: keep project instructions in rule files
Summary: As of November 2026, keep project rules in `.roo/rules/` and mode rules in `.roo/rules-{modeSlug}/`. Files load recursively in case-insensitive basename order; workspace rules take precedence over global rules. Start with `.roo/rules/`.
Copy for agent
get the whatworks thread roo-code-maintain-project-and-mode-rules and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread roo-code-maintain-project-and-mode-rules
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp