Substrate Launch and Modulation Model
This page explains the architecture choices behind substrate launch and modulation.
The core model
Section titled “The core model”A caller invokes a generic launcher once with SubstrateDomain. The launcher selects adapter mechanics, invokes launch(domain), and the runtime delegates modulator assembly to a mediated broadcast flow where RAS signals through Neuromodulators and synthesizers self-select internally.
Implementation invariant: any specific relay involved in this flow is a wrapper over its own NeuralRelay instance. The wrapper defines boundary-facing APIs, while the underlying NeuralRelay performs transport and routing.
The core runtime shape is:
- The launcher resolves the launch target and dispatches into the package boundary.
RASsends a single modulator signal toNeuromodulatorsfor one concrete modulator.Neuromodulatorsbroadcasts aSynthesisTaskto all registered synthesizers.- The first eligible synthesizer creates the
Modulatorinstance and stores it inNeuromodulators. - Silent or late synthesizers are ignored, and the broker returns only the winning result.
Neuromodulatorsemits a singleModulatorSuccessorModulatorFailurecarrying theartifact-refor failure metadata.RASresolves theartifact-reffromNeuromodulators, receives the result through a terminal registered toNeuralRelay, and injects it into theModulatorCocktail.- The concrete
*Substrateconfigures itself from the updated cocktail after the transmission arrives through the substrate terminal.
Why separate launcher, adapter, and RAS orchestration
Section titled “Why separate launcher, adapter, and RAS orchestration”Launcher
Section titled “Launcher”Policy boundary:
- Choose dispatch strategy from domain launch metadata.
- Enforce launch output contract.
Adapter
Section titled “Adapter”Transport boundary:
- Import module path.
- Resolve symbol name.
- Invoke launch(domain).
RAS plus Neuromodulators plus synthesizers
Section titled “RAS plus Neuromodulators plus synthesizers”Modulation boundary:
- Broadcast a single substrate need as a modulator request.
- Let
Neuromodulatorsfan out that signal asSynthesisTaskmessages to synthesizers. - Let the synthesizers self-select whether they can satisfy the task.
- Accept the first valid success or fail on timeout/no-match.
- Resolve the returned
artifact-reffromNeuromodulators, receive the result through a terminal registered toNeuralRelay, and inject it into the cocktail. - Hand the updated cocktail to the substrate runtime after the transmission arrives through the substrate terminal.
This separation keeps policy, mechanics, and construction independent.
Why broadcast orchestration
Section titled “Why broadcast orchestration”Mediated broadcast orchestration moves substrate construction responsibility into the biological control plane rather than centralizing it in an engineered call chain.
This gives predictable composition while staying closer to the domain metaphor:
RASdoes not need to know which Synthesizer owns which modulator or how fanout is executed.- Each Synthesizer can independently decide whether it can satisfy a request.
Neuromodulatorsaccepts the first successful synthesis result and ignores silent or late replies on the relay channel.- New modulators can be added by registering new Synthesizers rather than editing central assembly code.
- The same mechanism works both at launch time and during runtime updates.
Laminae define the inheritance structure inside a substrate. The assembly seam sits at RAS, Neuromodulators, and the synthesizers, not in a central assembly chain.
For a CliSensoryCortexSubstrate-style runtime, the conceptual layering is still:
- BaseLamina
- AgenticLamina
- CortexLamina
- SensoryMotorCortexLamina
- SensoryCortexLamina
Those laminae define structure. RAS, Neuromodulators, and the synthesizers now determine which modulators are injected into that structure.
Neuromodulators is both the messaging boundary and registry space where synthesized modulators live between production and injection.
Runtime vs construction contracts
Section titled “Runtime vs construction contracts”The substrate runtime contract is intentionally narrow:
- lifecycle state
- health and readiness
- runtime handle identity
Modulation and assembly mechanics are intentionally outside runtime contracts and handled by RAS, Neuromodulators, synthesizers, and the launch boundary.
Lifecycle and identity invariants
Section titled “Lifecycle and identity invariants”Core invariants:
- instance_id is created once per launched runtime.
- definition_id remains stable through layers.
- shutdown transitions runtime to stopped state.
- readiness depends on healthy plus ready lifecycle state.
Launch flow in one diagram
Section titled “Launch flow in one diagram”sequenceDiagram
participant Caller
participant L as Generic Launcher
participant A as Adapter
participant P as package launch(domain)
participant R as RAS
participant M as Neuromodulators
participant N as Registered synthesizers
participant S as Substrate
Caller->>L: launch(domain)
L->>A: resolve and dispatch
A->>P: import and invoke
P->>R: request modulators for substrate
R->>M: ModulatorRequest
M->>N: fanout ModulatorRequest
N->>M: add(modulator)
M-->>R: ModulatorSuccess(artifact-ref)
R->>M: get(artifact-ref)
R->>S: inject ModulatorCocktail
S-->>P: configured runtime
P-->>A: runtime
A-->>L: runtime
L-->>Caller: runtime
Tradeoffs
Section titled “Tradeoffs”Chosen tradeoffs:
- More classes and wiring in exchange for explicit boundaries.
- Broadcast request handling in exchange for easier extension and runtime updates.
- Thin launch wrappers in exchange for stable call semantics.
Rejected alternatives:
- Putting modulation logic inside adapters.
- Keeping a generic assembly concept as the assembly surface.
- Hard-coding Synthesizer-specific knowledge into
RAS.
Relationship to contracts packages
Section titled “Relationship to contracts packages”Current boundary:
- cerebel-substrate-core defines substrate launch and runtime primitives.
- cerebel-contracts defines higher-level domain bundle models and specializations (cortex/comms/agent config).
This keeps substrate lifecycle concerns stable while allowing launch and modulation vocabulary to evolve around the RAS plus Neuromodulators plus synthesizer model.