Add TemplateBuilder.define and spec