# Configuration Reference

## Global Configuration

File: `~/.config/octorus/config.toml`

```toml
[ai]
# Supported agents: "claude" (Claude Code), "codex" (OpenAI Codex CLI)
reviewer = "claude"
reviewee = "claude"
max_iterations = 10       # Max review-fix cycles (clamped to 100)
timeout_secs = 600        # Timeout per agent call (clamped to 7200)
# prompt_dir = "/custom/path/to/prompts"  # Custom prompt directory

# Skip the reviewee/edit phase and terminate after the reviewer step.
# When true, the rally exits after a single review pass regardless of the
# reviewer's verdict (approve / request-changes / comment).
review_only = false

# Additional tools for reviewer (Claude only, --allowedTools format)
# reviewer_additional_tools = ["Skill", "WebSearch"]

# Additional tools for reviewee (Claude only, --allowedTools format)
# reviewee_additional_tools = ["Skill", "Bash(git push:*)"]
```

## Project-Local Overrides

File: `.octorus/config.toml` (created via `or init --local`)

Values in the local config override the global config. Only specify values you want to override.

In headless mode, local overrides require `--accept-local-overrides`:

```bash
or --repo owner/repo --pr 123 --ai-rally --accept-local-overrides
```

## Custom Prompt Templates

Generated by `or init` at `~/.config/octorus/prompts/`.

Available template variables:

| Variable | Description |
|----------|-------------|
| `{{repo}}` | Repository name (owner/repo) |
| `{{pr_number}}` | Pull request number |
| `{{pr_title}}` | Pull request title |
| `{{pr_body}}` | Pull request description body |
| `{{diff}}` | Full diff content |
| `{{changed_files}}` | List of changed file paths |
| `{{previous_review}}` | Previous review comments (re-review only) |
| `{{fix_summary}}` | Summary of fixes applied (re-review only) |
