Decision D2 · 2 of 21
Contracts for the layer seams
Draft all ten in SE now as 0.x, experimental, bump on first plant use
RECOMMENDED
- Status
- RECOMMENDED — awaiting Vinayak
- Options
- Add to SE now as 0.x drafts; or wait for the first live plants to settle fields
- Trade-offs
- Early contracts force alignment across repos; late contracts fit reality better
- Recommendation
- Draft the ten contracts in architecture section 5 (PlantState, Evidence, Prescription, Action, ValueRecord, AutonomyPolicy, Lot and genealogy, WriteRequest, ClosureState, Envelope) in SE now as
0.x, markedexperimental. The first plant that uses a contract in production bumps it to1.0.0. Envelope is the common message header (contract name, version, tenant, plant, episode, producer, idempotency key); the safety limits live inside AutonomyPolicy as the operating envelope. ValueRecord carries two separate fields:status(pending, ops_confirmed, signed_off, disputed, superseded) andtier(measured, confirmed, modeled, unknown). Migration: L2verifiedbecomessigned_offwhere a customer sign-off exists, otherwiseops_confirmed; contractmodeledbecomestier = modeledwithstatus = pending.tieris derived from the D13 evidence labels by the section 5.2 mapping: all load-bearing quantities Measured givesmeasured; Measured or calibrated Estimated plus a passed check givesconfirmed; any unchecked Estimated or any Assumed givesmodeled; any Unknown givesunknown. The master document does not define tiers; SE owns this enum. Order of first use: Envelope, Evidence, PlantState, ClosureState and ValueRecord for the slow loop; AutonomyPolicy, WriteRequest and Action for the shadow fast loop; Lot and genealogy only at plants that track lots. - Why
- Six repos already disagree on four shapes (section 2.3). Drafts force one shape now; the experimental mark keeps the cost of changing fields low.
- Evidence
- section 2.3 duplications (ledger status, write path, closure states, finding); SE contracts 0.16.0;
closure/action-intent.json(withdrawn ADR-W029). - Reversible
- Yes while
0.x; after1.0.0only by a versioned migration. - Blocks
- Every build-order phase that crosses a repo seam.
Page history: last 2 changes
- docs(research): retire stale research to archive/research-2026-10 with a register
ab84821 - docs(technical): split decision board into DECISIONS.md
b4db9d4