ContractSpec docs

OSS-first docs

These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.

RichReference usage

Authoring kinds and wiring governance ports.

field.key.label
RichReference usage
field.version.label
field.type.label
field.title.label
RichReference usage
field.description.label

Authoring kinds and wiring governance ports.

field.tags.label
rich-reference,authoring
field.owners.label
field.stability.label
public
import { defineReferenceKind } from '@lssm-tech/lib.contracts-spec/rich-reference';
import { z } from 'zod';

export const ticketKind = defineReferenceKind({
  id: 'ticket',
  schema: z.object({ id: z.string(), title: z.string() }),
  sensitiveFields: ['title'],
  defaultPreview: 'inline-card',
  defaultPanel: 'drawer',
  icon: 'ticket',
});

`sensitiveFields` is required at the type level and at runtime; kinds with no sensitive fields MUST pass `[]` with an inline confirmation comment (F-4 mitigation).