On this page

Runtime IR reference

The implemented dryv.ir/v1alpha1 ownership model. Per-concept pages: properties, schemas, policies, events, operations, workflows, views, parts, presentations, themes, groups. Serialization rules: naming. Complete example: sdk/_examples/ir/dryv.ir.yaml.

Meaning

One authored Dryv software description compiles into one canonical Runtime IR document.

text
Authoring source
    -> canonical Dryv Runtime IR
    -> Runtime validation / loading / serialization / inspection
    -> pack selection / binding / planning / rendering
    -> generated output

Runtime IR is the semantic authority.

Major ownership rule

Every semantic fact must have one clear owner.

Dryv must not duplicate one meaning across competing top-level concepts, create root registries merely because a subordinate contract is complex, hide semantic relationships in naming conventions, move canonical meaning into packs, or preserve obsolete models for compatibility.

Canonical root Runtime IR

yaml
version: dryv.ir/v1alpha1
key: example
info: {}

groups: {}

properties:
  primitives: {}
  enums: {}
  composites: {}
  literals: {}
  unions: {}
  records: {}
  tuples: {}
  generics: {}
  temporal: {}

schemas: {}
expressions: {}
policies: {}
failures: {}
events: {}
operations: {}
workflows: {}
views: {}
surfaces: {}
themes: {}
features: {}
applications: {}

There is no root:

text
sources
storage
exposures
presentations

Sources belong to Schema fields, storage belongs to Schema facets, transport facets belong to Operations, and Presentations belong to Views.

Root registries versus semantic ownership

Root registries provide deterministic lookup. Semantic ownership lives where the meaning belongs.

Examples:

text
features              root lookup registry
<declaration>.feature semantic ownership: the declaration names its Feature

operations            root lookup registry
Operation.facets      semantic ownership of callable transport mappings

schemas               root lookup registry
Schema.facets         semantic ownership of Schema-local facets such as storage

views                 root lookup registry
View.presentations    semantic ownership of Surface bindings for one View

Groups

Groups own semantic organizational scope. Group parentage affects scope but does not alter declaration identity.

Declarations use:

text
<group>.<local-name>

not ancestry-qualified or Feature-qualified identities.

Features

A Feature is a named unit owned by exactly one Group (feature.group). Features are flat inside their Group.

Ownership is written on each declaration: a required group and an optional feature whose Group must match. Declarations without a feature are owned directly by their Group. Feature membership is derived, never listed on the Feature or Group. See groups and decision 0011.

Ownership does not change canonical identities, and it does not restrict references: any declaration may reference any other.

Properties

Properties own reusable value/type meaning.

Canonical reusable registries are:

text
primitives
enums
composites
literals
unions
records
tuples
generics
temporal

unknown and dynamic are intrinsic use-site targets, not reusable root registries.

Schemas

Schemas own structured software-state meaning, including flat fields, usage amendments, defaults, mutation/query/sensitivity semantics, field Policies, relations, field-local Sources, inheritance, resolved projections, Schema facets, Schema-local storage semantics, invariants, examples, and semantic metadata.

There is no root Source or Storage registry.

Expressions

Expressions are reusable named semantic computations/conditions. Each is an owned declaration (group, optional feature, description, tags, explanations) whose value holds the expression tree. Consumers reference canonical Expression declarations rather than embedding competing rule models.

Policies

Policies own reusable semantic requirements/guards/decisions. A Policy may define typed required/provided context and an optional Expression rule.

Failures

Failures remain reusable root declarations. Operations reference Failures, and transport mappings may map declared Failures to transport-specific responses.

Operations

Operations own executable semantic capability meaning.

Current Operation-owned semantics include optional role, ordered direct value input/output ports, declared Failures, emitted Events, access/Policy requirements, trusted persisted-record scope, execution facets, and named callable exposures. Scope bindings reference a persisted Schema field directly and a named value from an attached Policy; projections identify exposed aliases when present.

Operation I/O ports reference reusable Properties/Schemas directly through ValueRef.

Specific ports use typed OperationPortRef with Operation identity, direction, and index.

There are no keyed Operation I/O maps and no physical port pointers.

Operation-owned facets

There is no root exposures registry. HTTP, WebSocket and schedule mappings belong to their owning Operation as facets.http, facets.websocket and facets.schedule.

Events

Events own semantic occurrence meaning, direct Property/Schema payload references, and typed Operation/Workflow listeners.

Relationships remain distinct:

text
Operation -> emits -> Event
Event -> listeners -> Operation / Workflow
Workflow WaitStep -> waits for -> Event

Workflows

