Actually, according to the novel Dark Lord, the clone troopers had no preprogrammed order to kill the Jedi. But they were "hardwired" to obey Palpatine, who had established Order 66 as a so-called emergency plan should the Jedi attempt a takeover. Some troopers, not believing the order to be in...