{
"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 at-uri reference — an edge to another entity (or, for the retracts predicate, to the attestation being retracted). Used for graph relations: instanceOf, mainSubject, locatedIn, broader, audience, cadence, inScheme. Exactly one of objectRef / objectLit / objectStruct must be present (enforced by the index, not the lexicon)."
},
"predicate": {
"type": "string",
"format": "at-uri",
"description": "The relation asserted, as an at-uri to a project predicate entity (com.t0ronto.commons.entity, instanceOf the project's Property class). Project predicate entities are minted on t0ronto.com's repo (the commons authority); their canonical at-uris are listed in scripts/predicate_seed.json. External vocabularies (rdfs:label, skos:broader, wd:P276) are not used directly as predicate strings — they enter the model as sameAs attestations on the project predicate entity, with objectLit datatype xsd:anyURI. This keeps every identity in the system substrate-native (at-uri) so backlink discovery, retraction, alignment, and curation all work uniformly. Phase 8."
},
"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. Subject is an at-uri (a project entity, or another attestation in the retracts case). Predicate is an at-uri to a project predicate entity (see scripts/predicate_seed.json). Object is exactly one of `objectRef` (an at-uri reference to another entity — an edge in the graph), `objectLit` (a scalar literal — a property value; external IRIs live here as xsd:anyURI), 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. Phase 8: every identity in the model — subject, predicate, objectRef — is an at-uri; the only strings are literals."
},
"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
}