The code introduced concrete public types and a unified API during
implementation that the specs described only conceptually. Sync the
specs to match the code:
- schema-layer.md: document the TypeDefKind enum and its inherent methods;
add a Schema-Layer Public API section (get_typedef_kind vs
get_typedef_kind_loose, annotation parsers, Endian/VariableEncoding/
DiscriminatorKind, normalize_refs/resolve_ref/resolve_ref_or_inline);
fix the TRecord layout (values are encoded by their declared kind, not
universally value_len-prefixed); fix the alignment default list.
- layout-engine.md: document the LayoutMode enum and the ByteRange/
FieldPosition/PackedLayout/OffsetMap public types with their actual
signatures; update the LayoutBuilder/SequentialReader/OffsetMap
component descriptions with the real new/build/compute signatures.
- data-access.md: document the FieldValue enum; add a Higher-level
read/write section (TypedefEngine::read_field/write_field,
SequentialReader::read_next/read_field); fix primitive signatures to
include field_path and Endian; replace the wrong
read_union_discriminator pseudo-code with the actual tunion module API
(read_byte_discriminator/read_field_discriminator/resolve_variant/
discriminator_size) and the UnionDispatch struct.
- validation.md: fix the TypedefEngine struct (add endian/schema fields,
mark Layout as private); add the real compile signature (&mut Value,
LayoutMode) and mode-appropriate accessors; fix engine.validate(buffer)
-> engine.validate_json(&Value)/is_valid_json (the validator operates
on serde_json::Value, not byte buffers — matches ADR-098).
- overview.md: remove the stale ~1,900 lines / 26 tests line count.
- ADR-097 §3a: correct the TRecord layout (no separate value_len prefix;
the value is encoded by its declared TypeDef:* kind).