Skip to content

Specifications

The approved specs in this folder are the promises libxmtp and the self-hosted backend keep. SPEC-spec-format.md defines the format, the admission test, the identifier scheme, and the backlink rules. GLOSSARY.md defines the actors and shared terms. Requirement identifiers are globally unique, such as CONF-012 or JOIN-046.

Specs supersede XIPs. The documents they replaced were deleted under one blanket disposition (SPEC-013) once the replacing specs held their obligations; their history is in git.

A requirement without a proving test needs a waiver under SPEC-055, SPEC-094, and SPEC-095. Use analysis when a recorded review proves a property that no test can prove. Use gap when the code does not satisfy the requirement; name an owner and an issue. Use untested when the reason names the code that satisfies the requirement but no test proves it yet; name an owner.

PrefixSpecOwns
SPECSpecification formatThe format, admission, identifiers, backlinks, waivers, plans’ spec-change section
TOPICTopic formatThe kind byte and identifier layout of every topic
APIBackend API contractThe gRPC contract: ordering, publish, query, subscribe, identity RPCs, connection statistics, error codes, admission validation
CONFBackend configurationConfiguration validation, what is published, how the client applies it
AUTHBackend authRequest authentication and authorization, client credentials, terminal auth failures
OPSBackend operationsRetention and pruning, readiness and health, shutdown as observed, the metric catalogue
PUSHPush subscriptions and webhooksRecipient registration, channels, subscription sync, dispatch, HMAC suppression, webhook signing
IDENTIdentity updatesAssociation log, signature kinds, inbox id derivation, replay protection, installation lifecycle, local signing-key persistence
JOINJoining groupsKey packages, Welcomes, welcome pointers, when a Welcome replaces local state, join validation
GMODModifying groupsCommits and proposals, commit validation, adding members, failed installations
PERMGroup permissionsThe policy set, evaluation, admin semantics, policy versioning
METAGroup metadata and app dataImmutable and mutable metadata, the app-data dictionary and registry, disappearing messages
DMSDMs and stitchingDM id, fixed DM policy, duplicate detection and stitching
PROCMessage processingStreams and queries into one ordered processor, durable positions, retry and rejection
SENDMessage sendingIntents, message ids, publish retries, per-group ordering, failed sends
FORKFork recovery and commit logCommit-log entries, fork detection, readd requests, one-shot groups
CONSConsentConsent states, precedence, defaults, gating of listing and streaming
SYNCDevice syncThe sync group, preference updates, trust of sync invitations
ARCHArchive formatThe backup export and import format and its compatibility promise
MIGLegacy database migrationClosed legacy source conversion, source preservation, metadata fallback, and atomic local archives
CTYPEContent typesContent type ids, the encoded-content envelope, the standard catalogue
STOREClient storageClient database locations, storage lifecycle, and unencrypted database support
ATCHRemote attachmentsPublished attachment storage, download URLs, the upload request, pending attachments, local attachment files, downloads
EVENTClient eventsLive event kinds, payloads, filters, delivery, and subscriptions
LOGClient loggingClient diagnostic logs and app sinks

Run each one as dev/nix-shell 'just <recipe>'.

Terminal window
just spec-check # validate docs/specs/ and the backlinks in code; part of just lint
just spec-index # print every requirement with its links; --json for tooling
just spec-show JOIN-012 # print one requirement with its links

Skills for this work live in .agents/skills/: authoring-specs, reviewing-specs, and checking-spec-compliance.