> ## Documentation Index
> Fetch the complete documentation index at: https://docs.codealive.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Code Review

> Automated intelligent code reviews for every pull request

## Overview

CodeAlive AI Code Review automatically analyzes your pull requests, providing comprehensive feedback on code quality, security, performance, and best practices. Get instant, consistent reviews that help your team ship better code faster.

## Key Features

<CardGroup cols={2}>
  <Card title="Automatic Reviews" icon="robot">
    Reviews trigger automatically on PR creation and updates
  </Card>

  <Card title="Multi-Language Support" icon="code">
    Support for 19+ programming languages
  </Card>

  <Card title="Customizable Focus" icon="bullseye">
    Configure review agents for specific concerns
  </Card>

  <Card title="Team Consistency" icon="users">
    Maintain coding standards across your organization
  </Card>
</CardGroup>

## Getting Started

<Steps>
  <Step title="Connect Your Repository Provider">
    Choose your version control platform:

    <Tabs>
      <Tab title="GitHub">
        Navigate to **Providers → GitHub** in your CodeAlive dashboard
      </Tab>

      <Tab title="GitLab">
        Navigate to **Providers → GitLab** in your CodeAlive dashboard
      </Tab>
    </Tabs>
  </Step>

  <Step title="Configure Review Settings">
    Set up your review preferences in the PR Reviews section
  </Step>

  <Step title="Create a Pull Request">
    CodeAlive will automatically review new PRs and updates
  </Step>
</Steps>

## GitHub Integration

### Installing the GitHub App

<Steps>
  <Step title="Access GitHub Settings">
    Navigate to **Providers → GitHub** in your CodeAlive dashboard

    <Frame>
      <img src="https://mintcdn.com/codealive/SZlXGtmtipDDYs2P/images/github_settings.png?fit=max&auto=format&n=SZlXGtmtipDDYs2P&q=85&s=24da2299cc637d074e842331c32ad389" alt="GitHub Integration Settings" width="3016" height="1670" data-path="images/github_settings.png" />
    </Frame>
  </Step>

  <Step title="Install GitHub App">
    1. Click **"Install GitHub App"**
    2. You'll be redirected to GitHub
    3. Select your organization or personal account
    4. Choose repository access:
       * **All repositories** - Recommended for organization-wide coverage
       * **Selected repositories** - Choose specific repositories
  </Step>

  <Step title="Authorize Installation">
    1. Review the requested permissions
    2. Click **"Install & Authorize"**
    3. You'll be redirected back to CodeAlive
    4. The status will show **"GitHub App Successfully Installed"**
  </Step>

  <Step title="Import Repositories">
    Once connected:

    * Click **"Import Repositories"** to add repos for indexing
    * Select the repositories you want to review
    * Wait for initial indexing to complete
  </Step>
</Steps>

## GitLab Integration

### Setting Up GitLab Access

<Steps>
  <Step title="Create Personal Access Token">
    In GitLab:

    1. Go to **User Settings → Access Tokens**
    2. Create a new token:
       * **Name**: CodeAlive
       * **Expiration**: Set as needed
       * **Scopes**: Select `api` and `read_repository`
    3. Copy the generated token
  </Step>

  <Step title="Configure in CodeAlive">
    1. Navigate to **Providers → GitLab** in CodeAlive
    2. Paste your Personal Access Token
    3. Click **"Token Set"**

    <Frame>
      <img src="https://mintcdn.com/codealive/SZlXGtmtipDDYs2P/images/gitlab_settings.png?fit=max&auto=format&n=SZlXGtmtipDDYs2P&q=85&s=9b50deac7c8efb940d57d5e03bfca5f2" alt="GitLab Integration Settings" width="3016" height="1670" data-path="images/gitlab_settings.png" />
    </Frame>
  </Step>

  <Step title="Set Up Webhooks">
    Configure GitLab webhooks for automatic reviews:

    1. Copy the webhook URL from CodeAlive
    2. In your GitLab project:
       * Go to **Settings → Webhooks**
       * Add the CodeAlive webhook URL
       * Select triggers:
         * Merge request events
         * Comments
    3. Click **"Secret Configured"** in CodeAlive
  </Step>

  <Step title="Import Repositories">
    * Click **"Import Repositories"**
    * Select GitLab projects to analyze
    * Complete the setup
  </Step>
</Steps>

## Review Configuration

### Customizing Review Behavior

Access review settings by clicking **"Repository Review Configuration"** in the PR Reviews section.

<Frame>
  <img src="https://mintcdn.com/codealive/SZlXGtmtipDDYs2P/images/review_settings.png?fit=max&auto=format&n=SZlXGtmtipDDYs2P&q=85&s=222017799c912ccdad07ea3afcdd8b50" alt="Review Configuration Settings" width="3016" height="1670" data-path="images/review_settings.png" />
</Frame>

### Quick Settings

