What are rules?
A rule is a set of instructions stored as a file:- Name: Identifier used to reference the rule
- Description: What the rule does (optional)
- Body: The actual instructions (up to 20,000 characters)
- Type: When the rule applies
Rule types
Always rules
Applied automatically to every conversation:- Loaded at the start of each generation
- Combined with other always rules
- No action needed to activate
- Coding style preferences (“Always use type hints”)
- Domain conventions (“Use SI units for all measurements”)
- Safety guidelines (“Never delete files without confirmation”)
Manual rules
Invoked explicitly when needed:- Not automatically loaded
- Activated with
@rule:rule-namein chat - Useful for context-specific guidance
- Project-specific conventions
- Specialized workflows
- Instructions that only apply sometimes
Rule scope
Every rule is either global or scoped to a single project:- Global rules apply in every project.
- Project rules apply only when you chat in the selected project.
File path rules
Besides free-form rules, you can add a file path rule (click New file path in the Rules tab). It points the agent at a folder of code on disk: when the rule applies, the agent assumes imports in your notebooks resolve from that path. File path rules are always active, and like other rules they can be global or scoped to a project. A global file path applies in every project, so use one for code that all your projects share — and make sure the path exists on the machine running the backend.Creating rules
- Go to Settings > AI Assistant
- Expand the Rules section
- Click Create Rule
- Enter:
- Name: Lowercase with hyphens (e.g.,
python-style) - Description: Brief explanation
- Body: The instructions
- Type: Always or Manual
- Name: Lowercase with hyphens (e.g.,
Using manual rules
Invoke a manual rule by typing@rule: followed by the rule name in your chat message:
“@rule:data-analysis Analyze this dataset and find anomalies”The rule’s instructions are included in that message’s context.
Workspace rules
Qualia also recognizes rules files in your workspace root:- CLAUDE.md: Instructions in Claude’s standard format
- AGENTS.md: Agent-specific guidance
Importing rules
Import rules from other tools. These options read directories on the machine your workspace runs on, so they appear for local workspaces only:From Cursor
- Go to Settings > AI Assistant > Rules
- Click Import from Cursor
- Rules from
~/.cursor/rules/are imported
.mdc files) include frontmatter with globs for file-specific matching. Imported rules preserve this metadata.
From Claude Code
- Click Import from Claude Code
- Rules from
~/.claude/rules/are imported
From a file
- Click Import from file…
- Enter the full path to a file (such as a
CLAUDE.md) on the machine running the backend - Its contents become a new always rule
CLAUDE.md that lives outside the standard ~/.cursor/rules or ~/.claude/rules locations.
Rule organization
For complex projects, consider:- One always rule for global preferences
- Manual rules for different contexts (data analysis, model training, visualization)
- Workspace rules (CLAUDE.md) for project-specific conventions
Rules stack — an always rule plus a manual rule plus workspace rules all apply together when invoked.
Viewing rule files
On local workspaces, click Reveal Rules Folder in Settings to open the rules directory in your file manager. Each rule is stored in its own folder with aRULE.md file.
You can edit rules directly on disk if you prefer — changes are picked up automatically. (Cloud workspaces store rules with your account, so there is no folder to reveal; edit rules from the Rules tab instead.)

