Analysis of 51 cyclodipeptide synthases reveals the basis for substrate specificity.