---
slug: "Trait"
name: "Trait"
type: "Data Structures"
layer: "Infrastructure"
ref: "Trait#e415"
sema_id: "sema:Trait#mh:SHA-256:e415fe6619857f831d831228b5532ea64d4a6a222773c828098f30d36f450b20"
tags: ["Infrastructure","Data Structures"]
updated: 2026-11-11
mindscape: "bootstrap"
index_url: https://mindscape.pages.dev/bootstrap/index.json
url: https://mindscape.pages.dev/bootstrap/Trait/
related: ["Contract","Protocol","Solver"]
---

# Trait

Named surface set that implementers must provide

Layer: Infrastructure · Category: Data Structures

## 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](https://mindscape.pages.dev/bootstrap/Protocol.md), which is a Trait whose exchange must hold between two or more parties, and from [Contract](https://mindscape.pages.dev/bootstrap/Contract.md), 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.

## Data schema

```json
{
  "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."
    }
  }
}
```

## Builds on

- [Contract](https://mindscape.pages.dev/bootstrap/Contract.md) (Infrastructure; References)
- [Protocol](https://mindscape.pages.dev/bootstrap/Protocol.md) (Infrastructure; References)

## Used by

- [Solver](https://mindscape.pages.dev/bootstrap/Solver.md) (Mind; References)

## Identity

- Sema ID: `sema:Trait#mh:SHA-256:e415fe6619857f831d831228b5532ea64d4a6a222773c828098f30d36f450b20`
- Ref: `Trait#e415`
- Supersedes:
  - `sema:Trait#mh:SHA-256:13adbfa9f48babf1c2de572b4eb72454879cbb1d76404fd65aee70400a72e2b7`
  - `sema:Trait#mh:SHA-256:14c7e4c3545c4dbe5d22a17eba23ce4a4f521cfcc29bd46561149be740b4a808`

## Links

- [Pattern page](https://mindscape.pages.dev/bootstrap/Trait/)
- [View in the interactive graph](https://mindscape.pages.dev/bootstrap/#Trait)
- [JSON](https://mindscape.pages.dev/bootstrap/Trait.json)
- [Index of all patterns](https://mindscape.pages.dev/bootstrap/index.json)
