The 5 ministries should be appointed by the president, and the 5 general/admiral positions should be appointed by the CoS. Should the CoS perish or resign, the presidential appointed Minister of War/Defense/Navy will take his position. It's very simple. We shouldn't complicate matters anymore.
President is appointed by the people in the elections, and the president chooses the ministers.
CoS is appointed by vote in the congress and he appoints the generals.
The Minister of War shouldn't be appointed by the congress, because why complicate matters? Already having a congress appointed CoS is ready enough. The thing that everyone is not seeing is that by having the MoS appointed by congress/CoS, we are powering the CoS more than the president. Why? Because there is a delicate balance of the President having exactly 5 ministers to back him, and the CoS having exactly 5 generals to back himself. So if there's a coup, it's all going to be based on the votes of both ministers and generals, so if let's say a communist president gets elected and the nationalists get the CoS position, then the CoS can coup and the communist cabinet will be outnumbered in vote and will have no actual power. And viceversa, a liberal government can be offed by a socialist CoS, just by one vote, because the President would have only 4 ministers without the ministry of war, and the CoS would have 5 generals AND the Minister of War. It's really difficult to balance, that's why we should keep with our system that is working PERFECTLY. The socialists are just pissed that they had their Chief of Staff ill and couldn't really appoint socialist ministers, let's not let that anger destroy our system!
-Tarquino Zepeda