Jinlouzi 金樓子 "Master of the Golden Chamber" is a philosophical treatise compiled durng the Liang period 梁 (502-557) by Xiao Yi 蕭繹 (508－554), courtesy name Shicheng 世誠, who is nobody else than Emperor Yuan of the Liang dynasty 梁元帝 (r. 552-554).
Jinlouzi is the studio name of Xiao Yi. He was Prince of Xiangdong 湘東, governor (taishou 太守) of the commandery of Guiji 會稽 and regional inspector (cishi 刺史) of the provinces of Jiangzhou 江州 and Jingzhou 荆州. During the rebellion of Hou Jing 侯景 (503-552), Xiao Yi was given the supreme command of the imperial armies. He did not only fend off the armies of the rebels, but also defended the capital against other princes that wanted to usurp the throne. He was for these merits given the title of Prince of Jiangling 江陵. As a ruler, Emperor Yuan is described as false and brutal, but he was admired for his excellent gift in writing, painting and calligraphy. Of his writings, 110 poems have survived, as well as 9 rhapsodies. Xiao Yi has also written a commentary on the Confucian Classic Yijing 易經, the Zhouyi jiangshu 周易講疏, an encyclopaedia on statecraft called Neidian boyao 内典博要, a collection of biographies of virtuous personalities, the Xiaodezhuan 孝德傳, a local gazetteer called Jingnanzhi 荆南志, and a commentary on the history Hanshu 漢書. These are all lost. Only his encylopaedia on personal names, the Gujin tongxingming lu 古今同姓名錄, and the Jinlouzi have survived. There was a 52-juan-long collection of his writings, and a smaller collection of 10 juan that were both lost during the Song period 宋 (960-1279). The oldest surviving collection of his writings, the Liang Yuandi ji 梁元帝集, was compiled during the Ming period 明 (1368-1644).
The Jinlouzi was originally divided into 20 juan, or, according to the Song-period catalogue Junzhai dushu zhi 郡齋讀書志, 15 chapters (pian 篇). Today, 6 fascicles are preserved. The others were lost during the Song period. The scholars Song Lian 宋濂 (1310-1381, Zhuzhibian 諸子辨) and Hu Yinglin 胡應麟 (1551—1602, Jiuliu xulun 九流緒論) do not mention the book Jinlouzi, nor does Ma Su 馬驌 (1621-1673) in his history Yishi 繹史 quote from it. The received version has been preserved in the Ming-period encyclopaedia Yongle dadian 永樂大典, but only in a version of 14 chapters. The Yongle dadian version is not in a very good state, and a lot of paragraphs are confused. During the compilation process of the imperial series Siku quanshu 四庫全書, the editors tried to reconstruct the text and arranged it in 6 juan.
The Jinlouzi was compiled as a book quoting cases from antiquity by which the modern scholar would learn a lot, either from the failings in the past or successes of bravery and virtuous behaviour. A lot of quoted passages have not survived in originals, so that the Jinlouzi is a very important source for writings lost. A shortcoming of Xiao Yi's text is that it is written in a quite obscure and indirect style so that many passages cannot be understood.
The most important traditional editions of the Jinlouzi are the print from the Zhiyuan reign-period 至元 (1335-1340), the versions in the series Zhibuzuzhai congshu 知不足齋叢書, Shuofu 說郛, Zishu baizhong 子書百種, Longwei mishu 龍威秘書, and the version in the Siku quanshu.