Rule or invariant?
An invariant cannot be broken. A rule can, and says so.
In short
Invariants keep the data meaningful: a unit cannot report to itself, a relationship cannot connect kinds of node it is not defined for. Rules express policy: they report, with a severity, and leave the decision to people.
Side by side
| Invariant | Rule | |
|---|---|---|
| When it fails | The change is refused | A violation is listed |
| Who sets it | The model | Owners and admins |
| Can be switched off | No | Yes |
| Example | No reporting cycles | At most seven direct reports |
How to tell them apart
- If breaking it would make the structure nonsense, it is an invariant.
- If a reasonable organization might choose to break it, it is a rule.
Example: Demo Logistics
Moving the headquarters under one of its own regions is refused. The headquarters having eleven direct reports is allowed, and reported.