Context
Part of the cross-repo Substrate Engineering roadmap (proposal in weaver-spec).
ChainWeaver already models operators (tools), sequencing (FlowStep, depends_on), and a determinism taxonomy (FULL/PARTIAL/NONE). A DomainSubstrate declares which state transitions are admissible; ChainWeaver can validate flows against that.
Scope
Allow a Flow / DAGFlow to reference a DomainSubstrate. At compile/validate time, check that every step transition is admissible under the substrate's temporal-constraint + admissible-state facets. Surface violations as a ChainWeaverError subclass with step_index / detail.
Constraints
- Validation happens at build time, not in
executor.py. The three executor invariants (no LLM, no network I/O, no randomness) are untouched and non-negotiable.
- Keep
DeterminismLevel honesty — do not claim token-level determinism.
from __future__ import annotations, export new public symbols in __all__, all exceptions inherit from ChainWeaverError.
Acceptance criteria
Dependency / phase
Phase 3. Depends on the DomainSubstrate contract from dgenio/weaver-spec#167.
🤖 Generated with Claude Code
Context
Part of the cross-repo Substrate Engineering roadmap (proposal in weaver-spec).
ChainWeaver already models operators (tools), sequencing (
FlowStep,depends_on), and a determinism taxonomy (FULL/PARTIAL/NONE). ADomainSubstratedeclares which state transitions are admissible; ChainWeaver can validate flows against that.Scope
Allow a
Flow/DAGFlowto reference aDomainSubstrate. At compile/validate time, check that every step transition is admissible under the substrate's temporal-constraint + admissible-state facets. Surface violations as aChainWeaverErrorsubclass withstep_index/detail.Constraints
executor.py. The three executor invariants (no LLM, no network I/O, no randomness) are untouched and non-negotiable.DeterminismLevelhonesty — do not claim token-level determinism.from __future__ import annotations, export new public symbols in__all__, all exceptions inherit fromChainWeaverError.Acceptance criteria
Flow/DAGFlowmay reference a substrate; build-time admissibility check with a dedicated error type.ruff check,ruff format --check,mypy,pytestall pass.AGENTS.mdupdated if a public API or invariant surface changes.Dependency / phase
Phase 3. Depends on the
DomainSubstratecontract from dgenio/weaver-spec#167.🤖 Generated with Claude Code