Getting started
Overview
Riven is an Orbit-backed merge governance layer for AI-written code. On every merge
request it maps changed definitions, traverses graph-proven static CALLS impact,
emits risk-contract.yaml, and lets GitLab CI block unsafe merges.
It is not an AI reviewer comment. It is a contract-first control plane for agent-authored code changes.
The one rule
The merge decision comes from risk-contract.yaml and the CI exit code, not from a
model summary, a code review vibe, or a best-effort explanation.
What Riven does
Given a merge request, Riven:
- Indexes the checked-out repository with Orbit Local.
- Maps the diff to the concrete
gl_definitionrows it changed. - Traverses inbound static
CALLSedges throughgl_edgeto find impacted callers. - Scores the change using deterministic risk factors such as blast radius, signature change, verification gaps, and owner coverage.
- Emits a machine-readable
risk-contract.yamlplus remediation artifacts. - Blocks merge in GitLab CI when required gate conditions are unmet.
- Exposes the same workflow over MCP so external agents can explain, plan, and verify bounded remediation.
Why it's different
- It turns code review into policy infrastructure, not persuasion.
- It uses Orbit as a real graph, not as a loose retrieval layer.
- It reports graph-proven static impact, not a made-up runtime call graph.
- It keeps AI inside a hard boundary: proposal, patch plan, candidate diff validation, sandbox verification, evidence.
- It is reusable as infrastructure: CLI, GitLab CI scaffold, MCP server, AI Catalog agent, and documentation surface.
A concrete proof run
The included demo-repo contains a planted breaking change: parseOrder() changes
shape while downstream callers still depend on the old contract. Riven finds the
callers through Orbit CALLS edges, emits a failing contract, and exits non-zero
the same way the GitLab merge gate does.
You can also see the live public proof:
Where to next
- Quickstart — get the gate running locally.
- Installation & setup — prepare Orbit, GitLab, and your repo.
- How Riven works — follow the full graph-backed pipeline.
- The risk contract — understand the artifact that controls merge.
- Architecture — see the whole system in one diagram.