A commenter on the right to install bulletproof glass post writes,

I think that with a decently intelligent lawyer that laws that establish a "duty to retreat" would be found unconstitutional. Retreat? A duty of Americans of any stripe? Pretty much a concept that would boggle the mind of the founders….

Well, it turns out that Founding-era views on this subject were rather more complex than our guesses—based on our sense of their world-view—might suggest.

[1.] First, just to make clear, "duty to retreat" is a somewhat imprecise shorthand. It's not actually a "duty"—you can't be sued or prosecuted for not retreating as such. Rather, it's a limitation on the right to lethal self-defense: In those states that recognize it (now a substantial minority), you're not allowed to use lethal force to defend yourself if you can avoid the necessity for lethal force by retreating with complete safety. This limitation applies even when you're otherwise entitled to use lethal force (i.e., you're being threatened with death, serious bodily injury, kidnapping, rape, or, depending on the state, some other crimes), and even when you're in a place you have every right to be. The limitation generally doesn't apply, even in duty-to-retreat states, when you're in your own home.

Thus, say that you're in a bar, and another patron says, "leave, or I'll kill you," and flashes a knife (without showing any indication that he's about to lunge at you). In a stand-your-ground state, you can stay, and then when he does lunge at you, you can shoot him; if charged with murder, attempted murder, assault, or some such crime, you can prevail using the self-defense defense. In a duty-to-retreat state, doing so would be a crime (again, assuming that you could have retreated with perfect safety), because you would have lost the self-defense defense by not retreating. This is something of an oversimplification, but this is the big picture.

[2.] The duty to retreat is not a modern invention. Indeed, for an example of how long Americans have been debating whether there should be a "duty to retreat" before using deadly force in self-defense, see Commonwealth v. Selfridge (Mass. 1806), sometimes described as the first published American case to deal extensively with self-defense:

[A.] From Chief Justice Theophilus Parsons' charge to the grand jury:

A man may repel force by force in defense of his person, against any one who manifestly intends or endeavors by violence or surprise, feloniously to kill him. And he is not obliged to retreat, but he may pursue his adversary until he has secured himself from all danger; and if he kill him in so doing, it is justifiable self-defence.

[B.] Now from Justice Isaac Parker's charge to the trial jury:

A man, who in the lawful pursuit of his business, is attacked by another, under circumstances which denote an intention to take away his life, or do him some enormous bodily harm, may lawfully kill the assailant, provided he use all the means in his power, otherwise, to save his own life, or prevent the intended harm — such as retreating as far as he can, or disabling his adversary, without killing him if it be in his power.

And Justice Parker assures the jurors that this proposition is not "contested anywhere," even though it's inconsistent with Chief Justice Parsons' views (and Justice Parker was apparently present at the grand jury charge).

[3.] As best I can tell, the more or less orthodox rule during that era was the one set forth by Blackstone (and other writers):

Homicide in order to prevent an unprovoked felonious attack—a murder, rape, robbery, and so on—was labeled "justifiable," and allowed even if the defendant could have retreated.

Homicide in a brawl that started as a nonfelonious battery (or perhaps even as a consensual fight) but that turned life-threatening was labeled "excusable," and was excused only if the defendant couldn't have reasonably retreated.

This is not the distinction between Parsons' and Parker's charges, because both seemed to be describing justifiable homicide. But I suspect that it was highly influential in the early Republic; though Blackstone was an 1760s English legal scholar, the Framers often cited him and much respected him as an authority on English law, which they were mostly trying to preserve (though of course with some obvious exceptions in the area of constitutional law). For an early articulation that seems to echo this view, see the summary of the trial judge's instructions in State v. Wells, a 1790 New Jersey case:

The judge … [told the jury] that homicide was, in some cases, justifiable, and in others was excusable; but he remarked, that whoever would shelter himself under the plea of self defence, more particularly in the case of a mutual conflict, must make it appear that, before the mortal stroke was given, he had declined any further combat; that he had retreated as far as it was possible to do with safety, and that he killed his adversary through mere necessity, in order to avoid his own destruction. He informed them … that it was the peculiar province of the jury … to determine … whether …. the prisoner, before striking the mortal blow, had retreated as far as he could with safety, and whether he had killed his adversary through mere necessity, and for the preservation of his own life. If they should be satisfied that he had not failed in either of these circumstances, they would acquit the prisoner; if otherwise, it was their obvious duty to find him guilty, as charged in the indictment.

And perhaps the complexity of the view, with its distinction between what is required for justifiable homicide and what is required for excusable, helped promote some of the uncertainty in early American law—and that uncertainty quickly (by 1806) turned into the general stand-your-ground / duty-to-retreat debate.

So we have a longstanding debate here, and one that the Framing generation wouldn't have found to be open-and-shut in either direction.