ralphflow 0.4.0 → 0.5.0
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 +77 -87
- package/dist/chunk-TCCMQDVT.js +505 -0
- package/dist/ralphflow.js +207 -275
- package/dist/server-DOSLU36L.js +821 -0
- package/package.json +1 -2
- package/src/dashboard/ui/index.html +2760 -350
- package/src/templates/code-implementation/loops/00-story-loop/prompt.md +12 -6
- package/src/templates/code-implementation/ralphflow.yaml +3 -0
- package/src/templates/research/ralphflow.yaml +4 -0
- package/dist/chunk-GVOJO5IN.js +0 -274
- package/dist/server-O6J52DZT.js +0 -323
package/README.md
CHANGED
|
@@ -15,23 +15,26 @@ Define pipelines as loops, coordinate parallel agents via file-based trackers, a
|
|
|
15
15
|
npx ralphflow
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
This starts the web dashboard at `http://localhost:4242` and opens it in your browser. From the dashboard you can create apps, run loops, edit prompts, monitor agents, and browse archives — all in one place.
|
|
19
19
|
|
|
20
|
-
###
|
|
20
|
+
### CLI Commands
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
|
-
#
|
|
23
|
+
# Initialize a new flow
|
|
24
24
|
npx ralphflow init --template code-implementation --name my-app
|
|
25
|
+
|
|
26
|
+
# Run loops
|
|
25
27
|
npx ralphflow run story
|
|
26
28
|
npx ralphflow run tasks
|
|
27
29
|
npx ralphflow run tasks --multi-agent # Multi-agent — one terminal per agent
|
|
28
30
|
npx ralphflow run delivery
|
|
29
|
-
npx ralphflow status
|
|
30
31
|
|
|
31
|
-
#
|
|
32
|
-
npx ralphflow
|
|
33
|
-
npx ralphflow
|
|
34
|
-
|
|
32
|
+
# Run with live dashboard alongside
|
|
33
|
+
npx ralphflow run tasks --ui
|
|
34
|
+
npx ralphflow e2e --ui
|
|
35
|
+
|
|
36
|
+
# Check status
|
|
37
|
+
npx ralphflow status
|
|
35
38
|
```
|
|
36
39
|
|
|
37
40
|
## How It Works
|
|
@@ -59,9 +62,33 @@ Story Loop Tasks Loop Delivery Loop
|
|
|
59
62
|
agent-1 agent-2 agent-3
|
|
60
63
|
```
|
|
61
64
|
|
|
65
|
+
## Web Dashboard
|
|
66
|
+
|
|
67
|
+
The dashboard (`http://localhost:4242`) is the primary interface for managing workflows.
|
|
68
|
+
|
|
69
|
+
**Features:**
|
|
70
|
+
- **Live pipeline view** — color-coded loop status (complete/running/pending)
|
|
71
|
+
- **Per-loop detail** — stage, active item, progress bar, agent table
|
|
72
|
+
- **Prompt editor** — edit prompt files with Cmd+S save and dirty indicator
|
|
73
|
+
- **Tracker viewer** — auto-updates as agents write via WebSocket
|
|
74
|
+
- **Model selector** — per-loop model configuration (claude-sonnet-4-6, claude-opus-4-6, etc.)
|
|
75
|
+
- **Attention notifications** — real-time alerts when Claude needs input, with desktop notifications and audio chime
|
|
76
|
+
- **App archiving** — snapshot and reset flows to start fresh
|
|
77
|
+
- **Archive browser** — browse past snapshots with timeline view and file viewer
|
|
78
|
+
- **Template creator** — build custom templates with a visual config builder and live YAML preview
|
|
79
|
+
- **Create app** — initialize new flows from built-in or custom templates
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
npx ralphflow dashboard # Default port 4242
|
|
83
|
+
npx ralphflow dashboard -p 3000 # Custom port
|
|
84
|
+
npx ralphflow ui # Alias
|
|
85
|
+
```
|
|
86
|
+
|
|
62
87
|
## Commands
|
|
63
88
|
|
|
64
|
-
|
|
89
|
+
### `npx ralphflow` (no args)
|
|
90
|
+
|
|
91
|
+
Starts the dashboard and opens it in your browser. This is the recommended way to use RalphFlow.
|
|
65
92
|
|
|
66
93
|
### `npx ralphflow init`
|
|
67
94
|
|
|
@@ -73,55 +100,30 @@ npx ralphflow init --template code-implementation --name api # Non-interactive
|
|
|
73
100
|
npx ralphflow init --template research --name kashi # Research pipeline
|
|
74
101
|
```
|
|
75
102
|
|
|
76
|
-
Requires `CLAUDE.md` to exist in your project root. If it doesn't, you'll be prompted to create one first.
|
|
77
|
-
|
|
78
103
|
**Options:**
|
|
79
|
-
- `-t, --template <name>` — Template to use (`code-implementation`, `research
|
|
104
|
+
- `-t, --template <name>` — Template to use (`code-implementation`, `research`, or any custom template)
|
|
80
105
|
- `-n, --name <name>` — Custom name for the flow
|
|
81
106
|
|
|
82
107
|
### `npx ralphflow run <loop>`
|
|
83
108
|
|
|
84
|
-
Runs a loop. Handles the iteration cycle — spawning Claude, detecting completion signals, and restarting
|
|
109
|
+
Runs a loop. Handles the iteration cycle — spawning Claude, detecting completion signals, and restarting.
|
|
85
110
|
|
|
86
111
|
```bash
|
|
87
112
|
npx ralphflow run story # Run story loop (interactive Claude session)
|
|
88
113
|
npx ralphflow run tasks # Run tasks loop (single agent)
|
|
89
|
-
npx ralphflow run tasks --multi-agent # Run as a multi-agent instance
|
|
90
|
-
npx ralphflow run
|
|
91
|
-
npx ralphflow run
|
|
92
|
-
npx ralphflow run tasks --max-iterations 5 # Limit iterations
|
|
114
|
+
npx ralphflow run tasks --multi-agent # Run as a multi-agent instance
|
|
115
|
+
npx ralphflow run tasks --ui # Run with live dashboard alongside
|
|
116
|
+
npx ralphflow run tasks -m claude-opus-4-6 # Use a specific model
|
|
93
117
|
```
|
|
94
118
|
|
|
95
|
-
Each
|
|
96
|
-
|
|
97
|
-
**Multi-agent mode:** Instead of spawning N agents from one process, each terminal is one agent. Open multiple terminals, run `--multi-agent` in each, and they auto-assign sequential agent IDs (`agent-1`, `agent-2`, ...) via PID-based lock files. Stale agents are automatically cleaned up.
|
|
119
|
+
**Multi-agent mode:** Each terminal is one agent. Open multiple terminals, run `--multi-agent` in each, and they auto-assign sequential agent IDs (`agent-1`, `agent-2`, ...) via PID-based lock files.
|
|
98
120
|
|
|
99
121
|
**Options:**
|
|
100
|
-
- `--multi-agent` — Run as a multi-agent instance
|
|
122
|
+
- `--multi-agent` — Run as a multi-agent instance
|
|
101
123
|
- `--ui` — Start the web dashboard alongside execution
|
|
102
|
-
- `-m, --model <model>` — Claude model to use
|
|
124
|
+
- `-m, --model <model>` — Claude model to use (overrides per-loop config)
|
|
103
125
|
- `-n, --max-iterations <n>` — Maximum iterations (default: 30)
|
|
104
|
-
- `-f, --flow <name>` — Which flow to run
|
|
105
|
-
|
|
106
|
-
### `npx ralphflow dashboard`
|
|
107
|
-
|
|
108
|
-
Starts a real-time web dashboard at `http://localhost:4242`. Shows all apps, loop pipelines, tracker status, and lets you edit prompt files — all updated live via WebSocket as agents work.
|
|
109
|
-
|
|
110
|
-
```bash
|
|
111
|
-
npx ralphflow dashboard # Default port 4242
|
|
112
|
-
npx ralphflow dashboard -p 3000 # Custom port
|
|
113
|
-
npx ralphflow ui # Alias
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
**Features:**
|
|
117
|
-
- Live pipeline view with color-coded status (complete/running/pending)
|
|
118
|
-
- Per-loop detail: stage, active item, progress bar, agent table
|
|
119
|
-
- Prompt editor with Cmd+S save and dirty indicator
|
|
120
|
-
- Live tracker viewer (auto-updates as agents write)
|
|
121
|
-
- WebSocket auto-reconnect with exponential backoff
|
|
122
|
-
|
|
123
|
-
**Options:**
|
|
124
|
-
- `-p, --port <port>` — Port number (default: 4242)
|
|
126
|
+
- `-f, --flow <name>` — Which flow to run
|
|
125
127
|
|
|
126
128
|
### `npx ralphflow e2e`
|
|
127
129
|
|
|
@@ -130,23 +132,17 @@ Runs all loops end-to-end with SQLite orchestration. Skips loops already complet
|
|
|
130
132
|
```bash
|
|
131
133
|
npx ralphflow e2e # Run all loops
|
|
132
134
|
npx ralphflow e2e --ui # With live dashboard
|
|
133
|
-
npx ralphflow e2e --flow my-app # Specific flow
|
|
134
135
|
```
|
|
135
136
|
|
|
136
137
|
**Options:**
|
|
137
|
-
- `--ui` — Start the web dashboard alongside
|
|
138
|
+
- `--ui` — Start the web dashboard alongside
|
|
138
139
|
- `-m, --model <model>` — Claude model to use
|
|
139
140
|
- `-n, --max-iterations <n>` — Maximum iterations per loop (default: 30)
|
|
140
|
-
- `-f, --flow <name>` — Which flow to run
|
|
141
|
+
- `-f, --flow <name>` — Which flow to run
|
|
141
142
|
|
|
142
143
|
### `npx ralphflow status`
|
|
143
144
|
|
|
144
|
-
Shows the current state of all loops
|
|
145
|
-
|
|
146
|
-
```bash
|
|
147
|
-
npx ralphflow status # All flows
|
|
148
|
-
npx ralphflow status --flow my-app # Specific flow
|
|
149
|
-
```
|
|
145
|
+
Shows the current state of all loops.
|
|
150
146
|
|
|
151
147
|
```
|
|
152
148
|
RalphFlow — my-app
|
|
@@ -157,32 +153,40 @@ npx ralphflow status --flow my-app # Specific flow
|
|
|
157
153
|
Delivery Loop idle none 0/0
|
|
158
154
|
```
|
|
159
155
|
|
|
160
|
-
|
|
161
|
-
- `-f, --flow <name>` — Show status for a specific flow
|
|
162
|
-
|
|
163
|
-
## Multiple Flows
|
|
164
|
-
|
|
165
|
-
You can run multiple flows in the same project — useful for separate workstreams:
|
|
156
|
+
## Per-Loop Model Configuration
|
|
166
157
|
|
|
167
|
-
|
|
168
|
-
npx ralphflow init --template code-implementation --name frontend
|
|
169
|
-
npx ralphflow init --template code-implementation --name backend
|
|
170
|
-
npx ralphflow init --template research --name market-research
|
|
158
|
+
Each loop in `ralphflow.yaml` supports an optional `model` field:
|
|
171
159
|
|
|
172
|
-
|
|
160
|
+
```yaml
|
|
161
|
+
loops:
|
|
162
|
+
story-loop:
|
|
163
|
+
model: claude-sonnet-4-6
|
|
164
|
+
tasks-loop:
|
|
165
|
+
model: claude-opus-4-6
|
|
173
166
|
```
|
|
174
167
|
|
|
175
|
-
|
|
168
|
+
**Resolution order:** CLI `--model` flag → per-loop `model` from config → Claude default. The dashboard includes a model selector dropdown to configure this per loop.
|
|
176
169
|
|
|
177
170
|
## Templates
|
|
178
171
|
|
|
179
|
-
###
|
|
172
|
+
### Built-in
|
|
180
173
|
|
|
181
|
-
Story → Tasks → Delivery pipeline for code projects
|
|
174
|
+
- **`code-implementation`** — Story → Tasks → Delivery pipeline for code projects
|
|
175
|
+
- **`research`** — Discovery → Research → Story → Document pipeline for research projects
|
|
182
176
|
|
|
183
|
-
###
|
|
177
|
+
### Custom Templates
|
|
184
178
|
|
|
185
|
-
|
|
179
|
+
Create custom templates via the dashboard's Template Creator or the API. Custom templates are stored in `.ralph-flow/.templates/` and appear alongside built-in templates when creating new apps.
|
|
180
|
+
|
|
181
|
+
## Multiple Flows
|
|
182
|
+
|
|
183
|
+
Run multiple flows in the same project for separate workstreams:
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
npx ralphflow init --template code-implementation --name frontend
|
|
187
|
+
npx ralphflow init --template code-implementation --name backend
|
|
188
|
+
npx ralphflow init --template research --name market-research
|
|
189
|
+
```
|
|
186
190
|
|
|
187
191
|
## Project Structure
|
|
188
192
|
|
|
@@ -197,19 +201,14 @@ your-project/
|
|
|
197
201
|
├── 00-story-loop/
|
|
198
202
|
│ ├── prompt.md # Agent instructions
|
|
199
203
|
│ ├── tracker.md # State tracking
|
|
200
|
-
│
|
|
201
|
-
│ └── loop.md # Manual run instructions
|
|
204
|
+
│ └── stories.md # Story definitions
|
|
202
205
|
├── 01-tasks-loop/
|
|
203
206
|
│ ├── prompt.md
|
|
204
207
|
│ ├── tracker.md
|
|
205
|
-
│
|
|
206
|
-
│ ├── loop.md
|
|
207
|
-
│ ├── phases/ # Phase documentation
|
|
208
|
-
│ └── testing/ # Test documentation
|
|
208
|
+
│ └── tasks.md
|
|
209
209
|
└── 02-delivery-loop/
|
|
210
210
|
├── prompt.md
|
|
211
|
-
|
|
212
|
-
└── loop.md
|
|
211
|
+
└── tracker.md
|
|
213
212
|
```
|
|
214
213
|
|
|
215
214
|
## CLAUDE.md
|
|
@@ -217,11 +216,10 @@ your-project/
|
|
|
217
216
|
`CLAUDE.md` is a first-class citizen of the workflow:
|
|
218
217
|
|
|
219
218
|
- **Story loop** reads it for project context
|
|
220
|
-
- **Tasks loop** reads it for architecture, stack, conventions, commands
|
|
221
|
-
- **Tasks loop updates it** after each task (keeping changes under 150 words net)
|
|
219
|
+
- **Tasks loop** reads it for architecture, stack, conventions, and commands — and updates it after each task
|
|
222
220
|
- **Delivery loop** reads it for project context and patterns
|
|
223
221
|
|
|
224
|
-
RalphFlow requires `CLAUDE.md` to exist before initializing a flow.
|
|
222
|
+
RalphFlow requires `CLAUDE.md` to exist before initializing a flow.
|
|
225
223
|
|
|
226
224
|
## Install
|
|
227
225
|
|
|
@@ -231,14 +229,6 @@ No install required — use `npx ralphflow` directly. Or install globally:
|
|
|
231
229
|
npm install -g ralphflow
|
|
232
230
|
```
|
|
233
231
|
|
|
234
|
-
Then use without the `npx` prefix:
|
|
235
|
-
|
|
236
|
-
```bash
|
|
237
|
-
ralphflow init --template code-implementation --name my-app
|
|
238
|
-
ralphflow run story
|
|
239
|
-
ralphflow status
|
|
240
|
-
```
|
|
241
|
-
|
|
242
232
|
## Requirements
|
|
243
233
|
|
|
244
234
|
- Node.js >= 18
|