Skip to content

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.

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).

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 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.
  • 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.
  • Sessions — agents consume workspace rules during chat
  • Workspaces — rules are scoped to a workspace
  • Settings — agent configuration and integrations