GitLab AI Catalog · New Agent

Eliminate MR
Review Debt

A GitLab Duo Agent Platform agent powered by GitLab Orbit that triages stale merge requests, recommends reviewers from the knowledge graph, and files weekly debt reports — automatically.

Review debt is the silent killer of engineering velocity

Your team isn't bad at code review. You're missing infrastructure. MRs stall, contexts evaporate, reviewers get piled on, and eventually that 2-hour feature becomes a 2-week archaeology project.

Nobody deliberately lets MRs rot. It happens in the gap between the tools you have and the process you can realistically maintain.

4.2d
Median first-review latency The industry average. In your team it might be higher.
<30%
Merge probability after 7 days MRs that age past one week rarely make it. They die quietly.
Cost to resurrect a stale MR Rebase, re-review, re-test — all because nobody nudged at day 4.

Four steps. Zero manual triage.

MR Debt Sentinel runs as a scheduled flow every Monday morning, or on demand from GitLab Duo Chat.

01

Scan all open MRs via Orbit

The scanner agent pulls every open MR in your project and enriches each with Orbit context: pipeline status, conflict presence, reviewer load, file ownership from the knowledge graph — not just raw metadata.

list_merge_request_diffs get_pipeline_failing_jobs run_glql_query gitlab_graphql
02

Classify by severity rubric

Each MR is classified: 🔴 CRITICAL (pipeline failing + conflicts + 14d old), 🟠 HIGH (no reviewer + 7d old), 🟡 MEDIUM (inactive reviewer + 3d old), 🟢 LOW (healthy). No guessing — deterministic criteria applied consistently.

get_merge_request list_all_merge_request_notes gitlab_api_get
03

Act: label, nudge, recommend

The triage agent applies labels, posts respectful nudge comments tagging Orbit-recommended reviewers (ranked by commit ownership + reviewer load), and never piles on someone already handling 5+ reviews.

create_merge_request_note update_merge_request gitlab__user_search
04

File the weekly debt report

The report writer creates a structured GitLab issue every Monday: executive summary, heat map by file area, top-5 oldest MRs, trend vs. last week, and concrete recommended actions with suggested owners.

create_issue gitlab_issue_search create_issue_note

Consistent. Transparent. Explained.

🔴
Critical

Immediate action

Age > 14d + pipeline failing + merge conflicts. Structured comment, tracking issue created, escalation to maintainers.

🟠
High

Reviewer needed

Age > 7d, no reviewer assigned. Orbit identifies the best available reviewer. Nudge comment with rationale posted.

🟡
Medium

Light nudge

Age > 3d, reviewer assigned but inactive. A friendly reminder — one per 48 hours, never more.

🟢
Low

Healthy

Age < 3d, active reviewer. Label applied only. No comment spam on healthy MRs.

Smarter than
a cron job

GitLab Orbit maps code, work items, pipelines, deployments, and production signals into a single knowledge graph. MR Debt Sentinel queries it to understand why an MR is stale — not just how long.

When the sentinel recommends a reviewer, it's not picking the first person in CODEOWNERS. It's ranking by: 90-day commit frequency on the changed files, current reviewer load across the project, and last-modified ownership weight.

11×
faster agent responses with Orbit context
4.5×
fewer tokens consumed per triage run
45×
fewer hallucinations vs. full-codebase scan
0
manual context prep required by developers

One install. Five components.

Component Type Purpose Trigger
mr-debt-sentinel Agent On-demand interactive triage via Duo Chat Natural language
mr-debt-weekly-report-flow Flow Scheduled Monday scan → label → report (3-agent pipeline) Cron + /run-debt-report
mr-health-check Skill Single-MR health assessment with Orbit data /mr-health-check !{iid}
orbit-context-fetch Skill Orbit-powered reviewer recommendation engine /orbit-context-fetch
stale-mr-closer Skill Safe, auditable stale MR closure with full comment trail /stale-mr-closer !{iid}

Running in 3 steps

01

Enable in AI Catalog

Navigate to Explore → AI Catalog → Agents. Search "MR Debt Sentinel". Enable in your top-level group, then in your project.

02

Create the labels

Run the provided glab snippet to create the six triage labels, or create them manually in Project → Manage → Labels.

03

Customise & go

Copy AGENTS.md to your project root. Adjust thresholds, protected paths, and tone preferences to match your team culture.

GitLab Duo Chat — your-project
you → triage all stale MRs

🛰️ Sentinel scanning 47 open MRs via Orbit...
🔴 CRITICAL !103 feat: refactor auth middleware (19 days, pipeline failing)
🔴 CRITICAL !89 fix: memory leak in worker pool (22 days, conflicts)
🟠 HIGH !97 chore: update dependencies (9 days, no reviewer)
🟠 HIGH !88 feat: add rate limiting (8 days, no reviewer)
🟡 MEDIUM !112 docs: update API reference (4 days, @alice inactive)
 
Orbit reviewer recommendation for !97:
→ @charlie (8 commits to src/deps/ in 90d, 2 open reviews)
→ @diana (5 commits, 1 open review) [recommended]
 
sentinel → Labels applied to 5 MRs. Nudge comments posted on HIGH + CRITICAL. Weekly debt report filed as issue #234.

Powerful, not reckless

An agent that can act on your repository needs constraints you can trust. These are non-negotiable.

🚫

Never closes MRs autonomously

Stale MR closures require explicit auto-close approved confirmation from a human in the current session. The draft comment is always shown first.

⚖️

Reviewer overload protection

Any reviewer with 5+ open review requests is marked as overloaded and skipped. The sentinel never makes the reviewer pile-on problem worse.

🔒

Security branch escalation-only

MRs on branches matching security/ or cve receive comment-only treatment. No autonomous reassignment on sensitive work.

🏳️

do-not-triage respected

Any MR labelled do-not-triage is unconditionally skipped in all agent actions. Exempt your WIP/experiment branches permanently.

📋

Full audit trail on every closure

Before closing, a structured comment is posted with the specific criteria met and a clear path to reopen. Nothing is silent.

🛣️

Protected path configuration

Define paths in AGENTS.md that require human-only triage: DB migrations, CI config, CODEOWNERS — the sentinel reports but never acts on them.

Stop losing MRs
to review debt

Enable MR Debt Sentinel in the GitLab AI Catalog and let Monday morning start with a clean triage report, not a backlog of confusion.