Intelligent MR analysis for enterprise monorepos. Mr Ninja chunks, processes, and aggregates merge requests of any size through GitLab Duo's specialist agents.
For real enterprise monorepos with hundreds of changed files and massive diffs, the context limit means truncated reviews, missed vulnerabilities, and compliance gaps. A single MR can easily generate 500,000-1,000,000 tokens of diff content.
Problem 01
Large MRs get cut off mid-analysis. Security-critical files in the tail never get scanned. Vulnerabilities slip through.
Problem 02
When context limits hit, security checks skip files. Compliance requirements fail. Automated analysis becomes unreliable.
Problem 03
Teams can't get automated analysis for monorepo MRs with 500+ files. Manual review is the only option.
Mr Ninja breaks oversized MRs into optimally-sized chunks, routes each to the right specialist agent (Security Analyst, Code Reviewer, Dependency Analyzer), maintains context across chunks, and synthesizes a unified analysis report.
Files are classified into 6 priority tiers. Security-critical files like .env, Dockerfile, and auth handlers are analyzed first. Generated files are skipped. Chunks target 70k tokens with cross-chunk context maintained throughout.
Priority 1
.env, Dockerfile, *.tf, auth/*, *.pem analyzed first with Security Analyst
Priority 2-4
main.*, routes/*, api/*, source files analyzed with Code Reviewer
Priority 5-6
tests/* analyzed last. node_modules/*, *.min.js skipped entirely
CROSS-CHUNK CONTEXT
After each chunk, a compact summary is carried forward: CRITICAL and HIGH findings persist, open questions are tracked, and key exports are noted. Maximum overhead: 2,000 tokens.
Every feature designed to handle real monorepo complexity with GitLab-native tooling.
Security-critical files analyzed first. Test files last. Generated files skipped. Zero manual configuration.
Bin-packing algorithm creates optimal ~70k token chunks while respecting file boundaries and priorities.
Security Analyst for P1 files, Code Reviewer for logic, Dependency Analyzer for manifests.
Critical findings and open questions persist across chunks via compact summaries.
Deduplicates findings, ranks by severity, calculates risk score, generates single report.
Posts directly as MR comments, integrates with CI/CD, uses GitLab API throughout.
Get started with Mr Ninja and never hit the context limit again.