Rule Cascade
Reference

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
  maxHits: 5000
  minConfidence: 0.5            # leave out weaker hits
  baseline: .rcas/analyze-baseline.json   # written by 'rcas analyze --write-baseline'
  features:                     # 'rcas analyze --feature checkout' scans one feature across modules
    checkout: ["web/src/features/checkout/**", "order-service/**/checkout/**"]
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)
agents:
  tools: [claude, copilot, kiro] # what 'rcas agent install' writes for (default: the tools the project shows signs of)
MemberUsed byMeaning
rcasevery commandmust be 1
project.name, project.idPrefixinit, analyze --derivethe project's name and the prefix of its ruleset ids
rules.dir, rules.includecheck, test, compile --all, mcp, doctorthe rulesets of the project. RCAS_RULES_DIR overrides dir
output.dir, output.manifestscompile --allwhere bundles and manifests go. RCAS_OUT_DIR overrides dir
languagesinit, agent installthe runtimes that load the rules: ts, python, java, go, other; agent install writes one skill per language
channelsdocumentation of intentclient and/or server
sources.openapi, sources.jsonSchemapeople and agentsthe API descriptions to derive from; rcas derive takes them as arguments
analyze.include, analyze.exclude, analyze.maxFiles, analyze.maxHits, analyze.minConfidenceanalyze, init --from, the MCP analyze toolwhat to scan and report. RCAS_ANALYZE_MAX_FILES, RCAS_ANALYZE_MAX_HITS and RCAS_ANALYZE_MIN_CONFIDENCE override them
analyze.baselineanalyze, the MCP analyze toolthe hits already reviewed, written by analyze --write-baseline; ignored while the file does not exist
analyze.featuresanalyze --feature, the MCP analyze toolnamed sets of globs, relative to the project; each hit is labelled with the first feature, by name, it matches
mcp.readOnlymcpleave out propose_ruleset
proposals.dirproposals, derive --propose, analyze --derive, mcpwhere proposals are stored
agents.toolsagent install, doctorthe AI coding tools the team uses (AI coding agents); --for overrides it

Commit rcas.yaml. Keep .rcas/ out of version control (rcas init adds it to .gitignore).