Shangshu Sheng

The Shangshu Sheng, sometimes translated as the Department of State Affairs or the Imperial Secretariat, was one of the departments of the Three Departments and Six Ministries government structure. It was the primary executive institution of imperial China, head of the Six Ministries, the Nine Courts, and the Three Directorates (sometimes five). The Six Ministries consisted of the Ministry of Personnel, the Ministry of Revenue, the Ministry of Rites, the Ministry of War, the Ministry of Justice, and the Ministry of Works. The Department of State of Affairs existed in one form or another from the Han dynasty (206 BC – 9 AD) until the Yuan dynasty (1271–1368), but was never re-established in the following Ming dynasty.

Origin
The Department of State Affairs originated as one of the posts of the Six Chief Stewards (liushang 六尚) that were responsible for headgear, wardrobe, food, the bath, the bedchamber and for writing (shangshu 尚書, literally "presenting writings"), during the Qin dynasty. The position of Chief Steward for writing (shangshu) was elevated in importance during the reign of Emperor Wu of Han (r. 141-87 BC), who tried to escape the influence of the Grand Chancellor and Censor-in-Chief(yushi dafu 御史大夫) by relying on other officials. Emperor Guangwu of Han (r. 25-57) created the Department of State Affairs with the shangshu as head of the six sections of government. It was headed by a Director (ling 令) and a Vice Director (puye 僕射), assisted by a left and right aide (cheng 丞) and 36 attendant gentlemen (shilang 侍郎), six for each section, as well as 18 clerks (lingshi 令史), three for each section. These six sections later became the Six Ministries, and their chief stewards, the Director, and Vice Director were collectively known as the eight executives (bazuo 八座).

History
The power of the Department of State Affairs decreased in the succeeding dynasties of Cao Wei and the Jin dynasty (266–420) as some of its functions and authority were delegated to the Central Secretariat and Chancellery. The posts of Director and Vice Director also became less important as it was bestowed upon high ministers and noble family members who did not participate in the administrative activities of the Department. Real paperwork became the purview of clerks, whose increasing influence frightened Emperor Wu of Liang. Emperor Wu decreed that only nobility should become clerks, but none of the nobles were willing to assign their sons to such a lowly position. Members of the Department refused to cooperate with Emperor Wu and resisted any changes to administration. The Department of State Affairs in the Sixteen Kingdoms and Northern dynasties tended to work more similarly to the Southern dynasties over time but were dominated by barbarian peoples such as the Xianbei.

During the Sui dynasty (581–618), the post of Director was often left vacant while two Vice Directors, Gao Jiong and Yang Su, handled affairs.

During the Tang dynasty (618–907), the post of Director continued to be left vacant for the most part, and when it was filled, it was by the heir apparent like Li Shimin (r. 626–649) or Li Shi (r. 779–804). To weaken the power of the Vice Director, who was de facto head of the institution, the position was divided into left and right Vice Directors, with the former being the senior. At times the Vice Directors were comparable in power with the Grand Chancellor and sometimes even superseded him. However by the mid-Tang period the Grand Chancellors had regained their predominance, and Vice Directors of the Department were required to have special designations to participate in policy making discussions. Sometimes the Left Vice Director of the Department of State Affairs was the same person as the Director of the Chancellery. Thereafter the Department became a purely executive institution. The six sections of government were formally divided into the Six Ministries, each headed by a Minister (shangshu). The six divisions were replicated at the local prefectural level, and each directly reported to their respective ministries in the central government. In addition to the Six Ministries, the Department of State Affairs was also in charge of the Nine Courts and Three Directorates. The Department of State Affairs was one of the largest employers in the government and provided income and posts for many officials. The institution was abolished during the Yuan dynasty (1271–1368), with sporadic attempts to reintroduce it in 1270, 1287, 1309, and 1311 due to financial difficulties. The attempts never lasted for more than a few years. It was never re-established in the following Ming dynasty.

Nine Courts
The Nine Courts throughout most of history were:

Three/Five Directorates
The Three Directorates, or sometimes five, were originally the Directorates of Waterways, Imperial Manufactories, and Palace Buildings. In the Sui dynasty, the Directorate of Armaments or Palace Domestic Service was sometimes counted as one. The Sui and Tang dynasties also added the Directorate of Education to the list. The Directorate of Astronomy was added during the Song dynasty.