{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "kind": {
      "const": "commentary_tracker"
    },
    "contractVersion": {
      "const": 1
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "descriptionMarkdown": {
      "type": "string",
      "maxLength": 32768
    },
    "fields": {
      "type": "array",
      "minItems": 1,
      "maxItems": 100,
      "items": {
        "$ref": "#/components/schemas/ProjectAgentTrackerContract_field"
      }
    },
    "views": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ProjectAgentTrackerContract_view"
      },
      "maxItems": 100
    },
    "transitions": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "field": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$",
            "not": {
              "enum": [
                "id",
                "trackerId",
                "recordId",
                "version",
                "schemaRevision",
                "schemaRevisionId",
                "lifecycle",
                "archived",
                "orderKey",
                "auditActor",
                "acceptance",
                "acceptanceReceipt",
                "acceptanceReceipts",
                "decision",
                "decisionReceipt",
                "verification",
                "verified",
                "humanApproval",
                "__proto__",
                "prototype",
                "constructor"
              ]
            }
          },
          "from": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$"
          },
          "to": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$"
          },
          "when": {
            "$ref": "#/components/schemas/ProjectAgentTrackerContract_logic"
          }
        },
        "required": [
          "field",
          "from",
          "to"
        ]
      },
      "maxItems": 100
    },
    "acceptance": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "optional",
            "required"
          ]
        },
        "policyRef": {
          "type": "string",
          "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$"
        }
      },
      "required": [
        "mode"
      ]
    },
    "metadata": {
      "type": "object"
    }
  },
  "required": [
    "kind",
    "contractVersion",
    "name",
    "fields",
    "views"
  ],
  "description": "Tracker Contract v1 wire shape. Run the parser for field uniqueness, mapping compatibility, safe JSON bounds, credential checks and semantic diagnostics."
}