Contract file (contract.yaml)
A contract is the unit Geval loads for an evaluation run (you can pass several contracts to one geval check).
Typical fields
| Field | Required | Description |
|---|---|---|
name | Yes | Human-readable gate name (audit). |
version | Yes | Semver string; bump when policies or expectations change. |
policies | Yes | List of { path: "..." } entries relative to the contract file’s directory. |
combine | No | How to merge policy outcomes inside this contract. If omitted, the engine applies worst-case by severity (BLOCK > REQUIRE_APPROVAL > PASS). |
Example
geval init layout
Running geval init creates a contract plus two starter policies with descriptive filenames so teams know what to edit first:
policies/safety-and-blocking.yaml— example hard blockspolicies/quality-and-approval.yaml— example review / approval style rules
contract.yaml in sync.
Policy file
Each referenced YAML file is a policy: metadata (name, version) plus a policy block with rules. See Policy rules.
Combining policies inside one contract
When a contract lists multiple policies, each policy produces an outcome; those outcomes are merged using the contract’scombine rule, or the default worst-case merge if omitted.
Multiple contracts in one CI job
Pass multiple--contract flags to geval check. Cross-contract merge is controlled by --combine-contracts (default worst_case). See geval check.