On this page

view

Intent

A semantic user-facing view composed from named context values, independently meaningful parts, and one or more surface presentations.

Exact selection subject:

yaml
subject: view

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

Scope envelope

ScopeContext
eachview: ViewContext
allviews: ViewContext[]
collection candidatescollects.group, collects.feature

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
view.idstringOpaque stable semantic identity.
view.nameNameContextStable semantic identity and finite naming variants.
view.descriptionstring|nullHuman semantic description.
view.tagsstring[]Semantic classifiers; empty when none.
view.explanationsExplanationContext[]Advisory usage/security/implementation notes.
view.groupSemanticLinkContext|nullOwning semantic group.
view.featureSemanticLinkContext|nullCanonical owning feature, when present.
view.contextNamedValueContext[]Named semantic values available to the view.
view.partsViewPartContext[]Same item contract as the view.part subject.
view.presentationsViewPresentationContext[]Named surface presentations.
view.presentations[].nameNameContextPresentation identity.
view.presentations[].surfaceSemanticLinkContextTarget surface.

Usage rules

  • view.parts[] must reuse the exact ViewPartContext.
  • Making parts selectable does not flatten them out of the view hierarchy.
  • Context/presentation map keys become explicit names.

Runtime IR implications to audit

  • Current View should gain universal metadata.
  • View parts need stable canonical identities for selection/indexing.

Template example — Handlebars / React composition

hbs
export function {{file.symbol}}() {
  return (
    <main>
    {{#each view.parts}}
      <{{name.pascal}} />
    {{/each}}
    </main>
  );
}

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 view 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