Until last August, Lech Walesa was an unknown -- and unemployed -- electrician. Now, as leader of the communist world's first independent trade union organization, he is an international figure instantly recognized wherever he goes.

In the space of seven months, Walesa's Solidarity union has grown from a handful of dissidents into a massive labor federation with 10 million members and many more sympathizers. It is a story with few parallels in modern history.

With achievements like that, it can come as a suprise to learn that Walesa's ability to shape events in Poland is strictly limited. He can cajole, persuade, bully and bargain with the government and his frequently unruly followers. But he cannot dictate his wishes.

Solidarity's power, too, is negative rather than positive -- and here lies one of the fundamental reasons for continuing instability in Poland. With its enormous industrial muscle, the union can bring down the government any time it chooses. The danger is that, in the resulting anarchy, it could be swept away itself.

A visit to Solidarity's national headquarters in Gdansk provides an insight into the strengths and weaknesses of this unique institution. Here, in the rambling corridors of what used to be a seamen's hostel, a fascinating metamorphosis is taking place. A revolutionary movement is attempting to transform itself into a bureaucratic organization.

In some rooms, beds and wash stands (property of the Hotel Morski) are still to be seen alongside packing cases containing new office furniture, filing cabinets, typewriters, and photocopying machines. On one of the doors, a sign reads, in English: "International Department -- Foreign Trade Union Delegations Only."

Two secretaries guard the approach to Walesa's office, which is slightly larger than the other boxlike rooms. In fact the Solidarity leader is seldom there. Like a medieval king consolidating newly acquired territories, he has to travel constantly. He takes his court with him in a Mercedes bus.One day he is sorting out a squabble between his unruly lieutenants, the next he is negotiating a truce with a rival power. On yet another occasion, he might be found trying to defuse one of the many confrontations that have arisen between local Solidarity units and government authorities.

While Walesa is away, his office is occupied by an intense former university lecturer named Andrzej Celinski, 31. Here, one suspects, is the man who makes Solidarity's organization tick. His habitual jacket and tie distinguish him sartorially from most other Solidarity officials in their jeans and pullovers.

Celinski's formal position is secretary of Solidarity's National Coordinating Committee. This means he prepares resolutions for the weekly meetings of the committee, leads its debates and heads a permanent 22-member staff. He is a member of the Committee for Social-Defense, known as KOR, a dissident group formed in 1976 with the aim originally of protecting workers harassed by police.

Like other Solidarity leaders, Celinski takes heart from Poland's experience during the last six months, despite the fact that the crisis is clearly far from over.

"It may not look encouraging from the outside. But during this period we have succeeded in demonstrating that people are stronger than the system. Despite 35 years of forcible indoctrination, full state monopoly over the mass media, and limits on the church, society has survived intact and is waking up from its long sleep," he said.

He is also aware that Solidarity faces tremendous problems of organization and discipline. The union, he notes, is very young, in terms of its own age and the experience of its officials. The union's present leaders won great prestige during the strikes because of their refusal to give way to government pressure. But it is difficult to turn them into bureaucrats.

Another problem is that the establishment of Solidarity has released differing expectations. It is at once a great social movement concerned with national issues and a trade union concerned with the intricate deals of its members' welfare. Celinski fears that if Solidarity overlooks the latter function it could create opportunities for the communist-dominated unions to win back some of their old influence.

"We have to avoid a situation where Solidarity is busy looking after the interests of the nation, but not the interests of individual workers in individual factories," Celinski said.

One solution is for the union to recruit experienced professional staff with a knowledge of shop-floor problems and a talent for office work. Celinski points out that a number of 40- and 50-year-olds are infiltrating the Hotel Morski's youthful ranks. This bureaucracy must not, however, be allowed to take power away from Solidarity's elected leaders.

Privately, Walesa has been heard to complain that he feels manipulated by his advisers. Instead of being presented with a range of policy options from which to choose, he grumbles that he is presented with only one. After leading last summer's strike in his own way, he feels hemmed in and subject to pressure from all sides.

A frequent criticism of Walesa, however, is that he is too malleable. Some Solidarity activists accuse him of following whatever piece of advice he received most recently. But they also recognize that he is indispensable to them as a charismatic figure and symbol of workers' power.

