How to Build a Custom AI Reviewer Agent (Performance, Accessibility, Style Cop)

5 min read
Share:

Why custom reviewers

The default Agentopias by CynetIQ reviewer is a generalist — it will catch common bugs and style issues across any code. But teams almost always want specialist reviewers too:

  • A Performance Reviewer that knows about N+1 queries, missing indexes, allocation hot paths.
  • An Accessibility Reviewer that flags missing aria labels, contrast issues, keyboard traps.
  • A Frontend State Reviewer that knows your Zustand patterns and flags useState misuse.
  • A SQL Style Cop that enforces your in-house naming conventions on migrations.
Each persona is just a prompt + a model. Agentopias by CynetIQ gives you the harness to define them and pick which one runs on each task.

The five-minute setup

1. Create the agent

/dashboard/agents → New Agent. Set:
  • Name: Performance Reviewer (or whatever).
  • Role: pick one of reviewer, security_developer, qa, lead_developer — used for routing.
  • is_reviewer: ON. (This makes the agent appear in the 🔎 Review picker.)
  • Provider: OpenAI / Anthropic / Google / your self-hosted endpoint.
  • Model: pick the right tradeoff. Performance review is mostly pattern-matching, so gpt-5-mini is plenty.
  • System prompt: this is where the persona lives. See examples below.

2. Write the system prompt

Performance Reviewer (paste this):

``

You are a senior backend performance reviewer. For every patch, focus on:

  • N+1 query patterns (check ORM relationship loading).
  • Missing or unused indexes (look at WHERE/JOIN columns).
  • Synchronous I/O on the hot path.
  • Unbounded loops, list comprehensions, or in-memory accumulations.
  • JSON serialization of large objects.
  • Cache reads that fall through to slow backends.
  • Output format:

    Summary

    Findings (file/line, what's slow, magnitude estimate, fix)

    Severity (critical/high/medium/low/clean)

    Score (0-100)

    Cite specific code. Do not comment on style or naming.

    `

    Accessibility Reviewer:

    `

    You are a WCAG 2.2 AA accessibility reviewer. Focus only on the diff. Check:

  • Interactive elements have keyboard handlers (button vs div onClick).
  • Form inputs have labels (aria-label or
  • Color contrast for new colors against panel-bg.
  • Focus traps in modals.
  • ARIA roles correctly applied (no role="button" on actual
  • Screen-reader-only context for icons.
  • Severity guidelines:

    • critical: keyboard inaccessible critical flow
    • high: missing label / WCAG fail on auth/form path
    • medium: WCAG fail on non-critical UI
    • low: nit
    `

    3. Pick the agent on a task

    Click 🔎 Review on any task. The picker shows:

    • ✨ Auto (resolves from task tags / Integration Rules)
    • Default Reviewer
    • Performance Reviewer
    • Security Developer
    • Accessibility Reviewer
    • (any other is_reviewer agent you've defined)
    Pick yours. The review runs synchronously and the report appears on the task's Reviews tab.

    4. (Optional) Auto-route

    For a persona to fire automatically on certain tasks, define an Integration Rule:

    • "All Sentry issues from the backend-api project → Performance Reviewer"
    • "All Jira tickets with label accessibility → Accessibility Reviewer"
    • "All Azure DevOps work items in Area\\Frontend → Frontend State Reviewer"
    Same rule engine, every source.

    Audit history

    Every reviewer agent has its own history banner on the agent card: severity distribution, average score, click-through to past reports. Filterable on /dashboard/reviews.

    Pro tips

    • Run a cheap model for nits, an expensive model for security. gpt-5-mini for the SQL style cop, gpt-5-pro` for the security_developer.
    • Iterate on prompts in Prompt Studio. Roll back to previous versions if a prompt change degrades quality.
    • Don't mix concerns. A reviewer that checks performance AND security AND style will be mediocre at all three. Build narrow personas.

    Related reading

    Share:

    Agentic AI'ı denemek ister misiniz?

    Ücretsiz başlayın ve Agentopias by CynetIQ'nın 3D agentlarının geliştirme iş akışınızı yönetmesine izin verin.