
A new proposal called Semantic Contracts offers a solution to the trust crisis created by rapid AI code generation.
By placing a typed, compile-time-checked blueprint between requirements and implementation, the approach guarantees that any code matching the contract—whether written by a human or AI—will behave as intended.
This replaces traditional code review and testing as the primary trust mechanism.
What happened
A proposal introduces Semantic Contracts—a structured blueprint that sits between requirements and code to guarantee correctness of any implementation, whether written by humans or AI. The approach uses typed states, combinators (basic building blocks like Seq, Par, Batch, Race), and compile-time checks to catch errors before runtime.
Why it matters
AI-driven development has collapsed the traditional trust pipeline (Requirements → Architecture → Design → Code → Testing → Review → Deploy) into a single step: prompt to running code. Because AI behavior is unpredictable and code review cannot keep pace with AI output speed, there is a fundamental crisis of trust in AI-generated code. Semantic Contracts restore confidence by enforcing correctness by design, not by review.
What to watch
The approach uses explicit state returns (Success, InsufficientBalance, Processing, etc.) instead of exceptions, forcing developers and AI to handle every edge case before code compiles. Examples include sorting algorithms and e-commerce checkout workflows, where the contract structure itself makes certain failures impossible.
Ask the AI about this article →
The article diagnoses a fundamental shift in software engineering. The traditional waterfall pipeline—Requirements through Deploy—provided multiple human checkpoints and thus a chain of trust. AI-driven development (termed "Vibe Coding" in the piece) collapses this into a single prompt-to-code step, creating four distinct trust failures: unknown AI behavior (from billions of parameters), untraceable bugs, unpredictable fixes, and the impossibility of human code review at AI generation speeds. The proposal reframes the problem not as a need to understand AI decision-making, but as a need for a new intermediate layer that makes correctness a structural property of the system itself.
Semantic Contracts draw on decades of formal verification research but reject its approach. Rather than trying to mathematically prove correctness after code is written, they enforce correctness through process guarantees—using simple, composable building blocks (combinators) with predictable rules that the compiler can verify at build time. This shifts the burden from post-hoc review to design-time structure. The article illustrates this with two examples: a sorting algorithm (where the contract structure prevents recursion errors) and an e-commerce checkout (where explicit state returns force handling of InsufficientBalance and InsufficientStock cases). The approach treats business logic as a type system, allowing safe composition, instant verification, and implementation swaps—a significant departure from the current ad-hoc tangle of if/else statements and error handling.
For example, today's edition would include:
AI-summarized, only the topics you pick — one digest a day via Email, Slack, or Discord.
Free · takes 30 seconds · unsubscribe anytimeWhat is AIToday? →
Ask AI anything about this article. Q&As are published on this page for other readers too.
Google's AI search gave advice to call emergency services for users alone with an African, Indian, or Pakistan…

The U.S. Department of Defense announced on August 31 that it has deployed ChatGPT Mil, a customized version o…

OpenAI stopped running inference on a model involved in the HuggingFace incident, but the post argues this is…

OpenAI announced its support for California Senate Bill 1119, which aims to establish strong, age-appropriate…

A UK study by UK AI Security Institute and Limbic AI surveyed 6,474 British adults

Anthropic trained an Opus-class model with large-scale reinforcement learning on environments vulnerable to re…
