claude-evolve 1.0.8 → 1.0.9
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-config +38 -75
- package/bin/claude-evolve-setup +1 -1
- package/lib/config.sh +28 -13
- package/package.json +1 -1
- package/templates/config.yaml +27 -0
- package/templates/config.sh +0 -27
package/bin/claude-evolve-config
CHANGED
|
@@ -24,11 +24,9 @@ DESCRIPTION:
|
|
|
24
24
|
Manages claude-evolve configuration settings including file paths,
|
|
25
25
|
algorithm locations, and behavior settings.
|
|
26
26
|
|
|
27
|
-
CONFIGURATION
|
|
28
|
-
The configuration is loaded from
|
|
29
|
-
|
|
30
|
-
2. ./evolution/config.sh (evolution workspace)
|
|
31
|
-
3. ./.claude-evolve.config (hidden config file)
|
|
27
|
+
CONFIGURATION FILE:
|
|
28
|
+
The configuration is loaded from:
|
|
29
|
+
evolution/config.yaml
|
|
32
30
|
|
|
33
31
|
If no config file exists, defaults are used.
|
|
34
32
|
EOF
|
|
@@ -70,54 +68,33 @@ show)
|
|
|
70
68
|
show_config
|
|
71
69
|
;;
|
|
72
70
|
edit)
|
|
73
|
-
#
|
|
74
|
-
config_file=""
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
config_file=".claude-evolve.config"
|
|
81
|
-
else
|
|
82
|
-
# Create in evolution directory if it exists
|
|
83
|
-
if [[ -d "evolution" ]]; then
|
|
84
|
-
config_file="evolution/config.sh"
|
|
85
|
-
else
|
|
86
|
-
config_file="config.sh"
|
|
71
|
+
# Single config file location
|
|
72
|
+
config_file="evolution/config.yaml"
|
|
73
|
+
|
|
74
|
+
if [[ ! -f "$config_file" ]]; then
|
|
75
|
+
if [[ ! -d "evolution" ]]; then
|
|
76
|
+
echo "[ERROR] Evolution directory not found. Run 'claude-evolve setup' first." >&2
|
|
77
|
+
exit 1
|
|
87
78
|
fi
|
|
79
|
+
|
|
88
80
|
echo "[INFO] Creating new config file: $config_file"
|
|
89
81
|
|
|
90
82
|
# Copy template if available
|
|
91
|
-
if [[ -f "$SCRIPT_DIR/../templates/config.
|
|
92
|
-
cp "$SCRIPT_DIR/../templates/config.
|
|
83
|
+
if [[ -f "$SCRIPT_DIR/../templates/config.yaml" ]]; then
|
|
84
|
+
cp "$SCRIPT_DIR/../templates/config.yaml" "$config_file"
|
|
93
85
|
else
|
|
94
86
|
# Create basic config
|
|
95
87
|
cat > "$config_file" <<EOF
|
|
96
|
-
#!/bin/bash
|
|
97
88
|
# claude-evolve configuration file
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
# CSV file for tracking evolution (relative to EVOLUTION_DIR)
|
|
108
|
-
EVOLUTION_CSV="evolution.csv"
|
|
109
|
-
|
|
110
|
-
# Output directory for generated algorithms (relative to EVOLUTION_DIR)
|
|
111
|
-
OUTPUT_DIR=""
|
|
112
|
-
|
|
113
|
-
# Parent algorithm selection strategy: "best", "random", "latest"
|
|
114
|
-
PARENT_SELECTION="best"
|
|
115
|
-
|
|
116
|
-
# Maximum number of ideas to generate at once
|
|
117
|
-
MAX_IDEAS=50
|
|
118
|
-
|
|
119
|
-
# Python command to use for evaluation
|
|
120
|
-
PYTHON_CMD="python3"
|
|
89
|
+
evolution_dir: "evolution"
|
|
90
|
+
algorithm_file: "algorithm.py"
|
|
91
|
+
evaluator_file: "evaluator.py"
|
|
92
|
+
brief_file: "BRIEF.md"
|
|
93
|
+
evolution_csv: "evolution.csv"
|
|
94
|
+
output_dir: ""
|
|
95
|
+
parent_selection: "best"
|
|
96
|
+
max_ideas: 50
|
|
97
|
+
python_cmd: "python3"
|
|
121
98
|
EOF
|
|
122
99
|
fi
|
|
123
100
|
fi
|
|
@@ -135,43 +112,29 @@ EOF
|
|
|
135
112
|
fi
|
|
136
113
|
;;
|
|
137
114
|
reset)
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
115
|
+
config_file="evolution/config.yaml"
|
|
116
|
+
|
|
117
|
+
if [[ ! -d "evolution" ]]; then
|
|
118
|
+
echo "[ERROR] Evolution directory not found. Run 'claude-evolve setup' first." >&2
|
|
119
|
+
exit 1
|
|
142
120
|
fi
|
|
143
121
|
|
|
144
122
|
echo "[INFO] Resetting configuration to defaults: $config_file"
|
|
145
|
-
if [[ -f "$SCRIPT_DIR/../templates/config.
|
|
146
|
-
cp "$SCRIPT_DIR/../templates/config.
|
|
123
|
+
if [[ -f "$SCRIPT_DIR/../templates/config.yaml" ]]; then
|
|
124
|
+
cp "$SCRIPT_DIR/../templates/config.yaml" "$config_file"
|
|
147
125
|
else
|
|
148
126
|
# Create default config
|
|
149
127
|
cat > "$config_file" <<EOF
|
|
150
|
-
#!/bin/bash
|
|
151
128
|
# claude-evolve configuration file
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
# CSV file for tracking evolution (relative to EVOLUTION_DIR)
|
|
162
|
-
EVOLUTION_CSV="evolution.csv"
|
|
163
|
-
|
|
164
|
-
# Output directory for generated algorithms (relative to EVOLUTION_DIR)
|
|
165
|
-
OUTPUT_DIR=""
|
|
166
|
-
|
|
167
|
-
# Parent algorithm selection strategy: "best", "random", "latest"
|
|
168
|
-
PARENT_SELECTION="best"
|
|
169
|
-
|
|
170
|
-
# Maximum number of ideas to generate at once
|
|
171
|
-
MAX_IDEAS=50
|
|
172
|
-
|
|
173
|
-
# Python command to use for evaluation
|
|
174
|
-
PYTHON_CMD="python3"
|
|
129
|
+
evolution_dir: "evolution"
|
|
130
|
+
algorithm_file: "algorithm.py"
|
|
131
|
+
evaluator_file: "evaluator.py"
|
|
132
|
+
brief_file: "BRIEF.md"
|
|
133
|
+
evolution_csv: "evolution.csv"
|
|
134
|
+
output_dir: ""
|
|
135
|
+
parent_selection: "best"
|
|
136
|
+
max_ideas: 50
|
|
137
|
+
python_cmd: "python3"
|
|
175
138
|
EOF
|
|
176
139
|
fi
|
|
177
140
|
echo "[INFO] Configuration reset successfully"
|
package/bin/claude-evolve-setup
CHANGED
|
@@ -20,7 +20,7 @@ else
|
|
|
20
20
|
fi
|
|
21
21
|
|
|
22
22
|
# Copy template files
|
|
23
|
-
for file in BRIEF.md algorithm.py evaluator.py config.
|
|
23
|
+
for file in BRIEF.md algorithm.py evaluator.py config.yaml; do
|
|
24
24
|
if [[ ! -f evolution/$file ]]; then
|
|
25
25
|
if [[ -f "$PROJECT_ROOT/templates/$file" ]]; then
|
|
26
26
|
echo "[INFO] Copying $file from templates..."
|
package/lib/config.sh
CHANGED
|
@@ -25,21 +25,36 @@ load_config() {
|
|
|
25
25
|
MAX_IDEAS="$DEFAULT_MAX_IDEAS"
|
|
26
26
|
PYTHON_CMD="$DEFAULT_PYTHON_CMD"
|
|
27
27
|
|
|
28
|
-
#
|
|
29
|
-
local config_file=""
|
|
30
|
-
|
|
31
|
-
config_file="config.sh"
|
|
32
|
-
elif [[ -f "evolution/config.sh" ]]; then
|
|
33
|
-
config_file="evolution/config.sh"
|
|
34
|
-
elif [[ -f ".claude-evolve.config" ]]; then
|
|
35
|
-
config_file=".claude-evolve.config"
|
|
36
|
-
fi
|
|
37
|
-
|
|
28
|
+
# Single config file location: evolution/config.yaml
|
|
29
|
+
local config_file="evolution/config.yaml"
|
|
30
|
+
|
|
38
31
|
# Load config if found
|
|
39
|
-
if [[ -
|
|
32
|
+
if [[ -f "$config_file" ]]; then
|
|
40
33
|
echo "[INFO] Loading configuration from: $config_file"
|
|
41
|
-
#
|
|
42
|
-
|
|
34
|
+
# Simple YAML parsing for key: value pairs
|
|
35
|
+
while IFS=': ' read -r key value; do
|
|
36
|
+
# Skip comments and empty lines
|
|
37
|
+
[[ $key =~ ^[[:space:]]*# ]] || [[ -z $key ]] && continue
|
|
38
|
+
|
|
39
|
+
# Remove leading/trailing whitespace
|
|
40
|
+
key=$(echo "$key" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
|
|
41
|
+
value=$(echo "$value" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
|
|
42
|
+
|
|
43
|
+
# Remove quotes from value
|
|
44
|
+
value=$(echo "$value" | sed 's/^"//;s/"$//')
|
|
45
|
+
|
|
46
|
+
case $key in
|
|
47
|
+
evolution_dir) EVOLUTION_DIR="$value" ;;
|
|
48
|
+
algorithm_file) ALGORITHM_FILE="$value" ;;
|
|
49
|
+
evaluator_file) EVALUATOR_FILE="$value" ;;
|
|
50
|
+
brief_file) BRIEF_FILE="$value" ;;
|
|
51
|
+
evolution_csv) EVOLUTION_CSV="$value" ;;
|
|
52
|
+
output_dir) OUTPUT_DIR="$value" ;;
|
|
53
|
+
parent_selection) PARENT_SELECTION="$value" ;;
|
|
54
|
+
max_ideas) MAX_IDEAS="$value" ;;
|
|
55
|
+
python_cmd) PYTHON_CMD="$value" ;;
|
|
56
|
+
esac
|
|
57
|
+
done < "$config_file"
|
|
43
58
|
fi
|
|
44
59
|
|
|
45
60
|
# Create full paths
|
package/package.json
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# claude-evolve configuration file
|
|
2
|
+
# This file defines paths and settings for the evolution process
|
|
3
|
+
|
|
4
|
+
# Working directory for evolution files
|
|
5
|
+
evolution_dir: "evolution"
|
|
6
|
+
|
|
7
|
+
# Algorithm and evaluator file paths (relative to evolution_dir)
|
|
8
|
+
algorithm_file: "algorithm.py"
|
|
9
|
+
evaluator_file: "evaluator.py"
|
|
10
|
+
brief_file: "BRIEF.md"
|
|
11
|
+
|
|
12
|
+
# CSV file for tracking evolution (relative to evolution_dir)
|
|
13
|
+
evolution_csv: "evolution.csv"
|
|
14
|
+
|
|
15
|
+
# Output directory for generated algorithms (relative to evolution_dir)
|
|
16
|
+
# Leave empty to use evolution_dir directly
|
|
17
|
+
output_dir: ""
|
|
18
|
+
|
|
19
|
+
# Parent algorithm selection strategy
|
|
20
|
+
# Options: "best", "random", "latest"
|
|
21
|
+
parent_selection: "best"
|
|
22
|
+
|
|
23
|
+
# Maximum number of ideas to generate at once
|
|
24
|
+
max_ideas: 50
|
|
25
|
+
|
|
26
|
+
# Python command to use for evaluation
|
|
27
|
+
python_cmd: "python3"
|
package/templates/config.sh
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# claude-evolve configuration file
|
|
3
|
-
# This file defines paths and settings for the evolution process
|
|
4
|
-
|
|
5
|
-
# Working directory for evolution files
|
|
6
|
-
EVOLUTION_DIR="evolution"
|
|
7
|
-
|
|
8
|
-
# Algorithm and evaluator file paths (relative to EVOLUTION_DIR)
|
|
9
|
-
ALGORITHM_FILE="algorithm.py"
|
|
10
|
-
EVALUATOR_FILE="evaluator.py"
|
|
11
|
-
BRIEF_FILE="BRIEF.md"
|
|
12
|
-
|
|
13
|
-
# CSV file for tracking evolution (relative to EVOLUTION_DIR)
|
|
14
|
-
EVOLUTION_CSV="evolution.csv"
|
|
15
|
-
|
|
16
|
-
# Output directory for generated algorithms (relative to EVOLUTION_DIR)
|
|
17
|
-
OUTPUT_DIR=""
|
|
18
|
-
|
|
19
|
-
# Parent algorithm selection strategy
|
|
20
|
-
# Options: "best", "random", "latest"
|
|
21
|
-
PARENT_SELECTION="best"
|
|
22
|
-
|
|
23
|
-
# Maximum number of ideas to generate at once
|
|
24
|
-
MAX_IDEAS=50
|
|
25
|
-
|
|
26
|
-
# Python command to use for evaluation
|
|
27
|
-
PYTHON_CMD="python3"
|