Rules are used to provide instructions to the model for Chat, Edit, and Agent requests.
.continue/rules
at the top level of your workspacepirates-rule.md
to this folder.pirates-rule.md
and save.create_rule_block
tool if enabled.For example, you can say “Create a rule for this”, and a rule will be created for you in .continue/rules
based on your conversation..md
) files. They can have the following properties:
name
(required for YAML): A display name/title for the ruleglobs
(optional): When files are provided as context that match this glob pattern, the rule will be included. This can be either a single pattern (e.g., "**/*.{ts,tsx}"
) or an array of patterns (e.g., ["src/**/*.ts", "tests/**/*.ts"]
).regex
(optional): When files are provided as context and their content matches this regex pattern, the rule will be included. This can be either a single pattern (e.g., "^import .* from '.*';$"
) or an array of patterns (e.g., ["^import .* from '.*';$", "^export .* from '.*';$"]
).description
(optional): A description for the rule. Agents may read this description when alwaysApply
is false to determine whether the rule should be pulled into context.alwaysApply
: Determines whether the rule is always included. Behavior is described below:
true
: Always included, regardless of file contextfalse
: Included if globs exist AND match file context, or the agent decides to pull the rule into context based on its descriptionundefined
(default behavior): Included if no globs exist OR globs exist and match.continue/rules
folder.continue/rules
folder to the root of your project and adding new rule files.
Rules files are loaded in lexicographical order, so you can prefix them with numbers to control the order in which they are applied. For example: 01-general.md
, 02-frontend.md
, 03-backend.md
.
chatOptions.baseSystemMessage
. See the config.yaml
reference.
.continuerules
.continuerules
will be deprecated in a future release. Please use the
.continue/rules
folder instead..continuerules
file to the root of your project. This file is raw text and its full contents will be used as rules.