Jim Clunie got his first managerial job with St. Mirren in the top flight, as did Ricky McFarlane. Alex Miller had 2 months managerial experience with Morton when he got the St. Mirren job in the top flight. Although not in the top flight, Gus Macpherson's first managerial job was with St. Mirren.
There are plenty of examples of other managers getting their first job in the top flight in Scotland, off the top of my head, Graeme Souness, Walter Smith, Ally McCoist, Neil Lennon, Billy Davies, Tony Mowbray, Martin Canning, Neil McCann, etc, etc...