WCF CHAPTER 19
1. God gave to Adam a law, as a covenant of works, by which he bound him and all his posterity to personal, entire, exact, and perpetual obedience, promised life upon the fulfilling, and threatened death upon the breach of it, and endued him with power and ability to keep it.
Of the Law of God
2. This law, after his fall, continued to be a perfect rule of righteousness; and, as such, was delivered by God upon Mount Sinai, in ten commandments, and written in two tables: the first four commandments containing our duty towards God; and the other six, our duty to man.
Robert Shaw comments,
It may be remarked, that the law of the ten commandments was promulgated to Israel from Sinai in the form of a covenant of works. Not that it was the design of God to renew a covenant of works with Israel, or to put them upon seeking life by their own obedience to the law; but the law was published to them as a covenant of works, to show them that without a perfect righteousness, answering to all the demands of the law, they could not be justified before God; and that, finding themselves wholly destitute of that righteousness, they might be excited to take hold of the covenant of grace, in which a perfect righteousness for their justification is graciously provided. The Sinai transaction was a mixed dispensation. In it the covenant of grace was published, as appears from these words in the preface standing before the commandments: "I am the Lord thy God, which have brought thee out of the land of Egypt, out of the house of bondage;" and from the promulgation of the ceremonial law at the same time. But the moral law, as a covenant of works, was also displayed, to convince the Israelites of their sinfulness and misery, to teach them the necessity of an atonement, and lead them to embrace by faith the blessed Mediator, the Seed promised to Abraham, in whom all the families of the earth were to be blessed. The law, therefore, was published at Sinai as a covenant of works, in subservience to the covenant of grace. And the law is still published in subservience to the gospel, as "a schoolmaster to bring sinners to Christ, that they may be justified by faith."—Gal. iii. 24.Robert Shaw. The Reformed Faith, Commentary on the Westminster Confession of Faith (1845): Chapter XIX - Of the Law of God.