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
- Runtime Contracts are the only stable interface between platform and adapters
- Eight component contracts +
RuntimeAdapterContractmeta — unchanged obligations at platform 1.0.0 - Contract major version increments only on obligation change — not on adapter implementation
- Products pin
contractMajorinplatform.lock - Adapter certification proves
implementedContractsagainst contract major - Contract text lives in platform
contracts/— products reference, never fork
Contract inventory (contracts@1):
| Contract | Component |
|---|---|
RuntimeConstraintContract | Constraints |
RuntimeProcedureContract | Procedures |
RuntimeWorkflowContract | Workflows |
RuntimeDelegationContract | Delegation |
RuntimeEnforcementContract | Enforcement |
RuntimeContextProviderContract | Context Providers |
RuntimeExecutionContract | Execution |
RuntimeAdapterContract | Adapters (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
| Alternative | Rejected because |
|---|---|
| Adapter-specific contracts per IDE | Product N×M matrix |
| Informal "best effort" adapter parity | Not CI-enforceable |
| Merge contracts into adapter profiles | Leaks 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.