Rule Cascade
AI agents and MCP

AI coding tools

Set up Claude Code, Codex, GitHub Copilot, Cursor, Kiro, Gemini CLI, Devin (Windsurf), Junie, Muse Code, OpenCode and other AI coding agents for Rule Cascade, with instructions, skills for your languages, and the rcas MCP server.

AI coding agents are good at reading code and drafting rules, and should not be trusted with them unchecked. Rule Cascade gives them three things:

  • Instructions in AGENTS.md: where rules live, how to write one that passes review, and that an agent proposes and a person accepts.
  • Skills, one per task and one per language of your project: how to extract rules, review them, migrate code checks, and enforce rules in TypeScript, Python, Java, Go or any other language.
  • Tools over the Model Context Protocol: check, compile, evaluate, derive, analyze, and propose. Accepting is rcas proposals accept, run by a person.
AI agents read code and propose rulesets; checks run; a person accepts the proposalAI agentreads code, proposesrcas checkgolden tests, reviewA personrcas proposals accept
Agents propose, checks run, and a person accepts.

Set it up in three commands

See what rcas finds in your project.

rcas agent list

It lists every supported tool, marks the ones your project already uses (a .cursor/ folder, CLAUDE.md, .kiro/ ...), says what it would write for each, and names the languages it found (package.json means TypeScript, pom.xml Java, go.mod Go ...).

Write the instructions and skills.

rcas agent install                          # the tools and languages it found
rcas agent install --for claude,copilot     # or name the tools
rcas agent install --for all --stack ts,java

Connect the tools.

rcas mcp install claude copilot-cli vscode   # the same tools, their MCP configuration
rcas doctor                                  # checks the agent files and every MCP configuration

Then ask your agent: "Which business rules are in this code? Use the rules-cascade skill."

Commit what they write (except .rcas/): everyone who clones the project gets the same setup, and the MCP entry starts the server with npx -y @rules-cascade/cli mcp, so nobody needs anything installed but Node.js. To fix the choice for the team, add it to rcas.yaml:

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

What each tool gets

Every install writes AGENTS.md (a managed block; the rest of the file is yours) and the skills in .agents/skills/, which most tools read as they are. Tools that look elsewhere get their own files:

Each tool also gets, in its own format: instructions scoped to the rulesets and to your code, the commands /rcas-capture and /rcas-review, and the sub-agents limited to the tools their role needs.

Tool--forAlso written
Claude CodeclaudeCLAUDE.md, .claude/skills/, .claude/agents/, .claude/commands/, .claude/rules/
OpenAI Codexcodexsub-agents in .codex/agents/
GitHub Copilot (VS Code, cloud agent, CLI)copilot.github/instructions/ (rulesets and code), prompt files in .github/prompts/, custom agents in .github/agents/
Cursorcursor.cursor/rules/ (rulesets and code), sub-agents in .cursor/agents/
Kirokiro.kiro/steering/ (rulesets and code), .kiro/skills/, agents in .kiro/agents/
Gemini CLIgeminiGEMINI.md, commands in .gemini/commands/, subagents in .gemini/agents/
Devin Desktop and CLI (formerly Windsurf)devin.devin/rules/ (rulesets and code), workflows in .devin/workflows/
JetBrains Juniejuniesub-agents in .junie/agents/, commands in .junie/commands/
Clinecline.clinerules/ (rulesets and code), .cline/skills/
OpenCodeopencodeagents in .opencode/agents/, commands in .opencode/commands/
Factory Droidfactorydroids in .factory/droids/, commands in .factory/commands/
Amazon Q Developeramazonq.amazonq/rules/rules-cascade.md
Tabninetabnine.tabnine/guidelines/rules-cascade.md, commands in .tabnine/agent/commands/
Kilo Codekilocommands in .kilo/commands/
Augmentaugmentsub-agents in .augment/agents/, commands in .augment/commands/
Meta Muse Code, Amp, Goose, Warp, Zedmuse, amp, goose, warp, zednothing more: they read AGENTS.md and .agents/skills/ (with the rules-cascade-capture skill)

The full table, with what each tool reads and the sources, is in the agents reference.

Skills for your stack

SkillWhen
rules-cascadeFind decisions in code, write rulesets with golden tests, check, propose
rules-cascade-reviewReview a ruleset change or a proposal
rules-cascade-migrateMove existing checks out of the code, with parity tests
rules-cascade-architectureHow Rule Cascade is designed and set up: bundles, engine forms, what the server decides
rules-cascade-typescriptNode.js (Express, Fastify, NestJS, Next.js), browsers, React
rules-cascade-pythonFastAPI, Django, Flask, Celery, batch jobs
rules-cascade-javaSpring Boot, Quarkus, Micronaut, Kotlin, Scala
rules-cascade-gonet/http, chi, gin, echo, gRPC
rules-cascade-engineC#, Rust, PHP, Ruby, Swift and any other language, through rcas engine or WebAssembly

The first four are written for every project; the language skills follow --stack, languages in rcas.yaml, or what rcas finds.

Make them yours. Edit a skill and delete its rcas-managed line, and rcas agent install keeps your version from then on. Add your own skill beside them, for example .agents/skills/acme-payments/SKILL.md with the folder names, commands and conventions of your code base; rcas never touches folders it did not write. Running agent install after an upgrade refreshes the managed blocks and the files that still carry rcas-managed, and nothing else.

