When you have multiple repositories, keeping coding standards consistent is a challenge. Mesrai supports rule inheritance so you can define rules once and apply them everywhere.
Organization-level rules
Create rules at the organization level and they automatically apply to all repositories:
- Go to Code Review Settings → Global → Mesrai Rules
- Create your rules — they apply to every repository in the organization
- Individual repositories can inherit, override, or exclude specific rules
Rule inheritance
Rules flow down from organization → repository → directory:
- Organization rules apply everywhere by default
- Repository rules can override or extend organization rules
- Directory rules can further specialize for specific paths
A repository can exclude an inherited rule if it doesn’t apply to that codebase.
Cross-repository references
Use @repo:org/project in rule instructions to reference files from other repositories:
Ensure API endpoints follow the pattern defined in @repo:team/api-standards.This lets you maintain a central standards repository that all rules reference.
Memories across the organization
Memories scoped to organization level apply across all repositories. For example:
@mesrai remember: across all repos, we use ESLint flat config format.For details, see Rules Inheritance.