From the later 7th century to the early 8th century, when the Ritsuryo system (legal codes of the Nara and Heian eras based on Chinese models) were put into place, the divination techniques of Ommyo (the Yin and Yang) were transferred to the Bureau of Divination under Ministry of Central Affairs.
7世紀後半から8世紀はじめに律令制がひかれると、陰陽の技術は中務省の下に設置された陰陽寮へと組織化された。