Without installing rcas

The same skills, sub-agents and commands are published after each release at https://rulescascade.com/skills.git, for the default layout (rules in rules/, bundles in build/rules/). Pick the line for your tool:

Your toolGet the skills
Claude Code/plugin marketplace add https://rulescascade.com/skills.git, then /plugin install rules-cascade@rules-cascade (skills, sub-agents, commands and the MCP server)
GitHub Copilot CLIcopilot plugin marketplace add https://rulescascade.com/skills.git, then copilot plugin install rules-cascade@rules-cascade
Codex, Cursor, Gemini CLI, Copilot in VS Code, OpenCode, Amp, Goosenpx skills add https://rulescascade.com/skills.git
Kiro, Junie, Devin, Cline, Augment and the others above, in each tool's own formatnpx -y @rules-cascade/cli agent install --for <tool>

Inside a project, rcas agent install is the better choice: it follows your rcas.yaml and writes each tool's scoped instructions too.

The sub-agents

rcas-analyst inventories the code and lists candidate rules with file:line, rcas-author writes rulesets with golden tests and proposes them, rcas-reviewer reviews a change against the authoring guidelines, and rcas-tester writes golden and parity tests. They are written for the tools that support sub-agents or custom agents: Claude Code, Codex, Copilot, Cursor, Junie, OpenCode and Factory.

The MCP server, tool by tool

rcas mcp install claude      # one tool
rcas mcp install all         # every tool below
rcas mcp install all --print # show the configuration, change nothing
rcas mcp install claude --url https://mcp.rulescascade.com/mcp  # the hosted server instead

With --url, the tool connects to a server over HTTP instead of starting one: the hosted server, which needs nothing installed but sees only what the agent sends, or rcas mcp --http on your machine. See MCP server for what each one can do.

install merges one entry, named rules-cascade, into the tool's configuration and keeps every other server and setting. Where a tool has its own command (claude mcp add, codex mcp add) it uses that; --file writes the file instead. An entry that exists and differs is kept unless you pass --force.

rcas mcp install claude          # runs: claude mcp add -s project rules-cascade -- npx -y @rules-cascade/cli mcp

Writes .mcp.json in the project (commit it). --scope user registers it for every project.

.mcp.json
{
  "mcpServers": {
    "rules-cascade": { "command": "npx", "args": ["-y", "@rules-cascade/cli", "mcp"] }
  }
}

In Claude Code, /mcp lists the server and its tools; tools are named mcp__rules-cascade__check and so on.

Every other client

rcas mcp install also writes copilot-cli, junie, cline, opencode, kilo, factory, amp, zed, warp, augment, amazonq and muse (Meta Muse Code), each in its own format; the CLI reference has the files. The others start the same command:

ClientWhereEntry
Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.json, %APPDATA%\Claude\claude_desktop_config.jsonmcpServers as for Claude Code, with "args": ["-y", "@rules-cascade/cli", "mcp", "--root", "/path/to/project"] (it has no project directory)
GitHub Copilot cloud agentrepository Settings, Copilot, MCP serversmcpServers with "type": "local" and "tools": ["*"]
JetBrains AI AssistantSettings, Tools, AI Assistant, MCPmcpServers, as for Cursor
Goosegoose configure, Add extension, Command-linenpx -y @rules-cascade/cli mcp
LM Studio~/.lmstudio/mcp.jsonmcpServers, as for Cursor

On Windows, a client that cannot start npx directly needs "command": "cmd", "args": ["/c", "npx", "-y", "@rules-cascade/cli", "mcp"]; rcas mcp install writes that form there. With rcas installed, --command binary uses its absolute path instead of npx.

Check it works

rcas mcp --list-tools     # the tools the server offers
rcas doctor               # the project, the agent files and every MCP configuration it finds

Then ask the agent: "List the rules-cascade MCP tools and run check."

SymptomCauseFix
The tool says the server failed to start, or "connection closed"npx is not on the tool's PATH (GUI apps often have a short one)--command binary after installing rcas, or give the full path of npx
"no rulesets found"The server started outside the projectThe tool's working directory must be the project, or add --root /path/to/project to the args
propose_ruleset is missingmcp.readOnly: true in rcas.yaml, or --read-onlyIntended: that project accepts no proposals
mcp install says "kept"An entry with that name exists and differsCompare with --print, then --force
mcp install refuses a file with commentsThe file is JSON with comments (VS Code allows them)Add the entry by hand from --print
Windows: npx is not recognisedStarted without a shellUse the cmd /c npx form above

What the agent may do

Tool groupEffect
list_rules, explain_rule, evaluate_rules, check, test, compile, manifest, derive, analyze, get_*Read only. evaluate_rules is a dry run on the source rulesets; compile returns the bundle, it writes nothing
propose_rulesetWrites under .rcas/proposals/<id>/ and nowhere else; paths outside the project are refused
accepting a proposalNot a tool. Only rcas proposals accept <id>, run by a person

The actor of an evaluation never comes from the model in production: evaluate_rules accepts test roles for a dry run only. In an application, the actor comes from your authentication (see AI agent tools for agents that act for users at run time).

On this page