One of the cardinal rules of writing is "write what you know," and one of the easiest ways to do that is to infuse some of your personality into one or more of the characters you write. It's a very old TV tradition to have main characters based on one of the writers, from Rob Petrie on "The Dick Van Dyke Show" (modeled on Carl Reiner, who was even going to play him at one stage of development) to Andy Sipowicz on "NYPD Blue" (whose demons were shared by David Milch) to Jess Day on "New Girl" (who even wears the same glasses as Liz Meriwether). If the show works, the creator even gets extra credit for being similar to a character the audience has grown to love.

But when an autobiographical show or character doesn't work? Then you have something really ugly, like "Love & War" (where, legend has it, creator Diane English had to fire Susan Dey for being woefully unfunny as a character  English had based on herself), or like CBS' new "Partners."

"Partners," which debuts tonight at 8:30, is based on the friendship of writers David Kohan and Max Mutchnick, who previously created "Will & Grace" (and worked on some lesser lights like "Boston Common," "The Stones" and "(Shit) My Dad Says"). Kohan is straight and Mutchnick is gay, and they've transferred their dynamic into a pair of architects(*), Joe (David Krumholtz) and Louis (Michael Urie) who've been together since childhood, and who run into trouble after Joe gets engaged to his girlfriend Ali (Sophia Bush).

(*) This is the point at which I note there was already a mid-'90s sitcom called "Partners" about a pair of architects whose friendship turns complicated when one of them gets engaged — and that that "Partners" (which co-starred Tate Donovan and Jon Cryer) was co-created by Jeff Greenstein, who was the "Will & Grace" showrunner for several seasons. (Also, this is the point at which I note that "Husbands," the web comedy Greenstein works on with Jane Espenson, is much funnier than this "Partners" hopes to be.) 
 

I have no idea what Max Mutchnick is like as either a friend or collaborator in real life, but his fictional stand-in is among the more unpleasant characters you'll meet this fall. Louis is a rampant narcissist — "If this story isn't about you or me in the next 30 seconds," he complains at one point in the pilot, "I am going to eat my fist" — who continually takes advantage of the people in his life who inexplicably keep giving him chances to let them down.

Louis' boyfriend Wyatt (Brandon Routh) is a nurse, and is hurt and surprised to learn that Louis has been telling everyone that he's a doctor, because he's embarrassed to be living with a nurse.

"How could you not know that?" an incredulous Louis asks Wyatt.

"I just thought it was part of your schtick," says Wyatt.

"Sweetheart, I am my schtick!" Louis says proudly.

Later in the pilot, when Louis appears to have torpedoed Joe and Ali's relationship, an angry Joe wisely tells Louis, "The cost of being friends with you has officially outweighed the benefits." But within a few scenes, everything's hunky-dory again.

There's potentially a funny comedy to be made about a selfish jerk who constantly walks all over the people who care about him. But it would need to be a much, much darker show that's aware of how toxic Louis is on the people around him. Because of how these characters were created, Kohan and Mutchnick can't see that, unfortunately, and "Partners" mistakenly believes that Louis is so charming — and so secretly good-hearted, despite ample evidence to the contrary — that we will all love him despite his ample flaws, and despite the complete lack of platonic chemistry between Krumholtz and Urie.

The show around Louis is filled with a lot of creaky set-up/punchline humor, much of it based around forced double entendres; a running gag in the pilot involves Wyatt wearing a heart pin on his scrubs, just so he can say "I've got a heart-on" and offer to give one to Joe.

I watched the second episode just to see if the creators had softened Louis any, since Urie is working overtime on such a terrible character and deserves better. If anything, Louis is worse in next week's show; the pilot at least makes a token effort towards having Louis fix the mess he created, where in the second episode, he's largely oblivious to what he's doing.

"You know, you are not a good person," Joe tells him at one point in that outing.

"I get that a lot," Louis says. "Please be more specific."

Alan Sepinwall may be reached at sepinwall@hitfix.com