Skip to content
← All work

DEVELOPER TOOLING / CI-CD / MCP

CI Guardian

Pipeline risk scoring and failure diagnosis inside GitLab Duo

Role
Engineering
Platform
GitLab Duo agent · FastAPI service
Year
2026
Category
AI / MACHINE LEARNING
HackathonGitLab AI Hackathon2025–2026
CI Guardian risk score and pipeline analysis

Overview

A developer-tooling agent for the GitLab Duo Agent Platform. It scores a .gitlab-ci.yml for risk before it merges, and when a pipeline does fail it reads the job logs and reports a root cause with a copy-pasteable fix. Built for the GitLab AI Hackathon.

The problem

A failed pipeline tells you it is broken, not why. CI configuration problems (undefined stages, missing caches, over-permissive jobs) are usually visible before the merge, and nobody looks.

The approach

Expose the analysis as Model Context Protocol tools so the Duo engine calls them natively rather than through a chatbot wrapper, and keep a history of analyses so pipeline health is trackable over time.

What it does

  1. 01Risk score (0–100) across structural integrity, performance and security posture
  2. 02Structural validation: syntax errors, undefined stages, conflicting logic
  3. 03Performance checks: missing caches, redundant steps, inefficient job ordering
  4. 04Failure diagnosis from job logs with an identified root cause
  5. 05MCP tools (analyze_ci_yaml, get_structural_rules) exposed natively to Duo
  6. 06Analysis history tracking pipeline health over time

Screens

Terminal output of a pipeline risk analysis
Failure diagnosis with root cause and fix

Engineering

Stack

  • Python
  • FastAPI
  • Model Context Protocol
  • SQLAlchemy
  • SQLite
  • Docker
  • GitLab Duo