{
  "$defs": {
    "ApiVersion": {
      "description": "Plugin API version, separate from `schema_version`.",
      "minimum": 1,
      "type": "integer"
    },
    "ConfigSource": {
      "additionalProperties": false,
      "description": "Config layer and location a setting came from. Layer order and file semantics are in docs/contract/config.md.",
      "patternProperties": {
        "^x-": true
      },
      "properties": {
        "column": {
          "description": "One-based column.",
          "minimum": 1,
          "type": "integer"
        },
        "file": {
          "description": "Path relative to the project root, or `plugin:<id>/<path>` for a plugin file. Absent where no file holds the value: core, cli and env.",
          "type": "string"
        },
        "layer": {
          "description": "Layer name, lowest priority first: core, style, genre, extends, project, override, front-matter, directive, cli. env marks the sticky environment switches.",
          "enum": [
            "core",
            "style",
            "genre",
            "extends",
            "project",
            "override",
            "front-matter",
            "directive",
            "cli",
            "env"
          ],
          "x-slopvac-extensible": true
        },
        "line": {
          "description": "One-based line.",
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "layer"
      ],
      "type": "object"
    },
    "ContextTag": {
      "description": "Text-context label such as prose or code.",
      "pattern": "^[a-z][a-z0-9-]*(?![\\s\\S])",
      "type": "string"
    },
    "Edit": {
      "additionalProperties": false,
      "description": "Replace the source bytes in span with text, written verbatim. A zero-width span inserts. Edits in one set use original offsets and must not overlap. See docs/contract/positions.md.",
      "patternProperties": {
        "^x-": true
      },
      "properties": {
        "span": {
          "$ref": "#/$defs/Span",
          "description": "Original-file byte range to replace. A zero-width span inserts."
        },
        "text": {
          "description": "Replacement text.",
          "type": "string"
        }
      },
      "required": [
        "span",
        "text"
      ],
      "type": "object"
    },
    "LineCol": {
      "additionalProperties": false,
      "description": "One-based line and column. The column counts Unicode code points from the line start, after any BOM, and a tab counts as one. Output formats that need another unit convert from the span. See docs/contract/positions.md.",
      "properties": {
        "column": {
          "minimum": 1,
          "type": "integer"
        },
        "line": {
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "line",
        "column"
      ],
      "type": "object"
    },
    "PackId": {
      "description": "Pack identifier: the namespace of a rule. Built-in rules live in the reserved pack core.",
      "pattern": "^[a-z][a-z0-9-]*(?![\\s\\S])",
      "type": "string"
    },
    "PluginId": {
      "description": "Identifier of a plugin, or of the namespace a publisher signs for. Same character set as `PackId`. `core` is reserved for the built-in plugin that is compiled into the binary, so no manifest, lock entry, index entry or config entry may use it as an id or a namespace. Semantics: docs/contract/plugins.md, section 9.",
      "pattern": "^(?!core(?![\\s\\S]))[a-z][a-z0-9-]*(?![\\s\\S])",
      "type": "string"
    },
    "RuleId": {
      "description": "Qualified rule identifier `<plugin>:<id>`. A rule from a category file has the id `<category>.<rule>`, for example `core:prose-craft.acronym-periods`; a rule a plugin reports may use a bare id such as `core:passive-voice`. Short names resolve in configuration only where they are unambiguous; every output carries the qualified form.",
      "pattern": "^[a-z][a-z0-9-]*:[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])",
      "type": "string"
    },
    "RuleProvenance": {
      "additionalProperties": false,
      "description": "The pack that supplied a rule at run time: pack id, pack version and the pack-relative path of the defining file. A rule's citation of its own sources is the rule field citation, not this.",
      "patternProperties": {
        "^x-": true
      },
      "properties": {
        "pack": {
          "$ref": "#/$defs/PackId",
          "description": "Owning pack."
        },
        "source": {
          "description": "Pack source.",
          "type": "string"
        },
        "version": {
          "description": "Pack version.",
          "type": "string"
        }
      },
      "required": [
        "pack"
      ],
      "type": "object"
    },
    "SchemaVersion": {
      "const": 3,
      "description": "Root artifact schema version."
    },
    "Semver": {
      "description": "Semantic version 2.0.0 without build metadata. Numeric prerelease identifiers have no leading zeros.",
      "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-(0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*)(\\.(0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*))*)?(?![\\s\\S])",
      "type": "string"
    },
    "Severity": {
      "description": "Finding severity. Excludes off: 2.x config accepts off to disable a rule, so off belongs to config, not to findings.",
      "enum": [
        "suggestion",
        "warning",
        "error"
      ]
    },
    "Span": {
      "additionalProperties": false,
      "description": "Half-open range [start, end) of byte offsets into the original file bytes, BOM included. The end is exclusive, start is at most end, and both offsets fall on code point boundaries and never between the CR and LF of one CRLF. See docs/contract/positions.md.",
      "patternProperties": {
        "^x-": true
      },
      "properties": {
        "end": {
          "minimum": 0,
          "type": "integer"
        },
        "start": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "start",
        "end"
      ],
      "type": "object"
    }
  },
  "$id": "https://slopvac.github.io/slopvac/schemas/v3/common.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "Shared $defs referenced by every v3 artifact schema.",
  "title": "slopvac v3 shared definitions"
}
