Is it possible to add hidden buildings in a settlement? If so, how?

And also how can I make a trait a requirement for the recruitment of a certain unit? (e.g. unit A is only trainable if governor has trait X)

Thanks