{
 "type": "object",
 "properties": {
  "schema_type": {
   "const": "position-paper"
  },
  "paper_id": {
   "type": "string",
   "pattern": "^PP-[A-Za-z0-9._-]+$"
  },
  "session": {
   "type": "string",
   "pattern": "^S[0-9]\\.[0-9]+$"
  },
  "author": {
   "type": "string",
   "minLength": 1
  },
  "brief_id": {
   "type": "string",
   "pattern": "^BR-[A-Za-z0-9._-]+$"
  },
  "topic": {
   "type": "array",
   "items": {
    "type": "string",
    "pattern": "^(D(0[1-9]|1[0-6])|S1[78]|R20|M21|F22|T19\\.(0[1-9]|1[0-5]))$|^X-[A-Za-z0-9._-]+$",
    "description": "topic id from PLAN §2 (X-* = on-demand/new topic)"
   },
   "minItems": 1
  },
  "summary": {
   "type": "string",
   "minLength": 1
  },
  "claims": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "pattern": "^C-[A-Za-z0-9._-]+$"
     },
     "text": {
      "type": "string",
      "minLength": 1
     },
     "evidence": {
      "type": "array",
      "items": {
       "type": "string",
       "description": "ledger id (EV-...), context-pack ref (context/<file>.md#anchor), or repo path:line",
       "minLength": 3
      },
      "minItems": 1
     },
     "confidence": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
     },
     "claim_basis": {
      "enum": [
       "measured",
       "datasheet",
       "derived",
       "literature",
       "persona-grounded",
       "persona-stylized",
       "assumption"
      ]
     },
     "depends_on_assumptions": {
      "type": "array",
      "items": {
       "type": "string"
      },
      "minItems": 0
     }
    },
    "required": [
     "id",
     "text",
     "evidence",
     "confidence",
     "claim_basis"
    ],
    "additionalProperties": false
   },
   "minItems": 1
  },
  "assumptions": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "pattern": "^A-[A-Za-z0-9._-]+$"
     },
     "text": {
      "type": "string",
      "minLength": 1
     },
     "if_false": {
      "type": "string"
     }
    },
    "required": [
     "id",
     "text"
    ],
    "additionalProperties": false
   },
   "minItems": 0
  },
  "physics_used": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "name": {
      "type": "string",
      "minLength": 1
     },
     "form": {
      "type": "string",
      "minLength": 1
     },
     "pair_or_scale": {
      "type": "string"
     },
     "units_checked": {
      "type": "boolean"
     }
    },
    "required": [
     "name",
     "form",
     "units_checked"
    ],
    "additionalProperties": false
   },
   "minItems": 0
  },
  "integrals_used": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "integral": {
      "type": "string",
      "minLength": 1
     },
     "domain": {
      "type": "string",
      "minLength": 1
     },
     "role": {
      "type": "string",
      "minLength": 1
     },
     "source": {
      "type": "string",
      "description": "ledger id (EV-...), context-pack ref (context/<file>.md#anchor), or repo path:line",
      "minLength": 3
     }
    },
    "required": [
     "integral",
     "role"
    ],
    "additionalProperties": false
   },
   "minItems": 0
  },
  "numbers": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "quantity": {
      "type": "string",
      "minLength": 1
     },
     "value": {
      "type": "string",
      "minLength": 1
     },
     "unit": {
      "type": "string"
     },
     "source_or_assumption": {
      "type": "string",
      "minLength": 1
     }
    },
    "required": [
     "quantity",
     "value",
     "source_or_assumption"
    ],
    "additionalProperties": false
   },
   "minItems": 0
  },
  "open_questions": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "pattern": "^Q-[A-Za-z0-9._-]+$"
     },
     "text": {
      "type": "string",
      "minLength": 1
     },
     "owner_hint": {
      "type": "string"
     }
    },
    "required": [
     "id",
     "text"
    ],
    "additionalProperties": false
   },
   "minItems": 0
  },
  "cross_domain_links": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "with_domain": {
      "type": "string",
      "minLength": 1
     },
     "analogy_or_conflict": {
      "type": "string",
      "minLength": 1
     },
     "evidence": {
      "type": "array",
      "items": {
       "type": "string",
       "description": "ledger id (EV-...), context-pack ref (context/<file>.md#anchor), or repo path:line",
       "minLength": 3
      },
      "minItems": 0
     }
    },
    "required": [
     "with_domain",
     "analogy_or_conflict"
    ],
    "additionalProperties": false
   },
   "minItems": 0
  },
  "expert_requests": {
   "type": "array",
   "items": {
    "$ref": "expert-request.schema.json"
   },
   "minItems": 0
  }
 },
 "required": [
  "schema_type",
  "paper_id",
  "session",
  "author",
  "brief_id",
  "topic",
  "summary",
  "claims",
  "open_questions"
 ],
 "additionalProperties": false,
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "position-paper.schema.json",
 "title": "position-paper",
 "description": "Per-agent position paper. Every claim cites the ledger; persona claims carry a claim_basis."
}
