{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Arrow GEO action journal",
  "description": "Links question and evidence to a URL, reviewable patch and retest. CLI validates referenced observations and lifecycle requirements.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id",
    "promptIds",
    "subjectId",
    "targetUrl",
    "beforeObservationIds",
    "hypothesis",
    "proposedChange",
    "patchRefs",
    "status",
    "owner",
    "createdAt",
    "implementedAt",
    "retestObservationIds",
    "decision"
  ],
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "promptIds": {
      "type": "array",
      "minItems": 1,
      "uniqueItems": true,
      "items": {
        "type": "string"
      }
    },
    "subjectId": {
      "type": "string",
      "minLength": 1
    },
    "targetUrl": {
      "type": "string",
      "format": "uri"
    },
    "beforeObservationIds": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string"
      }
    },
    "hypothesis": {
      "type": "string",
      "minLength": 1
    },
    "proposedChange": {
      "type": "string",
      "minLength": 1
    },
    "patchRefs": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "status": {
      "enum": [
        "planned",
        "implemented",
        "retested",
        "closed"
      ]
    },
    "owner": {
      "type": "string",
      "minLength": 1
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "implementedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "retestObservationIds": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "decision": {
      "type": [
        "string",
        "null"
      ]
    }
  }
}
