This is what foreign spies see when they read President Trump's tweets

Trump’s Twitter feed is a gold mine for every foreign intelligence agency. PHOTO: ROB DOBI FOR THE WASHINGTON POST

WASHINGTON (THE WASHINGTON POST) - Every time President Donald Trump tweets, journalists and Twitter followers attempt to analyze what he means. Intelligence agencies around the world do, too: They're trying to determine what vulnerabilities the president of the United States may have. And he's giving them a lot to work with.

Trump's Twitter feed is a gold mine for every foreign intelligence agency. Usually, intelligence officers' efforts to collect information on world leaders are methodical, painstaking and often covert. CIA operatives have risked their lives to learn about foreign leaders so the United States could devise strategies to counter our adversaries. With Trump, though, secret operations are not necessary to understand what's on his mind: The president's unfiltered thoughts are available night and day, broadcast to his 32.7 million Twitter followers immediately and without much obvious mediation by diplomats, strategists or handlers.

Intelligence agencies try to answer these main questions when looking at a rival head of state: Who is he as a person? What type of leader is he? How does that compare to what he strives to be or presents himself as? What can we expect from him? And how can we use this insight to our advantage?

At the CIA, I tracked and analyzed terrorists and other US enemies, including North Korea. But we never had such a rich source of raw intelligence about a world leader, and we certainly never had the opportunity that our adversaries (and our allies) have now - to get a real-time glimpse of a major world leader's preoccupations, personality quirks and habits of mind. If we had, it would have given us significant advantages in our dealings with them.

Trump's tweets offer plenty of material for analysis. His frequent strong statements in reaction to news coverage or events make it appear as if he lacks impulse control. In building a profile of Trump, an analyst would offer suggestions on how foreign nations could instigate stress or deescalate situations, depending on what type of influence they may want to have over the president. For instance, after former FBI director James B. Comey testified about his conversations with Trump, the president was silent on social media - until sending this at 6:10 am the next day:

Virtually every other world leader - and certainly every past US president - would have had his press office deal with getting his feelings about the testimony out. Indeed, the official @POTUS Twitter account, controlled by aides, mostly posts what a reader would expect from a head of state (though it does occasionally retweet Trump's personal account). Trump's own @realDonaldTrump account, however, is much more impulsive.

While Trump was new to national politics when he started his presidential campaign in 2015, he wasn't new to Twitter. A review of his old tweets would reveal how well flattery can work to get his attention and admiration.

If I were an intelligence analyst for Saudi Arabia, for instance, I might suggest that the authoritarian government there should compel newspapers to write articles friendly to Trump (and, in fact, Saudi papers published articles praising first lady Melania Trump's fashion choices during the president's visit there last month). And I would certainly suggest that Saudi officials flatter him in person - perhaps arranging, as the Saudis did during his visit, to post billboards featuring Trump's words and his image.

As president, Trump has continued to show himself to be quick to anger if he feels personally attacked. And he's eager to take credit when he thinks he's been influential. His tweet this month appearing to welcome the rift between Saudi Arabia and Qatar is a classic example: Trump declared that the standoff arose because he had demanded that gulf states stop funding radical ideology. (It did not.) Trump's tweets also clearly reveal how sensitive he is about the investigation into Russia's involvement in last year's campaign, especially any suggestion that it diminishes his victory.

An adversary could devise a plan to exploit that sensitivity: To appeal to Trump personally, they would intentionally disparage the investigators and the investigation. Russian officials and leaders have been doing this consistently - though, of course, that also lines up with their interests more broadly. Russian President Vladimir Putin (a former intelligence chief and longtime spy) has been mocking the investigation since it got started and even sarcastically offered Comey political asylum this month.

What Trump doesn't say can be very revealing, too. For instance, the lapse of time between when the USS Fitzgerald collided with a cargo ship off the coast of Japan (12:30 pm on June 16, in Washington) and when the president tweeted about the incident (10:08 a.m. the next day) was nearly 23 hours. The tragedy marked the US Navy's most significant loss of life aboard a vessel since terrorists bombed the USS Cole in Yemen in 2000.

Typically, a president would quickly make public remarks about a significant military loss. With Trump, intelligence analysts would note the inconsistency compared with previous administrations and search for similar patterns. Is Trump so hands-off that he waited for his secretary of defense to speak? Did something else capture his attention during those hours that he found to be a higher priority? Between the crash and his first public statement about it, Trump tweeted a video of his remarks on a new Cuba policy, a picture of himself signing the Cuba memorandum and a reference to his campaign promise about Cuba; he also retweeted Sean Hannity, a Fox News personality, promoting an upcoming show on the "Deep State's allies in the media" working to undermine Trump.

Of course, it can sometimes be useful for the safety and security of the United States when the president telegraphs his foreign policy vision. That gives allies and adversaries alike a clear sense of what to expect from an administration.

In Trump's case, though, his Twitter feed doesn't serve quite that role. The president's frequent contradiction of his own aides also provides useful intelligence for foreign analysts. Last month, Trump tweeted that it was "not possible" for administration officials to be perfectly accurate in describing what his White House is doing. Why not? Is the White House not coordinating messaging? Has Trump defined his own course of action, regardless of what his Cabinet or staff has been told? Policy and public diplomacy typically require interagency coordination, but Trump forces the US government to react to his whims instead - which makes his Twitter feed that much more important to analyze and understand.

Analysts can glean information about Trump's sleep patterns from the time of day or night when he tweets, showing which topics keep him up, his stress level and his state of mind. Twitter also often reveals what Trump is watching on TV and when, as well as what websites he turns to for news and analysis. Knowing this can be useful for foreign governments when they are planning media events or deciding where to try to seek coverage of their version of world events.

Even deleted tweets would be of interest. Trump mostly appears to delete tweets because of spelling errors, later replacing them with a correction. For an intelligence analyst, this would confirm that Trump's Twitter feed really is a raw insight into his thought process, without much input from aides.

Analysts would also be likely to use technology to perform content analysis on the president's tweets in the aggregate. Intelligence agencies can employ a more robust version than the open-source projects that news organizations have used, because they can marry Trump's tweets with information they collect through intercepts and other means. Software could look for patterns in speech or word categories representing confidence related to policy, whether Trump is considering opposing points of view and if he harbors uncertainty toward any subject. Computers can perform metadata analysis to build timelines and compare Trump's Twitter feed with his known public schedule, creating a database of when and where he tweets and what else he's doing at the time. Anything that provides a digital footprint adds context to the analysis.

Trump says it's the press's fault that he uses Twitter as much as he does. His aides clearly want him to stop, but the president just as clearly wants and needs to be heard unfiltered. Fortunately for him, the platform lets him speak directly to his supporters whenever he chooses. Unfortunately for the rest of us, they aren't the only ones listening.

Join ST's Telegram channel and get the latest breaking news delivered to you.