Skip to content
A pre-implementation contract compiler

Stop coding agents from silently choosing what your requirement means.

Ambiguity Compiler turns one vague issue into competing behavioral contracts, shows the test cases where they disagree, and lets your team lock the intended behavior before Codex writes code.

No account required. Uses a synthetic TypeScript repository.

requirementAC-142
Users can export their monthly transactions.
Compiler produced 3 candidate contracts
Boundary test vector · Feb 28 23:30 UTC
A · includedB · excludedC · included
Select a contract to lock intended behavior.

Valid code can still implement the wrong behavior.

Silent interpretation
  1. 01Vague issue enters.
  2. 02Agent assumes details.
  3. 03Existing tests pass.
  4. 04Product behavior is wrong.
Compiled contract
  1. 01Vague issue enters.
  2. 02Behavioral forks become visible.
  3. 03Human selects.
  4. 04Tests enforce the choice.
Example

“Users can export their monthly transactions.”— timezone boundary and pending-state semantics are unresolved.

The loop

Compile intent before implementation.

  1. Step 01
    Scope the context

    You approve a small, sanitized set of file excerpts before anything is compiled.

  2. Step 02
    Compare executable contracts

    The compiler outputs 2–3 candidate contracts with acceptance criteria and evidence.

  3. Step 03
    Lock the intended behavior

    A human explicitly confirms one contract. The others remain visible, not deleted.

  4. Step 04
    Generate tests and verify

    Codex materializes Vitest contracts, runs them, and records a decision receipt.

Discriminating cases

The interpretations only matter if their behavior differs.

    • Contract A · Local calendar monthIncluded
    • Contract B · UTC calendar monthExcluded
    • Contract C · Rolling 30 daysIncluded
    • Contract A · Local calendar monthExcluded
    • Contract B · UTC calendar monthExcluded
    • Contract C · Rolling 30 daysExcluded
    • Contract A · Local calendar monthIncluded
    • Contract B · UTC calendar monthIncluded
    • Contract C · Rolling 30 daysIncluded
    • Contract A · Local calendar monthEmpty
    • Contract B · UTC calendar monthEmpty
    • Contract C · Rolling 30 daysEmpty
Composition

Each layer has one job.

Codex

Reads scoped repository context. Materializes tests locally. Runs and fixes code.

GPT-5.6

Compiles plausible contracts. Separates evidence from assumptions. Generates discriminating scenarios.

Deterministic system

Validates schemas. Enforces state transitions. Hashes locked contracts. Records verification.

The MCP server is the authoritative state and tool layer between Codex, the model, and your workspace.

Architecture

Built as a real Codex plugin, not a prompt wrapper.

Codex plugin
Scoped context
MCP tools
GPT-5.6 (structured outputs)
Contract store
Embedded comparison UI
Local tests + receipt
Text alternative to diagram
  1. Codex plugin
  2. Scoped context
  3. MCP tools
  4. GPT-5.6 (structured outputs)
  5. Contract store
  6. Embedded comparison UI
  7. Local tests + receipt
Categories

Supported ambiguity

Boundary and time

When does the period begin and end?

"monthly export" — user timezone vs. UTC vs. rolling 30 days.

Authorization and actor

Who can perform the action, and on whose resource?

"Admins can retry failed jobs" — any admin, or tenant admin only?

Lifecycle and state

What happens to pending, failed, cancelled or deleted records?

"Notify owner on completion" — success only, or any terminal state?

Safety

Your repository stays local. Only approved context leaves it.

  • Context preview before transmission
  • Secret scanning on excerpts
  • Excerpt and size limits
  • No server-side code execution
  • Human confirmation before selection
  • No code edits before selection

These are hardening measures, not absolute guarantees.

Decision receipt

Every decision leaves a receipt.

receipt · sha256:9f2c…a41bAC-142 · v3
Requirement
Users can export their monthly transactions.
Selected contract
Contract A · Local calendar month
Rejected alternatives
B · UTC calendar month, C · Rolling 30 days
Acceptance criteria
AC1 · AC2 · AC3
Tests
t1 · t2 · t3 · t4 · t5
Verification
5/5 passed in 412ms

Make the decision explicit before the code makes it permanent.