“Are the ten commandments poetry ... or should we take them literally?”
I think the Ten Commandments are poetic and of course are to be taken literally.
I am not sure why you need to put that as an either/or.
I also don’t know why you think this addresses the question of the extra-Biblical Young Earth doctrine.
We are in agreement ... so lets look at what the text of Exodus 20 actually says ... (NASB text)
1 Then God spoke all these words, saying,
2 "I am the LORD your God, who brought you out of the land of Egypt, out of the house of slavery.
3 "You shall have no other gods before Me.
4 "You shall not make for yourself an idol, or any likeness of what is in heaven above or on the earth beneath or in the water under the earth.
5 "You shall not worship them or serve them; for I, the LORD your God, am a jealous God, visiting the iniquity of the fathers on the children, on the third and the fourth generations of those who hate Me,
6 but showing lovingkindness to thousands, to those who love Me and keep My commandments.
7 "You shall not take the name of the LORD your God in vain, for the LORD will not leave him unpunished who takes His name in vain.
8 "Remember the sabbath day, to keep it holy.
9 "Six days you shall labor and do all your work,
10 but the seventh day is a sabbath of the LORD your God; in it you shall not do any work, you or your son or your daughter, your male or your female servant or your cattle or your sojourner who stays with you.
11 "For in six days the LORD made the heavens and the earth, the sea and all that is in them, and rested on the seventh day; therefore the LORD blessed the sabbath day and made it holy.
12 "Honor your father and your mother, that your days may be prolonged in the land which the LORD your God gives you.
13 "You shall not murder.
14 "You shall not commit adultery.
15 "You shall not steal.
16 "You shall not bear false witness against your neighbor.
17 "You shall not covet your neighbor's house; you shall not covet your neighbor's wife or his male servant or his female servant or his ox or his donkey or anything that belongs to your neighbor."
See the issue? Clearly the Ten Commandments, from a purely textual standpoint, offers the reader no choice but to take them literally ... and since that little statement about in "six days the LORD made the heavens and the earth" is in the middle of these commandments ... if you are going to be hermeneutically consistent (and that's a choice) then you have to take the six days literally as well.
The issue also comes into focus later in Exodus 31 ...
15 'For six days work may be done, but on the seventh day there is a sabbath of complete rest, holy to the LORD; whoever does any work on the sabbath day shall surely be put to death.
16 'So the sons of Israel shall observe the sabbath, to celebrate the sabbath throughout their generations as a perpetual covenant.'
17 "It is a sign between Me and the sons of Israel forever; for in six days the LORD made heaven and earth, but on the seventh day He ceased from labor, and was refreshed."
Now you have the Sabbath clearly explained in the context of a normal work week ... and that in the context of the six days of creation.
I am not sure why you need to put that as an either/or.
Hopefully you see now why it IS an either/or.
I also dont know why you think this addresses the question of the extra-Biblical Young Earth doctrine.
It is the NON young earth doctrine that is extra-Biblical ... for there is no underlying textual issue that forces us to conclude Genesis 1 is not to be taken literally, as I have argued from the above Exodus passages.
It is the desire to harmonize with science that prompts people to reject the literal view.