{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "MANITAI field schema - gemeinsame Empfehlung 0.1.0",
  "description": "Redaktioneller Vorschlag vom 03.10.2026. Begriffsidentität, Feldzugehörigkeit, Situationen, Aussagearten und Herkunft getrennt. Keine behauptete historische Gesamthierarchie und keine Feldresultate. Deutsch ist Pflicht, Englisch ergänzbar. Kein RDF/SKOS-Export und keine formale OWL-Ontologie.",
  "type": "object",
  "properties": {
    "schema_version": {
      "const": "0.1.0"
    },
    "package_status": {
      "type": "string",
      "enum": [
        "conceptual_draft",
        "reviewed_package"
      ]
    },
    "created": {
      "type": "string",
      "format": "date"
    },
    "author": {
      "type": "string",
      "minLength": 1
    },
    "ai_assistance": {
      "type": "string",
      "minLength": 1
    },
    "sources": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/source"
      },
      "minItems": 1
    },
    "concepts": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/concept"
      },
      "minItems": 1
    },
    "actors": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/actor"
      },
      "minItems": 0
    },
    "situations": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/situation"
      },
      "minItems": 0
    },
    "claims": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/claim"
      },
      "minItems": 0
    }
  },
  "required": [
    "schema_version",
    "package_status",
    "created",
    "author",
    "ai_assistance",
    "sources",
    "concepts",
    "actors",
    "situations",
    "claims"
  ],
  "additionalProperties": false,
  "$defs": {
    "source": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "citation": {
          "type": "string",
          "minLength": 1
        },
        "locator": {
          "type": "string",
          "minLength": 1
        },
        "access": {
          "type": "string",
          "enum": [
            "local",
            "public",
            "restricted",
            "unknown"
          ]
        },
        "reading_depth": {
          "type": "string",
          "enum": [
            "full_text",
            "selected_passages",
            "abstract",
            "metadata",
            "inherited_record"
          ]
        },
        "provenance_note": {
          "type": "string",
          "minLength": 1
        },
        "sha256": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^[a-fA-F0-9]{64}$"
        }
      },
      "required": [
        "id",
        "citation",
        "locator",
        "access",
        "reading_depth",
        "provenance_note"
      ],
      "additionalProperties": false
    },
    "concept": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^MANITAI-C-[A-Z0-9_-]+$"
        },
        "version": {
          "type": "string",
          "minLength": 1
        },
        "labels": {
          "type": "object",
          "properties": {
            "de": {
              "type": "string",
              "minLength": 1
            },
            "en": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "de"
          ],
          "additionalProperties": false
        },
        "definition": {
          "type": "object",
          "properties": {
            "de": {
              "type": "string",
              "minLength": 1
            },
            "en": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "de"
          ],
          "additionalProperties": false
        },
        "fields": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "EDU",
              "JOB",
              "SWA",
              "ROB",
              "LIN",
              "CROSS"
            ]
          },
          "minItems": 1,
          "uniqueItems": true
        },
        "status": {
          "type": "string",
          "enum": [
            "candidate",
            "reviewed_concept",
            "deprecated"
          ]
        },
        "origin": {
          "type": "string",
          "enum": [
            "andreas_source",
            "editorial_proposal",
            "established_external",
            "mixed"
          ]
        },
        "attribution": {
          "type": "string",
          "minLength": 1
        },
        "scope": {
          "type": "string",
          "minLength": 1
        },
        "exclusions": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "minItems": 1
        },
        "example": {
          "type": "string",
          "minLength": 1
        },
        "counterexample": {
          "type": "string",
          "minLength": 1
        },
        "nearest_concept": {
          "type": "string",
          "minLength": 1
        },
        "added_distinction": {
          "type": "string",
          "minLength": 1
        },
        "source_ids": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "minItems": 0
        },
        "relations": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "broader",
                  "narrower",
                  "related",
                  "contrast",
                  "exact_match",
                  "replaces"
                ]
              },
              "target_id": {
                "type": "string",
                "minLength": 1
              },
              "rationale": {
                "type": "string",
                "minLength": 1
              },
              "status": {
                "type": "string",
                "enum": [
                  "documented",
                  "proposed"
                ]
              }
            },
            "required": [
              "type",
              "target_id",
              "rationale",
              "status"
            ],
            "additionalProperties": false
          },
          "minItems": 0
        },
        "review_note": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "id",
        "version",
        "labels",
        "definition",
        "fields",
        "status",
        "origin",
        "attribution",
        "scope",
        "exclusions",
        "example",
        "counterexample",
        "nearest_concept",
        "added_distinction",
        "source_ids",
        "relations",
        "review_note"
      ],
      "additionalProperties": false
    },
    "actor": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "kind": {
          "type": "string",
          "enum": [
            "human",
            "ai_system",
            "machine",
            "organization"
          ]
        },
        "description": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "id",
        "kind",
        "description"
      ],
      "additionalProperties": false
    },
    "situation": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "description": {
          "type": "string",
          "minLength": 1
        },
        "actor_ids": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "minItems": 1
        },
        "concept_ids": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "minItems": 1
        },
        "context": {
          "type": "string",
          "minLength": 1
        },
        "task": {
          "type": "string",
          "minLength": 1
        },
        "decision_authority": {
          "type": "string",
          "minLength": 1
        },
        "information_access": {
          "type": "string",
          "minLength": 1
        },
        "intervention_options": {
          "type": "string",
          "minLength": 1
        },
        "time_scope": {
          "type": "string",
          "minLength": 1
        },
        "case_status": {
          "type": "string",
          "enum": [
            "constructed",
            "documented"
          ]
        },
        "source_ids": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "minItems": 0
        }
      },
      "required": [
        "id",
        "description",
        "actor_ids",
        "concept_ids",
        "context",
        "task",
        "decision_authority",
        "information_access",
        "intervention_options",
        "time_scope",
        "case_status",
        "source_ids"
      ],
      "additionalProperties": false
    },
    "claim": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "situation_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "concept_ids": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "minItems": 0
        },
        "kind": {
          "type": "string",
          "enum": [
            "human_report",
            "observed_behavior",
            "system_state",
            "interpretation",
            "hypothesis"
          ]
        },
        "statement": {
          "type": "string",
          "minLength": 1
        },
        "evidence_status": {
          "type": "string",
          "enum": [
            "illustration_only",
            "unsupported",
            "source_supported",
            "empirically_examined"
          ]
        },
        "source_ids": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "minItems": 0
        },
        "limits": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "id",
        "situation_id",
        "concept_ids",
        "kind",
        "statement",
        "evidence_status",
        "source_ids",
        "limits"
      ],
      "additionalProperties": false
    }
  },
  "$comment": "Zusatzprüfung nötig: IDs eindeutig; alle Referenzen auflösen; keine Selbst-/zyklischen Hierarchien; exact_match manuell begründen; empirically_examined benötigt geeignete Datenbelege. reviewed_concept heißt redaktionell geprüft. reviewed_package heißt Paket geprüft, nicht Wirksamkeit bestätigt."
}
