Engineers needed a way to know whether a service-wide knowledge base actually helped coding agents plan changes.

Without a metric, added context could make agents slower, more expensive, or even worse.

The team solved it by: 👉 Build an offline knowledge base from code analysis and LLM-generated flow documents. 👉 Replay each merged MR on a pre-merge worktree, running two agents - one with, one without the knowledge base. 👉 Grade the resulting plans against the merged diff and compare scores.

The parts that matter: 1️⃣ knowledge base skill - provides agents with structured files describing call graphs, configs and design decisions 2️⃣ LLM grader - scores each plan against the merged diff using an 8-point rubric

Every stack beat the strongest stack without the knowledge base; the number of full-mark plans nearly tripled and the weakest quarter rose from about half marks to about three quarters.

Adding more context increases the knowledge base size, which can consume agent attention and become stale; the team therefore filters out small or irrelevant changes and only adds flow documents and impact maps first, accepting that some updates will be blocked if they lower scores. Maintaining the replay test also adds engineering overhead for each knowledge update.

How do you balance the richness of a knowledge base against the risk of it becoming noisy or outdated?