1.2 Semantic Substrate Design: A Research Synthesis
Editorial context, 2026-04-20: The questions, constraints, proposals, disagreements, and caveats below are reformulated from the saved research discussion. LLM recommendations remain attributed proposals, not decisions by the author or independently verified findings. Technical examples and quoted source passages retain their original wording.
Executive summary
The saved survey reports strong precedents across computer science for constrained generativity, but did not identify a canonical term covering the whole idea. Refinement theory, assume-guarantee contracts, interface theories, type and module systems, capability security, CRDTs, consensus, Unix composition, the relational model, declarative APIs, and effect systems each capture a different part of it. Taken together, they support a coherent design principle. 1234
The proposal is to define it as:
Constrained generativity is the design principle of restricting the observable behaviours and interactions of components just enough to establish stable guarantees that survive compatible composition, while leaving the choice, implementation, and higher-order organisation of future components open.
And semantic substrate design as the corresponding engineering method:
Semantic substrate design is the construction of the smallest shared vocabulary, behavioural rules, authority model, and composition semantics sufficient to preserve a chosen set of guarantees across independently developed components.
This is close to the formulation already emerging in the research notes: constrain the common semantics while leaving higher-order structure generative, with a participant-neutral environment as one application rather than the definition of the principle. 5 6
The central relationship is:
[ \text{allowed behaviour}
;\xrightarrow{\text{restrict}};
\text{invariants}
;\xrightarrow{\text{rely on}};
\text{local reasoning}
;\xrightarrow{\text{compose}};
\text{larger systems} ]
But one qualification is essential: constraints do not automatically produce generativity. A constraint is useful when it eliminates behaviours that interfere with the desired guarantees while retaining a large class of independently implementable components. Module-system research makes this trade-off explicit: complete transparency creates excessive dependencies, while complete opacity can hide information needed for composition. 7
The corresponding optimisation problem is therefore better stated as maximal permissiveness subject to guarantees, rather than “apply more constraints”:
[ C^\star
=
\operatorname{maximise}_{C}
;\operatorname{Permissiveness}(C)
\quad
\text{subject to}
\quad
\operatorname{Compose}(C)\models G ]
where is the guarantee set and defines admissible component behaviour.
That formulation has direct ancestors. Dijkstra’s weakest-precondition calculus computes the weakest condition sufficient for a desired postcondition; assume-guarantee research synthesises assumptions an environment must satisfy; interface and contract theories define refinement, compatibility, composition, and quotient operators for finding what a missing component must provide. 893
The most important practical conclusion is:
Start with the system guarantee, derive the behaviours that must be excluded, place those restrictions at the narrowest enforceable boundary, prove or test that the guarantee survives composition and replacement, and leave everything else unspecified.
This gives builders a theory for constructing their own systems rather than one prescribed architecture.
The original summary, general research gaps, and complete bibliography stay here. The literature and case studies, formal models, and builder method now have separate locations. The builder note includes the complete dialogue passages added during the preceding split.
Research gaps and promising directions
There is no general “least semantic substrate” calculus yet
The strongest conclusion of this survey is an inference from the literature: there are mature theories for individual pieces, but no single widely adopted framework simultaneously answers
[ \text{behaviour}
\text{effects}
\text{authority}
\text{replication}
\text{provenance}
\text{evolution}
\text{open composition}. ]
Refinement and contract theories handle behavioural inclusion, assumptions and composition. Effect systems expose computational effects. Capability systems constrain authority. CRDT and consensus theory address replicated state. Protobuf addresses structural evolution. These are largely separate semantic layers. 1310111213
A promising research programme would investigate when their guarantees compose:
[ G_{\text{type}}
\land
G_{\text{authority}}
\land
G_{\text{replication}}
\land
G_{\text{provenance}}
\stackrel{?}{\Longrightarrow}
G_{\text{system}}. ]
The answer is generally not automatic. Cross-layer assumptions can invalidate each other.
Constraint synthesis is more important than constraint specification
Existing contract work is good at checking a contract once it exists. The harder builder problem is:
Given , what contract should I write?
Weakest preconditions, contract quotient and automated assumption learning are three partial answers. 839
A broader semantic-substrate tool could work counterexample-first:
[ G
\rightarrow
\text{counterexample composition}
\rightarrow
\text{missing constraint}
\rightarrow
\text{new candidate substrate}
\rightarrow
\text{repeat}. ]
This could turn “architectural design” into a constrained synthesis problem: seek a maximally permissive contract that excludes known counterexamples and preserves the target property.
A single optimum should not be assumed. There may be several incomparable solutions: for replicated data, for example, stronger coordination and stronger algebraic restrictions can both produce useful guarantees through very different designs. 1412
Structural interoperability remains much easier than semantic interoperability
Unix, gRPC and Protobuf show how much can be achieved with a narrow structural interface. But a syntactically valid stream, decodable message or successful RPC can still have the wrong meaning.
Protobuf’s compatibility guarantees deliberately concern wire representation and schema evolution, not arbitrary behavioural compatibility. 1315 Interface and contract theories address richer behaviour, but require more specification. 23
This suggests a useful spectrum:
[ \text{bytes}
<
\text{typed values}
<
\text{protocols}
<
\text{behavioural contracts}
<
\text{state/effect contracts}
<
\text{domain semantics}. ]
Moving right gives stronger guarantees but demands more common semantics and therefore creates more coupling.
Finding the right point on that spectrum for each boundary is one of the central design problems of constrained generativity.
Convergence needs application semantics
CRDT research provides a concrete warning against mistaking an easily stated formal property for the actual desired guarantee.
Strong eventual consistency establishes convergence, but collaborative users may also require properties about preservation of editing intent. Recent work on text CRDTs formulates stronger properties such as maximal non-interleaving because convergence alone permits undesirable text arrangements. 16
The general lesson is:
[ \text{machine property}
\neq
\text{automatically sufficient user property}. ]
A builder method should therefore repeatedly ask:
“What failure would still be unacceptable if every formal invariant currently written were satisfied?”
That question generates the next semantic requirement.
Authority, replication and offline work are beginning to meet
Traditional capability systems assume a clearly authoritative runtime or object graph. CRDT/local-first systems deliberately permit disconnected concurrent operation. Combining revocable authority with offline replicated state is therefore a harder problem.
Recent work such as Keyhive explores “convergent capabilities”: access-control state designed to merge under local-first replication while retaining capability-style grant and revocation semantics. 17
This is a promising example of the next stage of semantic substrate research: compose two constraint systems that were previously studied mostly separately.
Generative and stochastic participants sharpen the boundary problem
Humans and generative models create a useful stress test for existing component theories because their internal behaviour is difficult to enumerate and may deliberately explore many alternatives.
The natural response is not necessarily to fully specify the generator. The proposal/commit model suggests dividing properties into two classes:
and
The generator may be measured statistically:
while the commit boundary is required to satisfy a deterministic invariant:
[ \forall p:
\operatorname{Commit}(p)
\Rightarrow
I(p). ]
Formal research on probabilistic assume-guarantee contracts already shows that compositional contracts can be extended to quantitative and uncertain systems; multi-agent contract work similarly handles shared temporal constraints. 1819
For LLM systems specifically, 2026 research is beginning to use explicit trace contracts, capability restrictions and proposal/commit-style runtime boundaries. These works are early and should currently be treated as emerging evidence rather than a settled formal foundation. 2021 A 2026 survey of formal safety work for LLM agents likewise characterises specification, verification and enforcement as fragmented and identifies specification quality and end-to-end preservation as open problems. 22
The proposed broader theory could therefore avoid being tied to current models:
[ \text{participant internals}
=
\text{opaque / deterministic / stochastic / human / learned} ]
while requiring:
[ \text{observable commitments}
\models
C. ]
The remaining research-gap sections discuss provenance as part of validation and the proposed generativity measure and concluding thesis. The complete original bibliography follows.
References
Compositional assume-guarantee reasoning for input/output component theories ↩︎ ↩︎ ↩︎ ↩︎ ↩︎
User-provided source:
Pasted markdown(1).md. ↩︎User-provided source:
Pasted markdown (2).md. ↩︎A type-theoretic approach to higher-order modules with sharing ↩︎
Guarded commands, non-determinacy and formal derivation of programs (EWD 472) ↩︎ ↩︎
Verifying Strong Eventual Consistency in Distributed Systems ↩︎ ↩︎
The Art of the Fugue: Minimizing Interleaving in Collaborative Text Editing ↩︎
Probabilistic Assume-Guarantee Contracts for Islanded Mission-Critical Power System Operations ↩︎
Contract-based Design and Verification of Multi-Agent Systems with Quantitative Temporal Requirements ↩︎
A Trace-Based Assurance Framework for Agentic AI Orchestration: Contracts, Testing, and Governance ↩︎
State-Aware Runtime for Long-Horizon LLM Agents: A Conceptual Framework and Research Agenda ↩︎
Toward Safe LLM Agents: A Survey of Specification, Verification, and Enforcement ↩︎