{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cueframe-ai/json-schema/cueframe-ai-checkpoint-resume-request-schema.json",
  "title": "CheckpointResumeRequest",
  "description": "POST /checkpoints/:id/resume body — the A1 review grammar.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cueframe-ai-checkpoints-api-openapi.yml#/components/schemas/CheckpointResumeRequest",
  "type": "object",
  "properties": {
    "decision": {
      "type": "string",
      "enum": [
        "approve",
        "revise",
        "abandon"
      ],
      "description": "The ONE verdict for this gate (GitHub review grammar). approve = proceed (comments allowed — they record as taste signal without gating); revise = the director revises per comments/edits and RE-PRESENTS this same gate (in-job, no re-meter); abandon = end the run."
    },
    "comments": {
      "maxItems": 24,
      "type": "array",
      "items": {
        "$ref": "#/$defs/CheckpointComment"
      }
    },
    "edits": {
      "description": "Your edited stage artifact (the power path). With edits the re-presented packet carries exactly what you supplied; with comments alone the director re-authors scoped by them."
    },
    "globalNote": {
      "type": "string",
      "maxLength": 4000
    }
  },
  "required": [
    "decision"
  ],
  "additionalProperties": false,
  "$defs": {
    "CheckpointComment": {
      "type": "object",
      "properties": {
        "anchor": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "beatId": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "beatId"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "timecodeMs": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "timecodeMs"
              ],
              "additionalProperties": false
            }
          ],
          "description": "What the comment is about: a plan beat (content gate) or a timecode on the artifact (layout/motion gates)."
        },
        "verdict": {
          "type": "string",
          "enum": [
            "approve",
            "revise",
            "lock"
          ],
          "description": "Per-anchor verdict under the single gate decision. `lock` = contractually frozen — the director touching a locked element is a defect, surfaced as a lock_violation verdict on the next packet (the no-discard machinery)."
        },
        "note": {
          "type": "string",
          "maxLength": 2000
        }
      },
      "required": [
        "anchor",
        "verdict"
      ],
      "additionalProperties": false
    }
  }
}