{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.demiton.io/registers/extraction_procedure/v1.json",
  "title": "extraction_procedure contract v1",
  "type": "object",
  "required": [
    "doc_type",
    "methods",
    "org_entity_id"
  ],
  "properties": {
    "status": {
      "type": "string",
      "description": "Whether the operator has confirmed the procedure or it is still a candidate",
      "x-demiton-requiredness": "optional"
    },
    "methods": {
      "type": "array",
      "description": "The per-doc-type extraction methods; the payload the shelf exists to carry",
      "x-demiton-requiredness": "required"
    },
    "doc_type": {
      "type": "string",
      "description": "Which document type this method configures",
      "x-demiton-requiredness": "required"
    },
    "authored_by": {
      "type": "string",
      "description": "Operator and timestamp recorded in `_authored` at write time",
      "x-demiton-requiredness": "optional",
      "format": "date",
      "x-demiton-type": "date"
    },
    "org_entity_id": {
      "type": "integer",
      "description": "The org spine entity the current procedure is anchored to; makes the row per-org rather than per-tenant-blind",
      "x-demiton-requiredness": "required"
    },
    "llm": {
      "type": "object",
      "properties": {
        "model": {
          "type": "string",
          "description": "The model chosen for the LLM extraction pass, e.g. a hosted chat model name",
          "x-demiton-requiredness": "optional"
        },
        "prompt": {
          "type": "string",
          "description": "The per-doc-type extraction system prompt",
          "x-demiton-requiredness": "tenant-specific"
        }
      }
    },
    "parse": {
      "type": "object",
      "properties": {
        "engine": {
          "type": "string",
          "description": "The primary text-lift engine, default `pdfplumber`",
          "x-demiton-requiredness": "optional"
        },
        "ocr_fallback": {
          "type": "boolean",
          "description": "Whether to OCR a page when the text-lift yields nothing",
          "x-demiton-requiredness": "optional"
        },
        "keyword_signals": {
          "type": "array",
          "description": "Extra page-flag keywords added to the parser's built-ins",
          "x-demiton-requiredness": "tenant-specific"
        }
      }
    }
  },
  "x-demiton-register-type": "extraction_procedure",
  "x-demiton-contract-version": "1.0.3",
  "x-demiton-store": "tenant",
  "x-demiton-axes": [],
  "x-demiton-measures": [],
  "x-demiton-provenance": {
    "standards": [
      {
        "code": "AS ISO 19650.2:2019",
        "title": "Information management using BIM - Part 2: Delivery phase of the assets",
        "access": "public_summary",
        "region": "Australia",
        "edition": "2019",
        "checked_on": "2026-09-14"
      },
      {
        "code": "ISO 19650-2:2018",
        "title": "Information management using building information modelling - Part 2: Delivery phase of the assets",
        "access": "public_summary",
        "region": "International",
        "edition": "2018",
        "checked_on": "2026-09-14"
      }
    ]
  },
  "description": "How a document type is parsed into structured facts.",
  "x-demiton-contract-url": "https://docs.demiton.io/registers/extraction_procedure/",
  "x-demiton-register-catalog": "https://docs.demiton.io/concepts/register-catalog"
}