Rule Cascade
Reference

AI coding agents

rcas agent install teaches an AI coding agent how this project handles business rules, and rcas mcp install gives it the tools to do it.

rcas agent install teaches an AI coding agent how this project handles business rules, and rcas mcp install gives it the tools to do it. This page is the reference: what is written for which tool, how the choice is made, and how a team adapts it. The tutorial is AI coding tools.

What gets written

Every install writes the portable part, which most tools read as it is:

FileWhat
AGENTS.mdA managed block (between rcas:begin and rcas:end): where rules live, how to work (propose, never edit), the engineering rules for rulesets, the commands, and the list of skills. The rest of the file is yours
.agents/skills/<skill>/SKILL.mdThe skills, in the open Agent Skills format

and, for each chosen tool, what that tool needs on top:

Tool--forAlso writesReads of the portable part
Claude CodeclaudeCLAUDE.md (imports @AGENTS.md), .claude/skills/, sub-agents .claude/agents/rcas-*.mdAGENTS.md only when no CLAUDE.md exists; skills only from .claude/skills
OpenAI Codex (CLI, IDE, app)codexsub-agents .codex/agents/rcas-*.tomlAGENTS.md, .agents/skills
GitHub Copilot (VS Code, cloud agent, CLI)copilot.github/instructions/rules-cascade.instructions.md (applies to rulesets), custom agents .github/agents/rcas-*.agent.md unless claude is chosen tooAGENTS.md, .agents/skills, .claude/agents
Cursorcursor.cursor/rules/rules-cascade.mdc (applies to rulesets), sub-agents .cursor/agents/rcas-*.md unless claude is chosen tooAGENTS.md, .agents/skills, .claude/agents
Gemini CLIgeminiGEMINI.md (a managed block with the instructions).agents/skills; AGENTS.md only when configured
Kiro (IDE and CLI)kiro.kiro/steering/rules-cascade.md (applies to rulesets), .kiro/skills/AGENTS.md; skills only from .kiro/skills
Devin Desktop and Devin CLI (formerly Windsurf)devin (alias windsurf).devin/rules/rules-cascade.md (applies to rulesets)AGENTS.md, .agents/skills
JetBrains Juniejuniesub-agents .junie/agents/rcas-*.mdAGENTS.md, .agents/skills
Clinecline.clinerules/rules-cascade.md (applies to rulesets), .cline/skills/ unless claude is chosen tooAGENTS.md; skills from .cline/skills or .claude/skills
OpenCodeopencodesub-agents .opencode/agents/rcas-*.mdAGENTS.md, .agents/skills
Factory Droidfactorydroids .factory/droids/rcas-*.mdAGENTS.md, .agents/skills
Amazon Q Developeramazonq.amazonq/rules/rules-cascade.mdits own rules folder (Kiro supersedes it)
Tabninetabnine.tabnine/guidelines/rules-cascade.md.agents/skills (CLI)
Meta Muse Code, Amp, Goose, Warp, Zed, Kilo Code, Augment Codemuse, amp, goose, warp, zed, kilo, augmentnothing moreAGENTS.md, .agents/skills

Zed reads only the first instructions file it finds at the root, in this order: .rules, .cursorrules, .windsurfrules, .clinerules, .github/copilot-instructions.md, AGENT.md, AGENTS.md. When one of the earlier files exists, add a line to it that points to AGENTS.md. Aider reads no instructions file by itself: run aider --read AGENTS.md, or add read: AGENTS.md to .aider.conf.yml.

The sub-agents

Four roles, written for the tools that support sub-agents or custom agents:

RoleDoesChanges files
rcas-analystInventories the business rules hidden in the code, with file:line evidenceno
rcas-authorWrites or changes rulesets with golden tests, submits them as proposalsproposals only
rcas-reviewerReviews a change or a proposal against the authoring guideno
rcas-testerWrites golden tests and parity tests between a rule and the code it replacesproposals, and tests when asked

The skills

SkillWritten forUse it to
rules-cascadeevery projectFind decisions in code, write rulesets with golden tests, check, propose
rules-cascade-reviewevery projectReview a ruleset change or a proposal
rules-cascade-migrateevery projectMove checks out of the code step by step, with parity tests
rules-cascade-typescripttsEnforce rules in Node.js (Express, Fastify, NestJS, Next.js) and in browsers or React
rules-cascade-pythonpythonEnforce rules in FastAPI, Django, Flask, Celery and batch jobs
rules-cascade-javajavaEnforce rules on the JVM: Spring Boot, Quarkus, Micronaut, Kotlin, Scala
rules-cascade-gogoEnforce rules in Go services: net/http, chi, gin, echo, gRPC
rules-cascade-engineotherEnforce rules from any other language with rcas engine or rcas.wasm

How the tools and languages are chosen

First match wins
Tools--for claude,kiro (or all); agents.tools in rcas.yaml; the tools the project already shows signs of (CLAUDE.md or .claude/, .cursor/, .kiro/, .github/copilot-instructions.md, .devin/ or .windsurf/, GEMINI.md, .junie/ ...); none, which writes the portable part only
Languages--stack ts,java; languages in rcas.yaml; the languages found in the project directory and the directories directly below it (package.json, pyproject.toml, pom.xml, build.gradle, go.mod, *.csproj, Cargo.toml ...); none, which writes every language skill

rcas agent list shows every tool, whether the project uses it, and what an install would write. rcas doctor warns when a tool the project uses is missing its files.

To fix the choice for everyone who clones the project, commit it:

# rcas.yaml
languages: [ts, java]
agents:
  tools: [claude, copilot, kiro]

Adapting it to a team

You want toDo this
Add your own guidance for every toolWrite it in AGENTS.md outside the rcas:begin / rcas:end block
Change a skill or a sub-agent for this projectEdit the file and delete its rcas-managed line. rcas agent install then keeps your version, and only --force replaces it
Add a team skill (your domain, your framework)A new folder beside the others, .agents/skills/acme-payments/SKILL.md, with name: acme-payments and a description that says when to use it. rcas never touches folders it did not write
Get the newest instructions after upgrading rcasRun rcas agent install again: managed blocks and files that still carry rcas-managed are refreshed, everything else is left alone
Use another rules folderrules.dir and output.dir in rcas.yaml; the instructions name your paths
Keep agents from writing at allmcp.readOnly: true in rcas.yaml (or start the server with rcas mcp --read-only): it has no propose_ruleset tool

A skill is plain Markdown: anyone can read what the agent is told. Keep a team skill short, specific (the folders, the commands, the conventions of this code base), and test it by asking the agent to do the task.

MCP servers

rcas mcp install <tool> registers the rules-cascade MCP server in each tool's own configuration, in the shape that tool expects; other servers and settings in the file are kept. See the CLI reference for the files. Goose (goose configure) and the GitHub Copilot cloud agent (repository settings, Copilot, MCP servers) are configured by hand: --print shows the entry.

Sources

The conventions were checked against each tool's documentation in October 2026: Claude Code, Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, Devin, Junie, Cline, OpenCode, Factory, Amazon Q, Tabnine, Muse Code, Amp, Goose, Warp, Zed, Kilo Code, Augment, Agent Skills.

On this page