The first things you see when you walk into political strategist Robert Shrum's Los Angeles co-op apartment are two portraits of the late Massachusetts senator Edward Kennedy by Andy Warhol. They are souvenirs from Shrum's time working on Kennedy's unsuccessful 1980 Democratic presidential primary campaign, one of the eight presidential campaigns Shrum advised. Among his specialties was preparing candidates for debates — a painstaking process of putting together briefing books, researching moderators' potential questions, developing attacks and counterattacks, and running mock debates.

Even if Shrum has been out of the presidential debate prep business for years (John Kerry’s 2004 debates against George W. Bush were his last), he is still very much in the political mix. Shrum is now director, with Republican strategist Mike Murphy, of the Center for the Political Future at the University of Southern California.

In June, I invited myself over to Shrum’s home to watch the first pair of Democratic presidential debates so I could see them through the eyes of an expert well-versed in their strategies and rhythms. We sat in his living room, munching on snacks laid out by Shrum’s wife, writer and former Los Angeles Times society columnist Marylouise Oates: prosciutto, melon and an elegant cheese board with fig preserves the first night, guacamole and French onion dip the second.

Shrum relishes teaching and was eager to share everything he could, even before the debates began. “See the outliers at the edges of the stage?” he said the first night. “They’re going to try to bash their way into the conversation.” Sen. Elizabeth Warren (Mass.), meanwhile, had “wonked her way to the top,” but would be trying to show she could also connect to people.

Sure enough, New York City mayor/human wrecking ball Bill de Blasio crashed in, sopra voce. Warren announced plans with Oklahoma girl can-doism.

The second night, Shrum predicted, someone would take out their elephant gun to try to blast front-runner and former vice president Joe Biden out of the lead. And Shrum was certain that a melee would break out at some point, quelled by a candidate who would hold up their hands and say, “Wait a minute, we can’t afford to do this. This pales in comparison to defeating Donald Trump. Let’s not attack each other, let’s attack that.”

He was right again. Sen. Kamala Harris (Calif.) called off the food fight before bludgeoning Biden with his own baggage — i.e., past comments on his ability to work with segregationist senators and his opposition to mandated school busing.

The fact that Shrum could predict the dynamics of each debate pointed to something that is often underappreciated: the chess beneath the churning. The debates, for all their seeming chaos, were actually filled with rehearsed lines and scripted “reality.” Debate prep has to carry off a seeming paradox — a marriage between premeditation and person, so that a well-crafted comeback seems intrinsic to the candidate and off the cuff.

In this light, Harris carried off her attack brilliantly: It was planned, yet sounded spontaneous and personal. And she delivered it with moral authority. Shrum’s diagnosis of Biden’s mealy response: “I think he was told to stay above the fray, not go after any Democrats. But there’s a difference between an attack and a counterattack.”

Both nights, Shrum kept his ears open for what he calls “home base — your central message to which you can always go back. It’s why you’re in this race, what you want to do for the country.” Good debate prep should instill an internal GPS in candidates, providing them the fluency to find concise routes of explanation, to seize potential breakout moments, and to return to the strength of that home base, without the reiteration feeling canned or contrived. Above all, home base should be a positive, visionary message — one engineered to inspire.

Biden returned to home base a week after the debates, Shrum later told me, when the former vice president tweeted: “If we don’t defeat Donald Trump, the character of this nation will be fundamentally and forever altered.” That home base is in danger, though, if in the next debate Biden isn’t in fighting form and doesn’t expand his vision for the nation.

Shrum said Harris will have to prove, at the upcoming debate, that “she’s as good at answering questions as she is at asking them.” The senator will likely face scrutiny on her prosecutorial record and policy stances, he predicted.

As for the party’s left flank, Shrum found Warren’s “I’m a woman with a plan who will fight for you” story very effective, far more so than Bernie Sanders’s “revolutionary rerun” jeremiad of “I’m the most radical and will bring the most change.” He predicted that, next time, Sanders might attack Warren to distinguish himself from her and win back any defecting voters. With 10 candidates onstage, “you’ve got a very important tactical or strategic choice … who do you want to engage with? If Elizabeth Warren and Bernie Sanders are onstage together ... I suspect he’ll want to engage with her on an issue. ... If they get into a wonky debate … you can lose the audience. Are there big things you can raise that can illustrate the differences?”

For all his acumen, however, Shrum admitted, “I’m sorry, it’s beyond my capacity to predict what Marianne Williamson will do.” Her home base, he said, was “woo-woo talk.”

I tried to fill Shrum in on Williamson’s appeal. “You know Gwyneth Paltrow’s website, Goop?” I asked. Shrum did not. “It’s a lot of hemp and crystals, somehow both luxe and crunchy, and it’s famous for — ” I paused, before deciding that Shrum was already manifesting the life he wanted, to use Goop-ese, even without hearing an explanation of vaginal steaming. “Um, so basically,” I said, “Marianne is Goop made flesh.” Shrum snorted.

The debates are an imperfect system, he acknowledged, disadvantaging candidates who are more ruminative, wonkier, slower to the draw, and perhaps privileging woo-woo and bright shiny objects above their due. But like our messy democracy, “they’re what we have,” Shrum said — best illuminated by an understanding of strategy and sincerity alike.

Noy Thrupkaew is a writer in Los Angeles.