One night last summer, the members of Jimmy Carter's Cabinet assembled at Walter Mondale's house to discuss the upcoming campaign and the part they might play in it. As the talk went around the room, one observer recalls, the air grew thick with mutual assurances that administration had a record of solid achievement that only needed to be told in order to ensure the president's re-election.

"And then," he said, "they got to Moon and Neil and it all hit the fan."

Moon Landrieu, the secretary of housing and urban development, and Neil Goldschmidt, the secretary of transportation, let their colleagues and the president's political managers who were present have it, accusing the Carterites of unwarranted complacency and neglect of political allies. The results of the election proved them all too right.

Landrieu, now 50, had just left his job as mayor of New Orleans, and Goldschmidt, now 40, was serving as mayor of Portland, Ore., when Carter summoned them to Washington as part of his summer 1979 shakeup. As newcomers to the administration and elective officials in a Cabinet of technocrats, they quickly constituted themselves as the heart of what Goldschmidt once incautiously called "the political wing" of the administration.

As they left town last week, headed home, the two former mayors were carrying a message about what they think needs to be done to prevent the repudiation of their administration turning into the long-term decline of the Democratic Party.

Landrieu is the more hopeful of the two about a quick recovery, in part because his own plans for the future include a run for the 1984 presidential nomination. Already, the list of Democratic aspirants is a long one -- with Mondale at the top. But Landrieu figures that as a southerner, a Roman Catholic and a man with many friends in city halls across the country, he has at least three things going for him in such a contest.

He also believes that the 1980 defeat was less a rejection of Democractic principles and programs than a lethal combination of inflation, international reverses and a less-than-well-loved candidate. "Given a different candidate, a different time and different international circumstances," he said, "I think the Democrats can win. Most of the people who voted for Ronald Reagan are not permanently disenchanted with the Democratic Party.

As for Goldschmidt, he left driving his young family home to Portland without a fixed political timetable for himself. He once said, not quite kidding, that he might begin his comeback by running for the Portland school board. But friends say the Oregon governorship, now held by Republican Vic Atiyeh, may look more tempting in 1982.

What Goldschmidt will tell anybody is that, aside from the factors mentioned by Landrieu, what was fatal to the Carter administration was the habit of shooting its own political allies in the foot. And that habit, he says, is one the Democrats must overcome if they are to recover as a party.

"We have spent more and more of our political energy satisfying the people on the outer edges of our constituency," he said, "and the Republicans moved in on what used to be the center of our party.

"We lost sight of the fact that what really united the Roosevelt coalition was the commitment to providing people opportunities for productive work. We let the equity side of our platform -- the transfer payments and entitlements -- run away with the idea that we really believe in productive work.

"We added up all the programs and benefits we passed, but we didn't measure our record as a government by the cumulative impact of our policies on the people who are working." Goldschmidt said. "We let ourselves become a nation that sells food and raw materials abroad but cannot compete in world markets with too many of its manufactured goods.

"And the Republicans were smart enough to see that they could move in on the ground we abandoned, with policies that promised more opportunity for work."

Goldschmidt said he is skeptical of many of the Republicans answers -- particularly those that assume the United States can simply produce its way out of the energy crisis.

Both the economic and environmental costs of that policy, he said, are likely to prove much higher than most people will willingly accept. Reagan's lack of "a conservation ethic" may be his Achilles' heel, Goldschmidt said.

As the Democrats disperse, it is far from certain that New Orleans and Portland will be centers of the opposition party's revival. But Landrieu's ambitions and Goldschmidt's analyses may be two of the healthiest legacies of the Carter years.