By their image-bearing nature human beings were morally obligated before God, and by their image-bearing nature they were destined for eschatological life. The absence of any covenant-making ceremony and of the word ברית in Genesis 1-2 may be explained by the fact that humanity's very creation established a covenantal relationship requiring no further establishment or confirmation. p. 85In other words, the righteousness of the moral law written on Adam's heart requiring obedience had a view to an end - a fulfillment, or as the Divines wrote, a "fruition of him as their blessedness and reward " (WCF 7.1). Thus the creation of man was itself a covenantal, "voluntary condescension" of God due to the hope of eschatological blessedness.
Taking that view, the prohibition to not eat of the tree of knowledge of good and evil upon penalty of death that came later to Adam, as VanDrunen writes, can then be understood
not as supplementing Adam's natural obligation but as focusing it. As I argued earlier in this chapter, the command to work and to guard the Garden served as a concrete test of Adam's general and natural obligation to subdue the earth. Likewise, the command to refrain from eating of the tree of the knowledge of good and evil would become a concrete test of his general and natural obligation to exercise dominion over the creatures. The commands of 2:15-17 did reveal something that Adam could not have know simply by his image-bearing nature... pp. 85-86God put Adam in the garden to "guard it" and to exercise dominion (rule with justice) over all including the serpent. The tree prohibition was a concentrated test of Adam's faithful obedience to God's creation mandate, moral law, and God himself. And it was particularly focused for the reason that the prohibition was a positive command that came from without. The command to not eat of the forbidden tree wasn't directly found in the natural law directly given at Adam's creation. There wasn't anything inherently wrong with eating that fruit that could be understood from the moral law. Yet it was God's command. In the upcoming test Adam had only God's outward spoken command to lean on. In other words, the prohibition to not eat of the forbidden tree wasn't inherently known by Adam, an image bearer of God. Obedience was required to a command that in and of itself that one could say seemed arbitrary and morally neutral. And yet being God's spoken word it wasn't neutral. It was indeed both morally right to obey and morally wrong to disobey.
The point I'm focusing on is simply that God's law-command regarding the tree was a outward one apart from the moral law written inwardly on Adam's heart. So in that sense it was a command extrinsic to him, i.e. not subjective or inherent to him. His obedience would lean solely on the outward word - "Thus God said..."
That being said, for Adam to bow to the serpent and disobey the outward command to not eat of that tree was indeed a violation of the moral law, especially in light of the first commandment.
And to violate just one command of God is to be guilty of all the law (James 2:10). You shall have no other gods before me."
When challenged on the outward command to not eat Adam fell from his original righteousness, bowing before the serpent. Adam disobeyed the command that came not from the law written inwardly on his heart but that came outwardly from the mouth of God.
Turning to the New Testament we see a similar scene played out in the wilderness (Matthew 4:1-11). Jesus had just completed forty days of fasting. Satan's presents the first of three temptations to Jesus and upon first blush it hardly seems like the temptation has anything that has to do with a moral right and wrong. Is there a moral law against nourishing oneself after a fast? Or turning a stone to bread to do so? We know later in a different circumstance Jesus does perform a food miracle by multiplying five loaves of bread and two fish in order to feed a multitude of people and we presume himself. So Satan was working from that same old play book he used in the garden with Adam.
The Spirit of God had led Jesus into the wilderness to be tempted and the divine lead up to that test was forty days of fasting. Though starving, one could infer that Jesus knew that as man it was not his to take up his own judgment and efforts to end that divine mandated fasting. For Jesus to rule justly and exercise dominion as a man required his absolute obedience to and reliance on his Father. So it is of no small coincidence that as the Second Adam Jesus replied with words that echoed the battle that took place long ago in the garden of Eden concerning God's original outward command to Adam.
Jesus had been given by the Spirit of God a wilderness test that included coming to near starvation and three temptations. The fasting wasn't to be over until the final temptation was over.
Upon Satan's third temptation, Jesus as a man in obedience to his Father judged the tempter with righteousness and authority by quoting God's word:
Then Jesus said to him, “Be gone, Satan! For it is written,
“‘You shall worship the Lord your God and him only shall you serve.’”
Then the devil left him, and behold, angels came and were ministering to him.A man, the Second Adam, once again had righteous dominion over all creation, including over the serpent.