Two AI services can advertise the same capability while making different promises about its inputs, outputs and consequences. One might return a verified source record; another might return a plausible summary with no source check. Replacing the first with the second can break a workflow even when their output fields have identical names. Vocabulary Coding and Engineering proposes a Semantic Substitution Contract: identify the observable behavior that a replacement must preserve, the conditions under which it may be used, and the evidence that establishes compatibility for the receiving system.
Barbara Liskov and Jeannette Wing’s A Behavioral Notion of Subtyping (1994) provides an established foundation for reasoning about substituting software objects according to their specified behavior rather than merely their names or representation. The eduKateSG proposal borrows this discipline for portable human and AI capabilities. It extends the Semantic Capability Receipt and Precondition Witness without claiming that informal natural-language services satisfy a formal type theorem. The latest published Meaning Lab v1.3 implementation report distinguishes authored software checks from independently verified human evidence; the proposed replacement tests below are fictional.
- Define the receiving workflow’s actual expectations before selecting a replacement.
- Preserve admissible inputs, promised outputs, exceptions, invariants and side-effect boundaries.
- A matching field name or output format does not establish behavioral compatibility.
- A replacement must not silently demand more assumptions or provide weaker guarantees than the declared contract permits.
- Compare permission, availability and resource requirements separately from semantic compatibility.
- Use reviewed positive, negative and boundary cases to investigate substitution.
- Record the scope and limits of the evidence; do not infer universal replaceability from finite tests.
Chapter index
- 1. Two services named verify
- 2. What behavioral subtyping contributes
- 3. The receiver defines the relevant question
- 4. A fictional rectangle capability
- 5. Do not weaken the promised output
- 6. Preconditions are the obligations at entry
- 7. Invariants are the properties that must remain true
- 8. History and side effects matter
- 9. Error semantics form part of the interface
- 10. Stronger promises still require evidence
- 11. Adapters are capabilities too
- 12. The proposed substitution record
- 13. Zoom 0: learning through equivalent methods
- 14. Zoom 1: household tools
- 15. Zoom 2: organisations and specialist services
- 16. Zoom 3: institutions and public communication
- 17. Zoom 4: the Second Intelligence Pool
- 18. Zoom 5: inheriting capabilities across generations
- 19. A small fictional compatibility table
- 20. A failure may be decisive even when a score is high
- 21. Test composition as well as individual parts
- 22. Compare permitted behavior with observed behavior
- 23. Protect authority and legitimate boundaries
- 24. A proposed four-week programme
- 25. Questions every receiving agent should ask
- 26. The next engineering step
1. Two services named verify
A fictional document system calls a service called Verify. Service A checks that a supplied statement matches a frozen source record. Service B checks whether a sentence is grammatically plausible. Both can return a field named verified. If the workflow expects A’s meaning, replacing A with B is a semantic error, even when the messages are structurally identical. A service label is a description, not a contract. Specify exactly which source, claim and checks the receiver can rely upon. A useful replacement must preserve those expectations or explicitly announce a new interface.
2. What behavioral subtyping contributes
Liskov and Wing formalised how the specified behavior of a subtype must relate to the behavior expected of its supertype, allowing clients to reason about objects through their contracts. Their treatment includes method specifications, invariants and history constraints. The important analogy for AI services is that compatibility is about preserved observable obligations rather than matching names. The formal results apply to their defined specification setting; a language model with an informal prompt is not thereby proven substitutable. Formalise the bounded interface first, then examine the evidence available for that interface.
3. The receiver defines the relevant question
A replacement need not behave identically in every imaginable circumstance. A receiving program may care that a report contains the original amount, unit, source date and exception, while permitting differences in paragraph style. Another receiver may require exact quoted text. The contract must identify the relevant observable properties. In both cases, independent validation remains necessary. A replacement that is satisfactory for a casual explanation may not satisfy a controlled extraction interface. Compatibility is a relation between a method and an expected use, not a permanent quality attached to its name.
4. A fictional rectangle capability
Define a toy service that accepts positive side lengths in metres or centimetres and returns the area of a Euclidean rectangle in square metres. A receiver is entitled to supply either supported unit under that contract. A candidate accepting only metres narrows the admissible input domain and is not a direct replacement for that interface. An adapter that correctly converts centimetres might supply a compatible composition, but its conversion must be evaluated. The example distinguishes mathematical capability, input acceptance and the complete behavior of the replacement.
5. Do not weaken the promised output
Suppose the original rectangle service returns a numerical value, square-metre unit, source dimensions and an explicit error when a unit is missing. A candidate returns the number alone. Even if the arithmetic matches in ordinary examples, it does not preserve the full output guarantee. A receiver may need the unit to avoid a later conversion error. For a suitably specified contract, a replacement should satisfy the original postconditions whenever the original preconditions hold. Additional compatible detail can be useful, but it must not change the meaning of the required result.
6. Preconditions are the obligations at entry
A precondition describes when the specified behavior is promised. In a simple substitution model, a replacement should accept at least the inputs that the original contract permits rather than unexpectedly impose a stronger precondition. Real AI services can have access, availability, privacy and domain restrictions that are legitimate and necessary. Do not bypass those restrictions for the sake of substitutability. Instead identify the mismatch and route to a suitable authorized method or revise the receiving contract transparently. Semantic compatibility and permission are different conditions, and both must hold.
7. Invariants are the properties that must remain true
A workflow may require that a document’s source identifier never changes, that an unauthorised write never occurs, or that an unknown value remains unknown until evidence is supplied. A replacement must preserve the relevant invariant, not just produce the expected final field values. An assistant that silently fills an unknown date with a guess may appear helpful while violating the interface. Define the invariant in testable terms. For a formal implementation, stronger reasoning about all permitted behavior may be possible; finite examples alone cannot establish such a universal property.
8. History and side effects matter
A read-only summariser and a summariser that also modifies the original source may return the same words. They are not interchangeable when the receiving workflow requires the source to remain unchanged. Specify what may be modified and what must remain stable. Include relevant history constraints, such as the requirement that an approved revision cannot be silently replaced by an older one. A capability receipt should separate generated content from actual external effects. A matching result is not evidence that every side effect was appropriate or authorised.
9. Error semantics form part of the interface
The original service may report missing source, unsupported input and unresolved ambiguity as separate outcomes. A replacement that returns an ordinary-looking empty answer in every case weakens that distinction. A downstream agent could interpret absence of text as proof that no relevant source exists. The Semantic Problem Receipt supplies a complementary vocabulary for communicating failures. Specify how errors, partial results and uncertainty are represented. Compatibility must be examined at the unsuccessful boundary as well as the successful path, especially where a recipient might otherwise act on a false negative.
10. Stronger promises still require evidence
A candidate may claim that it performs every check required by the original service and several additional checks. That is not a sufficient demonstration. Inspect the specification, actual implementation evidence, relevant tests and limitations. The proposed contract can distinguish declared support, author-tested support, independent evaluation and unverified claims. The Claim Release Ledger preserves those maturity differences. A new service’s impressive description should not override its actual scope. A stronger promise is valuable only when it is supported and compatible with the receiving workflow.
11. Adapters are capabilities too
Suppose a candidate accepts temperatures in degrees Celsius but the receiver sends values in degrees Fahrenheit. An adapter may convert the values and preserve their quantity kind and precision under a documented rule. The composed service includes both the conversion and candidate method. Test that the adapter preserves the meaning of missing values, bounds and uncertainty as well as ordinary numbers. A conversion cannot create unavailable source evidence or grant access. The Capability Receipt should identify the adapter’s version and dependencies rather than treat it as an invisible implementation detail.
12. The proposed substitution record
Record the required interface and version, candidate identity and version, admissible inputs, promised outputs, preconditions, invariant and history requirements, error behavior, authorized effects, dependency conditions, resource constraints and evaluation evidence. For each requirement, record established compatibility, demonstrated incompatibility or unresolved status. Include the tested cases and a legitimate review route. A capability may be compatible for one workflow and not assessed for another. Do not store a universal equivalent flag that hides the scope of the comparison.
13. Zoom 0: learning through equivalent methods
A student can solve a rectangle problem using multiplication or repeated addition for appropriate integer cases. The methods may give the same answer in that restricted setting, while one description may not extend directly to arbitrary real-valued dimensions. Ask which inputs and relationships each method supports. This is a small way of teaching the distinction between equivalent answers and interchangeable procedures. Vocabulary mastery becomes useful when a learner can explain why a method applies, what it preserves and where it stops being appropriate.
14. Zoom 1: household tools
A household replaces one scheduling assistant with another. Both display an event, but one distinguishes tentative invitations from confirmed bookings and the other does not. The household needs to know whether the replacement preserves the status it relies upon. It need not compare every internal algorithm. It can specify the essential distinctions, check fictional examples and maintain control over actions that affect other people. A new assistant must not assume access to old records or permission to send notices simply because it can reproduce a familiar interface.
15. Zoom 2: organisations and specialist services
An organisation may replace a document extractor, translation engine or internal reasoning tool. A service that works on the common examples may fail on a rare exception that another department depends on. Inventory the receiving team’s requirements and evaluate meaningful boundaries before migrating. Preserve the original method and rollback or review route where appropriate. The actual deployment decision depends on domain safeguards and evidence, not merely a comparison of advertised capabilities. The proposed contract provides an inspectable basis for that decision.
16. Zoom 3: institutions and public communication
A public institution may change software used to present forms or explain processes. The new system must preserve applicable conditions, accessible presentation and legitimate correction routes rather than only copy labels from the previous interface. Actual requirements differ by jurisdiction and purpose, and specialist review may be necessary. A semantic compatibility test can reveal a difference such as confusing submitted with approved. It cannot establish that an entire public service satisfies its legal obligations. Keep technical evidence and institutional authority distinct.
17. Zoom 4: the Second Intelligence Pool
A network of specialist agents becomes more adaptable when a bounded method can be replaced without rewriting every downstream process. This requires a shared description of the behavior that matters. A coordinating agent can inspect a substitution record, check required capabilities and route unsupported cases elsewhere. The Resource Envelope and Decision Utility Frontier remain relevant: a compatible replacement may have different cost or availability. A proposed intelligence pool should not select a service solely because its label or aggregate benchmark resembles another service’s.
18. Zoom 5: inheriting capabilities across generations
A future institution may inherit an old method but not its original software. If the method’s inputs, guarantees, assumptions and boundary cases survive, a new implementation can be investigated against that specification. The new system need not reproduce every historical internal detail to preserve the behavior required for a particular use. This is one route toward portable civilisation: preserve the operational meaning and evidence, not merely the original machine. It remains possible that a lost dependency or changed context prevents reconstruction. Record that limitation honestly.
19. A small fictional compatibility table
For the rectangle interface, compare four candidates: a correct unit-aware calculator, a metre-only calculator, a unitless-output calculator and a calculator that invents missing units. Expected distinctions are compatibility under the specified toy tests, narrower input support, weaker output information and an invalid missing-value behavior. Add a candidate with a reviewed adapter. These are proposed fixtures and classifications, not observed results from existing AI models. An independent reviewer should inspect the interface and expected cases before interpreting any reported pass.
20. A failure may be decisive even when a score is high
If the contract requires an explicit unknown outcome for a missing unit, one reproducible case where the candidate invents a unit contradicts the universal claim that it always preserves that requirement. It does not establish the frequency of such failures in real use. Report the case, source, actual output and affected requirement. The Error Severity Matrix can describe the potential consequences under the fictional setting. Keep aggregate performance and violations of mandatory requirements separate rather than allow many routine successes to conceal one consequential incompatibility.
21. Test composition as well as individual parts
A candidate and adapter may each pass their own tests while their connection changes the unit or loses the error state. Evaluate the actual composed behavior with reviewed inputs and receiving expectations. Preserve the identity and version of every relevant component. A substitute for one participant in a multistage workflow may also alter timing, message ordering or side effects. The next engineering task is to document those interaction obligations explicitly. Do not infer complete system compatibility from a collection of isolated component scores.
22. Compare permitted behavior with observed behavior
A specification can describe what a service promises. A trace describes a particular execution. The two should remain distinct. An observed success supports a bounded statement about that execution; repeated and independently reviewed tests can strengthen the evidence. A mismatch may reveal an implementation error, an ambiguous specification or an unsuitable fixture. Record the cause only when established. For high-consequence uses, stronger methods and domain-specific safeguards may be required. The semantic contract is a foundation for investigation, not an automatic proof engine.
23. Protect authority and legitimate boundaries
A replacement must never inherit credentials, personal data access or permission merely because it has a compatible interface. The actual receiving system must enforce access controls and authorization. Use synthetic data for initial evaluations and preserve appropriate privacy and retention practices. A documented unsupported input may require a different legitimate service or human review. Do not remove mandatory safeguards to make a candidate appear compatible. The user should be able to distinguish a tool limitation from evidence that the underlying method or request is invalid.
24. A proposed four-week programme
Week 1: specify one harmless capability interface, including errors, invariants and allowed effects. Week 2: create candidate and adapter fixtures with independent review of expected behavior. Week 3: if a prototype is available, test both components and composed traces. Week 4: report actual failures, unsupported requirements and limitations, then revise the specification. These are proposed steps, not completed research. Use appropriate independent evidence and safeguards before considering real operational substitution.
25. Questions every receiving agent should ask
What behavior did the original method promise? Which inputs were admissible? Which outputs, exceptions and invariants matter to the receiver? Does the candidate require more assumptions or provide less information? Are its permissions and side effects appropriate? Was an adapter tested as part of the composition? What evidence establishes compatibility, and what remains unexamined? These questions transform the phrase same capability into a testable, scoped claim. They help a person distinguish a genuinely reusable method from one that merely resembles it.
26. The next engineering step
Connect the Substitution Contract to the Capability Receipt, Precondition Witness, Attribution Trace and Claim Release Ledger. Preserve an inspectable required interface and evidence for each replacement candidate. Use the distinction between behavioral guarantees and observed tests to build a bounded evaluation. The proposed extension does not establish a universal semantic type system or a new Meaning Lab implementation. It advances the portable intelligence hypothesis by identifying what a receiver must conserve when replacing one component with another.
Technical references
Continue reading
- Semantic Capability Receipt
- Semantic Precondition Witness
- Semantic Claim Release Ledger
- Semantic Regret Envelope
- Semantic Selection Mechanism Record
- Meaning Lab v1.3
Research status: behavioral subtyping is established computer science research. The Semantic Substitution Contract is a proposed vocabulary-engineering extension. All examples and new tests are fictional; no universal substitutability proof, new implementation or independently validated learning or AI outcome is claimed.
Continue the current series: Semantic Choreography Contract · Semantic Progress Contract · Semantic Compensation Ledger
