On this page

property.enum

Intent

A reusable finite value set. Member names must be explicit so templates do not depend on dictionary-key iteration behavior.

Exact selection subject:

yaml
subject: property.enum

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

Scope envelope

ScopeContext
eachproperty.enum: EnumPropertyContext
allproperties.enums: EnumPropertyContext[]
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
property.enum.idstringOpaque stable semantic identity.
property.enum.nameNameContextStable semantic identity and finite naming variants.
property.enum.descriptionstring|nullHuman semantic description.
property.enum.tagsstring[]Semantic classifiers; empty when none.
property.enum.explanationsExplanationContext[]Advisory usage/security/implementation notes.
property.enum.groupSemanticLinkContext|nullOwning semantic group.
property.enum.featureSemanticLinkContext|nullCanonical owning feature, when present.
property.enum.lifecycleLifecycleContextDeprecation/removal semantics.
property.enum.examplesCanonicalValue[]Examples.
property.enum.orderedbooleanWhether member order is semantic.
property.enum.valuesEnumValueContext[]Deterministic explicit members.
property.enum.values[].nameNameContextMember symbolic name.
property.enum.values[].valuestring|number|booleanSerialized value.
property.enum.values[].titlestring|nullDisplay title.
property.enum.values[].descriptionstring|nullMember meaning.

Usage rules

  • Current values map becomes an array with explicit member names.
  • When ordered=false, output order is deterministic but carries no semantic meaning.

Runtime IR implications to audit

  • Properties should gain universal metadata.
  • If ordered=true, canonical IR needs an explicitly preserved semantic order, not accidental map insertion order.

Template example — Handlebars / TypeScript enum

hbs
export enum
{{file.symbol}}
{
{{#each property.enum.values}}
  {{name.constant}}
  = "{{value}}",
{{/each}}
}

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.enum 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