Rules & templates
Rules let you give persistent instructions to AI agents for each workspace. Instead of repeating context in every prompt, you write it once as a rule file and Nova Code injects it automatically.
Workspace rules
Section titled “Workspace rules”Each workspace has a dedicated rules directory on disk (aligned with Cursor-style project rules). From the Rules tab in any workspace, you can:
- Create new rule files — start from a blank file or pick a role template as a starting point.
- Edit rule content directly in the browser.
- Rename or delete rule files.
- Add optional display labels for organization.
When you start a session, the server automatically prepends the contents of active rule files to your prompts (for Claude and Mistral Vibe; Cursor reads rules through its own mechanism).
What to put in rules
Section titled “What to put in rules”Rules work well for:
- Project context — tech stack, architecture decisions, coding conventions.
- Behavioral instructions — “always write tests”, “use TypeScript”, “prefer functional style”.
- Constraints — “do not modify files in the
legacy/directory”, “keep responses concise”. - Domain knowledge — glossary of project-specific terms, business logic summaries.
Role templates
Section titled “Role templates”Role templates are global, reusable instruction snippets stored in the database. They provide a starting point when creating new workspace rule files, so you don’t have to retype common patterns.
Manage templates from the Role templates screen:
- Create a template with a name, description, and body text.
- Edit or delete existing templates.
- When creating a new rule file in any workspace, select a template to pre-fill the content.
Example templates
Section titled “Example templates”- Code reviewer — instructions for thorough code review with focus on security and performance.
- Documentation writer — guidelines for writing clear, consistent documentation.
- Refactoring assistant — rules for safe refactoring with test preservation.
Related
Section titled “Related”- Sessions — agents consume workspace rules during chat
- Workspaces — rules are scoped to a workspace
- Settings — agent configuration and integrations