Houses have a 1-square buffer zone at their sides, which means two squares is the minimum distance two houses can have next to each other. In my town, Deirdre and Yuka planted their houses directly next to each other two squares apart, as did Bruce and Skye. ^^
I've been in dream towns were I guess people were plot resetting, because I've seen them in straight lines only 2 spaces apart, so I would say 2 spaces is the closest they can be to each other.