The builder stores doc: BastDoc + endian (the doc_value: Value +
root_name: String cache is gone); new parses the typed tree once and
build walks &self.doc — the per-build BastDoc::new re-parse
(layout_builder.rs M1) is retired.
- build's root-is-struct re-check replaces its unreachable!() with a
clean Schema error (AGENTS.md §3 never-panic; invariant unchanged —
new already rejects non-struct roots).
- Boxing fallout: the builder now holds the full owned tree, so
Layout::Packed boxes it (Box<LayoutBuilder>) to keep the engine's
Layout enum variant sizes balanced (clippy large_enum_variant).
layout_builder() still returns Option<&LayoutBuilder> via
auto-deref; public API unchanged.
Verification: 465 tests pass unchanged (layout_builder.rs suites
drive new/build through the public API); clippy -D warnings clean;
wasm32 release build green.