I'm not an authority or anything, but I had always thought that all the "contingency plans," of which Order 66 was one of them, was "built in" so to speak to all the clones in the GAR.
Essentially, they basically had no choice in the matter BUT to kill the Jedi.