WALKING on a Georgetown street, not too far from Wisconsin Avenue, the old Star Carpet Works looks pretty much as it always has. Only when you take a second look do you realize no glass is in the wide metal casement windows, and the whole wall is just a facade, a "flat" as they say in the theater.

The architect, Arthur Cotton Moore, protested at the suggestion that the front wall is sort of a funny face, a mask, assumed by the new buildings.

He pointed out that the original walls still stand on all four sides. The old walls enclose a brand new 5,000-square-foot courtyard house, built in two wings, jointed by an umbilicalcord passage. The carpet factory has metamorphosed into the best of all ways to live in a city -- an urban castle.

In some castles in Europe an outer fortification, walls with a gate and a drawbridge, are the outer bastion for a series of buildings separated by courtyards -- almost a village with a village green.

"The Georgetown house is sort of an urban castle," said Moore. "The protective walls give privacy and a sense of security."

It is this sense of quiet within the tumult, of gardens within high walls -- the castle-keep feeling -- that gives the complex it charm. This suits the owner fine, who would not even let his name be used nor the front of the building be photographed. The house recently won an award from the Washington Metropolitan Chapter of the American Institute of Architects.

Moore explained he kept the "whole container, partly because everyone had become accustomed to it being there. The carpet factory had been at that spot since 1927, an industrial use in a residential neighborhood. But the neighborhood had grown used to it, and around it, like a tree around a nail. We thought it was a part of Georgetown's history so we wanted to save the entire historic box."

This is the first time that Moore has tried this form of rebuilding inside an old form. But he has had plenty of experience in conversions, beginning with Canal Square where he turned an old warehouse into offices and retail space. He is currently remodeling the Old Post Office Building on Pennsylvania Avenue. And his plans for the Georgetown Waterfront have been the subject of a week of hearings, and years of controversy.

Moore likes the contrast between the old and the new. The old casement metal window frames with the glass out become grills. The rough clay tile and brick, often haphazardly laid, with the grout smeared rather than smoothed, look "shaggy", Moore says. The new building seems machine perfect -- smooth, sleek stuccoed walls and skylight bubbles. It's rather as if the new buildings had been prefabricated on Krypton and landed inside a 20th-century ruin.

"It was like building a ship inside a bottle," said Arthur Cotton Moore, the architect of the rebuilding. "Actually, we just took the roof off the old structure, left all the exterior walls, and removed the old floors where we didn't need them. The old building occupied the whole lot. We cut it away to make the outdoor courtyards. I guess you could say we poured new wine into old bottles."

The 5,000 square feet under roof were built about a year ago at a bargain $60 a foot.

Beginning at the front door.

To the right is the garage, originally the carpet factory garage where the trucks unloaded. Visitors enter on the left. The old street window without its glass makes a grill. Salvaged metal casements also make the gate.

Inside the gate and the wall, we stood in a flagstoned courtyard, with the original tall brick-and-clay tile walls on either side. The new door and white stuccoed front wall stood in front of us. Inside the building, a great spiral staircase, a piece of modern architectural scrulpture, rose in its sky-lit ower to the top floor and descended to a lower one.

Leaving the staircase for a later adventure, we went straight ahead to the living room.

From here, you can finaly see how the whole thing works. Through its glass wall and the hemispherical skylight set into the wall, we could see the separate children's wing, actually a compelte separate building, joined to the adult building by a pasageway topped with a cured skylight.

In the space thus formed by the two buildings are a swimming pool set in a flagstone courtyard, the second of the house's courts. Behind the children's building is a third court, where they can play out of sight of nosy adults.

The living room is on two levels. Lush seating occupies the upper level. The lower holds a comfortable chair. Built into a long storage wall, stopping several feet short of the ceiling, is a fireplace and a television cabinet on one side, and a bar, bookcase and record storage on the other.

A balcony leading off the other side of the living room's upper level is just big enough to stand on "and shout at the children," Moore explained.

In the adult building, you go upstairs to a grand master/mistress quarters. A good-sized study on the front of the house has a view of the pleasant, village-like street. Off the bedroom, and separable from it by a sliding door, is another study (separate but equal), topped with a domed skylight, overlooking the big courtyard through a remarkable curved plexiglass wall. Two dressing rooms and baths offer the possibility of peace in the family.

A pleasant roof deck, completely sheltered by walls on all sides, offers a sunning place, private from all but low-flying airplanes (a hazard in Georgetown). Rear balconies also open from the bedrooms and dressing rooms.

The lowest level of the adult building, reached through the spiral stair, opens out into a gallery room. From here you can go the the oval-shaped dining room with its curved plexiglass wall or the the glass-walled breakfast room separated from the kitchen by a serving counter. The kitchen also has a second sink counter and a wall of pantry storage. Toward the street side is a laundry and mechanical room.

The lower floor opens cut into the great courtyard. The swimming pool is shaped roughly like a carpet about to unravel, said Moore. "It's a joke, like Liberace's pool shaped like a piano." The courtyard is almost completely terraced with stone, with small curved planting beds opening out here and there by the drain pipes. Pots of flowers provide changeable color.

A passageway, roofed with a continuous skylight, leads to the children's wing: two bedrooms and bath upstairs; nannie quarters below. It has its own tower-like staircase, again topped with a plexiglass dome. The upper bedroom windows are also curved to echo the passage way. A walkway under this building provides an entry to the sauna.

Behind the wing is a small play yard for the children.

Living in the city requires careful design to shut out noise, dirt, burglars, canvassers and other plagues. Other countries, especially those in Latin America and the Near East, long ago invented the perfect city house: the courtyard house. The open space is used intensely, as though it were another room. The walls of the house insulate it against the terrors of the street, but because it's open to the sky, you feel as though the space is endless.

Shalom Baranes was associate in charge for Arthur Cotton Moore Associates.Commercial/Industrial Construction Company was the contractor. Harold Schwartz was the mechanical engineer, Tadjer-Cohen, structural engineer.