I assume that all space programs, manned and unmanned, have many "what if" plans for situations that might happen. For example, on the ISS they had fire alarm and evacuated to the Russian side. Are those "what if" plans publicly available? In specific, what if any of the Apollo missions that landed on the moon had had a catastrophic failure that would have prevented them from taking off from the moon?
Well, they prepared by writing a speech text for Nixon "In event of Moon disaster". The opportunities to "fix a problem" aren't that many in space. At least no one can hear them scream. And fewer than 20 out of 540+ have perished in space. The blackness is not as dangerous as it looks, when approached with care.
When the space shuttle Columbia failed, NASA afterwards concluded that it just might have been possible to rescue them if they had known about the problem. And that was in the era of the space shuttle when such tasks were envisioned, by the elderly, to be "routine".
Apollo was designed to enable several abort points. Apollo 13 used one of them.
They never built it, but the Apollo program had plans for what was essentially a chair with a rocket engine on it. It was an emergency device meant to get the astronauts from the surface into lunar orbit, where they could rendezvous with the command module. Its design philosophy favored simplicity over redundancy. So much so that it didn't even have life support, it relied on the astronaut's spacesuits to provide that.
Here's the relevant wikipedia article: http://en.wikipedia.org/wiki/Lunar_Escape_Systems
Can you imagine riding that thing?!?!
Just a quick comment on getting Apollo off the lunar surface in an emergency.
Schmitt and Cernan have described an emergency procedure to "hot-wire the LM". The ascent engine was very simple by design, and if the systems that fired it failed, it could be fired simply by passing a wire down through the hatch to manually open the valve that mixed the propellants!
It would mean flying with suits pressurised, with the hatch open...
They mention it on this page: https://www.hq.nasa.gov/alsj/a17/a17.eva3post.html
NASA is renowned for their detailed mission plans, including contingency plans for everything that could go wrong.
For the ISS, there is a publically available emergency operations manual with instructions about what to do in case of what emergency. "Fire" is page 34 - 54. However, it is not that easy to understand for a layman due to the cryptic acronyms it uses to refer to equipment and station parts (many of them in cyrillic) and the many cross-references to other operation manuals.
HERE is an instructive video of the procedure if a fire breaks out on Soyuz.
The astronauts stay cool, at least in their minds, and use their sticks to push the right buttons. That's the plan. Reminds me of the time I was a conscript. But I think that the Russian have a tradition of being able to remotely control most of what happens on their spacecrafts from the ground.
So, first, after having closed their visors, they arrest the ventilation to stop feeding the fire with oxygen. Then they shut down the electrical supplies(!). Finally, if necessary, they decompress the spacecraft and then have to land within two hours which is how long their space suits can supply them.