nl-to-constraints
Installation
SKILL.md
NL → Constraints
A requirement describes a property. A constraint is that property, stated formally enough to evaluate. The translation is lossless when done right — the constraint says exactly what the English said, no more, no less.
Target formalisms
Pick based on what you're constraining:
| Constraining | Target | Example |
|---|---|---|
| Data shape | JSON Schema / Protobuf / type definition | "Email must contain @" → pattern: ".*@.*" |
| Single-state invariant | Boolean predicate (any language) | "Balance never negative" → balance >= 0 |
| Input/output relation | Postcondition / property-based test | "Output is sorted" → all(a[i] <= a[i+1]) |
| Multi-step behavior | Temporal logic | → specification-to-temporal-logic-generator |
| Relational (multiple entities) | First-order logic / SQL CHECK | "Every order has a customer" → FK constraint |