Workflows own orchestration meaning: ordered direct value ports, explicit output bindings, named steps, Operation/nested Workflow/Event wait steps, typed step refs, explicit source-to-target value flow, and transitions.

There is no keyed Workflow I/O and no implicit type-based wiring.

Views and Parts

Views own coherent interaction meaning.

A View may own:

  • named context values using canonical ValueRefs;
  • named tagged Parts;
  • named local Presentations.

Part is a closed tagged union:

text
present
collect
invoke

A Present Part reads an Operation output port and may select semantic paths.

A Collect Part supplies one Operation input port from collected semantic paths and/or View context.

An Invoke Part invokes an Operation and explicitly supplies required inputs from View context.

There is no broad Part object containing presents, collects, invocation, contains, emits, reacts, or when.

There is no PartRef and no Part containment graph.

Specific View context values are referenced with typed ViewContextRef:

yaml
$ref: "#/views/orders.OrderDetails"
context: orderId

Runtime validation resolves Present/Collect paths through effective Schema or Composite Property meaning and validates context type compatibility.

The previous Event-driven ViewTransition model is removed. Navigation/routing is not currently a canonical View concept.

Surfaces

Surfaces remain reusable root declarations. A Surface describes a broad interaction environment such as web, mobile, desktop, CLI, or embedded without selecting a framework implementation.

View-owned Presentations

Presentation is no longer a root declaration.

A View owns a local map of Presentation bindings:

yaml
views:
  orders.OrderDetails:
    presentations:
      web:
        surface:
          $ref: "#/surfaces/web"
        layout: master-detail
        peers:
          - $ref: "#/views/orders.OrderList"

A View-local Presentation owns a Surface reference and may carry portable flow or master-detail layout intent. master-detail requires one or more peer Views.

Removed concepts include root presentations, PresentationRef, Presentation parent chains, Presentation addresses, Feature presentation membership, Application presentation membership, and standalone authoring presentation records.

Routes, stack operations and framework page placement remain pack-owned.

Applications

Applications remain root composition declarations.

An Application may select Groups, Policies, scoped HTTP roots (facets.http.root), Surfaces, a Theme, named destinations, named transitions, and semantic metadata.

Destinations reference a View and optionally one of that View's local Presentation names. Transitions connect two destination names, may reference the Operation that initiates the transition, and declare either replace or overlay intent. Runtime validates all references and requires an overlay target to contain overlay collection intent.

Generation context exposes destinations and transitions as sorted typed collections, including derived name variants and semantic links. Packs use these facts to choose target routes or navigation-stack representations without re-parsing Runtime IR.

Applications do not own Feature lists or Presentation lists.

Feature reachability is:

text
Application -> Groups -> Features -> declarations

Explicit reference rule

Relationships between canonical declarations use typed machine-resolvable references wherever possible.

Examples:

text
Schema relation      -> SchemaFieldRef
Operation port       -> OperationPortRef
Workflow port        -> WorkflowPortRef
Workflow step        -> WorkflowStepRef
View context         -> ViewContextRef
Event listener       -> typed OperationRef / WorkflowRef
Declaration owner    -> GroupRef + optional FeatureRef

Physical implementation-style pointers are not substitutes for these semantic references.

In-place ownership rule

Semantic facts are declared where their meaning belongs.

text
Property value meaning          -> Property
Schema field/source/storage     -> Schema
Operation execution/exposure    -> Operation
Event listeners                 -> Event
Workflow value flow             -> Workflow
View context/Parts/Presentation -> View
Declaration ownership           -> the declaration (group + feature)

Classification test

Before adding an IR field or relationship, ask:

  • Does it describe the software? Then it may belong in Runtime IR.
  • Does it describe generation? Then it belongs in packs or planning.
  • Does it describe presentation? Then it belongs in templates or derived context formatting.
  • Is it renderer- or framework-specific? Then it never becomes canonical meaning unless a framework-neutral concept sits underneath it.

Convenient template context is not automatically canonical meaning.

Pack boundary

Packs consume canonical meaning but do not redefine it.

A UI pack selects Views, then inspects tagged Parts, View context, and View-local Presentations. It does not select a root Presentation registry because none exists.

Authoring boundary

Authoring APIs may be more ergonomic than Runtime IR. The compiler must resolve conveniences into canonical Runtime IR before Engine ingestion.

Authoring must not require Runtime IR to preserve an Authoring-only abstraction.

Current authority

When materials disagree, authority is:

  1. current Runtime IR contracts under source/engine/python/engine/src/dryv/contracts/semantic/;
  2. current validators/serialization/loading/inspection behavior;
  3. these spec pages;
  4. the complete example sdk/_examples/ir/dryv.ir.yaml.
Search in