For almost eight years, it was Idi Amin's chamber of horros. And as we approached the headquarters of his secret police today, we saw a dozen or so corpses-including the body of a boy not more than 12-lying next to one of the drain gutters, covered with flies.

It was in this bloodstained gutter, according to Ugandans, that prisoners were killed after being forced to lie down in the drain so their blood would not stain the premises. The next victim was forced to carry the previous corpse to the pile at the side of the building, then climb into the gutter himself.

These latest victims were executed Wednesday, shortly before Tanzanian and Ugandan exile forces reached the State Research Bureau, as the murderous political police headquarters was called.

When Tanzanian troops broke into the subterranean dugeons of the compound, Tanzanian officials said today, they found six prisoners still alive. The six had been without any food for several weeks, these officials said, and had survived by eating human flesh.

As we entered the dungeons today, we saw scenes of incredible horror-bodies in varying states of decay and mutilation, almost all showing signs of torture.

There were pools of blood on the steps, and blood was smeared on the walls. The stench from the decaying bodies was so overpowering that relatives looking for the dead and missing did not want to ignite their lanterns for fear of an explosion.

During Amin's reign of terror, thousands of Ugandans were brought to this L-shaped building beneath the dictators's luxurious residence atop Nakasero Hill. Most were never seen again. It is widely believed here that the two structures-the police headquarters and the presidential lodge-are connected by an underground tunnel.

The tunnel, some sources contend, permitted Amin to dispose easily of persons executed in his residence.

Today, relatives came to Nakasero Hill to search desperately through files scattered in the compound's parking lot, hunting for clues about the dead and missing.

The files contained the identity cards of Ugandans killed by the burreauhs agents, who wore brightly colored shirst and dark glasses and were reputed to be the most notorious killers among Amin's armed men.

We talked to relatives of Dan Kakonge, an exploye of Uganda Transport Corp., who was brought here on March 22 by bureau agents. Nobody kenw why he was arrested.But in the rubble of papers strewn around the parking lot, a relative found Kakonge's income tax statement. This was taken to mean that the bureau had a file on him, and that he was dead.

The new government has freed 4,000 from Kampala's prisons, which also reportedly contained torture chambers and execution cells where persons were hacked to death or had their skulls smashed with sledge hammers.

But the State Research Bureau headquarters and its underground dungeons were reserved for the more important victims.

After breaking through the door of one cell today, we saw relatives search through the corpses for recognition.

It was impossible to break through the door of a larger cell, which reportedly stretched for more than 100 yards and opens on the other end to a main state lodge.

Since the large cell is believed to contain hundreds of corpses, relatives have been urging the new government to blast the door opern. But this could not be done since the ground floor of the four-story building is an arsenal containing ammunition, weapons and plastic explosives.

The corpses that we saw today were mostly naked from the waist down, suggesting that one of the favorite torture methods of Amin agents involved muiltation of sex organs.

According to a diplomat who lives in the proximity of the compound. Amin's final days in power appeared to have ended with an outburst of killings.

The diplomat, who asked to remain anonymous, said that he could hear almost continuous gunshots echoing from the compound accompanied by the steady roar of trucks moving back and forth.

He said that two days before the fall of Kampala, he saw a bluish smoke rising from the compound which suggested, he said, that Amin's men were burning documents.

We went to upper floors of the building, which contained thousands of files on Ugandan civil servants, assessing their loyalty to Amin.

Other files contained names of informanats in various government departments and in private businesses.

One file revealed that eight bureau agents had at their disposal a weekly allowance of 480,000 Uganda shillings, or about $70,000, for buying information from Ugandans and maintaining a network of informers.

It will take some time before the full extent of Amin's terror can be assesed and documented. Estimates of the number of Ugandan's murdered during Amin's rule range up to 300,000.