claude-evolve 1.0.20 → 1.1.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/bin/claude-evolve-run +14 -24
- package/package.json +1 -1
package/bin/claude-evolve-run
CHANGED
|
@@ -227,36 +227,24 @@ fi
|
|
|
227
227
|
# Increment and save counter
|
|
228
228
|
echo $((LOOP_COUNTER + 1)) > "$FULL_EVOLUTION_DIR/.loop_counter"
|
|
229
229
|
|
|
230
|
-
# Create mutation prompt
|
|
231
|
-
prompt="${MEGATHINK_PREFIX}
|
|
230
|
+
# Create mutation prompt - Claude will edit the file directly
|
|
231
|
+
prompt="${MEGATHINK_PREFIX}Please edit file $output_file to implement the following change for iteration $id: $description
|
|
232
232
|
|
|
233
|
-
|
|
234
|
-
$(cat "$FULL_BRIEF_PATH" 2>/dev/null || echo "No brief available")
|
|
233
|
+
There may be extra information in documentation in the $FULL_EVOLUTION_DIR/*.md files.
|
|
235
234
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
REQUESTED MODIFICATION:
|
|
239
|
-
$description
|
|
240
|
-
|
|
241
|
-
INSTRUCTIONS:
|
|
242
|
-
1. Read the existing algorithm file at $output_file
|
|
243
|
-
2. Apply the requested modification while preserving the core structure
|
|
244
|
-
3. Ensure the modified algorithm maintains the same interface (function signatures)
|
|
245
|
-
4. Include proper error handling and documentation
|
|
246
|
-
5. Overwrite the file with your improved version
|
|
247
|
-
6. Return ONLY the complete Python code without explanation
|
|
248
|
-
|
|
249
|
-
The output should be a complete, executable Python file that builds upon the existing algorithm."
|
|
235
|
+
The algorithm should maintain the same interface (function signatures) and include proper error handling."
|
|
250
236
|
|
|
251
237
|
# Generate mutation (skip for baseline)
|
|
252
238
|
if [[ $id == "000" || $id == "0" ]]; then
|
|
253
239
|
echo "[INFO] Baseline algorithm - skipping mutation, using original"
|
|
254
240
|
else
|
|
255
241
|
echo "[INFO] Calling Claude $CLAUDE_MODEL to apply mutation..."
|
|
242
|
+
echo "[INFO] Claude will edit: $output_file"
|
|
256
243
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
echo "[ERROR] Claude
|
|
244
|
+
# Claude will edit the file directly - we just need to run the command
|
|
245
|
+
if ! output=$(echo "$prompt" | "$claude_cmd" --model $CLAUDE_MODEL -p 2>&1); then
|
|
246
|
+
echo "[ERROR] Claude failed to mutate algorithm" >&2
|
|
247
|
+
echo "[ERROR] Claude output: $output" >&2
|
|
260
248
|
update_csv_row "$row_num" "" "failed"
|
|
261
249
|
if should_continue_after_failure; then
|
|
262
250
|
continue
|
|
@@ -265,9 +253,11 @@ else
|
|
|
265
253
|
fi
|
|
266
254
|
fi
|
|
267
255
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
256
|
+
echo "[INFO] Claude completed mutation"
|
|
257
|
+
# Show Claude's response (it might contain useful information about what was changed)
|
|
258
|
+
if [[ -n $output ]]; then
|
|
259
|
+
echo "[INFO] Claude response: $output"
|
|
260
|
+
fi
|
|
271
261
|
fi
|
|
272
262
|
|
|
273
263
|
echo "[INFO] Algorithm ready at: $output_file"
|