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. It also restricted people from telling 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 that it was the 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.
When Captain James T. Kirk, Spock, and Dr. Leonard McCoy were transported from 2267 to 1930 by the Guardian of Forever, Kirk acted to preserve the timeline by allowing Edith Keeler to be killed in a traffic accident, even though he had become romantically involved with her. His actions preserved 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 principal 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 is 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.)
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 this was also 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...")
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 crew members 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).
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.