As the first Tomahawk mis siles rained on Libya, armchair generals rushed to define “The Obama Doctrine.” Most assess ments focused on Obama’s antiwar statements as a candidate and decisions by past presidents to take military action in Bosnia, Iraq and Afghanistan.

All fair game — except the conclusions were flawed. No discussion of Obama’s view of a just war is complete unless it examines the impact of his magical thinking.

By that I mean his supreme confidence in his own vision and powers to remake the world. Fueled by a mixture of hubris and faculty-lounge idealism, his words and actions suggest he believes his presidency is exempt from the lessons of history and human nature.

Just as he claimed his election would mark “the moment when the rise of the oceans began to slow and our planet began to heal,” his wars defy traditional military doctrine. For example, his approach in Libya, as in Afghanistan, features a promise of timed withdrawal, but not a clear mission. In both he talks of “success” but not “victory,” leaving the yardstick vague. The refusal to be precise reflects a belief that his intentions are virtuous, as distinct from his predecessors’, and that he should be judged on that basis, not on results. His goal in Libya is so abstract that he refuses to call it a “war.” That would make it sound brutal — and ordinary.

We thus meet the term “kinetic military action” as a White House talking point.

Despite the endless slogs in Iraq and Afghanistan, and despite objections from Defense Secretary Robert Gates and other brass, the president was confident that Libya would be easy in, easy out and that a civil war in an oil-rich tribal nation would be settled in days. After bypassing Congress and the public to cut a deal at the United Nations, we could fire missiles from ships at sea, drop bombs from 40,000 feet and be home in time for dinner.

It would be so surgical, the commander in chief could take his family on a trip to Brazil and points south while the military went into battle. We wouldn’t need a single boot on the ground and could hand command to NATO or France or anybody who wanted it.

Meanwhile, after 42 years in power, a brutal and mad Moammar Khadafy would see our righteousness, lay down his weapons and quit his throne.

Presto. That’s how a just war should end, and this time it would — because of Obama.

That, I submit, is the real “Obama Doctrine.”

That doctrine is not disturbed by the nagging war-gaming questions of “what if.” As in, what if Khadafy refuses to quit? What if he does quit — what is our plan for Libya? What if Islamists turn it into a safe haven?

Most of Obama’s foreign policy is the fruit of the same poisoned tree. The laws of diplomacy were supposed to bend before his transforming breeze. Only they haven’t cooperated.

The hot spots are growing, and in exchange for apologies and accommodations, we get more aggression. Not a single new ally has been recruited to our side.

Old friends are dispirited while adversaries such as Iran are emboldened. The “reset” with Russia and the Muslim world turns out to be another word for “retreat.”

Despite the era, the challenges for every president are fundamentally similar: Secure America and promote the common good under the laws of the land.

Or, in the words of the presidential oath, “I do solemnly swear that I will faithfully execute the office of president of the United States, and will to the best of my ability, preserve, protect and defend the Constitution of the United States, so help me God.”

It’s a remarkably concise and direct pledge, demanding only dedication and integrity and a faith in the Almighty. Luck helps, too.

But belief in the magical powers of History’s Great Man? That way yields only discord and disaster.

Whitewash won’t wash

Something’s rotten in Suffolk County. To settle a fund-raising investigation, County Exec Steve Levy surprisingly announces he will not seek a third term, and turns over his $4 million war chest to prosecutors. Levy, a Democrat who sought the GOP nomination for governor last year, says he accepts “responsibility” for unspecified issues, while District Attorney Thomas Spota, a Democrat, says Levy’s decision ends the investigation.

This is too weird to be the last word. A rising star buys his way out of trouble by quitting politics and forking over money that isn’t his — and we’re supposed to nod and move along?

No thanks. Levy and Spota both must come clean.

Dealing with Black hole

File this one under “Help Wanted.” I wrote last week about the fading hopes for Cathie Black, and now I hear City Hall is alarmed enough that it is seeking outside help for the new schools chancellor. Profes sional counselor types are being sounded out about helping im prove her dismal public profile. A recent poll found that only 17 percent of New Yorkers ap prove of her job performance, a standing that could make it nearly impossible for her to make any meaningful education gains. Applicants should con tact Deputy Mayor Howard Wolfson at City Hall.

Out of controller

With the lone air-traffic con troller falling asleep at Wash ington’s Reagan National Air port and the union demanding that more people be hired, in quiring minds want to know how many air controllers it takes to see an airplane. Answer: two, one to see it and one to keep him awake.

Andy’s bending will

As budget push comes to shove in Albany, Gov. Cuomo faces crucial tests of whether he will keep his explicit promises to reform the Vampire State. There are signs he is wavering.

Take his latest comments on closing prisons. He used his State of the State speech to blast the idea of keeping underused prisons open “so some people can have jobs.”

But with upstate Republicans balking because of possible job losses, Cuomo talks as if he is with them. “When you close down prisons in many communities, these are the economic engines,” he told reporters Friday. “Don’t underestimate the economic impact that closing prisons would have.”

That’s curious. Did he just discover the economic impact, or did he just discover the political price?

Also troubling are reports that he might agree to a budget that does not include his medical-malpractice reforms. Assembly Speaker Shelly Silver (D-Ambulance Chaser) has always opposed the $250,000 cap on “pain and suffering” payouts, and Cuomo might be rolling over.

The caps would save hospitals an estimated $350 million in insurance costs, and officials say doctors could eliminate costly procedures performed as defense against potential lawsuits. The changes were key to hospitals and the health-care union agreeing to cuts in Medicaid spending.

But it’s not just the dollars that matter. Cuomo won a landslide election on his promise to restore trust in Albany. If he doesn’t deliver, he’ll owe voters a refund on that, too.