How thoughtful of the Koreans to time their new surge toward democracy to our Fourth of July. Assuming it comes off, the Korean passage is happy proof of an article of American faith -- that our principles are applicable universally. This is the American secular religion. No president since Woodrow Wilson has believed so deeply in it as Ronald Reagan.

Still, eager as we are to bask in the glory of the Koreans' achievement, we need to come to terms with the startling unexpectedness of it all. Neither those who warned trouble was brewing nor those more sanguine figured it would come out this way.

The idea had taken wide hold that Korea was not ready for democracy. Yes, some said, democracy would be nice and in the American interest. But Korean society could not support an early transition. The generals were too rigid, wouldn't allow it. The politicians were divided and flaky. The students could be isolated.

On June 17, a week into the big demonstrations, Secretary of State George Shultz offered the typical view, describing Korea as a country without a real ''democratic tradition'' and as a place where a bent for political confrontation -- the condition always distinguished from the capacity for restraint and compromise deemed essential to build democracy -- was ''part of the Korean character.''

Jeane Kirkpatrick, in her justly famous article of 1979 on ''Dictatorships and Double Standards,'' had identified and devastated the liberal tendency to accept as right and natural left-trending Third World historical ''forces.'' She juxtaposed this tendency to a readiness to see unhinged Third World situations as ones in which humans could make political choices and affect the outcome. On June 17, Shultz was endorsing a way of looking at things that made a virtue of American reserve and that excused Washington from responsibility for any undemocratic result.

As the demonstrations progressed, however, the administration as a practical matter started reconsidering its assumptions. The inside story of American bumps and nudges remains to be told, but the visible signs indicate that the administration started tackling what Shultz calls the ''extremely tricky'' problem of managing a transition from an autocratic government to a more democratic one.

This was a gutsy thing for the president and Shultz to do. First there were the plain risks of ending up not with progress toward democracy but with destabilization in Seoul or with a North Korean security provocation. Then, the Carter failures in Iran and Nicaragua made the management of Third World transitions a permanently hot political issue, especially among American conservatives. Shultz is under steady fire from Reaganites to his right, including Kirkpatrick, for the excessive pragmatism they believe he has brought to Third World trouble spots.

The suggestions that Shultz made on June 17 -- that Korea is not prepared for the rigors of democracy and that there are prudent limits to American intervention -- had guided American policy not just in this administration but also in the time of all previous administrations. It is the bipartisan conventional wisdom, powerfully reinforced by awareness of Korea's exposed security position. That Koreans are now trying to move beyond it, furthermore, does not necessarily mean it was wrong.

Here is the crunch: it is very well -- brave, humanistic, patriotic, generous -- to say that everyone should enjoy the benefits of democracy, and it can be patronizing to say otherwise. But Reagan, when he is in his ideological mode, is one of the few of us who really believes it. Most of us believe, with Kirkpatrick, that there is such a limiting thing as a ''requisite political culture,'' a set of institutions, attitudes and habits needed to make democracy work.

Once you grant that, however, you must entertain the perilous question of which place has such a tolerant and encouraging culture and which does not. Our understanding is necessarily imprecise. One does not want to sell a given country short, but one does not want to take foolish risks, either.

What I am saying is that wise policy makers will be aware of ideology but will not get hung up on it. Rather, they will try to see things as they are and exercise good judgment. Perhaps that's what happened to American policy toward Korea