Skip to main content

Module loader

Module loader 

Source
Expand description

Schema loader — reads on-disk schema directories (or in-memory YAML) into validated Schema values with edge_weights resolved.

Three validation layers coordinate here:

  1. Structural (serde + deny_unknown_fields) — handled by the deserialize.
  2. Semantic (this module) — cross-field rules listed in SchemaLoadError.
  3. Editor (JSON Schemas) — generated by emit_json_schemas, consumed by schema authors via # yaml-language-server: $schema=....

Enums§

SchemaLoadError

Functions§

load_schema_from_dir
Load a schema from a directory containing schema.yaml and types/*.yaml.
load_schema_from_memory
Load a schema from in-memory YAML strings.
reserved_metadata_field_keys
Engine-invariant metadata-field keys reserved against schema use. type is the engine-set frontmatter discriminator.
reserved_section_keys
Engine-invariant section keys reserved against schema use. The parser’s auto-managed ## Relationships section is the only entry today.
validate_schema_name
Author-time access to the schema-name shape rule — the same check the loader runs on a manifest’s name:. Exposed so scaffolding tooling (memstead schema new) can refuse a bad name up front with the loader’s own reason string instead of a drifting copy of the grammar.