Knowledge Portal · engineering documentation

Skip to content

ADR-003 — Runtime Contracts

Status: Accepted
Date: 2026-06-28
Phase: 12-1A
Deciders: Platform Architect
Related: ERP v1.0 contracts/runtime-contracts.md


Context

ERP v1.0 defined eight Runtime Contracts between Platform Core and adapters. Adapters (IDEs) change frequently; contract stability is the integration surface products depend on.

ZEP must freeze contract semantics for contracts@1 across platform 1.x releases.


Decision

  1. Runtime Contracts are the only stable interface between platform and adapters
  2. Eight component contracts + RuntimeAdapterContract meta — unchanged obligations at platform 1.0.0
  3. Contract major version increments only on obligation change — not on adapter implementation
  4. Products pin contractMajor in platform.lock
  5. Adapter certification proves implementedContracts against contract major
  6. Contract text lives in platform contracts/ — products reference, never fork

Contract inventory (contracts@1):

ContractComponent
RuntimeConstraintContractConstraints
RuntimeProcedureContractProcedures
RuntimeWorkflowContractWorkflows
RuntimeDelegationContractDelegation
RuntimeEnforcementContractEnforcement
RuntimeContextProviderContractContext Providers
RuntimeExecutionContractExecution
RuntimeAdapterContractAdapters (meta)

Consequences

Positive

  • Replace Cursor with future IDE without product migration
  • PHPUnit contract compliance tests are portable
  • Clear breaking change boundary (contract major)

Negative

  • Contract amendments require formal process
  • Adapter authors must implement full contract set

Alternatives considered

AlternativeRejected because
Adapter-specific contracts per IDEProduct N×M matrix
Informal "best effort" adapter parityNot CI-enforceable
Merge contracts into adapter profilesLeaks vendor into stable surface

Compliance

Phase 12-1A does not amend ERP v1.0 contract obligations — only relocates authority to platform package.


ADR-003 — Runtime Contracts are the stable platform surface.

ZAIXOS Knowledge Portal — public engineering docs at /docs · Staff operations at /admin