The Temporal Prime Directive was a fundamental Starfleet principle.
All Starfleet personnel were strictly forbidden from directly interfering with historical events and were required to maintain the timeline and prevent history from being altered. the directive also restricted people from revealing too much about the future so as not to cause paradoxes or alter the timeline.
Lieutenant Ducane told Kathryn Janeway, "Remember the Temporal Prime Directive: discuss your experiences with no one," implying she used wording consistent with the Temporal Prime Directive in the 29th century (at least in that timeline).
The Temporal Prime Directive was directly related to the Prime Directive.
Dr. Leonard McCoy was transported from 2267 to 1930 by the Guardian of Forever. During his time there, he prevented Edith Keeler from being killed in a traffic accident, causing a change in the timeline that resulted in the Federation and Starfleet ceasing to exist (or, at least, as known by history). Upon learning of this from the Guardian, Captain James T. Kirk and Spock followed McCoy to 1930, where Kirk acted to preserve the timeline by allowing Keeler to die, even though he had become romantically involved with her. His actions restored the timeline, which culminated in the birth of the Federation and Starfleet. (TOS: "The City on the Edge of Forever")
The Temporal Prime Directive was mentioned by Captain Jean-Luc Picard in 2368. Picard postulated that the existence of such a directive might be what was preventing a traveler from the future from aiding him to avert the destruction of Penthara IV. Picard was unaware of any formal Starfleet equivalent to a Temporal Prime Directive at this date. (TNG: "A Matter of Time") Captain Kathryn Janeway was aware of the directive's existence in 2371. (VOY: "Shattered") This was long before the temporal incursion by Captain Braxton in the timeship Aeon in 2373, indicating that the Temporal Prime Directive was not exclusively a 29th century regulation. (VOY: "Shattered", "Future's End") Julian Bashir once referred to the "temporal displacement policy," a principle taught at Starfleet Academy, in the year 2024, when he traveled back in time to that year from 2371. (DS9: "Past Tense, Part I") Starfleet Regulation 157, Section 3, Paragraph 18 also related directly to time travel. (DS9: "Trials and Tribble-ations")
The events of the Temporal Cold War indicate that the regulation had been rescinded, at least temporarily, by the 31st century. However, the Federation faction in the Temporal Cold War was dedicated primarily to keeping the timeline intact and preventing the other factions from interfering with it, which would be completely in keeping with the Temporal Prime Directive's intent. On a few occasions a temporal agent, Crewman Daniels, had to tell the crew of Enterprise NX-01 some things about the future. (ENT: "Cold Front", et al.)
Kirk and his crew have a long list of temporal violations seventeen in total. These include: the events of "The Naked Time", "Tomorrow is Yesterday", "Assignment: Earth", "All Our Yesterdays", "The City on the Edge of Forever" where they tampered with the Guardian of Forever which is also a Prime Directive violation, "Yesteryear", Star Trek IV: The Voyage Home, and Star Trek Generations with Temporal Investigations calling Kirk a menace. (DS9: "Trials and Tribble-ations")
This directive was violated at least twice by USS Voyager crew members from alternate futures. First, Commander Chakotay and Ensign Harry Kim from 2390 altered the past by preventing Voyager from crashing on a class L planet and killing all aboard. (VOY: "Timeless") Later, an Admiral Kathryn Janeway from the year 2404 went back in time and successfully assisted Voyager in returning some sixteen years earlier than it had in her timeline.
Additionally, the Janeway of the 24th century violated the directive by accepting the aid of her future self. Her future self took the following attitude regarding the Directive – "It's less of a headache if you just ignore it." Her present self tried to avoid getting knowledge of the future, but after learning that it wasn't so good for several of her close crewmembers, she allowed her future self to tell her about it. Thanks to Admiral Janeway's efforts, Voyager returned home a full sixteen years early (and dealt a crippling blow to the Borg Collective in the process), but the admiral's efforts were a serious breach of the directive. (VOY: "Endgame")
While the directive was not officially identified in 2370, the senior staff of the USS Enterprise-D did ponder whether Captain Jean-Luc Picard had changed history after his jumps back and forth through time by telling them about the future that he had witnessed, but it was reasoned that his actions would not affect history as he had already changed the future by eliminating the anti-time eruption that had featured in the timelines he witnessed. (TNG: "All Good Things...")
The crew of Deep Space 9 have three violations: (DS9: "Little Green Men") where Quark accidentally alters the Roswell Incident, the events of (DS9: "Past Tense, Part I", "Past Tense, Part II") where they accidentally murder Gabriel Bell, and (DS9: "Trials and Tribble-ations") where they accidentally get sent back to (TOS: "The Trouble with Tribbles") but the last one did not count since Arne Darvin was the one who violated the temporal prime directive.
Related topic Edit
The directive was mentioned a few times in Star Trek Online. The mission "Everything Old is New" has you visit Drozana Station to stop the infestation by the Devidians. Franklin Drake of Section 31 tells you to don't worry about the trip, but one of your crew members will tell you to keep the Directive in mind. However, this is tossed out when you are forced to help Dr. McCoy in saving crewmembers there. It's fully enforced in the next mission "Night of the Comet", though Drake tells you again that he'll cover things up. It's invoked a third and currently final time with "Past Imperfect" as you're given permission to use the Guardian of Forever to travel back and rescue Miral Paris, even making sure that technology from the 25th century is destroyed.
Voyager's violations of the Temporal Prime Directive are discussed in the novel Watching the Clock, which also cites Janeway allowing The Doctor to retain the use of the mobile emitter despite it originating from the twenty-ninth century, Janeway defending the decision by arguing that she wasn't prepared to deliberately handicap her chief medical officer in the name of an abstract rule. Although the Department of Temporal Investigations attempts to charge Janeway, they are advised to leave the issue alone by a representative of their department's future, who informs them that Admiral Janeway's actions actually preserved history rather than changing it. (This is suggested to be due to her role in bringing Voyager home "early" contributing to the final destruction of the Borg in Star Trek: Destiny.)
The novel Headlong Flight features a discussion about the relevance of the Temporal Prime Directive when the Enterprise-E of 2386 makes contact with the Enterprise-D of an alternate 2367 where (among other differences) Picard/Locutus died during the Battle of Wolf 359. Concluding that the threat of the Borg is sufficient reason to be cautious, and musing that their current situation made it difficult at best to apply the Temporal Prime Directive anyway, Picard arranged for the alternate Enterprise-D to be given access to Transphasic torpedo technology, which they had already obtained through a 'bending' of the Temporal Prime Directive in their universe.
In the novel A Pocket Full of Lies, Chakotay notes that he completed a classified incident report about the events of "Shattered" for the benefit of the DTI and attended a brief meeting about it when Voyager returned to Earth. Chakotay only reveals the full details of the crisis to the rest of the senior staff when he learned that an alternate version of Kathryn Janeway existed in this timeline due to those events, with Admiral Janeway granting a temporary suspension of the Temporal Prime Directive during the subsequent briefing with the understanding that it would not be recorded and all officers present would not discuss the matter with anyone outside the room.