There's a lot of confusion over the order of events and the why's of soe things:
First of all, Cipher was a massive organization by the time of GZ, and some of those parts could function autonomously, without ero's consent and/or against his wishes.
The attack on MSF was exclusively the work of Skull Face as a means of provoking Zero. He's very candid about the fact he wants to end Zero and take everything from him. Big Boss is the most important person in Zero's life, even after their little lover's spat over LET.
Zero was furious and sent Skull Face out to pasture. The man was a great asset and very talented, so he could possibly be of use later. Afterall, this man was given the same parasites that gave several members of the Cobra Unit their powers, specifically The End.
This exile to Africa was what gave Skull Face the chance to encounter the vocal cord parasites. It also gave him even more freedom thanks to being out of sight and out of mind. Zero wasn't terribly concerned about his own safety because he thought his defense was perfect.
Zero created Phantom Big Boss, not the Real Big Boss. Phantom Big Boss was kept in a coma and fed suggestion to make him believe he truly was Big Boss. When the real Big Boss woke up, the Medic was likely taken off his sedation regimen.
After Big Boss woke up, Ocelot filled him in on Zero's plan to use a body double to keep him safe. Snake was initially hesitant, but Ocelot convinced him that the Medic was willing to sacrifice his life for Big Boss and all his ambitions then, and would gladly do it now if he were allowed to have a say.
Snake consented to use the body double and would allow him to completely assume the Big Boss mantle while setting the ground work for his own true nation in order to combat Cipher's will on a global scale.
Snake had to assure that the medic survived and the plan was to use the attack on the hospital as a test fire to see if the medic could cut it as the Phantom Big Boss. Things spiraled way out of control because XOF was more than thorough. They sent their own one man infiltration assassin in, then a whole damn force, and finally the man on fire. Considering the medic escaped alive, he passed with flying colors.
After sending Big Boss on his way and setting up Punished Snake, he commenced his usual double agent ritual of self-hypnosis so that he could effectively avoid being caught in a lie.
This is when TPP's main story takes place.
My Theory:
After Diamond Dogs is well established and the threat of XOF has essentially passed in late 1984, possibly while participating in the Mozambique Civil War as a mercenary force, Phantom Big Boss is given a tape from real Big Boss that explains the situation, thanks him sincerely, tells him they'll change the future together, and passes on the plans for Operation Intrude N313.
Upon listening to the tape for Operation Intrude N313, Phantom Big Boss takes on a more "evil" persona, and Diamond Dogs is transformed into Outer Heaven.
Phantom Big Boss may have been given the same role as The Boss prior to him, but instead of Volgin launching a nuke and calling for a change of plans, Solid Snake was simply too successful. Phantom Big Boss then deviates. He tries to have Snake exfiltrate Outer Heaven or die before discovering his secret.
When Solid Snake discover's Big Boss's existence, he absolutely must die. Unfortunately, he's too much for Phantom Big Boss to handle. This means the real Big Boss has to fake his own death and loses all of the resources Cipher (through FOXHOUND) leaves at his disposal, and his fingers come off the pulse of his enemy. It's a bit of a disaster.
Big Boss eventually makes his move with Zanzibar Land. This sets the stage for Miller, now returned to Cipher, to make good on his claim that Big Boss can go to hell, by aiding the clone that's going against him. This cement's Miller on the Patriots side of Cicpher (as opposed to the Big Boss/Ocelot/Eva side), and eventually leads to his death at the hands of Ocelot prior to the events of MGS1.
What was Big Boss doing when Phantom Big Boss had his mantle? Probably making a tidy profit off the Mozambique Civil War and all those regional conflicts history recorded him in. In fact, he was probably probably working both sides with his Phantom on the other end. If he was working with Phantom Big Boss in secret, it would make sense that they pooled resources to start work on building their new deterrent and nation.
Why did Big Boss head the Intrude Operation then? The Patriots were bound to eventually catch on to the Outer Heaven plot, and by being the man in charge of stopping Outer Heaven, he could easily stall for time until they were ready. After all, they needed more time to get Metal Gear Functional. He sent Grey Fox in on Operation Intrude N312 because it would look like he was putting in the utmost effort, but Frank was probably in on the whole deal.
The Patriots possibly pushed for Solid Snake to be used for Operation Intrude N313, which Big Boss would be okay with. Solid Snake may have been a clone of the greatest soldier to ever live, but he was the greenest member of FOXHOUND, so he shouldn't have been too big a threat. Unfortunately for Big Boss, this lead to the birth of the next legendary soldier.
Nice summary.