{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Record representing a single work position or role.",
      "key": "tid",
      "record": {
        "properties": {
          "agentRef": {
            "description": "The employer, as a single nested reference mirroring the flat company / companyDid / entityRef fields. Additive dual-write: the flat fields remain the source of truth for existing consumers.",
            "ref": "id.sifa.defs#agentRef",
            "type": "ref"
          },
          "company": {
            "description": "Organization name. Optional: omit for self-employed, freelance, contract, or independent work that has no separately named or registered entity.",
            "maxGraphemes": 256,
            "maxLength": 2560,
            "minLength": 1,
            "type": "string",
            "x-skos:exactMatch": [
              "org:organization",
              "schema:worksFor"
            ]
          },
          "companyDid": {
            "description": "DID of the organization's ATproto account, if one exists. Enables verified organization linking.",
            "format": "did",
            "type": "string"
          },
          "createdAt": {
            "description": "Client-declared timestamp when this record was originally created.",
            "format": "datetime",
            "type": "string"
          },
          "description": {
            "description": "Description of responsibilities, achievements, and duties.",
            "maxGraphemes": 5000,
            "maxLength": 50000,
            "type": "string",
            "x-skos:exactMatch": [
              "dcterms:description"
            ]
          },
          "employmentType": {
            "description": "Type of employment (full-time, part-time, contract, etc.).",
            "knownValues": [
              "id.sifa.defs#fullTime",
              "id.sifa.defs#partTime",
              "id.sifa.defs#temporary",
              "id.sifa.defs#seasonal",
              "id.sifa.defs#contract",
              "id.sifa.defs#freelance",
              "id.sifa.defs#selfEmployed",
              "id.sifa.defs#independentWork",
              "id.sifa.defs#internship",
              "id.sifa.defs#apprenticeship",
              "id.sifa.defs#fellowship",
              "id.sifa.defs#trainee",
              "id.sifa.defs#volunteer",
              "id.sifa.defs#boardMember",
              "id.sifa.defs#boardObserver",
              "id.sifa.defs#advisor"
            ],
            "type": "string",
            "x-skos:closeMatch": [
              "schema:employmentType"
            ],
            "x-skos:note": "schema:employmentType is free text. ESCO is the better value anchor."
          },
          "endedAt": {
            "description": "End date of the position in YYYY, YYYY-MM or YYYY-MM-DD format. Omit if this is a current position.",
            "type": "string",
            "x-skos:exactMatch": [
              "schema:endDate"
            ]
          },
          "entityRef": {
            "description": "Portable, app-neutral identifier for the organization the user selected from a resolver dropdown: a Wikidata Q-ID URI (http://www.wikidata.org/entity/Q...), a ROR URI, or an LEI URI. Enables deterministic resolution to a canonical entity even before the org claims an ATproto account. Absent for free-text or independent/self-employed positions.",
            "format": "uri",
            "type": "string",
            "x-skos:closeMatch": [
              "schema:sameAs"
            ]
          },
          "isPrimary": {
            "description": "Whether this is the user's primary current position, displayed on the identity card.",
            "type": "boolean"
          },
          "labels": {
            "description": "Self-label values for this position record.",
            "refs": [
              "com.atproto.label.defs#selfLabels"
            ],
            "type": "union"
          },
          "location": {
            "description": "Work location. Sifa enforces ISO 3166-1 alpha-2 country codes at the app layer.",
            "ref": "community.lexicon.location.address",
            "type": "ref",
            "x-skos:exactMatch": [
              "schema:jobLocation"
            ]
          },
          "onBehalfOf": {
            "description": "Name of the party this role is held on behalf of, when the person represents someone else — most often a fund whose board seat this is. A disclosure, not a role type. Omit for independent seats.",
            "maxGraphemes": 256,
            "maxLength": 2560,
            "type": "string"
          },
          "onBehalfOfDid": {
            "description": "DID of the represented party's ATproto account, if one exists. May resolve to an organization or to a person (e.g. a family-office principal).",
            "format": "did",
            "type": "string"
          },
          "onBehalfOfEntityRef": {
            "description": "Portable, app-neutral identifier for the represented party selected from a resolver dropdown: a Wikidata Q-ID URI, a ROR URI, or an LEI URI. Absent for free-text entries.",
            "format": "uri",
            "type": "string"
          },
          "skills": {
            "description": "Skills used in this position. Each entry is a URI reference to an id.sifa.profile.skill record owned by the same DID.",
            "items": {
              "ref": "id.sifa.defs#skillRef",
              "type": "ref"
            },
            "maxLength": 50,
            "type": "array"
          },
          "startedAt": {
            "description": "Start date of the position in YYYY, YYYY-MM or YYYY-MM-DD format.",
            "type": "string",
            "x-skos:exactMatch": [
              "schema:startDate"
            ]
          },
          "title": {
            "description": "Job title or role name.",
            "maxGraphemes": 256,
            "maxLength": 2560,
            "minLength": 1,
            "type": "string",
            "x-skos:exactMatch": [
              "org:role",
              "schema:roleName"
            ]
          },
          "workplaceType": {
            "description": "Workplace arrangement (on-site, remote, hybrid).",
            "knownValues": [
              "id.sifa.defs#onSite",
              "id.sifa.defs#remote",
              "id.sifa.defs#hybrid"
            ],
            "type": "string",
            "x-skos:narrowMatch": [
              "schema:jobLocationType"
            ],
            "x-skos:note": "schema.org models only a remote flag; Sifa distinguishes onSite, remote, and hybrid."
          }
        },
        "required": [
          "title",
          "startedAt",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record",
      "x-skos:closeMatch": [
        "org:Membership",
        "schema:OrganizationRole"
      ]
    }
  },
  "description": "A work experience entry in the user's professional profile.",
  "id": "id.sifa.profile.position",
  "lexicon": 1
}
