carries a list of input ports and a list of output ports; composing diagrams works by matching ports of compatible types. Ports have a small algebra of their own — they can be made dual (reversed in direction), tensored together with
, raised to a power, tagged with context-specific annotations, and tested with predicates. This guide collects the operations that build and transform ports independently of the diagrams they appear in.