On this page
property.literal
Intent
A reusable exact literal used for constants, discriminators, and protocol/domain markers.
Exact selection subject:
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
| Scope | Context |
|---|---|
each | property.literal: LiteralPropertyContext |
all | properties.literals: LiteralPropertyContext[] |
| collection candidates | collects.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 path | Type | Meaning / template use |
|---|---|---|
property.literal.id | string | Opaque stable semantic identity. |
property.literal.name | NameContext | Stable semantic identity and finite naming variants. |
property.literal.description | string|null | Human semantic description. |
property.literal.tags | string[] | Semantic classifiers; empty when none. |
property.literal.explanations | ExplanationContext[] | Advisory usage/security/implementation notes. |
property.literal.group | SemanticLinkContext|null | Owning semantic group. |
property.literal.feature | SemanticLinkContext|null | Canonical owning feature, when present. |
property.literal.lifecycle | LifecycleContext | Deprecation/removal semantics. |
property.literal.value.kind | string|number|boolean|null | Derived literal kind for weak template languages. |
property.literal.value.value | CanonicalValue | Exact 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
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?