The secret directive, signed in September by Gen. David H. Petraeus, authorizes the sending of American Special Operations troops to both friendly and hostile nations in the Middle East, Central Asia and the Horn of Africa to gather intelligence and build ties with local forces. Officials said the order also permits reconnaissance that could pave the way for possible military strikes in Iran if tensions over its nuclear ambitions escalate.