Tianwen zhi 天文志 is a type of treatise on astronomy that is an integral part of most official dynastic histories and encyclopaedias (often in combination with parts on the calendar, Suishi 歲時). In the Shiji 史記, the chapter is called Tianguan shu 天官書, in the Weishu 魏書, Tianxiang zhi 天象志, and in the Xin Wudaishi, Sitian zhi 司天志. The only dynastic history without an astronomy chapter is the Liaoshi 遼史. The Tianwen chapters can be used in combination with the chapters on the calendar, Li zhi 曆志. Calendar treatises are found in all dynastic histories except the Nanqishu 南齊書 and Xin Wudaishi. In the Hanshu 漢書, Houhanshu 後漢書, Jinshu 晉書, Songshu 宋書, Weishu, Suishu 隋書 and Songshi 宋史, the calendar treatises are combined with treatises on musical temperament (Lüli zhi 律曆志). The Tianwen treatises in the oldest dynastic histories are of particular interest because they record facts about astronomical knowledge and practice not found in other books of the time.
Although Sima Qian 司馬遷 (145 or 135-c. 86 BCE) is usually regarded as a historian, he held the position of Grand Astrologer (taishi ling 太史令) of the Han dynasty 漢 (206 BCE-220 CE). He was thus familiar with astronomy as well. In his autobiography (Taishi Gong zixu 太史公自叙; ch. 130 of the Shiji), he even traces his ancestry back to Chong 重 and Li 黎, the legendary officials in charge of astronomy and geography under the mythological emperor Zhuan Xu 顓頊.
In 104 BCE, Sima Qian, along with Gongsun Qing 公孫卿 and Hu Sui 壺遂, submitted a petition proposing a calendar reform. The proposal was approved, and Sima Qian was placed in charge of the effort, ultimately compiling China's first officially sanctioned and promulgated calendar system — the Taichu Calendar 太初曆.
During the early Han period, the leading astronomer was Tang Du 唐都. Both Sima Qian and his father Sima Tan 司馬談 (190-110 BCE) sought guidance from him, leading some scholars to speculate that the fixed-star system recorded in the Tianguan shu was influenced by Tang Du's school of thought.
The Tianguan shu (ch. 27 of the Shiji), finished in 104 BCE, primarily records information on fixed stars, planets, the Sun and Moon, comets, atmospheric phenomena, wind omens, and astrological divisions. The section on the fixed stars describes the five major celestial regions, listing the names, distributions, and astrological interpretations of their constellations (hengxing xingguan 恒星星官). The following section details the Five Planets (wuxing 五星): Mercury (chenxing 辰星), Venus (taibai 太白), Mars (yinghuo 熒惑), Jupiter (suixing 歲星, and Saturn (tianxing 填星). It explains their associated mansions, orbital paths, degrees of motion, synodic periods, and sidereal periods. It also discusses their connections to the Five Agents (wuxing 五行), the Four Seasons, and the Ten Heavenly Stems (shi tiangan 十天干), along with their astrological significance. The next chapter discusses the 28 Lunar Mansions (ershiba xiu 二十八宿) and their corresponding twelve regional divisions (shi'er zhou 十二州 – which are applied to the fixed stars). The treatise proceeds to the Sun and Moon, covering solar halos (riyun 日暈), solar eclipses, lunar transits across stars, and lunar eclipses, along with their astrological interpretations. The section on comets and ominous stars (yaoxing 妖星) names various inauspicious stars, including Guohuang 國皇, Zhaoming 昭明, and Wucan 五殘, and their astrological significance. Sima Qian then talks about meteorological phenomena and omens, including cloud formations, lightning, mist, rainbows, thunder, nocturnal illumination (yeming 夜明), wind patterns, and their astrological meanings. The treatise closes with predictions for the year (housui 候歲) and sound omens (yinzhan 音占).
Prior to Sima Qian's work, various astrologers had conducted some research on fixed stars, as seen in the star charts collected in the Tang-period 唐 (618-907) book Kaiyuan zhanjing 開元占經, which includes works by Wu Xian 巫咸, Gan De 甘德, and Shi Shen 石申 (see Gan-Shi xingjing 甘石星經). However, those earlier records contained fewer stars and lacked a systematic structure. The Tianguan shu catalogues 91 constellations and over 500 individual stars, organising them into a five-region system (wugong 五宮: four cardinal directions, and the centre) - the first instance of such an approach in the history of astronomy. The Eastern, Southern, Western, and Northern regions correspond to the Four Symbols (sixiang 四象: azure dragon, vermilion bird, white tiger, and black tortoise), with the 28 Lunar Mansions divided into four groups of seven within these celestial regions. The Central Region (zhonggong 中宮), which refers to the north polar area, was also called the "Purple Palace" (zigong 紫宮), a term that later became the "Purple Forbidden Enclosure" (ziwei yuan紫微垣), one of the three great celestial enclosures (sanyuan 三垣) in Chinese astronomy. The "Celestial Market Star" (tianshi xing 天市星) mentioned in the text evolved into the "Celestial Market Enclosure" (tianshi yuan 天市垣), another of the three enclosures. The descriptions in this section are well-structured, clearly defined, and systematically organised. It also includes observations on stellar brightness and colour.
The Tianguan shu, along with the silk manuscript Wuxingzhan 五星占 found in Mawangdui 馬王堆, Hunan, and the Treatise on Astronomy (3 Tianwen xun 天文訓) from the Huainanzi 淮南子, are among the earliest systematic records of the orbits and synodic periods of the five visible planets. Albeit of a superstition background, the section on "ominous stars" contains early records of variable stars (bianxing 變星), novae (xinxing 新星), supernovae (chaoxinxing 超新星), and meteors (liuxing 流星). These accounts hold immense historical value in the study of astronomical phenomena. The Tianguan shu contains relatively fewer astrological omens related to the Sun and Moon. However, it records the concept of the eclipse cycle for the first time, though the numerical data appears to have significant errors.
There are some specific studies on Sima Qian's astronomy treatise, namely Sun Xingyan's 孫星衍 (1753-1818) Tianguan shu bumu 天官書補目 and Tianguan shu kao buzhu 天官書考補注, Liu Fenglu's 劉逢禄 (1776-1829) Tianguan shu jingxing bukao 天官書經星補考, Chen Li's 陳灃 (1810-1882) Shu tianguan shu hou 書天官書後 and Liu Shaojun's 劉韶軍 Gudai zhanxing shu zhuping 古代占星術注評 (1992).
In the dynastic history Hanshu, the theme if astronomy is joined with the issue of musical temperament, which served as the basis for determining lengths and measures. The two topics are found in the chapter Lüli zhi 律曆志 (ch. 21). The treatises of the Hanshu were compiled after Ban Gu's 班固 (21-92 CE) passing away. While part of the compilatory work of the Hanshu was taken over by Ban Gu's sister Ban Zhao 班昭 (c. 45–c. 117 CE), the astronomy chapter was compiled by Ma Xu 馬續 (70-141).
The astronomical part of the Lüli zhi begins with an historical account of the development of the calendar in China, beginning with the "six ancient calendars" (gu liu li 古六曆) from the time of the Yellow Emperor, Zhuan Xu, and the historical dynasties of the Xia 夏 (21th-17th cent. BCE), Shang 商 (17th-11th cent. BCE), and Zhou 周 (11th cent.-221 BCE), and the regional state of Lu 魯, to the Taichu 太初曆 (104 BCE) and Santong 三統曆 calendars of the Former Han dynasty 前漢 (206 BCE-8 CE). A substantial part of the treatise is dedicated to the details of this calendar, which had been created upon the initiative of Liu Xin 劉歆 (d. 23 CE).
The treatise discusses Tongmu 統母 "Foundations of connection" listing fundamental astronomical data, including solar calculations, intercalation methods, system calculations, celestial circumference, and lunar periods; Jimu 紀母 "Foundations of links", detailing movements and periodicities of the five major planets; the "Five Steps" Wubu 五步, i.e., planetary phenomena such as visibility, direct motion, stationing, (apparent) retrograde motion, and occultation, along with their synodic and sidereal periods; Tongshu 統術 "Skills of connection", covering the fundamental principles of solar and lunar cycles, new moon calculations, intercalary month adjustments, winter solstice, the 24 solar terms (jieqi 節氣), the influence of the Five Agents, and lunar eclipses; Jishu 紀術 "Skills of links" explaining calculations related to planetary visibility, conjunctions with the Moon, planetary stations, solstices, new moons, lunar ingress, and planetary cycles; Suishu 歲術 "Skills of the year" with methods for determining Jupiter's celestial position; Shijing 世經 "Guide-ropes of time" chronicling calendar reforms through history. The final section includes discussions on epoch calculations, winter solstices, new moons, intercalary months, astronomical periods, celestial events, meteorological observations, and seasonal divisions. The last two sections appear to have been additions by Liu Xin.
From the records in the Lüli zhi, it is evident that the Taichu and the Santong calendars were the first calendars in China to use the draconic year (jiaodian nian 交點年) and the sidereal month (hengxing yue 恒星月). Their calculation was already quite comprehensive and precise. The Taichu Calendar divided a tropical year into 24 solar terms, each 15 1010/4617 days apart. The sequence of solar terms was identical to that recorded in the Huainanzi. Still, it differed from the Yueling 月令 chapter in the ritual classic Liji 禮記 and the book Lüshi chunqiu 呂氏春秋 (part Shi'er ji 十二紀).
A significant innovation was adopting the intercalary month, which inserted a leap month when there was no so-called "major solar term" (zhongqi 中氣) in a lunar month. This adjustment helped maintain a consistent relationship between solar terms and lunar months, a system later inherited by the traditional Chinese lunar calendar. The Taichu Calendar was also the first to explicitly introduce the concept of eclipse seasons (shizhou 食周), defining that within 135 synodic months, there would be 23 eclipse seasons. Additionally, its calculations of the synodic and sidereal periods of the Five Planets were more precise than those recorded in the Wuxingzhan manuscript and significantly more accurate than those in the Huainanzi and the Shiji. Moreover, based on an understanding of the dynamic movements of the Five Planets within a synodic cycle, the Taichu Calendar developed a method for predicting planetary positions. Many of these principles were adopted by later Chinese calendars, demonstrating that the Taichu Calendar was formulated through extensive astronomical observations, meticulous calculations, and rigorous theoretical analysis. As a result, it was far more advanced and precise than any pre-Han dynasty calendar.
The most critical commentaries on the Lüli zhi are part of general Hanshu commentaries, such as Wang Xianqian's 王先謙 (1842-1918) Hanshu buzhu 漢書補注, Shen Qinhan's 沈欽韓 (1775-1831) Hanshu shuzheng 漢書疏徵, Zhou Shouchang's 周壽昌 (1814-1884) Hanshu zhu jiaozhu 漢書注校注, Qian Dazhao's 錢大昭 (1744-1813) Hanshu bianyi 漢書辨疑, Wang Niansun's 王念孫 (1744-1832) Dushu zazhi 讀書雜志 and Yang Shuda's 楊樹達 (1885-1956) Hanshu kuiguan 漢書窺管.
The astronomy chapter in the Jinshu (ch. 11-13), with a length of 3 juan (finished in 648), was compiled by Li Chunfeng 李淳風 (602-670), who also wrote commentaries on the significant mathematical books of early China, and an astrological book called Yisizhan 乙巳占.
Li's main achievements in astronomy, calendrical science, and astrology include the creation of a new armillary ecliptic instrument (huntian huangdao yi 混天黃道儀). This instrument incorporated the advantages of the iron armillary sphere (tie hunyi 鐵渾儀) from the Northern Wei, which featured a levelling device (shuizhunyi 水準儀), while also introducing significant innovations. Instead of the traditional two-layer structure, he added a third layer, placing a "three-paths instrument" (sanchenyi 三辰儀) between the "six-directions instrument" (liuheyi 六合儀) and the "four-revolutions instrument" (siyouyi 四游儀). The Three-Paths Instrument consisted of three intersecting rings: the Ecliptic Ring (huanghao huan 黃道環), the Lunar Orbit Ring (baidao huan 白道環), and the Equatorial Ring (chidao huan 赤道環), each used to measure the positions of the Sun, Moon, and stars, respectively. The Three-Paths Instrument could rotate around the polar axis within the Six-Directions Instrument, while the Four-Revolving Instrument could rotate within the Three-Paths Instrument. The Ecliptic Ring was perforated with 249 pairs of small holes, allowing for precise adjustments - each month, as the Moon reached a nodal point, the Lunar Orbit Ring would be shifted by one pair of holes to maintain accuracy. The Equatorial Ring was engraved with the distances of the 28 Lunar Mansions, aiding observing fixed stars. This innovative design allowed astronomers to clearly understand celestial coordinates regarding ecliptic longitude and latitude, equatorial longitude and latitude, and horizon-based coordinates during observations.
Additionally, Li Chunfeng formulated the Linde Calendar 麟德曆, also known as the Yifeng Calendar 儀鳳曆, which was an improved version of the Huangji Calendar 皇極曆, originally created by Liu Zhuo 劉焯 (544-610)in 604. The Linde Calendar introduced several key innovations: It eliminated the traditional calculation methods based on the period zhang 章 (Metonic cycle of 19 years with 7 intercalary months), bu 蔀 (Calippic cycle; four times the zhang period [76 years] to realign date and time of new moon and solstice), ji 紀 (twenty times the bu period [1,520 years] to realign solar terms, lunar phases, and the ganzhi 干支 days), and yuan 元 (three times the yuan period [4,560 years] to perfectly align solar year, lunar cycle, ganzhi cycle, months, days, and hours), significantly simplifying computational procedures. While it adopted the fixed new moon method (dingshuo 定朔), it also introduced the progressive new moon adjustment method (jinshuofa 進朔法) to prevent consecutive long or short months. It abolished the intercalary cycle system (runzhou 閏周) and instead determined intercalary months based on the absence of a mid-term solar marker (zhongqi). It standardised the numerical values for the tropical year, synodic month (lunar phase cycle), and anomalistic month (perigee cycle) using the same divisor of 1,341, improving consistency. The lengths of the tropical year and synodic month were derived entirely from observational data and statistical analysis, enhancing accuracy. In solar eclipse calculations, it introduced a correction term for eclipse discrepancy (shicha 蝕差), accounting for the apparent difference between the observed and actual ecliptic nodes. Despite a notable limitation in accounting for the precession of the equinoxes (suicha 歲差), the Linde Calendar was used for 64 years.
The Astronomical Chapter of the Jinshu begins with a chapter on the celestial bodies (Tianti 天體) discussing ancient cosmological theories, including the Canopy-Heaven model (gaitian shuo), the Spherical-Heaven Model (huntian shuo), the Infinite-Night Model (Xuanye shuo 宣夜説), Inclined-Heaven Theory (Xintian lun 昕天論), Arched-Heaven Theory (Qiongtian lun 穹天論), and Constant-Heaven Theory (Antian lun 安天論). It also highlights the criticisms of the huntian theory by Wang Chong 王充 (27-97) and Ge Hong 葛洪 (283-343), suggesting that Li Chunfeng leaned toward the gaitian model. The chapter "Astronomical Instruments" (Yixiang 儀象) traces the development of observational tools from the armillary sphere (yuanyi 圓儀) created by Luo Xiahong 落下閎 to the celestial globe (hunyi 渾儀) constructed by Wang Fan 王蕃 (228-266). This section appears to summarise Li Chunfeng's treatise on astronomical instruments, Yixiang zhi 法象志). The chapter on "Astronomical canon and stars" (Tianwen jingxing 天文經星) briefly outlines the star catalogue compiled by Chen Zhuo 陳卓, which lists the Three Enclosures (sanyuan) and the 28 Lunar Mansions (ershiba xiu), totalling 1,464 stars. The chapters "Central Palace" (Zhonggong 中宮) and "Twenty-Eight Mansions" (Ershiba xiu 二十八宿) provide detailed explanations of fixed stars. Stars not belonging to the lunar mansions are described in the chapter Ershiba xiu wai xing 二十八宿外星). The chapter "Rising and setting of the Milky Way" (Tianhan qimo 天漢起没) defines the boundaries of the Milky Way. The part "Twelve sectors of the ecliptic" (Shi'er ci du shu 十二次度數) details how Chen Zhuo correlated the twelve ecliptic sectors with the twelve terrestrial regions (ye 野, fenye 分野) and the degrees of the lunar mansions. The final section of the first fascicle, "Zodiacal paths of provinces and commanderies" (Junzhou chanci 州郡躔次), presents various scholars' views on the movements of celestial bodies over different regions. The respective scholars (not all of which were specialists) include Chen Zhuo, Fan Li 范蠡 (5h cent. BCE), Guiguzi 鬼谷子, Zhang Liang 張良 (d. 186 BCE), Zhuge Liang 諸葛亮 (181-234), Qiao Zhou 譙周 (199-270), Jing Fang 京房 (77-37 BCE), and Zhang Heng 張衡 (78-139 CE).
The second fascicle begins with a chapter on the "Seven Luminaries" (Qiyao 七曜) detailing the movements and divination-related interpretations of the Sun, Moon, and the five visible planets. Compared to similar treatises in other official histories, this section contains a disproportionately large amount of astrological content while omitting key astronomical topics such as synodic cycles and sidereal periods. The chapter "Miscellaneous stars and atmospheric phenomena" (Zaxing qi 雜星氣) discusses auspicious stars (ruixing 瑞星) and ominous stars (yaoxing 妖星), including 21 comets and "tailed stars" (boxing 孛星), 35 ominous stars appearing near the Moon, "guest stars" (kexing 客星; novae or supernovae), and meteors. While it may seem purely astrological at first glance, a closer examination reveals the depth and breadth of ancient Chinese astronomical knowledge. Notably, this text is the first to propose the principle that a comet's body emits no light but shines by reflecting sunlight, as well as the observation that a comet's tail points eastward when seen in the evening and westward when seen in the morning, always facing away from the Sun. The section "Clouds and atmospheric phenomena" (Yunqi 雲氣) section details divination practices related to clouds, halos, rainbows, and mists. The part "Historical records and verified events" (Shizhuan shiyan 史傳事驗) section discusses historical events that coincided with celestial anomalies such as solar and lunar eclipses, planetary conjunctions, and five-planet assemblies. This section closely resembles the Treatise on the Five Agents (Wuxing zhi 五行志) found in other official histories, which links natural phenomena to political and social events.
The last fascicle talks about "The Moon and Five Planets trespassing the lunar mansions" (Yue wuxing fan lieshe 月五星犯列舍), "Changes in fixed stars" (Jingxing bian 經星變), "Ominous stars and guest stars" (Yaoxing kexing 妖星客星), "Meteors and falling stars" (Xing liu yun 星流隕), and "Clouds and atmospheric phenomena" (Yunqi).
The Astronomical Chapter of the Jinshu contains the only surviving records of six ancient Chinese cosmological theories, making it an indispensable source. Without this text, later generations might not even know the names of such theories. Additionally, its catalogue of fixed stars follows the system established by Chen Zhuo, marking the earliest known stellar classification in official historical records. Although the middle and last juan are of comparatively lower value, they remain significant for the observations of sunspots, noting their varying shapes. They also provide detailed descriptions, classifications, and definitions of comets and novae.