Skip to main content
Kody reads the review comments your team wrote on the repository’s pull requests, open or closed, finds the standards reviewers keep repeating, and drafts them as Kody Rules. It takes your existing rules into account so it does not repeat them.
  • It learns from your reviewers’ comments longer than 100 characters. Comments by bots and by Kody itself are left out.
  • It runs per repository.
  • Generated rules show the Kody-generated origin and apply to all files until you set a path.
  • Generated rules are active right away, or wait in Pending review when Kody knowledge approval is on.

Turn it on

  1. In the sidebar, pick Global or a repository in the scope picker at the top of the Code review group, then open Kody Rules.
  2. Click Configuration to open the side sheet.
  3. Turn on Generate from past reviews.
  4. Optionally use the reviewer picker below the toggle (Learning from all reviewers by default) to exclude developers whose review comments Kody should not learn from. It lists the current members and recent pull request authors, and shows Excluding N reviewers once you apply a selection.
The setting follows the usual hierarchy: Global is the default for every repository, and a repository can set its own value. It does not apply per directory. New workspaces are asked during onboarding, in the step Kody learns from your past reviews. It is off unless you turn it on, and it saves the choice at Global level.

When it runs

  • First time for a repository: Kody reads the review comments of the last 3 months. Turning the toggle on at repository level starts this right away and it can take a few minutes. Turning it on at Global level starts nothing at that moment: repositories that follow it are picked up by the next weekly run. This first pass only happens while the repository has no generated rules yet.
  • After that: once a week, Kody reads the comments of the last week. The default schedule is Saturday at 00:00, São Paulo time (America/Sao_Paulo); self-hosted instances can change it with API_CRON_KODY_LEARNING.
There is no minimum amount of history. A repository with no reviewer comments in the window produces no rules. When new rules are created, Kody notifies your team with their titles.

Model requirements

On the cloud, outside the trial, generation uses your own model key, so BYOK must be configured; without it nothing is generated. During the trial Kodus provides the model. Self-hosted instances use the model configured for the deployment. See BYOK.

Review what Kody generated

Generated rules are listed with the Kody-generated origin. Use Filters → Origin → Kody-generated to see only them. Open any of them to edit, pause or delete it like any other rule. To approve rules before they take effect, turn on Kody knowledge approval in the same Configuration sheet. New generated rules then land in Pending review at the top of the page, where you Approve the ones that fit your team and Discard the rest. Only approved rules are enforced. See Approval.
Without approval, generated rules are active as soon as they are created and are enforced on the next code review.
A rule that developers keep ignoring or downvoting can be paused automatically; see Pause ignored and noisy rules.