Lintai gushi 麟臺故事 is a book about the arrangement of the Palace Library (bishusheng 祕書省), which was called the "Unicorn Terrace" (Lintai) since the time of Empress Wu Zetian 武則天 (regent 684-690, ruler 690-704). It was written during the Song period 宋 (960-1279) by Cheng Ju 程俱 (1078-1144), courtesy name Zhidao 致道, from Kaihua 開化 in the prefecture of Quzhou 衢州 (today's Quxian 衢縣, Zhejiang). Cheng participated in the compilation of the administrative regulations of the Northern Song dynasty 北宋 (960-1126), Guochao huiyao 國朝會要. In 1131, when the Palace Library was rebuilt, he was appointed its Vice Director (bishu shaojian 祕書少監).
The book of 5 juan in length is based on Cheng's experience with the organisation of the Library. It was finished in 1131, received approval by the court, and was, thereafter, used as a guidebook for the administration of the Palace Library for many centuries. The text is divided into 12 chapters explaining official appointments (Guanlian 官聯), selection and promotion (Xuanren 選任), books and documents (Shuji 書籍), collation and proofreading (Jiaochou 校讎), compilation and editing (Xiuzuan 修纂), the history of the ruling dynasty (Guoshi 國史), institutional evolution (Yange 沿革), government offices and facilities (Shengshe 省舍), storage and preservation of books and documents (Chucang 儲藏), duties and responsibilities (Zhangzhi 職掌), honours and rewards (Enrong 恩榮), and salaries and stipends (Lulin 祿廩).
The book primarily details the historical development, functions, personnel appointments, promotions, and daily operations of the Three Institutes of the Palace Library (bishusheng sanguan 祕書省三館, i.e., the guoshiguan 國史館, zhaowenguan 昭文館, and jixianyuan 集賢院) and the Imperial Archive (bige 祕閣). It also describes the core tasks involved in managing books, including collection, organisation, preservation, proofreading, compilation, publication, and utilisation.
The importance of the Palace Library for daily government is highlighted in the phrase that "the repository of documents is the source of law and governance" (dianji zhi fu, xiazhang suo you 典籍之府,憲章所由), emphasising that the maintenance of imperial collections and archives is vital to effective governance.
From the Ming period 明 (1368-1644) on, the book had become rare, and the compilers of the series Siku quanshu 四庫全書 extracted it from the early Ming encyclopaedia Yongle dadian 永樂大典. An original, yet fragmentary, Song-period manuscript version was once owned by Huang Pilie 黃丕烈 (1763-1825). It is, together with the Yongle dadian version, included in the series Shiwanjuanlou congshu 十萬卷樓叢書. A modern, annotated edition is included in the series Zhongguo lishi cangshu lunzhu duben 中國歷史藏書論著讀本 from 1990.