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
Frosty on Sunday night with showers on Monday, some wintry. Breezy in the west. Unsettled, changeable, cool new week
Emma Jesson brings you Saturday night's forecast
Becoming dry and bright on Saturday, turning colder. Wintry showers possible on Sunday and Monday