Skip to content

The declaration language

A product is a YAML document bound against a typed catalog. Every name in it — archetype, feature, modifier, validator — binds fail-fast at load: a typo is a CatalogError before any geometry exists.

schema: product/v1
id: desk_cable_clip_20mm
archetype: underdesk_cable_clip_v2_molded@1
strict: true
requested_features:
- asymmetric_side_hook
- mounting_flange
- hex_perforation
params:
bundle_d: 20mm
mouth_gap: 10mm
wall: 3.2mm
screw: M4
style:
surface: molded_utility_part
softness: 0.75
manufacturing:
process: fdm
material: PETG
nozzle: 0.4mm
layer_height: 0.2mm
support_policy: avoid
modifiers:
- id: add_hex_perforation
target: perforation_safe_zone
params:
cell_d: 5mm
wall_gap: 1.5mm

archetypeid@version of the product grammar this instance speaks. The archetype owns parameters, regions, the contract and the validator list; your declaration fills in the numbers. Browse them in the registry.

requested_features — what you ask for, by name from the archetype’s vocabulary. The capability resolver tracks requested vs supported vs built; a feature is built only when every check in its verified_by list PASSes. built ⊆ supported is enforced at the schema level — an unsupported feature physically cannot serialize as built.

params — scalar values in the value grammar: 20mm, bare numbers, choices (M4), or expr(...) formulas over earlier parameters. Resolution is one parameter at a time in declaration order — default, then clamp — so a later parameter’s bounds may reference any earlier parameter’s final value:

mouth_gap:
min: 4mm
max: expr(bundle_d * 0.7) # the throat stays narrower than the bundle

style — the surface style and its sliders (e.g. softness scales decorative radii). Style never touches engineering surfaces: contact surfaces, mouths, the print base and fasteners are untouchable by construction.

manufacturing — process, material, nozzle, layer height, support policy. Manufacturing checks (manufacturing.min_wall, overhang, bed_fit) measure the compiled solid against these constraints.

modifiers — typed, region-bound transformations. Each entry names a modifier, a target region and parameters; the applicator derives keepouts and emits IR features that the compiler cuts exactly. Functional tweaks (like widening a mouth) are repair-layer patches, not modifiers.

schema: assembly/v1 describes multi-part products with the same commands: the root part is the single frame of reference, parts are inline, shared: injects mating dimensions once (a desynced bolt circle is unrepresentable), and joints come from the fail-fast joint registry. Joint checks run at the IR level before any CAD, then as fit probes in the assembled pose.