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 look ahead at the forecast for the Border region.
Parents across Cumbria claim the tests put too much pressure on children at an early age and primary school should be more fun
Campaigners fighting for the release of six British ex-soldiers jailed in India on weapons charges are staging a rally in Carlisle