> ## Documentation Index
> Fetch the complete documentation index at: https://docs.propelcode.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Knowledge base

> Teach Propel your team rules so reviews stay consistent across repositories.

Use the knowledge base to teach Propel your team standards.

When you add a rule, Propel applies it to future reviews across connected repositories.

<Note>
  For complete command syntax, use [Commands](/features/commands).
</Note>

## Example company rules

| Rule name            | Rule                                                                                   |
| -------------------- | -------------------------------------------------------------------------------------- |
| Variable preferences | Prefer creating new variables with descriptive names over mutating existing variables. |
| Use Typography       | Use the shared Typography component instead of custom font size handling.              |
| CompanyId casing     | Use `CompanyId` consistently instead of `CompanyID` across services.                   |

## Add rules in four ways

### 1. Add rules directly in a pull request

Use `/propel add to knowledge base` in a pull request comment:

```bash theme={null}
/propel add to knowledge base "<your team rule>"
```

<img src="https://mintcdn.com/propelplatforminc/lVvw00YxwnzW9WA9/images/user-guide/propel-add-to-knowledge-base.png?fit=max&auto=format&n=lVvw00YxwnzW9WA9&q=85&s=fbc45ae38adf455a893974feb4807e9d" alt="Screenshot showing a rule added to the knowledge base from a pull request comment." width="1483" height="267" data-path="images/user-guide/propel-add-to-knowledge-base.png" />

### 2. Add rules in the knowledge base UI

Open the knowledge base page in the app and create or edit rules there:

[Knowledge base](https://app.propelcode.ai/knowledge-base)

<img src="https://mintcdn.com/propelplatforminc/lVvw00YxwnzW9WA9/images/user-guide/propel-knowledge-base.png?fit=max&auto=format&n=lVvw00YxwnzW9WA9&q=85&s=e44a6658fc3881edea2551aa966833d5" alt="Screenshot of the Propel knowledge base page." width="2600" height="1674" data-path="images/user-guide/propel-knowledge-base.png" />

<img src="https://mintcdn.com/propelplatforminc/lVvw00YxwnzW9WA9/images/user-guide/propel-knowledge-base-2.png?fit=max&auto=format&n=lVvw00YxwnzW9WA9&q=85&s=3b0bea45f396fc18ff40241051b22f75" alt="Screenshot of rule configuration on the Propel knowledge base page." width="2592" height="1632" data-path="images/user-guide/propel-knowledge-base-2.png" />

### 3. Add rules in `.propel/rules`

Store repo-specific guidance in `.propel/rules`. Propel reads these files during review for that repository.

<img src="https://mintcdn.com/propelplatforminc/lVvw00YxwnzW9WA9/images/user-guide/propel-file.png?fit=max&auto=format&n=lVvw00YxwnzW9WA9&q=85&s=dc74123e7e49a9afb307a191784c78b3" alt="Screenshot of a .propel/rules file in a repository." width="494" height="160" data-path="images/user-guide/propel-file.png" />

### 4. Add markdown files as rule sources

You can attach additional markdown files in the knowledge base UI to apply rules across multiple repositories.

<img src="https://mintcdn.com/propelplatforminc/lVvw00YxwnzW9WA9/images/user-guide/propel-rule-source.png?fit=max&auto=format&n=lVvw00YxwnzW9WA9&q=85&s=2c83493d0a566e1d09fb2e7142a007ea" alt="Screenshot of adding a markdown file as a knowledge base rule source." width="2580" height="764" data-path="images/user-guide/propel-rule-source.png" />

<img src="https://mintcdn.com/propelplatforminc/lVvw00YxwnzW9WA9/images/user-guide/propel-rule-source-2.png?fit=max&auto=format&n=lVvw00YxwnzW9WA9&q=85&s=addb451041955f31c9c021af02349f62" alt="Screenshot of configuring how a rule source is applied in review." width="1628" height="1414" data-path="images/user-guide/propel-rule-source-2.png" />

## Next steps

1. Add one rule from a recent pull request.
2. Re-run `/propel review` on an active pull request.
3. Confirm the rule is applied in Propel comments.

## Automatic rule file detection

Propel automatically detects common rule files and directories during review to gather additional instructions and context. This includes files such as `AGENTS.md`.

You can use directory exclusions when you want Propel to ignore folders such as `archive/`, `drafts/`, or internal docs that should not shape review guidance.
