On League vessels, command structure is essential. From simple shuttles all the way up to the immense Super Dreadnaughts, it's import to know what everyone's duties are and how orders flow down. Because these are military vessels, these rules are designed to make it easy to understand who's in charge in emergency situations.
A simple overview of the chain of command is this:
The President of the League is considered the Commander in Chief over the entire League Military. They are considered the ultimate authority in the chain of command.
After the President, the Joint Chiefs are the next authorities. Starting at the Chairman, the chain of command is as follows:
While this office is typically viewed as dealing with League Naval personnel, it is also the office that issues official copies of orders from any of these external sources. While not required, especially in combat situations, it is typical that the Bureau of Persons signs off on all orders being given to Naval Vessels.
Any Naval officer rank O-7 and above is considered a flag officer. They are not required to have designated any particular ship as their flag to issue orders; they may issue orders as they see fit, however, if they issue order that either contradict the orders from the Joint Chiefs or are otherwise outside the units assigned to them, those orders are considered void and non-binding.
A Flag officer may declare any ship they are physically present on as their Flag. This means they have taken ultimate command authority over the ship, though they are not "in command" of that ship. (It is generally discouraged from Admirals directly taking command of ships, though they may be assigned as 'Captain' just like any other ranking officer.) Declaring a ship as their flag also grants that ship the same authority and privileges enjoyed by that Flag officer.
When a Flag officer has declared a ship as their flag, it is assumed the commander of the ship reports to the flag officer, and takes orders directly from them. The rest of the ships officer should assume they continue their previous reporting structure.
The commanding officer of a ship is called it's 'Captain', regardless of their rank. While on capital ships it's considered irregular to have someone ranked lower than Commander (O-5) in command, on smaller ships it's quite routine.
Only capital ships have Executive Officers, and they are in charge of personnel on the ship, as well as having all department heads report to them.
These are special roles that can be assigned as a Captain sees fit, however, traditionally the Head of Operations is named Second Officer, and the Head of Security is named Third Officer. Their duties are to assist the Executive Officer as needed.
Where these special roles matter is in situations where the Captain and Executive officer are either not present or incapacitated. These positions help to ensure that there is always a clear chain of command, even in extreme circumstances.
On most capital ships, the departments are: