The National Security Agency says it is thinking about going into the economic analysis business. Fair enough. The nation's premier spy and eavesdropping shop is a national treasure, possibly the most successful government research lab there is. It deserves to be kept together strictly on defensive grounds. You'd sooner disband, say, Bell Laboratories or Du Pont.

It was Henry Stimson, speaking between the two world wars, who disparaged the notion of international eavesdropping, arguing that ''gentlemen do not read each other's mail.''

But the NSA's inevitable turn toward monitoring economic instead of military competition raises a host of exceedingly important questions. For what should the spooks be searching? Who should serve as custodian of the secrets they uncover? And, most important, how should the highly sensitive news they gather be communicated to the leaders of American finance and industry?

Even in post-Watergate America, the NSA is still a carefully enough-cloaked secret that most people don't know it exists, and skilled investigative reporters still have difficulty penetrating its budget haze. (Reporter David Burnham has calculated that the agency had six times more employees than the FBI in the mid-1970s.) Its family tree includes a series of remarkable units dedicated to code-cracking, including the super-secret Black Chamber of the 1920s.

It was during the Cold War that the NSA became embedded at the very center of the military-industrial complex. Officially chartered in 1952 by Harry S. Truman (with a directive that still has never been made public), the agency was IBM's first big customer. At a certain point, as microwave transmission of telephone calls burgeoned, it began to go beyond code-breaking to electronic eavesdropping. And, as its stream of intercepted signals became broader and deeper, the specialty of the house became, more than ever, making much out of bits and pieces of information.

Today the NSA is the computer industry's single most sophisticated consumer. Parallel processing architectures, fast chips, novel software designed for sorting through masses of data -- all these roads lead to Fort George Meade in Maryland, 20 miles northeast of Washington.

There, in a gleaming new building protected by the most advanced security gear yet devised, dubbed the ''puzzle palace'' by writer James Bamford, the government's premier corps of analysts sifts the information it accumulates and passes along a generally superior product.

NSA eavesdropping has turned up Libyan terrorists, the Contra-gate money trail, the evaluations of Soviet leaders' doctors -- and leaders' evaluations of their mistresses. The NSA also occasionally has strayed into spying on American citizens suspected of having politically inappropriate views. It's even considered scoping the reading habits of borrowers at American technical lending libraries, looking for people who like reading sensitive books, before withdrawing the plan in the face of public outcry.

So what could a diversifying National Security Agency offer the American business community in a world of global competition? Well, the most obvious commission it could accept would be to keep an eye out for coordinated buying and selling offensives.

The Hunt Brothers' attempt to corner the market for silver, various massive Soviet purchases of American wheat, shenanigans in and around the oil market and attempts to tiptoe out before the October 1987 crash -- these are some of many stratagems designed to take advantage of markets' decentralized nature.

But all require a high degree of control and coordination to make them work. That is precisely the sort of message traffic the NSA excels at picking up and deciphering.

Still more interesting (and intricate) are the patterns of growth and development in particular industries that signal important new developments. Economic espionage already is big business on three continents. And it is only prudent for executives to wonder what Sony or Mitsubishi or Toshiba are working on for the next decade. The NSA turns up a certain amount of this material already.

But the kinds of information companies can't or don't get for themselves are, again, the sorts of secrets at which the NSA excels in piercing. Does the message traffic between a headquarters and a some remote laboratory betray a certain excitement in Geneva? Does the pattern of patents -- or the curious absence of them -- suggest something new in the German pharmaceutical industry? Are the Japanese suddenly buying high tensile-strength titanium picnic tables for their love of quality, or are their companies gearing up for a sudden push into airframes?

These are the secrets that, offered at intervals to American businessmen, might be exceedingly useful in keeping up with competitors who, there is every reason to believe, already are doing the same thing. Monitoring developments such as these, and preparing to meet them strategically, isn't industrial planning; it is simple common sense.

The occasional deep background briefing, in which government sources outline where they think vector machines or the gallium arsenide business is headed, would be fine. But in the wrong hands, information of the quality that the NSA turns up could be downright dangerous, enabling quick kills, self-dealing, mousetraps, favoritism, all the nightmares of the modern central banker, and more.

Who, then, do we want to handle this chore? The NSA's ''product'' now flows up through the Pentagon and eventually to the CIA, the National Security Council, the Treasury Department and, when necessary, the Federal Reserve Board. It is intended for the use of the president, who always can ignore or abuse the information.

But administrations change, while international competition amid technical change endures. Thinking down the road, what's needed here is an organization to keep track of America's place in international markets, an organization that should be ''at least as good as the {Federal Reserve},'' says Harvard economist Richard Zeckhauser, ''and perhaps as good as the Supreme Court.''

It should be geared to the highest levels of analysis and discourse, well above the stormy enthusiasms of the op-ed page, as insulated from politics as possible. There should be slow turnover. There should be lifetime tenure, as a means of insulating decision-makers from temptation.

Indeed, says Zeckhauser, the best example of what a good trade policy arm would look like might be the arms-control establishment of today. ''In arms control, Paul Nitze goes in young and comes out old and wise,'' says Zeckhauser. ''In contrast, any corporate chieftain or Republican bigwig seems qualified to be the U.S. trade representative for a year or two.''

But let's not kid ourselves. This is not a war. It is not as though we're battling for military dominion, nor is this even a quasi-military competition, such as the race to the moon.

The destination this time is what National Center for Manufacturing Excellence president Ed Miller calls ''six sigma,'' meaning a measure of quality that refers to 3.4 defects for every 1 million pieces turned out, a standard of quality so high that it still seems remote in Japan. This is the kind of rivalry that benefits us all, and if it takes a little supervision to keep it on an even footing, so be it.

David Warsh is a columnist for the Boston Globe.