← Files LuciaARCHIVED FILE

scripts/legal_matter.schema.json

5.4 KB · Nov 21, 2026 · 00:11 UTC

↓ Download file

{
  "type": "object",
  "properties": {
    "schema_version": {
      "const": 1
    },
    "revision": {
      "type": "integer",
      "minimum": 0
    },
    "kind": {
      "enum": [
        "documenti",
        "contenzioso-civile",
        "contenzioso-tributario",
        "operazioni-ma",
        "lavoro",
        "recupero-crediti",
        "verifica-citazioni"
      ]
    },
    "purpose": {
      "type": "string",
      "minLength": 1
    },
    "language": {
      "enum": [
        "it",
        "en",
        "fr",
        "de",
        "es"
      ]
    },
    "questions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "question": {
            "type": "string",
            "minLength": 1
          },
          "reason": {
            "type": "string",
            "minLength": 1
          },
          "blocks": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "status": {
            "enum": [
              "open",
              "answered",
              "not-needed"
            ]
          },
          "answer": {
            "type": "string"
          },
          "citations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "source_id": {
                  "type": "string",
                  "minLength": 1
                },
                "anchor": {
                  "type": "string",
                  "minLength": 1
                },
                "quote": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "source_id",
                "anchor",
                "quote"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "id",
          "question",
          "reason",
          "blocks",
          "status",
          "answer",
          "citations"
        ],
        "additionalProperties": false
      }
    },
    "stages": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "label": {
            "type": "string",
            "minLength": 1
          },
          "status": {
            "enum": [
              "pending",
              "done",
              "not-required"
            ]
          },
          "note": {
            "type": "string"
          },
          "outputs": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          }
        },
        "required": [
          "id",
          "label",
          "status",
          "note",
          "outputs"
        ],
        "additionalProperties": false
      }
    },
    "notes": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "output_hashes": {
      "type": "object",
      "additionalProperties": {
        "type": "string",
        "pattern": "^[a-f0-9]{64}$"
      }
    },
    "calendar": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "event": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
          },
          "event_date": {
            "type": "string",
            "maxLength": 10
          },
          "due_date": {
            "type": "string",
            "maxLength": 10
          },
          "status": {
            "enum": [
              "proposed",
              "reviewed",
              "conditional",
              "unknown"
            ]
          },
          "basis": {
            "type": "string",
            "maxLength": 10000
          },
          "reviewer_ref": {
            "type": "string",
            "maxLength": 160
          },
          "citations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "source_id": {
                  "type": "string",
                  "minLength": 1
                },
                "anchor": {
                  "type": "string",
                  "minLength": 1
                },
                "quote": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "source_id",
                "anchor",
                "quote"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "id",
          "event",
          "event_date",
          "due_date",
          "status",
          "basis",
          "reviewer_ref",
          "citations"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "schema_version",
    "revision",
    "kind",
    "purpose",
    "language",
    "questions",
    "stages",
    "notes",
    "output_hashes"
  ],
  "additionalProperties": false,
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}

SHA-256: da7a79b9aae748d725c3d04d69efb299d0ed10bff2e9ea429288a8d18854906d