1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
# Ralph Unified Configuration File
# =================================
#
# This is the primary configuration file for Ralph.
# Location: ~/.config/ralph-workflow.toml
#
# Configuration priorities (highest to lowest):
# 1. CLI arguments (final override)
# 2. Environment variables (RALPH_*)
# 3. This config file
# 4. Built-in defaults
# =============================================================================
# GENERAL SETTINGS
# =============================================================================
[]
# Verbosity level (0=quiet, 1=normal, 2=verbose, 3=full, 4=debug)
= 2
# Interactive mode - keep agent in foreground for real-time output
= true
# Isolation mode - prevent context contamination between runs
# When enabled, NOTES.md and ISSUES.md are deleted at the start of each run
= true
# Auto-detect project stack (Rust, JavaScript, Python, etc.) for review guidelines
= true
# Enable checkpoint/resume functionality for interrupted runs
= true
# Number of developer iterations (how many times the developer agent runs)
= 5
# Number of review-fix cycles (0=skip review, 1=one cycle, 2=two cycles)
= 2
# Context levels for agents (0=minimal, 1=standard, 2=full)
= 1
= 0
# Review depth: standard (balanced), comprehensive (thorough),
# security (OWASP-focused), incremental (changed files only)
= "standard"
# Strict PROMPT.md validation
= false
# Maximum continuation attempts when developer returns "partial" or "failed"
# Higher values allow more attempts to complete complex tasks within a single plan
# Default: 2 (initial attempt + 2 continuations = 3 total attempts per iteration)
# max_dev_continuations = 2
# Maximum additional commit residual retries after the initial residual-files check
# Default: 10 (carry residual files forward after pass 11)
# max_commit_residual_retries = 10
# Path to save the last prompt (relative to project root)
# prompt_path = ".agent/last_prompt.txt"
# Git user identity for commits (optional, falls back to git config)
# If not set, Ralph will use the standard git configuration from:
# - git config (user.name, user.email)
# - Environment variables: RALPH_GIT_USER_NAME, RALPH_GIT_USER_EMAIL
# - System username as a last resort
# git_user_name = "Your Name"
# git_user_email = "your.email@example.com"
# =============================================================================
# CCS ALIASES (Claude Code Switch)
# =============================================================================
#
# CCS allows you to manage multiple Claude profiles and providers.
# Define aliases here and use them as agents with "ccs/alias-name" syntax.
#
# Example usage in named chains:
# [agent_chains]
# developer = ["ccs/work", "claude", "codex"]
#
# [agent_drains]
# planning = "developer"
# development = "developer"
#
# This uses your "work" CCS profile as the shared planning/development chain,
# falling back to Claude Code and then Codex if needed.
#
# Install CCS: https://github.com/kaitranntt/ccs
[]
# Defaults applied to all CCS aliases unless overridden per-alias.
#
# If your CCS version doesn't support these Claude CLI flags, set them to "".
= "--output-format=stream-json"
= "--verbose"
#
# Print flag: Required for non-interactive mode.
# IMPORTANT: CCS treats `-p` / `--prompt` as its own delegation mode.
# Use Claude's long-form `--print` flag when invoking via the `ccs` wrapper.
= "--print"
#
# Session continuation flag: used for XSD retry loops to continue an existing conversation.
# The `{}` placeholder is replaced with the session ID.
= "--resume {}"
#
# YOLO (autonomous) mode: Skip permission/confirmation prompts for unattended operation.
# Ralph is designed for unattended automation, so this is enabled by default.
# Set to "" to disable and require confirmation for each action.
= "--dangerously-skip-permissions"
= "claude"
= true
[]
# Personal profile - your default Claude account
# personal = "ccs personal"
# Work profile - work/enterprise Claude account
# work = "ccs work"
# Gemini profile - uses Google's Gemini models via CCS
# gemini = "ccs gemini"
# OpenRouter profile - uses OpenRouter for model access
# openrouter = "ccs openrouter"
# =============================================================================
# YOLO MODE AND UNATTENDED OPERATION
# =============================================================================
#
# Ralph is designed for UNATTENDED automation. Agents run with auto-approval
# (yolo mode) by default, meaning:
# - No prompts for file operations
# - No confirmation for tool calls
# - Fully autonomous code changes
#
# This is deliberate: permission is given upfront when you run Ralph.
#
# To DISABLE yolo mode (require confirmation for each action):
# - For CCS aliases (ccs/work, ccs/personal, etc.):
# [ccs]
# yolo_flag = "" # Empty = disable yolo mode
#
# - For built-in non-CCS agents (claude, codex, aider, etc.):
# [agents.claude]
# yolo_flag = "" # Empty = disable yolo mode for that agent
#
# Different agents use different yolo flags:
# - Claude/CCS: --dangerously-skip-permissions
# - Codex: --full-auto
# - Aider: --yes-always
# - Cline: -y
# - etc.
#
# The pipeline runner automatically adds the appropriate flag when building
# agent commands, ensuring consistent unattended behavior across all agents.
# =============================================================================
# CUSTOM AGENT DEFINITIONS (optional)
# =============================================================================
#
# You can define custom agents here. These are merged with built-in agents.
# Built-in agents (claude, codex, opencode, etc.) are defined in the binary.
# Example: Custom agent with specific model configuration
# [agents.my-claude-opus]
# cmd = "claude"
# # When running Claude directly (not via the `ccs` wrapper), `-p` and `--print` are both Claude CLI flags.
# # Prefer "--print" for consistency with unattended mode.
# print_flag = "--print"
# output_flag = "--output-format=stream-json"
# yolo_flag = "--dangerously-skip-permissions"
# verbose_flag = "--verbose"
# can_commit = true
# json_parser = "claude"
# model_flag = "--model claude-opus-4-20250514"
# Example: Local LLM agent
# [agents.local-llm]
# cmd = "ollama run codellama"
# output_flag = ""
# yolo_flag = ""
# verbose_flag = ""
# can_commit = false
# json_parser = "generic"
# =============================================================================
# AGENT CHAIN CONFIGURATION
# =============================================================================
#
# Define reusable named chains in [agent_chains], then bind the built-in runtime
# drains in [agent_drains]. Multiple drains can share the same named chain.
#
# Fallback triggers:
# - Rate limits (429 errors)
# - Authentication failures
# - Token/context exhaustion
# - Command not found
#
# You can use CCS aliases with "ccs/alias-name" syntax.
# Legacy [agent_chain] input is still accepted for compatibility, but the named
# chain + drain schema below is the canonical model.
[]
# Shared development chain used by planning, development, and analysis drains.
= [
"claude", # Primary: Claude Code
"codex", # Fallback: OpenAI Codex
"opencode", # Fallback: OpenCode
]
# Shared review chain used by review, fix, and commit drains.
= [
"codex", # Primary: OpenAI Codex (different perspective)
"claude", # Fallback: Claude Code
]
[]
= "developer"
= "developer"
= "developer"
= "reviewer"
= "reviewer"
= "reviewer"
[]
# Metadata-only compatibility section.
# Keep retry/backoff/provider fallback settings here when needed.
# Maximum retries per agent before trying the next one
= 3
# Delay between retries in milliseconds
= 1000
# =============================================================================
# PROVIDER-LEVEL FALLBACK (optional, for OpenCode)
# =============================================================================
#
# For agents that support multiple providers (like opencode), you can configure
# provider-level fallback. Ralph will try different models within the same agent
# before switching to the next agent in the chain.
#
# Uncomment to enable:
# [agent_chain.provider_fallback]
# opencode = ["-m opencode/glm-4.7-free", "-m opencode/claude-sonnet-4"]