Christopher Alexander wrote a lot of books with rules for building. He also said in one of his talks that he could imagine software that could generate a building (or the basic form) with the rules as constraints but with user input for the details.
I believe that would be great to have. And this post looks very promising that such software is possible.