The SAM (State-Action-Model) pattern proposed by Jean-Jacques Dubray is explained at sam.js.org
The advance to Jean-Jacques Dubray's SAM pattern presented here is the added notion of cascading the SAM complexes such that they can have a parent/child relationship.
A complete description of the package's capabilities can be found at SAMCAS - Implementation
- Complete source code for the package plus working examples