{
  "handle": "Trait",
  "gloss": "Named surface set that implementers must provide",
  "mechanism": "A marker interface: a named set of surfaces a pattern requires of anything claiming it, so a caller can invoke across implementations without knowing which one it holds. A Trait has no instances of its own — it is claimed by other patterns, which supply the surfaces it names. Distinct from {{protocol}}, which is a Trait whose exchange must hold between two or more parties, and from {{contract}}, which is a signed agreement rather than a type claim.",
  "invariants": [
    "Names the surfaces an implementer must provide, and which of them are mandatory.",
    "Non-instantiable: a Trait is claimed by another pattern and has no standalone instance.",
    "Says nothing about how the surfaces are implemented."
  ],
  "failure_modes": [
    "Claimed without provision: a pattern declares the Trait and omits a mandatory surface, so callers dispatch to something that cannot answer.",
    "Surface set widened after adoption: adding a mandatory surface breaks every existing claimant, which is why the set is part of the Trait's identity."
  ],
  "_meta": {
    "tier": 1,
    "ring": 0,
    "path": [
      "Infrastructure",
      "Data Structures"
    ],
    "supersedes": [
      "sema:Trait#mh:SHA-256:13adbfa9f48babf1c2de572b4eb72454879cbb1d76404fd65aee70400a72e2b7",
      "sema:Trait#mh:SHA-256:14c7e4c3545c4dbe5d22a17eba23ce4a4f521cfcc29bd46561149be740b4a808"
    ]
  },
  "data_schema": {
    "type": "object",
    "required": [
      "surfaces",
      "mandatory"
    ],
    "properties": {
      "surfaces": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Surfaces an implementer must be able to answer."
      },
      "mandatory": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "The subset without which a claim to this Trait is void. Solver's is Manifest and Execute of five."
      },
      "claimants": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Patterns declaring this Trait, where the library tracks them."
      }
    }
  },
  "sema_id": "sema:Trait#mh:SHA-256:e415fe6619857f831d831228b5532ea64d4a6a222773c828098f30d36f450b20",
  "sema_ref": "Trait#e415",
  "sema_stub": "e415",
  "dependencies": {
    "references": {
      "contract": "sema:Contract#mh:SHA-256:98747322ee31ffa265a8dfd6609d726e0dcba9c513e5ec85742c6c04e4afaa26",
      "protocol": "sema:Protocol#mh:SHA-256:f583ad96f598ecf0c9068f5c1390bdf247d2eb67bd7a14c7ce615c357b957b46"
    }
  },
  "sema_layer": "Infrastructure",
  "sema_category": "Data Structures",
  "used_by": {
    "references": {
      "Solver": "sema:Solver#mh:SHA-256:a4478611882cced1b069f8dc551d401c74b35cefe02ed67d37d1aa135e19825b"
    }
  }
}
