{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:orbiplex:schema:resource-ref:v1",
  "title": "ResourceRef v1",
  "description": "Machine-readable schema for the generic resource identity model introduced in proposal 026. A resource reference is a typed opaque identifier used across Orbiplex to name things that records, opinions, offers, or other artifacts may refer to: URLs, products, nodes, organizations, places, workflow runs, and swarm-internal artifacts. The kind names the category, the id is opaque within that category and carries no assumed URI semantics unless the kind contract explicitly says so. This file exists so that any schema referencing proposal 026 can use a single shared definition instead of re-declaring the shape.",
  "type": "object",
  "additionalProperties": true,
  "x-dia-workflow": "project",
  "x-dia-status": "draft",
  "x-dia-basis": [
    "doc/project/40-proposals/026-resource-opinions-and-discussion-surfaces.md"
  ],
  "required": [
    "resource/kind",
    "resource/id"
  ],
  "properties": {
    "resource/kind": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9-]*$",
      "minLength": 1,
      "maxLength": 64,
      "description": "Resource kind slug. Early kinds include `url`, `ean`, `node`, `org`, `gps`. Swarm-internal kinds include `proposal`, `workflow-run`, `artifact`, `capability`. The list of kinds is open; kind contracts are registered per subsystem, not in this schema."
    },
    "resource/id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2048,
      "pattern": "^\\S(.*\\S)?$",
      "description": "Opaque identifier within the named kind. Consumers MUST NOT assume URI, URN, or hierarchical semantics unless the kind contract explicitly says so. Canonicalization rules (Unicode NFC, no control characters, no leading or trailing whitespace) are enforced by libraries on ingest; JSON Schema expresses only the trim and non-empty constraints."
    }
  }
}
