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).
- Fix code examples hardcoding little-endian: read_string, write_string,
read_string_indirect now take endian parameter and use match on Endian.
- Fix TUnion dispatch examples: remove undefined functions (read_u8,
read_field, read_struct, read_f32_raw), remove Value returns
(contradicts 'no intermediate Value tree'), add endian-aware
discriminator reading for Uint8/Uint16/Uint32.
- Fix read_f32 example: inline the endian-aware conversion instead of
calling undefined read_f32_raw; document it as aligned-mode only.
- Fix architecture README: 16→17 kinds in schema-layer and validation
descriptions.
- Fix ADR-095: clarify validation operates on Value instances, not raw
byte buffers directly. Fix 'defense in depth' paragraph.
- Fix ADR-097: add §3a defining TRecord 'values' property shape.
- Fix ADR-098: TTimestamp format ISO 8601→RFC 3339.
- Tighten OQ-071 impacts field: state what IS blocked, not just what
isn't.