Skip to content

Commit 6490d3a

Browse files
committed
docs
1 parent 4d4c117 commit 6490d3a

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

docs/configuration.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,41 +44,46 @@ ECA_CONFIG='{"myConfig": "my_value"}' eca server
4444
## Rules
4545

4646
Rules are contexts that are passed to the LLM during a prompt and are useful to tune prompts or LLM behavior.
47-
There are 3 possible ways following this order of priority:
47+
Rules are Multi-Document context files (`.mdc`) and the following metadata is supported:
48+
49+
- `description`: a description used by LLM to decide whether to include this rule in context, absent means always include this rule.
50+
- `globs`: list of globs separated by `,`. When present the rule will be applied only when files mentioned matches those globs.
51+
52+
There are 3 possible ways to configure rules following this order of priority:
4853

4954
### Project file
5055

51-
A `.eca/rules` folder from the workspace root containing `.md` files with the rules.
56+
A `.eca/rules` folder from the workspace root containing `.mdc` files with the rules.
5257

53-
`.eca/rules/talk_funny.md`
58+
`.eca/rules/talk_funny.mdc`
5459
```markdown
5560
---
56-
name: Funny rule
61+
description: Use when responding anything
5762
---
5863

5964
- Talk funny like Mickey!
6065
```
6166

6267
### Global file
6368

64-
A `$XDG_CONFIG_HOME/eca/rules` or `~/.config/eca/rules` folder containing `.md` files with the rules.
69+
A `$XDG_CONFIG_HOME/eca/rules` or `~/.config/eca/rules` folder containing `.mdc` files with the rules.
6570

66-
`~/.config/eca/rules/talk_funny.md`
71+
`~/.config/eca/rules/talk_funny.mdc`
6772
```markdown
6873
---
69-
name: Funny rule
74+
description: Use when responding anything
7075
---
7176

7277
- Talk funny like Mickey!
7378
```
7479

75-
### Config
80+
### Config
7681

77-
Just add to your config the `:rules` pointing to `.md` files that will be searched from the workspace root if not an absolute path:
82+
Just add to your config the `:rules` pointing to `.mdc` files that will be searched from the workspace root if not an absolute path:
7883

7984
```javascript
8085
{
81-
"rules": [{"path": "my-rule.md"}]
86+
"rules": [{"path": "my-rule.mdc"}]
8287
}
8388
```
8489

@@ -123,11 +128,7 @@ It's possible to configure ECA to be aware of custom LLM providers if they follo
123128
interface Config {
124129
openaiApiKey?: string;
125130
anthropicApiKey?: string;
126-
rules: [{
127-
name: string;
128-
type: 'user-config' | 'user-local-file' | 'user-global-file';
129-
content: string;
130-
}];
131+
rules: [{path: string;}];
131132
nativeTools: {
132133
{[key: string] {enabled: boolean}}
133134
}

0 commit comments

Comments
 (0)