@ralph-orchestrator/ralph-cli 2.0.5 → 2.0.8
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 +101 -16
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
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, and Copilot CLI
|
|
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,15 +81,16 @@ 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`)
|
|
71
85
|
|
|
72
86
|
### Via npm (Recommended)
|
|
73
87
|
|
|
74
88
|
```bash
|
|
75
89
|
# Install globally
|
|
76
|
-
npm install -g @ralph-orchestrator/ralph
|
|
90
|
+
npm install -g @ralph-orchestrator/ralph-cli
|
|
77
91
|
|
|
78
92
|
# Or run directly with npx
|
|
79
|
-
npx @ralph-orchestrator/ralph --version
|
|
93
|
+
npx @ralph-orchestrator/ralph-cli --version
|
|
80
94
|
```
|
|
81
95
|
|
|
82
96
|
### Via Cargo
|
|
@@ -131,10 +145,10 @@ The v1 Python version is no longer maintained. See [v1.2.3](https://github.com/m
|
|
|
131
145
|
### 1. Initialize a Project
|
|
132
146
|
|
|
133
147
|
```bash
|
|
134
|
-
#
|
|
148
|
+
# Traditional mode — simple loop, no hats (recommended for getting started)
|
|
135
149
|
ralph init --backend claude
|
|
136
150
|
|
|
137
|
-
#
|
|
151
|
+
# Hat-based mode — use a preset workflow with specialized personas
|
|
138
152
|
ralph init --preset tdd-red-green
|
|
139
153
|
|
|
140
154
|
# Combine preset with different backend
|
|
@@ -144,7 +158,7 @@ ralph init --preset spec-driven --backend kiro
|
|
|
144
158
|
ralph init --list-presets
|
|
145
159
|
```
|
|
146
160
|
|
|
147
|
-
This creates `ralph.yml` in your current directory.
|
|
161
|
+
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
162
|
|
|
149
163
|
### 2. Define Your Task
|
|
150
164
|
|
|
@@ -188,14 +202,34 @@ ralph resume
|
|
|
188
202
|
ralph run --dry-run
|
|
189
203
|
```
|
|
190
204
|
|
|
205
|
+
### Alternative: SOP-Driven Sessions
|
|
206
|
+
|
|
207
|
+
For standalone planning and task generation (without Ralph's event loop), use these commands:
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
# Start an interactive PDD planning session
|
|
211
|
+
ralph plan # SOP prompts for input
|
|
212
|
+
ralph plan "build a REST API" # Provide idea inline
|
|
213
|
+
ralph plan --backend kiro "my idea" # Use specific backend
|
|
214
|
+
|
|
215
|
+
# Generate code task files from descriptions
|
|
216
|
+
ralph task # SOP prompts for input
|
|
217
|
+
ralph task "add authentication" # From description
|
|
218
|
+
ralph task specs/feature/plan.md # From PDD plan file
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
These commands spawn an interactive AI session with bundled SOPs — perfect for one-off planning without configuring a full workflow.
|
|
222
|
+
|
|
191
223
|
## Configuration
|
|
192
224
|
|
|
193
225
|
Ralph uses a YAML configuration file (`ralph.yml` by default).
|
|
194
226
|
|
|
195
|
-
###
|
|
227
|
+
### Traditional Mode (No Hats)
|
|
228
|
+
|
|
229
|
+
The simplest configuration — just a loop that runs until completion:
|
|
196
230
|
|
|
197
231
|
```yaml
|
|
198
|
-
# ralph.yml
|
|
232
|
+
# ralph.yml — Traditional mode
|
|
199
233
|
cli:
|
|
200
234
|
backend: "claude"
|
|
201
235
|
|
|
@@ -204,6 +238,37 @@ event_loop:
|
|
|
204
238
|
max_iterations: 100
|
|
205
239
|
```
|
|
206
240
|
|
|
241
|
+
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.
|
|
242
|
+
|
|
243
|
+
### Hat-Based Mode (Specialized Personas)
|
|
244
|
+
|
|
245
|
+
> Ralph can wear many hats.
|
|
246
|
+
|
|
247
|
+
Add a `hats` section to enable role-based orchestration. Hats subscribe to events (triggers) and publish events when done:
|
|
248
|
+
|
|
249
|
+
```yaml
|
|
250
|
+
# ralph.yml — Hat-based mode (example structure)
|
|
251
|
+
cli:
|
|
252
|
+
backend: "claude"
|
|
253
|
+
|
|
254
|
+
event_loop:
|
|
255
|
+
completion_promise: "LOOP_COMPLETE"
|
|
256
|
+
max_iterations: 100
|
|
257
|
+
starting_event: "task.start"
|
|
258
|
+
|
|
259
|
+
hats:
|
|
260
|
+
my_hat:
|
|
261
|
+
name: "🎯 My Hat"
|
|
262
|
+
triggers: ["task.start"] # Events that activate this hat
|
|
263
|
+
publishes: ["work.done"] # Events this hat can emit
|
|
264
|
+
instructions: |
|
|
265
|
+
Your instructions here...
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
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.
|
|
269
|
+
|
|
270
|
+
> **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.
|
|
271
|
+
|
|
207
272
|
### Full Configuration Reference
|
|
208
273
|
|
|
209
274
|
```yaml
|
|
@@ -217,7 +282,7 @@ event_loop:
|
|
|
217
282
|
|
|
218
283
|
# CLI backend settings
|
|
219
284
|
cli:
|
|
220
|
-
backend: "claude" # claude, kiro, gemini, codex, amp, custom
|
|
285
|
+
backend: "claude" # claude, kiro, gemini, codex, amp, copilot, custom
|
|
221
286
|
prompt_mode: "arg" # arg (CLI argument) or stdin
|
|
222
287
|
experimental_tui: false # Enable TUI mode support
|
|
223
288
|
|
|
@@ -311,7 +376,7 @@ ralph init --preset debug --force
|
|
|
311
376
|
|
|
312
377
|
### Hats
|
|
313
378
|
|
|
314
|
-
Hats are specialized
|
|
379
|
+
Hats are specialized Ralph personas. Each hat has:
|
|
315
380
|
|
|
316
381
|
- **Triggers**: Events that activate this hat
|
|
317
382
|
- **Publishes**: Events this hat can emit
|
|
@@ -348,6 +413,8 @@ tests: pass, lint: pass, typecheck: pass
|
|
|
348
413
|
|---------|-------------|
|
|
349
414
|
| `ralph run` | Run the orchestration loop (default) |
|
|
350
415
|
| `ralph resume` | Resume from existing scratchpad |
|
|
416
|
+
| `ralph plan` | Start an interactive PDD planning session |
|
|
417
|
+
| `ralph task` | Start an interactive code-task-generator session |
|
|
351
418
|
| `ralph events` | View event history |
|
|
352
419
|
| `ralph init` | Initialize configuration file |
|
|
353
420
|
| `ralph clean` | Clean up `.agent/` directory |
|
|
@@ -380,11 +447,25 @@ tests: pass, lint: pass, typecheck: pass
|
|
|
380
447
|
|
|
381
448
|
| Option | Description |
|
|
382
449
|
|--------|-------------|
|
|
383
|
-
| `--backend <NAME>` | Backend: `claude`, `kiro`, `gemini`, `codex`, `amp` |
|
|
450
|
+
| `--backend <NAME>` | Backend: `claude`, `kiro`, `gemini`, `codex`, `amp`, `copilot` |
|
|
384
451
|
| `--preset <NAME>` | Use preset configuration |
|
|
385
452
|
| `--list-presets` | List available presets |
|
|
386
453
|
| `--force` | Overwrite existing config |
|
|
387
454
|
|
|
455
|
+
### `ralph plan` Options
|
|
456
|
+
|
|
457
|
+
| Option | Description |
|
|
458
|
+
|--------|-------------|
|
|
459
|
+
| `<IDEA>` | Optional rough idea to develop (SOP prompts if not provided) |
|
|
460
|
+
| `-b, --backend <BACKEND>` | Backend to use (overrides config and auto-detection) |
|
|
461
|
+
|
|
462
|
+
### `ralph task` Options
|
|
463
|
+
|
|
464
|
+
| Option | Description |
|
|
465
|
+
|--------|-------------|
|
|
466
|
+
| `<INPUT>` | Optional description text or path to PDD plan file |
|
|
467
|
+
| `-b, --backend <BACKEND>` | Backend to use (overrides config and auto-detection) |
|
|
468
|
+
|
|
388
469
|
## Architecture
|
|
389
470
|
|
|
390
471
|
Ralph is organized as a Cargo workspace with six crates:
|
|
@@ -475,3 +556,7 @@ MIT License — See [LICENSE](LICENSE) for details.
|
|
|
475
556
|
---
|
|
476
557
|
|
|
477
558
|
*"I'm learnding!" - Ralph Wiggum*
|
|
559
|
+
|
|
560
|
+
---
|
|
561
|
+
|
|
562
|
+
[](https://www.star-history.com/#mikeyobrien/ralph-orchestrator&type=date&legend=top-left)
|
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.8"
|
|
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.8"
|
|
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.8",
|
|
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.8",
|
|
66
66
|
"volta": {
|
|
67
67
|
"node": "18.14.1",
|
|
68
68
|
"npm": "9.5.0"
|