Skip to content

Contract schema ​

The contract (agent-proof.json) is strict JSON. Unknown fields and trailing content are rejected. A machine-readable JSON Schema ships in the repository at schemas/contract.schema.json.

Top level ​

FieldTypeRules
versionintegerMust be 1.
checksarrayAt least one check.
requirementsarrayAt least one requirement.

checks[] ​

FieldTypeRules
idstringNonempty, unique across checks.
commandstring[]Nonempty; no empty arguments. Executed as argv, no shell.
parserstringcommand, go or junit.
timeout_secondsinteger1–3600 inclusive.
report_pathstringRequired for junit; forbidden otherwise. Safe, relative path.

requirements[] ​

FieldTypeRules
idstringNonempty, unique across requirements.
descriptionstringOptional but recommended.
checkstringMust reference an existing check id.
teststringOptional. If set, the check's parser must be go or junit.

Full example ​

json
{
  "version": 1,
  "checks": [
    {
      "id": "unit",
      "command": ["go", "test", "-json", "./..."],
      "parser": "go",
      "timeout_seconds": 120
    },
    {
      "id": "e2e",
      "command": ["python3", "junit_runner.py"],
      "parser": "junit",
      "timeout_seconds": 300,
      "report_path": "build/report.xml"
    },
    {
      "id": "lint",
      "command": ["gofmt", "-l", "."],
      "parser": "command",
      "timeout_seconds": 60
    }
  ],
  "requirements": [
    {
      "id": "unicode-export",
      "description": "CSV exports preserve Unicode text",
      "check": "unit",
      "test": "example.com/project::TestUnicode"
    },
    {
      "id": "signup-flow",
      "description": "End-to-end signup succeeds",
      "check": "e2e",
      "test": "e2e.Signup::test_happy_path"
    },
    {
      "id": "formatted",
      "description": "Source is gofmt-clean",
      "check": "lint"
    }
  ]
}

Config hashing ​

AgentProof records the SHA-256 of the exact policy bytes applied, prefixed with sha256:. Any change to the bytes — including whitespace — changes the recorded hash, so the receipt always identifies the precise policy that ran.

Developer preview. Receipts are unsigned and prove only the declared checks. Apache-2.0 licensed.