Skip to main content

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

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 blocks
  • policies/quality-and-approval.yaml — example review / approval style rules
Your own repos can use any filenames; keep paths in 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’s combine 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.

Validate before CI

Next

Policy rules · Versioning · geval init