Inspiration
Every merge request shows you a diff. Nobody shows you the graph. A developer changes a shared payments library, the reviewer approves it, it merges — and three hours later the checkout API is down because it imported that function. The information that would have prevented it was already in GitLab. It just wasn't connected.
What it does
Sentinel is a custom agent on the GitLab Duo Agent Platform that produces a blast-radius brief for any merge request. Trigger it with /sentinel in the MR sidebar. It traverses GitLab Orbit's knowledge graph across 8 node types and posts a structured impact brief directly to the MR covering: every downstream project that imports the changed files, pipeline failure rates for those projects, open critical/high CVEs on affected components, and suggested reviewers ranked by contributor graph.
How I built it
Built on the GitLab Duo Agent Platform using a custom system prompt that runs a structured 8-step Orbit graph traversal. The agent chains query_graph calls across File, ImportedSymbol, Definition, Pipeline, Vulnerability, MergeRequest, and User nodes in dependency order — scoped to the group path to satisfy Orbit's selectivity requirements. Results are synthesized into a Markdown brief and posted to the MR via create_note. Also includes a SKILL.md for /sentinel slash command registration and a flow YAML alternative.
Challenges
Designing queries that satisfy Orbit's selectivity validation without being so narrow they miss real downstream consumers. The ImportedSymbol filter uses contains on the filename rather than eq on the full path to handle cross-language import conventions (Ruby, Python, Go all format import paths differently).
What I learned
How to design multi-hop graph traversals against a selectivity-constrained API, and how to write agent system prompts that produce consistent structured output without hallucinating data.
What's next
Webhook auto-trigger so every MR gets the brief automatically, and cross-group traversal as Orbit expands beyond single-group scope.
Built With
- gitlab-ci/cd
- gitlab-duo-agent-platform
- gitlab-orbit
- prompt
- python
- rest-api
- yaml