Inspiration

Every engineering team has documentation debt. Developers open merge requests, write "fixed the thing" in the description, and merge without a changelog, release notes, or risk assessment. Three months later, nobody knows what changed or why — until a breaking change ships without migration steps or an incident hits and nobody can trace what went out.

I wanted to build something that eliminates this problem entirely — zero developer effort, fully automated.

What it does

MR Chronicle is a multi-agent AI pipeline that automatically reviews, documents, and creates actionable developer handoffs for every GitLab merge request.

When triggered, three specialized agents run in sequence:

  1. Diff Analyzer — reads every changed file, categorizes the change, detects breaking changes, and performs a risk assessment (security, performance, test coverage, dependencies)
  2. Context Gatherer — looks up linked issues, checks acceptance criteria compliance, reads existing changelog conventions, and gathers release context
  3. Chronicle Writer — posts a full report as an MR comment, commits a changelog update, and labels the MR

The report includes a Merge Readiness Score (green/yellow/red), and ends with a Developer Handoff — a copy-pasteable prompt block that any AI coding agent can execute to fix flagged issues immediately.

Each agent also works independently via GitLab Duo Chat.

How I built it

  • Platform: GitLab Duo Agent Platform (Flows + Custom Agents)
  • AI Model: Anthropic Claude via GitLab AI Gateway
  • Architecture: 3-agent pipeline with routed data flow between components
  • Trigger: @mention or assign-reviewer on any merge request
  • Actions: GitLab API tools — create_merge_request_note, create_commit, update_merge_request, get_issue, list_merge_request_diffs, get_repository_file

Why Anthropic Claude

  • Convention matching — Claude reads an existing changelog and reproduces the exact style (verb tense, link format, category headers). Not template filling — language understanding.
  • Risk reasoning — The Diff Analyzer understands that logging paymentData near a payment flow is a potential PII exposure, and explains why.
  • Multi-step planning — The Chronicle Writer reads context from two previous agents, generates 7 report sections, and executes 3 GitLab API actions in one turn.

Challenges I ran into

  • Multi-agent routing required the explicit from/as input format — simple string inputs silently broke data flow between agents
  • The platform is in beta, so debugging meant reading raw CI job logs to trace agent execution
  • Finding the right prompt length balance between specificity and reliability

What I learned

  • Documentation debt is universal but invisible until something breaks
  • The Duo Agent Platform's flow system is powerful for orchestrating multi-step AI workflows with real actions
  • The Developer Handoff turned out to be the most impactful feature — it closes the loop from review to fix

What's next

  • Auto-trigger on every MR via default reviewer (zero human involvement)
  • Merge blocking rules tied to readiness score
  • Cross-MR trend analysis for documentation quality over time

Built With

  • anthropic-claude
  • gitlab-api
  • gitlab-ci/cd
  • gitlab-duo-agent-platform
  • yaml
Share this project:

Updates