codex-ralph 0.3.2 → 0.4.1
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 +13 -1
- package/agent/ralph-loop.sh +16 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ Minimal Ralph Wiggum Loop runner that feeds a sprint requirement into Codex, one
|
|
|
5
5
|
## Quick start
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npx codex-ralph
|
|
8
|
+
npx codex-ralph path/to/Sprint_0001.md --max-iterations=1
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Telegram progress notifications
|
|
@@ -19,6 +19,18 @@ CODEX_RALPH_TG_CHAT=123456789
|
|
|
19
19
|
|
|
20
20
|
Provide these as environment variables (e.g., when invoking `npx`). Each session generates a UUID and includes it in progress messages.
|
|
21
21
|
|
|
22
|
+
Usage:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
npx codex-ralph path/to/Sprint_0001.md
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Optional flags:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
--max-iterations=10
|
|
32
|
+
```
|
|
33
|
+
|
|
22
34
|
Message format:
|
|
23
35
|
|
|
24
36
|
```
|
package/agent/ralph-loop.sh
CHANGED
|
@@ -9,7 +9,7 @@ PY
|
|
|
9
9
|
)"
|
|
10
10
|
ROOT_DIR="$(cd "$(dirname "$SCRIPT_PATH")/.." && pwd)"
|
|
11
11
|
SPRINT_FILE=""
|
|
12
|
-
MAX_ITERATIONS=
|
|
12
|
+
MAX_ITERATIONS=10
|
|
13
13
|
NOTES_FILE=""
|
|
14
14
|
SESSION_UUID=""
|
|
15
15
|
|
|
@@ -40,11 +40,11 @@ send_telegram() {
|
|
|
40
40
|
|
|
41
41
|
usage() {
|
|
42
42
|
cat <<USAGE
|
|
43
|
-
Usage: ralph-loop
|
|
43
|
+
Usage: ralph-loop SPRINT_PATH [--max-iterations=N]
|
|
44
44
|
|
|
45
45
|
Options:
|
|
46
|
-
|
|
47
|
-
--max-iterations=N Stop after N iterations (0 = no limit).
|
|
46
|
+
SPRINT_PATH Path to the sprint markdown file (required).
|
|
47
|
+
--max-iterations=N Stop after N iterations (0 = no limit, default 10).
|
|
48
48
|
-h, --help Show this help.
|
|
49
49
|
USAGE
|
|
50
50
|
}
|
|
@@ -53,9 +53,6 @@ session_uuid >/dev/null
|
|
|
53
53
|
|
|
54
54
|
for arg in "$@"; do
|
|
55
55
|
case "$arg" in
|
|
56
|
-
--sprint=*)
|
|
57
|
-
SPRINT_FILE="${arg#*=}"
|
|
58
|
-
;;
|
|
59
56
|
--max-iterations=*)
|
|
60
57
|
MAX_ITERATIONS="${arg#*=}"
|
|
61
58
|
;;
|
|
@@ -63,11 +60,20 @@ for arg in "$@"; do
|
|
|
63
60
|
usage
|
|
64
61
|
exit 0
|
|
65
62
|
;;
|
|
66
|
-
|
|
63
|
+
-*)
|
|
67
64
|
echo "Unknown argument: $arg" >&2
|
|
68
65
|
usage >&2
|
|
69
66
|
exit 1
|
|
70
67
|
;;
|
|
68
|
+
*)
|
|
69
|
+
if [[ -z "$SPRINT_FILE" ]]; then
|
|
70
|
+
SPRINT_FILE="$arg"
|
|
71
|
+
else
|
|
72
|
+
echo "Unexpected argument: $arg" >&2
|
|
73
|
+
usage >&2
|
|
74
|
+
exit 1
|
|
75
|
+
fi
|
|
76
|
+
;;
|
|
71
77
|
esac
|
|
72
78
|
done
|
|
73
79
|
|
|
@@ -189,7 +195,7 @@ while true; do
|
|
|
189
195
|
remaining="$(remaining_count)"
|
|
190
196
|
if [[ "$remaining" == "0" ]]; then
|
|
191
197
|
total="$(total_count)"
|
|
192
|
-
send_telegram "🧭
|
|
198
|
+
send_telegram "🧭 `${SESSION_UUID}`"$'\n'"✅ All requirements completed"$'\n'"🎯 ${total} of ${total}"
|
|
193
199
|
echo "All sprint requirements complete."
|
|
194
200
|
echo "<promise>DONE</promise>"
|
|
195
201
|
exit 0
|
|
@@ -203,7 +209,7 @@ while true; do
|
|
|
203
209
|
desc="$(next_description)"
|
|
204
210
|
total="$(total_count)"
|
|
205
211
|
current="$(current_index)"
|
|
206
|
-
send_telegram "🧭
|
|
212
|
+
send_telegram "🧭 `${SESSION_UUID}`"$'\n'"📌 ${desc}"$'\n'"🎯 ${current} of ${total}"
|
|
207
213
|
echo "Iteration $iteration - next requirement: $desc"
|
|
208
214
|
|
|
209
215
|
prompt_tmp="$(mktemp)"
|