@ralph-orchestrator/ralph-cli 2.0.7 → 2.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +103 -15
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
[](LICENSE)
|
|
4
4
|
[](https://www.rust-lang.org/)
|
|
5
|
-
[](https://github.com/mikeyobrien/ralph-orchestrator/actions)
|
|
6
6
|
[](https://github.com/hesreallyhim/awesome-claude-code)
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
A hat-based
|
|
9
|
+
A hat-based orchestration framework that keeps Ralph in a loop until the task is done.
|
|
10
10
|
|
|
11
11
|
> "Me fail English? That's unpossible!" - Ralph Wiggum
|
|
12
12
|
|
|
@@ -32,9 +32,22 @@ v1.0.0 was ralphed into existence with little oversight and guidance. v2.0.0 is
|
|
|
32
32
|
|
|
33
33
|
## What is Ralph?
|
|
34
34
|
|
|
35
|
-
Ralph implements the [Ralph Wiggum technique](https://ghuntley.com/ralph/) — autonomous task completion through continuous
|
|
35
|
+
Ralph implements the [Ralph Wiggum technique](https://ghuntley.com/ralph/) — autonomous task completion through continuous iteration.
|
|
36
36
|
|
|
37
|
-
> "The orchestrator is a thin coordination layer, not a platform.
|
|
37
|
+
> "The orchestrator is a thin coordination layer, not a platform. Ralph is smart; let Ralph do the work."
|
|
38
|
+
|
|
39
|
+
### Two Modes of Operation
|
|
40
|
+
|
|
41
|
+
Ralph supports two orchestration styles:
|
|
42
|
+
|
|
43
|
+
| Mode | Description | Best For |
|
|
44
|
+
|------|-------------|----------|
|
|
45
|
+
| **Traditional** | Simple loop — Ralph iterates until done | Quick tasks, simple automation, minimal config |
|
|
46
|
+
| **Hat-Based** | Ralph can wear many hats — specialized personas coordinate through events | Complex workflows, multi-step processes, role separation |
|
|
47
|
+
|
|
48
|
+
**Traditional mode** is the original Ralph Wiggum approach: start a loop, let it run until it outputs the completion promise. No roles, no events, just iteration.
|
|
49
|
+
|
|
50
|
+
**Hat-based mode** adds structure: specialized personas coordinate through events. You define the roles that fit your workflow — reviewers, testers, documenters, whatever makes sense. Presets provide ready-made patterns like TDD or spec-driven development.
|
|
38
51
|
|
|
39
52
|
### The Ralph Tenets
|
|
40
53
|
|
|
@@ -49,12 +62,12 @@ See [AGENTS.md](AGENTS.md) for the full philosophy.
|
|
|
49
62
|
|
|
50
63
|
## Features
|
|
51
64
|
|
|
52
|
-
- **Multi-Backend Support** — Works with Claude Code, Kiro, Gemini CLI, Codex, and
|
|
53
|
-
- **Hat System** — Specialized
|
|
65
|
+
- **Multi-Backend Support** — Works with Claude Code, Kiro, Gemini CLI, Codex, Amp, Copilot CLI, and OpenCode
|
|
66
|
+
- **Hat System** — Specialized Ralph personas with distinct behaviors
|
|
54
67
|
- **Event-Driven Coordination** — Hats communicate through typed events with glob pattern matching
|
|
55
68
|
- **Backpressure Enforcement** — Gates that reject incomplete work (tests, lint, typecheck)
|
|
56
69
|
- **Presets Library** — 20+ pre-configured workflows for common development patterns
|
|
57
|
-
- **Interactive TUI** — Real-time terminal UI for monitoring
|
|
70
|
+
- **Interactive TUI** — Real-time terminal UI for monitoring Ralph's activity (experimental)
|
|
58
71
|
- **Session Recording** — Record and replay sessions for debugging and testing (experimental)
|
|
59
72
|
|
|
60
73
|
## Installation
|
|
@@ -68,6 +81,8 @@ See [AGENTS.md](AGENTS.md) for the full philosophy.
|
|
|
68
81
|
- [Gemini CLI](https://github.com/google-gemini/gemini-cli)
|
|
69
82
|
- [Codex](https://github.com/openai/codex)
|
|
70
83
|
- [Amp](https://github.com/sourcegraph/amp)
|
|
84
|
+
- [Copilot CLI](https://docs.github.com/copilot) (`npm install -g @github/copilot`)
|
|
85
|
+
- [OpenCode](https://opencode.ai/) (`curl -fsSL https://opencode.ai/install | bash`)
|
|
71
86
|
|
|
72
87
|
### Via npm (Recommended)
|
|
73
88
|
|
|
@@ -79,6 +94,12 @@ npm install -g @ralph-orchestrator/ralph-cli
|
|
|
79
94
|
npx @ralph-orchestrator/ralph-cli --version
|
|
80
95
|
```
|
|
81
96
|
|
|
97
|
+
### Via Homebrew (macOS)
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
brew install ralph-orchestrator
|
|
101
|
+
```
|
|
102
|
+
|
|
82
103
|
### Via Cargo
|
|
83
104
|
|
|
84
105
|
```bash
|
|
@@ -131,10 +152,10 @@ The v1 Python version is no longer maintained. See [v1.2.3](https://github.com/m
|
|
|
131
152
|
### 1. Initialize a Project
|
|
132
153
|
|
|
133
154
|
```bash
|
|
134
|
-
#
|
|
155
|
+
# Traditional mode — simple loop, no hats (recommended for getting started)
|
|
135
156
|
ralph init --backend claude
|
|
136
157
|
|
|
137
|
-
#
|
|
158
|
+
# Hat-based mode — use a preset workflow with specialized personas
|
|
138
159
|
ralph init --preset tdd-red-green
|
|
139
160
|
|
|
140
161
|
# Combine preset with different backend
|
|
@@ -144,7 +165,7 @@ ralph init --preset spec-driven --backend kiro
|
|
|
144
165
|
ralph init --list-presets
|
|
145
166
|
```
|
|
146
167
|
|
|
147
|
-
This creates `ralph.yml` in your current directory.
|
|
168
|
+
This creates `ralph.yml` in your current directory. Without a preset, you get traditional mode (no hats). With a preset, you get hat-based orchestration.
|
|
148
169
|
|
|
149
170
|
### 2. Define Your Task
|
|
150
171
|
|
|
@@ -188,22 +209,73 @@ ralph resume
|
|
|
188
209
|
ralph run --dry-run
|
|
189
210
|
```
|
|
190
211
|
|
|
212
|
+
### Alternative: SOP-Driven Sessions
|
|
213
|
+
|
|
214
|
+
For standalone planning and task generation (without Ralph's event loop), use these commands:
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
# Start an interactive PDD planning session
|
|
218
|
+
ralph plan # SOP prompts for input
|
|
219
|
+
ralph plan "build a REST API" # Provide idea inline
|
|
220
|
+
ralph plan --backend kiro "my idea" # Use specific backend
|
|
221
|
+
|
|
222
|
+
# Generate code task files from descriptions
|
|
223
|
+
ralph task # SOP prompts for input
|
|
224
|
+
ralph task "add authentication" # From description
|
|
225
|
+
ralph task specs/feature/plan.md # From PDD plan file
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
These commands spawn an interactive AI session with bundled SOPs — perfect for one-off planning without configuring a full workflow.
|
|
229
|
+
|
|
191
230
|
## Configuration
|
|
192
231
|
|
|
193
232
|
Ralph uses a YAML configuration file (`ralph.yml` by default).
|
|
194
233
|
|
|
195
|
-
###
|
|
234
|
+
### Traditional Mode (No Hats)
|
|
235
|
+
|
|
236
|
+
The simplest configuration — just a loop that runs until completion:
|
|
237
|
+
|
|
238
|
+
```yaml
|
|
239
|
+
# ralph.yml — Traditional mode
|
|
240
|
+
cli:
|
|
241
|
+
backend: "claude"
|
|
242
|
+
|
|
243
|
+
event_loop:
|
|
244
|
+
completion_promise: "LOOP_COMPLETE"
|
|
245
|
+
max_iterations: 100
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
This runs Ralph in a loop. No hats, no events, no role switching. Ralph iterates until it outputs `LOOP_COMPLETE` or hits the iteration limit.
|
|
249
|
+
|
|
250
|
+
### Hat-Based Mode (Specialized Personas)
|
|
251
|
+
|
|
252
|
+
> Ralph can wear many hats.
|
|
253
|
+
|
|
254
|
+
Add a `hats` section to enable role-based orchestration. Hats subscribe to events (triggers) and publish events when done:
|
|
196
255
|
|
|
197
256
|
```yaml
|
|
198
|
-
# ralph.yml
|
|
257
|
+
# ralph.yml — Hat-based mode (example structure)
|
|
199
258
|
cli:
|
|
200
259
|
backend: "claude"
|
|
201
260
|
|
|
202
261
|
event_loop:
|
|
203
262
|
completion_promise: "LOOP_COMPLETE"
|
|
204
263
|
max_iterations: 100
|
|
264
|
+
starting_event: "task.start"
|
|
265
|
+
|
|
266
|
+
hats:
|
|
267
|
+
my_hat:
|
|
268
|
+
name: "🎯 My Hat"
|
|
269
|
+
triggers: ["task.start"] # Events that activate this hat
|
|
270
|
+
publishes: ["work.done"] # Events this hat can emit
|
|
271
|
+
instructions: |
|
|
272
|
+
Your instructions here...
|
|
205
273
|
```
|
|
206
274
|
|
|
275
|
+
With hats, Ralph publishes a starting event, which triggers the matching hat. That hat does its work and publishes an event, potentially triggering other hats. This event-driven handoff continues until completion.
|
|
276
|
+
|
|
277
|
+
> **Tip:** Use `ralph init --preset <name>` to get pre-configured hat workflows. See [Presets](#presets) for ready-made patterns like TDD, spec-driven development, and more.
|
|
278
|
+
|
|
207
279
|
### Full Configuration Reference
|
|
208
280
|
|
|
209
281
|
```yaml
|
|
@@ -217,7 +289,7 @@ event_loop:
|
|
|
217
289
|
|
|
218
290
|
# CLI backend settings
|
|
219
291
|
cli:
|
|
220
|
-
backend: "claude" # claude, kiro, gemini, codex, amp, custom
|
|
292
|
+
backend: "claude" # claude, kiro, gemini, codex, amp, copilot, opencode, custom
|
|
221
293
|
prompt_mode: "arg" # arg (CLI argument) or stdin
|
|
222
294
|
experimental_tui: false # Enable TUI mode support
|
|
223
295
|
|
|
@@ -311,7 +383,7 @@ ralph init --preset debug --force
|
|
|
311
383
|
|
|
312
384
|
### Hats
|
|
313
385
|
|
|
314
|
-
Hats are specialized
|
|
386
|
+
Hats are specialized Ralph personas. Each hat has:
|
|
315
387
|
|
|
316
388
|
- **Triggers**: Events that activate this hat
|
|
317
389
|
- **Publishes**: Events this hat can emit
|
|
@@ -348,6 +420,8 @@ tests: pass, lint: pass, typecheck: pass
|
|
|
348
420
|
|---------|-------------|
|
|
349
421
|
| `ralph run` | Run the orchestration loop (default) |
|
|
350
422
|
| `ralph resume` | Resume from existing scratchpad |
|
|
423
|
+
| `ralph plan` | Start an interactive PDD planning session |
|
|
424
|
+
| `ralph task` | Start an interactive code-task-generator session |
|
|
351
425
|
| `ralph events` | View event history |
|
|
352
426
|
| `ralph init` | Initialize configuration file |
|
|
353
427
|
| `ralph clean` | Clean up `.agent/` directory |
|
|
@@ -380,11 +454,25 @@ tests: pass, lint: pass, typecheck: pass
|
|
|
380
454
|
|
|
381
455
|
| Option | Description |
|
|
382
456
|
|--------|-------------|
|
|
383
|
-
| `--backend <NAME>` | Backend: `claude`, `kiro`, `gemini`, `codex`, `amp` |
|
|
457
|
+
| `--backend <NAME>` | Backend: `claude`, `kiro`, `gemini`, `codex`, `amp`, `copilot`, `opencode` |
|
|
384
458
|
| `--preset <NAME>` | Use preset configuration |
|
|
385
459
|
| `--list-presets` | List available presets |
|
|
386
460
|
| `--force` | Overwrite existing config |
|
|
387
461
|
|
|
462
|
+
### `ralph plan` Options
|
|
463
|
+
|
|
464
|
+
| Option | Description |
|
|
465
|
+
|--------|-------------|
|
|
466
|
+
| `<IDEA>` | Optional rough idea to develop (SOP prompts if not provided) |
|
|
467
|
+
| `-b, --backend <BACKEND>` | Backend to use (overrides config and auto-detection) |
|
|
468
|
+
|
|
469
|
+
### `ralph task` Options
|
|
470
|
+
|
|
471
|
+
| Option | Description |
|
|
472
|
+
|--------|-------------|
|
|
473
|
+
| `<INPUT>` | Optional description text or path to PDD plan file |
|
|
474
|
+
| `-b, --backend <BACKEND>` | Backend to use (overrides config and auto-detection) |
|
|
475
|
+
|
|
388
476
|
## Architecture
|
|
389
477
|
|
|
390
478
|
Ralph is organized as a Cargo workspace with six crates:
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"hasInstallScript": true,
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"name": "@ralph-orchestrator/ralph-cli",
|
|
26
|
-
"version": "2.0.
|
|
26
|
+
"version": "2.0.9"
|
|
27
27
|
},
|
|
28
28
|
"node_modules/@isaacs/balanced-match": {
|
|
29
29
|
"engines": {
|
|
@@ -515,5 +515,5 @@
|
|
|
515
515
|
}
|
|
516
516
|
},
|
|
517
517
|
"requires": true,
|
|
518
|
-
"version": "2.0.
|
|
518
|
+
"version": "2.0.9"
|
|
519
519
|
}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"artifactDownloadUrl": "https://github.com/mikeyobrien/ralph-orchestrator/releases/download/v2.0.
|
|
2
|
+
"artifactDownloadUrl": "https://github.com/mikeyobrien/ralph-orchestrator/releases/download/v2.0.9",
|
|
3
3
|
"bin": {
|
|
4
4
|
"ralph": "run-ralph.js"
|
|
5
5
|
},
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"zipExt": ".tar.xz"
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
|
-
"version": "2.0.
|
|
65
|
+
"version": "2.0.9",
|
|
66
66
|
"volta": {
|
|
67
67
|
"node": "18.14.1",
|
|
68
68
|
"npm": "9.5.0"
|