Overview
Gitar reads configuration from your repository to customize its behavior. This includes AI instruction files, custom review rules, and repository-level automation rules. All configuration lives in your codebase and is version-controlled alongside your code.AI Instruction Files
Gitar recognizes the following files as AI instruction sources. Place these at the root of your repository:
When Gitar processes a PR, it reads these files to understand your repository’s conventions, coding standards, and best practices. This context is used during both code review and CI failure fixing.
These files are read automatically — no additional configuration is needed. Simply commit them to your repository root and Gitar will pick them up.
The .gitar Directory
The.gitar directory is the primary location for Gitar-specific configuration:
Custom Review Instructions
The.gitar/review/ directory lets you tailor Gitar’s code review to your project’s specific requirements. Add one or more markdown files containing instructions, checks, or gotchas that Gitar should consider during reviews.
Multiple files can be used to organize instructions by topic — for example, separate files for security rules, performance guidelines, and project-specific gotchas.
Example: A file named .gitar/review/gotchas.md that documents codebase-specific patterns:
Including Specific Files
You can include content from other files using the@ syntax with a relative path. Paths are first resolved relative to the source file, with a fallback to the repository root if not found.
Example: Given the following directory structure:
.gitar/review/gotchas.md, you can include files using either approach:
@../documents/rust_best_practices.md— uses../to navigate up fromreview/to.gitar/, then intodocuments/@shared/common_rules.md— not found relative toreview/, so falls back to repo root resolution
Repository Rules
Repository rules let you create automated workflows using natural language, specified in.gitar/rules/*.md files. When conditions defined in the rule are met on a PR, Gitar automatically executes the specified actions.
See the Repository Rules documentation for full details, syntax, and examples.