Eight months before Virginians went to the polls to choose their next governor, the media consulting firm of Bailey-Deardourff and Associates of McLean presented Republican J. Marshall Coleman with a plan for winning the race.

The plan, more than 260 pages of spiral-bound analysis, projections and advice, was to become what some Coleman advisers called their campaign Bible, and what others would describe as Coleman's pact with the media devil.

The plan was much more than just a preview of what Coleman's televison advertisements would look like. It was a prescription for transforming the GOP candidate top to bottom.

In essence, consultant Douglas Bailey told Coleman that to win he would have to forget the people and the style that had won him the state attorney general's office four years earlier. To raise the $1.5 million he would need to wage a television advertising war with Democrat Charles S. Robb, Coleman would have to appear a mainline conservative and not the maverick moderate that had been his image.

He would have to drop the wit and charm with which he had wooed voters in the past, and put on the drab garb of traditionalist Republicans who had gone before him. That was the only way Coleman could win, Bailey said. And Coleman quickly accepted the strategy.

Looking back at his defeat Tuesday, some of Coleman's supporters -- and some of Robb's advisers as well -- are asking whether it was the proper course for Coleman.

"The question," said Anson Franklin, Coleman's campaign manager and longtime friend, "is whether it was the right approach or whether something different would have put us over the top. I cannot answer that even with the benefit of hindsight."

"Marshall knew what he had to do in order to win," said Robb spokesman George Stoddart. "In the final analysis, he might have done better being himself, raising less money and getting more attention in the press."

The Coleman plan was risky, but it was simple. Bailey recognized that Robb, who had spent $725,000 running for lieutenant governor in 1977 and was the first candidate for that office to buy television time in the costly Washington market, was not a Henry E. Howell, whose liberal populism and brash style helped Republicans twice win the governor's mansion.

Robb was not only a conservative, he was a celebrity. And he had on his side image maker Robert Squier of Washington, a formidable opponent indeed.

To win, Bailey told Coleman he would have to forget blacks, who had given him 30 percent of their votes when he ran for attorney general, and unionists. Instead, Coleman would have to adopt the Republican blueprint that had won before, sticking to conservative positions and hoping that the delicate coalition of blacks, liberals, moderates and conservatives Robb was trying to build eventually would fall apart.

The reason for this change, Bailey said, was that Marshall Coleman otherwise would never be able to raise the television money he needed, as much of it presumably would have to come from the same power brokers in Richmond who had backed Republican governors Mills E. Godwin and John N. Dalton. The trouble, which Bailey recognized early, was that Marshall Coleman wasn't a traditionalist. In fact, he had built his political success on thrashing conservatives whom the power brokers held dear.

To make matters worse, the divisive 1981 Republican state convention chose a little known Harrisonburg attorney named Nathan H. Miller to be this year's attorney general candidate, spurning conservative favorite Herbert Bateman of Newport News.

"When you beat their man, you start off with a problem with that group," said Franklin, himself an outsider. "Somebody who is part of that group has more flexibility than someone who is suspect."

Robb saw this, and image maker Squier designed ads to seize the advantage, painting Coleman as inconsistent and "flip-flopping," hoping to dry up Coleman's money. "His unstable candidacy was not a candidacy you put money into," said Squier. "Especially not the smart money."

Nicknamed "Dr. Feelgood" by associates because of his love for balloons, parades and storybook-type media campaigns, Bailey believed it crucial that Coleman not only look different on issues, but run a campaign different in texture and style from Robb's.

Though Coleman trailed Robb by 10 points at the beginning, he had a significant advantage: voters by a wide margin thought he cared more about people. To reinforce this impression, Bailey took an idea used previously by Squier and developed a "workdays" theme for Coleman. The idea -- Coleman would work one day each week at a common man job and later use the material in television ads -- was a major element in Bailey's plan. He had hoped that the state press would latch onto it and publicize it, thus setting Coleman apart from Robb.

But the attention Bailey had envisioned never developed. Coleman allowed only still cameras to record his workdays, forfeiting much of the project's television appeal. The press gave it hardly a mention. It was, said one Coleman aide, "30 days of the campaign wasted."

Robb had problems of his own. The 10-point lead he held because of his celebrity status was ephemeral. By August, his advisers saw him in serious trouble. Of the major issues voters were concerned about, Coleman was leading on every one by as much as 30 points, polling showed.

Potentially this was a disaster for Robb, for the issues were Republican ones. The whole point of the Robb strategy was to eliminate issues as a consideration and, in Squier's words, "bring the race down to a question of personality."

Part of the Squier response voters saw were films of Robb firing a gun on a police pistol range, to show how tough he was on crime, while Squier's radio advertisments blasted Coleman's record as attorney general.

Bailey's approach was different. All along he had seen Robb's major weaknesses as his ties to his late father-in-law, President Lyndon Johnson, and his marriage into celebrity status. These he attacked with Coleman's constant reiteration that the young Republican had "worked for everything he's ever gotten."

Still, Bailey's job was more difficult. While Squier could show footage of Robb relaxing with voters to demonstrate he cared about people, Bailey tried to make Coleman look more serious, more gubernatorial.

On that front, Coleman was at a serious disadvantage. Polls by both parties showed that when voters were asked which candidate looked and acted more like governor, they preferred Robb by a stunning 20-point margin.

Although Bailey had anticipated Squier's negative attack, his response was to videotape Coleman speaking into the studio camera. "We thought that would establish a favorable contrast," campaign manager Franklin said. Bailey had expected Robb to wilt in television confrontations with Coleman. Yet staunch Republican voters who participated in controlled viewings of TV debate footage said they preferred Robb because of his serious demeanor.

In the final weeks, the Republican National Committee poured in more than $200,000 worth of television and radio advertising for Coleman. All 10 of the state GOP congressmen were recruited to recite carefully tailored messages for broadcast into their home districts. Bailey designed radio spots to appeal to different regions of the state. Still, Coleman's campaign never got the kind of momentum Bailey was seeking.

Conflict-of-interest allegations involving both Miller and one of Coleman's own fund-raisers put Coleman on the defensive and kept him there. He was never able to take firm control of a major issue that separated him from Robb, according to Franklin. The portion of the black and liberal vote he had hoped for was driven into the Robb camp by Reagan's dominant role in the GOP campaign and a last-minute, racially tinged appeal from Godwin. By the end, Robb had succeeded in erasing Coleman's leads on nearly all the issues.

A turning point in the campaign, said Franklin, was the exchange over marijuana, when Bailey in response to a Robb ad asserting that Coleman didn't think drugs a "serious problem," implied in a radio ad that Robb had been smoking marijuana.

"We certainly succeeded in catching a lot of attention," Franklin said. "But we missed the opportunity to turn the ad around on Robb. And the press was able to paint us in the same corner -- that we were running a negative campaign."

As his candidate was going down to defeat at the polls Tuesday, Bailey himself was recovering from major heart surgery. The high-strung intellectual who smoked three packs of Salems daily and who had worked so hard trying to get Coleman elected, became a victim of his own zeal.