Inspiration
Code reviews are essential for ensuring that new changes actually implement the requirements defined in issues, include sufficient tests, and follow good engineering practices. However, verifying all of this manually takes time and can be inconsistent. At the same time, CI/CD pipelines consume significant compute resources, and teams often lack visibility into the environmental impact of their development workflows.
We built Sprint Guardian to automate this process using AI — helping developers validate requirements, improve code quality, and make CI pipelines more sustainable.
What it does
Sprint Guardian is an AI DevOps agent built on the GitLab Duo Agent Platform that reviews merge requests and generates a structured engineering report.
The agent:
- Extracts requirements from linked GitLab issues
- Verifies whether the merge request implementation satisfies those requirements
- Analyzes test coverage and identifies missing tests
- Detects potential security issues in the code
- Evaluates CI pipelines and produces a CI Energy Intensity Score with optimization suggestions
This helps teams quickly understand whether a merge request is ready for approval while improving both engineering quality and CI sustainability.
How we built it
Sprint Guardian was implemented as an AI agent using the GitLab Duo Agent Platform.
The workflow includes:
- Retrieving merge request context and linked issues
- Extracting requirements from the issue
- Performing evidence-based analysis of the code changes
- Checking test coverage and identifying missing tests
- Analyzing the
.gitlab-ci.ymlpipeline for sustainability and efficiency - Generating a structured review report with recommendations
The agent runs automatically when a merge request is opened or updated.
Challenges we ran into
One challenge was ensuring that the AI agent produced reliable analysis rather than speculative conclusions. To address this, we implemented an evidence-first reasoning protocol, forcing the agent to extract real code evidence before determining whether a requirement is implemented.
Another challenge was designing a meaningful sustainability metric using only CI configuration. We introduced a heuristic CI Energy Intensity Score based on job count, caching usage, and pipeline structure.
Accomplishments that we're proud of
We’re proud that Sprint Guardian connects issues, code, tests, and CI pipelines into a single automated review system.
Key accomplishments include:
- Evidence-based requirement validation
- Automated test coverage analysis
- Security issue detection
- CI pipeline sustainability insights
Together, these features help developers ship higher-quality and more sustainable software.
What we learned
We learned that building effective AI agents requires structured workflows and clear reasoning protocols, not just prompts. Integrating AI with developer tools like GitLab makes it possible to automate complex DevOps tasks while still keeping humans in the loop.
What's next for Sprint Guardian
Next, we plan to expand Sprint Guardian with:
- Multi-agent workflows for security and sustainability analysis
- Automated test generation for missing test cases
- Historical CI sustainability tracking
- Dashboards for engineering quality and pipeline efficiency
Our goal is to evolve Sprint Guardian into a full AI DevOps assistant for reliable and sustainable software development.
Built With
- git
- yaml
Log in or sign up for Devpost to join the conversation.