As of 2021, there is an actual written Prime Directive (also known as “Starfleet Command General Order 1”) as outlined in Star Trek: Prodigy (2021-). Specifically in the episode “First Con-tact” (S01E17) set in the year 2383; text follows:
Section 1:
Starfleet crew will obey the following with any civilization that has not achieved a commensurate level of technological and/or societal development as described in Appendix 1.
a) No identification of self or mission.
b) No interference with the social, cultural, or technological development of said planet.
c) No reference to space, other worlds, or advanced civilizations.
d) The exception to this is if said society has already been exposed to the concepts listed herein. However, in that instance, section 2 applies.
Section 2:
If said species has achieved the commensurate level of technological and/or societal development as described in Appendix 1, or has been exposed to the concepts listed in section 1, no Starfleet crew person will engage with said society or species without first gathering extensive information on the specific traditions, laws, and culture of that species civilization. Then Starfleet crew will obey the following.
a) If engaged with diplomatic relations with said culture, will stay within the confines of said culture’s restrictions.
b) No interference with the social development of said planet.
As for who specifically drafted those words? In universe I guess some Starfleet Command bureaucrats/lawyers; who knows.
Also, prior to Star Trek: Prodigy, there was a prop in the Star Trek Into Darkness (2013) that has text for the first three Starfleet General Orders. General Order #1's text is as follows:
As the rights of each sentient species to live in accordance with the normal cultural evolution is considered sacred, no Starfleet personnel may interfere with the normal and healthy development of alien life and culture.
Such interference includes introducing superior knowledge, strength, or technology to a world whose society is incapable of handling such advantages wisely.
Starfleet personnel may not violate the Prime Directive even to save their lives and/or their ship, unless they are acting to right an earlier violation or an accidental contamination of said culture. This directive takes precedence over any and all other considerations, and carries with it the highest moral obligation.
But as noted on the Memory Alpha page:
This phrasing of General Order One has its origins in the FASA Star Trek Role-Playing Game (The Federation sourcebook, p. 5). The text was slightly edited by the individual who made the prop for the film.
So for all intents and purposes, the Star Trek: Prodigy iteration of the Prime Directive text was the first real appearance of the Prime Directive in the Prime Timeline; with the Star Trek Into Darkness version of the Prime Directive text being in the alternative universe Kelvin Timeline of course.