Skip to main content
BetaGitHubGitLabBitbucket CloudAzure DevOps
Who can view and manage rules?
  • Admins can create, edit, activate, lock, deactivate, approve, and delete rules.
  • Members can generate rules in the portal. However, these rules appear in the Pending rules tab and require admin approval before becoming active. Members can also view active rules, pending rules, and review rule outcomes during code reviews.

View your rules

In the Qodo portal, navigate to Rules from the left menu.
Qodo portal Rules page showing the grouped rules table, summary analytics cards, grouping controls, and filter controls
The summary cards at the top show rule performance for the last 30 days. See Analyze rule performance across pull requests.

Change how rules are grouped

Use the grouping controls above the table to change how rules are organized:

Anatomy of a rule

A rule consists of the following fields: Rule scope Scope defines where the rule is enforced. You can narrow the scope to limit enforcement:
Rules extracted from supported files (such as AGENTS.md) are automatically scoped to the folder containing that file, with no additional portal configuration needed.
Scope can be edited for a single rule at a time from the rule’s side panel (see Edit rule), or for multiple rules at once (see Manage rules in bulk).
Rule status Status defines whether the rule is used in reviews:

Generate a rule

Use this flow to describe a rule in natural language and let Qodo agent generate a structured draft.
1

Start rule generation

Generate rule button at the top of the Rules page
  1. From Rules, click … next to Import rules.
  2. Select Generate rule.
  3. Enter a short description of the rule’s intent.
  4. Click Generate rule.
Example prompts:
  • “Disallow console.log in production builds”
  • “Avoid SQL string concatenation with user input”
Generate rule dialog in Qodo portal with natural language description input field
2

Review the generated rule draft

Qodo generates a complete rule draft that can be edited before activation.
3

Related rules check

Before activation, Qodo checks for:
  • Conflicts
  • Duplicates
  • Overlapping scope
You can review related rules or revise the draft.
4

Click Accept & activate

Generated rule draft preview showing name, content, and examples ready for review
The rule is added to the table in the Rules tab and enforced automatically according to its defined scope (repositories and optional path patterns).
If you are a member (non-admin), your rule appears in the Pending rules tab for admin review before activation, unless an admin has enabled Auto-approve user suggestions. See Review and activate pending rules.

Manage existing rules

Change a rule’s status from the actions menu (⋮) in the table in the Rules tab, or from the rule’s side panel. Edit and delete rules from the side panel. These actions are optional and can be performed at any time by admins or team admins. To open the rule behind a specific finding, click the rule link in the finding’s Evidence section in the pull request. See Anatomy of a Qodo Code Review.

Reduce noise with automatic deactivation

Qodo automatically deactivates rules that produce findings that are rarely fixed, helping keep reviews focused on actionable rules. Qodo evaluates findings on merged pull requests from the last 90 days. A rule is automatically deactivated when it meets all of the following criteria:
  • Minimum findings: At least 10 findings, including pending and outdated findings.
  • Minimum outcomes: At least 10 scored outcomes (fixed, dismissed, or not fixed).
  • Deactivation threshold: Fewer than 20% of scored outcomes are fixed. Dismissed findings count as outcomes but not as fixed.
Qodo automatically reactivates a deactivated rule when 35% or more of its scored outcomes are fixed. Locked rules are exempt from automatic deactivation.
The passed, detected violations, and merged violations statistics in the Rules view are not used to determine automatic deactivation.

View rules Qodo deactivated

  • Deactivated by Qodo card: Shows how many rules Qodo deactivated in the last 30 days that are still deactivated.
  • Status filter: Shows only rules with the selected statuses, for example, Deactivated by Qodo. Locked rules appear under Active.
  • Repository and file rows: Show how many active and inactive rules each one contains.

Prevent Qodo from deactivating a rule

Lock a rule when you want it enforced in every review.
1

Open the rule

In the Rules page, click a rule to open its side panel.
2

Select Active with the lock icon

At the top of the side panel, click the rule’s current status and select Active with the lock icon .
You can also lock a rule from the actions menu (⋮), or lock several rules at once from the bulk actions bar. See Manage rules in bulk.

Activate or lock a rule again

To use a deactivated rule in reviews again, change its status to Active, or to Active with the lock icon, from the side panel, the actions menu, or the bulk actions bar. A locked rule loses its lock when it’s deactivated. When you activate it again, select Active with the lock icon to prevent Qodo from deactivating it.

Manage rules in bulk

Multiple rules can be activated, locked, deactivated, or rescoped at once from the Rules tab.
1

Select rules

Select the checkbox next to each rule, or select the checkbox in the table’s top row to select every rule at once.
Bulk actions bar with a rule selected, showing Active, Active with a lock icon, Deactivated by user, and Define scope options
2

Choose an action

  • Active, Active , or Deactivated by user: Set the status for all selected rules. See Rule status.
  • Define scope: Set the scope for all selected rules at once. Select Global to apply the selected rules organization-wide, or Specific repositories to select a total of 25 entities (organizations and repositories), with an optional path pattern for each selected repository. See Rule scope for more details on scopes.
3

Apply the change

Status changes apply immediately, and a notification shows how many rules were updated. For Define scope, a confirmation dialog appears before the change is applied. Confirm to apply it to all selected rules.
Define scope for selected rules dialog, showing Global and Specific repositories options with Cancel and Apply buttons
Defining a scope in bulk replaces the current scope on every selected rule. This cannot be undone.
To change all the rules in a repository or file at once, use the switch on its row in the Origin repo view:
  • Off: Deactivates all of its rules. Locked rules lose their lock.
  • On: Activates all of its rules as Active.
  • Mixed statuses: A dialog asks you to set them all to Active or all to Deactivated by user. Locked rules stay locked when you set them all to Active.

Automatic rule updates from files

Qodo continuously monitors files that have already been imported. When changes are merged to one of these files, Qodo processes them and automatically updates the rules to reflect the file’s current contents. The scope of extracted rules is automatically determined by the file’s location in the repository. If a new supported file is added to a repository after that repository was imported, Qodo doesn’t detect it automatically. Re-import the repository from Import rules and skills to pick it up. New rules extracted from supported files are:
  • Added directly as active rules.
  • Enriched with category, severity, scope, and examples.
Only new rules are added this way. Changes to or deletions of existing rules in these files aren’t reflected. Manage those directly from the Rules tab.
Single-tenant customersIf you installed Qodo before the new setup wizard was introduced, your GitHub App may not have the Push event subscription enabled. Without it, Qodo cannot detect changes to supported rule files.To enable it:
  1. Go to your GitHub App settings page.
  2. Select Permissions & events.
  3. Scroll to Subscribe to events.
  4. Check Push.
  5. Click Save changes.
For more details, see GitHub’s documentation.

Fetch rules using get-qodo-rules skill

Supported AI coding agents can access your rules directly using the get-qodo-rules skill. The skill fetches repository specific rules from the Qodo platform API, including organization, repository, and path-level rules, and loads them into the agent context. This allows the agent to reference the same rules that are defined in Qodo. This capability is optional and does not replace Qodo’s rule enforcement. It enables agents to use the rules already configured for the repository. Using the skill requires a Qodo API key and rules configured in the Qodo platform. For more information, see:

Troubleshoot rules and skills import

Check rules and skills import progress and fix import problems from Background activity in the top-right corner of the portal. For more information, see Troubleshoot background processes.

Next steps