Add spec generator for policies.

Add test hook.

Remove old spec template.