KnowledgeReview with project context

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:

  1. Go to Code Review SettingsCustom Prompts
  2. Add context like architecture descriptions, team guidelines, or domain knowledge
  3. 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

  1. Define architecture rules via Memories: @mesrai remember: we follow CQRS pattern in this service
  2. Create Review Rules that reference your docs: @file:docs/architecture.md
  3. Connect Jira so Mesrai validates PRs against task requirements
  4. Add Custom Prompts for domain-specific knowledge

For details, see Custom Prompts and Plugins.