On this page

property.composite

Intent

A reusable structured value object made of named fields plus invariants.

Exact selection subject:

yaml
subject: property.composite

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

Scope envelope

ScopeContext
eachproperty.composite: CompositePropertyContext
allproperties.composites: CompositePropertyContext[]
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

This file defines the unique composite-property context. Its nested fields reuse the shared field-value contract.

Context pathTypeMeaning / template use
property.composite.idstringOpaque stable semantic identity.
property.composite.nameNameContextShared naming context from README.md.
property.composite.descriptionstring|nullSemantic description.
property.composite.tagsstring[]Semantic tags.
property.composite.explanationsExplanationContext[]Shared explanation context.
property.composite.groupSemanticLinkContext|nullOwning group link.
property.composite.featureSemanticLinkContext|nullCanonical owning feature.
property.composite.lifecycleLifecycleContextShared lifecycle context.
property.composite.examplesCanonicalValue[]Examples.
property.composite.fieldsCompositeFieldContext[]Deterministic named fields.
property.composite.invariantsExpressionContext[]Full contexts from expression.md, demand-resolved.

CompositeFieldContext

Context pathTypeMeaning / template use
property.composite.fields[].nameNameContextField identity.
property.composite.fields[].valueSemanticValueContextReuses shared/semantic-value.md.
property.composite.fields[].optionalbooleanField-local optional presence.
property.composite.fields[].nullablebooleanField-local nullable value.
property.composite.fields[].arrayArrayBoundsContext|nullField-local array cardinality.
property.composite.fields[].tagsstring[]Field-level tags.

Usage rules

  • Composite fields reuse SemanticValueContext; templates never inspect pointer prefixes and nested reusable properties/schemas keep their authoritative context contract.
  • Field maps become arrays with explicit names.

Runtime IR implications to audit

  • Properties should gain universal metadata.
  • Provide a consistent type projection for property/schema-backed fields.

Template example — Jinja / Python value object

jinja
@dataclass(frozen=True)
class {{ file.symbol }}:
{% for field in property.composite.fields %}
    {{ field.name.snake }}: {{ render_field_value(field.value) }}
{% endfor %}

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 property.composite 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