{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://pprolint.com/schema/rule.json",
  "title": "PPROLint rule file",
  "description": "One lint rule for Adobe Premiere Pro (`<id>.rule.json`).",
  "type": "object",
  "properties": {
    "$schema": {
      "type": "string",
      "description": "URL of this schema, for editors. Ignored by PPROLint."
    },
    "formatVersion": {
      "const": 1,
      "description": "Version of the rule file format."
    },
    "id": {
      "type": "string",
      "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
      "description": "Stable id: lower-case words joined by hyphens, e.g. \"no-offline-media\"."
    },
    "name": {
      "$ref": "#/$defs/text",
      "description": "Short title shown in the settings."
    },
    "description": {
      "$ref": "#/$defs/text",
      "description": "One sentence: what the rule reports."
    },
    "category": {
      "enum": [
        "static",
        "local-consistency",
        "global-consistency",
        "project"
      ]
    },
    "scope": {
      "$ref": "#/$defs/scope",
      "description": "What the checks are evaluated against: a built-in scope or an analyzer."
    },
    "severity": {
      "enum": [
        "info",
        "warning",
        "error"
      ],
      "description": "Default severity of the diagnostics."
    },
    "options": {
      "type": "object",
      "propertyNames": {
        "pattern": "^[a-zA-Z][a-zA-Z0-9]*$"
      },
      "additionalProperties": {
        "$ref": "#/$defs/option"
      },
      "description": "Options the configuration may change, read as options.<name>."
    },
    "checks": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "#/$defs/check"
      },
      "description": "Conditions with their messages, tried in order."
    },
    "matching": {
      "enum": [
        "first",
        "all"
      ],
      "default": "first",
      "description": "first: an item gets the diagnostic of the first check that holds. all: one per check that holds."
    },
    "labels": {
      "type": "object",
      "propertyNames": {
        "pattern": "^[a-zA-Z][a-zA-Z0-9]*$"
      },
      "additionalProperties": {
        "$ref": "#/$defs/label"
      },
      "description": "Words chosen by a field's value, for {labels.<name>} placeholders."
    },
    "data": {
      "$ref": "#/$defs/data",
      "description": "Diagnostic data entries shared by every check."
    }
  },
  "required": [
    "formatVersion",
    "id",
    "name",
    "description",
    "category",
    "scope",
    "severity",
    "checks"
  ],
  "additionalProperties": false,
  "$defs": {
    "text": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "\\S"
        },
        {
          "type": "object",
          "properties": {
            "en_US": {
              "type": "string",
              "pattern": "\\S"
            },
            "de_DE": {
              "type": "string",
              "pattern": "\\S"
            },
            "es_ES": {
              "type": "string",
              "pattern": "\\S"
            },
            "fr_FR": {
              "type": "string",
              "pattern": "\\S"
            },
            "it_IT": {
              "type": "string",
              "pattern": "\\S"
            },
            "ja_JP": {
              "type": "string",
              "pattern": "\\S"
            },
            "ko_KR": {
              "type": "string",
              "pattern": "\\S"
            },
            "pt_BR": {
              "type": "string",
              "pattern": "\\S"
            },
            "ru_RU": {
              "type": "string",
              "pattern": "\\S"
            },
            "zh_CN": {
              "type": "string",
              "pattern": "\\S"
            }
          },
          "required": [
            "en_US"
          ],
          "additionalProperties": false
        }
      ]
    },
    "scope": {
      "anyOf": [
        {
          "const": "sequence",
          "description": "Built-in scope: one item per sequence."
        },
        {
          "const": "track",
          "description": "Built-in scope: one item per track."
        },
        {
          "const": "clip",
          "description": "Built-in scope: one item per clip."
        },
        {
          "const": "effect",
          "description": "Built-in scope: one item per effect."
        },
        {
          "const": "marker",
          "description": "Built-in scope: one item per marker."
        },
        {
          "const": "scale-outliers",
          "description": "Analyzer (base clip, fields outlier.*). Video clips compared with the median scale of their track or sequence."
        },
        {
          "const": "speed-outliers",
          "description": "Analyzer (base clip, fields outlier.*). Clips compared with the median speed of their track or sequence."
        },
        {
          "const": "audio-level-outliers",
          "description": "Analyzer (base clip, fields outlier.*). Audio clips compared with the median volume setting of their track or sequence."
        },
        {
          "const": "duration-outliers",
          "description": "Analyzer (base clip, fields outlier.*). Clips compared with the typical duration of their track or sequence."
        },
        {
          "const": "missing-effects",
          "description": "Analyzer (base clip, fields missing.*). Clips lacking an effect that other clips of their track or sequence carry."
        },
        {
          "const": "video-gaps",
          "description": "Analyzer (base sequence, fields gap.*). Ranges of the work area where no video clip is visible."
        },
        {
          "const": "audio-gaps",
          "description": "Analyzer (base sequence, fields gap.*). Ranges of the work area where no audio clip is audible."
        },
        {
          "const": "av-sync-pairs",
          "description": "Analyzer (base clip, fields pair.*). Audio clips paired with the overlapping video clip of the same source, with their drift."
        },
        {
          "const": "adjustment-layer-edges",
          "description": "Analyzer (base clip, fields edge.*). Adjustment layer edges inside a clip below, with the offset to the clip's edge."
        },
        {
          "const": "repeated-footage-pairs",
          "description": "Analyzer (base clip, fields reuse.*). Clips reusing a source range already used by an earlier clip of the same source."
        },
        {
          "const": "required-effects",
          "description": "Analyzer (base clip, fields requirement.*). Clips missing an effect the configuration requires on their track."
        },
        {
          "const": "restricted-effects",
          "description": "Analyzer (base clip, fields restricted.*). Clips using an effect the configuration forbids."
        },
        {
          "const": "required-markers",
          "description": "Analyzer (base sequence, fields requirement.*). Configured marker requirements the sequence does not meet."
        },
        {
          "const": "required-tracks",
          "description": "Analyzer (base sequence, fields violation.*). Ways the track layout misses the configured requirements."
        },
        {
          "const": "sequence-settings",
          "description": "Analyzer (base sequence, fields setting.*). Sequence settings (frame rate, frame size) outside the allowed values."
        }
      ]
    },
    "fieldPath": {
      "description": "A field of the rule's scope, or options.<name>.",
      "anyOf": [
        {
          "const": "sequence.id",
          "description": "Sequence GUID. (string; scopes sequence, track, clip, effect, marker)"
        },
        {
          "const": "sequence.name",
          "description": "Sequence name. (string; scopes sequence, track, clip, effect, marker)"
        },
        {
          "const": "sequence.fps",
          "description": "Frame rate (frames per second). (number; scopes sequence, track, clip, effect, marker)"
        },
        {
          "const": "sequence.frameDuration",
          "description": "Ticks per frame. (number; scopes sequence, track, clip, effect, marker)"
        },
        {
          "const": "sequence.frameWidth",
          "description": "Frame width in pixels. (number; scopes sequence, track, clip, effect, marker)"
        },
        {
          "const": "sequence.frameHeight",
          "description": "Frame height in pixels. (number; scopes sequence, track, clip, effect, marker)"
        },
        {
          "const": "sequence.end",
          "description": "End of the last clip (ticks). (number; scopes sequence, track, clip, effect, marker)"
        },
        {
          "const": "sequence.endTimecode",
          "description": "End of the last clip as timecode. (string; scopes sequence, track, clip, effect, marker)"
        },
        {
          "const": "sequence.durationSeconds",
          "description": "End of the last clip in seconds. (number; scopes sequence, track, clip, effect, marker)"
        },
        {
          "const": "sequence.inPoint",
          "description": "Sequence in point (ticks), unknown when not set. (number, can be unknown; scopes sequence, track, clip, effect, marker)"
        },
        {
          "const": "sequence.outPoint",
          "description": "Sequence out point (ticks), unknown when not set. (number, can be unknown; scopes sequence, track, clip, effect, marker)"
        },
        {
          "const": "sequence.inPointTimecode",
          "description": "Sequence in point as timecode, unknown when not set. (string, can be unknown; scopes sequence, track, clip, effect, marker)"
        },
        {
          "const": "sequence.outPointTimecode",
          "description": "Sequence out point as timecode, unknown when not set. (string, can be unknown; scopes sequence, track, clip, effect, marker)"
        },
        {
          "const": "sequence.inPointFrameOffset",
          "description": "Ticks between the in point and the frame boundary before it (0 = on a frame); unknown when not set. (number, can be unknown; scopes sequence, track, clip, effect, marker)"
        },
        {
          "const": "sequence.outPointFrameOffset",
          "description": "Ticks between the out point and the frame boundary before it (0 = on a frame); unknown when not set. (number, can be unknown; scopes sequence, track, clip, effect, marker)"
        },
        {
          "const": "sequence.videoTrackCount",
          "description": "Number of video tracks. (number; scopes sequence, track, clip, effect, marker)"
        },
        {
          "const": "sequence.audioTrackCount",
          "description": "Number of audio tracks. (number; scopes sequence, track, clip, effect, marker)"
        },
        {
          "const": "sequence.clipCount",
          "description": "Number of clips on all tracks. (number; scopes sequence, track, clip, effect, marker)"
        },
        {
          "const": "sequence.markerCount",
          "description": "Number of sequence markers. (number; scopes sequence, track, clip, effect, marker)"
        },
        {
          "const": "track.ref",
          "description": "Track as shown in Premiere: \"V1\", \"A2\". (string; scopes track, clip, effect)"
        },
        {
          "const": "track.type",
          "description": "\"video\" or \"audio\". (string; scopes track, clip, effect)"
        },
        {
          "const": "track.index",
          "description": "Zero-based index among tracks of its type. (number; scopes track, clip, effect)"
        },
        {
          "const": "track.name",
          "description": "Track name. (string; scopes track, clip, effect)"
        },
        {
          "const": "track.muted",
          "description": "Track is muted. (boolean; scopes track, clip, effect)"
        },
        {
          "const": "track.clipCount",
          "description": "Number of clips on the track. (number; scopes track, clip, effect)"
        },
        {
          "const": "track.audibleClipCount",
          "description": "Clips that would play: enabled, and for audio not silenced (-∞ dB). (number; scopes track, clip, effect)"
        },
        {
          "const": "track.firstClipStart",
          "description": "Start of the first clip (ticks); unknown on an empty track. (number, can be unknown; scopes track, clip, effect)"
        },
        {
          "const": "track.beyondLastUsed",
          "description": "No track of the same type with a higher index carries clips. (boolean; scopes track, clip, effect)"
        },
        {
          "const": "clip.id",
          "description": "Clip id: \"V1:<start>\". (string; scopes clip, effect)"
        },
        {
          "const": "clip.name",
          "description": "Clip name. (string; scopes clip, effect)"
        },
        {
          "const": "clip.track",
          "description": "Clip track as shown in Premiere: \"V1\", \"A2\". (string; scopes clip, effect)"
        },
        {
          "const": "clip.trackType",
          "description": "\"video\" or \"audio\". (string; scopes clip, effect)"
        },
        {
          "const": "clip.trackIndex",
          "description": "Zero-based index of the clip's track. (number; scopes clip, effect)"
        },
        {
          "const": "clip.start",
          "description": "Start in sequence time (ticks). (number; scopes clip, effect)"
        },
        {
          "const": "clip.end",
          "description": "End in sequence time (ticks). (number; scopes clip, effect)"
        },
        {
          "const": "clip.startFrameOffset",
          "description": "Ticks between the start and the frame boundary before it (0 = on a frame). (number; scopes clip, effect)"
        },
        {
          "const": "clip.endFrameOffset",
          "description": "Ticks between the end and the frame boundary before it (0 = on a frame). (number; scopes clip, effect)"
        },
        {
          "const": "clip.startTimecode",
          "description": "Start as timecode. (string; scopes clip, effect)"
        },
        {
          "const": "clip.endTimecode",
          "description": "End as timecode. (string; scopes clip, effect)"
        },
        {
          "const": "clip.duration",
          "description": "Duration in ticks (end - start). (number; scopes clip, effect)"
        },
        {
          "const": "clip.durationFrames",
          "description": "Duration in whole frames of the sequence. (number; scopes clip, effect)"
        },
        {
          "const": "clip.durationSeconds",
          "description": "Duration in seconds. (number; scopes clip, effect)"
        },
        {
          "const": "clip.inPoint",
          "description": "Source in point (ticks). (number; scopes clip, effect)"
        },
        {
          "const": "clip.outPoint",
          "description": "Source out point (ticks). (number; scopes clip, effect)"
        },
        {
          "const": "clip.speed",
          "description": "Playback speed, 1 = 100 %. (number; scopes clip, effect)"
        },
        {
          "const": "clip.reversed",
          "description": "Plays in reverse. (boolean; scopes clip, effect)"
        },
        {
          "const": "clip.disabled",
          "description": "Clip is disabled. (boolean; scopes clip, effect)"
        },
        {
          "const": "clip.effectCount",
          "description": "Number of user-applied effects. (number; scopes clip, effect)"
        },
        {
          "const": "clip.source.projectItemId",
          "description": "Project item id; unknown without a source. (string, can be unknown; scopes clip, effect)"
        },
        {
          "const": "clip.source.name",
          "description": "Project item name; unknown without a source. (string, can be unknown; scopes clip, effect)"
        },
        {
          "const": "clip.source.kind",
          "description": "\"media\", \"sequence\", \"multicam\" or \"merged\"; unknown without a source. (string, can be unknown; scopes clip, effect)"
        },
        {
          "const": "clip.source.mediaPath",
          "description": "Media file path; unknown when empty or without a source. (string, can be unknown; scopes clip, effect)"
        },
        {
          "const": "clip.source.offline",
          "description": "Source media is offline; unknown without a source. (boolean, can be unknown; scopes clip, effect)"
        },
        {
          "const": "clip.source.extension",
          "description": "Lower-case extension of the media path without the dot (\"mov\"); unknown without a path or an extension. (string, can be unknown; scopes clip, effect)"
        },
        {
          "const": "clip.adjustmentLayer",
          "description": "Clip is an adjustment layer (false for audio clips). (boolean; scopes clip, effect)"
        },
        {
          "const": "clip.scale",
          "description": "Motion scale in percent at clip start (video, uniform or equal height and width). (number, can be unknown; scopes clip, effect)"
        },
        {
          "const": "clip.scaleAnimated",
          "description": "Scale is keyframed (video). (boolean, can be unknown; scopes clip, effect)"
        },
        {
          "const": "clip.scaleHeight",
          "description": "Motion scale height in percent at clip start, the scale when uniform (video). (number, can be unknown; scopes clip, effect)"
        },
        {
          "const": "clip.scaleHeightAnimated",
          "description": "Scale height is keyframed (video). (boolean, can be unknown; scopes clip, effect)"
        },
        {
          "const": "clip.scaleWidth",
          "description": "Motion scale width in percent at clip start, the scale when uniform (video). (number, can be unknown; scopes clip, effect)"
        },
        {
          "const": "clip.scaleWidthAnimated",
          "description": "Scale width is keyframed (video). (boolean, can be unknown; scopes clip, effect)"
        },
        {
          "const": "clip.rotation",
          "description": "Rotation in degrees at clip start (video). (number, can be unknown; scopes clip, effect)"
        },
        {
          "const": "clip.rotationAnimated",
          "description": "Rotation is keyframed (video). (boolean, can be unknown; scopes clip, effect)"
        },
        {
          "const": "clip.opacity",
          "description": "Opacity in percent at clip start (video). (number, can be unknown; scopes clip, effect)"
        },
        {
          "const": "clip.opacityAnimated",
          "description": "Opacity is keyframed (video). (boolean, can be unknown; scopes clip, effect)"
        },
        {
          "const": "clip.volume",
          "description": "Volume setting in dB at clip start (audio). (number, can be unknown; scopes clip, effect)"
        },
        {
          "const": "clip.volumeAnimated",
          "description": "Volume is keyframed (audio). (boolean, can be unknown; scopes clip, effect)"
        },
        {
          "const": "effect.index",
          "description": "Position in the clip's effect chain, from 0. (number; scopes effect)"
        },
        {
          "const": "effect.matchName",
          "description": "Premiere match name, stable across languages: \"AE.ADBE Lumetri\". (string; scopes effect)"
        },
        {
          "const": "effect.displayName",
          "description": "Name shown in Premiere, in its UI language. (string; scopes effect)"
        },
        {
          "const": "effect.count",
          "description": "Effects with this match name on the clip. (number; scopes effect)"
        },
        {
          "const": "effect.firstOfKind",
          "description": "No earlier effect of the clip has this match name. (boolean; scopes effect)"
        },
        {
          "const": "marker.id",
          "description": "Marker id. (string; scopes marker)"
        },
        {
          "const": "marker.name",
          "description": "Marker name. (string; scopes marker)"
        },
        {
          "const": "marker.named",
          "description": "The name is not blank. (boolean; scopes marker)"
        },
        {
          "const": "marker.type",
          "description": "\"Comment\", \"Chapter\", \"WebLink\", … (string; scopes marker)"
        },
        {
          "const": "marker.comments",
          "description": "Marker comment. (string; scopes marker)"
        },
        {
          "const": "marker.colorIndex",
          "description": "Color index. (number; scopes marker)"
        },
        {
          "const": "marker.start",
          "description": "Start in sequence time (ticks). (number; scopes marker)"
        },
        {
          "const": "marker.startTimecode",
          "description": "Start as timecode. (string; scopes marker)"
        },
        {
          "const": "marker.duration",
          "description": "Duration in ticks (0 for a point marker). (number; scopes marker)"
        },
        {
          "const": "outlier.value",
          "description": "The clip's value. (number; analyzer scale-outliers)"
        },
        {
          "const": "outlier.median",
          "description": "Median of the population. (number; analyzer scale-outliers)"
        },
        {
          "const": "outlier.deviationPercent",
          "description": "Deviation from the median, in percent of the median. Negative below. (number; analyzer scale-outliers)"
        },
        {
          "const": "outlier.absDeviationPercent",
          "description": "Absolute deviation, in percent of the median. (number; analyzer scale-outliers)"
        },
        {
          "const": "outlier.populationKey",
          "description": "\"V1\", \"A2\" for a track population, \"sequence\" otherwise. (string; analyzer scale-outliers)"
        },
        {
          "const": "outlier.populationSize",
          "description": "Clips in the population. (number; analyzer scale-outliers)"
        },
        {
          "const": "outlier.populationIsTrack",
          "description": "The population is one track (false: the whole sequence). (boolean; analyzer scale-outliers)"
        },
        {
          "const": "outlier.value",
          "description": "The clip's value. (number; analyzer speed-outliers)"
        },
        {
          "const": "outlier.median",
          "description": "Median of the population. (number; analyzer speed-outliers)"
        },
        {
          "const": "outlier.deviationPercent",
          "description": "Deviation from the median, in percent of the median. Negative below. (number; analyzer speed-outliers)"
        },
        {
          "const": "outlier.absDeviationPercent",
          "description": "Absolute deviation, in percent of the median. (number; analyzer speed-outliers)"
        },
        {
          "const": "outlier.populationKey",
          "description": "\"V1\", \"A2\" for a track population, \"sequence\" otherwise. (string; analyzer speed-outliers)"
        },
        {
          "const": "outlier.populationSize",
          "description": "Clips in the population. (number; analyzer speed-outliers)"
        },
        {
          "const": "outlier.populationIsTrack",
          "description": "The population is one track (false: the whole sequence). (boolean; analyzer speed-outliers)"
        },
        {
          "const": "outlier.value",
          "description": "Volume setting in dB. (number; analyzer audio-level-outliers)"
        },
        {
          "const": "outlier.median",
          "description": "Median volume of the population, in dB. (number; analyzer audio-level-outliers)"
        },
        {
          "const": "outlier.deviation",
          "description": "Difference from the median in dB. Negative when quieter. (number; analyzer audio-level-outliers)"
        },
        {
          "const": "outlier.absDeviation",
          "description": "Absolute difference from the median in dB. (number; analyzer audio-level-outliers)"
        },
        {
          "const": "outlier.populationKey",
          "description": "\"V1\", \"A2\" for a track population, \"sequence\" otherwise. (string; analyzer audio-level-outliers)"
        },
        {
          "const": "outlier.populationSize",
          "description": "Clips in the population. (number; analyzer audio-level-outliers)"
        },
        {
          "const": "outlier.populationIsTrack",
          "description": "The population is one track (false: the whole sequence). (boolean; analyzer audio-level-outliers)"
        },
        {
          "const": "outlier.z",
          "description": "Modified z-score of the log duration. Negative when shorter. (number; analyzer duration-outliers)"
        },
        {
          "const": "outlier.absZ",
          "description": "Absolute modified z-score. (number; analyzer duration-outliers)"
        },
        {
          "const": "outlier.durationTicks",
          "description": "Clip duration in ticks. (number; analyzer duration-outliers)"
        },
        {
          "const": "outlier.durationSeconds",
          "description": "Clip duration in seconds. (number; analyzer duration-outliers)"
        },
        {
          "const": "outlier.typicalTicks",
          "description": "Typical duration of the population (exp of the median log duration), in ticks. (number; analyzer duration-outliers)"
        },
        {
          "const": "outlier.typicalSeconds",
          "description": "Typical duration in seconds. (number; analyzer duration-outliers)"
        },
        {
          "const": "outlier.populationKey",
          "description": "\"V1\", \"A2\" for a track population, \"sequence\" otherwise. (string; analyzer duration-outliers)"
        },
        {
          "const": "outlier.populationSize",
          "description": "Clips in the population. (number; analyzer duration-outliers)"
        },
        {
          "const": "outlier.populationIsTrack",
          "description": "The population is one track (false: the whole sequence). (boolean; analyzer duration-outliers)"
        },
        {
          "const": "missing.matchName",
          "description": "Match name of the effect the clip lacks. (string; analyzer missing-effects)"
        },
        {
          "const": "missing.displayName",
          "description": "Display name of that effect, from a clip that has it. (string; analyzer missing-effects)"
        },
        {
          "const": "missing.withEffect",
          "description": "Clips of the population that carry the effect. (number; analyzer missing-effects)"
        },
        {
          "const": "missing.prevalence",
          "description": "withEffect / populationSize. (number; analyzer missing-effects)"
        },
        {
          "const": "missing.populationKey",
          "description": "\"V1\", \"A2\" for a track population, \"sequence\" otherwise. (string; analyzer missing-effects)"
        },
        {
          "const": "missing.populationSize",
          "description": "Clips in the population. (number; analyzer missing-effects)"
        },
        {
          "const": "missing.populationIsTrack",
          "description": "The population is one track (false: the whole sequence). (boolean; analyzer missing-effects)"
        },
        {
          "const": "gap.start",
          "description": "Gap start (ticks). (number; analyzer video-gaps)"
        },
        {
          "const": "gap.end",
          "description": "Gap end (ticks). (number; analyzer video-gaps)"
        },
        {
          "const": "gap.startTimecode",
          "description": "Gap start as timecode. (string; analyzer video-gaps)"
        },
        {
          "const": "gap.endTimecode",
          "description": "Gap end as timecode. (string; analyzer video-gaps)"
        },
        {
          "const": "gap.durationTicks",
          "description": "Duration in ticks. (number; analyzer video-gaps)"
        },
        {
          "const": "gap.durationFrames",
          "description": "Duration in whole frames. (number; analyzer video-gaps)"
        },
        {
          "const": "gap.durationFramesRounded",
          "description": "Duration in frames, one decimal, for messages. (number; analyzer video-gaps)"
        },
        {
          "const": "gap.durationSeconds",
          "description": "Duration in seconds. (number; analyzer video-gaps)"
        },
        {
          "const": "gap.durationIsSeconds",
          "description": "At least one second long: word it in seconds rather than frames. (boolean; analyzer video-gaps)"
        },
        {
          "const": "gap.kind",
          "description": "\"leading\" (touches the work area start), \"inner\" or \"trailing\". (string; analyzer video-gaps)"
        },
        {
          "const": "gap.hasBefore",
          "description": "A clip ends the coverage before the gap. (boolean; analyzer video-gaps)"
        },
        {
          "const": "gap.beforeName",
          "description": "Name of the clip before the gap. (string; analyzer video-gaps)"
        },
        {
          "const": "gap.beforeTrack",
          "description": "Track of the clip before the gap: \"V1\", \"A2\". (string; analyzer video-gaps)"
        },
        {
          "const": "gap.hasAfter",
          "description": "A clip starts the coverage after the gap. (boolean; analyzer video-gaps)"
        },
        {
          "const": "gap.afterName",
          "description": "Name of the clip after the gap. (string; analyzer video-gaps)"
        },
        {
          "const": "gap.afterTrack",
          "description": "Track of the clip after the gap: \"V1\", \"A2\". (string; analyzer video-gaps)"
        },
        {
          "const": "gap.start",
          "description": "Gap start (ticks). (number; analyzer audio-gaps)"
        },
        {
          "const": "gap.end",
          "description": "Gap end (ticks). (number; analyzer audio-gaps)"
        },
        {
          "const": "gap.startTimecode",
          "description": "Gap start as timecode. (string; analyzer audio-gaps)"
        },
        {
          "const": "gap.endTimecode",
          "description": "Gap end as timecode. (string; analyzer audio-gaps)"
        },
        {
          "const": "gap.durationTicks",
          "description": "Duration in ticks. (number; analyzer audio-gaps)"
        },
        {
          "const": "gap.durationFrames",
          "description": "Duration in whole frames. (number; analyzer audio-gaps)"
        },
        {
          "const": "gap.durationFramesRounded",
          "description": "Duration in frames, one decimal, for messages. (number; analyzer audio-gaps)"
        },
        {
          "const": "gap.durationSeconds",
          "description": "Duration in seconds. (number; analyzer audio-gaps)"
        },
        {
          "const": "gap.durationIsSeconds",
          "description": "At least one second long: word it in seconds rather than frames. (boolean; analyzer audio-gaps)"
        },
        {
          "const": "gap.kind",
          "description": "\"leading\" (touches the work area start), \"inner\" or \"trailing\". (string; analyzer audio-gaps)"
        },
        {
          "const": "gap.hasBefore",
          "description": "A clip ends the coverage before the gap. (boolean; analyzer audio-gaps)"
        },
        {
          "const": "gap.beforeName",
          "description": "Name of the clip before the gap. (string; analyzer audio-gaps)"
        },
        {
          "const": "gap.beforeTrack",
          "description": "Track of the clip before the gap: \"V1\", \"A2\". (string; analyzer audio-gaps)"
        },
        {
          "const": "gap.hasAfter",
          "description": "A clip starts the coverage after the gap. (boolean; analyzer audio-gaps)"
        },
        {
          "const": "gap.afterName",
          "description": "Name of the clip after the gap. (string; analyzer audio-gaps)"
        },
        {
          "const": "gap.afterTrack",
          "description": "Track of the clip after the gap: \"V1\", \"A2\". (string; analyzer audio-gaps)"
        },
        {
          "const": "pair.driftTicks",
          "description": "Audio offset from the video's source mapping, in ticks. Positive: the audio is late. (number; analyzer av-sync-pairs)"
        },
        {
          "const": "pair.driftFrames",
          "description": "Drift in frames, signed. (number; analyzer av-sync-pairs)"
        },
        {
          "const": "pair.absDriftFrames",
          "description": "Absolute drift in frames. (number; analyzer av-sync-pairs)"
        },
        {
          "const": "pair.absDriftFramesRounded",
          "description": "Absolute drift in frames, one decimal, for messages. (number; analyzer av-sync-pairs)"
        },
        {
          "const": "pair.videoName",
          "description": "Name of the video clip. (string; analyzer av-sync-pairs)"
        },
        {
          "const": "pair.videoTrack",
          "description": "Track of the video clip: \"V1\", \"A2\". (string; analyzer av-sync-pairs)"
        },
        {
          "const": "pair.projectItemId",
          "description": "Shared project item id. (string; analyzer av-sync-pairs)"
        },
        {
          "const": "edge.side",
          "description": "\"start\" or \"end\" of the adjustment layer. (string; analyzer adjustment-layer-edges)"
        },
        {
          "const": "edge.time",
          "description": "Time of the edge (ticks). (number; analyzer adjustment-layer-edges)"
        },
        {
          "const": "edge.timecode",
          "description": "Time of the edge as timecode. (string; analyzer adjustment-layer-edges)"
        },
        {
          "const": "edge.offsetTicks",
          "description": "Distance to the clip's own edge on that side, in ticks. (number; analyzer adjustment-layer-edges)"
        },
        {
          "const": "edge.offsetFrames",
          "description": "Offset in frames. (number; analyzer adjustment-layer-edges)"
        },
        {
          "const": "edge.offsetFramesRounded",
          "description": "Offset in frames, one decimal, for messages. (number; analyzer adjustment-layer-edges)"
        },
        {
          "const": "edge.clipName",
          "description": "Name of the clip below. (string; analyzer adjustment-layer-edges)"
        },
        {
          "const": "edge.clipTrack",
          "description": "Track of the clip below: \"V1\", \"A2\". (string; analyzer adjustment-layer-edges)"
        },
        {
          "const": "reuse.overlapTicks",
          "description": "Duration in ticks. (number; analyzer repeated-footage-pairs)"
        },
        {
          "const": "reuse.overlapFrames",
          "description": "Duration in whole frames. (number; analyzer repeated-footage-pairs)"
        },
        {
          "const": "reuse.overlapFramesRounded",
          "description": "Duration in frames, one decimal, for messages. (number; analyzer repeated-footage-pairs)"
        },
        {
          "const": "reuse.overlapSeconds",
          "description": "Duration in seconds. (number; analyzer repeated-footage-pairs)"
        },
        {
          "const": "reuse.overlapIsSeconds",
          "description": "At least one second long: word it in seconds rather than frames. (boolean; analyzer repeated-footage-pairs)"
        },
        {
          "const": "reuse.earlierName",
          "description": "Name of the earlier clip. (string; analyzer repeated-footage-pairs)"
        },
        {
          "const": "reuse.earlierTrack",
          "description": "Track of the earlier clip: \"V1\", \"A2\". (string; analyzer repeated-footage-pairs)"
        },
        {
          "const": "reuse.earlierStart",
          "description": "Start of the earlier clip (ticks). (number; analyzer repeated-footage-pairs)"
        },
        {
          "const": "reuse.earlierTimecode",
          "description": "Start of the earlier clip as timecode. (string; analyzer repeated-footage-pairs)"
        },
        {
          "const": "reuse.projectItemId",
          "description": "Shared project item id. (string; analyzer repeated-footage-pairs)"
        },
        {
          "const": "requirement.matchName",
          "description": "Required match name. (string; analyzer required-effects)"
        },
        {
          "const": "requirement.displayName",
          "description": "Display name of the effect, from a clip that has it, else the match name. (string; analyzer required-effects)"
        },
        {
          "const": "requirement.explanation",
          "description": "The requirement's message with a leading space, or empty. (string; analyzer required-effects)"
        },
        {
          "const": "requirement.tracks",
          "description": "The requirement's track references. (json; analyzer required-effects)"
        },
        {
          "const": "requirement.trackType",
          "description": "The requirement's track type. (string, can be unknown; analyzer required-effects)"
        },
        {
          "const": "restricted.matchName",
          "description": "Match name of the restricted effect. (string; analyzer restricted-effects)"
        },
        {
          "const": "restricted.displayName",
          "description": "Display name of the effect on the clip. (string; analyzer restricted-effects)"
        },
        {
          "const": "restricted.explanation",
          "description": "The entry's message with a leading space, or empty. (string; analyzer restricted-effects)"
        },
        {
          "const": "requirement.found",
          "description": "Matching markers found. (number; analyzer required-markers)"
        },
        {
          "const": "requirement.minCount",
          "description": "Markers required. (number; analyzer required-markers)"
        },
        {
          "const": "requirement.pluralCount",
          "description": "`found`, or 1 when none was found, so the requirement reads in the singular. (number; analyzer required-markers)"
        },
        {
          "const": "requirement.hasType",
          "description": "The requirement names a marker type. (boolean; analyzer required-markers)"
        },
        {
          "const": "requirement.type",
          "description": "Required marker type. (string, can be unknown; analyzer required-markers)"
        },
        {
          "const": "requirement.hasName",
          "description": "The requirement names a marker name. (boolean; analyzer required-markers)"
        },
        {
          "const": "requirement.name",
          "description": "Required name. (string, can be unknown; analyzer required-markers)"
        },
        {
          "const": "requirement.hasPattern",
          "description": "The requirement has a name pattern. (boolean; analyzer required-markers)"
        },
        {
          "const": "requirement.namePattern",
          "description": "Required name pattern (regular expression source). (string, can be unknown; analyzer required-markers)"
        },
        {
          "const": "requirement.hasColor",
          "description": "The requirement has a color index. (boolean; analyzer required-markers)"
        },
        {
          "const": "requirement.colorIndex",
          "description": "Required color index. (number, can be unknown; analyzer required-markers)"
        },
        {
          "const": "requirement.explanation",
          "description": "The requirement's message with a leading space, or empty. (string; analyzer required-markers)"
        },
        {
          "const": "requirement.requirement",
          "description": "The requirement as configured. (json; analyzer required-markers)"
        },
        {
          "const": "violation.kind",
          "description": "\"minVideo\", \"minAudio\", \"missingVideoName\", \"missingAudioName\", \"missingTrack\", \"wrongName\" or \"empty\". (string; analyzer required-tracks)"
        },
        {
          "const": "violation.count",
          "description": "Tracks found (count requirements). (number, can be unknown; analyzer required-tracks)"
        },
        {
          "const": "violation.min",
          "description": "Tracks required (count requirements). (number, can be unknown; analyzer required-tracks)"
        },
        {
          "const": "violation.name",
          "description": "Required name, or the name found for a wrong name. (string, can be unknown; analyzer required-tracks)"
        },
        {
          "const": "violation.expected",
          "description": "Expected name (wrong name). (string, can be unknown; analyzer required-tracks)"
        },
        {
          "const": "violation.trackRef",
          "description": "Track concerned: \"V1\", \"A2\". (string, can be unknown; analyzer required-tracks)"
        },
        {
          "const": "violation.trackName",
          "description": "Name of the track concerned. (string, can be unknown; analyzer required-tracks)"
        },
        {
          "const": "violation.requirement",
          "description": "The requirement as configured. (json; analyzer required-tracks)"
        },
        {
          "const": "violation.found",
          "description": "What was found, when it is not the requirement itself. (json; analyzer required-tracks)"
        },
        {
          "const": "setting.kind",
          "description": "\"frameRate\" or \"frameSize\". (string; analyzer sequence-settings)"
        },
        {
          "const": "setting.frameRate",
          "description": "The sequence frame rate. (number; analyzer sequence-settings)"
        },
        {
          "const": "setting.frameSizeText",
          "description": "The sequence frame size: \"1920×1080\". (string; analyzer sequence-settings)"
        },
        {
          "const": "setting.frameSizesText",
          "description": "The allowed frame sizes, comma separated. (string; analyzer sequence-settings)"
        },
        {
          "const": "setting.frameRates",
          "description": "Allowed frame rates. (json; analyzer sequence-settings)"
        },
        {
          "const": "setting.frameSize",
          "description": "The sequence frame size. (json; analyzer sequence-settings)"
        },
        {
          "const": "setting.frameSizes",
          "description": "Allowed frame sizes. (json; analyzer sequence-settings)"
        },
        {
          "type": "string",
          "pattern": "^options\\.[a-zA-Z][a-zA-Z0-9]*$",
          "description": "A declared option."
        }
      ]
    },
    "fieldReference": {
      "type": "object",
      "properties": {
        "field": {
          "$ref": "#/$defs/fieldPath"
        }
      },
      "required": [
        "field"
      ],
      "additionalProperties": false
    },
    "operand": {
      "anyOf": [
        {
          "type": [
            "number",
            "string",
            "boolean"
          ]
        },
        {
          "$ref": "#/$defs/fieldReference"
        }
      ]
    },
    "option": {
      "type": "object",
      "properties": {
        "type": {
          "enum": [
            "number",
            "string",
            "boolean",
            "number[]",
            "string[]",
            "json"
          ]
        },
        "default": {},
        "description": {
          "type": "string"
        }
      },
      "required": [
        "type",
        "default"
      ],
      "additionalProperties": false,
      "allOf": [
        {
          "if": {
            "properties": {
              "type": {
                "const": "number"
              }
            },
            "required": [
              "type"
            ]
          },
          "then": {
            "properties": {
              "default": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "enum": [
                      "Infinity",
                      "-Infinity"
                    ]
                  }
                ]
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "string"
              }
            },
            "required": [
              "type"
            ]
          },
          "then": {
            "properties": {
              "default": {
                "type": "string"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "boolean"
              }
            },
            "required": [
              "type"
            ]
          },
          "then": {
            "properties": {
              "default": {
                "type": "boolean"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "number[]"
              }
            },
            "required": [
              "type"
            ]
          },
          "then": {
            "properties": {
              "default": {
                "type": "array",
                "items": {
                  "type": "number"
                }
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "string[]"
              }
            },
            "required": [
              "type"
            ]
          },
          "then": {
            "properties": {
              "default": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "json"
              }
            },
            "required": [
              "type"
            ]
          },
          "then": {
            "properties": {
              "default": {}
            }
          }
        }
      ]
    },
    "check": {
      "type": "object",
      "properties": {
        "scope": {
          "$ref": "#/$defs/scope",
          "description": "Overrides the rule's scope for this check."
        },
        "condition": {
          "$ref": "#/$defs/condition"
        },
        "message": {
          "$ref": "#/$defs/message"
        },
        "data": {
          "$ref": "#/$defs/data",
          "description": "Merged over the rule's data."
        },
        "location": {
          "$ref": "#/$defs/fieldPath",
          "description": "Number field giving the diagnostic time."
        }
      },
      "required": [
        "condition",
        "message"
      ],
      "additionalProperties": false
    },
    "condition": {
      "anyOf": [
        {
          "$ref": "#/$defs/comparison"
        },
        {
          "type": "object",
          "properties": {
            "all": {
              "type": "array",
              "minItems": 1,
              "items": {
                "$ref": "#/$defs/condition"
              }
            }
          },
          "required": [
            "all"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "any": {
              "type": "array",
              "minItems": 1,
              "items": {
                "$ref": "#/$defs/condition"
              }
            }
          },
          "required": [
            "any"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "not": {
              "$ref": "#/$defs/condition"
            }
          },
          "required": [
            "not"
          ],
          "additionalProperties": false
        }
      ]
    },
    "comparison": {
      "type": "object",
      "properties": {
        "field": {
          "$ref": "#/$defs/fieldPath"
        },
        "operator": {
          "enum": [
            "equals",
            "notEquals",
            "greaterThan",
            "greaterThanOrEqual",
            "lessThan",
            "lessThanOrEqual",
            "between",
            "in",
            "notIn",
            "contains",
            "notContains",
            "matches",
            "exists",
            "notExists"
          ]
        },
        "value": {}
      },
      "required": [
        "field",
        "operator"
      ],
      "additionalProperties": false,
      "allOf": [
        {
          "if": {
            "properties": {
              "operator": {
                "enum": [
                  "exists",
                  "notExists"
                ]
              }
            },
            "required": [
              "operator"
            ]
          },
          "then": {
            "not": {
              "required": [
                "value"
              ]
            }
          }
        },
        {
          "if": {
            "properties": {
              "operator": {
                "enum": [
                  "between"
                ]
              }
            },
            "required": [
              "operator"
            ]
          },
          "then": {
            "properties": {
              "value": {
                "type": "array",
                "prefixItems": [
                  {
                    "$ref": "#/$defs/operand"
                  },
                  {
                    "$ref": "#/$defs/operand"
                  }
                ],
                "minItems": 2,
                "maxItems": 2
              }
            },
            "required": [
              "value"
            ]
          }
        },
        {
          "if": {
            "properties": {
              "operator": {
                "enum": [
                  "in",
                  "notIn"
                ]
              }
            },
            "required": [
              "operator"
            ]
          },
          "then": {
            "properties": {
              "value": {
                "anyOf": [
                  {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "string"
                    }
                  },
                  {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "number"
                    }
                  },
                  {
                    "$ref": "#/$defs/fieldReference"
                  }
                ]
              }
            },
            "required": [
              "value"
            ]
          }
        },
        {
          "if": {
            "properties": {
              "operator": {
                "enum": [
                  "matches"
                ]
              }
            },
            "required": [
              "operator"
            ]
          },
          "then": {
            "properties": {
              "value": {
                "type": "string",
                "description": "A JavaScript regular expression, compiled with the u flag."
              }
            },
            "required": [
              "value"
            ]
          }
        },
        {
          "if": {
            "properties": {
              "operator": {
                "enum": [
                  "equals",
                  "notEquals",
                  "greaterThan",
                  "greaterThanOrEqual",
                  "lessThan",
                  "lessThanOrEqual",
                  "contains",
                  "notContains"
                ]
              }
            },
            "required": [
              "operator"
            ]
          },
          "then": {
            "properties": {
              "value": {
                "$ref": "#/$defs/operand"
              }
            },
            "required": [
              "value"
            ]
          }
        }
      ]
    },
    "message": {
      "anyOf": [
        {
          "$ref": "#/$defs/template"
        },
        {
          "type": "object",
          "properties": {
            "en_US": {
              "$ref": "#/$defs/template"
            },
            "de_DE": {
              "$ref": "#/$defs/template"
            },
            "es_ES": {
              "$ref": "#/$defs/template"
            },
            "fr_FR": {
              "$ref": "#/$defs/template"
            },
            "it_IT": {
              "$ref": "#/$defs/template"
            },
            "ja_JP": {
              "$ref": "#/$defs/template"
            },
            "ko_KR": {
              "$ref": "#/$defs/template"
            },
            "pt_BR": {
              "$ref": "#/$defs/template"
            },
            "ru_RU": {
              "$ref": "#/$defs/template"
            },
            "zh_CN": {
              "$ref": "#/$defs/template"
            }
          },
          "required": [
            "en_US"
          ],
          "additionalProperties": false
        }
      ]
    },
    "template": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "\\S",
          "description": "Text with {field.path} placeholders."
        },
        {
          "$ref": "#/$defs/plural"
        }
      ]
    },
    "labelMessage": {
      "anyOf": [
        {
          "$ref": "#/$defs/labelTemplate"
        },
        {
          "type": "object",
          "properties": {
            "en_US": {
              "$ref": "#/$defs/labelTemplate"
            },
            "de_DE": {
              "$ref": "#/$defs/labelTemplate"
            },
            "es_ES": {
              "$ref": "#/$defs/labelTemplate"
            },
            "fr_FR": {
              "$ref": "#/$defs/labelTemplate"
            },
            "it_IT": {
              "$ref": "#/$defs/labelTemplate"
            },
            "ja_JP": {
              "$ref": "#/$defs/labelTemplate"
            },
            "ko_KR": {
              "$ref": "#/$defs/labelTemplate"
            },
            "pt_BR": {
              "$ref": "#/$defs/labelTemplate"
            },
            "ru_RU": {
              "$ref": "#/$defs/labelTemplate"
            },
            "zh_CN": {
              "$ref": "#/$defs/labelTemplate"
            }
          },
          "required": [
            "en_US"
          ],
          "additionalProperties": false
        }
      ]
    },
    "labelTemplate": {
      "anyOf": [
        {
          "type": "string",
          "description": "May be empty."
        },
        {
          "$ref": "#/$defs/plural"
        }
      ]
    },
    "plural": {
      "type": "object",
      "description": "Plural forms picked by the value of count.",
      "properties": {
        "count": {
          "$ref": "#/$defs/fieldPath"
        },
        "one": {
          "type": "string",
          "pattern": "\\S"
        },
        "few": {
          "type": "string",
          "pattern": "\\S"
        },
        "many": {
          "type": "string",
          "pattern": "\\S"
        },
        "other": {
          "type": "string",
          "pattern": "\\S"
        }
      },
      "required": [
        "count",
        "other"
      ],
      "additionalProperties": false
    },
    "label": {
      "type": "object",
      "properties": {
        "field": {
          "$ref": "#/$defs/fieldPath"
        },
        "values": {
          "type": "object",
          "minProperties": 1,
          "additionalProperties": {
            "$ref": "#/$defs/labelMessage"
          }
        }
      },
      "required": [
        "field",
        "values"
      ],
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "additionalProperties": {
        "anyOf": [
          {
            "$ref": "#/$defs/fieldPath"
          },
          {
            "type": "object",
            "properties": {
              "literal": {
                "type": [
                  "number",
                  "string",
                  "boolean"
                ]
              }
            },
            "required": [
              "literal"
            ],
            "additionalProperties": false
          }
        ]
      }
    }
  }
}
