ralph-lisa-loop 0.3.0 → 0.3.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 CHANGED
@@ -36,7 +36,7 @@ Ralph writes → Lisa reviews → Consensus → Next step
36
36
  ### 1. Install
37
37
 
38
38
  ```bash
39
- npm i -g ralph-lisa
39
+ npm i -g ralph-lisa-loop
40
40
  ```
41
41
 
42
42
  ### 2. Initialize Project
@@ -61,22 +61,16 @@ ralph-lisa auto "implement login feature"
61
61
  **Terminal 1 - Ralph (Claude Code)**:
62
62
  ```bash
63
63
  ralph-lisa whose-turn # Check turn
64
- # ... do work ...
65
- ralph-lisa submit-ralph "[PLAN] Login feature design
66
-
67
- 1. Create login form component
68
- 2. Add validation
69
- 3. Connect to API"
64
+ # ... do work, write submission to .dual-agent/submit.md ...
65
+ ralph-lisa submit-ralph --file .dual-agent/submit.md
70
66
  ```
71
67
 
72
68
  **Terminal 2 - Lisa (Codex)**:
73
69
  ```bash
74
70
  ralph-lisa whose-turn # Check turn
75
71
  ralph-lisa read work.md # Read Ralph's work
76
- ralph-lisa submit-lisa "[PASS] Plan looks good
77
-
78
- - Clear structure
79
- - Good separation of concerns"
72
+ # ... write review to .dual-agent/submit.md ...
73
+ ralph-lisa submit-lisa --file .dual-agent/submit.md
80
74
  ```
81
75
 
82
76
  ## Features
@@ -126,7 +120,7 @@ export RL_POLICY_MODE=warn
126
120
  # Enable block mode (rejects non-compliant submissions)
127
121
  export RL_POLICY_MODE=block
128
122
 
129
- # Disable (default)
123
+ # Disable
130
124
  export RL_POLICY_MODE=off
