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.
Real paperwork became the purview of clerks, whose increasing influence frightened Emperor Wu of Liang.
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.
The six divisions were replicated at the local prefectural level, and each directly reported to their respective ministries in the central government.
The Department of State Affairs was one of the largest employers in the government and provided income and posts for many officials.