Beyond the immediate retaliatory response in the case of a (perceived) ICBM attack from a major nuclear power (Russia, China, France, Great Britain) that threatens the ability to retaliate there is no explicit doctrine in how to deal with a nuclear attack beyond what is essentially the whims of the President and the guidance of his Cabinet and advisors (specifically, the Secretary of Defense, Secretary of State, National Security Advisor, and the National Security Council). In the case of the Cuban Missile Crisis, which is perhaps the closest a sitting President has come to launching a nuclear attack, it was a minor Cabinet official (Llewellyn E. “Tommy” Thompson Jr.) who advised him to seek a path of de-escalation even as national security advisors were recommending preemptive nuclear attack.
It should be possible to identify the country of origin of the nuclear material used in the attack on the basis of isotope ratios, but that doesn’t mean that the specific actors are identified, particularly in the case of a nation like Pakistan where access protections like Permissive Action Links are not built into the design of nuclear devices, and where some rogue element of the military structure could act independently of the nominally civilian government.
It is frightening that the retaliatory response of the most powerful nation of the world is essentially dependent upon the whims of one executive who wasn’t even appointed by a popular vote and who has essentially zero understanding of nuclear deterrence theory, but this is the world we live in, and we can only hope in such a circumstance that response is mediated by professionals who have spent their careers considering such a contingency, but ultimately, whomever is President makes that decision. And Trump is not a person who makes regularly good business decisions, much less decisions that affect the strategic security of nations.