In the later avesta , zarathushtra is used as a character in dialogue with ahura mazda ; he is featured in ritual texts and in law - texts , and great amounts of ritual and doctrine are thus attributed to him , whether he was their originator or not .