Under the Ritsuryo system (a system of centralized government based on the ritsuryo code), Tenmondo was put under the supervision of the Onmyoryo, together with rekido and the Onmyoryo, and it consisted of one tenmon hakase (Shoshichiinoge (Senior Seventh Rank, Lower Grade)) and ten tenmon no sho (students of astronomy).
律令制においては、暦道・陰陽寮とともに陰陽寮の監督下に置かれ、天文博士（定員1名・正七位下）と天文生（10名）によって構成されていた。