Skip to content

Scientific Model Extension Contract

Status: current reference extension contract
Scope: provider selection, typed scientific decisions, validation, provenance, and commit authority

Stable Boundary

mermaid
flowchart LR
    OP["validated operation contract"] --> Author{"authored decision?"}
    Author -->|"yes"| Decision["typed decision"]
    Author -->|"no"| Selection["provider selection"]
    Selection --> Provider["selected provider"]
    Provider --> Result["typed proposed decision + provenance"]
    Result --> Validate["kernel validation"]
    Validate --> Decision
    Decision --> Candidate["candidate material state"]
    Candidate --> CommitValidate["conservation + state + capacity"]
    CommitValidate --> Commit["atomic commit"]
BoundaryOwnsMust not own
Operation contractProgram kind, declared arguments, output roles, effect kindScientific resolution
Provider selectionCapability binding and selected-provider identityScientific rules, state mutation
ProviderTyped proposed decision, assumptions, uncertainty, provenanceRuntime scheduling, candidate commit
Result validatorRequest membership, result shape, bounds, allowed effectsScientific inference
Candidate validatorState validity, quantities, conservation, capacityProvider selection
CommitAuthoritative material-state mutationScientific inference

Extension Units

UnitStable identityVersioned contract
CapabilitycapabilityRequest payload + result schema
Providerprovider_idSupported capability versions + behavior specification
Bindingcapability → providerRun configuration + provenance
Composite providerone provider_idInternal chain/fallback/ensemble policy

Capability Contract

Required fieldRule
capabilityGlobally stable semantic name
contract_versionVersion of typed request/result schema
lifecycleDecision point such as runtime_precommit; request and selected capability declaration must match exactly before provider invocation
Request schemaImmutable semantic facts only
Result schemaClosed typed decisions only
ValidationKernel-enforced acceptance conditions
Unresolved behaviornot_applicable, failed, or capability-specific UNRESOLVED

Current material capabilities:

CapabilityContractDecision
material.separation_fate1.0Per-component output fractions
material.state_transition1.0Per-component next relationship/state

Provider Contract

Required declarationRule
provider_idStable provider identity
provider_versionRecorded with every accepted decision
Supported capabilitiesExact capability + contract-version pairs
DeterminismDeclared deterministic behavior or runtime-provided seed policy
AssumptionsExplicit structured facts; no hidden source-name inference
UncertaintyTyped when produced
FailureReturned as provider status; never committed directly
State accessImmutable request only; no runtime state or commit handle

Request Record

text
request {
  request_id,
  capability,
  contract_version,
  lifecycle,
  seed?,
  payload
}

Result Record

text
result {
  status: resolved | not_applicable | failed,
  proposed_decision?,
  provenance,
  assumptions,
  uncertainty?,
  diagnostics
}

rejected is a kernel validation result, not a provider status.

Provider Selection

mermaid
flowchart TD
    Request["capability request"] --> Binding{"explicit custom binding?"}
    Binding -->|"no"| Builtin["official built-in provider"]
    Binding -->|"yes"| Custom["external or composite provider"]
    Builtin --> Response["one provider response"]
    Custom --> Response
    Response --> Record["record provider ID + version + configuration"]
RuleRequired behavior
Default material bindingOfficial built-in Rulebook provider
External providerExplicitly replaces the default binding
FallbackImplemented by an explicitly selected composite provider
Implicit provider chainForbidden
Environment-dependent discoveryForbidden in the semantic execution path
Run reproductionProvider identity, version, binding, and decision provenance recorded

Built-in Provider

ProviderCapabilitiesSpecification
culsma.builtin.material_rulebookmaterial.separation_fate, material.state_transitionBuilt-in Material Separation Rulebook

The built-in provider uses the same extension contract and result validation as an external provider. Its default status does not grant state-mutation or validation bypass authority.

Provider-Specification Form

text
Provider specification
├── identity and version
├── supported capability contracts
├── closed input vocabulary
├── decision tables or model definition
├── unresolved outcomes
├── provenance requirements
└── conformance cases

Reference Change Boundary

ChangeRequired Reference edit
Add provider for an existing capabilityAdd independent provider specification
Update provider rules without changing capability schemaUpdate that provider specification
Replace default provider bindingUpdate extension binding declaration + compatibility note
Add capabilityAdd capability contract + conformance mapping
Change request/result schemaVersion capability contract + conformance mapping
Change kernel validation or commit authorityUpdate core operational semantics

Provider additions and provider-internal rule changes do not require edits to core Reference chapters while the stable capability and kernel boundaries remain unchanged.

Kernel Invariants

InvariantRequired
Author decision validated before useYes
Provider result validated before candidate constructionYes
Provider receives mutable runtime stateNo
Provider commits material stateNo
Unknown result silently becomes an equal splitNo
Unconfigured fallback provider executes implicitlyNo
Accepted provider decision records provenanceYes
Decision provenance differs from its result envelopeReject before candidate construction
Invalid candidate mutates committed stateNo

Public language reference for the current Culsma surface.