G.0:8 - Common Anti-Patterns and How to Avoid Them
- Anti-pattern: shadow legality gates in downstream code. Avoid by requiring downstream to cite
CG‑Specsegments by id+edition. - Anti-pattern: “one number to rule them all”. Avoid by preserving set-return outputs when only partial orders are lawful; any scalarisation must be explicit, typed, and justified.
- Anti-pattern: thresholds inside CG‑Spec or CHR. Avoid by keeping thresholds and acceptance logic in CAL and citing from
CG‑Speconly via stubs/templates. - Anti-pattern: unqualified cross-context reuse. Expose the correspondence, calibration, loss-policy and reference-plane pins required by the receiving use (
G.Core:4.2.3).