Da Tang Chuangye Qijuzhu - Imperial Diary of the Foundation of the Great Tang
The type of imperial diary (qijuzhu 起居注, literally "comments on rising and living") seems to have developed during the later Han period (25-220 AD) but the earliest surviving fragments of such an imperial diary - and the only pre-Qing XXX exemplar - stem from the Western Jin period (265-316). This is Liu Daohui's (刘道荟) Jin qijuzhu (晋起居注), reconstructed in the Hanxuetang congshu (汉学堂严书).
The imperial diary of the foundation of the Tang dynasty (618-907) in three chapters (juan "scrolls"), written by Wen Daya (温大雅), gives an account of almost one year of the martial activities of Li Yuan (李渊) (posthumous title Tang Gaozu 唐高祖, r. 618-626) from the start of his uprising against the Sui dynasty (581-618) until his proclamation of the Tang dynasty.
The Da-Tang chuangye qijuzhu gives an interesting insight into the motivation, activities and roles of Li Yuan and his sons Li Jiancheng (李建成) and Li Shimin (李世民) (later emperor Tang Taizong 唐太宗, r. 626-649). Some statements often stand in contrast to the better known histories Jiu Tangshu (旧唐书), Xin Tangshu (新唐书) (see official dynastic histories zhengshi 正史) and Zizhi tongjian (资治通鉴). According to the "Imperial diary" it was not Li Yuan's son Li Shimin who incited his father to rebel against the Sui, but the motivation to make an end to the Sui came from Li Yuan himself. Li Yuan is described as a warrior and strategist of great ability, while the better known histories of the Tang describe him as incompetent and thus try to give a reason for Li Shimin's having forced his father to abdicate. The military successes of Li Jiancheng as reported in the "diary" are in the official dynastic distories either ascribed to his brother Li Shimin or even omitted in total.
The "Imperial diary of the foundation of Tang" is thus a clear example of how history was rewritten in favour of Li Shimin who actually killed his own brother and deposed his father. The truth can be read in the qijuzhu that had intentionally been ignored by later historians.