131
125
  ```
132
126
 
@@ -144,6 +138,27 @@ Policy rules:
144
138
  - Ralph's [RESEARCH] must have substantive content
145
139
  - Lisa's [PASS]/[NEEDS_WORK] must include at least 1 reason
146
140
 
141
+ ### Mid-Session Task Update
142
+ Change direction without restarting:
143
+ ```bash
144
+ ralph-lisa update-task "switch to REST instead of GraphQL"
145
+ ```
146
+ Appends to task.md (preserving history). Task context is auto-injected into work.md submissions and watcher trigger messages so both agents always see the current goal.
147
+
148
+ ### Round 1 Mandatory Plan
149
+ Ralph's first submission must be `[PLAN]` — gives Lisa a chance to verify task understanding before coding begins.
150
+
151
+ ### Goal Guardian
152
+ Lisa reads task.md before every review and checks for direction drift. Catching misalignment early is prioritized over code-level review.
153
+
154
+ ### Watcher v3
155
+ - **Fire-and-forget triggering**: Removed output stability wait and delivery verification for faster turn transitions
156
+ - **30s cooldown**: Prevents re-triggering during normal work
157
+ - **Checkpoint system**: Set `RL_CHECKPOINT_ROUNDS=N` to pause for human review every N rounds
158
+ - **Auto-restart**: Watcher automatically restarts on crash (session-guarded)
159
+ - **Configurable log threshold**: `RL_LOG_MAX_MB` (default 5, min 1) with proportional tail retention
160
+ - **Heartbeat file**: `.dual-agent/.watcher_heartbeat` for external liveness checks
161
+
147
162
  ### Deadlock Escape
148
163
  After 5 rounds without consensus: `[OVERRIDE]` (proceed anyway) or `[HANDOFF]` (escalate to human).
149
164
 
@@ -161,17 +176,28 @@ ralph-lisa auto --full-auto "task" # Auto mode without permission prompts
161
176
 
162
177
  # Turn control
163
178
  ralph-lisa whose-turn # Check whose turn
164
- ralph-lisa submit-ralph "[TAG] ..." # Ralph submits
165
- ralph-lisa submit-lisa "[TAG] ..." # Lisa submits
179
+ ralph-lisa check-turn # Alias for whose-turn
180
+ ralph-lisa submit-ralph --file f.md # Ralph submits (recommended)
181
+ ralph-lisa submit-lisa --file f.md # Lisa submits (recommended)
182
+ ralph-lisa submit-ralph --stdin # Submit via stdin pipe
183
+ ralph-lisa submit-lisa --stdin # Lisa submit via stdin pipe
184
+ ralph-lisa submit-ralph "[TAG] ..." # Inline (deprecated)
166
185
 
167
186
  # Information
168
187
  ralph-lisa status # Current status
169
188
  ralph-lisa read work.md # Ralph's latest
170
189
  ralph-lisa read review.md # Lisa's latest
190
+ ralph-lisa read-review # Alias for read review.md
191
+ ralph-lisa read review --round N # Read review from round N
171
192
  ralph-lisa history # Full history
193
+ ralph-lisa recap # Context recovery summary
194
+ ralph-lisa logs # List transcript logs
195
+ ralph-lisa logs cat [name] # View a specific log
172
196
 
173
197
  # Flow control
174
- ralph-lisa step "phase-name" # Enter new phase
198
+ ralph-lisa step "phase-name" # Enter new phase (requires consensus)
199
+ ralph-lisa step --force "phase-name" # Enter new phase (skip consensus check)
200
+ ralph-lisa update-task "new direction" # Update task direction mid-session
175
201
  ralph-lisa archive [name] # Archive session
176
202
  ralph-lisa clean # Clean session
177
203
 
@@ -199,6 +225,7 @@ your-project/
199
225
  │ └── skills/ # Codex skills
200
226
  └── .dual-agent/ # Session state
201
227
  ├── turn.txt # Current turn
228
+ ├── task.md # Task goal (updated via update-task)
202
229
  ├── work.md # Ralph's submissions
203
230
  ├── review.md # Lisa's submissions
204
231
  └── history.md # Full history
@@ -220,14 +247,21 @@ For auto mode:
220
247
  - tmux (required)
221
248
  - fswatch (macOS) or inotify-tools (Linux) — optional, speeds up turn detection; falls back to polling without them
222
249
 
250
+ ## Environment Variables
251
+
252
+ | Variable | Default | Description |
253
+ |----------|---------|-------------|
254
+ | `RL_POLICY_MODE` | `warn` | Policy check mode: `off`, `warn`, `block` |
255
+ | `RL_CHECKPOINT_ROUNDS` | `0` (disabled) | Pause for human review every N rounds |
256
+ | `RL_LOG_MAX_MB` | `5` | Pane log truncation threshold in MB (min 1) |
257
+
223
258
  ## Ecosystem
224
259
 
225
260
  Part of the [TigerHill](https://github.com/Click-Intelligence-LLC/TigerHill) project family.
226
261
 
227
262
  ## See Also
228
263
 
229
- - [CONCEPT.md](CONCEPT.md) - Why dual-agent collaboration works
230
- - [UPGRADE_PLAN_V3.md](UPGRADE_PLAN_V3.md) - V3 design document
264
+ - [CONCEPT.md](../CONCEPT.md) - Why dual-agent collaboration works
231
265
 
232
266
  ## License
233
267
 
package/dist/cli.js CHANGED
@@ -21,6 +21,7 @@ switch (cmd) {
21
21
  (0, commands_js_1.cmdUninit)();
22
22
  break;
23
23
  case "whose-turn":
24
+ case "check-turn":
24
25
  (0, commands_js_1.cmdWhoseTurn)();
25
26
  break;
26
27
  case "submit-ralph":
@@ -35,10 +36,14 @@ switch (cmd) {
35
36
  case "read":
36
37
  (0, commands_js_1.cmdRead)(rest);
37
38
  break;
39
+ case "read-review":
40
+ (0, commands_js_1.cmdRead)(["review.md", ...rest]);
41
+ break;
38
42
  case "recap":
39
43
  (0, commands_js_1.cmdRecap)();
40
44
  break;
41
45
  case "step":
46
+ case "next-step":
42
47
  (0, commands_js_1.cmdStep)(rest);
43
48
  break;
44
49
  case "history":
@@ -65,6 +70,9 @@ switch (cmd) {
65
70
  case "logs":
66
71
  (0, commands_js_1.cmdLogs)(rest);
67
72
  break;
73
+ case "update-task":
74
+ (0, commands_js_1.cmdUpdateTask)(rest);
75
+ break;
68
76
  case "help":
69
77
  case "--help":
70
78
  case "-h":
@@ -93,11 +101,13 @@ function showHelp() {
93
101
  console.log(' ralph-lisa auto --full-auto "task" Auto mode without permission prompts');
94
102
  console.log("");
95
103
  console.log("Turn Control:");
96
- console.log(" ralph-lisa whose-turn Check whose turn");
97
- console.log(' ralph-lisa submit-ralph "[TAG]..." Ralph submits');
98
- console.log(" ralph-lisa submit-ralph --file <f> Ralph submits from file");
99
- console.log(' ralph-lisa submit-lisa "[TAG]..." Lisa submits');
100
- console.log(" ralph-lisa submit-lisa --file <f> Lisa submits from file");
104
+ console.log(" ralph-lisa check-turn Check whose turn (alias: whose-turn)");
105
+ console.log(" ralph-lisa submit-ralph --file <f> Ralph submits from file (recommended)");
106
+ console.log(" ralph-lisa submit-lisa --file <f> Lisa submits from file (recommended)");
107
+ console.log(" ralph-lisa submit-ralph --stdin Ralph submits from stdin");
108
+ console.log(" ralph-lisa submit-lisa --stdin Lisa submits from stdin");
109
+ console.log(' ralph-lisa submit-ralph "[TAG]..." Ralph submits inline (deprecated)');
110
+ console.log(' ralph-lisa submit-lisa "[TAG]..." Lisa submits inline (deprecated)');
101
111
  console.log("");
102
112
  console.log("Tags:");
103
113
  console.log(" Ralph: [PLAN] [RESEARCH] [CODE] [FIX] [CHALLENGE] [DISCUSS] [QUESTION] [CONSENSUS]");
@@ -105,12 +115,14 @@ function showHelp() {
105
115
  console.log("");
106
116
  console.log("Information:");
107
117
  console.log(" ralph-lisa status Show current status");
108
- console.log(" ralph-lisa read <file> Read work.md/review.md");
118
+ console.log(" ralph-lisa read-review Read Lisa's review (alias: read review.md)");
119
+ console.log(" ralph-lisa read <file> Read work.md/review.md/etc");
109
120
  console.log(" ralph-lisa recap Context recovery summary");
110
121
  console.log(" ralph-lisa history Show full history");
111
122
  console.log("");
112
123
  console.log("Flow Control:");
113
- console.log(' ralph-lisa step "name" Enter new step');
124
+ console.log(' ralph-lisa next-step "name" Enter new step (alias: step)');
125
+ console.log(' ralph-lisa update-task "desc" Update task direction');
114
126
  console.log(" ralph-lisa archive [name] Archive session");
115
127
  console.log(" ralph-lisa clean Clean session");
116
128
  console.log("");
@@ -137,6 +149,6 @@ function showVersion() {
137
149
  console.log(`ralph-lisa-loop v${pkg.version}`);
138
150
  }
139
151
  catch {
140
- console.log("ralph-lisa-loop v0.3.0");
152
+ console.log("ralph-lisa-loop v0.3.9");
141
153
  }
142
154
  }
@@ -2,6 +2,13 @@
2
2
  * CLI commands for Ralph-Lisa Loop.
3
3
  * Direct port of io.sh logic to Node/TS.
4
4
  */
5
+ /**
6
+ * Generate a project-specific tmux session name to avoid conflicts
7
+ * when running multiple projects simultaneously.
8
+ * Format: rll-{sanitized-dirname}-{short-hash}
9
+ * tmux session names cannot contain '.' or ':'.
10
+ */
11
+ export declare function generateSessionName(projectDir: string): string;
5
12
  export declare function cmdInit(args: string[]): void;
6
13
  export declare function cmdWhoseTurn(): void;
7
14
  export declare function cmdSubmitRalph(args: string[]): void;
@@ -13,6 +20,7 @@ export declare function cmdStep(args: string[]): void;
13
20
  export declare function cmdHistory(): void;
14
21
  export declare function cmdArchive(args: string[]): void;
15
22
  export declare function cmdClean(): void;
23
+ export declare function cmdUpdateTask(args: string[]): void;
16
24
  export declare function cmdUninit(): void;
17
25
  export declare function cmdInitProject(args: string[]): void;
18
26
  export declare function cmdStart(args: string[]): void;