Skip to content

Rules

Rules are markdown files that instruct the AI agent how to behave in your project — enforcing coding conventions, architectural decisions, or any guidelines you want applied consistently.

Rules are stored as .md files in the .agents/rules/ directory of your project.

Open your project’s Settings panel and navigate to the file tree. Your rules are listed under .agents/rules/.

Click the + button that appears when hovering over the .agents/rules/ folder. Fill in the form:

  • Name — A human-readable name (e.g. Code Style Guide). The file will be saved as its slugified equivalent (e.g. code-style-guide.md).
  • Description — Explains what the rule enforces and when it applies. This is used by the agent to decide whether to consult the rule.
  • Always Apply — Controls how the rule is loaded into context:
    • On — The full rule content is always included in every conversation.
    • Off — Only the description is included; the agent reads the full rule file when it determines it is relevant.

Click Continue to create the rule. The file opens immediately so you can write the rule content.

After creation, add your guidelines to the rule file below the frontmatter:

---
description: Enforce consistent React component patterns across the codebase.
alwaysApply: false
---
## Component Structure
- Use functional components with TypeScript interfaces
- Export components as named exports: `export const ComponentName`
## Hooks
- Use `useState` for local state, `useReducer` for complex state
- Always specify dependency arrays in `useEffect`

Write clear, actionable instructions. The agent follows the content literally, so be specific.

Open any rule file from the .agents/rules/ folder in the file tree to edit it directly. You can update both the frontmatter fields (description, alwaysApply) and the rule content at any time.

To delete a rule, use the file actions available in the file tree.

Rules are currently local to the project — they apply only within the project where they were created. Global rules (shared across all projects) are not yet available.