Corazon Aquino, asserting her new authority as president of the Philippines, overruled the military today and ordered that leaders of the country's outlawed Communist Party be included in a program to release political prisoners.

Her defense minister, Juan Ponce Enrile, said the order would be carried out but noted that officers had recommended against freeing Communist leaders. The military leadership is concerned that the release of Communist militants will hamper efforts to suppress a rapidly growing insurgency in the countryside.

The mood in Manila was festive today as thousands of Aquino supporters held a lunchtime parade and the value of the Philippine peso continued to rise.

Outside the Supreme Court, however, about 50 pro-Aquino demonstrators stood vigil demanding the resignations of the 12 justices, most of whom were appointed by Marcos.

Under the 1972 constitution, they were appointed to life terms. But Aquino has said that they and all other appointed officials should offer to quit to let her make appointments reflecting the change in government.

It was unclear whether Aquino's government had organized the vigil. But it suggested that when the government has a need, it will continue to use "people's power," as the street actions that overcame Marcos' tanks and troops this week are being called.

Today's demonstrations have led some members of her government to debate whether it is a revolutionary or a constitutional one. Some say the 1972 constitution was never ratified and is therefore invalid.

Presidential spokesman Rene Saguisag said today that he favors the view of constitutional rule. But he said of the Supreme Court justices: "I think we have the goods on many of these people. We can tell them resign or we'll throw the book at you."

The government also was reported to have taken over the National Intelligence and Security Authority this evening. The agency is the Philippines' version of the CIA and long has been accused by the opposition of being involved in suppression of dissent.

Aquino's ability to maintain good relations with the Philippine military, which helped put her in power with a revolt against former president Ferdinand Marcos, will be a key factor in the new government's success, according to analysts here.

Aquino had promised during her presidential campaign to free everyone jailed on political charges by Marcos, including Communists. But a case-by-case system set up Tuesday led to concern among human rights groups that the releases would be slow and their scope limited by the military.

Saguisag said today's order was issued in light of perceptions that Aquino was "magnanimous in victory with Marcos but has been a stickler when it comes to the political detainees."

Yesterday, she ordered released 39 prisoners whose cases had been reviewed by a joint military-civilian board she established. Saguisag said today that it is hoped that her new directive will have all the prisoners freed within a few days. The military says 450 persons are being held on political charges in the Philippines, but human rights groups say the figure is higher than 600.

Among the more prominent prisoners being held are Jose Maria Sison, a founder and first chairman of the Communist Party of the Philippines, and Bernabe Buscayno, the alleged head of the New People's Army, the armed wing of the party. Saguisag confirmed today that Aquino intends to release them.

Military leaders have said they will respect all orders from Aquino, who earlier this week moved quickly to form a Cabinet and show that she is the one who wields power.

In another development, the government mounted a hunt today for generals loyal to Marcos, as a published report said they were regrouping in the north in a bid to regain power, Reuter reported.

[Malaya, an anti-Marcos newspaper, quoting intelligence reports, said in a special midday edition that many of the generals and other key officials were regrouping in Marcos' home province of Ilocos Norte in northern Luzon to mount a counterattack on Aquino forces.]

Aquino spokesman Saguisag said Gen. Tomas Dumpit, who had been reported to be regrouping with Marcos loyalists, has been put under house arrest in Baguio, north of Manila.

The new government also ordered the furloughing of more than half the staff of the Film Foundation of the Philippines, a project of Marcos' wife Imelda that the opposition has assailed as a waste of government money.

The Aquino government was on the receiving end of people's power when several hundred people demonstrated outside the office building that she is using as a temporary headquarters to protest her retention of Marcos appointee Jose B. Fernandez as governor of the Central Bank. The demonstrators said they were former employes of banks that Fernandez closed after he became governor.

Meanwhile, U.S. special envoy Philip C. Habib met with Enrile and armed forces chief of staff Gen. Fidel Ramos. Enrile was quoted as saying afterward that Habib promised U.S. aid.

Former senator and acting foreign minister Raul Manglapus returned to the Philippines today from 13 1/2 years of exile in the United States. He had been charged with arson, attempted murder and subversion after Marcos declared martial law in 1972.

After a meeting with Aquino today, whom he called "a new goddess of democracy," Manglapus said that he did not foresee a Cabinet job but that he would work to strengthen the Philippines by helping to bring in technology, personnel and investment from the United States.

The new justice minister, Neptali Gonzales, said the government already has begun efforts to recover huge sums of money sent abroad by Filipinos during Marcos' rule. He said the government already had ordered the freezing of a bank account holding about $1.7 million that belonged to a man associated with Marcos.