Book by John Brunner, first published in 1971 (Ace). The book opens with the words "He had many names, but one nature, and this unique nature made him subject to certain laws not binding upon ordinary persons. In a compensatory fashion, he was also free from certain other laws more commonly in force." He is the traveler who wears a black cloak and carries a staff made of light. His occupation is to walk through his domain periodically, when certain planets acheive a conjunction, and nudge the Universe away from Chaos.
This book is now out of print, but it is excellent and well worth obtaining. It is a fantasy that is also deeply thought-provoking. As ages pass, the traveler sees the inhabitants of his domain evolve from primitive, magic-worshipping, dark-fearing peoples surrounded by elementals and other spirits to a well-ordered, practical and logical civilization. During his inspection, the traveler converses with various people and spirits to find out how things are progressing. Part of his duty is to grant the wishes of those he meets, and many people wish foolishly, with unfortunate outcomes.
Brunner also published The Compleat Traveler in Black in 1986 (Bluejay), which contains one additional chapter. Most of the chapters appeared separately as short stories in various science fiction and fantasy magazines in the 1960s and 1970s:
Imprint of Chaos Science-Fantasy #42 1960
Break the Door of Hell Impulse April 1966
The Wager Lost by Winning Fantastic April 1970
Dread Empire The Traveler in Black 1971
The Things That Are Gods Asimov's SF Adventure Magazine Fall 1979