Derived Selection Facets
Query-helper facets derived from modules and blocks for library search, insertion, and block selection
Derived selection facets are values the compiler or query layer can calculate from authored module and block source to help users find, compare, and insert reusable content.
They are not authored fields and are not canonical schema fields. The source of truth remains the authored object: its flow, data, blocks, content, repeatFor, joinFor, computed expressions, and references.
Purpose
performs describes the behavior a module or block uses. It answers: "What does this object do when evaluated?"
consumes describes the data, runtime, or cross-module surfaces a module or block reads. It answers: "What does this object interact with?"
These facets are useful during selection workflows:
- filter blocks that perform interpolation, repetition, or conditional flow
- show what a block interacts with before insertion
- detect whether a candidate block only reads fields already present in the host module
- list missing data or module surfaces before insertion
- suggest
flow.adaptmappings when equivalent concepts have different paths
Storage Rule
Do not store performs or consumes on the authored object shape.
Implementations may calculate them:
- on demand in query helpers,
- at compile/import time for diagnostics,
- in a search index or cache when library selection needs fast filtering.
Any cached/indexed value is derived and disposable. If it conflicts with the authored source, the authored source wins and the facet should be recalculated.
Performs
performs is the same behavioral vocabulary for modules and blocks.
Prop
Type
Ordering is not a performs value. It is structural metadata, not selection behavior — which is why it lives on order.position (and formerly on the retired flow.after) rather than in the derived vocabulary. See Flow → Ordering.
Consumes
consumes is a normalized list of reference paths derived from parsed references. It uses the same reference path language as interpolation and conditions, without the wrapping {{ ... }}.
ConsumePath =
"data." FieldPath
| ModuleHandle ".data"
| ModuleHandle ".data." FieldPath
| ModuleHandle ".blocks"
| ModuleHandle ".blocks." BlockHandle
| "runtime." RuntimePath| Pattern | Meaning |
|---|---|
data.<field_path> | Reads the current module's data. For a reusable standalone block, this means the host module the block is inserted into. |
<module_handle>.data | Reads another module's data surface. |
<module_handle>.data.<field_path> | Reads a specific field or nested data path from another module. |
<module_handle>.blocks | Reads another module's block/content surface, if future authoring allows it. |
<module_handle>.blocks.<block_handle> | Reads or links to a specific block in another module, if future standalone-block authoring allows it. |
runtime.<path> | Reads runtime state such as workflow mode or generation mode. |
The canonical handle for a document's primary data-pool module is data_pool. A reusable module can consume data_pool.data.willmaker and resolve that path in any host document with a primary data pool.
runtime.* paths are always available at runtime and do not block insertion. They are still useful as facets because they tell search, preview, and rendering that the object is runtime-sensitive.
Flow Adapt
flow.adapt is authored or user-approved insertion metadata, not a derived facet. It maps a host input path to a consumed output path when an inserted module or block does not fit a host document natively. See Flow Schema → Adapt for the field shape, adapter rules, and worked examples.
Selection safety (below) consumes flow.adapt entries to decide whether an insertion needs setup.
Selection Safety
Selection safety can be computed from derived consumes plus any flow.adapt entries.
| Level | Meaning |
|---|---|
safe | No external consumes; only same-object data/flow behavior. |
safe_with_validation | External consumes can be satisfied by the target document tree. |
requires_setup | Required modules, data-pool fields, or cross-module references are missing and must be created or bound before insertion works. |
For each consumed path:
- If it is
data.*and resolves in the host module's data: ok. - Else if it is
<handle>.data.*and resolves in the target document's modules: ok. - Else if it is
<handle>.data.*and the target module istype: "data_pool"with a matching field: ok. - Else if a
flow.adaptentry has the consumed path asoutputand a compatible hostinput: ok. - Else if it is
runtime.*: ok. - Else:
requires_setup.
Example
Authored source:
blocks:
- handle!: guardian_condition
label: Guardian condition
flow:
condition: data.wants_kids
adapt:
- input: module_a.data.wants_children
output: data.wants_kids
content: |
Guardianship provisions apply.Derived facets:
performs:
- flow.condition
consumes:
- data.wants_kidsThe derived facets can power filtering and compatibility checks. They are not stored back onto the block as authored schema.