Instance-Level Custom Instructions for Duo Code Review
<!--IssueSummary start-->
<details>
<summary>
Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards.
</summary>
- [Label this issue](https://contributors.gitlab.com/manage-issue?action=label&projectId=278964&issueIid=586970)
</details>
<!--IssueSummary end-->
## 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 https://gitlab.com/groups/gitlab-org/-/epics/16938#note_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.
issue