GitLab AI Hackathon 2026

Break the 200k
Token Limit

Intelligent MR analysis for enterprise monorepos. Mr Ninja chunks, processes, and aggregates merge requests of any size through GitLab Duo's specialist agents.

🔴 Truncated MR reviews 🟡 Incomplete security scans 🔵 Compliance gaps
The Problem

GitLab Duo caps at ~200,000 tokens.
Enterprise MRs are 5-10× that.

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

Truncated Reviews

Large MRs get cut off mid-analysis. Security-critical files in the tail never get scanned. Vulnerabilities slip through.

Problem 02

Incomplete Scans

When context limits hit, security checks skip files. Compliance requirements fail. Automated analysis becomes unreliable.

Problem 03

Developer Frustration

Teams can't get automated analysis for monorepo MRs with 500+ files. Manual review is the only option.

800k+
Tokens in
typical MR
200k
GitLab Duo
context limit
75%
Files never
analyzed
512
Files in demo
monorepo MR
The Solution

Intelligent chunking.
Specialist processing.
Unified aggregation.

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.

🔍
1. Detect
Estimate token footprint. If >150k, activate chunking
📋
2. Plan
Classify files by priority, bin-pack into ~70k chunks
🤖
3. Process
Route to specialist agents based on file type
🔗
4. Context
Carry critical findings across chunks
📊
5. Aggregate
Deduplicate, rank, generate unified report
mr_analysis.log
INFO Analyzing MR #42: monorepo-refactor INFO Estimated tokens: 847,392 WARN Exceeds context limit → activating chunking INFO Classified 512 files into 6 priority tiers INFO Created 12 chunks (avg: 70,616 tokens) Chunk 1/12: Security scan complete (8 CRITICAL) Chunk 2/12: Code review complete (15 HIGH) Chunk 3/12: Dependency check complete # Cross-chunk context maintained... Chunk 12/12: Final aggregation INFO Report posted to MR #42 Analysis complete: 45 findings, Risk: CRITICAL
How It Works

Smart prioritization.
Optimal chunking.
Context preservation.

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

Security-Critical

.env, Dockerfile, *.tf, auth/*, *.pem analyzed first with Security Analyst

Priority 2-4

Entry Points & Logic

main.*, routes/*, api/*, source files analyzed with Code Reviewer

Priority 5-6

Tests & Generated

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.

Features

Built for enterprise scale.
Native to GitLab.

Every feature designed to handle real monorepo complexity with GitLab-native tooling.

🎯

Smart Prioritization

Security-critical files analyzed first. Test files last. Generated files skipped. Zero manual configuration.

🧩

Intelligent Chunking

Bin-packing algorithm creates optimal ~70k token chunks while respecting file boundaries and priorities.

🤖

Specialist Agents

Security Analyst for P1 files, Code Reviewer for logic, Dependency Analyzer for manifests.

🔗

Context Carryover

Critical findings and open questions persist across chunks via compact summaries.

📊

Unified Aggregation

Deduplicates findings, ranks by severity, calculates risk score, generates single report.

💬

GitLab Native

Posts directly as MR comments, integrates with CI/CD, uses GitLab API throughout.

Ready to analyze enterprise-scale MRs?

Get started with Mr Ninja and never hit the context limit again.

Built for the GitLab AI Hackathon 2026

Documentation · GitLab · MIT License

You Orchestrate · AI Accelerates · Nothing Gets Left Behind