How To Use .autonomyignore with AutonomyAI

Last updated: June 18, 2025

AutonomyAI supports .autonomyignore files to give you control over which parts of your codebase our AI agents should skip. These files mimic .gitignore behavior, with a couple of nuanced twists designed for smarter inclusion logic.

🧠 When to Use .autonomyignore

  • If you want to exclude sensitive or irrelevant code from being processed.

  • If you have legacy, generated, or third-party code you want AutonomyAI to ignore.

  • If you want finer control over what the AI understands in your repo.

⚠ Totally optional β€” you don’t need this file unless you specifically want to hide files or folders from AutonomyAI.

β„Ή By default, AutonomyAI respects your existing .gitignore file and automatically ignores files and folders listed there. The .autonomyignore file is only needed if you want to override or add exclusions beyond what your .gitignore covers.


πŸ”§ Basic Syntax

The .autonomyignore file follows the familiar syntax of .gitignore. Here's the basic rule:

# Ignore everything in folder
src/components/BOTable

# Include everything inside folder
!node_modules/react-router

This example tells AutonomyAI:

  • Ignore everything in the repository (just insert the 'relative path to the folder as displayed in example')

  • But include the react-router folder and recursively include its contents

❗Just like in .gitignore, ! is used to "negate" a rule and include a path that was previously ignored.


πŸ“ Nested Folder Quirks (Git-Like Behavior)

If you ignore a folder with a generic name like components, and you also have a folder like frontend/components, the nested folder will still be ignored unless you explicitly bring it back.

Example:

components
backend
!frontend/components

This tells AutonomyAI:

  • Ignore all top-level components and backend directories

  • **But include **frontend/components by negating the ignore


βœ… Best Practices

  • Use * and ! rules thoughtfully: Start with a broad exclusion, then selectively add back what you want the AI to see.

  • Always use ** when including folders recursively.

  • Place the .autonomyignore file at the root of your repository.


πŸ’‘ TL;DR

PatternMeaning

*

Ignore everything

!frontend

Include frontend/ folder

!frontend/

Include everything inside frontend/

components

Ignore all components/ folders

!frontend/components

Re-include just frontend/components/