Generic code review catches generic issues. To get feedback that’s actually relevant to your project, Mesrai needs to understand your specific context — architecture decisions, conventions, and business rules.
Ways to provide context
Memories
Teach Mesrai your conventions through conversation:
@mesrai remember: this project uses hexagonal architecture.
Domain layer must never depend on infrastructure.Memories persist and are applied across all future reviews.
File references in rules
Reference your own documentation directly in rules:
Instructions: Validate that new endpoints follow the patterns
in @file:docs/api-conventions.md and use the base classes
defined in @file:src/shared/base-controller.ts.Custom prompts
Add project-specific instructions that Mesrai includes in every review:
- Go to Code Review Settings → Custom Prompts
- Add context like architecture descriptions, team guidelines, or domain knowledge
- Mesrai includes this in every code review analysis
MCP plugins
Connect external tools to give Mesrai access to richer context:
- Jira/Linear — task requirements and acceptance criteria
- Slack — team discussions and decisions
- Google Docs — specs and design documents
- Custom MCP servers — any tool your team uses
Example workflow
- Define architecture rules via Memories:
@mesrai remember: we follow CQRS pattern in this service - Create Review Rules that reference your docs:
@file:docs/architecture.md - Connect Jira so Mesrai validates PRs against task requirements
- Add Custom Prompts for domain-specific knowledge
For details, see Custom Prompts and Plugins.