Skip to content

Commit 00d9c0b

Browse files
committed
reorg the file to flow better
1 parent 21d1b23 commit 00d9c0b

File tree

1 file changed

+30
-21
lines changed

1 file changed

+30
-21
lines changed

docs/docs/customize/deep-dives/rules.md

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -26,50 +26,50 @@ When in Agent mode, you can simply prompt the agent to create a rule for you usi
2626
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.
2727
:::
2828

29+
### `.continue/rules` folder
30+
You can create project-specific rules by adding a `.continue/rules` folder to the root of your project and adding new rule files.
31+
32+
```yaml title="new-rule.yaml"
33+
name: New rule
34+
version: 0.0.1
35+
schema: v1
36+
rules:
37+
- Always give concise responses
38+
39+
```
40+
This is also done when selecting "Add Rule" in the Assistant settings. This will create a new folder in `.continue/rules` with a default file named `new-rule.yaml`.
41+
2942
### Syntax
3043

3144
Rules blocks can be simple text, written in YAML configuration files, or as Markdown (`.md`) files. They can have the following properties:
3245

3346
- `name` (**required**): A display name/title for the rule
3447
- `rule` (**required**): The text content of the rule
48+
- `schema` (**required**): The schema version of the YAML file (e.g., `v1`)
3549
- `globs` (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"]`).
3650

37-
```yaml title="config.yaml"
51+
```yaml title=colors.yaml"
52+
name: New rules
53+
version: 0.0.1
54+
schema: v1
3855
rules:
39-
- name: Color Themes
56+
- name: Tailwind Color Themes
4057
rule: |
4158
When adding colors to components, use tailwind color classes.
4259
Do NOT use explicit colors like text-gray-400. Instead, use theme colors.
43-
44-
The common available theme colors are:
45-
- For normal text: foreground, description, description-muted
46-
- For other text, icons, etc: success, warning, error, accent, link
47-
- For general components background, border, border-focus
48-
- For specific components:
49-
50-
Any of these colors can be used in tailwind e.g. bg-primary, text-success, border-error, hover:bg-list-hover, etc.
5160
globs: "*/*.tsx"
5261
```
53-
54-
## Chat System Message
55-
56-
Continue includes a simple default system message for [Chat](../../chat/how-to-use-it.md) and [Agent](../../agent/how-to-use-it.md) requests, to help the model provide reliable codeblock formats in its output.
57-
58-
This can be viewed in the rules section of the toolbar (see above), or visit the source code [here](https://github.com/continuedev/continue/blob/main/core/llm/constructMessages.ts#L4)
59-
60-
Advanced users can override this system message for a specific model if needed by using `chatOptions.baseSystemMessage`. See the [`config.yaml` reference](../../reference.md#models).
61-
6262
## `.continuerules`
6363

6464
:::warning
6565

66-
`.contninuerules` will be deprecarted in a future release. Please use `.continue/rules` instead.
66+
`.contninuerules` will be deprecated in a future release. Please use the `.continue/rules` folder instead.
6767

6868
:::
6969

7070
You can create project-specific rules by adding a `.continuerules` file to the root of your project. This file is raw text and its full contents will be used as rules.
7171

72-
### Simple Examples
72+
## Simple Examples
7373

7474
- If you want concise answers:
7575

@@ -87,3 +87,12 @@ Whenever you are writing React code, make sure to
8787
- use Tailwind CSS for styling
8888
- modularize components into smaller, reusable pieces
8989
```
90+
91+
## Chat System Message
92+
93+
Continue includes a simple default system message for [Chat](../../chat/how-to-use-it.md) and [Agent](../../agent/how-to-use-it.md) requests, to help the model provide reliable codeblock formats in its output.
94+
95+
This can be viewed in the rules section of the toolbar (see above), or visit the source code [here](https://github.com/continuedev/continue/blob/main/core/llm/constructMessages.ts#L4)
96+
97+
Advanced users can override this system message for a specific model if needed by using `chatOptions.baseSystemMessage`. See the [`config.yaml` reference](../../reference.md#models).
98+

0 commit comments

Comments
 (0)