Intelligent Reviewer Assignment - Automated CODEOWNERS and DAP Enhancement
### Release notes
Implement intelligent reviewer assignment that closes GitLab's competitive gap with automated CODEOWNERS assignment while establishing DAP as the premium intelligence layer. This delivers competitive parity through native CODEOWNERS automation, then leverages DAP agents to solve the "diffusion of responsibility" problem by selecting optimal individuals from approval groups, driving both competitive positioning and DAP adoption.
### Problem to solve
As a **Development Team Lead**, I need automated reviewer assignment that eliminates manual selection overhead and optimizes review distribution, so I can accelerate review cycle times, prevent bottlenecks, and ensure consistent code quality while maximizing value from our approval workflow investments.
**Current gap**: GitLab lacks automated CODEOWNERS assignment - a standard feature in major competing platforms - putting us behind on essential reviewer workflow capabilities. Additionally, when CODEOWNERS groups are manually assigned, all members receive assignments creating "diffusion of responsibility" where each assumes someone else will handle the review faster.
**Business impact**: Code review bottlenecks account for 86-99% of development lead time according to industry data. Each automated assignment saves 2-5 minutes of manual selection time while improving review distribution and accountability.
#### Research that backs this up
Reviewer selection is the 3rd largest bottleneck in the [Authoring an MR user journey](https://www.figma.com/board/eSG1AtoLlIZDfAffInqRMW/Authoring-an-MR?node-id=2405-2712&t=D5JxYzaRUFxieC7f-1):
* The [SDLC Golden Journey](https://uxr-library.com/research/c8f675a5-4254-41e3-93b0-eec1d5bc631d) research points out the desire for GitLab to suggest reviewers for the MR creator.
* Zendesk [Ticket #586654](https://uxr-library.com/tickets/586654) reveals an gap: A customer inquired about automatic assignment of CODEOWNERS as merge request reviewers. They have CODEOWNERS approvals configured but must manually assign reviewers for each MR.
* Developers in large organizations (on larger dev teams) often struggle to efficiently select reviewers for their MR, as well as receive feedback. Upcoming work in intelligent reviewer selection (or suggestion) may help alleviate this problem. Given customers have actively requested this feature also ensures that users trust AI to handle this step of their journey.
### Intended users
Primary:
* [Delaney (Development Team Lead)](https://handbook.gitlab.com/handbook/product/personas/#delaney-development-team-lead) - Needs to eliminate review assignment overhead and optimize team workload
* [Sasha (Software Developer)](https://handbook.gitlab.com/handbook/product/personas/#sasha-software-developer) - Benefits from automatic assignment without manual reviewer selection
* [Priyanka (Platform Engineer)](https://handbook.gitlab.com/handbook/product/personas/#priyanka-platform-engineer) - Requires consistent approval workflows and governance
Secondary:
* [Dakota (Application Development Director)](https://handbook.gitlab.com/handbook/product/personas/#dakota-application-development-director) - Seeks measurable productivity improvements and team utilization optimization
* [Cameron (Compliance Manager)](https://handbook.gitlab.com/handbook/product/personas/#cameron-compliance-manager) - Benefits from consistent approval rule enforcement
### User experience goal
Users should experience reviewer assignment as automatic and intelligent - CODEOWNERS assignments happen without manual intervention, while DAP enhancement selects the optimal individual reviewer based on workload, timezone, and expertise, eliminating both selection overhead and group assignment diffusion.
### Proposal
#### **Phase 1: Native CODEOWNERS Assignment (Q1 2026)** https://gitlab.com/groups/gitlab-org/-/epics/20708
Implement automatic CODEOWNERS assignment to achieve competitive parity:
- **Automatic Group Assignment**: When MR matches CODEOWNERS patterns, assign all group members individually (matching current `/assign_reviewer @security-team` behavior)
- **CODEOWNERS File Processing**: Parse and evaluate file patterns against MR changed files
- **Manual Override**: Preserve existing reviewer dropdown functionality for custom assignments
- **Audit Trail**: Track automatic vs. manual assignments for analysis
#### **Phase 2: "Enable Duo" Intelligence Toggle (Q2 2026)** https://gitlab.com/groups/gitlab-org/-/epics/20711
Add DAP-powered intelligence layer with clear on/off control:
- **Setting**: "Use GitLab Duo for intelligent reviewer assignment" toggle at project/group level
- **When Enabled**: DAP automatically assigns optimal reviewers for ALL approval requirements (CODEOWNERS, approval rules, approval policies, push rules), eliminating manual selection
- **Individual Selection**: For group assignments, select best individual instead of assigning everyone (solves diffusion of responsibility)
- **Workload Balancing**: Consider existing review workload and complexity across team members
- **Timezone Optimization**: Prioritize reviewers in compatible timezones for faster review cycles
- **When Disabled**: Falls back to native CODEOWNERS assignment (Phase 1 behavior)
**Potential Future Iterations:**
Enhanced DAP capabilities for sophisticated assignment logic:
- **Expertise Matching**: Leverage Knowledge Graph for deep code ownership and skill-based matching
- **Change Analysis**: Consider MR complexity, risk level, and cross-functional requirements
- **Learning Loop**: Adapt assignment patterns based on review outcomes and cycle times
- **Natural Language Explanations**: Provide reasoning for assignment decisions
- **Smart Reassignment**: Handle reviewer unavailability and workload changes dynamically
**Technical Implementation:**
1. **Native Assignment Engine:**
- Leverage existing CODEOWNERS parsing and file pattern matching infrastructure
- Build automatic assignment logic using current CODEOWNERS data and group resolution
- Integrate with existing reviewer dropdown and assignment APIs
- Implement group member resolution and individual assignment creation
2. **DAP Integration Architecture:**
- Create "Intelligent Assignment Agent" within DAP ecosystem
- Implement assignment optimization algorithms using reviewer metadata
- Build workload analysis using existing MR assignment data and complexity metrics
- Add timezone-aware assignment logic using user profile information
3. **Assignment Decision Framework:**
- **Filtering**: Remove busy reviewers, unavailable users, permission-ineligible members
- **Scoring**: Rank candidates by workload (0-6+ assigned reviews), timezone compatibility, historical expertise
- **Selection**: Choose optimal individual for groups, validate assignments for compliance
- **Fallback**: Graceful degradation to manual selection if DAP unavailable
**Acceptance Criteria:**
- CODEOWNERS assignment achieves \>95% accuracy in pattern matching and group resolution
- DAP toggle provides clear on/off behavior with immediate assignment changes
- Assignment decisions complete within \<2 seconds for typical MR complexity
- All assignments respect existing approval rules and permission requirements
- Telemetry captures assignment method, decision reasoning, and outcome metrics
### Documentation
- Create setup guides for CODEOWNERS file configuration and approval rule integration
- Document DAP toggle configuration and assignment algorithm behavior
- Provide troubleshooting guides for assignment failures and edge cases
- Add admin documentation for group-level policy configuration and inheritance
- Update API documentation for programmatic assignment control and status queries
### Availability & Testing
**Risk Assessment:** Medium - Assignment logic affects critical approval workflows and must handle edge cases gracefully.
**Test Coverage:**
- **Unit tests:** CODEOWNERS pattern matching, group member resolution, assignment creation logic
- **Integration tests:** DAP agent integration, assignment algorithm correctness, approval rule compliance
- **Performance tests:** Assignment decision speed under high MR volume and complex CODEOWNERS patterns
**Scalability Considerations:**
- Assignment decisions must scale to GitLab.com volume
- CODEOWNERS parsing optimized for large files and complex pattern hierarchies
- DAP agent invocation rate-limited to prevent service overload
- Caching of assignment decisions and reviewer metadata for performance
### Feature Usage Metrics
**Assignment System Performance:**
- CODEOWNERS Detection Accuracy: % of MRs correctly matched to ownership patterns
- Assignment Completion Rate: % of approval requirements successfully assigned reviewers
- DAP Toggle Adoption: % of projects with intelligent assignment enabled by tier
**Assignment Quality & Distribution:**
- Review Assignment Distribution: Workload balance across team members over time
- Assignment-to-Review Latency: Time from assignment to first review interaction
- Manual Override Rate: % of automatic assignments manually changed by users
**Platform Engagement:**
- DAP credit consumption from assignment intelligence operations
- User satisfaction with assignment accuracy and reviewer selection quality
- Feature adoption progression from native CODEOWNERS to DAP enhancement
### What does success look like, and how can we measure that?
Success means GitLab achieves competitive parity with automated CODEOWNERS assignment while establishing DAP as essential for assignment intelligence, driving both feature adoption and platform differentiation through workflow optimization.
**Primary Success Metrics (6-12 months):**
- Greater than 90% of approval-required MRs receive automatic reviewer assignments without manual intervention
- Significant reduction in time from MR creation to first review assignment
- Strong DAP toggle adoption among Ultimate tier customers using approval workflows
- Measurable improvement in review workload distribution across teams
**Key Leading Indicators (0-3 months):**
- CODEOWNERS assignment accuracy and system performance metrics
- DAP toggle configuration rate among eligible projects
- User satisfaction with automatic assignment quality and reviewer selection
### What is the competitive advantage or differentiation for this feature?
**Competitive Parity Plus Intelligence**: GitLab matches competitors' automatic CODEOWNERS assignment while adding unique DAP-powered intelligence that solves assignment optimization problems other platforms don't address.
**Diffusion of Responsibility Solution**: Unlike competitors who assign entire groups, GitLab's DAP enhancement selects optimal individuals, improving accountability and review response times through intelligent workload distribution.
**Unified Platform Integration**: Assignment intelligence leverages complete GitLab context (approval workflows, team structure, project history) rather than operating as an isolated feature, creating platform stickiness.
**Enterprise Governance Alignment**: Assignment automation respects and enhances existing approval policies rather than bypassing governance controls, making it suitable for regulated industries and compliance-focused organizations.
### Links / references
**Technical Documentation:**
- [Advanced Reviewer Sorting Implementation Analysis](https://docs.google.com/document/d/1Hb3OXmeUzVFgfEuW3kTISTuiFBQ0k82XIlkDTLK1Tyg/edit?tab=t.0#heading=h.qen8y9ys36x8)
- [Intelligent Reviewer Sorting Strategic Analysis](https://docs.google.com/document/d/15Ru091ct9NI-HClpgvpbyaFSn70snvYtHpyubJOi0qo/edit?tab=t.0#heading=h.i2txi748684)
epic