directive generation