Rules
Create persistent AI instructions scoped to your project.
Rules provide persistent, reusable instructions to Ocsidian AI. They’re included in the model context at the start of every generation, ensuring consistent behavior across sessions.
How rules work
Rules are markdown files stored in .ocsidian/rules/. When Ocsidian AI processes a prompt, applicable rules are prepended to the model context.
Rule types
| Type | Description |
|---|---|
| Always Apply | Included in every generation session |
| Apply Intelligently | AI decides relevance based on the rule’s description |
| File-Scoped | Applied when matching files are involved |
| Manual | Only applied when @-mentioned in a prompt |
Creating rules
---
description: "Enforce our studio's Blueprint coding standards"
alwaysApply: false
globs: "**/*.uasset"
---
When generating Blueprints:
- Use components over inheritance
- Name variables with PascalCase prefix (e.g., bIsActive, fSpeed)
- Add comments to complex node chains
- Use event dispatchers for cross-Blueprint communication
- Keep individual functions under 20 nodesBest practices
- Keep rules under 500 lines
- Be specific and actionable — avoid vague guidance
- Provide concrete examples
- Commit rules to Git so your team shares them
- Start simple and add rules only when you see repeated issues
