Jimmy Carter's stiffened spine in his final days in office has produced secret agreement for a strike by stevedores and port workers against Soviet shipping that would immobilize a formidable portion of Moscow's vast merchant fleet, should the Kremlin intervene in Poland.

This countermove has been planned by the Carter administration with the enthusiastic cooperation of AFL-CIO President Lane Kirkland and other free-world trade union leaders. Western European states and Japan quietly approved it early this month. It is part of a range of retaliatory measures, including possible sales of "lethal" arms to Communist China.

All this is in dramatic contrast to U.S. inactivity during the 1968 Soviet intervention into Czechoslovakia and last year's even more arrogant Soviet invasion of Afghanistan. A major difference is the attitude of President Carter in his lame duck phase.

The Carter administration informed President-elect Reagan, who liked what he heard. Otherwise, the precise measures planned are a closely held secret here and in European capitals, often fearful about affronting Moscow. But based on; our conversations in West Germany and here, this is the sequence of events:

Carter and national security adviser Zbigniew Brzezinski agreed that failure of public warnings to Moscow preceding the Czech and Afghan invasions probably misled the Kremlin. On the evening of Dec. 6, following a White House meeting on the massing of Soviet and Warsaw Pact troops, Brzezinski telephoned Carter at Camp David. A Soviet invasion of Poland appeared possible at any hour, he said. Should a warning be sounded?

What followed was a reversal of past performances by the president, showing some overdue American backbone. Carter reacted instantly: have a statement ready early on the morning of Dec. 7 that "very adverse consequences" will follow invasion. That statement was issued when Carter returned from Camp David.

The intelligence justification for what Carter then viewed as probable Soviet invasion: 27 Soviet and Warsaw Pact division poised on four. separate fronts along Poland's borders; between Brest Litovsk and Vladimir Volynskiy to the East; near Kaliningrad on the North, for quick movement to restive Polish shipyards of Gdansk and Gdynia; on Poland's southern border with Czechoslovakia; in East Germany.

Minute details about this immense invasion force, which is still intact today, are well known in Western capitals. The Russians have accumulated hundreds of medical tents in the Brest Litovsk area for rapid movement into Warsaw. Huge fuel and ammunition depots have been deployed around the entire perimeter of Poland. Soviet airbone units remain on full alert.

In short, Poland was on Dec. 7 and remains today in the cross hair of Soviet sights. So was Czechoslovakia for three full weeks before its 1968 rape and Afghanistan for days before the 1979 invasion. The difference this time is in Washington.

In reaching this time for brass knuckles and not the creampuff on an Olympics boycott, Carter made this decision: allies of the United States would first be invited to participate, but if they held back, they must be strongly challenged to participate.

The response was favorable. West Germany, Washington's most important but increasingly reluctant European ally, was surprisingly obliging, thought it flinched at "lethal" weaponry for Peking. However, that idea was fully endorsed by one unnamed NATO ally -- probably Great Britain.

At the same time, the West reassured the Kremlin that it intends no change in what one allied official called "the reality of post-World War II international and geographic conditions." Poland remains in the Soviet orbit, as far as the West is concerned.

Other Carter demands on U.S. allies for Western retaliation have been previously revealed: a total break of commercial, trade and technological links to the Soviet empire; an immediate increase in arms spending; comprehensive sanctions to the extent possible.

All these plans remain in place, as does the Soviet threat. Nobody knows whether this will deter Soviet intervention of some kind, if not open invasion. But Jimmy Carter deserves the highest marks for the weekend of Dec. 6-7. His public warning to the Kremlin may have stayed the Soviet hand, giving him the spurs as a lane duck he did not earn in nearly four years.