claude-evolve 1.3.6 → 1.3.7
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/bin/claude-evolve-run +33 -19
- package/lib/config.sh +8 -0
- package/package.json +1 -1
- package/templates/config.yaml +4 -0
package/bin/claude-evolve-run
CHANGED
|
@@ -150,8 +150,14 @@ find_empty_row() {
|
|
|
150
150
|
local row_num=2 # Start after header
|
|
151
151
|
local csv_id csv_based_on csv_desc csv_perf csv_status
|
|
152
152
|
while IFS=, read -r csv_id csv_based_on csv_desc csv_perf csv_status; do
|
|
153
|
-
# Look for rows with pending status or empty status (but not complete/failed/running)
|
|
154
|
-
|
|
153
|
+
# Look for rows with pending status or empty status (but not complete/failed/running/timeout)
|
|
154
|
+
# Treat blank status as pending
|
|
155
|
+
if [[ $csv_status == "pending" || -z $csv_status || $csv_status == '""' ]]; then
|
|
156
|
+
# Skip if status is explicitly complete, failed, running, or timeout
|
|
157
|
+
if [[ $csv_status == "complete" || $csv_status == "failed" || $csv_status == "running" || $csv_status == "timeout" ]]; then
|
|
158
|
+
((row_num++))
|
|
159
|
+
continue
|
|
160
|
+
fi
|
|
155
161
|
echo $row_num
|
|
156
162
|
return 0
|
|
157
163
|
fi
|
|
@@ -259,26 +265,34 @@ attempt_recovery() {
|
|
|
259
265
|
while true; do
|
|
260
266
|
# Find next candidate
|
|
261
267
|
if ! row_num=$(find_empty_row); then
|
|
262
|
-
echo "[INFO] No more pending candidates found.
|
|
268
|
+
echo "[INFO] No more pending candidates found."
|
|
263
269
|
|
|
264
|
-
# Check if
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
270
|
+
# Check if auto ideation is enabled
|
|
271
|
+
if [[ "$AUTO_IDEATE" == "true" || "$AUTO_IDEATE" == "1" ]]; then
|
|
272
|
+
echo "[INFO] Auto ideation is enabled. Generating new ideas..."
|
|
273
|
+
|
|
274
|
+
# Check if claude-evolve-ideate exists
|
|
275
|
+
ideate_script="$SCRIPT_DIR/claude-evolve-ideate"
|
|
276
|
+
if [[ ! -f "$ideate_script" ]]; then
|
|
277
|
+
echo "[ERROR] claude-evolve-ideate script not found: $ideate_script" >&2
|
|
278
|
+
echo "[INFO] Evolution run complete - no way to generate more ideas."
|
|
279
|
+
exit 0
|
|
280
|
+
fi
|
|
281
|
+
|
|
282
|
+
# Generate new ideas using the multi-strategy approach
|
|
283
|
+
echo "[INFO] Calling claude-evolve-ideate to generate new candidates..."
|
|
284
|
+
if ! "$ideate_script"; then
|
|
285
|
+
echo "[ERROR] Failed to generate new ideas" >&2
|
|
286
|
+
echo "[INFO] Evolution run complete - ideation failed."
|
|
287
|
+
exit 1
|
|
288
|
+
fi
|
|
289
|
+
|
|
290
|
+
echo "[INFO] New ideas generated successfully. Continuing evolution..."
|
|
291
|
+
continue # Go back to start of loop to find the new candidates
|
|
292
|
+
else
|
|
293
|
+
echo "[INFO] Auto ideation is disabled. Evolution run complete."
|
|
269
294
|
exit 0
|
|
270
295
|
fi
|
|
271
|
-
|
|
272
|
-
# Generate new ideas using the multi-strategy approach
|
|
273
|
-
echo "[INFO] Calling claude-evolve-ideate to generate new candidates..."
|
|
274
|
-
if ! "$ideate_script"; then
|
|
275
|
-
echo "[ERROR] Failed to generate new ideas" >&2
|
|
276
|
-
echo "[INFO] Evolution run complete - ideation failed."
|
|
277
|
-
exit 1
|
|
278
|
-
fi
|
|
279
|
-
|
|
280
|
-
echo "[INFO] New ideas generated successfully. Continuing evolution..."
|
|
281
|
-
continue # Go back to start of loop to find the new candidates
|
|
282
296
|
fi
|
|
283
297
|
|
|
284
298
|
# Create log file for this iteration
|
package/lib/config.sh
CHANGED
|
@@ -24,6 +24,9 @@ DEFAULT_PARALLEL_ENABLED=false
|
|
|
24
24
|
DEFAULT_MAX_WORKERS=4
|
|
25
25
|
DEFAULT_LOCK_TIMEOUT=30
|
|
26
26
|
|
|
27
|
+
# Default auto ideation value
|
|
28
|
+
DEFAULT_AUTO_IDEATE=true
|
|
29
|
+
|
|
27
30
|
# Load configuration from config file
|
|
28
31
|
load_config() {
|
|
29
32
|
# Accept config file path as parameter
|
|
@@ -52,6 +55,9 @@ load_config() {
|
|
|
52
55
|
MAX_WORKERS="$DEFAULT_MAX_WORKERS"
|
|
53
56
|
LOCK_TIMEOUT="$DEFAULT_LOCK_TIMEOUT"
|
|
54
57
|
|
|
58
|
+
# Set auto ideation default
|
|
59
|
+
AUTO_IDEATE="$DEFAULT_AUTO_IDEATE"
|
|
60
|
+
|
|
55
61
|
# Load config if found
|
|
56
62
|
if [[ -f "$config_file" ]]; then
|
|
57
63
|
echo "[INFO] Loading configuration from: $config_file"
|
|
@@ -127,6 +133,7 @@ load_config() {
|
|
|
127
133
|
output_dir) OUTPUT_DIR="$value" ;;
|
|
128
134
|
parent_selection) PARENT_SELECTION="$value" ;;
|
|
129
135
|
python_cmd) PYTHON_CMD="$value" ;;
|
|
136
|
+
auto_ideate) AUTO_IDEATE="$value" ;;
|
|
130
137
|
esac
|
|
131
138
|
fi
|
|
132
139
|
done < "$config_file"
|
|
@@ -202,4 +209,5 @@ show_config() {
|
|
|
202
209
|
echo " Parallel enabled: $PARALLEL_ENABLED"
|
|
203
210
|
echo " Max workers: $MAX_WORKERS"
|
|
204
211
|
echo " Lock timeout: $LOCK_TIMEOUT"
|
|
212
|
+
echo " Auto ideate: $AUTO_IDEATE"
|
|
205
213
|
}
|
package/package.json
CHANGED
package/templates/config.yaml
CHANGED
|
@@ -37,6 +37,10 @@ ideation_strategies:
|
|
|
37
37
|
# Python command to use for evaluation
|
|
38
38
|
python_cmd: "python3"
|
|
39
39
|
|
|
40
|
+
# Auto ideation configuration
|
|
41
|
+
# When true, automatically generate new ideas when no pending candidates remain
|
|
42
|
+
auto_ideate: true
|
|
43
|
+
|
|
40
44
|
# Parallel execution configuration
|
|
41
45
|
parallel:
|
|
42
46
|
# Enable parallel execution of evolution candidates
|