← Files AixcutARCHIVED FILE

contracts/core/edit-plan.schema.json

8.35 KB · Nov 24, 2026 · 12:12 UTC

↓ Download file

See the change to this file →

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://aixcut.com/plugin-core/edit-plan.schema.json",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema_version",
    "plan_id",
    "project_id",
    "timeline_id",
    "base_revision",
    "intent",
    "mode",
    "scope",
    "budget",
    "acceptance"
  ],
  "properties": {
    "schema_version": {
      "const": "1.0.0"
    },
    "plan_id": {
      "type": "string",
      "minLength": 1
    },
    "project_id": {
      "type": "string",
      "minLength": 1
    },
    "timeline_id": {
      "type": "string",
      "minLength": 1
    },
    "base_revision": {
      "type": "integer",
      "minimum": 0
    },
    "plan_epoch": {
      "type": "integer",
      "minimum": 0,
      "description": "Host-owned plan generation. A revision change does not rewrite it; a gate or structural replan increments it."
    },
    "intent": {
      "enum": [
        "inspect",
        "mechanical_edit",
        "talking_head",
        "speech",
        "assembly",
        "generation",
        "export",
        "verify"
      ]
    },
    "mode": {
      "enum": [
        "inspect_only",
        "mechanical",
        "local_edit",
        "full_assembly"
      ]
    },
    "scope": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "source_refs",
        "target_refs",
        "preserve",
        "delete_refs",
        "optional_enhancements"
      ],
      "properties": {
        "source_refs": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "uniqueItems": true,
          "maxItems": 500
        },
        "target_refs": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "uniqueItems": true,
          "maxItems": 500
        },
        "preserve": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "uniqueItems": true,
          "maxItems": 500
        },
        "delete_refs": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "uniqueItems": true,
          "maxItems": 500
        },
        "optional_enhancements": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "enum": [
              "voice",
              "music",
              "b_roll",
              "motion_graphics",
              "export"
            ]
          }
        },
        "authorized_actions": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "uniqueItems": true,
          "maxItems": 500
        }
      }
    },
    "sources": {
      "type": "array",
      "maxItems": 500,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "ref",
          "duration_ms"
        ],
        "properties": {
          "ref": {
            "type": "string",
            "minLength": 1
          },
          "duration_ms": {
            "type": "integer",
            "minimum": 0
          },
          "input_version": {
            "type": "string",
            "minLength": 1
          }
        }
      }
    },
    "shots": {
      "type": "array",
      "maxItems": 500,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "shot_ref",
          "source_ref",
          "source_range",
          "output_range",
          "audio_role"
        ],
        "properties": {
          "shot_ref": {
            "type": "string",
            "minLength": 1
          },
          "source_ref": {
            "type": "string",
            "minLength": 1
          },
          "source_range": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "start_ms",
              "end_ms"
            ],
            "properties": {
              "start_ms": {
                "type": "integer",
                "minimum": 0
              },
              "end_ms": {
                "type": "integer",
                "minimum": 1
              }
            }
          },
          "output_range": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "start_ms",
              "end_ms"
            ],
            "properties": {
              "start_ms": {
                "type": "integer",
                "minimum": 0
              },
              "end_ms": {
                "type": "integer",
                "minimum": 1
              }
            }
          },
          "audio_role": {
            "enum": [
              "dialogue",
              "voiceover",
              "music",
              "ambience",
              "silent"
            ]
          },
          "depends_on": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "uniqueItems": true,
            "maxItems": 500
          }
        }
      }
    },
    "audio": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "preserve_original",
        "roles"
      ],
      "properties": {
        "preserve_original": {
          "type": "boolean"
        },
        "roles": {
          "type": "array",
          "items": {
            "enum": [
              "dialogue",
              "voiceover",
              "music",
              "ambience",
              "silent"
            ]
          }
        },
        "checks": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "uniqueItems": true,
          "maxItems": 500
        }
      }
    },
    "captions": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode"
      ],
      "properties": {
        "mode": {
          "enum": [
            "preserve",
            "none",
            "transcript",
            "speech"
          ]
        },
        "source_ref": {
          "type": "string",
          "minLength": 1
        },
        "checks": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "uniqueItems": true,
          "maxItems": 500
        }
      }
    },
    "budget": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "max_calls",
        "max_retries",
        "max_wait_ms"
      ],
      "properties": {
        "max_calls": {
          "type": "integer",
          "minimum": 1,
          "maximum": 1000
        },
        "max_retries": {
          "type": "integer",
          "minimum": 0,
          "maximum": 10
        },
        "max_wait_ms": {
          "type": "integer",
          "minimum": 0,
          "maximum": 43200000
        }
      }
    },
    "acceptance": {
      "type": "array",
      "minItems": 1,
      "maxItems": 100,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "layer",
          "check"
        ],
        "properties": {
          "layer": {
            "enum": [
              "structure",
              "semantic",
              "visual",
              "audio"
            ]
          },
          "check": {
            "type": "string",
            "minLength": 1
          }
        }
      }
    }
  },
  "allOf": [
    {
      "if": {
        "properties": {
          "mode": {
            "const": "mechanical"
          }
        }
      },
      "then": {
        "properties": {
          "scope": {
            "properties": {
              "optional_enhancements": {
                "maxItems": 0
              }
            }
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "intent": {
            "enum": [
              "mechanical_edit",
              "talking_head",
              "assembly"
            ]
          }
        }
      },
      "then": {
        "required": [
          "sources",
          "shots"
        ],
        "properties": {
          "shots": {
            "minItems": 1
          }
        }
      }
    }
  ]
}

SHA-256: cd85711bef68dc22e122ee9ff3e77f259604eae9bf1728f5a21e7edcb815afaa