The Coronavirus Show — directed by, produced by and featuring President Trump — has certain rules.

The president, who is every episode’s star, always gets the best lines — delivering the happy talk quotes and zingers that are often riddled with half-truths and misstatements, but that allow him to present to the audience the world as he wishes it were, not as it is, in the middle of a deadly global pandemic.

He reserves the right to surprise viewers — as he did with a serious turn on Monday afternoon — offering an appearance totally out of character with the show’s previous installments.

And the president appears when he wants, often at the beginning of coronavirus task force news conferences, and sometimes departs early, too — not dissimilar to his time as the actual reality TV host of NBC’s “The Apprentice,” when he would dole out the challenge and then recede off-screen to the let the teams battle for his approval.

This is generally when the real show begins. But this show, too, has its own set of rules.

Administration officials playing supporting characters must often shape-shift to inhabit two main roles: the role of Trump cheerleader, where they make sure to lavish praise on the president almost to the point of obsequiousness, and the role of competent government bureaucrats doing their very best to be honest and transparent with the public.

It is not an easy casting assignment.

And the average viewer — an uneasy-to-terrified American, social distancing at home and looking for updates from their government — could be forgiven for thinking the entire federal bureaucracy is simply ad-libbing its way through what increasingly feels like an almost biblical crisis.

But there is, in fact, a loose script, and just about everyone — from the president and the vice president, to the various agency heads and task force members — is following it, in near-daily installments.

On Sunday, for instance, Trump offered his self-congratulatory, not-always-entirely-accurate take on crisis in an early evening news conference. He began with the Federal Reserve’s decision, just moments before, to slash interest rates down to zero.

“It makes me very happy, and I want to congratulate the Federal Reserve,” Trump said, before heaping praise on himself.

“And you will not hear anything bad about me unless it’s about a month or two from now,” the president continued. “So I congratulate the Federal Reserve. I think it’s terrific.”

Trump also offered some assertions of dubious provenance, leaving it to Anthony S. Fauci — who has emerged as this season’s breakout star, as the Cheerfully Stoic Truthteller — to offer a more nuanced version of reality.

“I think, very important, the young people and people of good health, and groups of people, just are not strongly affected,” Trump said during his Sunday news conference.

Fauci, the director of the National Institute of Allergy and Infectious Diseases, speaking just hours earlier on CNN’s “State of the Union,” had issued a stern warning that even young people in relatively good health “are not immune or safe from getting seriously ill.”

“The virus isn’t a mathematical formula,” Fauci said. “There are going to be people who are young who are going to wind up getting seriously ill. So, protect yourself.”

Trump also struck a tone of cautious optimism during the same Sunday news conference, when he explained, “This is a very contagious virus. It’s incredible. But it’s something that we have tremendous control over.”

Again, it fell to Fauci — entering stage right to the briefing room podium at the 26-minute mark — to deliver the grimmer reality. “As I’ve said many times, and I’ll repeat it: The worst is, yes, ahead for us,” he said. “It is how we respond to that challenge that’s going to determine what the ultimate endpoint is going to be.”

Before the truth-telling can begin, administration officials also take pains to praise the president, crediting nearly all good news to what they claim is Trump’s swift decision-making and strong leadership. Vice President Pence — a study in Oval Office subservience — is particularly gifted at this aspect of the job.

During a news conference Saturday, Pence extolled Trump’s “unprecedented and extraordinary” decision to suspend travel from China as helping to halt the virus’s spread, and gushed that “the president took every step to prevent the coronavirus from coming into our country.”

On Sunday, the vice president continued the praise-a-thon, touting Trump’s “decisive leadership,” and concluding, “So the American people can be confident that President Trump is going to continue to act without hesitation on the advice of our health-care professionals to put the health and safety of the American people first.”

 Surgeon General Jerome M. Adams similarly understood the performative rituals required by Trump, going so far in that same Saturday news conference as to offer the media “some straight talk from the nation’s doctor.”

“No more bickering, no more partisanship, no more criticism or finger pointing,” Adams said. “There’ll be plenty of time for that.”

He admonished the briefing room press corps for chronicling daily the various missteps and fumbles by the administration on combating the virus, offering his own prescription: “Less stories looking at what happened in the past.”

Leon Panetta, who has served as White House chief of staff, defense secretary and CIA director for past Democratic presidents, said the mixed messaging is confounding.

“It’s almost as if the vice president and all the others can’t just talk about the facts and the truth of what’s happening,” Panetta said. “They’ve got to paint it in these broad brushstrokes that say whatever good is happening is the result of the president’s leadership and whatever bad is happening is somebody else’s fault.”

Other officials have also played to type, emerging as various supporting characters.

Deborah Birx, the White House’s coronavirus response coordinator — with her colorful silky scarfs, shimmering metallic tunic and smart updos — has channeled the government’s collective maternal instinct, offering calm snippets of wisdom.

During a Monday afternoon news conference, she praised the media for its responsible social distancing — “Great spacing!” she said — and revealed herself to be the mother of “two wonderful millennial young women who are bright and hard-working” and urged the entire millennial demographic to do its part in stemming the spread of the virus.

“They are the core group that will stop this virus,” Birx said. “They’re the group that communicates successfully, independent of picking up a phone. They intuitively know how to contact each other without being in large social gatherings.”

Fauci, too, continued his role as dispenser of candor Monday, gently warning that behavior that may feel like an overreaction is, in fact, appropriate and even prudent.

“When you’re dealing with an emerging infectious diseases outbreak, you are always behind where you think you are if you think that today reflects where you really are,” he said.

Dana Calvo, a screenwriter based in Los Angeles, said that at least as a television masterpiece, the Coronavirus Show still felt lacking.

“What has struck me these past few days is the lack of stirring leadership moments that can bring an audience to its feet,” Calvo said in an email. “Trump continues to confirm he is incompetent and emotionally unavailable. It’s not exactly an Emmy-worthy moment when he tells a reporter, ‘I don’t take responsibility at all.’ ”

The president himself seemed to sense something similar, and during Monday’s news conference offered up a plot twist: Trump largely presented from the podium as calm and measured, echoing the guidance of his public health experts and repeatedly conveying the severity of the situation.

He advised against gatherings of more than 10 people, urged people to work from home and exhorted the public to avoid discretionary travel, as well as going out to bars and restaurants. Trump even spoke of telling one of his own sons that “it’s bad, it’s bad.”

And he offered his most dramatic assessment so far of the virus’s scope, saying it could last until July or August, if not longer.

Several times, he played down any focus on the plummeting stock market — previously a key concern of his — and returned instead to solving the public health crisis at hand.

“We’re not thinking in terms of recession, we’re thinking in terms of the virus,” Trump said at one point.

For the duration of Monday’s news conference, Trump exhibited a classic character arc, seeming to have internalized the lessons his advisers have long been trying to impart — that his own behavior and public comments were making the problem worse — and offering an evolved public posture.

There was but one major regression, when the president was asked by a reporter to assess his response to the virus on a scale of 1 to 10.

“I’d rate it a 10,” Trump said.

Philip Rucker contributed to this report.