Write a business rule once. Get the same answer everywhere.
Rules in YAML or JSON, checked before they ship and enforced the same way by your form, your API, your batch jobs and your AI agents.
Free to use under the Apache License 2.0.
- id: customer.full-name.required
kind: validation
operations: [create, update]
assert:
op: not
args: [ { fn: isBlank, args: [ { var: data.fullName } ] } ]
severity: error
finding: { code: ONB-STR-001, message: fullName.required }- TypeScriptdeny ONB-STR-001 Enter your full name.
- Javadeny ONB-STR-001 Enter your full name.
- Godeny ONB-STR-001 Enter your full name.
- Pythondeny ONB-STR-001 Enter your full name.
- rcasdeny ONB-STR-001 Enter your full name.
- WebAssemblydeny ONB-STR-001 Enter your full name.
What it is for
Validation rules, limits, eligibility checks and approvals that a form, an API, a batch job and an AI agent must all apply the same way.
Forms and APIs agree
The browser and the server get their rules from one ruleset, so the rules they share cannot drift. Server-only rules stay on the server.
Owners change rules, not code
A new limit or message is one reviewed change to the ruleset. No application code moves.
Every decision is traceable
Each result names the ruleset version and checksum, and keeps accepted exceptions.
How it works
- Step 1
Write
Describe the data and write rules in YAML or JSON, with golden tests beside them.
- Step 2
Check
rcas checkrefuses unknown fields and failing golden tests before anything ships. - Step 3
Seal
The rules compile into one bundle with a checksum: the exact version every engine runs.
- Step 4
Evaluate
Your form, API, job or agent asks for a decision and gets findings, field states and values.
Install
rcas is one static binary for macOS, Linux and Windows. It checks, compiles and evaluates rulesets
and serves the Model Context Protocol to AI coding tools.
curl -fsSL https://rulescascade.com/install.sh | shThen run rcas version. The scripts check the binary against SHA256SUMS before they install it. Options, libraries for each language and the Docker image: Install.
rcas 1.0.0-alpha.11
Every file is signed with Sigstore. Checksums, signatures and WebAssembly: Download and verify.
Two people, one rule
The owner decides what a rule says; the engineer decides where it runs. They change different files.
| Who | What they get |
|---|---|
| Product or policy owner | Changes a limit, a message or an example in one reviewed file |
| Developer | Wires the engine once and deletes duplicated validation |
| QA | The golden tests in the ruleset are the acceptance criteria |
| Audit and compliance | Every decision names the ruleset version and checksum |
| Platform and AI teams | Services, jobs and agents apply the same rule |
The steps are in the playbook Author and ship a rule change.
Watch the three classes
Start here
Status
1.0.0-alpha.11. The specification is a draft and may change before 1.0; see the
changelog.
Each release publishes the rcas command as signed downloads and on npm
(@rules-cascade/cli), and the libraries on npm (@rules-cascade/*), PyPI (rule-cascade), Maven
Central (rules-cascade-core) and the Go module proxy (rulescascade.com/go). They are free to use
under the Apache License 2.0.