Yōrō Code

The Yōrō Code (養老律令) was one iteration of several codes or governing rules compiled in early Nara period in Classical Japan. It was compiled in 718, the second year of the Yōrō regnal era by Fujiwara no Fuhito et al., but not promulgated until 757 under the regime of Fujiwara no Nakamaro under Empress Kōken.

The penal code portions (ritsu) were largely lost, although they have been reconstructed. The content of the civil code portions (ryō) are preserved nearly fully, copied out in later texts.

Overview
The Yōrō Code was a revision of the Taihō Code of 701, and differences may have been limited. Still, when Nakamaro put the laws into effect in 757, it was unpopular among the nobility as it "slowed down the promotion schedule for officials."

State of preservation
While the precursor code (Taihō Code) does not survive, a substantial amount of Yōrō Code is preserved in the exegetical piece, Ryō no gige (『令義解』) (833), especially the civil codes. In English-language scholarly literature, some commentators merely state that the code is preserved in a fragmentary state, but other academics do note preservation is nearly complete for the civil code portion. The Ryō no gige contains the full text of the ryō (or civil/administrative code part) except for two chapters according to a Kadokawa publishing house history dictionary, the missing portions being the warehouse statute (倉庫令) and the medical service statute (医疾令), and even this lacuna can be partly be filled from a collections of fragments of the codes.

The ritsu or the penal code portion was largely lost, but a compilation of fragments from various codes, entitled the Ritsuitsu (『律逸』), in 8 volumes, was compiled by Ishihara Masaaki (石原正明) 1760–1821. The resulting text, including the fragments, are printed in the volume on Ritsuryō texts in the Kokushi taikei (『国史大系』) historical text series. Other sources agree, adding that for the civil code, almost all of the text that runs to Article 955 has been restored.

Relying on the Tang dynasty penal code that survives, a complete reconstruction of the Yōrō penal code has also been undertaken.

Tang dynasty model
The ritsuryō codes were modeled after the civil and penal codes of the Tang dynasty, in particular, the code of the era passed in 651 which was then current is named by scholars as the basis of the two ritsuryō codes.

Period in force
The Code remained in effect until the early 10th century, after which it became an obsolete dead letter law code, but not formally repealed and hence valid at least "in paper" until the Meiji Restoration. During the feudal age in Japan, various ministerial offices were awarded to as formality to samurai (e.g., Ishida Mitsunari as jibu-no-shō; Furuta Oribe, Ii kamon-no-kami, Sakai uta-no-kami etc.) without any responsibilities or authorities vested in the office under the code.