{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/proptastic/proptastic/main/contract/schemas/proposals/v1.json",
  "title": "proptastic proposals, v1",
  "description": "`.proptastic/proposals.yaml`, the examples `example ID --propose` recorded for a person to accept with `--accept`, committed, as reviewing the pull request is where a person decides (decisions 51, 55 and 68). The CLI writes and reads it; the library never does. Since a clean deletes the counterexamples, each proposal carries all it takes to pin it. The file is YAML in the shape of mutastic's `.mutastic/proposals.yaml`: comment lines, `proposals:`, then each proposal a `- id:` line and its other keys one `key: value` a line, in the order below, each value in single quotes with a quote inside doubled, but `id` and `found`, which need none; this schema describes the document it reads as. Within v1, a proposal only gains keys: read what you know, and ignore a key you don't. A file with no proposals is deleted, not left empty.",
  "type": "object",
  "required": ["proposals"],
  "properties": {
    "proposals": {
      "type": "array",
      "items": { "$ref": "#/$defs/proposal" }
    }
  },
  "$defs": {
    "proposal": {
      "type": "object",
      "description": "One proposed example, with all it takes to pin it after a clean.",
      "required": ["id", "property", "pin", "counterexample", "found", "when", "seed", "reason"],
      "dependentRequired": { "at": ["code"], "code": ["at"] },
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^c[0-9a-f]{8}$",
          "description": "The counterexample's id, as its file held it (decisions 52 and 67): `c4f1a2b9e`."
        },
        "property": {
          "type": "string",
          "minLength": 1,
          "description": "The property's exact id, as the manifest has it: `com.example.SortTest#sortKeepsSize()`."
        },
        "at": {
          "type": "string",
          "pattern": "^.+:[1-9][0-9]*$",
          "description": "Where its `forAll` is called, the manifest's `at` as `path:line`: `com/example/SortTest.java:14`. Absent, with `code`, where the edition couldn't tell."
        },
        "code": {
          "type": "string",
          "description": "The line at `at` when it was proposed, as it was: once that line changes, the proposal no longer holds, and `example` refuses to pin it (decision 54)."
        },
        "pin": {
          "type": "string",
          "minLength": 1,
          "description": "The pin line, as the failure printed it: `.example(List.of(0, 0))`, or `.seed(0x…)` for an input with no source form."
        },
        "counterexample": { "type": "string", "description": "The counterexample, as the failure printed it: `xs = [0, 0]`." },
        "found": { "enum": ["run", "fuzz"], "description": "Which command's run found it." },
        "when": {
          "type": "string",
          "format": "date-time",
          "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{3}Z$",
          "description": "When it was found, the failure's event's `started`, in UTC to the millisecond: `2026-12-02T21:24:13.120Z`."
        },
        "seed": {
          "type": "string",
          "pattern": "^0x[0-9a-f]{1,16}$",
          "description": "The seed that found it, as a failure prints it."
        },
        "reason": {
          "type": "string",
          "minLength": 1,
          "description": "Why this input belongs in the spec, as `--reason` said."
        }
      }
    }
  }
}
