Nine months after the great earthquake in north China, thousands of squat, temporary shelters built of mud, brick and straw still line the streets of this city, a sign of secret longings for space and privacy in a nation of socialist togetherness.

Last July's earthquake cause incredible destruction in the minning town of Tangshan, 125 miles east of here, but in relatively undamaged cities like Peking it has become in some ways an unexpected blessing. A family that was jammed into a one or two-room apartment sharing bath and kitchen with another family now find they have a second home in their frontyard shelter where they can stretch out and arrange the floor plans as they like.

Such makeshift housing arrangements take on particular importance circulation within the Communist Party reveals that the government, at least in the last year, has been operating at a deficit, something practically unheard of in China. It was learned during a recent two-week tour of the country that Chairman Hua Kuo-feng's new admnistration ordered a a freeze last fall on construction projects of more than $1 million. This cuts into new housing. Some Chinese construction engineers are reported to be sitting at home waiting for the freeze to end.

Families here in China's capital "are still living in the shelters and they will as long as they can," said one foreign resident."They put so much work into those little huts it's one of the first times they've gotten to demonstrate a little creativity."

"In the last few weeks you see definite efforts to give the people bricks and other thing to improve them," said another foreigner of the huts. "Part of the family is living back in the apartment and the others are out in what we now call the summer cottage."

Huge apartment buildings found all over major Chinese cities illustrate the substantial progress Peking has made in housing its urban workers. Such buildings can even be found in some rural acreas. But there is not nearly enough adequate space for 800 million people.Work proceeds on some buildings, but other projects are conspicuously idle. So even without an earthquake alert, the Peking authorities have refrained from repealing their authorization for the temporary earthquake shelters.

Some foreigners here suggested that the shelters may still be housing refugees from the Tangshan area, but an official Chinese spokesman denied that. Chinese officials, unusually frank and open in recent talks with me, still betrayed some sensitivity on the subject of earthquake shelters. The Foreign Ministry information department said it was unable to arrange a visit requested with a shelter dwelling family.

"Many of them are away at work during the day," a spokesman said. "And anyway," he added, "many of them don't live in the shelters any longer."

Strolling unescorted at midday past a major concentration of the huts just a block from Peking's central Tienanmen Square I nonethleless saw many signs of occupation. The small doors on each hut have locks. Clothing has been set out to dry and bedding to air on clotheslines. One woman can be seen through a screen window working in what seems to be a makeshift kitchen.

Most of the Shelters seem to be dug into the ground to provide more standing room inside. They come in a variety of shapes and materials. Long-time Peking residents bored by the monotony of much of Peking architecture have become avid shelter-watchers.

"I saw a beautiful A-frame just the other day," said one.

Some foreigners here, particularly the Japanese, argue that much of the housing available to the Chinese is roomy and luxurious by Asian standards. They suggest that the new administration of Chairman Hua, despite its commitment to improving "the people's livelihood," may pour more money now into industrial plants and less into housing. Worker families who foreigners are allowed to visit appear comfortable, although, as in the United States, the truly prosperous middle-income families appear to be those where both husband and wife work.

Simple construction leaves many Chinese at the mercy of the elements. One European diplomat heard a worker in south China say, after an unusually cold winter, "It's not so much fun where there is no heat in the apartment and your three-year-old is screaming because he can't sleep. Even if your wrap him up in many layers of clothing, he still can't sleep."

A visit to Block 11, Lane 938, Heavenly Mountain Road, part of a workers' housing development at the western edge of Shanghai, illuminates some of the good and some of the bad in Chinese home life. In apartment No. 301 live Chou Ho-nien, a retired rubber worker; her husband, Hu Chin-hua, 61 a retired supply clerk; their son, 36; daughter-in-law, 27, and two grandsons, 12 and 10.

They share two bedrooms each about 200 square feet. The grandparents and grandsons sleep in the same room in two double beds, with pictures of Chairman Mao and Chairman Hua staring down at them from the opposite wall. They step from their bedrooms into a narrow hall shared with another family whose bedrooms are connected at the far end. Off the middle section of the hall are the common bath and kitchen.

The entire apartment, like most of the dwellings shown to foreign visitors, needs a fresh coat of paint. But the residents have decorated it with bright-colored propaganda posters. On dressers or under table tops are scores of family photographs - a great favorite in China.

Before 1960 when they moved into the brand-new block, "We had just a simple house, only 72 square feet for us and our two children," Chou said. Now their younger daughter, 28, lives at the local university where she is studying, and the four remaining income earners in the family find the monthly rent of $5 no problem.

"My own pay was $32 a month," said Chou, whom an interpreter referred to as the family "minister of finance."

"Now I'm retired and get $22. My husband got $35, now he gets $24. Our son, a factory workers earns $38 and our daughter-in-law, in neighborhood health worker, gets $15."

In their room, the retired couple have a sewing machine and two radios. They travel the 100 miles to Ningpo, where many relatives live, each year, and recently they took on 800-mile trip to Sian in north central China to visit a sister and see the sights. "We spent a lot of money," Chou said.

Two foreign visitors drop by briefly at a few other apartments in the block. A teacher sitting down to a lucheon of fried fish with his family urges his 12-year-old daughter to play a number on the mandolin like pipa. A young worker in another apartment is painting in watercolors. There are faces landscapes, nothing revolutionary.

Block No. 11 resembles a dirty brown stucco building in a rundown American neighborhood, but its inhabitants think they have a good thing.

Several miles away in the quiet of the Fangtai farm Grigade, Hue Yue-tseng explains without embarrassment, that she and her husband, firm supporters of collectivization, own their small two-story rowhouse.

"It cost $1,100 to buy the house," she said. "We had saved $850 and got a $250 loan from the brigade."

The purchase might have the taint of capitalism, but the brigade leaders call it part of "walking on two legs," a combination of private ownership and collective ownership. The brigade owns the land. The same goes for the Hsu family pig, which the family purchased from the state, fattened up, and will sell back to the state for $25 profit.

The factory workers of Shanghai and the earthquake shelter dwellers of Peking have made clever use of limited space. Now their urge for more room appears to be helping accelerate an unseen but extensive building project.

Tai Tsin-shun, a former storekeeper, enjoys startling visitors to a little clothing shop near Peking's Chienmen street by pushing a hidden button. Silently the floor behind the counter slides away, and a stairway leads 25 feet down to a well-lit monument to Chinese pessimism - the Peking bomb shelter system.

The narrow tunnels, opening into wide meeting halls, kitchens and rest area, seem to go on forever. Tai points to one tunnel that he says goes seven miles into the Peking country side, an escape route from nuclear holocaust. He says that after eight years of construction, Peking has enough tunnels to hold all of its four million urban residents.

"We have tunnels everywhere," said Tai, talking about cities on the northern plain nearest China's arch enemy, the Soviet Union. His visitors, who had already seen a similar shelter system in Shanghai, have no way to determine if he is right or wrong, but the glimpses are impressive, and depressing.

The Chinese blithely predict that war between the two superpowers will come, and China must be ready if the Soviets turn on them 100. In the meantime, however, there is no need to let all this space go to waste.

"I guess I can tell you that some factories are already set up underground," Tai said. "We can make good use of the tunnels. Some have been turned into storage. When it gets hot in the summer on the ground, we can pump the cool air up into the theaters."