claude-evolve 1.7.16 → 1.7.18
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-ideate +99 -35
- package/package.json +1 -1
package/bin/claude-evolve-ideate
CHANGED
|
@@ -978,7 +978,14 @@ generate_novel_ideas_direct() {
|
|
|
978
978
|
done
|
|
979
979
|
|
|
980
980
|
echo "[INFO] Generating $count novel exploration ideas with IDs: $required_ids_str"
|
|
981
|
-
|
|
981
|
+
|
|
982
|
+
# Count total lines in temp CSV (including header)
|
|
983
|
+
local total_lines
|
|
984
|
+
total_lines=$(wc -l < "$temp_csv")
|
|
985
|
+
local read_offset=$((total_lines - 25))
|
|
986
|
+
if [[ $read_offset -lt 1 ]]; then
|
|
987
|
+
read_offset=1
|
|
988
|
+
fi
|
|
982
989
|
|
|
983
990
|
# Use relative paths and change to evolution directory so AI can access files
|
|
984
991
|
local temp_csv_basename=$(basename "$temp_csv")
|
|
@@ -988,6 +995,8 @@ generate_novel_ideas_direct() {
|
|
|
988
995
|
|
|
989
996
|
local prompt="I need you to use your file editing capabilities to fill in PLACEHOLDER descriptions in the CSV file: $temp_csv_basename
|
|
990
997
|
|
|
998
|
+
THE FILE HAS $total_lines TOTAL LINES. Read from line $read_offset to see the placeholder rows at the end.
|
|
999
|
+
|
|
991
1000
|
Current evolution context:
|
|
992
1001
|
- Generation: $CURRENT_GENERATION
|
|
993
1002
|
- Algorithm: algorithm.py (base algorithm)
|
|
@@ -1000,24 +1009,28 @@ The CSV file already contains $count stub rows with these IDs: $required_ids_str
|
|
|
1000
1009
|
Each stub row has a PLACEHOLDER description like: \"[PLACEHOLDER: Replace this with your algorithmic idea]\"
|
|
1001
1010
|
Your job is to REPLACE each PLACEHOLDER with a real algorithmic idea description.
|
|
1002
1011
|
|
|
1012
|
+
⚠️ CRITICAL FILE READING INSTRUCTIONS ⚠️
|
|
1013
|
+
THE CSV FILE IS VERY LARGE (OVER 100,000 TOKENS). YOU WILL RUN OUT OF CONTEXT IF YOU READ IT ALL!
|
|
1014
|
+
- DO NOT read the entire file or you will exceed context limits and CRASH
|
|
1015
|
+
- Use: Read(file_path='$temp_csv_basename', offset=$read_offset, limit=25)
|
|
1016
|
+
- This will read ONLY the last 25 lines where the placeholders are
|
|
1017
|
+
- DO NOT READ FROM OFFSET 0 - that will load the entire huge file and fail!
|
|
1018
|
+
|
|
1003
1019
|
CRITICAL INSTRUCTIONS:
|
|
1004
|
-
1.
|
|
1005
|
-
Example: Read the last 20 lines to see the placeholders
|
|
1020
|
+
1. Read ONLY the last 20-30 lines of the CSV to see the placeholder rows
|
|
1006
1021
|
2. DO NOT ADD OR DELETE ANY ROWS - only EDIT the placeholder descriptions
|
|
1007
|
-
3. DO NOT CHANGE THE IDs - they are already correct
|
|
1008
|
-
4. Use the Edit tool to replace
|
|
1009
|
-
5.
|
|
1022
|
+
3. DO NOT CHANGE THE IDs - they are already correct ($required_ids_str)
|
|
1023
|
+
4. Use the Edit tool to replace EACH PLACEHOLDER text with a real algorithmic idea
|
|
1024
|
+
5. When editing, preserve the CSV structure: keep the ID and parent_id fields unchanged"
|
|
1010
1025
|
|
|
1011
1026
|
if [[ -n "$existing_py_files" ]]; then
|
|
1012
1027
|
prompt+="
|
|
1013
|
-
|
|
1028
|
+
6. IMPORTANT: The following IDs already have Python files: $existing_py_files
|
|
1014
1029
|
(This is informational only - use the IDs specified above)"
|
|
1015
1030
|
fi
|
|
1016
|
-
|
|
1031
|
+
|
|
1017
1032
|
prompt+="
|
|
1018
|
-
|
|
1019
|
-
7. For each idea, create a row with: id,,description,,pending (empty parent_id for novel ideas)
|
|
1020
|
-
8. CRITICAL CSV FORMATTING RULES:
|
|
1033
|
+
7. CRITICAL CSV FORMATTING RULES:
|
|
1021
1034
|
- ALWAYS wrap the description field in double quotes
|
|
1022
1035
|
- If the description contains quotes, escape them by doubling them (\" becomes \"\")
|
|
1023
1036
|
- Example: gen01-001,,\"Implement adaptive RSI thresholds based on volatility\",,pending
|
|
@@ -1099,7 +1112,14 @@ generate_hill_climbing_direct() {
|
|
|
1099
1112
|
done
|
|
1100
1113
|
|
|
1101
1114
|
echo "[INFO] Generating $count hill climbing ideas with IDs: $required_ids_str"
|
|
1102
|
-
|
|
1115
|
+
|
|
1116
|
+
# Count total lines in temp CSV (including header)
|
|
1117
|
+
local total_lines
|
|
1118
|
+
total_lines=$(wc -l < "$temp_csv")
|
|
1119
|
+
local read_offset=$((total_lines - 25))
|
|
1120
|
+
if [[ $read_offset -lt 1 ]]; then
|
|
1121
|
+
read_offset=1
|
|
1122
|
+
fi
|
|
1103
1123
|
|
|
1104
1124
|
# Get existing Python files for this generation to avoid ID collisions
|
|
1105
1125
|
local existing_py_files=$(get_existing_py_files_for_generation "$CURRENT_GENERATION")
|
|
@@ -1113,6 +1133,8 @@ generate_hill_climbing_direct() {
|
|
|
1113
1133
|
|
|
1114
1134
|
local prompt="I need you to use your file editing capabilities to fill in PLACEHOLDER descriptions in the CSV file: $temp_csv_basename
|
|
1115
1135
|
|
|
1136
|
+
THE FILE HAS $total_lines TOTAL LINES. Read from line $read_offset to see the placeholder rows at the end.
|
|
1137
|
+
|
|
1116
1138
|
IMPORTANT: You MUST use one of these exact parent IDs: $valid_parent_ids
|
|
1117
1139
|
|
|
1118
1140
|
Successful algorithms to tune:
|
|
@@ -1137,16 +1159,24 @@ The CSV file already contains $count stub rows with these IDs: $required_ids_str
|
|
|
1137
1159
|
Each stub row has a PLACEHOLDER description like: \"[PLACEHOLDER: Replace with parameter tuning idea]\"
|
|
1138
1160
|
Your job is to REPLACE each PLACEHOLDER with a real parameter tuning idea.
|
|
1139
1161
|
|
|
1162
|
+
⚠️ CRITICAL FILE READING INSTRUCTIONS ⚠️
|
|
1163
|
+
THE CSV FILE IS VERY LARGE (OVER 100,000 TOKENS). YOU WILL RUN OUT OF CONTEXT IF YOU READ IT ALL!
|
|
1164
|
+
- DO NOT read the entire file or you will exceed context limits and CRASH
|
|
1165
|
+
- Use: Read(file_path='$temp_csv_basename', offset=$read_offset, limit=25)
|
|
1166
|
+
- This will read ONLY the last 25 lines where the placeholders are
|
|
1167
|
+
- DO NOT READ FROM OFFSET 0 - that will load the entire huge file and fail!
|
|
1168
|
+
|
|
1140
1169
|
CRITICAL INSTRUCTIONS:
|
|
1141
|
-
1.
|
|
1170
|
+
1. Read ONLY the last 25 lines using the offset specified above
|
|
1142
1171
|
2. DO NOT ADD OR DELETE ANY ROWS - only EDIT the placeholder descriptions
|
|
1143
|
-
3. DO NOT CHANGE THE IDs - they are already correct
|
|
1144
|
-
4. Use the Edit tool to replace
|
|
1145
|
-
5.
|
|
1146
|
-
6.
|
|
1172
|
+
3. DO NOT CHANGE THE IDs - they are already correct ($required_ids_str)
|
|
1173
|
+
4. Use the Edit tool to replace EACH PLACEHOLDER text with a parameter tuning idea
|
|
1174
|
+
5. When editing, preserve the CSV structure: keep the ID field unchanged
|
|
1175
|
+
6. You may change the parent_id field if needed to reference a different top performer
|
|
1176
|
+
7. Each description should focus on adjusting specific parameters - include current and new values
|
|
1147
1177
|
Example: \"Lower rsi_entry from 21 to 18\" or \"Increase MA period from 20 to 50\"
|
|
1148
|
-
|
|
1149
|
-
|
|
1178
|
+
8. CRITICAL: When editing, preserve the CSV formatting with proper quoting
|
|
1179
|
+
9. DO NOT use any git commands (git add, git commit, git reset, etc.). Only modify the file directly."
|
|
1150
1180
|
|
|
1151
1181
|
# Change to evolution directory so AI can access files
|
|
1152
1182
|
local original_pwd=$(pwd)
|
|
@@ -1211,7 +1241,14 @@ generate_structural_mutation_direct() {
|
|
|
1211
1241
|
done
|
|
1212
1242
|
|
|
1213
1243
|
echo "[INFO] Generating $count structural mutation ideas with IDs: $required_ids_str"
|
|
1214
|
-
|
|
1244
|
+
|
|
1245
|
+
# Count total lines in temp CSV (including header)
|
|
1246
|
+
local total_lines
|
|
1247
|
+
total_lines=$(wc -l < "$temp_csv")
|
|
1248
|
+
local read_offset=$((total_lines - 25))
|
|
1249
|
+
if [[ $read_offset -lt 1 ]]; then
|
|
1250
|
+
read_offset=1
|
|
1251
|
+
fi
|
|
1215
1252
|
|
|
1216
1253
|
# Get existing Python files for this generation to avoid ID collisions
|
|
1217
1254
|
local existing_py_files=$(get_existing_py_files_for_generation "$CURRENT_GENERATION")
|
|
@@ -1225,6 +1262,8 @@ generate_structural_mutation_direct() {
|
|
|
1225
1262
|
|
|
1226
1263
|
local prompt="I need you to use your file editing capabilities to fill in PLACEHOLDER descriptions in the CSV file: $temp_csv_basename
|
|
1227
1264
|
|
|
1265
|
+
THE FILE HAS $total_lines TOTAL LINES. Read from line $read_offset to see the placeholder rows at the end.
|
|
1266
|
+
|
|
1228
1267
|
IMPORTANT: You MUST use one of these exact parent IDs: $valid_parent_ids
|
|
1229
1268
|
|
|
1230
1269
|
Successful algorithms to modify structurally:
|
|
@@ -1241,15 +1280,23 @@ The CSV file already contains $count stub rows with these IDs: $required_ids_str
|
|
|
1241
1280
|
Each stub row has a PLACEHOLDER description like: \"[PLACEHOLDER: Replace with structural modification idea]\"
|
|
1242
1281
|
Your job is to REPLACE each PLACEHOLDER with a real structural modification idea.
|
|
1243
1282
|
|
|
1283
|
+
⚠️ CRITICAL FILE READING INSTRUCTIONS ⚠️
|
|
1284
|
+
THE CSV FILE IS VERY LARGE (OVER 100,000 TOKENS). YOU WILL RUN OUT OF CONTEXT IF YOU READ IT ALL!
|
|
1285
|
+
- DO NOT read the entire file or you will exceed context limits and CRASH
|
|
1286
|
+
- Use: Read(file_path='$temp_csv_basename', offset=$read_offset, limit=25)
|
|
1287
|
+
- This will read ONLY the last 25 lines where the placeholders are
|
|
1288
|
+
- DO NOT READ FROM OFFSET 0 - that will load the entire huge file and fail!
|
|
1289
|
+
|
|
1244
1290
|
CRITICAL INSTRUCTIONS:
|
|
1245
|
-
1.
|
|
1291
|
+
1. Read ONLY the last 25 lines using the offset specified above
|
|
1246
1292
|
2. DO NOT ADD OR DELETE ANY ROWS - only EDIT the placeholder descriptions
|
|
1247
|
-
3. DO NOT CHANGE THE IDs - they are already correct
|
|
1248
|
-
4. Use the Edit tool to replace
|
|
1249
|
-
5.
|
|
1250
|
-
6.
|
|
1251
|
-
7.
|
|
1252
|
-
8.
|
|
1293
|
+
3. DO NOT CHANGE THE IDs - they are already correct ($required_ids_str)
|
|
1294
|
+
4. Use the Edit tool to replace EACH PLACEHOLDER text with a structural modification idea
|
|
1295
|
+
5. When editing, preserve the CSV structure: keep the ID field unchanged
|
|
1296
|
+
6. You may change the parent_id field if needed to reference a different top performer
|
|
1297
|
+
7. Each description should focus on architectural/structural changes
|
|
1298
|
+
8. CRITICAL: When editing, preserve the CSV formatting with proper quoting
|
|
1299
|
+
9. DO NOT use any git commands (git add, git commit, git reset, etc.). Only modify the file directly."
|
|
1253
1300
|
|
|
1254
1301
|
# Change to evolution directory so AI can access files
|
|
1255
1302
|
local original_pwd=$(pwd)
|
|
@@ -1314,7 +1361,14 @@ generate_crossover_direct() {
|
|
|
1314
1361
|
done
|
|
1315
1362
|
|
|
1316
1363
|
echo "[INFO] Generating $count crossover hybrid ideas with IDs: $required_ids_str"
|
|
1317
|
-
|
|
1364
|
+
|
|
1365
|
+
# Count total lines in temp CSV (including header)
|
|
1366
|
+
local total_lines
|
|
1367
|
+
total_lines=$(wc -l < "$temp_csv")
|
|
1368
|
+
local read_offset=$((total_lines - 25))
|
|
1369
|
+
if [[ $read_offset -lt 1 ]]; then
|
|
1370
|
+
read_offset=1
|
|
1371
|
+
fi
|
|
1318
1372
|
|
|
1319
1373
|
# Get existing Python files for this generation to avoid ID collisions
|
|
1320
1374
|
local existing_py_files=$(get_existing_py_files_for_generation "$CURRENT_GENERATION")
|
|
@@ -1328,6 +1382,8 @@ generate_crossover_direct() {
|
|
|
1328
1382
|
|
|
1329
1383
|
local prompt="I need you to use your file editing capabilities to fill in PLACEHOLDER descriptions in the CSV file: $temp_csv_basename
|
|
1330
1384
|
|
|
1385
|
+
THE FILE HAS $total_lines TOTAL LINES. Read from line $read_offset to see the placeholder rows at the end.
|
|
1386
|
+
|
|
1331
1387
|
IMPORTANT: You MUST use ONLY these exact parent IDs: $valid_parent_ids
|
|
1332
1388
|
|
|
1333
1389
|
Top performers to combine (reference at least 2 in each idea):
|
|
@@ -1344,15 +1400,23 @@ The CSV file already contains $count stub rows with these IDs: $required_ids_str
|
|
|
1344
1400
|
Each stub row has a PLACEHOLDER description like: \"[PLACEHOLDER: Replace with crossover hybrid idea]\"
|
|
1345
1401
|
Your job is to REPLACE each PLACEHOLDER with a real crossover/hybrid idea that combines 2+ algorithms.
|
|
1346
1402
|
|
|
1403
|
+
⚠️ CRITICAL FILE READING INSTRUCTIONS ⚠️
|
|
1404
|
+
THE CSV FILE IS VERY LARGE (OVER 100,000 TOKENS). YOU WILL RUN OUT OF CONTEXT IF YOU READ IT ALL!
|
|
1405
|
+
- DO NOT read the entire file or you will exceed context limits and CRASH
|
|
1406
|
+
- Use: Read(file_path='$temp_csv_basename', offset=$read_offset, limit=25)
|
|
1407
|
+
- This will read ONLY the last 25 lines where the placeholders are
|
|
1408
|
+
- DO NOT READ FROM OFFSET 0 - that will load the entire huge file and fail!
|
|
1409
|
+
|
|
1347
1410
|
CRITICAL INSTRUCTIONS:
|
|
1348
|
-
1.
|
|
1411
|
+
1. Read ONLY the last 25 lines using the offset specified above
|
|
1349
1412
|
2. DO NOT ADD OR DELETE ANY ROWS - only EDIT the placeholder descriptions
|
|
1350
|
-
3. DO NOT CHANGE THE IDs - they are already correct
|
|
1351
|
-
4. Use the Edit tool to replace
|
|
1352
|
-
5.
|
|
1353
|
-
6.
|
|
1354
|
-
7.
|
|
1355
|
-
8.
|
|
1413
|
+
3. DO NOT CHANGE THE IDs - they are already correct ($required_ids_str)
|
|
1414
|
+
4. Use the Edit tool to replace EACH PLACEHOLDER text with a crossover idea
|
|
1415
|
+
5. When editing, preserve the CSV structure: keep the ID field unchanged
|
|
1416
|
+
6. You may change the parent_id field if needed (choose the primary parent)
|
|
1417
|
+
7. Each description should combine actual elements from 2+ top performers
|
|
1418
|
+
8. CRITICAL: When editing, preserve the CSV formatting with proper quoting
|
|
1419
|
+
9. DO NOT use any git commands (git add, git commit, git reset, etc.). Only modify the file directly."
|
|
1356
1420
|
|
|
1357
1421
|
# Change to evolution directory so AI can access files
|
|
1358
1422
|
local original_pwd=$(pwd)
|