On this page

surface

Intent

A delivery/presentation surface such as web, mobile, desktop, CLI, or embedded.

Exact selection subject:

yaml
subject: surface

The current Runtime IR is evidence, not authority. Target improvements needed for a usable template contract are called out explicitly.

Scope envelope

ScopeContext
eachsurface: SurfaceContext
allsurfaces: SurfaceContext[]
collection candidatescollects.group

For collects.<dimension>, the singular collector is added beside the plural selected-subject array. A collector is valid only when ownership is semantically provable.

Context tree

Context pathTypeMeaning / template use
surface.idstringOpaque stable semantic identity.
surface.nameNameContextStable semantic identity and finite naming variants.
surface.descriptionstring|nullHuman semantic description.
surface.tagsstring[]Semantic classifiers; empty when none.
surface.explanationsExplanationContext[]Advisory usage/security/implementation notes.
surface.groupSemanticLinkContext|nullOwning semantic group.
surface.kindweb|mobile|desktop|cli|embeddedStructural kind.
surface.viewsSemanticLinkContext[]Derived views presented on the surface.
surface.applicationsSemanticLinkContext[]Derived applications including the surface.

Usage rules

  • views is a reverse index from view presentations; templates should not scan all views.
  • Do not add kind-specific fields until real packs prove them.

Runtime IR implications to audit

  • Current surface variants should gain universal metadata.
  • Provide efficient reverse indexes for views/application membership.

Template example — Handlebars / view registry

hbs
export const
{{file.symbol}}
= [
{{#each surface.views}}
  "{{name.pascal}}",
{{/each}}
] as const;

The example uses semantic context only. Any renderType/render_type helper shown is a pack-owned macro/partial consuming the documented TypeContext, not hidden Dryv context.

Audit questions

  • Can a real surface pack generate code without parsing raw IR storage conventions?
  • Is any field here present only because the current IR happens to store it?
  • Does any nested item need first-class selection of its own?
Search in