claude-evolve 1.8.46 → 1.8.47
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
CHANGED
|
@@ -227,7 +227,7 @@ fi
|
|
|
227
227
|
|
|
228
228
|
# Validate strategy configuration
|
|
229
229
|
if [[ $use_strategies == true ]]; then
|
|
230
|
-
total_check=$((NOVEL_EXPLORATION + HILL_CLIMBING + STRUCTURAL_MUTATION + CROSSOVER_HYBRID))
|
|
230
|
+
total_check=$((${NOVEL_EXPLORATION:-0} + ${HILL_CLIMBING:-0} + ${STRUCTURAL_MUTATION:-0} + ${CROSSOVER_HYBRID:-0}))
|
|
231
231
|
if [[ $total_check -ne $TOTAL_IDEAS ]]; then
|
|
232
232
|
echo "[ERROR] Strategy counts don't sum to total_ideas ($total_check != $TOTAL_IDEAS)" >&2
|
|
233
233
|
echo "Check your evolution/config.yaml configuration" >&2
|
|
@@ -911,7 +911,7 @@ ideate_ai_strategies() {
|
|
|
911
911
|
return 1
|
|
912
912
|
}
|
|
913
913
|
|
|
914
|
-
if [[ $NOVEL_EXPLORATION -gt 0 ]]; then
|
|
914
|
+
if [[ ${NOVEL_EXPLORATION:-0} -gt 0 ]]; then
|
|
915
915
|
((strategies_attempted++))
|
|
916
916
|
if generate_novel_ideas_direct "$NOVEL_EXPLORATION"; then
|
|
917
917
|
((strategies_succeeded++))
|
|
@@ -921,7 +921,7 @@ ideate_ai_strategies() {
|
|
|
921
921
|
fi
|
|
922
922
|
fi
|
|
923
923
|
|
|
924
|
-
if [[ $HILL_CLIMBING -gt 0 ]]; then
|
|
924
|
+
if [[ ${HILL_CLIMBING:-0} -gt 0 ]]; then
|
|
925
925
|
((strategies_attempted++))
|
|
926
926
|
if generate_hill_climbing_direct "$HILL_CLIMBING" "$top_performers"; then
|
|
927
927
|
((strategies_succeeded++))
|
|
@@ -931,7 +931,7 @@ ideate_ai_strategies() {
|
|
|
931
931
|
fi
|
|
932
932
|
fi
|
|
933
933
|
|
|
934
|
-
if [[ $STRUCTURAL_MUTATION -gt 0 ]]; then
|
|
934
|
+
if [[ ${STRUCTURAL_MUTATION:-0} -gt 0 ]]; then
|
|
935
935
|
((strategies_attempted++))
|
|
936
936
|
if generate_structural_mutation_direct "$STRUCTURAL_MUTATION" "$top_performers"; then
|
|
937
937
|
((strategies_succeeded++))
|
|
@@ -941,7 +941,7 @@ ideate_ai_strategies() {
|
|
|
941
941
|
fi
|
|
942
942
|
fi
|
|
943
943
|
|
|
944
|
-
if [[ $CROSSOVER_HYBRID -gt 0 ]]; then
|
|
944
|
+
if [[ ${CROSSOVER_HYBRID:-0} -gt 0 ]]; then
|
|
945
945
|
((strategies_attempted++))
|
|
946
946
|
if generate_crossover_direct "$CROSSOVER_HYBRID" "$top_performers"; then
|
|
947
947
|
((strategies_succeeded++))
|
|
@@ -957,7 +957,7 @@ ideate_ai_strategies() {
|
|
|
957
957
|
# The workers will process what we have, and next ideation run can add more
|
|
958
958
|
# AIDEV-NOTE: Previously required ALL strategies to succeed, which caused
|
|
959
959
|
# endless ideation loops because CSV writes weren't rolled back on "rejection"
|
|
960
|
-
if [[ $strategies_succeeded -gt 0 ]]; then
|
|
960
|
+
if [[ ${strategies_succeeded:-0} -gt 0 ]]; then
|
|
961
961
|
if [[ $strategies_succeeded -lt $strategies_attempted ]]; then
|
|
962
962
|
echo "[INFO] Partial success: $strategies_succeeded/$strategies_attempted strategies completed" >&2
|
|
963
963
|
echo "[INFO] Workers will process existing ideas, next ideation can add more" >&2
|
|
@@ -1718,7 +1718,7 @@ count_generation_pending() {
|
|
|
1718
1718
|
# AIDEV-NOTE: Generation numbers must be zero-padded to 2 digits (gen01, gen02, etc.)
|
|
1719
1719
|
# to maintain consistency with existing CSV data format
|
|
1720
1720
|
highest_gen=$(get_highest_generation)
|
|
1721
|
-
if [[ $highest_gen -eq 0 ]]; then
|
|
1721
|
+
if [[ ${highest_gen:-0} -eq 0 ]]; then
|
|
1722
1722
|
# No generations yet, start with 01
|
|
1723
1723
|
CURRENT_GENERATION="01"
|
|
1724
1724
|
echo "[INFO] No existing generations, starting with generation 01"
|
|
@@ -1732,7 +1732,7 @@ else
|
|
|
1732
1732
|
existing_ideas_padded=$(count_generation_ideas "$padded_gen")
|
|
1733
1733
|
pending_ideas_padded=$(count_generation_pending "$padded_gen")
|
|
1734
1734
|
# Use whichever found more (handles both gen1 and gen01 formats)
|
|
1735
|
-
if [[ $existing_ideas_padded -gt $existing_ideas ]]; then
|
|
1735
|
+
if [[ ${existing_ideas_padded:-0} -gt ${existing_ideas:-0} ]]; then
|
|
1736
1736
|
existing_ideas=$existing_ideas_padded
|
|
1737
1737
|
pending_ideas=$pending_ideas_padded
|
|
1738
1738
|
fi
|
|
@@ -1773,7 +1773,7 @@ while true; do
|
|
|
1773
1773
|
echo "[INFO] Generation $CURRENT_GENERATION now has $total_count ideas (target: $TOTAL_IDEAS)"
|
|
1774
1774
|
echo "[INFO] Ideation complete for this generation"
|
|
1775
1775
|
exit 0
|
|
1776
|
-
elif [[ $pending_count -gt 0 ]]; then
|
|
1776
|
+
elif [[ ${pending_count:-0} -gt 0 ]]; then
|
|
1777
1777
|
echo "[INFO] Found $pending_count pending, $total_count total for generation $CURRENT_GENERATION (target: $TOTAL_IDEAS)"
|
|
1778
1778
|
fi
|
|
1779
1779
|
|
package/bin/claude-evolve-run
CHANGED
|
@@ -681,7 +681,7 @@ except Exception as e:
|
|
|
681
681
|
print('0') # Default to 0 on error
|
|
682
682
|
" 2>/dev/null || echo "0")
|
|
683
683
|
|
|
684
|
-
if [[ $stuck_work_count -gt 0 ]]; then
|
|
684
|
+
if [[ ${stuck_work_count:-0} -gt 0 ]]; then
|
|
685
685
|
echo "[DISPATCHER] Reset $stuck_work_count stuck candidates to pending"
|
|
686
686
|
# Don't trigger ideation - go back to check pending count again
|
|
687
687
|
continue # Go back to top of loop to re-count pending
|