On this page

property.literal

Intent

A reusable exact literal used for constants, discriminators, and protocol/domain markers.

Exact selection subject:

yaml
subject: property.literal

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

Scope envelope

ScopeContext
eachproperty.literal: LiteralPropertyContext
allproperties.literals: LiteralPropertyContext[]
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.literal.idstringOpaque stable semantic identity.
property.literal.nameNameContextStable semantic identity and finite naming variants.
property.literal.descriptionstring|nullHuman semantic description.
property.literal.tagsstring[]Semantic classifiers; empty when none.
property.literal.explanationsExplanationContext[]Advisory usage/security/implementation notes.
property.literal.groupSemanticLinkContext|nullOwning semantic group.
property.literal.featureSemanticLinkContext|nullCanonical owning feature, when present.
property.literal.lifecycleLifecycleContextDeprecation/removal semantics.
property.literal.value.kindstring|number|boolean|nullDerived literal kind for weak template languages.
property.literal.value.valueCanonicalValueExact canonical literal.

Usage rules

  • Expose a derived literal kind so Handlebars/Mustache do not need runtime type introspection.
  • Target quoting/escaping remains pack responsibility.

Runtime IR implications to audit

  • Properties should gain universal metadata.
  • Provide a canonical literal-kind inspection projection.

Template example — Handlebars / constant

hbs
export const
{{file.symbol}}
=
{{#if
  (eq property.literal.value.kind "string")
}}"{{property.literal.value.value}}"{{else}}{{property.literal.value.value}}{{/if}}
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 property.literal 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