Scottish Water was carrying out the works at Philiphaugh on the outskirts of Selkirk whilst laying new pipes between Howden and Yarrowford.
A Scottish Borders Council's archaeologist said:
"It is an exciting discovery. It is not every day that medieval villages are found - most of them are known, this one was completely unknown."
More top news
A decent weekend. Chilly nights but mainly dry days with sunny spells
The weekend looks promising for most of the region.
More than one in four children starting school in Cumbria have excess weight and obesity, according to Cumbria's Director of Public Health.