SEOUL, JUNE 29 -- With a brief television address this morning, ruling party chairman Roh Tae Woo rewrote the rules of South Korean politics and created optimism, in some cases euphoria, that democracy may yet take root in one of the most intractably authoritarian environments in the noncommunist world.

There had been hints that compromise was coming. But no one was prepared for the scope of what Roh did: He announced he would recommend granting virtually all of the opposition's demands concerning democratic reform and agree to a direct presidential election. President Chun Doo Hwan is expected to approve.

Even Kim Dae Jung, long denounced as a firebrand revolutionary, would have his political rights restored and be free to run for office.

Roh abandoned his own party's long-standing plans for change. "If the majority of the people do not want it," he told television viewers, "even the best conceived system will alienate the public, and the government that is born under it will not be able to dream and suffer together with the people."

Under the normal rules of politics here, Roh's move would have meant an intolerably humiliating defeat for the ruling party. Instead, it seems to have set the party ranks celebrating that they finally have done something that people support. "We are following the people's opinion," said Kang Chang Hee, a ruling party member of the National Assembly.

Roh's announcement has boosted the political stock of the unpopular government party. It probably has done the same for Roh, the party's presumed standard-bearer in the election that now is expected for late this year. One ruling party legislator today reported receiving many phone calls from people praising the decision. Party officials are not accustomed to that.

People in both government and opposition predict Roh's steps in the long run will take the steam out of the demonstrations. Students attempting to take to the streets in the cities will find they do not have the respect and support they had previously and will go home.

Radicals do not seem happy over today's events. "We don't trust what they're saying," said a graduate student at Seoul's Yonsei University. Another student predicted the demonstrators' ranks would be thinned to committed radicals.

The opposition party is now in the position of the dog that has caught the car it chases every day. What should it do with it? With its fundamental demands met, the opposition must keep itself together and head off infighting that could mar its standing in the coming election.

The "two Kims" who lead the main opposition party -- Kim Dae Jung and Kim Young Sam -- are lifelong rivals who have come together in the past two years to fight for direct presidential elections. Even with that holding them together, they periodically have felt it necessary to issue formal declarations that they are in complete cooperation.

Both men demurred today when asked about their presidential ambitions, saying they had none. But already there is talk of a split opposition ticket while Roh runs alone. "Let the two Kims kill each other" may be the government's strategy at this point, says a western diplomat here.

It is clear, however, that the whole deal leading to free and fair elections could fall apart. "Most people are waiting to see what will happen in the future," said one man here. Koreans of all political persuasions excel in creating last-minute demands. Yet many here are feeling more optimistic than they have in years that South Korea is at some type of threshold.

The Seoul stock market today recorded a record single-day climb of almost 17 points. Newspapers rushed out extra editions and editorial praise. "We are extremely proud, we are a great people," declared the Dong-a Ilbo newspaper.

Even before Roh's statement, unusual things were happening. South Korea weathered three weeks of mayhem in the streets without the government's resort to the old expedient of declaring martial law, closing the National Assembly and sending everyone home under guard of tanks and soldiers.

It was proof that politics have progressed, however slowly, beyond military domination. Ordinary South Koreans' political expectations now are higher. The people are better educated. They are unwilling to tolerate a return of the soldiers. Their country has a world reputation to guard as a major trading nation and host of the 1988 Summer Olympics.

In the past, civil unrest routinely was blamed on "subversives" or "revolutionaries." This time, the ruling party faced up to the reality that the demonstrators enjoyed almost universal sympathy from the people. This time, the party blamed itself.

Previously, said ruling party spokesman Hyun Hong Choo, "instead of responding to the people's wish, the ruling party imposed its will on the people. That was the typical attitude."

The opposition seized on direct presidential elections as a simple, easily grasped issue into which the enmity that millions of South Koreans felt toward Chun could be channeled. Direct elections have in many Koreans' minds become synonymous with democracy itself.

In the past, however, Koreans have had direct elections but no democracy. There is ample room for cheating or manipulation of results under any election system.

Nonetheless, the opposition is saying there is no doubt about who the winner will be provided the voting is fair. "Don't worry about the ruling party winning," Kim Young Sam told reporters. "Just ask the people. No one thinks that is going to happen."