<Tabs>
  <Tab title="Nitpicking Level">
    Control the detail level of reviews:

    * **Minimal (1)**: Critical issues only
    * **Basic (2)**: Important problems
    * **Balanced (3)**: Comprehensive review (recommended)
    * **Detailed (4)**: Include minor issues
    * **Thorough (5)**: Every possible improvement
  </Tab>

  <Tab title="Review Language">
    Choose the language for review comments:

    * English (default)
    * Spanish
    * French
    * German
    * Japanese
    * Chinese
    * And many more...

    This setting controls the language of the review feedback, not the programming languages supported.
  </Tab>

  <Tab title="Review Style">
    Choose the tone of feedback:

    * **Professional**: Formal, technical feedback
    * **Friendly**: Approachable and encouraging
    * **Constructive**: Balanced with suggestions
    * **Direct**: Straight to the point
  </Tab>
</Tabs>

### Focus Areas

Enable or disable specific review agents:

<AccordionGroup>
  <Accordion title="Security" icon="shield">
    Reviews code for potential security vulnerabilities, authentication issues, and data exposure risks
  </Accordion>

  <Accordion title="Performance" icon="gauge">
    Analyzes code efficiency, identifies bottlenecks, and suggests optimizations
  </Accordion>

  <Accordion title="Architecture" icon="building">
    Evaluates code structure, design patterns, and architectural decisions
  </Accordion>

  <Accordion title="Consistency" icon="equals">
    Checks for coding standards, naming conventions, and style consistency
  </Accordion>

  <Accordion title="Quality" icon="star">
    Reviews overall code quality, maintainability, and best practices
  </Accordion>

  <Accordion title="Jira Task Validation" icon="check">
    Validates pull requests against linked Jira tasks to ensure requirements are met
  </Accordion>
</AccordionGroup>

### General Instructions

Add custom guidelines that apply to all review agents. This is useful for:

* Team-specific conventions
* Project requirements
* Domain-specific rules
* Compliance standards

Example:

```
- Follow our team's error handling patterns
- Ensure all API endpoints have proper authentication
- Use TypeScript strict mode conventions
- Include unit tests for new functions
```

## Managing Reviews

### PR Reviews Dashboard

The PR Reviews page shows all pull requests across your repositories:

<Frame>
  <img src="https://mintcdn.com/codealive/SZlXGtmtipDDYs2P/images/review_page.png?fit=max&auto=format&n=SZlXGtmtipDDYs2P&q=85&s=c6dcd24ad4e79e3e077c64ec55024894" alt="PR Reviews Dashboard" width="3016" height="1670" data-path="images/review_page.png" />
</Frame>

Features:

* **Repository selector**: Filter by repository
* **Import PRs**: Manually import pull requests
* **Auto-refresh**: Keep the list updated
* **Automatic Review**: Toggle automatic reviews on/off

### Review States

Pull requests can have the following states:

* **Review Scheduled**: Queued for review
* **Review Completed**: Review finished successfully
* **Re-analyze**: Request a fresh review

### Triggering Reviews

Reviews can be triggered in multiple ways:

<Tabs>
  <Tab title="Automatic">
    Reviews trigger automatically when:

    * A new PR is created
    * Commits are pushed to an open PR
    * PR is updated or edited
  </Tab>

  <Tab title="Manual via UI">
    1. Go to PR Reviews page
    2. Find your pull request
    3. Click **"Re-analyze"**
  </Tab>

  <Tab title="PR Comments">
    Add a comment to your PR:

    ```
    /codealive review
    ```
  </Tab>
</Tabs>

## Best Practices

<CardGroup cols={2}>
  <Card title="Start Balanced" icon="balance-scale">
    Begin with balanced settings (level 3) and adjust based on team feedback
  </Card>

  <Card title="Customize Gradually" icon="sliders">
    Enable focus areas one at a time to understand their impact
  </Card>

  <Card title="Use Clear PR Titles" icon="heading">
    Descriptive PR titles help AI understand context better
  </Card>

  <Card title="Iterate on Config" icon="repeat">
    Review and refine settings based on team needs
  </Card>

  <Card title="Set Team Guidelines" icon="book">
    Use general instructions for team-specific rules
  </Card>

  <Card title="Monitor Feedback" icon="chart-line">
    Track which suggestions are most valuable
  </Card>
</CardGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Reviews not triggering automatically">
    **Check:**

    * Automatic Review toggle is enabled
    * Repository is properly indexed
    * Webhooks are configured (GitLab)
    * GitHub App has proper permissions
  </Accordion>

  <Accordion title="Reviews taking too long">
    **Normal duration**: 2-5 minutes depending on PR size

    **If longer:**

    * Check repository indexing status
    * Verify API limits aren't exceeded
    * Contact support if persistent
  </Accordion>

  <Accordion title="Missing or incomplete reviews">
    **Verify:**

    * All files in PR are in supported languages
    * PR isn't too large (>1000 files)
    * Repository is fully indexed
    * Review configuration is saved
  </Accordion>

  <Accordion title="Webhooks not working (GitLab)">
    **Steps:**

    1. Verify webhook URL is correct
    2. Check webhook test in GitLab settings
    3. Ensure merge request events are selected
    4. Confirm secret token matches
  </Accordion>
</AccordionGroup>

## Related Resources

* [Semantic Code Search](/features/semantic-search)
* [Codebase Chat](/features/codebase-chat)
* [Multi-Repository & Workspaces](/features/multi-repo)
* [API Reference](/api-reference/toolapi/list-visible-data-sources)
* [Getting Started](/quickstart)
* [MCP Integrations](/integrations/mcp)
