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”. Report the pairwise relation when the order asks about two candidates. Identify a frontier under the dominance rule for its candidate domain. For a selection apply the declared selection rule. Combining several criteria into a scalar requires an explicit, lawful operation. Comparing a single measured size can use its own scale directly.
- 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).