The individual railway companies issued their own Rule Books, but many of them were based on a fairly standardised book of rules that had been developed by the railways through the Railway Clearing House (RCH). the RCH, besides sorting out the necessary money transfers between companies, also acted as a means of encouraging standardisation. This process started back in the 1840s, soon after the RCH was established. But it was the later Victorian period, 1876 onwards, that the RCH published various editions of a standardised Rule Book.
I've no idea about 'working to rule' - Trade unions for railway staff did not get much of a foot-hold until the end of the 19th century or even up until the Grouping in 1923 in some cases.