Instance-Level Custom Instructions for Duo Code Review

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Label this issue

Proposal: Instance-Level Custom Instructions for GitLab Duo Code Review

Summary

GitLab Duo Code Review currently supports custom review instructions only at the project level via the file:

  • .gitlab/duo/mr-review-instructions.yaml

This proposal suggests supporting instance-level custom instructions, especially for self-managed GitLab deployments.


Problem

In self-managed GitLab instances, teams often want consistent code review guidance (for example, security rules or internal coding standards).

Today, this requires adding the same instruction file to every project, which:

  • Is repetitive and hard to maintain
  • Easily leads to inconsistency between projects
  • Lacks centralized control

Proposal

Allow GitLab administrators to define default Duo Code Review instructions at the instance level.

  • Instance-level instructions are used by default
  • Project-level instructions (via .gitlab/duo/mr-review-instructions.yaml) can override them

Why This Matters

  • Enables organization-wide consistency
  • Reduces operational overhead
  • Matches GitLab’s general pattern of hierarchical configuration
  • This requirement is requested by many clients:

    A recurring feedback I've got from the field is the lack of capacity to apply things (most recent one was the PREFIX used to target their registry, where they store all their images) at the instance level.

    Many (enterprise) companies have several hundreds or even thousands of groups at the root level and need to apply the same rules on all of them. This should be taken into consideration.Many (enterprise) companies have several hundreds or even thousands of groups at the root level and need to apply the same rules on all of them. This should be taken into consideration.

    From &16938 (comment 2601457155)


Scope

  • Primarily targets self-managed GitLab instances
  • Keeps existing project-level behavior unchanged

Notes

This is a feature proposal / discussion starter.
Implementation details (UI, configuration format, precedence rules) can be defined later.

Edited Jan 26, 2026 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading