10x8 Shed by a stone wall?

I want to build a shed by a stone wall on my property, bit the stone wall is a retaining wall in a sense. The ground drops down 3 feet or so at the stone wall.

Is there / what is the minimum distance I should keep away from the stone wall?
3 answers 3