Due to a growing number of regulations and standards, building performance becomes equally important as traditional design drivers. Therefore, it is necessary to quickly explore design alternatives that meet these performance requirements. To support this complex design task, a rule-based design system is proposed that is founded on a shape grammar. This paper describes a graph-based implementation of this shape grammar that allows subshape detection, parametric rules and attributed shapes. The implementation described in this paper forms the basis to further investigate to what extent rule-based design systems can support a generative approach towards performance-based design.