One would think that a sort of common sense should be employed where this is practical e.g. to allow safe room for unimpeded digging trenching and pipe laying etc., and if there are any problems with installation or testing of new construction also to minimize damages to either structure etc. However, if you must or have very good reason to get very close e.g. to buildings, I don’t know what should govern in your particular area/application -- however, I do know ANSI/AWWA C600-05, Installation of Ductile-Iron Water Mains and Their Appurtenances states,
“ 4.3.2.5 Rock conditions. When excavation of rock is necessary, all rock shall be removed to provide a clearance below and on each side of all pipe, valves, and
fittings of at least 6 in. (150 mm) for nominal pipe sizes 24 in. (610 mm) or smaller and 9 in. (230 mm) for nominal pipe sizes 30 in. (762 mm) and larger. When excavation is completed, a layer of appropriate backfill material (see Sec. 4.2.5) shall be placed on the bottom of the trench to the appropriate depths, then leveled and tamped.”
The above passage is immediately followed by,
“4.3.2.5.1 These clearances and bedding procedures shall also be observed for pieces of concrete or masonry and other debris or subterranean structures, such as masonry walls, piers, or foundations that may be encountered during excavation.”
Of course as previously inferred other considerations or authorities might supersede these requirements e.g. another section of this same standard states, “4.3.1.3 Clearance. When crossing existing pipelines or other structures, alignment and grade shall be adjusted as necessary, in accordance with the contract documents, to provide clearance as required by federal, state, or provincial, and local regulations or as deemed necessary to prevent future damage or contamination of either structure.”