ralphflow 0.3.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 +103 -73
- package/dist/chunk-TCCMQDVT.js +505 -0
- package/dist/ralphflow.js +282 -282
- package/dist/server-DOSLU36L.js +821 -0
- package/package.json +6 -2
- package/src/dashboard/ui/index.html +3248 -0
- package/src/templates/code-implementation/loops/00-story-loop/prompt.md +28 -14
- package/src/templates/code-implementation/loops/01-tasks-loop/prompt.md +7 -5
- package/src/templates/code-implementation/loops/02-delivery-loop/prompt.md +4 -2
- package/src/templates/code-implementation/ralphflow.yaml +3 -0
- package/src/templates/research/loops/00-discovery-loop/prompt.md +7 -5
- package/src/templates/research/loops/01-research-loop/prompt.md +7 -5
- package/src/templates/research/loops/02-story-loop/prompt.md +4 -2
- package/src/templates/research/loops/03-document-loop/prompt.md +4 -2
- package/src/templates/research/ralphflow.yaml +4 -0
package/README.md
CHANGED
|
@@ -11,25 +11,29 @@ Define pipelines as loops, coordinate parallel agents via file-based trackers, a
|
|
|
11
11
|
## Quick Start
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
#
|
|
15
|
-
|
|
14
|
+
# In your project with a CLAUDE.md
|
|
15
|
+
npx ralphflow
|
|
16
|
+
```
|
|
17
|
+
|
|
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
|
+
|
|
20
|
+
### CLI Commands
|
|
16
21
|
|
|
17
|
-
|
|
22
|
+
```bash
|
|
23
|
+
# Initialize a new flow
|
|
18
24
|
npx ralphflow init --template code-implementation --name my-app
|
|
19
25
|
|
|
20
|
-
#
|
|
26
|
+
# Run loops
|
|
21
27
|
npx ralphflow run story
|
|
22
|
-
|
|
23
|
-
# 4. Run the tasks loop — agents implement your stories
|
|
24
28
|
npx ralphflow run tasks
|
|
25
|
-
|
|
26
|
-
# 5. Run with multiple agents for parallel execution
|
|
27
|
-
npx ralphflow run tasks --agents 3
|
|
28
|
-
|
|
29
|
-
# 6. Deliver — review, get feedback, resolve
|
|
29
|
+
npx ralphflow run tasks --multi-agent # Multi-agent — one terminal per agent
|
|
30
30
|
npx ralphflow run delivery
|
|
31
31
|
|
|
32
|
-
#
|
|
32
|
+
# Run with live dashboard alongside
|
|
33
|
+
npx ralphflow run tasks --ui
|
|
34
|
+
npx ralphflow e2e --ui
|
|
35
|
+
|
|
36
|
+
# Check status
|
|
33
37
|
npx ralphflow status
|
|
34
38
|
```
|
|
35
39
|
|
|
@@ -41,9 +45,9 @@ The default `code-implementation` template ships with three loops:
|
|
|
41
45
|
|
|
42
46
|
| Loop | Purpose | Mode |
|
|
43
47
|
|------|---------|------|
|
|
44
|
-
| **Story Loop** | Break features into stories and tasks | Interactive
|
|
45
|
-
| **Tasks Loop** | Implement tasks, commit code, update CLAUDE.md | Single or multi-agent (
|
|
46
|
-
| **Delivery Loop** | Review completed work, gather feedback | Interactive
|
|
48
|
+
| **Story Loop** | Break features into stories and tasks | Interactive Claude Code session |
|
|
49
|
+
| **Tasks Loop** | Implement tasks, commit code, update CLAUDE.md | Single or multi-agent (`--multi-agent`) |
|
|
50
|
+
| **Delivery Loop** | Review completed work, gather feedback | Interactive Claude Code session |
|
|
47
51
|
|
|
48
52
|
### Pipeline Flow
|
|
49
53
|
|
|
@@ -58,9 +62,33 @@ Story Loop Tasks Loop Delivery Loop
|
|
|
58
62
|
agent-1 agent-2 agent-3
|
|
59
63
|
```
|
|
60
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
|
+
|
|
61
87
|
## Commands
|
|
62
88
|
|
|
63
|
-
|
|
89
|
+
### `npx ralphflow` (no args)
|
|
90
|
+
|
|
91
|
+
Starts the dashboard and opens it in your browser. This is the recommended way to use RalphFlow.
|
|
64
92
|
|
|
65
93
|
### `npx ralphflow init`
|
|
66
94
|
|
|
@@ -72,77 +100,93 @@ npx ralphflow init --template code-implementation --name api # Non-interactive
|
|
|
72
100
|
npx ralphflow init --template research --name kashi # Research pipeline
|
|
73
101
|
```
|
|
74
102
|
|
|
75
|
-
Requires `CLAUDE.md` to exist in your project root. If it doesn't, you'll be prompted to create one first.
|
|
76
|
-
|
|
77
103
|
**Options:**
|
|
78
|
-
- `-t, --template <name>` — Template to use (`code-implementation`, `research
|
|
104
|
+
- `-t, --template <name>` — Template to use (`code-implementation`, `research`, or any custom template)
|
|
79
105
|
- `-n, --name <name>` — Custom name for the flow
|
|
80
106
|
|
|
81
107
|
### `npx ralphflow run <loop>`
|
|
82
108
|
|
|
83
|
-
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.
|
|
84
110
|
|
|
85
111
|
```bash
|
|
86
|
-
npx ralphflow run story # Run story loop
|
|
112
|
+
npx ralphflow run story # Run story loop (interactive Claude session)
|
|
87
113
|
npx ralphflow run tasks # Run tasks loop (single agent)
|
|
88
|
-
npx ralphflow run tasks --
|
|
89
|
-
npx ralphflow run
|
|
90
|
-
npx ralphflow run
|
|
91
|
-
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
|
|
92
117
|
```
|
|
93
118
|
|
|
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.
|
|
120
|
+
|
|
94
121
|
**Options:**
|
|
95
|
-
-
|
|
96
|
-
-
|
|
122
|
+
- `--multi-agent` — Run as a multi-agent instance
|
|
123
|
+
- `--ui` — Start the web dashboard alongside execution
|
|
124
|
+
- `-m, --model <model>` — Claude model to use (overrides per-loop config)
|
|
97
125
|
- `-n, --max-iterations <n>` — Maximum iterations (default: 30)
|
|
98
|
-
- `-f, --flow <name>` — Which flow to run
|
|
126
|
+
- `-f, --flow <name>` — Which flow to run
|
|
99
127
|
|
|
100
|
-
### `npx ralphflow
|
|
128
|
+
### `npx ralphflow e2e`
|
|
101
129
|
|
|
102
|
-
|
|
130
|
+
Runs all loops end-to-end with SQLite orchestration. Skips loops already completed.
|
|
103
131
|
|
|
104
132
|
```bash
|
|
105
|
-
npx ralphflow
|
|
106
|
-
npx ralphflow
|
|
133
|
+
npx ralphflow e2e # Run all loops
|
|
134
|
+
npx ralphflow e2e --ui # With live dashboard
|
|
107
135
|
```
|
|
108
136
|
|
|
137
|
+
**Options:**
|
|
138
|
+
- `--ui` — Start the web dashboard alongside
|
|
139
|
+
- `-m, --model <model>` — Claude model to use
|
|
140
|
+
- `-n, --max-iterations <n>` — Maximum iterations per loop (default: 30)
|
|
141
|
+
- `-f, --flow <name>` — Which flow to run
|
|
142
|
+
|
|
143
|
+
### `npx ralphflow status`
|
|
144
|
+
|
|
145
|
+
Shows the current state of all loops.
|
|
146
|
+
|
|
109
147
|
```
|
|
110
148
|
RalphFlow — my-app
|
|
111
149
|
|
|
112
|
-
Loop Stage
|
|
113
|
-
Story Loop analyze
|
|
114
|
-
Tasks Loop —
|
|
115
|
-
|
|
116
|
-
agent-2 verify-document TASK-5 2026-03-08T10:01
|
|
117
|
-
Delivery Loop idle none 0/0
|
|
150
|
+
Loop Stage Active Progress
|
|
151
|
+
Story Loop analyze none 0/0
|
|
152
|
+
Tasks Loop — none 3/6
|
|
153
|
+
Delivery Loop idle none 0/0
|
|
118
154
|
```
|
|
119
155
|
|
|
120
|
-
|
|
121
|
-
- `-f, --flow <name>` — Show status for a specific flow
|
|
122
|
-
|
|
123
|
-
## Multiple Flows
|
|
124
|
-
|
|
125
|
-
You can run multiple flows in the same project — useful for separate workstreams:
|
|
156
|
+
## Per-Loop Model Configuration
|
|
126
157
|
|
|
127
|
-
|
|
128
|
-
npx ralphflow init --template code-implementation --name frontend
|
|
129
|
-
npx ralphflow init --template code-implementation --name backend
|
|
130
|
-
npx ralphflow init --template research --name market-research
|
|
158
|
+
Each loop in `ralphflow.yaml` supports an optional `model` field:
|
|
131
159
|
|
|
132
|
-
|
|
160
|
+
```yaml
|
|
161
|
+
loops:
|
|
162
|
+
story-loop:
|
|
163
|
+
model: claude-sonnet-4-6
|
|
164
|
+
tasks-loop:
|
|
165
|
+
model: claude-opus-4-6
|
|
133
166
|
```
|
|
134
167
|
|
|
135
|
-
|
|
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.
|
|
136
169
|
|
|
137
170
|
## Templates
|
|
138
171
|
|
|
139
|
-
###
|
|
172
|
+
### Built-in
|
|
173
|
+
|
|
174
|
+
- **`code-implementation`** — Story → Tasks → Delivery pipeline for code projects
|
|
175
|
+
- **`research`** — Discovery → Research → Story → Document pipeline for research projects
|
|
140
176
|
|
|
141
|
-
|
|
177
|
+
### Custom Templates
|
|
142
178
|
|
|
143
|
-
|
|
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.
|
|
144
180
|
|
|
145
|
-
|
|
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
|
+
```
|
|
146
190
|
|
|
147
191
|
## Project Structure
|
|
148
192
|
|
|
@@ -157,19 +201,14 @@ your-project/
|
|
|
157
201
|
├── 00-story-loop/
|
|
158
202
|
│ ├── prompt.md # Agent instructions
|
|
159
203
|
│ ├── tracker.md # State tracking
|
|
160
|
-
│
|
|
161
|
-
│ └── loop.md # Manual run instructions
|
|
204
|
+
│ └── stories.md # Story definitions
|
|
162
205
|
├── 01-tasks-loop/
|
|
163
206
|
│ ├── prompt.md
|
|
164
207
|
│ ├── tracker.md
|
|
165
|
-
│
|
|
166
|
-
│ ├── loop.md
|
|
167
|
-
│ ├── phases/ # Phase documentation
|
|
168
|
-
│ └── testing/ # Test documentation
|
|
208
|
+
│ └── tasks.md
|
|
169
209
|
└── 02-delivery-loop/
|
|
170
210
|
├── prompt.md
|
|
171
|
-
|
|
172
|
-
└── loop.md
|
|
211
|
+
└── tracker.md
|
|
173
212
|
```
|
|
174
213
|
|
|
175
214
|
## CLAUDE.md
|
|
@@ -177,11 +216,10 @@ your-project/
|
|
|
177
216
|
`CLAUDE.md` is a first-class citizen of the workflow:
|
|
178
217
|
|
|
179
218
|
- **Story loop** reads it for project context
|
|
180
|
-
- **Tasks loop** reads it for architecture, stack, conventions, commands
|
|
181
|
-
- **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
|
|
182
220
|
- **Delivery loop** reads it for project context and patterns
|
|
183
221
|
|
|
184
|
-
RalphFlow requires `CLAUDE.md` to exist before initializing a flow.
|
|
222
|
+
RalphFlow requires `CLAUDE.md` to exist before initializing a flow.
|
|
185
223
|
|
|
186
224
|
## Install
|
|
187
225
|
|
|
@@ -191,14 +229,6 @@ No install required — use `npx ralphflow` directly. Or install globally:
|
|
|
191
229
|
npm install -g ralphflow
|
|
192
230
|
```
|
|
193
231
|
|
|
194
|
-
Then use without the `npx` prefix:
|
|
195
|
-
|
|
196
|
-
```bash
|
|
197
|
-
ralphflow init --template code-implementation --name my-app
|
|
198
|
-
ralphflow run story
|
|
199
|
-
ralphflow status
|
|
200
|
-
```
|
|
201
|
-
|
|
202
232
|
## Requirements
|
|
203
233
|
|
|
204
234
|
- Node.js >= 18
|