Project configuration (rcas.yaml)
rcas.yaml tells the rcas command where a project keeps its rules and what to do with them. rcas init writes one.
rcas.yaml tells the rcas command where a project keeps its rules and what to do with them.
rcas init writes one. Commands look for rcas.yaml, rcas.yml or rcas.json in the working
directory and each directory above it; --config or RCAS_CONFIG names one explicitly. Relative
paths in it are relative to the file. Every member except rcas is optional, and an unknown member
is an error (exit status 3), so a typo cannot be silently ignored.
rcas: 1 # the version of this file's format
project:
name: Acme Payments
idPrefix: acme.payments # ruleset ids start with this; derived rulesets use <idPrefix>.generated
rules:
dir: rules # where *.ruleset.yaml files are (default: rules)
include: ["**/*.ruleset.yaml"] # optional globs under dir; default: every *.ruleset.yaml, .yml, .json
output:
dir: build/rules # where 'rcas compile --all' writes (default: build/rules)
manifests: [client] # also write <id>.<channel>.manifest.json for these channels
languages: [ts, java] # ts, python, java, go, other: the runtimes that load the bundles
channels: [client, server]
sources: # the API descriptions rules are derived from
openapi:
- { path: api/openapi.yaml, schemas: [Transfer, Customer], idPrefix: acme.payments.generated }
jsonSchema:
- { path: schemas/order.schema.json, pointer: /$defs/Order, entity: Order }
analyze:
include: ["src/**"] # globs for 'rcas analyze'; ** matches directories
exclude: ["**/test/**", "**/*.test.*", "**/*_test.go"]
maxFiles: 20000
mcp:
readOnly: false # true: the MCP server offers no propose_ruleset tool
proposals:
dir: .rcas/proposals # where proposals wait for review (keep it out of version control)| Member | Used by | Meaning |
|---|---|---|
rcas | every command | must be 1 |
project.name, project.idPrefix | init, analyze --derive | the project's name and the prefix of its ruleset ids |
rules.dir, rules.include | check, test, compile --all, mcp, doctor | the rulesets of the project. RCAS_RULES_DIR overrides dir |
output.dir, output.manifests | compile --all | where bundles and manifests go. RCAS_OUT_DIR overrides dir |
languages | init, agent instructions | the runtimes that load the rules: ts, python, java, go, other |
channels | documentation of intent | client and/or server |
sources.openapi, sources.jsonSchema | people and agents | the API descriptions to derive from; rcas derive takes them as arguments |
analyze.include, analyze.exclude, analyze.maxFiles | analyze, init --from, the MCP analyze tool | what to scan |
mcp.readOnly | mcp | leave out propose_ruleset |
proposals.dir | proposals, derive --propose, analyze --derive, mcp | where proposals are stored |
Commit rcas.yaml. Keep .rcas/ out of version control (rcas init adds it to .gitignore).
rcas command reference
rcas is the Rule Cascade command: it checks, compiles and evaluates rulesets, serves the engine protocol to other languages, scaffolds projects, derives rules from API schemas, finds rules in existing code, and serves the Model Context ...
Environment variables
Every variable Rule Cascade reads: the rcas command, its installers and npm package, the rule server, and the examples.