Implementing custom code review rules

Customize Bito’s AI Code Review Agent to enforce your coding practices.

Bito’s AI Code Review Agent offers a flexible solution for teams looking to enforce custom code review rules, standards, and guidelines tailored to their unique development practices. Whether your team follows specific coding conventions or industry best practices, you can customize the Agent to suite your needs.

We support two ways to customize AI Code Review Agent’s suggestions:

  1. Provide feedback on Bito-reported issues in pull requests, and the AI Code Review Agent automatically adapts by creating code review rules to prevent similar suggestions in the future.

  2. Create custom code review guidelines via the dashboard. Define rules through the Custom Guidelines dashboard in Bito Cloud and apply them to agent instances in your workspace.

1- Provide feedback on Bito-reported issues

AI Code Review Agent refines its suggestions based on your feedback. When you provide negative feedback on Bito-reported issues in pull requests, the Agent automatically adapts by creating custom code review rules to prevent similar suggestions in the future.

Depending on your Git platform, you can provide negative feedback in the following ways:

  • GitHub: Select the checkbox given in feedback question at the end of each Bito suggestion or leave a negative comment explaining the issue with the suggestion.

  • GitLab: React with negative emojis (e.g., thumbs down) or leave a negative comment explaining the issue with the suggestion.

  • Bitbucket: Provide manual review feedback by leaving a negative comment explaining the issue with the suggestion.

The custom code review rules are displayed on the Review Rules dashboard in Bito Cloud.

These rules are applied at the repository level for the specific programming language.

By default, newly generated custom code review rules are disabled. Once negative feedback for a specific rule reaches a threshold of 3, the rule is automatically enabled. You can also manually enable or disable these rules at any time using the toggle button in the Status column.

Note: Providing a positive reaction emoji or comment has no effect and will not generate a new code review rule.

After you provide negative feedback, Bito generates a new code review rule in your workspace. The next time the AI Code Review Agent reviews your pull requests, it will automatically filter out the unwanted suggestions.

2- Create custom code review guidelines

We understand that different development teams have unique needs. To accommodate these needs, we offer the ability to implement custom code review guidelines in Bito’s AI Code Review Agent.

Once you add guidelines, the agent will follow them when reviewing pull requests. You can manage guidelines (create, apply, and edit) entirely in the dashboard.

By enabling custom code review guidelines, Bito helps your team maintain consistency and improve code quality.

Note: Custom review guidelines are available only on the Enterprise Plan. Enabling them also upgrades your workspace to the Enterprise Plan. Visit pricing page

How to add a guideline

Step 1: Open the Custom Guidelines tab

Step 2: Fill the form

A. Manual setup

  1. Click Add guidelines button from the top right.

  2. Fill out:

    • Guideline name

    • Language (select a specific programming language or select General if the guideline applies to all languages)

    • Custom Guidelines and Rules (enter your guidelines here)

  3. Click Create guideline.

B. Use a Template

  1. Click Add guidelines button from the top right.

  2. Choose a template from the Use template dropdown menu.

  3. Review/edit fields as needed.

  4. Click Create guideline.

Step 3: Apply to an Agent

  • After creating a guideline, you’ll see an Apply review guideline dropdown.

  • Select the Agent instance, then click Manage review guidelines to open its settings.

To apply the guideline later: go to Repositories, find the Agent instance, click Settings, and manage guidelines there.

Step 4: Save configuration

On the Agent settings page, hit Save (top-right) to apply guideline changes.

Note: Visit the Custom Guidelines tab to edit or delete any guideline.

Managing review guidelines from agent settings

Efficiently control which custom guidelines apply to your AI Code Review Agent through the Agent settings interface.

  1. Go to Repositories dashboard from the Bito Cloud sidebar.

  2. Click Settings next to the target agent instance.

  1. Navigate to the Custom Guidelines section. Here you can either create a new guideline or select from existing guidelines.

  1. Create a new guideline

    • If you click Create a new guideline button, you will see the same form as mentioned earlier where you can enter the details to create a review guideline.

  1. Or select an existing guideline

    • If you click Select from existing guidelines button, you will get a popup screen from where you can select from a list review guidelines you already created. Use checkboxes to enable or disable each guideline for the selected agent and then click Add selected.

  1. Once you’ve applied or adjusted guidelines, click the Save button in the top-right corner to confirm changes.

FAQs

What types of custom code review guidelines can be implemented?

You can implement a wide range of custom code review guidelines, including:

  • Style and formatting guidelines

  • Security best practices

  • Performance optimization checks

  • Code complexity and maintainability standards

  • etc.

Is "custom code review guidelines" feature available in Team Plan?

No, this feature is available exclusively on the Enterprise Plan. Enabling the "custom code review guidelines" feature also upgrades your workspace to the Enterprise Plan.

For more details on Enterprise Plan, visit our Pricing Page.

Last updated

Was this helpful?