Skip to main content

Lexicons reference

Chive uses the pub.chive.* namespace for all AT Protocol lexicons. This reference documents all record types and their schemas.

Namespace overview

NamespacePurpose
pub.chive.preprint.*Preprint submissions and versions
pub.chive.review.*Reviews and endorsements
pub.chive.graph.*Knowledge graph (fields, proposals, votes)
pub.chive.actor.*User profiles and settings
pub.chive.tag.*User-generated tags
pub.chive.governance.*Governance records (in Governance PDS)

Preprint lexicons

pub.chive.preprint.submission

Core preprint record.

{
"$type": "pub.chive.preprint.submission",
"title": string, // Required, max 500 chars
"abstract": string, // Required, max 5000 chars
"authors": Author[], // Required, 1-50 authors
"keywords": string[], // Optional, max 20 keywords
"fields": string[], // Required, 1-5 field IDs
"license": string, // Required, SPDX identifier
"pdfBlob": BlobRef, // Required, PDF document
"supplementaryBlobs": BlobRef[], // Optional, max 10
"externalIds": { // Optional
"doi": string,
"arxiv": string,
"pmid": string
},
"createdAt": string // Required, ISO 8601
}

interface Author {
did?: string; // AT Protocol DID (if on network)
name: string; // Display name
orcid?: string; // ORCID iD
affiliation?: string; // Institution
corresponding?: boolean; // Is corresponding author
}

pub.chive.preprint.version

Version metadata for preprint revisions.

{
"$type": "pub.chive.preprint.version",
"submission": StrongRef, // Reference to submission
"version": number, // Version number (1, 2, 3...)
"changelog": string, // What changed
"pdfBlob": BlobRef, // Updated PDF
"createdAt": string
}

pub.chive.preprint.userTag

User-contributed tag on a preprint.

{
"$type": "pub.chive.preprint.userTag",
"subject": StrongRef, // Reference to preprint
"tag": string, // Tag text, max 50 chars
"createdAt": string
}

Review lexicons

pub.chive.review.comment

Review comment or reply.

{
"$type": "pub.chive.review.comment",
"subject": StrongRef, // Reference to preprint
"parent": StrongRef, // Optional, for replies
"text": string, // Comment text, max 10000 chars
"reviewType": ReviewType, // Type of review
"highlight": Highlight, // Optional, for inline comments
"createdAt": string
}

type ReviewType =
| "general"
| "methodology"
| "results"
| "reproducibility"
| "writing"
| "question";

interface Highlight {
page: number;
x: number;
y: number;
width: number;
height: number;
text?: string;
}

pub.chive.review.endorsement

Formal endorsement of a preprint.

{
"$type": "pub.chive.review.endorsement",
"subject": StrongRef, // Reference to preprint
"endorsementType": EndorsementType,
"statement": string, // Optional, max 500 chars
"createdAt": string
}

type EndorsementType =
| "overall" // General endorsement
| "methodology" // Sound methodology
| "results" // Verified results
| "reproducibility" // Reproducible
| "writing" // Well-written
| "novelty" // Novel contribution
| "significance"; // Significant impact

Graph lexicons

pub.chive.graph.fieldProposal

Proposal to add or modify a field.

{
"$type": "pub.chive.graph.fieldProposal",
"type": ProposalType,
"title": string, // Max 200 chars
"description": string, // Max 2000 chars
"changes": FieldChanges,
"createdAt": string
}

type ProposalType = "create" | "update" | "merge" | "deprecate";

interface FieldChanges {
fieldId?: string; // For create/update
name?: string;
parent?: string;
description?: string;
mergeInto?: string; // For merge
deprecationReason?: string; // For deprecate
}

pub.chive.graph.vote

Vote on a proposal.

{
"$type": "pub.chive.graph.vote",
"proposal": StrongRef, // Reference to proposal
"vote": "approve" | "reject" | "abstain",
"comment": string, // Optional, max 500 chars
"createdAt": string
}

pub.chive.graph.authorityRecord

Authority record for controlled vocabulary (stored in Governance PDS).

{
"$type": "pub.chive.graph.authorityRecord",
"id": string,
"type": "field" | "person" | "organization" | "concept",
"name": string,
"aliases": string[],
"description": string,
"broaderTerms": string[],
"narrowerTerms": string[],
"relatedTerms": string[],
"externalIds": {
"wikidata": string,
"lcsh": string,
"viaf": string,
"fast": string,
"orcid": string,
"ror": string
},
"createdAt": string,
"updatedAt": string
}

Actor lexicons

pub.chive.actor.profile

Extended user profile.

{
"$type": "pub.chive.actor.profile",
"bio": string, // Max 1000 chars
"orcid": string, // ORCID iD
"affiliation": string,
"website": string,
"researchInterests": string[],
"fields": string[], // Followed fields
"publicEmail": string
}

pub.chive.actor.discoverySettings

Discovery preferences.

{
"$type": "pub.chive.actor.discoverySettings",
"recommendationDiversity": "low" | "medium" | "high",
"excludeSources": string[],
"languages": string[],
"emailDigestFrequency": "never" | "daily" | "weekly"
}

Common types

StrongRef

Reference to another record.

interface StrongRef {
uri: string; // AT URI
cid: string; // Content ID
}

BlobRef

Reference to a blob.

interface BlobRef {
$type: "blob";
ref: {
$link: string; // CID
};
mimeType: string;
size: number;
}

Validation rules

String limits

FieldMax length
Title500
Abstract5000
Comment text10000
Tag50
Bio1000

Array limits

FieldMax items
Authors50
Keywords20
Fields5
Supplementary blobs10
Aliases20

Blob limits

TypeMax size
PDF100 MB
Supplementary50 MB each
Total per record200 MB

Versioning

Lexicons follow semantic versioning:

  • Major: Breaking changes (new required fields, removed fields)
  • Minor: Backwards-compatible additions (new optional fields)
  • Patch: Bug fixes, documentation updates

Current versions:

LexiconVersion
pub.chive.preprint.*1.0.0
pub.chive.review.*1.0.0
pub.chive.graph.*1.0.0
pub.chive.actor.*1.0.0