What it does
A Decision Contract is one versioned YAML file. It defines typed Choice, Noul and Score decisions with their gates, properties and policies. Every command reads the same file. Install DecGuard with pip install decguard. Run decguard test to measure accuracy, calibration, confidence, coverage, latency and error rate on a golden dataset. Each gate reports PASS, WARN or FAIL. Run decguard fuzz for metamorphic stress tests. Run decguard diff to compare a candidate version with the version it replaces. Run decguard check on decision records the application already collected. Run decguard run to decide whether the application should accept, abstain, fall back or ask a human, given the model's confidence.
Capabilities
- Metamorphic fuzzing stresses option order, label format, irrelevant context, whitespace, paraphrases, noul inversion and score monotonicity, and is seeded, minimized and replayable.
- Regression gates compare two model or backend versions case by case and fail CI on answer flips, calibration loss, new errors or segment regressions.
- Production checks run offline on decision records the application already collected, and apply baseline drift and per-segment gates.
- The same contract runs against mock, HTTP, System One (Kev, Jev through OpenRouter) or your own plugin backends.
- Exit codes are the command-line interface: 0 means pass, 1 means a reliability gate failed, and 2 means the run could not be evaluated.
When to use it
- You need to gate an unreliable model version before production.
- You need to check whether a candidate model or backend version is worse than the one it replaces.
- You need to check whether a deployed model is still calibrated on real traffic in every segment.
