{
"id": "com.t0ronto.commons.attestation",
"defs": {
"main": {
"key": "tid",
"type": "record",
"record": {
"type": "object",
"required": [
"subject",
"predicate",
"createdAt"
],
"properties": {
"graph": {
"type": "string",
"description": "Optional sub-grouping token for batch-authored attestations (e.g. \"geocode-sync\", \"lcsh-import\"). Provenance proper — author and time — comes from the record's repo and commit, not from this field.",
"maxGraphemes": 128
},
"subject": {
"type": "string",
"format": "at-uri",
"description": "The anchor this claim is about — a com.t0ronto.commons.entity at-uri. May also be another attestation's at-uri, which lets you attest about an attestation (reification / edge-metadata) without leaving the model."
},
"createdAt": {
"type": "string",
"format": "datetime",
"description": "Client-declared timestamp when the attestation was authored."
},
"objectLit": {
"ref": "#literal",
"type": "ref",
"description": "Object as a scalar literal — a property value. External-world URIs (an LCSH or Wikidata alignment target, a canonical link) are literals with datatype xsd:anyURI, never objectRef — objectRef is reserved for edges inside our own graph. Exactly one of objectRef / objectLit / objectStruct must be present."
},
"objectRef": {
"type": "string",
"format": "at-uri",
"description": "Object as an internal reference — an edge to another anchor (or, for `retracts`, to the attestation being retracted). Use for graph relations: instanceOf, mainSubject, locatedIn, broader, audience, cadence. Exactly one of objectRef / objectLit / objectStruct must be present (enforced by the index, not the lexicon)."
},
"predicate": {
"type": "string",
"description": "The relation asserted. Open vocabulary so the commons can grow; knownValues are the curated core. Edge-style predicates (instanceOf, mainSubject, audience, cadence, locatedIn, broader, inScheme, retracts) take an objectRef; property-style predicates (label, description, link, and the alignment predicates) take an objectLit; compound predicates (address, geo, social) take an objectStruct. `instanceOf` may take an objectRef (an internal type concept) OR an objectLit with datatype xsd:anyURI (an external class such as skos:Concept — this is how an anchor is attested to be a vocabulary concept).",
"knownValues": [
"label",
"description",
"link",
"instanceOf",
"mainSubject",
"audience",
"cadence",
"locatedIn",
"broader",
"inScheme",
"address",
"geo",
"social",
"exactMatch",
"closeMatch",
"broadMatch",
"narrowMatch",
"sameAs",
"retracts"
]
},
"objectStruct": {
"refs": [
"community.lexicon.location.address",
"community.lexicon.location.geo",
"community.lexicon.location.fsq",
"community.lexicon.location.hthree",
"com.t0ronto.commons.defs#social"
],
"type": "union",
"description": "Object as a compound value: a postal address, geo point, Foursquare POI, H3 cell, or social-platform presence. Reuses the community.lexicon.location.* vocabulary deliberately rather than redefining it. Exactly one of objectRef / objectLit / objectStruct must be present."
}
}
},
"description": "A single attestation in the t0ronto data commons: one quad asserting that `subject` stands in relation `predicate` to an object. The object is exactly one of `objectRef` (a reference to another anchor — an edge in the graph), `objectLit` (a scalar literal — a property value), or `objectStruct` (a compound value such as an address or social handle). Provenance is intrinsic and is NOT carried as fields: the record is signed by the repo's DID and stamped by the commit, so who-attested-it and when fall out of the substrate. Append-only by convention — corrections are new attestations (see the `retracts` predicate), not edits. rkey is a TID."
},
"literal": {
"type": "object",
"required": [
"value"
],
"properties": {
"lang": {
"type": "string",
"description": "BCP-47 language tag, used when datatype is rdf:langString. Lets the same subject carry labels/descriptions in multiple languages as separate attestations (e.g. an `en` label and a `fr` label)."
},
"value": {
"type": "string",
"description": "The literal value, lexically encoded per its datatype (e.g. \"43.6532\" for an xsd:decimal, an ISO-8601 string for an xsd:dateTime, the full URI for an xsd:anyURI).",
"maxGraphemes": 2000
},
"datatype": {
"type": "string",
"default": "xsd:string",
"description": "XSD/RDF datatype as a CURIE or URI. Common values: xsd:string, xsd:anyURI (external-vocab targets and links), xsd:dateTime, xsd:decimal, xsd:boolean, rdf:langString."
}
},
"description": "A scalar literal value with an XSD datatype. Numbers, dates, and URIs are carried in their lexical (string) form, tagged by `datatype`."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}