The real heroes of the 1982 election were the voters. They sorted through the mass of sludge that flooded the television screens and the mailboxes in the closing days of the campaign, and figured out with almost uncanny skill how to send the message to Washington that they wanted to send. It was a performance to gladden the heart of any small-d democrat.

I write those words with more assurance than most that have come off this word processor in the course of reporting this intriguing and complex political year. More assurance because the view just expressed was put in my head by two of the people who have had the best fix on this country's mood all year long. One is my colleague at The Washington Post, Haynes Johnson, and the other is pollster Peter D. Hart.

At a breakfast a few weeks before the election, where Hart incidentally forecast the results almost perfectly, he cautioned reporters not to accept the White House view that the voters had to choose between continuing on the course Ronald Reagan had set or rejecting it and going back to traditional Democratic programs.

The third option, Hart said, was to use the election to signal a course correction -- adjustments in the basic Reagan plan that would reduce the deficit, shorten the recession, slow the pace of the military buildup, stretch out the tax cut and stop the cuts in lifeline support programs for those suffering from the economic squeeze.

Johnson, who had been out talking to people, soaking up the same sense of the public mood that Hart found in his polling data, came back and wrote a prescient piece that ran on the morning of Election Day. What the voters want, he said, are policies that will bring "an end to the recession and all the fear and uncertainty that it generates. It also seems clear what they do not want: not dramatic change, or radical change, nor even Republican change or Democratic change, but a more tempered shift in direction that will head the nation into a more certain course."

The amazing thing -- the democratic miracle -- is that they found the precise means for doing that with their votes last Tuesday.

They struck at the heart of the rigid, doctrinaire element of the damn-the-torpedoes school of Reaganomics by defeating 26 House Republican incumbents. Fourteen of them were from the freshman class, elected on Reagan's coattails, who saw themselves as the shock troops of the Reagan revolution. Sixteen of them voted with Rep. Jack Kemp against the 1982 compromise tax bill that restored some of the excessive tax cuts of the previous year.

By taking those 26 Republicans out of the House, the voters ended Reagan's near-automatic conservative coalition control. The number of Republicans and conservative southern Democrats ready to follow him over the cliff, if necessary, is likely to be 10 to 20 short of a majority. That will require him to negotiate with a broader range of moderate Democrats -- and to heed those in his own party, like Minority Leader Bob Michel (R-Ill.) and Rep. Barber B. Conable Jr. (R-N.Y.), who urge more pragmatic policies.

But the voters wisely did not touch the Republican majority in the Senate. They did not want to withdraw or cancel the mandate of the 1980 election, when they heeded Reagan's plea for a Congress that would work with him to slow the pace of federal spending and help curb the consuming cancer of inflation. Nor did they want to restore full sway on Capitol Hill to a Democratic Party that is still some months -- if not years -- away from thinking through and articulating its own economic program.

The voters recognized almost instinctively that the Republican majority in the Senate is the most likely source of the "more tempered shift of direction" of which Johnson and Hart spoke. It was the Senate Republicans -- led by Howard Baker of Tennessee, Pete Domenici of New Mexico and Bob Dole of Kansas -- who took the lead on the 1982 tax and budget revisions, which Reagan at first resisted.

The Republican senators who squeaked through Tuesday to save the GOP majority -- John Chafee of Rhode Island, John Danforth of Missouri, Dave Durenberger of Minnesota, and Bob Stafford of Vermont -- are senators whose votes sustained that 1982 fiscal policy shift, and who have the independence of judgment that will be required for future mid-course corrections.

Whether Reagan is wise enough to heed the message of the election is uncertain. But the voters have done their part by creating a situation where serious political and policy negotiations, involving the White House, the Senate and the House, can and should go forward.

For all the excesses of the campaign, this election was a wonderful advertisement for democracy.