diff --git a/docs/DESIGN.md b/docs/DESIGN.md index f4a02d8..4c5d4c5 100644 --- a/docs/DESIGN.md +++ b/docs/DESIGN.md @@ -1705,12 +1705,13 @@ hashes stay bit-identical. ## Data model The on-disk JSON-AST is what the toolchain hashes, typechecks, and -lowers. Every node in this section is the schema mirror of an enum or -struct in `crates/ailang-core/src/ast.rs`; whenever the two disagree, -`ast.rs` is the source of truth. Every additive field is declared with -`skip_serializing_if` so pre-existing fixtures keep bit-identical -canonical-JSON hashes — that gating contract is what makes growing -the schema cheap. +lowers. **This section is the canonical schema.** The Rust types in +`crates/ailang-core/src/ast.rs` are the in-memory projection of it; +when the two disagree, this section wins, and the drift test +`crates/ailang-core/tests/design_schema_drift.rs` fires. Every +additive field is declared with `skip_serializing_if` so pre-existing +fixtures keep bit-identical canonical-JSON hashes — that gating +contract is what makes growing the schema cheap. ### Module