Write rules and policy.
Merge pull request #101 from mzkrelx/feature/policy#96

Write rules and policy.