Availability
vscode
jetbrains

What are Rules & Guidelines?

Agent and Chat rules and guidelines are natural language instructions that can help Augment reply with more accurate and relevant responses. Rules and guidelines are perfect for telling Augment to take into consideration specific preferences, package versions, styles, and other implementation details that can’t be managed with a linter or compiler. You can create guidelines for a specific workspace or globally for all chats in your IDE; guidelines do not currently apply to Completions, Instructions, or Next Edit. User Guidelines are defined under Settings and stored within your IDE to be used to guide preferences inside of the Agent and Chat. Workspace Guidelines and Rules are stored directly in your repository.

Working with User Guidelines

User Guidelines are stored locally in your IDE and will be applied to all future chats in that IDE. Guidelines defined in VSCode will not propagate to JetBrains IDEs and vice versa.
Adding user guidelines You can add user guidelines by clicking Context menu (@), starting an @-mention inside Chat, or clicking Settings > Rules and User Guidelines.
  1. @ mention and select User Guidelines
  2. Enter your guidelines (see below for tips)
  3. Press Escape to save or wait for autosave
Open rules and guidelines
  1. In the top right corner, select the hamburger menu (⋯)
  2. Select Settings
  3. From the left menu in Augment Settings, select User Guidelines and Rules

Working with Rules

You can craft Rules to guide Augment towards specific documentation, frameworks, workflows or workstyles. Rules are files that live in the .augment/rules directory. Currently, we support 3 types of rules:
  • Always: contents will be included in every user message
  • Manual: needs to be tagged through @ attaching the Rules file manually
  • Auto: Agent will automatically detect and attach rules based on a description field

Importing Rules

Augment will automatically import rules if they are detected in the current workspace. Augment will look for markdown files, e.g., files ending with *.md or *.mdx. You can also manually import rules inside of Settings > Import rules. Import rules

Importing Augment Memories into Rules or User Guidelines

Augment Memories are automatically created by the Agent. If you’ve ever modified the Memories or prompted the Agent to remember something you can import these preferences as Rules or User Guidelines.
  1. From the prompt box, click on Augment Memories
  2. Select the item you’d like to import and then click User Guidelines at the top of Augment Memories from inside the editor.
  3. To add the memory as a Rule, you’ll first need to add at least one rule using +Create new rule file. Now, you can select any information inside the Augment Memories and save it as a Rule.
Move memories

Working with Workspace Guidelines .augment-guidelines (legacy)

You can add an .augment-guidelines file to the root of a repository to specify a set of guidelines that Augment will follow for all Agent and Chat sessions on the codebase. The .augment-guidelines file should be added to your version control system so that everyone working on the codebase has the same guidelines.

Tips for good rules and guidelines

  • Provide guidelines as a list
  • Use simple, clear, and concise language for your guidelines
  • Asking for shorter or code-only answers may hurt response quality

Examples

FAQs