S2 — Freeze specifications and contracts
Read Layer 0: shared operating rules, this stage and the assigned input bundle.
Role and write scope
The coordinator writes top-level promises and pins; the property owner approves them. Workers supply anchored evidence and staged proposals.
1. Input
The approved S1 design and obligation matrix.
2. Procedure
- Write a short, reviewable statement of observable consequences and explicit non-goals. Use contract discovery and the card template. Name each property clause's pillar and formal class from property classes; the class decides the checker and whether fairness is needed.
- Require top-level decomposition plus historical bugs or consumer requirements; complete one-step induction for ledger and protocol families. Scan all seven consumer-precondition categories.
- Calibrate negative examples, legal edge behavior, witnesses and minimum scale before freezing. S4 repeats calibration on the complete model. A clause that will be checked on real code carries the four parts of a clause check: its input dimensions, a second oracle, refusal of a documented operation counted as failure, and triage before counting.
- Expose environment assumptions and ambiguous semantics as sourced switches. State which interpretation each claim requires.
- Have the coordinator pin the approved text, ideal model and check configurations: S2 freezes the property clauses and the ideal reference model of the three artifacts; S3 builds the code-anchored model against them. Before deductive proof, also freeze the complete inductive invariant and root statement, including explicit parameter ranges and configuration premises. Check content hashes before every counted run.
3. Exit checks
- Check approval, provenance, consumer scans and calibration records for completeness. This is partly manual.
- Require
scripts/check_spec_pins.sh ROOT PINSto succeed; it compares pinned bytes mechanically. - Mechanical: before freezing, run
scripts/check_names.py SOURCE CLAUSES.tsv --column SENTENCE_COLUMNon every table whose clauses or instance sentences name code; it refuses a sentence naming a class, function or field that does not exist in the pinned source, such as an abbreviated class name (name check). Correct the sentence from the source, never the other way round. - Run the approved bad-implementation suite against the frozen ideal: bad cases must fail and controls must pass. These project-specific runs do not grant approval.
4. Rollback
Report an overly strong property or missing assumption with a rollback ticket; a finding reviewed as spec_defect (review verdicts) arrives the same way. Stage the change, compare full regressions, obtain a new property-owner decision, then let the coordinator independently rerun and re-pin. An invariant change requires new Init and affected preservation checks in the same tree, then fresh acceptance. Old proof results do not carry over.
Concrete Examples
For a PD KV slot, a posted write must not simply disappear from the ideal model. Freeze that promise and the configurations that check it; revise them only through the property owner and coordinator.


