A joint effort from wife-and-husband team Alison Brie and Dave Franco, the romantic comedy “Somebody I Used to Know” takes a page from “My Best Friend’s Wedding”: A woman attempts to disrupt pending nuptials so she can have the guy for herself.

I’m a big believer in tropes. If deployed right, they are a solid framework that can then be subverted in all kinds of interesting ways, which is what Brie and Franco have done here. She stars and he directs from a script they co-wrote together.

Brie plays a reality TV producer named Ally, and the opening moments are savagely winking as a satire of the reality genre. But then, the show gets canceled. With Ally’s career prospects looking bleak, she pops her cat in a carrier and sets off to visit mom in her hometown of Leavenworth, a kitschy Bavarian-styled village nestled in the mountains of Washington state. At the local watering hole, Ally runs into an ex, played by “Insecure’s” Jay Ellis. The spark is still there. Surely this is the answer to all her problems. Except — whoops! — he’s engaged to someone else, and the wedding is just days away.

Details, smeetails. Ally’s on a mission to reel that man back in for herself, and her plotting is sly and leverages all her pretty- girl plausible deniability. What — who, me? I’m just an old friend inserting myself into this celebration as the videographer for the couple’s big day! Just harmless, beautiful, sparkling Ally hanging out with all her old friends, nothing strange about that. But she knows exactly what she’s doing — and it’s terrible.

“Somebody I Used to Know” takes this outrageousness and grounds it in believable human behavior. The tone is naturalistic — funny and just slightly absurd — and unlike an alarming number of movies about the lives of women, this one actually seems to like women.

That includes the fiancee, played by Kiersey Clemons, who unwittingly finds this saboteur in her midst, but she’s far more than a foil to Ally’s romantic plans. She has all kinds of insecurities of her own, and she’s perceptive enough to sense that Ally’s presence is a red flag. Clemons has such a light touch here, playing it just right — a neutral smile plastered on her face, and yet so many thoughts roiling under the surface. It’s really subtle and smart. Ellis has less to do besides being handsome and not telling Ally to take a hike, but he also has enough realistic flaws that make him more than just a nice guy who’s being yanked around.

Ultimately, “Somebody I Used to Know” walks a tightrope with Ally, who is a likable character doing deeply unlikeable things. How the story resolves itself is one of the more inspired and thoughtful narrative gambits in recent memory, landing on a hard-won emotional maturity.

The cast includes Danny Pudi as one of Ally’s old pals, and this might be his most laid-back performance to date, at once loose and charming (an informal “Community” reunion for him and Brie). Sam Richardson and Zoe Chao also show up in a cameo as smiley network executives who cancel Ally’s show.

If Ally is stuffing down conflicted feelings about her life’s trajectory, this is the moment when she’s forced to confront it all. You manipulate people for a living, someone says of her career in reality TV. No, she insists: “Most people are desperate to tell you how they feel, they just need permission to do so.”

There’s some truth in that. Also plenty of opportunism and exploitation. She works through some of the contradictions and forges a more adult and honest relationship with somebody she used to know: herself.

How to watch: Amazon Prime Video