pub fn validate_document(document: &Value) -> Result<(), String>
Validates the required version and top-level document shape.