Data and primitivesDocuments

Documents

Understand schema-bound structured values, document identity, access scope, and lifecycle boundaries.

Use a Document for schema-bound structured content, such as an inspection report or checklist. Constructing a document creates a value, not a durable commit or replicated edit history.

Schema resolution, record replication, and attachment retrieval have independent outcomes.

Preserve identity and field semantics

A document has a UUIDv7 DocumentId, SchemaId, access GroupId, title, creator DID, and lifecycle. Optional values include a workflow identity and an opaque version token. Equality follows DocumentId, not field contents.

Fields retain their merge intent through registers, counters, collaborative text, sets, lists, and maps. Your storage integration must preserve those kinds and their operation semantics. A whole-value replacement does not create collaborative history.

The builder checks structural limits. Your application resolves the exact schema and checks required fields, field kinds, constraints, reference targets, and write authority. A creator DID is metadata, not proof of the operation's signer.

Own access and lifecycle

The document's GroupId names an application access scope. It does not grant permission or require Mission Group admission. Map that scope to your verified authorization and replication policy.

Active documents permit edits. Archived documents are read-only. Document lifecycle remains distinct from workflow state and binary retention. If the schema is pending, preserve source data and expose that state rather than guessing the field meaning.

Construction does not install a schema registry, enforce the full application contract, persist data, or transfer it to peers. Use an explicit payload encoding and identity mapping when composing a document into a generic Platform Record.

Keep attachments outside unsupported fields

Document Value::PrimitiveRef contains a UUID. A BlobId contains a 32-byte content hash, and document fields have no BlobRef variant. A schema's RefType::Blob marker does not make those representations interchangeable.

Use an application-owned attachment relation to preserve the document identity and full blob reference.

The Document reference defines exact fields, builders, and limits. Schemas and records defines merge choices. The Platform language references identify binding entry points.