Skip to main content

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:
From .gitar/review/gotchas.md, you can include files using either approach:
  • @../documents/rust_best_practices.md — uses ../ to navigate up from review/ to .gitar/, then into documents/
  • @shared/common_rules.md — not found relative to review/, so falls back to repo root resolution
This works recursively — an included file can itself include other files.

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.

Organization-Level Settings

Repository configuration is complemented by organization-level settings that apply across all repositories. These include enabling/disabling features like code review, managing integrations, and controlling default behaviors. See Settings for organization-level configuration options.