Although Solidarity began as a purely working-class movement, it could not have reached its present status without the support of other social groups such as the church and the intellectuals.

The advisers came from different backgrounds. The KOR members such as Celinski and Jacek Kuron were virtually full-time professional dissidents prior to last summer's upheavals. Their underground activity helped pave the way for the strikes by providing discontented workers with a ready-made organization.

As Poland's principal opposition group, KOR has come under constant attack from communist authorities. The government has urged Solidarity to purge the KOR members who, collectively, are under criminal investigation for alleged antistate activities. Walesa, however, has made clear that he will stand by his "friends."

Catholic intellectuals from another, less controversial, group of Solidarity advisers. They include Tadeusz Mazowiecki, a prominent Catholic journalist, who has been named editor of Solidarity's new weekly newspaper. The paper is to appear at the end of March with a projected circulation of half a million.

At first there were bitter disputes between the different sets of advisers about tactics, with KOR taking a tougher line. But now it is probably true to say that both groups act as a moderating influence on the movement in the sense that they favor organization and discipline rather than chaos and anarchy. The real militants are the rank and file.

The degree of organization Solidarity has achieved in the space of seven months is impressive despite what sometimes looks like muddle and confusion. Elections to factory Solidarity chapters -- the first free elections to take place in Poland in more than three decades -- are almost complete. They will be followed by regional and national elections through July and August.

Practically every Solidarity branch in the country produces an uncensored newspaper or information bulletin. Thanks to Poland's modernization drive in the 1970s, it has been possible to equip most Solidarity offices with telex. This has provided the basis for a swift, professional information network.

The union has also set up several social research centers that conduct public opinion polls and gather what would otherwise be unobtainable statistical data. Since Solidarity's strength lies in its mass support, it clearly is of vital importance to know what the public is thinking.

Solidarity has received sizable donations from labor organizations in the West, including the AFL-CIO, but the main source of its funds is Poland itself. Big profits are made from the production of an endless range of Solidarity badges and trinkets, as well as calendars (with pictures of striking workers to mark off the months), posters and diaries.

All this has added to Solidarity's visibility. Its slogans are more in evidence than those of the Communist Party. The union has almost succeeded in adopting the red and white Polish flag as its own symbol.

With the emphasis on Solidarity as a national institution, it is sometimes easy to forget that it was originally conceived as a deliberately loosely knit federation of regional unions. Each regional branch sends its own delegates to the weekly meetings of the National Coordinating Committee. Debates are frequently heated and even Walesa has power only to persuade, not to instruct.

Attempts are now being made to strengthen Solidarity's central leadership. An inner five-member presidium led by Walesa has been created to run the union between meetings of the coordinating committee. The presidium is intended as a kind of fire brigade that can rush to trouble spots at a moment's notice.

By distancing some of Solidarity's more prominent leaders from their regional power bases, Walesa is evidently hoping to encourage them to think in terms of national rather than local interests.

Frequently Solidarity's national leadership has found itself forced to condone local wildcat strikes against its better judgment. An example was the 18-day strike in the southern town of Bielsko-Biala last month over corruption allegations provincial officials. Walesa, unable to control the protest, had no option but to lead it.

In recent weeks, there has been a spate of similar cases in Lodz, Radom and elsewhere. They illustrate one of the basic contradictions in the Polish experiment. Solidarity leaders are convinced that, unless they stick together, the communist authorities will find ways of dividing them and ultimately reversing their gains.

Solidarity, then, is the name of the game. It is the source of the movement's strength but also its principal weakness, since trivial local issues rapidly assume national importance. In any contest with the government, Solidarity members feel a tremendous psychological need to demonstrate their unity.

The resulting trials of strength have helped create an unstable atmosphere of permanent crisis. They reflect the fact that both Solidarity and the Communist Party lack authority in crucial areas. Solidarity is weak because its leaders lack experience in controlling and channeling the emotions of their followers. The party is weak because of internal divisions and lack of popular support.

Many Polish political analysts believe that, if a peaceful solution is to be found to the crisis, both institutions will have to be strengthened. The party must be allowed to regain its authority -- but such a development is possible only on a basis of public trust.