Concepts
Rulesets
Persistent project instructions that are automatically available to the coding agent.
What is a Ruleset?
A Ruleset is a persistent engineering instruction — a coding convention, architecture rule, or project requirement — that's automatically available to your coding agent on every prompt. You write it once in XOROX; you don't paste it into chat again.
When to use one
Use a Ruleset for anything the agent should always know, regardless of what it's currently working on:
- Coding conventions — naming, formatting, file organization.
- Architecture rules — "API endpoints use service classes," "no direct DB access from controllers."
- Framework constraints — which libraries are allowed, which patterns to avoid.
- Project-specific requirements — security rules, testing requirements.
If an instruction only matters for one specific piece of work, it's better as a Specification attached to a Task instead of a Ruleset every prompt has to carry.
How the agent receives it
Rulesets reach the agent automatically — you never ask for them, and the agent never has to decide whether they're relevant. The exact mechanism differs by agent: in Cursor, full Ruleset content is pushed into every prompt through a beforeSubmitPrompt hook — see Cursor. In Claude Code, a short startup instruction tells the agent to retrieve full Ruleset content itself at the start of every session, before it does any implementation work — see Claude Code.
This is the key difference from Specifications: Rulesets reach the agent in full, automatically, without the agent judging relevance.
Enabling and disabling a Ruleset
A Ruleset has a status of active, inactive, or archived. Only active Rulesets are sent to the agent. Set one to inactive to stop it reaching the agent temporarily without deleting it.