Ralphe 0.1.6
See the version list below for details.
dotnet tool install --global Ralphe --version 0.1.6
dotnet new tool-manifest
dotnet tool install --local Ralphe --version 0.1.6
#tool dotnet:?package=Ralphe&version=0.1.6
nuke :add-package Ralphe --version 0.1.6
<p align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset=".docs/branding/ralphe-logo-dark.svg"/> <source media="(prefers-color-scheme: light)" srcset=".docs/branding/ralphe-logo-light.svg"/> <img src=".docs/branding/ralphe-logo-dark.svg" alt="Ralphe logo" width="96" height="96"/> </picture> </p>
Ralphe
Ralphe is a loop orchestrator for Claude Code. It automates task execution described as GitHub Issues — from implementation, through review, to commit and issue closure.
How it works
<p align="center"> <img src="docs/flow-animation.svg" alt="Ralphe Flow — default pipeline example" width="800"/> </p>
Ralphe fetches the specified GitHub Issue along with its sub-issues, then runs an agent pipeline for each open sub-issue. The pipeline is fully dynamic — you can define multiple named pipelines and assign them per sub-issue.
By default (without configuration), Ralphe uses a single-agent pipeline with a default agent that implements the task, verifies it (including running tests when appropriate), and reports a verdict. Each sub-issue can specify a different pipeline using a GitHub Alert in the issue body:
> [!IMPORTANT]
> Do not remove this. Ralphe uses this to select the agent pipeline for this issue.
> pipeline: tdd
If the last agent in the pipeline approves the changes (PASS), Ralphe commits them and closes the issue. If it rejects (FAIL), the pipeline is retried with feedback — up to 10 times.
Requirements
- .NET 10 SDK
- Claude Code CLI (
claude) available in PATH - GitHub repository with a configured token (
gh auth login)
Installation
dotnet tool install -g Ralphe
# Update to the latest version:
dotnet tool update -g Ralphe
Usage
ralphe <issue-number> [options]
ralphe init
Options
| Option | Description |
|---|---|
<issue-number> |
GitHub parent issue number (required) |
--max-retries <N> |
Maximum retry attempts per sub-issue (default: 10) |
--claude-path <path> |
Path to Claude Code CLI (default: claude) |
--disallowed-tools <tools> |
Tools blocked for agents |
--allowed-tools <tools> |
Tools explicitly allowed for agents |
--log-directory <dir> |
Log directory (default: .temp/ralphe) |
--file-logging |
Enable file logging |
--reporting <mode> |
Reporting mode: detailed (default) or summary |
--debug |
Enable debug mode |
--debug-filter <filter> |
Debug log filter |
--push <mode> |
Push mode: off (default), per-commit, or on-end |
--config <path> |
Path to ralphe.yml file |
--help |
Display help and exit |
Commands
| Command | Description |
|---|---|
ralphe <issue-number> |
Process the issue with the given number |
ralphe init |
Interactive wizard — creates ralphe.yml and optionally pipelines |
ralphe doctor |
Check tools, configuration, and pipeline health |
Examples
ralphe 42 # Process issue #42 with default settings
ralphe 42 --debug # With debug logging
ralphe 42 --max-retries 5 # Maximum 5 attempts per sub-issue
ralphe 42 --reporting summary # Suppress intermediate agent reports
ralphe init # Initialize project configuration
ralphe doctor # Verify tools and configuration health
Interruption (Ctrl+C)
- First Ctrl+C — graceful shutdown: Ralphe cancels current operations, kills Claude processes, and exits with code
130 - Second Ctrl+C — force quit: immediate process termination
Exit codes
| Code | Meaning |
|---|---|
0 |
All sub-issues approved (or --help was used) / all doctor checks passed |
1 |
At least one sub-issue failed after exhausting retries / at least one doctor check failed |
130 |
Execution interrupted by user (Ctrl+C) |
Configuration
Configuration hierarchy: CLI args > ralphe.yml > hardcoded defaults.
Run ralphe init to generate .claude/ralphe/ralphe.yml with default values:
max-retries: 10
claude-path: claude
disallowed-tools:
- "Bash(git:*)"
log-directory: .temp/ralphe
reporting: detailed
static-prompt: |
Always respond in English.
pipelines:
require-match: false
.default:
description: Default pipeline
agents:
- name: default
model: opus
| Setting | Default value | Description |
|---|---|---|
max-retries |
10 |
Maximum retry attempts for a single sub-issue |
claude-path |
claude |
Path to Claude Code CLI |
disallowed-tools |
["Bash(git:*)"] |
Tools blocked for agents |
allowed-tools |
[] |
Tools explicitly allowed for agents |
log-directory |
.temp/ralphe |
Log directory |
file-logging |
false |
File logging |
reporting |
detailed |
Reporting mode: detailed (all agent conclusions) or summary (final results only) |
push |
off |
Push mode: off, per-commit (after each commit), on-end (after loop) |
static-prompt |
(none) | Static text appended to the system prompt of every Claude call (agents and hooks). Useful for enforcing language, style, or conventions globally. |
pipelines |
— | Pipeline definitions (see below) |
pipelines.require-match |
false |
Error when issue references an unknown pipeline |
Prompt templates
To use custom prompts for an agent, set SystemPrompt or UserPrompt in the agent definition to a file path. The file will be loaded at runtime.
Template variables
Use {{VARIABLE_NAME}} in prompt files. Variables are replaced with values from the pipeline context:
| Variable | Description |
|---|---|
{{ISSUE_NUMBER}} |
Number of the processed sub-issue |
{{ISSUE_TITLE}} |
Sub-issue title |
{{ISSUE_BODY}} |
Sub-issue body (Markdown) |
{{PARENT_ISSUE_NUMBER}} |
Parent issue number |
{{PARENT_ISSUE_TITLE}} |
Parent issue title |
{{PARENT_ISSUE_BODY}} |
Parent issue body |
{{ATTEMPT_NUMBER}} |
Current attempt number (starting from 1) |
{{RETRY_FEEDBACK}} |
Feedback from the previous failed attempt |
{{PREVIOUS_OUTPUT}} |
Output from the previous agent in the pipeline |
{{CHANGED_FILES}} |
List of changed files in the working directory |
{{AGENT_NAME}} |
Current agent name |
Conditional blocks
Use {{#if KEY}}...{{/if}} to include a section only when the variable is non-empty:
{{#if RETRY_FEEDBACK}}
## Previous feedback (attempt {{ATTEMPT_NUMBER}})
{{RETRY_FEEDBACK}}
{{/if}}
Custom agent pipelines
Pipelines are defined in ralphe.yml under the pipelines key. Prompt directories are located in .claude/ralphe/pipelines/. Use ralphe init to generate the structure, or create it manually:
Directory structure:
.claude/ralphe/
ralphe.yml # configuration + pipeline definitions
pipelines/ # prompt directory
tdd/
01-test-writer/ # numeric prefix = fallback ordering
prompt-system.md # required
prompt-user.md # required
02-implementor/
prompt-system.md
prompt-user.md
03-reviewer/
prompt-system.md
prompt-user.md
Pipeline definition in ralphe.yml:
pipelines:
require-match: false
tdd:
description: "TDD red-green-refactor pipeline"
enabled: true # optional, default: true
agents:
- name: test-writer
model: opus # optional, default: sonnet
timeout: "00:05:00" # optional, default: 00:10:00
pass-output: true # optional, default: false
- name: implementor
model: opus
receive-output: true # optional, default: false
pass-output: true
- name: reviewer # uses default values
Key principles:
- Agents execute sequentially in the order defined in
ralphe.yml - Agent output propagation is controlled by two per-agent flags:
pass-output: true— agent's output becomes{{PREVIOUS_OUTPUT}}for the next agent (default:false)receive-output: true— agent sees{{PREVIOUS_OUTPUT}}from the previous agent (default:false)
- The last agent in the pipeline acts as a gate — it decides the loop outcome
- Agent defaults: model=
sonnet, timeout=00:10:00, pass-output=false, receive-output=false
Pipeline selection per sub-issue — add a GitHub Alert in the issue body:
> [!IMPORTANT]
> Do not remove this. Ralphe uses this to select the agent pipeline for this issue.
> pipeline: tdd
Fallback when no alert is present: default pipeline → first in directory → hardcoded default agent.
Comment templates
Ralphe posts comments on GitHub issues to report agent conclusions, pipeline results, and parent issue status. Default templates are embedded in the tool, but you can override them by placing custom files in .claude/ralphe/templates/:
.claude/ralphe/templates/
comment-agent.md # per-agent conclusions (skipped in summary mode)
comment-summary-pass.md # sub-issue PASS summary
comment-summary-fail.md # sub-issue FAIL summary
comment-parent-pass.md # parent issue PASS notification
comment-parent-fail.md # parent issue FAIL notification
Comment template variables
| Variable | Description |
|---|---|
{{ISSUE_NUMBER}} |
Sub-issue number |
{{ISSUE_TITLE}} |
Sub-issue title |
{{PARENT_ISSUE_NUMBER}} |
Parent issue number |
{{ATTEMPT_NUMBER}} |
Current attempt number |
{{MAX_RETRIES}} |
Maximum retries configured |
{{CONCLUSIONS}} |
Agent conclusions text |
{{SUMMARY}} |
Pipeline summary output |
{{ERROR_MESSAGE}} |
Error message (if failed) |
{{AGENT_NAME}} |
Agent name |
{{PIPELINE_NAME}} |
Pipeline name |
{{DURATION}} |
Execution duration |
Lifecycle hooks
Hooks are Claude agents invoked at specific points of the Ralphe loop. They run synchronously — each hook must complete before the main flow continues.
| Hook | When | Extra variables |
|---|---|---|
on-start |
After fetching sub-issues, before the loop begins | SUB_ISSUE_COUNT |
on-pre-iteration |
Before processing each sub-issue | ISSUE_NUMBER, ISSUE_TITLE, ISSUE_BODY |
on-post-iteration |
After processing each sub-issue | above + ITERATION_SUCCESS |
on-end |
After all sub-issues are processed | LOOP_PROCESSED, LOOP_SUCCEEDED, LOOP_FAILED |
All hooks share parent issue variables (PARENT_ISSUE_NUMBER, PARENT_ISSUE_TITLE, PARENT_ISSUE_BODY, SUB_ISSUE_COUNT).
Configuration
Hooks are configured in ralphe.yml under the hooks key. All hooks are disabled by default.
hooks:
on-start:
enabled: true
fail-fast: false # true = error aborts the loop
model: sonnet
timeout: 120 # seconds
disallowed-tools: [] # override global disallowed-tools
allowed-tools: # override global allowed-tools
- "Bash(gh:*)"
on-end:
enabled: true
fail-fast: true
| Setting | Default | Description |
|---|---|---|
enabled |
false |
Enable/disable the hook |
fail-fast |
false |
If true, hook failure aborts the entire loop |
model |
sonnet |
Claude model to use |
timeout |
120 |
Timeout in seconds |
disallowed-tools |
(global fallback) | Per-hook tool restrictions |
allowed-tools |
(global fallback) | Per-hook allowed tools |
Prompt files
Hook prompts are stored in .claude/ralphe/hooks/{hook-name}/:
.claude/ralphe/hooks/
on-start/
prompt-system.md
prompt-user.md
on-pre-iteration/
on-post-iteration/
on-end/
Run ralphe init to generate placeholder prompt files for all hooks.
Per-agent tool overrides
The disallowed-tools and allowed-tools settings can be overridden per agent (in pipeline definitions) or per hook. If not specified, the global values are used as a fallback.
disallowed-tools:
- "Bash(git:*)" # global fallback
allowed-tools: [] # global fallback (empty = no extra allowed tools)
pipelines:
.default:
agents:
- name: coder
disallowed-tools: # override for this agent
- "Bash(git:*)"
- "Bash(rm:*)"
allowed-tools: # override for this agent
- "Bash(gh:*)"
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.1.1 | 0 | 4/14/2026 |
| 1.1.0 | 0 | 4/14/2026 |
| 1.0.7 | 85 | 4/12/2026 |
| 1.0.6 | 72 | 4/12/2026 |
| 1.0.5 | 76 | 4/12/2026 |
| 1.0.4 | 76 | 4/12/2026 |
| 1.0.3 | 85 | 4/12/2026 |
| 1.0.2 | 85 | 4/11/2026 |
| 1.0.1 | 83 | 4/10/2026 |
| 1.0.0 | 78 | 4/10/2026 |
| 0.1.7 | 83 | 4/10/2026 |
| 0.1.6 | 78 | 4/10/2026 |
| 0.1.5 | 76 | 4/10/2026 |
| 0.1.4 | 80 | 4/10/2026 |
| 0.1.3 | 77 | 4/10/2026 |
| 0.1.2 | 88 | 4/9/2026 |
| 0.1.1 | 87 | 4/9/2026 |