Agentic Engineering in a large codebase

the GitLab example

Gerardo Navarro, B310 Digital GmbH,
GitLab Level 5 Contributor · 381 merged MRs since 2020

GitLab: big and grown over time

Age

since 2011

GitLab monolith (Ruby, Rails, Vue, Go, …)
History

~595,000

commits on master
Size

~121,000

files, ~9.5 million lines of code, two thirds of it tests
Conventions

683

pages of developer guidelines, ~1 million words
People

~1,500

people committed in the last 12 months
Pace

~170

merged MRs per working day
Source: gitlab-org/gitlab at b673578c, 29 Nov 2026; git log over the last 12 months

Rails yes, GitLab Rails no

Open#427477todoCreate: null errorsIssueshort description 📚LLM training dataRails, Vue, Go in general 🤖Agent GitLab conventionsnot in the issue CE or EE?Zero downtime?Feature flag?Sharding key?Which tests?Commit format? </> Merge request

How GitLab guides the agent

🤖Claude Code · OpenCode · GitLab Duo (GitLab's agent) CLAUDE.md@AGENTS.md AGENTS.mdrouter, 71 lines 1 workhorse/, doc/ …AGENTS.md per directory .ai/*.mdGit, MR, CI, review, security Skill coding-principlesindex, 22 groups 49 rule filesloaded only when needed 2 📚docs.gitlab.com683 pages generated weeklyone MR per team 3

In the code

How the agent setup grew at GitLab

How the rules stay current

Docssource of truth, owned by teams Distiller agentextracts rules, keeps baseline One MR per teamowners approve Rules livefor all agents every week live since May 2026 output A/B testedonce before go-live

What GitLab measured

Linters and tests saw no difference. Only convention checks did.

Convention checks

Clear gain

Banned test pattern stub_feature_flags(…: true), occurrences in 60 runs each
without rules64
with rules0
Feature-flag milestone right: 0/10 → 10/10
Linters and tests

No difference

RuboCop and RSpec pass rates

=

Same with and without rules: green CI does not show whether a rule works
Cost

More tokens

Tokens per task, without rules = 100
without rules100
with rules128
About $0.07 per task
A/B test by a GitLab team member, 120 runs over 6 tasks: !232403 · test setup

What to take home

Making a codebase agent‑ready

  • Start small: an AGENTS.md as a router, not a handbook
  • Observed failures only: every rule fixes something that went wrong
  • Docs are the source of truth: auto-generate rules for agent skills from the sources
  • Measure conventions: count rule violations in the agent's code, green CI won't show them
  • Agent config is code: review, owners, linter, CI

Slides

b310.de/blog

Gerardo Navarro · B310 Digital GmbH · www.b310.de
B310 helps development teams adopt agentic engineering.

Want to continue the discussion about agentic coding?

Join the Agentic Coding Stammtisch Kiel