Overview
Repository rules let you define automated workflows using plain markdown files. When conditions are met, Gitar automatically executes actions, with no code required.Natural Language
Write rules in plain English, not code
Git-Native
Rules live in your repo as
.gitar/rules/*.mdIntegrations
Connect to Jira, Linear, Slack, and more
Quick Start
1
Create the Rules Directory
2
Add a Rule File
Create
.gitar/rules/security-review.md:3
Commit and Push
4
Open a PR
Gitar evaluates your rules on every PR. Check the dashboard comment to see which rules matched. When none of them apply, the comment says how many were skipped, and
gitar display:verbose shows why each was skipped.Rule Structure
Rules are markdown files with YAML frontmatter:Frontmatter Fields
Triggers
Supported Actions
Post Comments
Post Comments
Post comments on the PR or as inline code reviews.
Apply Labels
Apply Labels
Add or remove labels based on detected conditions.
Assign Reviewers
Assign Reviewers
Assign specific reviewers when changes are detected.
Suggest Code Changes
Suggest Code Changes
Suggest or make code modifications.
Integrations
Every integration your organization has enabled is available to every rule. Name one in the rule and the agent uses it, sopost to #releases finds Slack and move the ticket to In Review finds Linear.
Custom Integrations (MCP)
On the Enterprise plan you can connect your own MCP servers as custom integrations. Name one in a rule the same way you name a built-in.Skills
A rule can also call a skill, a procedure committed under.gitar/skills/<name>/SKILL.md. Name it in the rule body and the agent loads it and follows it.
Rules for Every Repository
A rule in.gitar/rules/ applies to the repository that holds it. To apply one across the organization, commit it to your configuration repository instead and every repository evaluates it.
A repository overrides an inherited rule with a file of the same name, ignoring case and treating - and _ alike. Commit .gitar/rules/no-raw-sql.md and the configuration repository’s no-raw-sql.md (or no_raw_sql.md) is skipped for that repository.
Example Rules
Each example below is one complete.gitar/rules/*.md file.
Documentation Required
Breaking Change Review
Debugging
Use display mode commands to see how rules are being evaluated:Best Practices
Keep each rule focused on one outcome. Name specific paths and conditions, and include the exceptions that matter to the team. Usegitar display:verbose to check why a rule matched or was skipped.