Invariants and documentation for teams