# .ralphrc - Ralph project configuration # Generated by: ralph enable # Documentation: https://github.com/frankbria/ralph-claude-code # # This file configures Ralph's behavior for this specific project. # Values here override global Ralph defaults. # Environment variables override values in this file. # ============================================================================= # PLATFORM DRIVER # ============================================================================= # Platform driver for Ralph loop (claude-code, codex, opencode, copilot, or cursor) PLATFORM_DRIVER="${PLATFORM_DRIVER:-opencode}" # ============================================================================= # PROJECT IDENTIFICATION # ============================================================================= # Project name (used in prompts and logging) PROJECT_NAME="${PROJECT_NAME:-my-project}" # Project type: javascript, typescript, python, rust, go, unknown PROJECT_TYPE="${PROJECT_TYPE:-unknown}" # ============================================================================= # LOOP SETTINGS # ============================================================================= # Maximum API calls per hour (rate limiting) MAX_CALLS_PER_HOUR=100 # Timeout for each Claude Code invocation (in minutes) CLAUDE_TIMEOUT_MINUTES=15 # Output format: json (structured) or text (legacy) CLAUDE_OUTPUT_FORMAT="json" # ============================================================================= # TOOL PERMISSIONS # ============================================================================= # Comma-separated list of allowed tools for Claude Code only. # Ignored by the codex, opencode, cursor, and copilot drivers. # Opt in to interactive pauses by adding AskUserQuestion manually. ALLOWED_TOOLS="Write,Read,Edit,MultiEdit,Glob,Grep,Task,TodoWrite,WebFetch,WebSearch,EnterPlanMode,ExitPlanMode,NotebookEdit,Bash" # Permission mode for Claude Code CLI (default: bypassPermissions) # Options: auto, acceptEdits, bypassPermissions, default, dontAsk, plan CLAUDE_PERMISSION_MODE="bypassPermissions" # How Ralph responds when a driver reports permission denials: # - continue: log the denial and keep looping (default for unattended mode) # - halt: stop immediately and show recovery guidance # - threshold: continue until the permission-denial circuit breaker trips PERMISSION_DENIAL_MODE="continue" # ============================================================================= # SESSION MANAGEMENT # ============================================================================= # Enable session continuity (maintain context across loops) SESSION_CONTINUITY=true # Session expiration time in hours (start fresh after this time) SESSION_EXPIRY_HOURS=24 # ============================================================================= # TASK SOURCES # ============================================================================= # Where to import tasks from (comma-separated) # Options: local, beads, github TASK_SOURCES="local" # GitHub label for task filtering (when github is in TASK_SOURCES) GITHUB_TASK_LABEL="ralph-task" # Beads filter for task import (when beads is in TASK_SOURCES) BEADS_FILTER="status:open" # ============================================================================= # CIRCUIT BREAKER THRESHOLDS # ============================================================================= # Open circuit after N loops with no file changes CB_NO_PROGRESS_THRESHOLD=3 # Open circuit after N loops with the same error CB_SAME_ERROR_THRESHOLD=5 # Open circuit if output declines by more than N percent CB_OUTPUT_DECLINE_THRESHOLD=70 # Auto-recovery: cooldown before retry (minutes, 0 = immediate) CB_COOLDOWN_MINUTES=30 # Auto-reset circuit breaker on startup (bypasses cooldown) # WARNING: Reduces circuit breaker safety for unattended operation CB_AUTO_RESET=false # ============================================================================= # QUALITY GATES # ============================================================================= # Test command to verify TESTS_STATUS claims (e.g. "npm test", "pytest") # When set, runs after each loop to confirm the agent's test status report. # Leave empty to trust the agent's TESTS_STATUS without verification. TEST_COMMAND="${TEST_COMMAND:-}" # Semicolon-separated quality gate commands (e.g. "npm run lint;npm run type-check") # Each command runs after the loop iteration completes. # Commands must not contain literal semicolons; use wrapper scripts if needed. QUALITY_GATES="${QUALITY_GATES:-}" # Failure mode: warn | block | circuit-breaker # warn - log failures, continue normally (default) # block - suppress exit signal so the loop keeps running # circuit-breaker - feed no-progress to circuit breaker QUALITY_GATE_MODE="${QUALITY_GATE_MODE:-warn}" # Timeout in seconds for each gate command QUALITY_GATE_TIMEOUT="${QUALITY_GATE_TIMEOUT:-120}" # Only run gates when the agent signals completion (EXIT_SIGNAL=true) QUALITY_GATE_ON_COMPLETION_ONLY="${QUALITY_GATE_ON_COMPLETION_ONLY:-false}" # ============================================================================= # PERIODIC CODE REVIEW # ============================================================================= # Review mode: off, enhanced, or ultimate (set via 'bmalph run --review [mode]') # - off: no code review (default) # - enhanced: periodic review every REVIEW_INTERVAL loops (~10-14% more tokens) # - ultimate: review after every completed story (~20-30% more tokens) # The review agent analyzes git diffs and outputs findings for the next implementation loop. # Currently supported on Claude Code only. REVIEW_MODE="${REVIEW_MODE:-off}" # (Legacy) Enables review — prefer REVIEW_MODE instead REVIEW_ENABLED="${REVIEW_ENABLED:-false}" # Number of implementation loops between review sessions (enhanced mode only) REVIEW_INTERVAL="${REVIEW_INTERVAL:-5}" # ============================================================================= # ADVANCED SETTINGS # ============================================================================= # Minimum Claude CLI version required CLAUDE_MIN_VERSION="2.0.76" # Enable verbose logging RALPH_VERBOSE=false # Custom prompt file (relative to .ralph/) # PROMPT_FILE="PROMPT.md" # Custom fix plan file (relative to .ralph/) # FIX_PLAN_FILE="@fix_plan.md" # Custom agent file (relative to .ralph/) # AGENT_FILE="@AGENT.md"