Is this structure familiar for you?
It consists of
- a category $C$
- a set $M$
- a function ``$\operatorname{arity}$'' defined on $M$
- a function $\operatorname{Obj}_m$ defined for every $m \in M$, such that $\operatorname{dom} \operatorname{Obj}_m = \operatorname{arity} m$
- a function (star composition) $\left( m ; f \right) \mapsto \operatorname{StarComp} \left( m ; f \right)$ defined for $m \in M$ and $f$ being an $(\operatorname{arity} m)$-indexed family of morphisms of $C$ such that $\forall i \in \operatorname{arity} m : \operatorname{Src} f_i = \operatorname{Obj}_m i$ ($\operatorname{Src} f_i$ is the source object of the morphism $f_i$) and $\operatorname{arity}\operatorname{StarComp} \left( m ; f \right) =\operatorname{arity}m$.
such that it holds:
- $\operatorname{StarComp} \left( m ; f \right) \in M$
- (associativiy law) \[ \operatorname{StarComp} \left( \operatorname{StarComp} \left( m ; f \right) ; g \right) = \operatorname{StarComp} \left( m ; \lambda i \in \operatorname{arity} m : g_i \circ f_i \right) \]
(Here by definition $\lambda x \in D : F \left( x \right) = \left\{ \left( x ; F \left( x \right) \right) \hspace{0.5em} | \hspace{0.5em} x \in D \right\}$.)
The meaning of the set $M$ is an extension of $C$ having as morphisms things with arbitrary (possibly infinite) indexed set $\operatorname{Obj}_m$ of objects, not just two objects as morphims of $C$ have only source and destination).
We may also add the requirement that $\operatorname{StarComp} \left( m ; \lambda i \in \operatorname{arity}m : \operatorname{id}_{\operatorname{Obj}_m i} \right) = m$ (the law of composition with identity).