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.

unknown/docs.tech.contracts.ops-to-presentation-linking

This document explains how operations (OperationSpec) are linked to Presentations (PresentationSpec) via Feature modules.

  • Location: @lssm-tech/lib.contracts-spec/src/features.ts
  • Field: FeatureModuleSpec.opToPresentation?: { op: { name; version }; pres: { name; version } }[]
  • field.key.label
    unknown/docs.tech.contracts.ops-to-presentation-linking
    field.version.label
    field.type.label
    field.title.label
    unknown/docs.tech.contracts.ops-to-presentation-linking
    field.description.label

    This document explains how operations (OperationSpec) are linked to Presentations (PresentationSpec) via Feature modules.

  • Location: @lssm-tech/lib.contracts-spec/src/features.ts
  • Field: FeatureModuleSpec.opToPresentation?: { op: { name; version }; pres: { name; version } }[]
  • field.tags.label
    field.owners.label
    field.stability.label

    Ops ↔ Presentation linking (V2)

    This document explains how operations (OperationSpec) are linked to Presentations (PresentationSpec) via Feature modules.

    Location: `@lssm-tech/lib.contracts-spec/src/features.ts`

    Field: `FeatureModuleSpec.opToPresentation?: { op: { name; version }; pres: { name; version } }[]`

    Validation: `installFeature()` validates that linked ops exist in `OperationSpecRegistry` and linked presentations exist in the registry, and that declared targets are present.

    Example:

    import type { OperationSpecRegistry } from '@lssm-tech/lib.contracts-spec/src/registry';
    import { FeatureRegistry, createFeatureModule } from '@lssm-tech/lib.contracts-spec';
    
    export function buildFeaturesWithOps(ops: OperationSpecRegistry) {
      const features = new FeatureRegistry();
      features.register(
        createFeatureModule(
          {
            key: 'myapp.widgets.linkage',
            title: 'Widgets (linked)',
            description: 'Links create/update ops to UI presentations',
            domain: 'widgets',
            tags: ['widgets', 'linkage'],
            stability: 'beta',
          },
          {
            operations: [
              { name: 'widgets.create', version: '1.0.0' },
              { name: 'widgets.update', version: '1.0.0' },
            ],
            presentations: [{ name: 'myapp.widgets.editor.page', version: '1.0.0' }],
            opToPresentation: [
              {
                op: { name: 'widgets.create', version: '1.0.0' },
                pres: { name: 'myapp.widgets.editor.page', version: '1.0.0' },
              },
              {
                op: { name: 'widgets.update', version: '1.0.0' },
                pres: { name: 'myapp.widgets.editor.page', version: '1.0.0' },
              },
            ],
            presentationsTargets: [
              {
                name: 'myapp.widgets.editor.page',
                version: '1.0.0',
                targets: ['react', 'markdown'],
              },
            ],
          }
        )
      );
      return { features };
    }

    Notes

    This enables traceability: the UI flow that realizes an op is discoverable via the feature catalog.

    Presentations can target multiple outputs (`react`, `markdown`, `application/json`, `application/xml`).

    Use `renderFeaturePresentation()` to render a descriptor to a given target with a component map.