This prompt has iRobot vibes.
And like I, Robot, it has numerous loopholes built in, ignores the larger population (Asimov added a law 0 later about humanity), says nothing about the endless variations of the Trolley Problem, assumes that LLMs/bots have a god-like ability to foresee and weigh consequences, and of course ignores alignment completely.
Well, that’s because it paraphrases Asimov’s Three Laws of Robotics, aka Three Plot Devices For Writing Interesting Stories About Robot Ethics.