This thesis proposes a process of providing mass-customized housing based on computer-aided design and production systems. It focuses on the design part, which mainly consists of an interactive system for the generation of design solutions based on a mathematical model called discursive grammar. A discursive grammar includes a shape grammar, a description grammar, and a set of heuristics. The shape grammar provides the rules of formal composition, whereas the description grammar describes the design from other relevant viewpoints. The set of heuristics is used to guide the generation of designs by comparing the description of the evolving design with the description of the desired house. The generation of a design proceeds first by producing a design brief from the user-prompted requirements and then by finding a solution that satisfies this brief. Search is largely deterministic, which decreases the amount of time required to find a solution, thereby making it reasonable to develop Web-based implementations. The proposed model enables an enduring designer's dream, that of the mass customization of housing. The model is illustrated with a case study that includes a shape grammar developed for the houses designed by the architect Alvaro Siza at Malagueira, a description grammar based on the Portuguese housing regulations, and a set of heuristics inferred after a set of experiments. In these experiments, designers were asked to generate houses based on the Malagueira grammar for specific clients. It is argued that this discursive grammar provides a rigorous method for understanding and teaching Siza's design process and that similar grammars could be developed for other styles. A Web page for explaining the grammar and generating new designs on-line was developed as a prototype.