Kyoshiki (the Capital Bureau) (京職)
Kyoshiki refers to a capital administrative agency in the Ritsuryo system (a system of centralized government based on the ritsuryo code).
In the Ritsuryo system, it was conventional to divide the Capital into the east part and west part, and to call the east part 'Sakyo,' and call the west part 'Ukyo.'
Therefore, Kyoshiki was established in the east part and the west part, respectively, and each office was called 'Sakyoshiki' (Eastern Capital Offices) and 'Ukyoshiki' (Western Capital Offices).
Kyoshiki supervised all matters concerning administration, security and justice relating to the Capital. Kyoshiki was equivalent to Kokushi (Provincial Offices) in the province, but, its social status was higher than that of Kokushi, and Kyoshiki was treated as kyokan (central government official) while Kokushi was treated as an outside official (local official). In order to assist administrative affairs, Borei (chief of the four districts of the capital) was placed at each jo (east-west district), and Bocho (chief of each district of the capital) (town mayor) was placed at each bo (north-west district), and then, the Capital was supervised in every hole and corner. Borei and Bocho were equivalent to Gunji (local magistrates) and Richo (village chief), respectively. The full number of Borei was 12 under the Ritsuryo system, but was changed along with the transfer of the capital. There were two offices, Sakyoshiki and Ukyoshiki, to govern Sakyo and Ukyo, respectively. As hikan (low-level bureaucrat), ichi no tsukasa (governmental organization) existed, and Sakyoshiki having jurisdiction over Higashi no ichi no tsukasa, and Ukyoshiki having jurisdiction over Nishi no ichi no tsukasa handled affairs concerning market. Thereafter, the power of security was usurped by Kebiishi (officials with judicial and police powers) in the Heian period, and Kyoshiki came to lose its substance along with the ruin of the imperial capital (esp. Kyoto). Its Tang name was Keicho.
In the Muromachi period, Soke (the head family or house) of the Hosokawa clan, one of three kanrei (shogunal deputy), which inherited the post of Ukyo no daibu (Master of the Western Capital Offices), was called the Keicho family.
In the Sengoku period (period of warring states) when the imperial court and court nobles started selling their official court ranks due to financial difficulties, Ukyo no daibu, pronoun of Shogunal Deputy the Hosokawa clan which was the samurai family of pedigree, was believed to be the nifitiest official court rank for Sengoku daimyo (Japanese territorial lord in the Sengoku period) in provinces (especially for daimyo in the Tohoku region) who wanted to add dignity.
One office each was established for Sakyo and Ukyo.
Daibu (Master) (Shogoinojo [Senior Fifth Rank, Upper Grade] to Jushiinoge [Junior Fourth Rank, Lower Grade])
Suke (an assistant secretary of office) (Jugoinoge [Junior Fifth Rank, Lower Grade])
Taijo (Senior Secretary) (Jurokuinoge [Junior Sixth Rank, Lower Grade] to Jurokuinojo [Junior Sixth Rank, Upper Grade]), and Shojo (Junior Secretary) (Shoshichiinojo [Senior Seventh Rank, Upper Grade] to Jurokuinoge [Junior Sixth Rank, Lower Grade])
Daisakan (Senior Clerk) (Shohachiinoge [Senior Eighth Rank, Lower Grade]), and Shosakan (Junior Clerk) (Juhachiinojo [Junior Eighth Rank, Upper Grade])
Borei (No rank to Shohatsuinoge [Lesser Initial Rank, Lower Grade])
Shisho (a person doing miscellaneous duties around documents)
Official duties newly established
Shibu (low rank bureaucrats)
Remarks: Kyoin which supervised both Sakyo and Ukyo by itself was established under FUJIWARA no Nakamaro's government.