{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://dataexchangeplatform.io/schema/datalayer-v0.schema.json",
  "title": "Data Exchange Platform data layer, version 0.2 (draft)",
  "description": "Machine-readable form of the field definitions on https://dataexchangeplatform.io/data-model.html. Covers aspirations, actors, relations, commitments, investment, matches and properties, plus cross-cutting details for location, innovation, AI & robotics engagement, supply-chain restructuring, and resilience & governance.",
  "$comment": "Draft v0. Free to read and cite with attribution to Humanity Solutions / dataexchangeplatform.io. The formal open licence will be stated before datasets are published.",
  "type": "object",
  "properties": {
    "aspirations": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Aspiration"
      }
    },
    "actors": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Actor"
      }
    },
    "relations": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Relation"
      }
    },
    "commitments": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Commitment"
      }
    },
    "investments": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Investment"
      }
    },
    "matches": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Match"
      }
    },
    "properties": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Property"
      }
    }
  },
  "$defs": {
    "Location": {
      "type": "object",
      "description": "Cross-cutting detail. Attaches to actors, aspirations, property and commitments.",
      "properties": {
        "country": {
          "type": "string"
        },
        "region": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "geo_point": {
          "type": "object",
          "description": "Optional.",
          "properties": {
            "lat": {
              "type": "number"
            },
            "lon": {
              "type": "number"
            }
          }
        },
        "climate_zone": {
          "type": "string"
        }
      }
    },
    "Aspiration": {
      "type": "object",
      "description": "A dated wish for change by an actor.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Structural identifier used to link records."
        },
        "actor": {
          "type": "string",
          "description": "id of the actor who holds it."
        },
        "theme": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "scale": {
          "type": "string"
        },
        "target_year": {
          "type": "integer"
        },
        "location": {
          "$ref": "#/$defs/Location"
        },
        "source": {
          "type": "string",
          "description": "Where this came from."
        },
        "source_date": {
          "type": "string",
          "description": "When it was published or confirmed.",
          "format": "date"
        },
        "ai_robotics": {
          "$ref": "#/$defs/AiRoboticsEngagement"
        },
        "governance_resilience": {
          "$ref": "#/$defs/GovernanceAndResilience"
        }
      },
      "required": [
        "id",
        "theme"
      ],
      "additionalProperties": true
    },
    "Actor": {
      "type": "object",
      "description": "An organisation, or a person acting publicly for one.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Structural identifier used to link records."
        },
        "name": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "role": {
          "type": "string",
          "enum": [
            "doer",
            "funder",
            "knowledge_holder",
            "user"
          ]
        },
        "sector": {
          "type": "string"
        },
        "size": {
          "type": "string"
        },
        "public_private_fit": {
          "type": "string"
        },
        "website": {
          "type": "string",
          "format": "uri"
        },
        "location": {
          "$ref": "#/$defs/Location"
        },
        "source": {
          "type": "string",
          "description": "Where this came from."
        },
        "source_date": {
          "type": "string",
          "description": "When it was published or confirmed.",
          "format": "date"
        },
        "ai_robotics": {
          "$ref": "#/$defs/AiRoboticsEngagement"
        },
        "governance_resilience": {
          "$ref": "#/$defs/GovernanceAndResilience"
        }
      },
      "required": [
        "id",
        "name"
      ],
      "additionalProperties": true
    },
    "Relation": {
      "type": "object",
      "description": "A known link between two actors. Recorded only when public or confirmed by both (data principle 3).",
      "properties": {
        "id": {
          "type": "string",
          "description": "Structural identifier used to link records."
        },
        "actor_a": {
          "type": "string"
        },
        "actor_b": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "partnership",
            "shared_goal",
            "earlier_collaboration"
          ]
        },
        "date": {
          "type": "string",
          "format": "date"
        },
        "trust_level": {
          "type": "string",
          "enum": [
            "stated",
            "evidenced",
            "proven"
          ]
        },
        "source": {
          "type": "string",
          "description": "Where this came from."
        },
        "source_date": {
          "type": "string",
          "description": "When it was published or confirmed.",
          "format": "date"
        }
      },
      "required": [
        "id",
        "actor_a",
        "actor_b",
        "type"
      ],
      "additionalProperties": true
    },
    "Commitment": {
      "type": "object",
      "description": "What an actor will start, maintain or stop.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Structural identifier used to link records."
        },
        "actor": {
          "type": "string"
        },
        "action": {
          "type": "string",
          "enum": [
            "start",
            "maintain",
            "stop"
          ]
        },
        "offer": {
          "type": "string"
        },
        "need": {
          "type": "string"
        },
        "theme": {
          "type": "string"
        },
        "horizon": {
          "type": "string"
        },
        "serves_aspiration": {
          "type": "string",
          "description": "id of the aspiration it serves."
        },
        "source": {
          "type": "string",
          "description": "Where this came from."
        },
        "source_date": {
          "type": "string",
          "description": "When it was published or confirmed.",
          "format": "date"
        },
        "supply_chain": {
          "$ref": "#/$defs/SupplyChainRestructuring"
        },
        "ai_robotics": {
          "$ref": "#/$defs/AiRoboticsEngagement"
        }
      },
      "required": [
        "id",
        "actor",
        "action"
      ],
      "additionalProperties": true
    },
    "Investment": {
      "type": "object",
      "description": "Money, time or assets pledged or sought.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Structural identifier used to link records."
        },
        "actor": {
          "type": "string"
        },
        "direction": {
          "type": "string"
        },
        "form": {
          "type": "string"
        },
        "ticket_size_band": {
          "type": "string"
        },
        "horizon": {
          "type": "string"
        },
        "return_logic": {
          "type": "string",
          "enum": [
            "financial",
            "social",
            "resilience"
          ]
        },
        "backs_commitment": {
          "type": "string"
        },
        "source": {
          "type": "string",
          "description": "Where this came from."
        },
        "source_date": {
          "type": "string",
          "description": "When it was published or confirmed.",
          "format": "date"
        }
      },
      "required": [
        "id",
        "actor"
      ],
      "additionalProperties": true
    },
    "Match": {
      "type": "object",
      "description": "A proposed coalition and what happened to it.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Structural identifier used to link records."
        },
        "members": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "ids of actors, aspirations and commitments."
        },
        "score": {
          "type": "number",
          "minimum": 0,
          "maximum": 100,
          "description": "See the scoring method."
        },
        "score_breakdown": {
          "type": "object"
        },
        "red_flags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "status": {
          "type": "string"
        },
        "outcome_notes": {
          "type": "string"
        },
        "date": {
          "type": "string",
          "format": "date"
        },
        "source": {
          "type": "string",
          "description": "Where this came from."
        },
        "source_date": {
          "type": "string",
          "description": "When it was published or confirmed.",
          "format": "date"
        }
      },
      "required": [
        "id",
        "members"
      ],
      "additionalProperties": true
    },
    "Innovation": {
      "type": "object",
      "description": "Cross-cutting detail. Attaches to aspirations, commitments and investment.",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "product",
            "process",
            "social",
            "business_model"
          ]
        },
        "maturity": {
          "type": "string",
          "enum": [
            "idea",
            "pilot",
            "scale"
          ]
        },
        "novelty": {
          "type": "string"
        }
      }
    },
    "Property": {
      "type": "object",
      "description": "Land, buildings, equipment or IP, and whether it is idle or in use.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Structural identifier used to link records."
        },
        "actor": {
          "type": "string"
        },
        "asset_type": {
          "type": "string",
          "enum": [
            "land",
            "building",
            "infrastructure",
            "equipment",
            "ip"
          ]
        },
        "ownership": {
          "type": "string"
        },
        "availability": {
          "type": "string",
          "enum": [
            "in_use",
            "partly_idle",
            "idle"
          ]
        },
        "reuse_potential": {
          "type": "string"
        },
        "location": {
          "$ref": "#/$defs/Location"
        },
        "source": {
          "type": "string",
          "description": "Where this came from."
        },
        "source_date": {
          "type": "string",
          "description": "When it was published or confirmed.",
          "format": "date"
        },
        "supply_chain": {
          "$ref": "#/$defs/SupplyChainRestructuring"
        }
      },
      "required": [
        "id",
        "asset_type"
      ],
      "additionalProperties": true
    },
    "AiRoboticsEngagement": {
      "type": "object",
      "description": "Cross-cutting detail on human-AI and robotics collaboration (fed via sumnetics.com). Attaches to actors, commitments and aspirations.",
      "properties": {
        "adoption_stage": {
          "type": "string",
          "enum": [
            "none",
            "explore",
            "pilot",
            "scale",
            "autonomous_co_execution"
          ]
        },
        "use_cases": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "agent_interoperability": {
          "type": "string",
          "enum": [
            "manual_only",
            "structured_json_feeds",
            "autonomous_agent_ready"
          ]
        },
        "robotics_deployment": {
          "type": "string",
          "description": "Physical automation, sensing, or field robotics role."
        },
        "human_ai_collaboration_readiness": {
          "type": "string"
        },
        "expected_workforce_impact": {
          "type": "string"
        }
      }
    },
    "SupplyChainRestructuring": {
      "type": "object",
      "description": "Cross-cutting detail on supply-chain shocks, circularity and redeployable capacity (fed via restructuringsupplychains.com). Attaches to commitments, properties and aspirations.",
      "properties": {
        "shock_exposure": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Chokepoints, raw material dependencies, logistics or energy vulnerabilities."
        },
        "stop_to_start_handoff": {
          "type": "string",
          "description": "How a phased-out ('stop') activity frees facilities, equipment, or skills for a new ('start') transition."
        },
        "redeployable_capacity": {
          "type": "string"
        },
        "corridor": {
          "type": "string"
        }
      }
    },
    "GovernanceAndResilience": {
      "type": "object",
      "description": "Cross-cutting detail on coalition governance, accountability, and climate/systemic resilience.",
      "properties": {
        "governance_model": {
          "type": "string",
          "enum": [
            "public_stewardship",
            "multi_stakeholder_coalition",
            "public_private_covenant",
            "open_commons",
            "joint_venture"
          ]
        },
        "verification_tier": {
          "type": "string",
          "enum": [
            "self_declared",
            "mutually_confirmed",
            "publicly_evidenced",
            "third_party_audited"
          ]
        },
        "resilience_domains": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "heat_resilience",
              "water_resilience",
              "supply_chain_continuity",
              "workforce_transition",
              "energy_autonomy"
            ]
          }
        },
        "human_oversight_protocol": {
          "type": "string",
          "description": "Rules governing human-in-the-loop sign-off for AI agents and automated coalition matching."
        }
      }
    }
  }
}