The historic agreement reached between the Polish government and the independent Solidarity union marks the first power-sharing pact in the Soviet-dominated East Bloc between the Communist Party and the people it rules.

The agreement, if implemented, is a victory for the Polish people, who have staged periodic revolts against the Communist authorities since they were installed by Moscow in 1944. They include an armed uprising in Poznan in 1956 and bloody workers' rebellions in 1970, 1976 and 1980.It would be the first practical fulfillment of the promise Josef Stalin made to the United States and Britain at the 1943 Yalta conference.

Yalta, where the allies mapped out the spoils of World War II, placed Poland under the Soviet sphere of dominance on the assurance from the Soviet dictator that the future shape of the country would be established following democratic elections.

Instead, the communists rigged the elections in 1947 and suppressed democratic freedoms.

Under the accord, for the first time since 1947, the Communist Party will surrender its absolute majority in the Parliament. It still will control 65 of the 460 seats because of its alliance with the Peasants Party and the Democratic Party. The rest will go to the Solidarity-led political opposition.

In a newly created 102-seat second chamber, the Senate, elections will be open and free for the first time in the communist bloc.

Authorities also will allow the operation of independent associations, which could in turn lead to independent political parties.

But the main feature of the accord is the legalization of Solidarity, banned after the imposition of martial law Dec. 13, 1981. It was a staggering personal triumph for Soldarity leader Lech Walesa who warned the Communist rulers after martial law went into effect that they would be the future losers.

The government hopes that drawing Solidarity into the power structure, albeit with strict limits, will persuade the Polish people to make difficult sacrifices required to accomplish critically needed economic reforms.

Despite the best intentions of both sides, the agreement can be wrecked by a number of factors, both economic and political.

Inflation is expected to reach 100 percent at the end of the year. There are meat shortages and many basic comodities are unavailable. The wait for an apartment has grown to 25 years. An average Polish family often can make ends meet only with financial help from relatives abroad.

Politically, the party faces rebellion from within and from the OPZZ trade union federation, which officially replaced Solidarity after martial law. OPZZ now refuses to agree with the wage provisions in the pact, which call for 80 percent compensation for inevitable future price hikes.

"We formed a Frankenstein and now we don't know how to stop its operation," said a government official who helped negotiate the agreement.