It was not.IIRC, it was DC Fontana that added Q after the studio wanted "...Farpoint" extended to a two-hour block.
"Instead, Gene Roddenberry chose to write the extra material himself. "Gene said, 'Don't worry about expanding your story. I'll put a frame on it, Dorothy,'" relayed David Gerrold.
D.C. Fontana herself noted, "I was told that Roddenberry would write what came to be called 'the prequel.'" Gerrold added, "When Gene said he would put the frame on it, Dorothy said, 'There goes my bonus.' Gene said, 'Don't worry, we'll take care of you.'" (The Fifty-Year Mission: The Next 25 Years, pp. 66-67)
Gerrold retrospectively alleged, too, that the reason Roddenberry gave for arranging to do so much writing on the episode was actually dishonest. Explained Gerrold, "He says, 'I have to add thirty minutes to the script because the studio wants my name on the pilot,' which was a lie." Richard Arnold claimed that the real reason why Roddenberry took on the task of fleshing out the script was that he was capable of writing extremely well under pressure whereas Fontana wasn't. (William Shatner Presents: Chaos on the Bridge)
Nonetheless, the situation reminded Fontana of an earlier scenario in which, while working together on Star Trek: The Animated Series, Roddenberry had caused her to lose out on money she was rightfully owed, due to a promotion in her career, while he sneakily acquired those finances for his own salary. (The Fifty-Year Mission: The Next 25 Years, p. 67)
Recalling what happened after she submitted the first draft of the "Encounter at Farpoint" teleplay, she noted, "The script was taken out of my hands and it was totally rewritten by Gene." (Star Trek Magazine issue 128, p. 47)
According to the reference book Creating the Next Generation (p. 67), the first draft script was submitted on 17 February 1987. However, according to the book Star Trek: The Next Generation - The Continuing Mission (pp. 30 & 40), Fontana completed her work on the script in mid-March 1987, when she turned in "a revised draft of a ninety-minute version of 'Encounter at Farpoint'."
Gene Roddenberry's newly-added framework introduced the character concept of Q. (The Fifty-Year Mission: The Next 25 Years, p. 67) Originally, that character was instead meant to be introduced in a later entry of the forthcoming series. (Beyond the Final Frontier, p. 77)
Although all the other members of the writing team very gently tried to advise Roddenberry that the Q subplot wasn't very good (immediately recognizing Q as clearly a direct copy of Trelane from TOS: "The Squire of Gothos"), he was adamant about writing it into this episode. "He said, 'Trust me, the way I'll do it, the fans will love it,'" recounted Gerrold. (The Fifty-Year Mission: The Next 25 Years, p. 67)"
https://memory-alpha.fandom.com/wiki/Encounter_at_Farpoint_(episode)