Constraint Registry Admin

Add New Constraint

Machine-safe. Never change after publishing.
For soft rules only. Leave blank for hard rules.
Optional if using explicit min/max fields below.
Optional free-form expression.
Use placeholders: {rule}, {amount}, {unit}, {reason}, {alt_cost}...
fairness morale
Comma separated if you prefer: fairness, morale

JSON Preview (example)

{
  "id": "WeekendOff_MinTwo",
  "name": "Minimum Two Weekends Off Per Month",
  "type": "hard",
  "group": "Fairness",
  "description": "At least two weekends off per month for each employee.",
  "bounds": {"min_weekends_off": 2, "period": "month"},
  "weight": null,
  "priority": 90,
  "template": "We broke {rule} by {amount} because...",
  "owner": "Workforce Policy Team",
  "version": "1.0",
  "effective_date": "2025-01-01",
  "unit": "days",
  "jurisdiction": "Union CBA 2024 §3.2",
  "tags": ["fairness","morale"],
  "deprecated": false,
  "test_cases": ["TC_001","TC_014"]
}

Hook this preview up with JavaScript to live-render from the form.