The Covenant Code, or The Book of the Covenant, is the name given by academics to a text appearing in the Torah at Exodus 20:19–23:33. Biblically, the text is the second of the law codes given to Moses by God at Mount Sinai. This legal text provides a small but substantive proportion of the mitzvot within the Torah, and hence is a source of Jewish Law.
According to the modern documentary hypothesis, the text was originally independent, but later embedded by the Elohist ("E") in their writings. In biblical criticism, the code is understood to be the Elohist's version of the legal code which the Jahwist ("J") presents as the Ritual Decalogue. In the combined JE source, supposed by such critical scholarship, these two texts appear together, with the Ritual Decalogue appearing to be a summary version. Such academic study also supposes that the Elohist version had the Covenant Code being written on the two tablets of the law, whereas in JE, it is only the Ritual Decalogue which has this feature.
The original Priestly Source, according to the documentary hypothesis, then rewrote this to support their own ideas of law, replacing the Ritual Decalogue with the Ethical Decalogue (or the Ten Commandments), and the Covenant Code with the Holiness Code. After accretion of much extra legal material over a course of time, the resulting version of the Priestly source was combined with the JE source, its law code consequently appearing, in the Torah, to be God's replacement, and expansion, of the earlier two codes after the incident of the Golden Calf, in which the first pair of the tablets of law were destroyed.