The Royal Protocol was the name attributed to two different documents.
Within the Federation Starfleet, the Protocol was the name given to a list of information which all members of Starfleet and Starfleet Intelligence were required to read. It contained every diplomatic protocol that was required when facing a member of a royal family. This included everything from the Acamarian to the Gorn. In addition, such important information such as the fact that when in the presence of the Royal Family of Tarkulis, one dropped to their knees before the youngest member of the family before going to the others in succession. Furthermore, when greeting the Malshu of Verjuu, one kept their eyes closed until they were given permission to directly look at the Blessed One. The document contained a million things to memorize as well as stated a million things that could cause offense during diplomatic meetings with a royal family.
This document was considered the bane of everyone in Starfleet Intelligence due to the sheer amount of information present within the Royal Protocol. It was considered a boring read but a necessary one due to its importance in diplomatic negotiations.
In 2378, SI agent Libby Webber managed to retrieve information from Trevor Blake's computer system which included the Royal Protocol. At first, she believed that her find was nothing until she scanned the document and learned that it contained a special code present within the programming. It was later determined that SI Director of Covert Ops Brenna Covington had been using the Borg Royal Protocol in order to establish herself as a new Borg Queen. (VOY novel: The Farther Shore)