diff --git a/crates/ailang-core/src/ast.rs b/crates/ailang-core/src/ast.rs index 36d903a..20020d3 100644 --- a/crates/ailang-core/src/ast.rs +++ b/crates/ailang-core/src/ast.rs @@ -1,10 +1,12 @@ //! AST nodes for the AILang language. //! -//! Every type in this module is the in-memory mirror of a node in the -//! AILang JSON schema documented in `docs/DESIGN.md`. The serde -//! attributes carry the schema: field renames (`as`, `type`, `fn`, -//! `paramTypes`, `retType`), enum tags (`kind`, `t`, `k`, `p`), and -//! `skip_serializing_if` predicates that keep the canonical-JSON +//! **The canonical schema lives in `docs/DESIGN.md` ยง"Data model"**; +//! this module is the Rust-side projection of it. When the two drift, +//! `crates/ailang-core/tests/design_schema_drift.rs` fires. +//! +//! The serde attributes carry the schema: field renames (`as`, `type`, +//! `fn`, `paramTypes`, `retType`), enum tags (`kind`, `t`, `k`, `p`), +//! and `skip_serializing_if` predicates that keep the canonical-JSON //! representation backwards compatible across schema extensions. //! //! The entry type is [`Module`]. The two helpers [`def_name`] and