  The Kappa biochemistry and the M{\O}D organo-chemistry frameworks are amongst
the most intensely developed applications of rewriting theoretical methods in
the life sciences to date. A typical feature of these types of rewriting
theories is the necessity to implement certain structural constraints on the
objects to be rewritten (a protein is empirically found to have a certain
signature of sites, a carbon atom can form at most four bonds, ...). In this
paper, we contribute to the theoretical foundations of these types of rewriting
theory a number of conceptual and technical developments that permit to
implement a universal theory of continuous-time Markov chains (CTMCs) for
stochastic rewriting systems. Our core mathematical concepts are a novel rule
algebra construction for the relevant setting of rewriting rules with
conditions, both in Double- and in Sesqui-Pushout semantics, augmented by a
suitable stochastic mechanics formalism extension that permits to derive
dynamical evolution equations for pattern-counting statistics.
